@aeternity/aepp-sdk 14.1.1 → 15.0.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.
- package/dist/aepp-sdk.browser-script.cjs +1 -1
- package/dist/aepp-sdk.browser-script.cjs.map +1 -1
- package/dist/aepp-sdk.browser.cjs +1 -1
- package/dist/aepp-sdk.browser.cjs.map +1 -1
- package/dist/aepp-sdk.cjs +3112 -506
- package/dist/aepp-sdk.cjs.map +1 -1
- package/es/account/Base.d.ts +6 -1
- package/es/account/Base.js.map +1 -1
- package/es/account/Generalized.d.ts +1 -1
- package/es/account/Generalized.js +7 -1
- package/es/account/Generalized.js.map +1 -1
- package/es/apis/node/models/index.d.ts +405 -79
- package/es/apis/node/models/index.js.map +1 -1
- package/es/apis/node/models/mappers.d.ts +54 -4
- package/es/apis/node/models/mappers.js +1910 -500
- package/es/apis/node/models/mappers.js.map +1 -1
- package/es/apis/node/node.d.ts +28 -6
- package/es/apis/node/node.js +276 -5
- package/es/apis/node/node.js.map +1 -1
- package/es/channel/Contract.d.ts +5 -0
- package/es/channel/Contract.js +8 -2
- package/es/channel/Contract.js.map +1 -1
- package/es/channel/handlers.js +3 -3
- package/es/channel/handlers.js.map +1 -1
- package/es/contract/ga.d.ts +5 -2
- package/es/contract/ga.js +53 -21
- package/es/contract/ga.js.map +1 -1
- package/es/index-browser.d.ts +3 -1
- package/es/index-browser.js +2 -1
- package/es/index-browser.js.map +1 -1
- package/es/tx/builder/constants.d.ts +13 -2
- package/es/tx/builder/constants.js +12 -1
- package/es/tx/builder/constants.js.map +1 -1
- package/es/tx/builder/entry/index.js +6 -0
- package/es/tx/builder/entry/index.js.map +1 -1
- package/es/tx/builder/entry/schema.d.ts +10 -10
- package/es/tx/builder/field-types/abi-version.js +6 -4
- package/es/tx/builder/field-types/abi-version.js.map +1 -1
- package/es/tx/builder/field-types/ct-version.d.ts +19 -0
- package/es/tx/builder/field-types/ct-version.js +27 -1
- package/es/tx/builder/field-types/ct-version.js.map +1 -1
- package/es/tx/builder/field-types/fee.d.ts +9 -7
- package/es/tx/builder/field-types/fee.js +75 -66
- package/es/tx/builder/field-types/fee.js.map +1 -1
- package/es/tx/builder/field-types/gas-limit.d.ts +5 -3
- package/es/tx/builder/field-types/gas-limit.js +25 -14
- package/es/tx/builder/field-types/gas-limit.js.map +1 -1
- package/es/tx/builder/field-types/gas-price.d.ts +6 -4
- package/es/tx/builder/field-types/gas-price.js +91 -21
- package/es/tx/builder/field-types/gas-price.js.map +1 -1
- package/es/tx/builder/field-types/interface.d.ts +20 -0
- package/es/tx/builder/field-types/interface.js +17 -1
- package/es/tx/builder/field-types/interface.js.map +1 -1
- package/es/tx/builder/field-types/name-fee.d.ts +3 -2
- package/es/tx/builder/field-types/name-fee.js +6 -0
- package/es/tx/builder/field-types/name-fee.js.map +1 -1
- package/es/tx/builder/field-types/pointers.d.ts +2 -1
- package/es/tx/builder/field-types/pointers.js +6 -2
- package/es/tx/builder/field-types/pointers.js.map +1 -1
- package/es/tx/builder/field-types/transaction.d.ts +4 -1
- package/es/tx/builder/field-types/transaction.js +18 -3
- package/es/tx/builder/field-types/transaction.js.map +1 -1
- package/es/tx/builder/field-types/with-formatting.d.ts +1 -1
- package/es/tx/builder/field-types/with-formatting.js +1 -1
- package/es/tx/builder/field-types/with-formatting.js.map +1 -1
- package/es/tx/builder/index.d.ts +13 -0
- package/es/tx/builder/index.js +92 -5
- package/es/tx/builder/index.js.map +1 -1
- package/es/tx/builder/protocol-parameters.d.ts +134 -0
- package/es/tx/builder/protocol-parameters.js +539 -0
- package/es/tx/builder/protocol-parameters.js.map +1 -0
- package/es/tx/builder/schema.d.ts +156 -155
- package/es/tx/builder/schema.js +5 -1
- package/es/tx/builder/schema.js.map +1 -1
- package/es/tx/execution-cost.js +5 -5
- package/es/tx/execution-cost.js.map +1 -1
- package/es/tx/transaction-signer.js +2 -2
- package/es/tx/transaction-signer.js.map +1 -1
- package/es/tx/validator.js +4 -4
- package/es/tx/validator.js.map +1 -1
- package/es/utils/wrap-proxy.d.ts +10 -0
- package/es/utils/wrap-proxy.js +18 -0
- package/es/utils/wrap-proxy.js.map +1 -1
- package/package.json +15 -3
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
/*! For license information please see aepp-sdk.browser-script.cjs.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={7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=o(e),s=i[0],c=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,m=c>0?s-4:s;for(n=0;n<m;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,a=r%3,i=[],s=16383,o=0,u=r-a;o<u;o+=s)i.push(c(e,o,o+s>u?u:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function o(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 a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(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 y(e.e/m)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,S,C,A,P,T,z,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,G=1,$=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,d,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;d>=10;d/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(d=y.search(/e/i))>0?(l<0&&(l=d),l+=+y.slice(d+1),y=y.substring(0,d)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=d=0,f=y.length;d<f;d++)if(n.indexOf(s=y.charAt(d))<0){if("."==s){if(d>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,d=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(d=0;48===y.charCodeAt(d);d++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(d,++f)){if(f-=d,h&&j.DEBUG&&f>15&&(e>p||e!==o(e)))throw Error(u+g.s*e);if((l=l-d-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],d=(l+1)%m,l<0&&(d+=m),d<f){for(d&&g.c.push(+y.slice(0,d)),f-=m;d<f;)g.c.push(+y.slice(d,d+=m));d=m-(y=y.slice(d)).length}else d-=f;for(;d--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,p,h,f,y=e.c,g=d;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,p=y[h=0],f=o(p/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));p=f=0,a=1,c=(i%=m)-m+1}else{for(p=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(p/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?p:p%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?p/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(p/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(c+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),G=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),$=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:G,POW_PRECISION:$,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(_=9007199254740992,S=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],p=new j(E);if(null==e?e=M:w(e,0,f),a=s(e/m),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!U)for(;u<a;)(i=S())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=d[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return p.e=r,p.c=l,p}),j.sum=function(){for(var e=1,t=arguments,n=new j(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 a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=$,$=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),$=m,f.c=t(x(g(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,N,w,i)).c,p=d.r,l=d.e),y=h[u=l+N+1],m=i/2,p=p||u<0||null!=h[u+1],p=w<4?(null!=y||p)&&(0==w||w==(d.s<0?3:2)):y>m||y==m&&(4==w||p||6==w&&1&h[u-1]||w==(d.s<0?8:7)),u<1||!h[0])r=p?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,p,d,h,f,g,N,w,v,b,x,_,S,C,A,P,T,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(p=r.e-a.e)+1,c||(c=l,p=y(r.e/m)-y(a.e/m),z=z/m|0),d=0;E[d]==(I[d]||0);d++);if(E[d]>(I[d]||0)&&p--,z<0)v.push(1),h=!0;else{for(C=I.length,P=E.length,d=0,z+=2,(f=o(c/(E[0]+1)))>1&&(E=e(E,f,c),I=e(I,f,c),P=E.length,C=I.length),S=P,x=(b=I.slice(0,P)).length;x<P;b[x++]=0);T=E.slice(),T=[0].concat(T),A=E[0],E[1]>=c/2&&A++;do{if(f=0,(u=t(E,b,P,x))<0){if(_=b[0],P!=x&&(_=_*c+(b[1]||0)),(f=o(_/A))>1)for(f>=c&&(f=c-1),N=(g=e(E,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,P<N?T:E,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=E.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(E,b,P,x)<1;)f++,n(b,P<x?T:E,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[d++]=f,b[0]?b[x++]=I[S]||0:(b=[I[S]],x=1)}while((S++<C||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(d=1,z=v[0];z>=10;z/=10,d++);W(w,i+(w.e=d+p*m-1)+1,s,h)}else w.e=p,w.r=+h;return w}}(),C=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,P=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(T.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(C,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(A,"$1").replace(P,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return N(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,u,l,p,d,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?d.mod(t):d;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);$&&(i=s($/m+2))}for(u?(n=new j(.5),l&&(e.s=1),p=v(e)):p=(a=Math.abs(+K(e)))%2,d=new j(E);;){if(p){if(!(d=d.times(h)).c)break;i?d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}if(a){if(0===(a=o(a/2)))break;p=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)p=v(e);else{if(0==(a=+K(e)))break;p=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?d:(l&&(d=E.div(d)),t?d.mod(t):i?W(d,$,q,void 0):d)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===N(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return N(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return N(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=N(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,p=s.c,d=e.c;if(!c||!u){if(!p||!d)return p?(e.s=-t,e):new j(d?s:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new j(p[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),p=p.slice(),o=c-u){for((i=o<0)?(o=-o,a=p):(u=c,a=d),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=p.length)<(t=d.length))?o:t,o=t=0;t<r;t++)if(p[t]!=d[t]){i=p[t]<d[t];break}if(i&&(a=p,p=d,d=a,e.s=-e.s),(t=(r=d.length)-(n=p.length))>0)for(;t--;p[n++]=0);for(t=l-1;r>o;){if(p[--r]<d[r]){for(n=r;n&&!p[--n];p[n]=t);--p[n],p[r]+=l}p[r]-=d[r]}for(;0==p[0];p.splice(0,1),--u);return p[0]?J(e,p,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==G?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,G),(e=i.minus(r.times(e))).c[0]||1!=G||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,p,d,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(d=_.length)&&(N=x,x=_,_=N,a=c,c=d,d=a),a=c+d,N=[];a--;N.push(0));for(w=l,v=h,a=d;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(p=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*p,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return w(e,-9007199254740991,p),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],p=s[1],d=a.s<0,h=d?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),d&&(m="-"+m)}r=p?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?p.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):p):m}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,u,l,p,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(E)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(E),p=r=new j(E),a=l=new j(E),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=d[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:p:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=l.plus(h.times(i=p)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(p)),r=r.plus(i.times(a)),l.s=p.s=N.s,f=n(p,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[p,a]:[l,r],B=o,f},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&w(e,1,f),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],p=m[o],d=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,p,d),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<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),m=new Uint32Array(32);function p(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++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(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 d=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 h(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 a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};d.fill(0),d[0]=e,t&&(d[1]=t.length),d[2]=1,d[3]=1,n&&d.set(n,32),r&&d.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(d,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,p(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;p(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 g(e,t,n,a,i){n=n||64,e=r.normalizeInput(e),a&&(a=r.normalizeInput(a)),i&&(i=r.normalizeInput(i));const s=h(n,t,a,i);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,a,i){const s=g(e,t,n,a,i);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},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 a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},8287:function(e,t,n){"use strict";const r=n(7526),a=n(251),i="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 s=2147483647;function o(e){if(e>s)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 m(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|f(e,t);let r=o(n);const a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(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 a=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?o(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(a)return a;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 m(e){return l(e),o(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(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 h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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 a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(a)return r?-1:H(e).length;t=(""+t).toLowerCase(),a=!0}}function y(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 I(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return E(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,a){let i,s=1,o=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;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let r=-1;for(i=n;i<o;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>o&&(n=o-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(Y(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(H(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(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 _(e,t,n,r){return W(J(t),e,n,r)}function S(e,t,n,r){return W(function(e,t){let n,r,a;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a<n;){const t=e[a];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[a+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[a+1],r=e[a+2],o=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),a+=s}return function(e){const t=e.length;if(t<=P)return String.fromCharCode.apply(String,e);let n="",r=0;for(;r<t;)n+=String.fromCharCode.apply(String,e.slice(r,r+=P));return n}(r)}t.kMaxLength=s,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?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return m(e)},c.allocUnsafeSlow=function(e){return m(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(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 a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];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 a=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))a+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},c.byteLength=f,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)g(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)g(this,t,t+3),g(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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):y.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+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,a){if(K(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===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(i,s),u=this.slice(r,a),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){i=u[e],s=l[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return N(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return N(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 a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!0}},c.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const P=4096;function T(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function z(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function I(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let a="";for(let r=t;r<n;++r)a+=Q[e[r]];return a}function E(e,t,n){const r=e.slice(t,n);let a="";for(let e=0;e<r.length-1;e+=2)a+=String.fromCharCode(r[e]+256*r[e+1]);return a}function M(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 q(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)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,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function U(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),a.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||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(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||M(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||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<<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||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(a)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return a*=128,r>=a&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,a=1,i=this[e+--r];for(;r>0&&(a*=256);)i+=this[e+--r]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(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||M(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||M(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||M(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||j(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||j(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||M(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(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||q(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||q(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||q(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||q(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 O(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);q(this,e,t,n,r-1,-r)}let a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i|0)-s&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);q(this,e,t,n,r-1,-r)}let a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(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||q(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||q(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||q(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||q(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 O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return U(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 a=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),a},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 a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};const G={};function $(e,t,n){G[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 V(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 D(e,t,n,r,a,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let a;throw a=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new G.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,a,i)}function L(e,t){if("number"!=typeof e)throw new G.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new G.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new G.ERR_BUFFER_OUT_OF_BOUNDS;throw new G.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}$("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),$("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),$("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=V(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=V(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const F=/[^+/0-9A-Za-z-_]/g;function H(e,t){let n;t=t||1/0;const r=e.length;let a=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let a;for(a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},3144:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(76),s=n(7119);e.exports=s||r.call(i,a)},2205:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(3144);e.exports=function(){return i(r,a,arguments)}},1002:function(e){"use strict";e.exports=Function.prototype.apply},76:function(e){"use strict";e.exports=Function.prototype.call},3126:function(e,t,n){"use strict";var r=n(6743),a=n(9675),i=n(76),s=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new a("a function is required");return s(r,i,e)}},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487:function(e,t,n){"use strict";var r=n(6897),a=n(655),i=n(3126),s=n(2205);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},a?a(e.exports,"apply",{value:s}):e.exports.apply=s},6556:function(e,t,n){"use strict";var r=n(453),a=n(3126),i=a([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?a([n]):n}},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])}`),"")}}`}},41:function(e,t,n){"use strict";var r=n(655),a=n(8068),i=n(9675),s=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],m=!!s&&s(e,t);if(r)r(e,t,{configurable:null===u&&m?m.configurable:!u,enumerable:null===o&&m?m.enumerable:!o,value:n,writable:null===c&&m?m.writable:!c});else{if(!l&&(o||c||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},7176:function(e,t,n){"use strict";var r,a=n(3126),i=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!r&&i&&i(Object.prototype,"__proto__"),o=Object,c=o.getPrototypeOf;e.exports=s&&"function"==typeof s.get?a([s.get]):"function"==typeof c&&function(e){return c(null==e?e:o(e))}},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1237:function(e){"use strict";e.exports=EvalError},9383:function(e){"use strict";e.exports=Error},9290:function(e){"use strict";e.exports=RangeError},9538:function(e){"use strict";e.exports=ReferenceError},8068:function(e){"use strict";e.exports=SyntaxError},9675:function(e){"use strict";e.exports=TypeError},5345:function(e){"use strict";e.exports=URIError},9612:function(e){"use strict";e.exports=Object},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__}}()},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var p,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(p=1,c=new Array(m-1);p<m;p++)c[p-1]=arguments[p];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},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 a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(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?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,s,u;if(o(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(a=c(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=l.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):h(a,a.length)}function d(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 h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(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 a(i){r.once&&e.removeEventListener(t,a),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,m(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,m(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,i,s;if(o(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(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 a,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);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},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2682:function(e,t,n){"use strict";var r=n(9600),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var s,o;arguments.length>=3&&(s=n),o=e,"[object Array]"===a.call(o)?function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var r=0,a=e.length;r<a;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,s):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s)}},9353:function(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n};e.exports=function(e){var a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw new TypeError("Function.prototype.bind called on incompatible "+a);for(var i,s=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),o=n(0,a.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=a.apply(this,r(s,arguments));return Object(t)===t?t:this}return a.apply(e,r(s,arguments))})),a.prototype){var l=function(){};l.prototype=a.prototype,i.prototype=new l,l.prototype=null}return i}},6743:function(e,t,n){"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},453:function(e,t,n){"use strict";var r,a=n(9612),i=n(9383),s=n(1237),o=n(9290),c=n(9538),u=n(8068),l=n(9675),m=n(5345),p=n(1514),d=n(8968),h=n(6188),f=n(8002),y=n(5880),g=n(414),N=n(3093),w=Function,v=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=n(5795),x=n(655),_=function(){throw new l},S=b?function(){try{return _}catch(e){try{return b(arguments,"callee").get}catch(e){return _}}}():_,C=n(4039)(),A=n(3628),P=n(1064),T=n(8648),z=n(1002),I=n(76),E={},M="undefined"!=typeof Uint8Array&&A?A(Uint8Array):r,q={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":E,"%AsyncGenerator%":E,"%AsyncGeneratorFunction%":E,"%AsyncIteratorPrototype%":E,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":E,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&A?A((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&A?A((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):r,"%Symbol%":C?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":S,"%TypedArray%":M,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":m,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":I,"%Function.prototype.apply%":z,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":P,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":g,"%Math.sign%":N,"%Reflect.getPrototypeOf%":T};if(A)try{null.error}catch(e){var R=A(A(e));q["%Error.prototype%"]=R}var O=function e(t){var n;if("%AsyncFunction%"===t)n=v("async function () {}");else if("%GeneratorFunction%"===t)n=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=v("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&A&&(n=A(a.prototype))}return q[t]=n,n},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=n(6743),U=n(9957),G=B.call(I,Array.prototype.concat),$=B.call(z,Array.prototype.splice),V=B.call(I,String.prototype.replace),D=B.call(I,String.prototype.slice),L=B.call(I,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,F=/\\(\\)?/g,H=function(e,t){var n,r=e;if(U(k,r)&&(r="%"+(n=k[r])[0]+"%"),U(q,r)){var a=q[r];if(a===E&&(a=O(r)),void 0===a&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=D(e,0,1),n=D(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return V(e,j,(function(e,t,n,a){r[r.length]=n?V(a,F,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=H("%"+r+"%",t),i=a.name,s=a.value,o=!1,c=a.alias;c&&(r=c[0],$(n,G([0,1],c)));for(var m=1,p=!0;m<n.length;m+=1){var d=n[m],h=D(d,0,1),f=D(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===f||"'"===f||"`"===f)&&h!==f)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(o=!0),U(q,i="%"+(r+="."+d)+"%"))s=q[i];else if(null!=s){if(!(d in s)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&m+1>=n.length){var y=b(s,d);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else p=U(s,d),s=s[d];p&&!o&&(q[i]=s)}}return s}},1064:function(e,t,n){"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:function(e,t,n){"use strict";var r=n(8648),a=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:a?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return a(e)}:i?function(e){return i(e)}:null},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},5795:function(e,t,n){"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},592:function(e,t,n){"use strict";var r=n(655),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},4039:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&a()}},1333:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9092:function(e,t,n){"use strict";var r=n(1333);e.exports=function(){return r()&&!!Symbol.toStringTag}},9957:function(e,t,n){"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,a)},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,p=n?-1:1,d=e[t+m];for(m+=p,i=d&(1<<-l)-1,d>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=u}return(d?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?p/c:p*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+d]=255&o,d+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+d]=255&s,d+=h,s/=256,u-=8);e[n+d-h]|=128*f}},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}}},9600:function(e){"use strict";var t,n,r=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,t)}catch(e){e!==n&&(a=null)}else a=null;var i=/^\s*class\b/,s=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},o=function(e){try{return!s(e)&&(r.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(m=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=a?function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,t)}catch(e){if(e!==n)return!1}return!s(e)&&o(e)}:function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return o(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&o(e)}},5680:function(e,t,n){"use strict";var r=n(5767);e.exports=function(e){return!!r(e)}},4634:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const a=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?: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 s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},m=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},p=function(e){return e&&e!==o&&m("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},d=function(){var e,a="";for("-"===o&&(a="-",p("-"));o>="0"&&o<="9";)a+=o,p();if("."===o)for(a+=".";p()&&o>="0"&&o<="9";)a+=o;if("e"===o||"E"===o)for(a+=o,p(),"-"!==o&&"+"!==o||(a+=o,p());o>="0"&&o<="9";)a+=o,p();if(e=+a,isFinite(e))return null==r&&(r=n(1594)),a.length>15?t.storeAsString?a:t.useNativeBigInt?BigInt(a):new r(a):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;m("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var a=s;p();){if('"'===o)return s-1>a&&(r+=c.substring(a,s-1)),p(),r;if("\\"===o){if(s-1>a&&(r+=c.substring(a,s-1)),p(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(p(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}a=s}}m("Bad string")},f=function(){for(;o&&o<=" ";)p()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(p("{"),f(),"}"===o)return p("}"),n;for(;o;){if(e=h(),f(),p(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&m('Duplicate key "'+e+'"'),!0===a.test(e)?"error"===t.protoAction?m("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?m("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return p("}"),n;p(","),f()}}m("Bad object")}();case"[":return function(){var e=[];if("["===o){if(p("["),f(),"]"===o)return p("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return p("]"),e;p(","),f()}}m("Bad array")}();case'"':return h();case"-":return d();default:return o>="0"&&o<="9"?d():function(){switch(o){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}m("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&m("Syntax error"),"function"==typeof t?function e(n,r){var a,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),a=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(a,i){var s,u,l,m,p,d=e,h=i[a],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(a)),"function"==typeof n&&(h=n.call(i,a,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,p=[],"[object Array]"===Object.prototype.toString.apply(h)){for(m=h.length,s=0;s<m;s+=1)p[s]=c(s,h)||"null";return l=0===p.length?"[]":e?"[\n"+e+p.join(",\n"+e)+"\n"+d+"]":"["+p.join(",")+"]",e=d,l}if(n&&"object"==typeof n)for(m=n.length,s=0;s<m;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&p.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&p.push(o(t)+(e?": ":":")+n)}));return l=0===p.length?"{}":e?"{\n"+e+p.join(",\n"+e)+"\n"+d+"}":"{"+p.join(",")+"}",e=d,l}}"function"!=typeof a.stringify&&(a.stringify=function(r,a,i){var s;if(e="",t="","number"==typeof i)for(s=0;s<i;s+=1)t+=" ";else"string"==typeof i&&(t=i);if(n=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},1514:function(e){"use strict";e.exports=Math.abs},8968:function(e){"use strict";e.exports=Math.floor},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188:function(e){"use strict";e.exports=Math.max},8002:function(e){"use strict";e.exports=Math.min},5880:function(e){"use strict";e.exports=Math.pow},414:function(e){"use strict";e.exports=Math.round},3093:function(e,t,n){"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},6578:function(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:function(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!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:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var o,c=[],u=!1,l=-1;function m(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=s(m);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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 d(e,t){this.fun=e,this.array=t}function h(){}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 d(e,t)),1!==c.length||u||s(p)},d.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=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,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=p(...t);return p(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:p(i(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 a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,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,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,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=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;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 m(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 p(...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 a=e[t];n.set(a,r),r+=a.length}return n}function d(e){return(new TextEncoder).encode(e)}function h(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 f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):d(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:p,hexToBytes:m,utf8ToBytes:d};const g={encode:n,decode:s};t.default=g},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6897:function(e,t,n){"use strict";var r=n(453),a=n(41),i=n(592)(),s=n(5795),o=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in e&&s){var l=s(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(u=!1)}return(r||u||!n)&&(i?a(e,"length",t,!0,!0):a(e,"length",t)),e}},392:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(5377);function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=a(e,t||"utf8");for(var n=this._block,r=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%r,u=Math.min(i-o,r-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%r==0&&this._update(n)}return this._len+=i,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,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){"use strict";var r=n(6698),a=n(392),i=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,a.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 m(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,a),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,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+d(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+p(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=i.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},5377:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(4634),i=n(4372),s=ArrayBuffer.isView||function(e){try{return i(e),!0}catch(e){return!1}},o="undefined"!=typeof Uint8Array,c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,u=c&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(r.isBuffer(e))return e.constructor&&!("isBuffer"in e)?r.from(e):e;if("string"==typeof e)return r.from(e,t);if(c&&s(e)){if(0===e.byteLength)return r.alloc(0);if(u){var n=r.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),l=r.from(i);if(l.length===e.byteLength)return l}if(o&&e instanceof Uint8Array)return r.from(e);var m=a(e);if(m)for(var p=0;p<e.length;p+=1){var d=e[p];if("number"!=typeof d||d<0||d>255||~~d!==d)throw new RangeError("Array items must be numbers in the range 0-255.")}if(m||r.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return r.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},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;function n(n,r){var a,i,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),a=0;a<t;a++)s[a]=54;for(a=0;a<r.length;a++)s[a]^=r[a];for(s.set(n,t),i=e.hash(s.subarray(0,t+n.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<r.length;a++)s[a]^=r[a];return s.set(i,t),e.hash(s.subarray(0,t+i.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},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")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),o=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]),m=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(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 f(e,t,n,r,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function N(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=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,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=i,x=s,_=o,S=c,C=u,A=l,P=m,T=p,z=d,I=h,E=f,M=y,q=g,R=N,O=w,k=v,B=0;B<20;B+=2)b^=(a=(q^=(a=(z^=(a=(C^=(a=b+q|0)<<7|a>>>25)+b|0)<<9|a>>>23)+C|0)<<13|a>>>19)+z|0)<<18|a>>>14,A^=(a=(x^=(a=(R^=(a=(I^=(a=A+x|0)<<7|a>>>25)+A|0)<<9|a>>>23)+I|0)<<13|a>>>19)+R|0)<<18|a>>>14,E^=(a=(P^=(a=(_^=(a=(O^=(a=E+P|0)<<7|a>>>25)+E|0)<<9|a>>>23)+O|0)<<13|a>>>19)+_|0)<<18|a>>>14,k^=(a=(M^=(a=(T^=(a=(S^=(a=k+M|0)<<7|a>>>25)+k|0)<<9|a>>>23)+S|0)<<13|a>>>19)+T|0)<<18|a>>>14,b^=(a=(S^=(a=(_^=(a=(x^=(a=b+S|0)<<7|a>>>25)+b|0)<<9|a>>>23)+x|0)<<13|a>>>19)+_|0)<<18|a>>>14,A^=(a=(C^=(a=(T^=(a=(P^=(a=A+C|0)<<7|a>>>25)+A|0)<<9|a>>>23)+P|0)<<13|a>>>19)+T|0)<<18|a>>>14,E^=(a=(I^=(a=(z^=(a=(M^=(a=E+I|0)<<7|a>>>25)+E|0)<<9|a>>>23)+M|0)<<13|a>>>19)+z|0)<<18|a>>>14,k^=(a=(O^=(a=(R^=(a=(q^=(a=k+O|0)<<7|a>>>25)+k|0)<<9|a>>>23)+q|0)<<13|a>>>19)+R|0)<<18|a>>>14;b=b+i|0,x=x+s|0,_=_+o|0,S=S+c|0,C=C+u|0,A=A+l|0,P=P+m|0,T=T+p|0,z=z+d|0,I=I+h|0,E=E+f|0,M=M+y|0,q=q+g|0,R=R+N|0,O=O+w|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=S>>>0&255,e[13]=S>>>8&255,e[14]=S>>>16&255,e[15]=S>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>24&255,e[24]=P>>>0&255,e[25]=P>>>8&255,e[26]=P>>>16&255,e[27]=P>>>24&255,e[28]=T>>>0&255,e[29]=T>>>8&255,e[30]=T>>>16&255,e[31]=T>>>24&255,e[32]=z>>>0&255,e[33]=z>>>8&255,e[34]=z>>>16&255,e[35]=z>>>24&255,e[36]=I>>>0&255,e[37]=I>>>8&255,e[38]=I>>>16&255,e[39]=I>>>24&255,e[40]=E>>>0&255,e[41]=E>>>8&255,e[42]=E>>>16&255,e[43]=E>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function w(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=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,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)i^=(a=(g^=(a=(d^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+d|0)<<18|a>>>14,l^=(a=(s^=(a=(N^=(a=(h^=(a=l+s|0)<<7|a>>>25)+l|0)<<9|a>>>23)+h|0)<<13|a>>>19)+N|0)<<18|a>>>14,f^=(a=(m^=(a=(o^=(a=(w^=(a=f+m|0)<<7|a>>>25)+f|0)<<9|a>>>23)+w|0)<<13|a>>>19)+o|0)<<18|a>>>14,v^=(a=(y^=(a=(p^=(a=(c^=(a=v+y|0)<<7|a>>>25)+v|0)<<9|a>>>23)+c|0)<<13|a>>>19)+p|0)<<18|a>>>14,i^=(a=(c^=(a=(o^=(a=(s^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+s|0)<<13|a>>>19)+o|0)<<18|a>>>14,l^=(a=(u^=(a=(p^=(a=(m^=(a=l+u|0)<<7|a>>>25)+l|0)<<9|a>>>23)+m|0)<<13|a>>>19)+p|0)<<18|a>>>14,f^=(a=(h^=(a=(d^=(a=(y^=(a=f+h|0)<<7|a>>>25)+f|0)<<9|a>>>23)+y|0)<<13|a>>>19)+d|0)<<18|a>>>14,v^=(a=(w^=(a=(N^=(a=(g^=(a=v+w|0)<<7|a>>>25)+v|0)<<9|a>>>23)+g|0)<<13|a>>>19)+N|0)<<18|a>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,a,i,s){var o,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]=i[c];for(;a>=64;){for(N(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;a-=64,t+=64,r+=64}if(a>0)for(N(l,u,s,v),c=0;c<a;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,a){var i,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(N(c,o,a,v),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&o[s])|0,o[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(N(c,o,a,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,a){var i=new Uint8Array(32);w(i,r,a,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,i)}function S(e,t,n,r,a,i,s){var o=new Uint8Array(32);w(o,i,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return b(e,t,n,r,a,c,o)}var C=function(e){var t,n,r,a,i,s,o,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),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>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 A(e,t,n,r,a,i){var s=new C(i);return s.update(n,r,a),s.finish(e,t),0}function P(e,t,n,r,a,i){var s=new Uint8Array(16);return A(s,0,n,r,a,i),y(e,t,s,0)}function T(e,t,n,r,a){var i;if(n<32)return-1;for(S(e,0,t,0,n,r,a),A(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function z(e,t,n,r,a){var i,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,a),0!==P(t,16,t,32,n-32,s))return-1;for(S(e,0,t,0,n,r,a),i=0;i<32;i++)e[i]=0;return 0}function I(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function E(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 M(e,t,n){for(var r,a=~(n-1),i=0;i<16;i++)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function q(e,n){var r,a,i,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(E(o),E(o),E(o),a=0;a<2;a++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function U(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function G(e,t,n){var r,a,i=0,s=0,o=0,c=0,u=0,l=0,m=0,p=0,d=0,h=0,f=0,y=0,g=0,N=0,w=0,v=0,b=0,x=0,_=0,S=0,C=0,A=0,P=0,T=0,z=0,I=0,E=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],U=n[2],G=n[3],$=n[4],V=n[5],D=n[6],L=n[7],j=n[8],F=n[9],H=n[10],J=n[11],W=n[12],K=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*k,s+=r*B,o+=r*U,c+=r*G,u+=r*$,l+=r*V,m+=r*D,p+=r*L,d+=r*j,h+=r*F,f+=r*H,y+=r*J,g+=r*W,N+=r*K,w+=r*Y,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*U,u+=r*G,l+=r*$,m+=r*V,p+=r*D,d+=r*L,h+=r*j,f+=r*F,y+=r*H,g+=r*J,N+=r*W,w+=r*K,v+=r*Y,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*U,l+=r*G,m+=r*$,p+=r*V,d+=r*D,h+=r*L,f+=r*j,y+=r*F,g+=r*H,N+=r*J,w+=r*W,v+=r*K,b+=r*Y,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*U,m+=r*G,p+=r*$,d+=r*V,h+=r*D,f+=r*L,y+=r*j,g+=r*F,N+=r*H,w+=r*J,v+=r*W,b+=r*K,x+=r*Y,_+=r*Q,u+=(r=t[4])*k,l+=r*B,m+=r*U,p+=r*G,d+=r*$,h+=r*V,f+=r*D,y+=r*L,g+=r*j,N+=r*F,w+=r*H,v+=r*J,b+=r*W,x+=r*K,_+=r*Y,S+=r*Q,l+=(r=t[5])*k,m+=r*B,p+=r*U,d+=r*G,h+=r*$,f+=r*V,y+=r*D,g+=r*L,N+=r*j,w+=r*F,v+=r*H,b+=r*J,x+=r*W,_+=r*K,S+=r*Y,C+=r*Q,m+=(r=t[6])*k,p+=r*B,d+=r*U,h+=r*G,f+=r*$,y+=r*V,g+=r*D,N+=r*L,w+=r*j,v+=r*F,b+=r*H,x+=r*J,_+=r*W,S+=r*K,C+=r*Y,A+=r*Q,p+=(r=t[7])*k,d+=r*B,h+=r*U,f+=r*G,y+=r*$,g+=r*V,N+=r*D,w+=r*L,v+=r*j,b+=r*F,x+=r*H,_+=r*J,S+=r*W,C+=r*K,A+=r*Y,P+=r*Q,d+=(r=t[8])*k,h+=r*B,f+=r*U,y+=r*G,g+=r*$,N+=r*V,w+=r*D,v+=r*L,b+=r*j,x+=r*F,_+=r*H,S+=r*J,C+=r*W,A+=r*K,P+=r*Y,T+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*U,g+=r*G,N+=r*$,w+=r*V,v+=r*D,b+=r*L,x+=r*j,_+=r*F,S+=r*H,C+=r*J,A+=r*W,P+=r*K,T+=r*Y,z+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*U,N+=r*G,w+=r*$,v+=r*V,b+=r*D,x+=r*L,_+=r*j,S+=r*F,C+=r*H,A+=r*J,P+=r*W,T+=r*K,z+=r*Y,I+=r*Q,y+=(r=t[11])*k,g+=r*B,N+=r*U,w+=r*G,v+=r*$,b+=r*V,x+=r*D,_+=r*L,S+=r*j,C+=r*F,A+=r*H,P+=r*J,T+=r*W,z+=r*K,I+=r*Y,E+=r*Q,g+=(r=t[12])*k,N+=r*B,w+=r*U,v+=r*G,b+=r*$,x+=r*V,_+=r*D,S+=r*L,C+=r*j,A+=r*F,P+=r*H,T+=r*J,z+=r*W,I+=r*K,E+=r*Y,M+=r*Q,N+=(r=t[13])*k,w+=r*B,v+=r*U,b+=r*G,x+=r*$,_+=r*V,S+=r*D,C+=r*L,A+=r*j,P+=r*F,T+=r*H,z+=r*J,I+=r*W,E+=r*K,M+=r*Y,q+=r*Q,w+=(r=t[14])*k,v+=r*B,b+=r*U,x+=r*G,_+=r*$,S+=r*V,C+=r*D,A+=r*L,P+=r*j,T+=r*F,z+=r*H,I+=r*J,E+=r*W,M+=r*K,q+=r*Y,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*U),o+=38*(_+=r*G),c+=38*(S+=r*$),u+=38*(C+=r*V),l+=38*(A+=r*D),m+=38*(P+=r*L),p+=38*(T+=r*j),d+=38*(z+=r*F),h+=38*(I+=r*H),f+=38*(E+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*K),N+=38*(R+=r*Y),w+=38*(O+=r*Q),i=(r=(i+=38*(b+=r*B))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i=(r=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=m,e[7]=p,e[8]=d,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=N,e[14]=w,e[15]=v}function $(e,t){G(e,t,t)}function V(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=253;r>=0;r--)$(a,a),2!==r&&4!==r&&G(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function D(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=250;r>=0;r--)$(a,a),1!==r&&G(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function L(e,n,r){var a,i,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),m=t(),p=t(),d=t(),h=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),i=0;i<16;i++)l[i]=o[i],p[i]=u[i]=m[i]=0;for(u[0]=p[0]=1,i=254;i>=0;--i)M(u,l,a=s[i>>>3]>>>(7&i)&1),M(m,p,a),B(d,u,m),U(u,u,m),B(m,l,p),U(l,l,p),$(p,d),$(h,u),G(u,m,u),G(m,l,d),B(d,u,m),U(u,u,m),$(l,u),U(m,p,h),G(u,m,c),B(u,u,p),G(m,m,u),G(u,p,h),G(p,l,o),$(l,d),M(u,l,a),M(m,p,a);for(i=0;i<16;i++)o[i+16]=u[i],o[i+32]=m[i],o[i+48]=l[i],o[i+64]=p[i];var f=o.subarray(32),y=o.subarray(16);return V(f,f),G(y,y,f),q(e,y),0}function j(e,t){return L(e,t,i)}function F(e,t){return r(t,32),j(e,t)}function H(e,t,n){var r=new Uint8Array(32);return L(r,n,t),w(e,a,r,v)}C.prototype.blocks=function(e,t,n){for(var r,a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x=this.fin?0:2048,_=this.h[0],S=this.h[1],C=this.h[2],A=this.h[3],P=this.h[4],T=this.h[5],z=this.h[6],I=this.h[7],E=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],U=this.r[5],G=this.r[6],$=this.r[7],V=this.r[8],D=this.r[9];n>=16;)p=m=0,p+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,p+=(S+=8191&(r>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),p+=(C+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(A+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*$),m=(p+=(P+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*G))>>>13,p&=8191,p+=(T+=o>>>1&8191)*(5*U),p+=(z+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),p+=(I+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),p+=(E+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),d=m+=(p+=(M+=l>>>5|x)*(5*R))>>>13,d+=_*R,d+=S*q,d+=C*(5*D),d+=A*(5*V),m=(d+=P*(5*$))>>>13,d&=8191,d+=T*(5*G),d+=z*(5*U),d+=I*(5*B),d+=E*(5*k),m+=(d+=M*(5*O))>>>13,d&=8191,h=m,h+=_*O,h+=S*R,h+=C*q,h+=A*(5*D),m=(h+=P*(5*V))>>>13,h&=8191,h+=T*(5*$),h+=z*(5*G),h+=I*(5*U),h+=E*(5*B),f=m+=(h+=M*(5*k))>>>13,f+=_*k,f+=S*O,f+=C*R,f+=A*q,m=(f+=P*(5*D))>>>13,f&=8191,f+=T*(5*V),f+=z*(5*$),f+=I*(5*G),f+=E*(5*U),y=m+=(f+=M*(5*B))>>>13,y+=_*B,y+=S*k,y+=C*O,y+=A*R,m=(y+=P*q)>>>13,y&=8191,y+=T*(5*D),y+=z*(5*V),y+=I*(5*$),y+=E*(5*G),g=m+=(y+=M*(5*U))>>>13,g+=_*U,g+=S*B,g+=C*k,g+=A*O,m=(g+=P*R)>>>13,g&=8191,g+=T*q,g+=z*(5*D),g+=I*(5*V),g+=E*(5*$),N=m+=(g+=M*(5*G))>>>13,N+=_*G,N+=S*U,N+=C*B,N+=A*k,m=(N+=P*O)>>>13,N&=8191,N+=T*R,N+=z*q,N+=I*(5*D),N+=E*(5*V),w=m+=(N+=M*(5*$))>>>13,w+=_*$,w+=S*G,w+=C*U,w+=A*B,m=(w+=P*k)>>>13,w&=8191,w+=T*O,w+=z*R,w+=I*q,w+=E*(5*D),v=m+=(w+=M*(5*V))>>>13,v+=_*V,v+=S*$,v+=C*G,v+=A*U,m=(v+=P*B)>>>13,v&=8191,v+=T*k,v+=z*O,v+=I*R,v+=E*q,b=m+=(v+=M*(5*D))>>>13,b+=_*D,b+=S*V,b+=C*$,b+=A*G,m=(b+=P*U)>>>13,b&=8191,b+=T*B,b+=z*k,b+=I*O,b+=E*R,_=p=8191&(m=(m=((m+=(b+=M*q)>>>13)<<2)+m|0)+(p&=8191)|0),S=d+=m>>>=13,C=h&=8191,A=f&=8191,P=y&=8191,T=g&=8191,z=N&=8191,I=w&=8191,E=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=S,this.h[2]=C,this.h[3]=A,this.h[4]=P,this.h[5]=T,this.h[6]=z,this.h[7]=I,this.h[8]=E,this.h[9]=M},C.prototype.finish=function(e,t){var n,r,a,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=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,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[i];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),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;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},C.prototype.update=function(e,t,n){var r,a;if(this.leftover){for((a=16-this.leftover)>n&&(a=n),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(a=n-n%16,this.blocks(e,t,a),t+=a,n-=a),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=T,W=z,K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,n,r){for(var a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x,_,S,C,A,P,T,z,I=new Int32Array(16),E=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],U=e[6],G=e[7],$=t[0],V=t[1],D=t[2],L=t[3],j=t[4],F=t[5],H=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,I[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],E[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(a=M,i=q,s=R,o=O,c=k,u=B,l=U,p=$,d=V,h=D,f=L,y=j,g=F,N=H,A=65535&(C=J),P=C>>>16,T=65535&(S=G),z=S>>>16,A+=65535&(C=(j>>>14|k<<18)^(j>>>18|k<<14)^(k>>>9|j<<23)),P+=C>>>16,T+=65535&(S=(k>>>14|j<<18)^(k>>>18|j<<14)^(j>>>9|k<<23)),z+=S>>>16,A+=65535&(C=j&F^~j&H),P+=C>>>16,T+=65535&(S=k&B^~k&U),z+=S>>>16,A+=65535&(C=K[2*x+1]),P+=C>>>16,T+=65535&(S=K[2*x]),z+=S>>>16,S=I[x%16],P+=(C=E[x%16])>>>16,T+=65535&S,z+=S>>>16,T+=(P+=(A+=65535&C)>>>16)>>>16,A=65535&(C=b=65535&A|P<<16),P=C>>>16,T=65535&(S=v=65535&T|(z+=T>>>16)<<16),z=S>>>16,A+=65535&(C=($>>>28|M<<4)^(M>>>2|$<<30)^(M>>>7|$<<25)),P+=C>>>16,T+=65535&(S=(M>>>28|$<<4)^($>>>2|M<<30)^($>>>7|M<<25)),z+=S>>>16,P+=(C=$&V^$&D^V&D)>>>16,T+=65535&(S=M&q^M&R^q&R),z+=S>>>16,m=65535&(T+=(P+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,w=65535&A|P<<16,A=65535&(C=f),P=C>>>16,T=65535&(S=o),z=S>>>16,P+=(C=b)>>>16,T+=65535&(S=v),z+=S>>>16,q=a,R=i,O=s,k=o=65535&(T+=(P+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,B=c,U=u,G=l,M=m,V=p,D=d,L=h,j=f=65535&A|P<<16,F=y,H=g,J=N,$=w,x%16==15)for(_=0;_<16;_++)S=I[_],A=65535&(C=E[_]),P=C>>>16,T=65535&S,z=S>>>16,S=I[(_+9)%16],A+=65535&(C=E[(_+9)%16]),P+=C>>>16,T+=65535&S,z+=S>>>16,v=I[(_+1)%16],A+=65535&(C=((b=E[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),P+=C>>>16,T+=65535&(S=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),z+=S>>>16,v=I[(_+14)%16],P+=(C=((b=E[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,T+=65535&(S=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,I[_]=65535&T|z<<16,E[_]=65535&A|P<<16;A=65535&(C=$),P=C>>>16,T=65535&(S=M),z=S>>>16,S=e[0],P+=(C=t[0])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[0]=M=65535&T|z<<16,t[0]=$=65535&A|P<<16,A=65535&(C=V),P=C>>>16,T=65535&(S=q),z=S>>>16,S=e[1],P+=(C=t[1])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[1]=q=65535&T|z<<16,t[1]=V=65535&A|P<<16,A=65535&(C=D),P=C>>>16,T=65535&(S=R),z=S>>>16,S=e[2],P+=(C=t[2])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[2]=R=65535&T|z<<16,t[2]=D=65535&A|P<<16,A=65535&(C=L),P=C>>>16,T=65535&(S=O),z=S>>>16,S=e[3],P+=(C=t[3])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[3]=O=65535&T|z<<16,t[3]=L=65535&A|P<<16,A=65535&(C=j),P=C>>>16,T=65535&(S=k),z=S>>>16,S=e[4],P+=(C=t[4])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[4]=k=65535&T|z<<16,t[4]=j=65535&A|P<<16,A=65535&(C=F),P=C>>>16,T=65535&(S=B),z=S>>>16,S=e[5],P+=(C=t[5])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[5]=B=65535&T|z<<16,t[5]=F=65535&A|P<<16,A=65535&(C=H),P=C>>>16,T=65535&(S=U),z=S>>>16,S=e[6],P+=(C=t[6])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[6]=U=65535&T|z<<16,t[6]=H=65535&A|P<<16,A=65535&(C=J),P=C>>>16,T=65535&(S=G),z=S>>>16,S=e[7],P+=(C=t[7])>>>16,T+=65535&S,z+=S>>>16,z+=(T+=(P+=(A+=65535&C)>>>16)>>>16)>>>16,e[7]=G=65535&T|z<<16,t[7]=J=65535&A|P<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(a,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),Y(a,i,s,n),r=0;r<8;r++)h(e,8*r,a[r],i[r]);return 0}function X(e,n){var r=t(),a=t(),i=t(),s=t(),o=t(),c=t(),u=t(),m=t(),p=t();U(r,e[1],e[0]),U(p,n[1],n[0]),G(r,r,p),B(a,e[0],e[1]),B(p,n[0],n[1]),G(a,a,p),G(i,e[3],n[3]),G(i,i,l),G(s,e[2],n[2]),B(s,s,s),U(o,a,r),U(c,s,i),B(u,s,i),B(m,a,r),G(e[0],o,c),G(e[1],m,u),G(e[2],u,c),G(e[3],o,m)}function Z(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),a=t(),i=t();V(i,n[2]),G(r,n[0],i),G(a,n[1],i),q(e,a),e[31]^=O(r)<<7}function te(e,t,n){var r,a;for(I(e[0],s),I(e[1],o),I(e[2],o),I(e[3],s),a=255;a>=0;--a)Z(e,t,r=n[a/8|0]>>(7&a)&1),X(t,e),X(e,e),Z(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];I(r[0],m),I(r[1],p),I(r[2],o),G(r[3],m,p),te(e,r,n)}function re(e,n,a){var i,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(a||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),i=0;i<32;i++)n[i+32]=e[i];return 0}var ae=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 ie(e,t){var n,r,a,i;for(r=63;r>=32;--r){for(n=0,a=r-32,i=r-12;a<i;++a)t[a]+=n-16*t[r]*ae[a-(r-32)],n=Math.floor((t[a]+128)/256),t[a]-=256*n;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;a++)t[a]+=n-(t[31]>>4)*ae[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=n*ae[a];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(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;ie(e,n)}function oe(e,n,r,a){var i,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),m=[t(),t(),t(),t()];Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64;var p=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=o[32+i];for(Q(u,e.subarray(32),r+32),se(u),ne(m,u),ee(e,m),i=32;i<64;i++)e[i]=a[i];for(Q(c,e,r+64),se(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=c[i]*o[s];return ie(e.subarray(32),l),p}function ce(e,n,r,a){var i,c=new Uint8Array(32),l=new Uint8Array(64),m=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),a=t(),i=t(),c=t(),l=t(),m=t(),p=t();return I(e[2],o),k(e[1],n),$(i,e[1]),G(c,i,u),U(i,i,e[2]),B(c,e[2],c),$(l,c),$(m,l),G(p,m,l),G(r,p,i),G(r,r,c),D(r,r),G(r,r,i),G(r,r,c),G(r,r,c),G(e[0],r,c),$(a,e[0]),G(a,a,c),R(a,i)&&G(e[0],e[0],d),$(a,e[0]),G(a,a,c),R(a,i)?-1:(O(e[0])===n[31]>>7&&U(e[0],s,e[0]),G(e[3],e[0],e[1]),0)}(p,a))return-1;for(i=0;i<r;i++)e[i]=n[i];for(i=0;i<32;i++)e[i+32]=a[i];if(Q(l,e,r),se(l),te(m,p,l),ne(p,n.subarray(32)),X(m,p),ee(c,m),r-=64,g(n,0,c,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=n[i+64];return r}var ue=64,le=32,me=64;function pe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:S,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:A,crypto_onetimeauth_verify:P,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:T,crypto_secretbox_open:z,crypto_scalarmult:L,crypto_scalarmult_base:j,crypto_box_beforenm:H,crypto_box_afternm:J,crypto_box:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,a,i){var s=new Uint8Array(32);return H(s,a,i),W(e,t,n,r,s)},crypto_box_keypair:F,crypto_hash:Q,crypto_sign:oe,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:me,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ae,pack25519:q,unpack25519:k,M:G,A:B,S:$,Z:U,pow2523:D,add:X,set25519:I,modL:ie,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(32+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return T(a,r,r.length,t,n),a.subarray(16)},e.secretbox.open=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(16+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==z(a,r,r.length,t,n)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(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(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return j(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox(t,n,i)},e.box.before=function(e,t){de(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 H(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return F(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return j(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(de(e,t),t.length!==me)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(de(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 a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i];return a},e.sign.detached=function(t,n){for(var r=e.sign(t,n),a=new Uint8Array(ue),i=0;i<a.length;i++)a[i]=r[i];return a},e.sign.detached.verify=function(e,t,n){if(de(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,a=new Uint8Array(ue+e.length),i=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)a[r]=t[r];for(r=0;r<e.length;r++)a[r+ue]=e[r];return ce(i,a,a.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(me);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==me)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(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(me),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=me,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){de(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(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,a=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(a.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=a[r];he(a)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,a=t.randomBytes(n);for(r=0;r<n;r++)e[r]=a[r];he(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},4372:function(e,t,n){"use strict";var r=n(9675),a=n(6556)("TypedArray.prototype.buffer",!0),i=n(5680);e.exports=a||function(e){if(!i(e))throw new r("Not a Typed Array");return e.buffer}},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 a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},9840:function(e,t,n){e.exports=n(9003).version},5767:function(e,t,n){"use strict";var r=n(2682),a=n(9209),i=n(487),s=n(6556),o=n(5795),c=n(3628),u=s("Object.prototype.toString"),l=n(9092)(),m="undefined"==typeof globalThis?n.g:globalThis,p=a(),d=s("String.prototype.slice"),h=s("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},f={__proto__:null};r(p,l&&o&&c?function(e){var t=new m[e];if(Symbol.toStringTag in t&&c){var n=c(t),r=o(n,Symbol.toStringTag);if(!r&&n){var a=c(n);r=o(a,Symbol.toStringTag)}f["$"+e]=i(r.get)}}:function(e){var t=new m[e],n=t.slice||t.set;n&&(f["$"+e]=i(n))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t=d(u(e),8,-1);return h(p,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(f,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return o?function(e){var t=!1;return r(f,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},1281:function(){},9209:function(e,t,n){"use strict";var r=n(6578),a="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof a[r[t]]&&(e[e.length]=r[t]);return e}},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,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.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(1697),n(4664),n(3422),n(36),n(8703),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),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),a=n(4849),i=n(575),s=function(e){return function(t,n,s){var o=r(t),c=i(o);if(0===c)return!e&&-1;var u,l=a(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,p=7===e,d=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),S=0,C=g||c,A=t?C(h,x):n||p?C(h,0):void 0;x>S;S++)if((d||S in b)&&(w=_(N=b[S],S,v),e))if(t)A[S]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return S;case 2:u(A,N)}else switch(e){case 4:return!1;case 7:u(A,N)}return m?-1:a||l?l:A}};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),a=n(6264),i=n(798),s=a("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=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),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o: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),a=r({}.toString),i=r("".slice);e.exports=function(e){return i(a(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i: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=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(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),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(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(9447),a=n(4284),i=n(5817);e.exports=function(e,t,n){r?a.f(e,t,i(0,n)):e[t]=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,a){return a&&a.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(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(5951),a=n(6285),i=r.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.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}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6794:function(e,t,n){"use strict";var r=n(5951).navigator,a=r&&r.userAgent;e.exports=a?String(a):""},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),p=n(9724);n(6128);var d=function(e){var t=function(n,r,i){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,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,S=e.proto,C=x?r:_?r[b]:r[b]&&r[b].prototype,A=x?u:u[b]||m(u,b,{})[b],P=A.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&C&&p(C,f),g=A[f],a&&(N=e.dontCallGetSet?(v=o(C,f))&&v.value:C[f]),y=a&&N?N:t[f],(n||S||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?d(y):S&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(A,f,w),S&&(p(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&P&&(n||!P[f])&&m(P,f,y)))}},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),a=Function.prototype,i=a.apply,s=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),a=n(2159),i=n(1505),s=r(r.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(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),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),a=n(9724),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),a=n(5951),i=n(2250),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),a=n(1793),i=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(i(e))return e;if(a(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"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,m=!0;return function(e,t){if(m)return m=!1,t;if(a(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),a=n(7136);e.exports=function(e,t){var n=e[t];return a(n)?void 0:r(n)}},5951: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),a=n(9298),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(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),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(5807),s=Object,o=r("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):s(e)}:s},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},4932:function(e,t,n){"use strict";var r,a,i,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),m=n(6128),p=n(2522),d=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||m.state){var g=m.state||(m.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var N=p("state");d[N]=!0,r=function(e,t){if(l(e,N))throw new f(h);return t.facade=e,u(e,N,t),t},a=function(e){return l(e,N)?e[N]:{}},i=function(e){return l(e,N)}}e.exports={set:r,get:a,has:i,enforce:function(e){return i(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=a(t)).type!==e)throw new f("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),a=n(8828),i=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),m=/^\s*(?:class|function)\b/,p=r(m.exec),d=!m.test(u),h=function(e){if(!i(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(m,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||a((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},7463:function(e,t,n){"use strict";var r=n(8828),a=n(2250),i=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(a(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},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),a=n(2250),i=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&i(t.prototype,o(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,a=n(8075),i=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=a(r,{next:i(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),p=n(1626),d=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",S="entries",C=function(){return this};e.exports=function(e,t,n,s,h,y,A){c(n,t,s);var P,T,z,I=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case S:return function(){return new n(this,e)}}return function(){return new n(this)}},E=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||I(h),k="Array"===t&&q.entries||R;if(k&&(P=u(k.call(new e)))!==Object.prototype&&P.next&&(i||u(P)===w||(l?l(P,w):o(P[b])||d(P,b,C)),m(P,E,!0,!0),i&&(f[E]=C)),g&&h===_&&R&&R.name!==_&&(!i&&N?p(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(T={values:I(_),keys:y?O:I(x),entries:I(S)},A)for(z in T)(v||M||!(z in q))&&d(q,z,T[z]);else r({target:t,proto:!0,forced:v||M},T);return i&&!A||q[b]===O||d(q,b,O,{name:h}),f[t]=O,T}},5116:function(e,t,n){"use strict";var r,a,i,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),m=n(8055),p=n(6264),d=n(7376),h=p("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(r=a):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:d&&(r=u(r)),o(r[h])||m(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},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,a=n(6624),i=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),m="prototype",p="script",d=l("IE_PROTO"),h=function(){},f=function(e){return"<"+p+">"+e+"</"+p+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var a=s.length;a--;)delete g[m][s[a]];return g()};o[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[m]=a(e),n=new h,h[m]=null,n[d]=e):n=g(),void 0===t?n:i.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),a=n(3648),i=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m="enumerable",p="configurable",d="writable";t.f=r?i?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=l(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:m in n?n[m]:r[m],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),a)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),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),a=n(7374),i=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},4443:function(e,t,n){"use strict";var r=n(3045),a=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),a=n(2250),i=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return a(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),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),a=n(6285),i=n(4239),s=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),s(r),a(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),a=n(3948);e.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("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),a=TypeError;e.exports=function(e){if(r(e))throw new a("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),a=n(4284).f,i=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||a(l,c,{configurable:!0,value:t}),u&&!r&&i(l,"toString",o))}},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},6128:function(e,t,n){"use strict";var r=n(7376),a=n(5951),i=n(2532),s="__core-js_shared__",o=e.exports=a[s]||i(s,{});(o.versions||(o.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(e,t,n){"use strict";var r=n(6128);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),p=a(n),d=m.length;return p<0||p>=d?e?"":void 0:(r=c(m,p))<55296||r>56319||p+1===d||(l=c(m,p+1))<56320||l>57343?e?o(m,p):r:e?u(m,p,p+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(798),a=n(8828),i=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),a=n(5582),i=n(1907),s=n(5594),o=n(6264),c=a("Symbol"),u=c.isWellKnownSymbol,l=a("Object","getOwnPropertyNames"),m=i(c.prototype.valueOf),p=r("wks"),d=0,h=l(c),f=h.length;d<f;d++)try{var y=h[d];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=m(e),n=0,r=l(p),a=r.length;n<a;n++)if(p[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),a=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):i(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),a=n(4239);e.exports=function(e){return r(a(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),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),a=Object;e.exports=function(e){return a(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),a=n(6285),i=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!a(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(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),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(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),a=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,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),a=n(8828);e.exports=r&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.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(5951),a=n(5816),i=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=a("wks"),m=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=o&&i(u,e)?u[e]:m("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),a=n(8828),i=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),m=n(6968),p=n(7171),d=n(6264),h=n(798),f=d("isConcatSpreadable"),y=h>=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!p("concat")},{concat:function(e){var t,n,r,a,i,s=o(this),p=m(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(a=c(i),u(d+a),n=0;n<a;n++,d++)n in i&&l(p,d,i[n]);else u(d+1),l(p,d++,i);return p.length=d,p}})},9363:function(e,t,n){"use strict";var r=n(7374),a=n(2156),i=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),m=n(9447),p="Array Iterator",d=s.set,h=s.getterFor(p);e.exports=c(Array,"Array",(function(e,t){d(this,{type:p,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,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 f=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&m&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),m=n(3427),p=n(6656),d=n(9846),h=String,f=a("JSON","stringify"),y=o(/./.exec),g=o("".charAt),N=o("".charCodeAt),w=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,S=!d||c((function(){var e=a("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),C=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),A=function(e,t){var n=m(arguments),r=p(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(f,null,n)},P=function(e,t,n){var r=g(n,t-1),a=g(n,t+1);return y(x,e)&&!y(_,a)||y(_,e)&&!y(x,r)?"\\u"+v(N(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:S||C},{stringify:function(e,t,n){var r=m(arguments),a=i(S?A:f,null,r);return C&&"string"==typeof a?w(a,b,P):a}})},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),a=n(9447),i=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!a},{defineProperty:i})},5264:function(e,t,n){"use strict";var r=n(1091),a=n(9846),i=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!a||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,a=n(160),i=n(4932),s=n(183),o=n(9550),c="String Iterator",u=i.set,l=i.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:a(e),index:0})}),(function(){var e,t=l(this),n=t.string,a=t.index;return a>=n.length?o(void 0,!0):(e=r(n,a),t.index+=e.length,o(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),p=n(8280),d=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),S=n(4284),C=n(2220),A=n(2574),P=n(8055),T=n(9251),z=n(5816),I=n(2522),E=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),U=n(4932),G=n(726).forEach,$=I("hidden"),V="Symbol",D="prototype",L=U.set,j=U.getterFor(V),F=Object[D],H=a.Symbol,J=H&&H[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,X=S.f,Z=b.f,ee=A.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(F,t);r&&delete F[t],X(e,t,n),r&&e!==F&&X(F,t,r)},oe=c&&l((function(){return 7!==N(X({},"a",{get:function(){return X(this,"a",{value:7}).a}})).a}))?se:X,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===F&&ue(re,t,n),d(e);var r=f(t);return d(n),m(ne,r)?(n.enumerable?(m(e,$)&&e[$][r]&&(e[$][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,$)||X(e,$,g(1,N(null))),e[$][r]=!0),oe(e,r,n)):X(e,r,n)},le=function(e,t){d(e);var n=h(t),r=w(n).concat(he(n));return G(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===F&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,$)&&this[$][t])||n)},pe=function(e,t){var n=h(e),r=f(t);if(n!==F||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,$)&&n[$][r]||(a.enumerable=!0),a}},de=function(e){var t=Z(h(e)),n=[];return G(t,(function(e){m(ne,e)||m(E,e)||te(n,e)})),n},he=function(e){var t=e===F,n=Z(t?re:h(e)),r=[];return G(n,(function(e){!m(ne,e)||t&&!m(F,e)||te(r,ne[e])})),r};u||(H=function(){if(p(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===F&&i(n,re,e),m(r,$)&&m(r[$],t)&&(r[$][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(F,t,{configurable:!0,set:n}),ce(t,e)},P(J=H[D],"toString",(function(){return j(this).tag})),P(H,"withoutSetter",(function(e){return ce(M(e),e)})),A.f=me,S.f=ue,C.f=le,_.f=pe,v.f=b.f=de,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(T(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||P(F,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:H}),G(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:pe}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:de}),k(),B(H,V),E[$]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("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),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(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),a=n(3467);r("toPrimitive"),a()},4810:function(e,t,n){"use strict";var r=n(5582),a=n(366),i=n(4840);a("toStringTag"),i(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},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),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.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.35"}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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 Qr},AccountBase:function(){return vl},AccountError:function(){return R},AccountGeneralized:function(){return Zy},AccountLedger:function(){return ng},AccountLedgerFactory:function(){return lg},AccountMemory:function(){return pd},AccountMetamask:function(){return yg},AccountMetamaskFactory:function(){return Pg},AccountMnemonicFactory:function(){return Jy},AeSdk:function(){return kh},AeSdkAepp:function(){return yf},AeSdkBase:function(){return Oh},AeSdkMethods:function(){return Mh},AeSdkWallet:function(){return Df},AensError:function(){return O},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ye},AmbiguousEventDefinitionError:function(){return qe},ArgumentCountMismatchError:function(){return H},ArgumentError:function(){return j},BaseError:function(){return q},BrowserRuntimeConnection:function(){return xA},BrowserWindowMessageConnection:function(){return yA},BytecodeMismatchError:function(){return xe},CallReturnType:function(){return Ii},Channel:function(){return lw},ChannelCallError:function(){return fe},ChannelConnectionError:function(){return ye},ChannelError:function(){return B},ChannelIncomingMessageError:function(){return we},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return Eg},CompilerError:function(){return U},CompilerHttp:function(){return CN},ConsensusProtocolVersion:function(){return Kr},Contract:function(){return sh},ContractError:function(){return G},CryptographyError:function(){return $},DRY_RUN_ACCOUNT:function(){return Vr},DecodeError:function(){return Ve},DelegationTag:function(){return Md},DryRunError:function(){return Le},DuplicateContractError:function(){return _e},DuplicateNodeError:function(){return Ge},Encoded:function(){return e},Encoding:function(){return cr},EntryTag:function(){return Ei},IllegalArgumentError:function(){return F},IllegalBidFeeError:function(){return je},InactiveContractError:function(){return Se},InsufficientBalanceError:function(){return J},InsufficientNameFeeError:function(){return ce},InternalError:function(){return ae},InvalidAensNameError:function(){return ue},InvalidAuthDataError:function(){return be},InvalidChecksumError:function(){return Re},InvalidMethodInvocationError:function(){return Ce},InvalidRpcMessageError:function(){return le},InvalidSignatureError:function(){return Fe},InvalidTxError:function(){return vd},LogicError:function(){return re},MAX_AUTH_FUN_GAS:function(){return Dr},MESSAGE_DIRECTION:function(){return Bh},METHODS:function(){return $h},MIN_GAS_PRICE:function(){return Lr},MemoryAccount:function(){return pd},MerkleTreeHashMismatchError:function(){return Oe},Middleware:function(){return sA},MiddlewarePageMissed:function(){return rA},MiddlewareSubscriber:function(){return Aw},MiddlewareSubscriberDisconnected:function(){return bw},MiddlewareSubscriberError:function(){return vw},MissingCallbackError:function(){return me},MissingContractAddressError:function(){return Ae},MissingContractDefError:function(){return Pe},MissingEventDefinitionError:function(){return Me},MissingFunctionNameError:function(){return Te},MissingNodeInTreeError:function(){return ke},MissingParamError:function(){return W},NAME_BID_RANGES:function(){return Wr},NAME_BID_TIMEOUT_BLOCKS:function(){return Hr},NAME_FEE_BID_INCREMENT:function(){return Fr},NAME_FEE_MULTIPLIER:function(){return jr},NAME_MAX_LENGTH_FEE:function(){return Jr},Name:function(){return Dd},NoSerializerFoundError:function(){return K},NoSuchContractFunctionError:function(){return Ie},NoWalletConnectedError:function(){return Qe},Node:function(){return Nl},NodeError:function(){return V},NodeInvocationError:function(){return ze},NodeNotFoundError:function(){return $e},NotImplementedError:function(){return te},NotPayableFunctionError:function(){return Ee},ORACLE_TTL_TYPES:function(){return Mi},Oracle:function(){return dh},OracleClient:function(){return hh},PayloadLengthError:function(){return De},PrefixNotFoundError:function(){return He},RPC_STATUS:function(){return Vh},RequestTimedOutError:function(){return Y},RpcConnectionDenyError:function(){return Jh},RpcConnectionError:function(){return Xe},RpcError:function(){return Lh},RpcInternalError:function(){return Yh},RpcInvalidTransactionError:function(){return jh},RpcMethodNotFoundError:function(){return Xh},RpcNoNetworkById:function(){return Qh},RpcNotAuthorizeError:function(){return Wh},RpcPermissionDenyError:function(){return Kh},RpcRejectedByUserError:function(){return Fh},RpcUnsupportedProtocolError:function(){return Hh},SUBSCRIPTION_TYPES:function(){return Gh},SchemaNotFoundError:function(){return Je},Tag:function(){return Xr},TagNotFoundError:function(){return We},TransactionError:function(){return D},TxNotInChainError:function(){return Ke},TxTimedOutError:function(){return Q},TypeError:function(){return X},UnAuthorizedAccountError:function(){return pe},UnavailableAccountError:function(){return se},UnexpectedChannelMessageError:function(){return Ne},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return ve},UnknownNodeLengthError:function(){return Be},UnknownPathNibbleError:function(){return Ue},UnknownRpcClientError:function(){return de},UnsubscribedAccountError:function(){return he},UnsupportedPlatformError:function(){return Z},UnsupportedProtocolError:function(){return ee},UnsupportedVersionError:function(){return ne},VmVersion:function(){return Yr},WALLET_TYPE:function(){return Uh},WalletConnectorFrame:function(){return Mf},WalletConnectorFrameWithNode:function(){return kf},WalletError:function(){return L},_getPollInterval:function(){return fa},awaitHeight:function(){return wa},buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},buildContractId:function(){return ea},buildContractIdByContractTx:function(){return Es},buildTx:function(){return Ps},buildTxAsync:function(){return Ts},buildTxHash:function(){return Is},commitmentHash:function(){return ia},computeAuctionEndBlock:function(){return da},computeBidFee:function(){return pa},connectionProxy:function(){return oA},createGeneralizedAccount:function(){return wh},decode:function(){return Sr},encode:function(){return Cr},encodeContractAddress:function(){return ea},encodeUnsigned:function(){return Er},ensureEncoded:function(){return Tr},ensureJwt:function(){return Id},ensureName:function(){return oa},formatAmount:function(){return tt},genSalt:function(){return Ir},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getDefaultPointerKey:function(){return la},getExecutionCost:function(){return dd},getExecutionCostBySignedTx:function(){return hd},getExecutionCostUsingNode:function(){return fd},getGeneration:function(){return Sa},getHeight:function(){return ga},getKeyBlock:function(){return Aa},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Ca},getMinimumNameFee:function(){return ma},getName:function(){return qa},getTransactionSignerAddress:function(){return wl},hash:function(){return Mr},hashDomain:function(){return sd},hashJson:function(){return id},hashMessage:function(){return Br},hashTypedData:function(){return od},isAddressValid:function(){return Pr},isAuctionName:function(){return ha},isEncoded:function(){return zr},isJwt:function(){return zd},isName:function(){return ca},isNameValid:function(){return ca},messageToHash:function(){return Br},oracleQueryId:function(){return ta},packDelegation:function(){return Bd},packEntry:function(){return Ss},payForTransaction:function(){return gh},poll:function(){return Na},prefixedAmount:function(){return ot},produceNameId:function(){return aa},readInt:function(){return sa},resolveName:function(){return Ra},sendTransaction:function(){return bd},signJwt:function(){return Pd},spend:function(){return fh},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return $r},transferFunds:function(){return yh},txDryRun:function(){return Ia},unpackDelegation:function(){return Ud},unpackEntry:function(){return Cs},unpackJwt:function(){return Td},unpackTx:function(){return zs},verify:function(){return qr},verifyJwt:function(){return Ed},verifyMessage:function(){return Ur},verifyMessageSignature:function(){return Ur},verifySignature:function(){return qr},verifyTransaction:function(){return wd},waitForTxConfirm:function(){return va},walletDetector:function(){return gA}});var e={};n.r(e),n.d(e,{Encoding:function(){return cr}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return fa},awaitHeight:function(){return wa},getAccount:function(){return ba},getBalance:function(){return xa},getContract:function(){return Ma},getContractByteCode:function(){return Ea},getCurrentGeneration:function(){return _a},getGeneration:function(){return Sa},getHeight:function(){return ga},getKeyBlock:function(){return Aa},getMicroBlockHeader:function(){return Pa},getMicroBlockTransactions:function(){return Ca},getName:function(){return qa},poll:function(){return Na},resolveName:function(){return Ra},txDryRun:function(){return Ia},waitForTxConfirm:function(){return va}});var a={};n.r(a),n.d(a,{Account:function(){return Po},AuctionEntry:function(){return Uo},ByteCode:function(){return Vo},Channel:function(){return Go},ChannelCloseMutualTx:function(){return Sc},ChannelCloseSoloTx:function(){return Cc},ChannelCreateTx:function(){return Ac},ChannelDepositTx:function(){return Pc},ChannelForceProgressTx:function(){return Tc},ChannelSetDelegatesTx:function(){return zc},ChannelSettleTx:function(){return Ic},ChannelSlashTx:function(){return Ec},ChannelSnapshotSoloTx:function(){return Mc},ChannelWithdrawTx:function(){return qc},CheckTxInPoolResponse:function(){return Rc},CommitmentId:function(){return Oc},ContractCallObject:function(){return Xo},ContractCallTx:function(){return kc},ContractCreateTx:function(){return Bc},ContractObject:function(){return $o},CountResponse:function(){return cc},CreateContractUnsignedTx:function(){return mu},Currency:function(){return Lo},Delegates:function(){return qo},DryRunAccount:function(){return Ho},DryRunCallContext:function(){return Ko},DryRunCallReq:function(){return Wo},DryRunInput:function(){return Fo},DryRunInputItem:function(){return Jo},DryRunResult:function(){return Qo},DryRunResults:function(){return Yo},EncodedTx:function(){return vc},ErrorModel:function(){return To},Event:function(){return Zo},GAAttachTx:function(){return Gc},GAMetaTx:function(){return $c},GAObject:function(){return _c},GasPricesItem:function(){return fc},Generation:function(){return ec},HCContractPubkeys:function(){return ac},HashResponse:function(){return ic},Header:function(){return nc},HeightResponse:function(){return sc},Image:function(){return jo},KeyBlock:function(){return tc},MicroBlockHeader:function(){return oc},NameClaimTx:function(){return Vc},NameEntry:function(){return uc},NameHash:function(){return Dc},NamePointer:function(){return Bo},NamePointerComplete:function(){return lc},NamePreclaimTx:function(){return Lc},NameRevokeTx:function(){return jc},NameTransferTx:function(){return Fc},NameUpdateTx:function(){return Hc},NextNonceResponse:function(){return zo},OffChainCallContract:function(){return su},OffChainDeposit:function(){return ou},OffChainNewContract:function(){return cu},OffChainTransfer:function(){return uu},OffChainUpdate:function(){return Ro},OffChainWithdrawal:function(){return lu},OracleExtendTx:function(){return Wc},OracleQueries:function(){return pc},OracleQuery:function(){return dc},OracleQueryTx:function(){return Kc},OracleRegisterTx:function(){return Yc},OracleRespondTx:function(){return Qc},PayingForTx:function(){return Xc},PeerConnections:function(){return Nc},PeerCount:function(){return Zc},PeerCountAvailable:function(){return tu},PeerCountConnected:function(){return eu},PeerDetails:function(){return Jc},PeerPubKey:function(){return hc},Peers:function(){return nu},PinningTx:function(){return rc},PoI:function(){return Do},PostTxResponse:function(){return bc},Protocol:function(){return gc},PubKey:function(){return ru},RegisteredOracle:function(){return mc},RelativeTTL:function(){return Oo},SignedTx:function(){return Eo},SignedTxs:function(){return Io},SpendTx:function(){return au},Status:function(){return yc},SyncStatus:function(){return wc},TokenSupply:function(){return iu},Ttl:function(){return ko},Tx:function(){return Mo},TxInfoObject:function(){return xc},UnsignedTx:function(){return Uc},discriminators:function(){return pu}});var i={};n.r(i),n.d(i,{addChecksum:function(){return vp},decode:function(){return _p},encode:function(){return xp},getPayload:function(){return bp}});var s={};n.r(s),n.d(s,{decode:function(){return Cp},encode:function(){return Sp}});var o={};n.r(o),n.d(o,{payForTransaction:function(){return gh},spend:function(){return fh},transferFunds:function(){return yh}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return vh},buildAuthTxHashByGaMetaTx:function(){return bh},createGeneralizedAccount:function(){return wh}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return Yg},ByteCodeInput:function(){return Hg},BytecodeCallResultInput:function(){return Ug},Calldata:function(){return Vg},CompileOpts:function(){return qg},CompileResult:function(){return kg},CompilerError:function(){return Rg},CompilerVersion:function(){return Kg},Contract:function(){return Mg},DecodeCalldataBytecode:function(){return Dg},DecodeCalldataSource:function(){return Fg},DecodedCalldata:function(){return Lg},DecodedCallresult:function(){return Gg},ErrorModel:function(){return jg},ErrorPos:function(){return Og},FateAssembler:function(){return Jg},FunctionCallInput:function(){return $g},SophiaBinaryData:function(){return Qg},SophiaCallResultInput:function(){return Bg},SophiaJsonData:function(){return Xg},ValidateByteCodeInput:function(){return Wg}});var l={};n.r(l),n.d(l,{appendSignature:function(){return VN},awaitingChannelCreateTx:function(){return WN},awaitingCompletion:function(){return jN},awaitingConnection:function(){return FN},awaitingLeave:function(){return ew},awaitingOnChainTx:function(){return KN},awaitingReconnection:function(){return JN},awaitingReestablish:function(){return HN},awaitingShutdownTx:function(){return ZN},channelClosed:function(){return tw},channelOpen:function(){return QN},handleUnexpectedMessage:function(){return LN},signAndNotify:function(){return DN}});var m={};n.r(m),n.d(m,{Activity:function(){return Nv},ActivityPayload:function(){return wv},Aex141Response:function(){return gb},Aex141TemplateTokensResponse:function(){return bb},Aex141TemplatesResponse:function(){return wb},Aex141TokenDetailResponse:function(){return _b},Aex141TokenResponse:function(){return Iv},Aex141TransferEvent:function(){return Cb},Aex9BalanceResponse:function(){return Mv},Aex9ContractBalanceResponse:function(){return Ib},Aex9Response:function(){return Pb},Aex9TransferEvent:function(){return s_},Aex9TransferResponse:function(){return o_},Auction:function(){return cx},AuctionLastBid:function(){return ux},AuctionLastBidTx:function(){return AS},Channel:function(){return Ob},ChannelCloseMutualTx:function(){return y_},ChannelCloseSoloTx:function(){return g_},ChannelCreateTx:function(){return p_},ChannelDepositTx:function(){return d_},ChannelForceProgressTx:function(){return f_},ChannelSetDelegatesTx:function(){return b_},ChannelSettleTx:function(){return w_},ChannelSlashTx:function(){return N_},ChannelSnapshotSoloTx:function(){return v_},ChannelWithdrawTx:function(){return h_},Components171VsjiSchemasNametxPropertiesTxAllof1:function(){return hx},Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1:function(){return lx},Components1Viuqa3SchemasOracletxPropertiesTxAllof1:function(){return Tx},Contract:function(){return $b},ContractCall:function(){return Bb},ContractCallTx:function(){return C_},ContractCreateTx:function(){return Vb},ContractLog:function(){return Gb},Delegate:function(){return Xb},Delegates:function(){return bv},DeltaStat:function(){return Lx},DexSwap:function(){return Rv},DexSwapAmounts:function(){return Ov},EpochInfo:function(){return Fb},EpochInfoValidatorsItem:function(){return Hb},ErrorResponse:function(){return Tv},GAAttachTx:function(){return A_},GAMetaTx:function(){return P_},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return qb},Get200ApplicationJsonProperties:function(){return jv},InternalContractCallEvent:function(){return c_},InternalTransferEvent:function(){return u_},KeyBlock:function(){return tx},KeyBlockExtended:function(){return PS},MicroBlockExtended:function(){return TS},MicroBlockHeader:function(){return rx},Miner:function(){return Jx},Name:function(){return ox},NameClaim:function(){return Bv},NameClaimEvent:function(){return l_},NameClaimTx:function(){return Uv},NameOwnership:function(){return mx},NamePointer:function(){return Cv},NamePreclaimTx:function(){return S_},NameRevokeTx:function(){return dx},NameTransfer:function(){return wx},NameTransferTx:function(){return vx},NameTx:function(){return px},NameTxTx:function(){return zS},NameUpdate:function(){return xx},NameUpdateTx:function(){return Dv},NotFoundResponse:function(){return Gv},OffChainUpdate:function(){return xv},Oracle:function(){return Sx},OracleExtend:function(){return Ix},OracleExtendTx:function(){return Ex},OracleFormat:function(){return Cx},OracleQuery:function(){return qx},OracleQueryTx:function(){return x_},OracleRegisterTx:function(){return Px},OracleRespondTx:function(){return __},OracleResponse:function(){return Rx},OracleTx:function(){return Ax},OracleTxTx:function(){return IS},PaginatedResponse:function(){return Pv},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Mb},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ub},Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return qv},Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return Qv},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return eS},Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return hb},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return nS},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return tS},Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema:function(){return bS},Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema:function(){return X_},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return B_},Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema:function(){return q_},Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kv},Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return ub},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return k_},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return sx},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return kb},Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema:function(){return W_},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return Tb},Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $x},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Sb},Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Kv},Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema:function(){return yS},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return H_},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return oS},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return sS},Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema:function(){return z_},Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jb},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return aS},Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Gx},Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema:function(){return Q_},Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema:function(){return Y_},Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return xS},Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fx},Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Dx},Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return Xv},Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kx},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return cS},Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return Hv},Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return R_},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return V_},Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return db},Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return lb},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return G_},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return _S},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zv},Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Kb},Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return rb},Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0:function(){return jx},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fx},Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return ib},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return iS},Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema:function(){return K_},Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return Jv},Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema:function(){return dS},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ox},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xb},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return j_},Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return pb},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nx},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Mx},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Ab},Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema:function(){return pS},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return D_},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return $_},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return O_},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return Z_},Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qx},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return L_},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return I_},Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return fb},Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Hx},Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return nb},Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema:function(){return fS},Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Xx},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Lb},Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Vx},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return F_},Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Qb},Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Jb},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return uS},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return yb},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Db},PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return $v},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return CS},PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema:function(){return NS},PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gv},PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return ab},PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema:function(){return wS},PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema:function(){return mS},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return yx},PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return eb},PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wx},PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zb},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zb},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ex},PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return Fv},PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return tb},PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Bx},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return _x},PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return Yv},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return t_},PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0:function(){return n_},PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema:function(){return vS},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return rS},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return E_},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return Eb},PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return sb},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return J_},PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return mb},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gx},PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return Zv},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return nx},PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return ob},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Rb},PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema:function(){return gS},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return vb},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bx},PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx:function(){return Wv},PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return cb},PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema:function(){return SS},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return a_},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return lS},PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema:function(){return hS},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Nb},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return U_},PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema:function(){return Lv},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ax},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return zx},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return Ev},PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return M_},PayingForTx:function(){return T_},PendingTransaction:function(){return r_},Pointee:function(){return Vv},RelativeTTL:function(){return _v},Schedule:function(){return Wb},SignedTx:function(){return Av},SpendTx:function(){return m_},Stat:function(){return Ux},Stats:function(){return kx},Status:function(){return Zx},StatusMdwAsyncTasks:function(){return e_},TotalStat:function(){return Yx},Transaction:function(){return ix},Transfer:function(){return i_},Ttl:function(){return Sv},Tx:function(){return vv},Validator:function(){return Yb},discriminators:function(){return ES}});var p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,h=Math.floor,f="[BigNumber Error] ",y=f+"Number primitive has more than 15 significant digits: ",g=1e14,N=14,w=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,x=1e9;function _(e){var t=0|e;return e>0||e===t?t:t-1}function S(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=N-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function C(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function A(e,t,n,r){if(e<t||e>n||e!==h(e))throw Error(f+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function P(e){var t=e.c.length-1;return _(e.e/N)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function z(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var I=function e(t){var n,r,a,i,s,o,c,u,l,m,I=j.prototype={constructor:j,toString:null,valueOf:null},E=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,U=!1,G=1,$=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,i,s,o,c,u,l,m,d=this;if(!(d instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>B?d.c=d.e=null:e.e<k?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?d.c=d.e=null:(d.e=o,d.c=[e]))}m=String(e)}else{if(!p.test(m=String(e)))return a(d,m,u);d.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(A(t,2,D.length,"Base"),10==t&&L)return W(d=new j(e),M+d.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return a(d,m,u,t);if(d.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(y+e)}else d.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=D.slice(0,t),o=c=0,l=m.length;c<l;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>o){o=l;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return a(d,String(e),u,t)}u=!1,(o=(m=r(m,t,10,d.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(l=m.length;48===m.charCodeAt(--l););if(m=m.slice(c,++l)){if(l-=c,u&&j.DEBUG&&l>15&&(e>w||e!==h(e)))throw Error(y+d.s*e);if((o=o-c-1)>B)d.c=d.e=null;else if(o<k)d.c=[d.e=0];else{if(d.e=o,d.c=[],c=(o+1)%N,o<0&&(c+=N),c<l){for(c&&d.c.push(+m.slice(0,c)),l-=N;c<l;)d.c.push(+m.slice(c,c+=N));c=N-(m=m.slice(c)).length}else c-=l;for(;c--;m+="0");d.c.push(+m)}}else d.c=[d.e=0]}function F(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:A(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=S(e.c),c=1==r||2==r&&(s<=R||s>=O)?T(c,s):z(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=S(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=T(c,i)}else if(t-=s,c=z(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function H(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=C(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*N-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,s,o,c,u,l,m=e.c,p=v;if(m){e:{for(a=1,o=m[0];o>=10;o/=10,a++);if((i=t-a)<0)i+=N,s=t,c=m[u=0],l=h(c/p[a-s-1]%10);else if((u=d((i+1)/N))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,a=1,s=(i%=N)-N+1}else{for(c=o=m[u],a=1;o>=10;o/=10,a++);l=(s=(i%=N)-N+a)<0?0:h(c/p[a-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%p[a-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?c/p[a-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=p[(N-t%N)%N],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=u,o=1,u--):(m.length=u+1,o=p[N-i],m[u]=s>0?h(c/p[a-s]%p[s])*o:0),r)for(;;){if(0==u){for(i=1,s=m[0];s>=10;s/=10,i++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);i!=o&&(e.e++,m[0]==g&&(m[0]=1));break}if(m[u]+=o,m[u]!=g)break;m[u--]=0,o=1}for(i=m.length;0===m[--i];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=S(e.c),t=n<=R||n>=O?T(t,n):z(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(A(n=e[t],0,x,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(A(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(A(n[0],-x,0,t),A(n[1],0,x,t),R=n[0],O=n[1]):(A(n,-x,x,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)A(n[0],-x,-1,t),A(n[1],1,x,t),k=n[0],B=n[1];else{if(A(n,-x,x,t),!n)throw Error(f+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(f+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw U=!n,Error(f+"crypto unavailable");U=n}else U=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(A(n=e[t],0,9,t),G=n),e.hasOwnProperty(t="POW_PRECISION")&&(A(n=e[t],0,x,t),$=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(f+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:U,MODULO_MODE:G,POW_PRECISION:$,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-x&&a<=x&&a===h(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%N)<1&&(t+=N),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==h(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(f+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return H(arguments,-1)},j.minimum=j.min=function(){return H(arguments,1)},j.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return h(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,o=0,c=[],u=new j(E);if(null==e?e=M:A(e,0,x),a=d(e/N),U)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));o<a;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(i%1e14),o+=2);o=a/2}else{if(!crypto.randomBytes)throw U=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(a*=7);o<a;)(i=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):(c.push(i%1e14),o+=7);o=a/7}if(!U)for(;o<a;)(i=s())<9e15&&(c[o++]=i%1e14);for(a=c[--o],e%=N,a&&e&&(i=v[N-e],c[o]=h(a/i)*i);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=N);for(o=1,i=c[0];i>=10;i/=10,o++);o<N&&(r-=N-o)}return u.e=r,u.c=c,u}),j.sum=function(){for(var e=1,t=arguments,n=new j(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 a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),g=M,N=q;for(y>=0&&(m=$,$=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),$=m,f.c=t(z(S(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,g,N,i)).c,p=d.r,l=d.e),y=h[u=l+g+1],m=i/2,p=p||u<0||null!=h[u+1],p=N<4?(null!=y||p)&&(0==N||N==(d.s<0?3:2)):y>m||y==m&&(4==N||p||6==N&&1&h[u-1]||N==(d.s<0?8:7)),u<1||!h[0])r=p?z(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=z(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%b,l=t/b|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%b)+(r=l*i+(s=e[c]/b|0)*u)%b*b+o)/n|0)+(r/b|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,o){var c,u,l,m,p,d,f,y,w,v,b,x,S,C,A,P,T,z=r.s==a.s?1:-1,I=r.c,E=a.c;if(!(I&&I[0]&&E&&E[0]))return new j(r.s&&a.s&&(I?!E||I[0]!=E[0]:E)?I&&0==I[0]||!E?0*z:z/0:NaN);for(w=(y=new j(z)).c=[],z=i+(u=r.e-a.e)+1,o||(o=g,u=_(r.e/N)-_(a.e/N),z=z/N|0),l=0;E[l]==(I[l]||0);l++);if(E[l]>(I[l]||0)&&u--,z<0)w.push(1),m=!0;else{for(C=I.length,P=E.length,l=0,z+=2,(p=h(o/(E[0]+1)))>1&&(E=e(E,p,o),I=e(I,p,o),P=E.length,C=I.length),S=P,b=(v=I.slice(0,P)).length;b<P;v[b++]=0);T=E.slice(),T=[0].concat(T),A=E[0],E[1]>=o/2&&A++;do{if(p=0,(c=t(E,v,P,b))<0){if(x=v[0],P!=b&&(x=x*o+(v[1]||0)),(p=h(x/A))>1)for(p>=o&&(p=o-1),f=(d=e(E,p,o)).length,b=v.length;1==t(d,v,f,b);)p--,n(d,P<f?T:E,f,o),f=d.length,c=1;else 0==p&&(c=p=1),f=(d=E.slice()).length;if(f<b&&(d=[0].concat(d)),n(v,d,b,o),b=v.length,-1==c)for(;t(E,v,P,b)<1;)p++,n(v,P<b?T:E,b,o),b=v.length}else 0===c&&(p++,v=[0]);w[l++]=p,v[0]?v[b++]=I[S]||0:(v=[I[S]],b=1)}while((S++<C||null!=v[0])&&z--);m=null!=v[0],w[0]||w.splice(0,1)}if(o==g){for(l=1,z=w[0];z>=10;z/=10,l++);W(y,i+(y.e=l+u*N-1)+1,s,m)}else y.e=u,y.r=+m;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(m,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(o,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(c,"$1").replace(u,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(f+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},I.absoluteValue=I.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},I.comparedTo=function(e,t){return C(this,new j(e,t))},I.decimalPlaces=I.dp=function(e,t){var n,r,a,i=this;if(null!=e)return A(e,0,x),null==t?t=q:A(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-_(this.e/N))*N,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},I.dividedBy=I.div=function(e,t){return n(this,new j(e,t),M,q)},I.dividedToIntegerBy=I.idiv=function(e,t){return n(this,new j(e,t),0,1)},I.exponentiatedBy=I.pow=function(e,t){var n,r,a,i,s,o,c,u,l=this;if((e=new j(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),s=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 j(Math.pow(+K(l),s?e.s*(2-P(e)):+K(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!o&&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||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&P(e)?-0:0,l.e>-1&&(i=1/i),new j(o?1/i:i);$&&(i=d($/N+2))}for(s?(n=new j(.5),o&&(e.s=1),c=P(e)):c=(a=Math.abs(+K(e)))%2,u=new j(E);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(a){if(0===(a=h(a/2)))break;c=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=P(e);else{if(0==(a=+K(e)))break;c=a%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(o&&(u=E.div(u)),t?u.mod(t):i?W(u,$,q,void 0):u)},I.integerValue=function(e){var t=new j(this);return null==e?e=q:A(e,0,8),W(t,t.e+1,e)},I.isEqualTo=I.eq=function(e,t){return 0===C(this,new j(e,t))},I.isFinite=function(){return!!this.c},I.isGreaterThan=I.gt=function(e,t){return C(this,new j(e,t))>0},I.isGreaterThanOrEqualTo=I.gte=function(e,t){return 1===(t=C(this,new j(e,t)))||0===t},I.isInteger=function(){return!!this.c&&_(this.e/N)>this.c.length-2},I.isLessThan=I.lt=function(e,t){return C(this,new j(e,t))<0},I.isLessThanOrEqualTo=I.lte=function(e,t){return-1===(t=C(this,new j(e,t)))||0===t},I.isNaN=function(){return!this.s},I.isNegative=function(){return this.s<0},I.isPositive=function(){return this.s>0},I.isZero=function(){return!!this.c&&0==this.c[0]},I.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/N,u=e.e/N,l=s.c,m=e.c;if(!c||!u){if(!l||!m)return l?(e.s=-t,e):new j(m?s:NaN);if(!l[0]||!m[0])return m[0]?(e.s=-t,e):new j(l[0]?s:3==q?-0:0)}if(c=_(c),u=_(u),l=l.slice(),o=c-u){for((i=o<0)?(o=-o,a=l):(u=c,a=m),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=l.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(l[t]!=m[t]){i=l[t]<m[t];break}if(i&&(a=l,l=m,m=a,e.s=-e.s),(t=(r=m.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>o;){if(l[--r]<m[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=m[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},I.modulo=I.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==G?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,G),(e=i.minus(r.times(e))).c[0]||1!=G||(e.s=i.s),e)},I.multipliedBy=I.times=function(e,t){var n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,w=this,v=w.c,x=(e=new j(e,t)).c;if(!(v&&x&&v[0]&&x[0]))return!w.s||!e.s||v&&!v[0]&&!x||x&&!x[0]&&!v?e.c=e.e=e.s=null:(e.s*=w.s,v&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(w.e/N)+_(e.e/N),e.s*=w.s,(c=v.length)<(m=x.length)&&(h=v,v=x,x=h,a=c,c=m,m=a),a=c+m,h=[];a--;h.push(0));for(f=g,y=b,a=m;--a>=0;){for(n=0,p=x[a]%y,d=x[a]/y|0,i=a+(s=c);i>a;)n=((u=p*(u=v[--s]%y)+(o=d*u+(l=v[s]/y|0)*p)%y*y+h[i]+n)/f|0)+(o/y|0)+d*l,h[i--]=u%f;h[i]=n}return n?++r:h.splice(0,1),J(e,h,r)},I.negated=function(){var e=new j(this);return e.s=-e.s||null,e},I.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/N,s=e.e/N,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=_(i),s=_(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/g|0,o[t]=g===o[t]?0:o[t]%g;return a&&(o=[a].concat(o),++s),J(e,o,s)},I.precision=I.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return A(e,1,x),null==t?t=q:A(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*N+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},I.shiftedBy=function(e){return A(e,-9007199254740991,w),this.times("1e"+e)},I.squareRoot=I.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=S(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=_((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),S(i.c).slice(0,c)===(t=S(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},I.toExponential=function(e,t){return null!=e&&(A(e,0,x),e++),F(this,e,t,1)},I.toFixed=function(e,t){return null!=e&&(A(e,0,x),e=e+this.e+1),F(this,e,t)},I.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(f+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],m=s[1],p=a.s<0,d=p?l.slice(1):l,h=d.length;if(c&&(i=o,o=c,c=i,h-=i),o>0&&h>0){for(i=h%o||o,l=d.substr(0,i);i<h;i+=o)l+=u+d.substr(i,o);c>0&&(l+=u+d.slice(i)),p&&(l="-"+l)}r=m?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):l}return(n.prefix||"")+r+(n.suffix||"")},I.toFraction=function(e){var t,r,a,i,s,o,c,u,l,m,p,d,h=this,y=h.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(E)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!y)return new j(h);for(t=new j(E),l=r=new j(E),a=u=new j(E),d=S(y),s=t.e=d.length-h.e-1,t.c[0]=v[(o=s%N)<0?N+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new j(d),u.c[0]=0;m=n(c,t,0,1),1!=(i=r.plus(m.times(a))).comparedTo(e);)r=a,a=i,l=u.plus(m.times(i=l)),u=i,t=c.minus(m.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(a)),u.s=l.s=h.s,p=n(l,a,s*=2,q).minus(h).abs().comparedTo(n(u,r,s,q).minus(h).abs())<1?[l,a]:[u,r],B=o,p},I.toNumber=function(){return+K(this)},I.toPrecision=function(e,t){return null!=e&&A(e,1,x),F(this,e,t,2)},I.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?T(S(n.c),i):z(S(n.c),i,"0"):10===e&&L?t=z(S((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(A(e,2,D.length,"Base"),t=r(z(S(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},I.valueOf=I.toJSON=function(){return K(this)},I._isBigNumber=!0,I[Symbol.toStringTag]="BigNumber",I[Symbol.for("nodejs.util.inspect.custom")]=I.valueOf,null!=t&&j.set(t),j}(),E=I;const M=e=>e.integerValue(E.ROUND_CEIL);class q extends Error{constructor(e){super(e),this.name="BaseError"}}class R extends q{constructor(e){super(e),this.name="AccountError"}}class O extends q{constructor(e){super(e),this.name="AensError"}}class k extends q{constructor(e){super(e),this.name="AeppError"}}class B extends q{constructor(e){super(e),this.name="ChannelError"}}class U extends q{constructor(e){super(e),this.name="CompilerError"}}class G extends q{constructor(e){super(e),this.name="ContractError"}}class $ extends q{constructor(e){super(e),this.name="CryptographyError"}}class V extends q{constructor(e){super(e),this.name="NodeError"}}class D extends q{constructor(e){super(e),this.name="TransactionError"}}class L extends q{constructor(e){super(e),this.name="WalletError"}}class j extends q{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class F extends ${constructor(e){super(e),this.name="IllegalArgumentError"}}class H extends q{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class J extends q{constructor(e){super(e),this.name="InsufficientBalanceError"}}class W extends q{constructor(e){super(e),this.name="MissingParamError"}}class K extends q{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class Y extends q{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class Q extends q{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class X extends q{constructor(e){super(e),this.name="TypeError"}}class Z extends q{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class ee extends q{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class te extends q{constructor(e){super(e),this.name="NotImplementedError"}}class ne extends q{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class re extends q{constructor(e){super(e),this.name="LogicError"}}class ae extends q{constructor(e){super(e),this.name="InternalError"}}class ie extends ae{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class se extends R{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends O{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ce extends O{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ue extends O{constructor(e){super(e),this.name="InvalidAensNameError"}}class le extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class me extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class pe 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 he extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class fe extends B{constructor(e){super(e),this.name="ChannelCallError"}}class ye extends B{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends B{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class Ne extends B{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class we extends B{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ve extends B{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class be extends U{constructor(e){super(e),this.name="InvalidAuthDataError"}}class xe extends G{constructor(e,t=""){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`+t),this.name="BytecodeMismatchError"}}class _e extends G{constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Se extends G{constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Ce extends G{constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class Ae extends G{constructor(e){super(e),this.name="MissingContractAddressError"}}class Pe extends G{constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Te extends G{constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class ze extends G{constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ie extends G{constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Ee extends G{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 Me extends G{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 qe extends G{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 Re extends ${constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Oe extends ${constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class ke extends ${constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Be extends ${constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Ue extends ${constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class Ge extends V{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class $e extends V{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ve extends D{constructor(e){super(e),this.name="DecodeError"}}class De extends D{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends D{constructor(e){super(e),this.name="DryRunError"}}class je extends D{constructor(e){super(e),this.name="IllegalBidFeeError"}}class Fe extends D{constructor(e){super(e),this.name="InvalidSignatureError"}}class He extends D{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Je extends D{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class We extends D{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Ke extends D{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ye extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class Qe extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Xe extends L{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)&&!E.isBigNumber(r)))throw new j("value","a number",e);var r;return new E("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}),at=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],it=e=>at.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),st=e=>{var t;return null!==(t=at.find((t=>t.magnitude<=e)))&&void 0!==t?t:at[at.length-1]},ot=e=>{var t;const n=new E(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:a,magnitude:i}=(r<0?it:st)(r);return`${n.shiftedBy(-i).precision(9+Math.min(r-i,0)).toFixed()}${""!==a?" ":""}${a}`},ct=new Set(["Deserialize","Serialize","Retry","Sign"]);class ut{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&&!ct.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ct.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 ut(this._policies)}static create(){return new ut}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),a=n("None"),i=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,a,i,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?i:"Sign"===e?o:a}for(const e of this._policies){const n=e.policy,r=e.options,a=n.name;if(t.has(a))throw new Error("Duplicate policy names not allowed in pipeline");const i={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(a,i),u(r.phase).policies.add(i)}for(const e of this._policies){const{policy:n,options:r}=e,a=n.name,i=t.get(a);if(!i)throw new Error(`Missing node for policy ${a}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(i.dependsOn.add(n),n.dependants.add(i))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(i),i.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 m(){for(const e of c){if(l(e),e.policies.size>0&&e!==a)return void(a.hasRun||l(a));e.hasAfterPolicies&&l(a)}}let p=0;for(;t.size>0;){p++;const t=e.length;if(m(),e.length<=t&&p>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var lt=n(5606);const mt=void 0!==lt&<.env&<.env.DEBUG||void 0;let pt,dt=[],ht=[];const ft=[];mt&>(mt);const yt=Object.assign((e=>wt(e)),{enable:gt,enabled:Nt,disable:function(){const e=pt||"";return gt(""),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 gt(e){pt=e,dt=[],ht=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?ht.push(new RegExp(`^${e.substr(1)}$`)):dt.push(new RegExp(`^${e}$`));for(const e of ft)e.enabled=Nt(e.namespace)}function Nt(e){if(e.endsWith("*"))return!0;for(const t of ht)if(t.test(e))return!1;for(const t of dt)if(t.test(e))return!0;return!1}function wt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Nt(e),destroy:vt,log:yt.log,namespace:e,extend:bt});return ft.push(t),t}function vt(){const e=ft.indexOf(this);return e>=0&&(ft.splice(e,1),!0)}function bt(e){const t=wt(`${this.namespace}:${e}`);return t.log=this.log,t}var xt=yt,_t=n(5606);const St=new Set,Ct=void 0!==_t&&_t.env&&_t.env.AZURE_LOG_LEVEL||void 0;let At;const Pt=xt("azure");Pt.log=(...e)=>{xt.log(...e)};const Tt=["verbose","info","warning","error"];Ct&&(Rt(Ct)?function(e){if(e&&!Rt(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Tt.join(",")}`);At=e;const t=[];for(const e of St)qt(e)&&t.push(e.namespace);xt.enable(t.join(","))}(Ct):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Ct}'; logging is not enabled. Acceptable values: ${Tt.join(", ")}.`));const zt={verbose:400,info:300,warning:200,error:100};function It(e){const t=Pt.extend(e);return Et(Pt,t),{error:Mt(t,"error"),warning:Mt(t,"warning"),info:Mt(t,"info"),verbose:Mt(t,"verbose")}}function Et(e,t){t.log=(...t)=>{e.log(...t)}}function Mt(e,t){const n=Object.assign(e.extend(t),{level:t});if(Et(e,n),qt(n)){const e=xt.disable();xt.enable(e+","+n.namespace)}return St.add(n),n}function qt(e){return Boolean(At&&zt[e.level]<=zt[At])}function Rt(e){return Tt.includes(e)}const Ot=It("core-rest-pipeline");class kt extends Error{constructor(e){super(e),this.name="AbortError"}}function Bt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Ut(e){if(Bt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function Gt(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}`}}function $t(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Vt(e);case"base64url":return function(e){return Vt(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],a=e[2*n+1];if(!Dt.has(r)||!Dt.has(a))return t.slice(0,n);t[n]=parseInt(`${r}${a}`,16)}return t}(e)}}function Vt(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Dt=new Set("0123456789abcdefABCDEF");var Lt;const jt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.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 Ft(){return jt()}var Ht,Jt,Wt,Kt;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ht=self.constructor)||void 0===Ht?void 0:Ht.name)||"ServiceWorkerGlobalScope"===(null===(Jt=self.constructor)||void 0===Jt?void 0:Jt.name)||null===(Wt=self.constructor)||void 0===Wt||Wt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Yt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Kt=globalThis.process.versions)||void 0===Kt?void 0:Kt.node),Qt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Xt=["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"],Zt=["api-version"];class en{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Xt.concat(e),t=Zt.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)||Bt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===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,Qt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;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]=Qt;return t}}const tn=["GET","HEAD"];function nn(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return rn(n,r,t)}}}async function rn(e,t,n,r=0){const{request:a,status:i,headers:s}=t,o=s.get("location");if(o&&(300===i||301===i&&tn.includes(a.method)||302===i&&tn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&r<n){const t=new URL(o,a.url);a.url=t.toString(),303===i&&(a.method="GET",a.headers.delete("Content-Length"),delete a.body),a.headers.delete("Authorization");const s=await e(a);return rn(e,s,n,r+1)}return t}const an="1.19.1";async function sn(e){const t=new Map;t.set("core-rest-pipeline",an),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const a=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);a&&e.set(a.brand,a.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(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 on="x-ms-useragent",cn="userAgentPolicy",un=Symbol("rawContent");function ln(e){return"function"==typeof e[un]?e[un]():e.stream()}function mn(e){return Boolean(e&&"function"==typeof e.pipe)}function pn(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function dn(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(pn(e))return new Response(e).blob();const t=ln(e);if(mn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return dn(t)}function hn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function fn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const yn="multipartPolicy",gn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Nn(){return{name:yn,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 a=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",i=a.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${a}`);const[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!gn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ft()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[$t(`--${n}`,"utf-8"),...t.flatMap((e=>[$t("\r\n","utf-8"),$t(hn(e.headers),"utf-8"),$t("\r\n","utf-8"),e.body,$t(`\r\n--${n}`,"utf-8")])),$t("--\r\n\r\n","utf-8")],a=function(e){let t=0;for(const n of e){const e=fn(n);if(void 0===e)return;t+=e}return t}(r);a&&e.headers.set("Content-Length",a),e.body=await async function(e){const t=[];for(const n of e)t.push(await dn("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function wn(e,t,n){return new Promise(((r,a)=>{let i,s;const o=()=>a(new kt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(i&&clearTimeout(i),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();i=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function vn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const bn="Retry-After",xn=["retry-after-ms","x-ms-retry-after-ms",bn];function _n(e){if(e&&[429,503].includes(e.status))try{for(const t of xn){const n=vn(e,t);if(0===n||n)return n*(t===bn?1e3:1)}const t=e.headers.get(bn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Sn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,a=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=!!(m=i)&&("ETIMEDOUT"===m.code||"ESOCKETTIMEDOUT"===m.code||"ECONNREFUSED"===m.code||"ECONNRESET"===m.code||"ENOENT"===m.code||"ENOTFOUND"===m.code),o=s&&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(_n(e))}(n)||!c);var m;return l||u||o?{skipStrategy:!0}:!i||s||c?function(e,t){const n=t.retryDelayInMs*Math.pow(2,e),r=Math.min(t.maxRetryDelayInMs,n);var a,i;return{retryAfterInMs:r/2+(a=0,i=r/2,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)}}(t,{retryDelayInMs:r,maxRetryDelayInMs:a}):{errorToThrow:i}}}}const Cn=It("core-rest-pipeline retryPolicy");function An(e,t={maxRetries:3}){const n=t.logger||Cn;return{name:"retryPolicy",async sendRequest(r,a){var i,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await a(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;o=c.response}if(null===(i=r.abortSignal)||void 0===i?void 0:i.aborted)throw n.error(`Retry ${u}: Request aborted.`),new kt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;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||Cn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:a,retryAfterInMs:i,redirectTo:s}=n;if(a)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,a),a;if(i||0===i){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${i}`),await wn(i,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Pn(e){return e.toLowerCase()}class Tn{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(Pn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Pn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Pn(e))}delete(e){this._headersMap.delete(Pn(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 zn(e){return new Tn(e)}const In="setClientRequestIdPolicy",En={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Mn(e={}){let t=new qn(e.parentContext);return e.span&&(t=t.setValue(En.span,e.span)),e.namespace&&(t=t.setValue(En.namespace,e.namespace)),t}class qn{constructor(e){this._contextMap=e instanceof qn?new Map(e._contextMap):new Map}setValue(e,t){const n=new qn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qn(this);return t._contextMap.delete(e),t}}const Rn={instrumenterImplementation:void 0};function On(){return Rn.instrumenterImplementation||(Rn.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Mn({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),Rn.instrumenterImplementation}const kn={},Bn=new en;class Un extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Un.prototype)}[kn](){return`RestError: ${this.message} \n ${Bn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function Gn(e){return e instanceof Un||Ut(e)&&"RestError"===e.name}function $n(e){var t;const n=ut.create();var r,a;return Yt&&(e.agent&&n.addPolicy((a=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=a),t(e))})),e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Yt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,a]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(a);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:zn({"Content-Disposition":`form-data; name="${t}"`}),body:$t(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",a=zn();a.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),a.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:a,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[yn]}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix);return{name:cn,async sendRequest(e,n){return e.headers.has(on)||e.headers.set(on,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:In,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(Nn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:An([{name:"throttlingRetryStrategy",retry({response:e}){const t=_n(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Sn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix),n=new en({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function a(e,a,i){var s;const o=On().startSpan(e,Object.assign(Object.assign({},i),{packageName:n,packageVersion:r,tracingContext:null===(s=null==a?void 0:a.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(En.namespace)||(c=c.setValue(En.namespace,t)),u.setAttribute("az.namespace",c.getValue(En.namespace)),{span:u,updatedOptions:Object.assign({},a,{tracingOptions:Object.assign(Object.assign({},null==a?void 0:a.tracingOptions),{tracingContext:c})})}}function i(e,t,...n){return On().withContext(e,t,...n)}return{startSpan:a,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=a(e,t,r);try{const e=await i(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:i,parseTraceparentHeader:function(e){return On().parseTraceparentHeader(e)},createRequestHeaders:function(e){return On().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:an})}catch(e){return void Ot.warning(`Error when creating the TracingClient: ${Gt(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,a){var i;if(!r)return a(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(i=function(e,t,n){try{const{span:r,updatedOptions:a}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const i=e.createRequestHeaders(a.tracingOptions.tracingContext);for(const[e,n]of Object.entries(i))t.headers.set(e,n);return{span:r,tracingContext:a.tracingOptions.tracingContext}}catch(e){return void Ot.warning(`Skipping creating a tracing span due to an error: ${Gt(e)}`)}}(r,e,o))&&void 0!==i?i:{};if(!c||!u)return a(e);try{const t=await r.withContext(u,a,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),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${Gt(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Ut(t)?t:void 0}),Gn(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${Gt(e)}`)}}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Yt&&n.addPolicy(nn(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Ot.info,r=new en({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const a=await t(e);return n(`Response status code: ${a.status}`),n(`Headers: ${r.sanitize(a.headers)}`),a}}}(e.loggingOptions),{afterPhase:"Sign"}),n}Un.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Un.PARSE_ERROR="PARSE_ERROR";class Vn{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 kt("The operation was aborted. Request has already been canceled.");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:a,body:i}=function(e){const t="function"==typeof e.body?e.body():e.body;if(mn(t))throw new Error("Node streams are not supported in browser environment.");return pn(t)?{streaming:!0,body:Dn(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:i,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"}:{});a&&(s.duplex="half");const o=await fetch(e.url,s);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,a;const i=function(e){const t=zn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:i,status:e.status},o=pn(e.body)?Dn(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===(a=t.streamResponseStatusCodes)||void 0===a?void 0:a.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,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 Un(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:Un.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Dn(e,t={}){let n=0;const{onProgress:r,onEnd:a}=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==a||a()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var i;const{done:s,value:o}=await t.read();if(s||!o)return null==a||a(),e.close(),void t.releaseLock();n+=null!==(i=null==o?void 0:o.length)&&void 0!==i?i:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==a||a(),t.cancel(e)}})}}class Ln{constructor(e){var t,n,r,a,i,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:zn(),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!==(a=e.disableKeepAlive)&&void 0!==a&&a,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(i=e.withCredentials)&&void 0!==i&&i,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ft(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o,this.agent=e.agent,this.tlsSettings=e.tlsSettings}}const jn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Fn(e,t){try{return[await t(e),void 0]}catch(e){if(Gn(e)&&e.response)return[e.response,e];throw e}}async function Hn(e){const{scopes:t,getAccessToken:n,request:r}=e,a={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0},i=await n(t,a);i&&e.request.headers.set("Authorization",`Bearer ${i.token}`)}function Jn(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function Wn(e,t){var n;const{scopes:r}=e,a=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!a&&(e.request.headers.set("Authorization",`${null!==(n=a.tokenType)&&void 0!==n?n:"Bearer"} ${a.token}`),!0)}function Kn(e){var t;if(!e)return;const n=function(e){const t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[];let a;for(;null!==(a=t.exec(e));){const e=a[1],t=a[2],i={};let s;for(;null!==(s=n.exec(t));)i[s[1]]=s[2];r.push({scheme:e,params:i})}return r}(e);return null===(t=n.find((e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)))||void 0===t?void 0:t.params.claims}var Yn=n(8287).Buffer;const Qn=async e=>new Promise((t=>{setTimeout(t,e)})),Xn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),Zn=(()=>{try{return Yn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Yn.concat(e.map((e=>Yn.from(e))),t):Yn.concat;function er(e,t){return e in t}function tr(e,t){return t.includes(e)}function nr(e){return e instanceof Un&&404===e.statusCode&&e.message.includes("Account not found")}function rr(e){if(!(e instanceof Error))throw e}function ar(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 a=e();if(null==a)throw new j("wrapped value","defined",a);if("get"===t&&"_wrappedValue"===r[0])return a;const i=Reflect[t](a,...r);return"function"==typeof i&&"get"===t?i.bind(a):i}]))))}var ir=n(8947),sr=n.n(ir),or=n(4156);let cr=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.AccountSecretKey="sk",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 ur=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),a=r.charCodeAt(0);if(255!==t[a])throw new TypeError(r+" is ambiguous");t[a]=n}const n=e.length,r=e.charAt(0),a=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,o=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*a+1>>>0,u=new Uint8Array(c);for(;i<e.length;){const r=e.charCodeAt(i);if(r>255)return;let a=t[r];if(255===a)return;let s=0;for(let e=c-1;(0!==a||s<o)&&-1!==e;e--,s++)a+=n*u[e]>>>0,u[e]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");o=s,i++}let l=c-o;for(;l!==c&&0===u[l];)l++;const m=new Uint8Array(s+(c-l));let p=s;for(;l!==c;)m[p++]=u[l++];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"";let a=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,a++;const u=(c-o)*i+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let m=u-s;for(;m!==u&&0===l[m];)m++;let p=r.repeat(a);for(;m<u;++m)p+=e.charAt(l[m]);return p},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),lr=n(4107),mr=n.n(lr),pr=n(8287).Buffer;function dr(e){return(new(mr())).update(e).digest()}const hr=[cr.ContractBytearray,cr.ContractStoreKey,cr.ContractStoreValue,cr.Transaction,cr.OracleQuery,cr.OracleResponse,cr.State,cr.Poi,cr.StateTrees,cr.CallStateTree,cr.Bytearray],fr=[cr.KeyBlockHash,cr.MicroBlockHash,cr.BlockPofHash,cr.BlockTxHash,cr.BlockStateHash,cr.Channel,cr.ContractAddress,cr.TxHash,cr.OracleAddress,cr.OracleQueryId,cr.AccountAddress,cr.AccountSecretKey,cr.Signature,cr.Commitment,cr.PeerPubkey,cr.Name],yr={[cr.KeyBlockHash]:32,[cr.MicroBlockHash]:32,[cr.BlockPofHash]:32,[cr.BlockTxHash]:32,[cr.BlockStateHash]:32,[cr.Channel]:32,[cr.ContractAddress]:32,[cr.TxHash]:32,[cr.OracleAddress]:32,[cr.OracleQueryId]:32,[cr.AccountAddress]:32,[cr.AccountSecretKey]:32,[cr.Signature]:64,[cr.Commitment]:32,[cr.PeerPubkey]:32,[cr.State]:32};function gr(e,t){if(!er(t,yr))return;const n=yr[t];if(null!=n&&e.length!==n)throw new De(`Payload should be ${n} bytes, got ${e.length} instead`)}const Nr=e=>dr(dr(e)).slice(0,4),wr=e=>Zn([e,Nr(e)]);function vr(e){const t=e.slice(0,-4);if(!Nr(t).equals(e.slice(-4)))throw new Re;return t}const br={encode:e=>wr(e).toString("base64"),decode:e=>vr(pr.from(e,"base64"))},xr={encode:e=>ur.encode(wr(e)),decode:e=>vr(pr.from(ur.decode(e)))},_r=e=>{const t=hr.find((t=>t===e));if(null!=t)return[t,br];const n=fr.find((t=>t===e));if(null!=n)return[n,xr];throw new j("prefix",`one of ${[...fr,...hr].join(", ")}`,e)};function Sr(e){const[t,n,r]=e.split("_");if(null==n)throw new Ve(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ve(`Encoded string have extra parts: ${e}`);const[a,i]=_r(t),s=i.decode(n);return gr(s,a),s}function Cr(e,t){const[,n]=_r(t);return gr(e,t),`${t}_${n.encode(e)}`}var Ar=n(8287).Buffer;function Pr(e,...t){0===t.length&&(t=[cr.AccountAddress]);try{Sr(e);const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function Tr(e,...t){if(Sr(e),0===t.length)return;const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n)}function zr(e,...t){try{return Tr(e,...t),!0}catch(e){return!1}}function Ir(){const[e]=new BigUint64Array(sr().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Er(e){const t=Ar.allocUnsafe(4);return t.writeUInt32BE(e),t.subarray(t.findIndex((e=>0!==e)))}function Mr(e){return Ar.from((0,or.blake2b)(e,void 0,32))}function qr(e,t,n){return sr().sign.detached.verify(e,t,Sr(n))}function Rr(e){return e<253?Ar.from([e]):Zn(e<=65535?[Ar.from([253]),Ar.from(new Uint16Array([e]).buffer)]:e<=4294967295?[Ar.from([254]),Ar.from(new Uint32Array([e]).buffer)]:[Ar.from([255]),Ar.from(new BigUint64Array([BigInt(e)]).buffer)])}const Or=Ar.from("aeternity Signed Message:\n","utf8"),kr=Rr(Or.length);function Br(e){const t=Ar.from(e,"utf8");return Mr(Zn([kr,Or,Rr(t.length),t]))}function Ur(e,t,n){return qr(Br(e),t,n)}var Gr=n(8287).Buffer;function $r(e,t=!1){if(null==e)return Gr.from([]);if(Number.isInteger(e)||E.isBigNumber(e)||t){if(E.isBigNumber(e)||(e=new E(e)),!e.isInteger())throw new X(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),Gr.from(t,"hex")}if("string"==typeof e)return Gr.from(e);throw new K}const Vr={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},Dr=5e4,Lr=1e9,jr=1e14,Fr=.05,Hr=480,Jr=31,Wr=Xn({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 E(t).times(jr)]));let Kr=function(e){return e[e.Ceres=6]="Ceres",e}({}),Yr=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}({}),Qr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Xr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleRespondTx=24]="OracleRespondTx",e[e.OracleExtendTx=25]="OracleExtendTx",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.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.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var Zr=n(8287).Buffer;function ea(e,t){return Cr(Mr(Zr.from([...Sr(e),...$r(t)])),cr.ContractAddress)}function ta(e,t,n){return Cr(Mr(Zr.from([...Sr(e),...function(e){const t=$r(e,!0);return Zn([Zr.alloc(32-t.length),t])}(t),...Sr(n)])),cr.OracleQueryId)}const na=".chain";function ra(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new j("aens name","including only one dot",e);if(n!==na.slice(1))throw new j("aens name",`suffixed with ${na}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new j("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new j("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new j("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new j("aens name",'ending with no "-" char',e);let a;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new j("aens name","valid",e);a=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new j("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(a))throw new j("aens name","without illegal chars",e);if(a.length>63+na.length)throw new j("aens name","not too long",e);return a}function aa(e){return Cr(Mr(ra(e)),cr.Name)}function ia(e,t=Ir()){return Cr(Mr(Zn([Zr.from(ra(e)),Zr.from(t.toString(16).padStart(64,"0"),"hex")])),cr.Commitment)}function sa(e=Zr.from([])){return BigInt("0x"+Zr.from(e).toString("hex")).toString()}function oa(e){ra(e)}function ca(e){try{return oa(e),!0}catch(e){return!1}}const ua=[[cr.AccountAddress,"account_pubkey"],[cr.OracleAddress,"oracle_pubkey"],[cr.ContractAddress,"contract_pubkey"],[cr.Channel,"channel"]];function la(e){Sr(e);const t=e.substring(0,2),n=ua.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new j("identifier",`prefixed with one of ${ua.map((([e])=>`${e}_`)).join(", ")}`,e)}function ma(e){const t=ra(e).length-na.length;return Wr[Math.min(t,Jr)]}function pa(e,{startFee:t,increment:n=Fr}={}){if(Number(n)!==n||n%1==0)throw new je(`Increment must be float. Current increment ${n}`);if(n<Fr)throw new je(`minimum increment percentage is ${Fr}`);return M(new E(null!=t?t:ma(e)).times(new E(Fr).plus(1)))}function da(e,t){var n,r,a;const i=ra(e).length-na.length;return(null!==(n=null!==(r=null!==(a=i<=4?2400:null)&&void 0!==a?a:i<=8?960:null)&&void 0!==r?r:i<=12?480:null)&&void 0!==n?n:0)+t}function ha(e){return ra(e).length<13+na.length}async function fa(e,t){return Math.floor(await async function(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){if(null!=t&&"key-block"===e)return t;if(null!=n&&"micro-block"===e)return n;const a=await r.getNetworkId();return"ae_dev"===a?0:!["ae_mainnet","ae_uat"].includes(a)&&await r._isHyperchain()?3e3:"key-block"===e?18e4:3e3}(e,t)/3)}const ya=new WeakMap;async function ga({cached:e=!1,...t}){const n=null!==(a=(r=t.onNode)._wrappedValue)&&void 0!==a?a:r;var r,a;if(e){const e=ya.get(n);if(null!=e&&e.time>Date.now()-await fa("key-block",t))return e.height}const{height:i}=await n.getCurrentKeyBlockHeight();return ya.set(n,{height:i,time:Date.now()}),i}async function Na(e,{blocks:t=5,interval:n,...r}){let a;null!=n||(n=await fa("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await ga({...r,cached:!0})+t),await Qn(n)}while(-1===a||await ga({...r,cached:!0})<a);throw new Q(t,e)}async function wa(e,{interval:t,...n}){let r;null!=t||(t=Math.min(await fa("key-block",n),5e3));do{null!=r&&await Qn(t),r=await ga(n)}while(r<e);return r}async function va(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:a}=await n.getTransactionByHash(e),i=await wa(a+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new Ke(e);case a:return i;default:return va(e,{onNode:n,confirm:t,...r})}}async function ba(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 xa(e,{format:t=Ze.AETTOS,...n}){const r=e.startsWith("ok_")?Cr(Sr(e),cr.AccountAddress):e,{balance:a}=await ba(r,n).catch((e=>{if(!nr(e))throw e;return{balance:0n}}));return tt(a,{targetDenomination:t})}async function _a({onNode:e}){return e.getCurrentGeneration()}async function Sa(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Ca(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function Aa(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function Pa(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const Ta=new Map;async function za(e,t){const n=Ta.get(e);if(Ta.delete(e),null==n)throw new ae("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await t.getKeyBlockByHeight(n[0].top)).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:Vr.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:a,txEvents:i}=r;a.forEach((({result:e,reason:t,...r},a)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[a];"ok"===e?s({...r,txEvents:i}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ia(e,t,{top:n,txEvents:r,combine:a,onNode:i}){var s;const o=!0===a?[n,r].join():"immediate",c=null!==(s=Ta.get(o))&&void 0!==s?s:[];return Ta.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===a?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{za(o,i)}))):za(o,i)}))}async function Ea(e,{onNode:t}){return t.getContractCode(e)}async function Ma(e,{onNode:t}){return t.getContract(e)}async function qa(e,{onNode:t}){return t.getNameEntryByName(e)}async function Ra(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:a}){if(ca(e)){if(n||r){const n=(await a.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return aa(e)}try{return Sr(e),e}catch(t){throw new ue(`Invalid name or address: ${e}`)}}var Oa=n(8287).Buffer;const ka={[Kr.Ceres]:{"contract-create":{vmVersion:[Yr.Fate3],abiVersion:[Qr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Qr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Qr.NoAbi,Qr.Fate]}}};function Ba(e,t){var n;const r=ka[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Yr.Fate2,abiVersion:r.abiVersion[0]}}var Ua={serialize(e,t,{consensusProtocolVersion:n=Kr.Ceres}){return null!=e||(e=Ba(n,"contract-create")),Oa.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?Ba((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}},Ga=n(8287).Buffer,$a={_getProtocolDetails(e,t){return Ba(e,Xr.ContractCallTx===t||Xr.GaMetaTx===t?"contract-call":"oracle-call").abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Kr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return Ga.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null==n.consensusProtocolVersion&&2!==Object.keys(Kr).length&&null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Va=n(8287).Buffer;const Da=[cr.AccountAddress,cr.Name,cr.Commitment,cr.OracleAddress,cr.ContractAddress,cr.Channel];function La(...e){return{serialize(t){const n=t.slice(0,2);if(!tr(n,Da))throw new We(n);if(!tr(n,e))throw new j("Address encoding",e.join(", "),n);const r=Da.indexOf(n)+1;return Va.from([...$r(r),...Sr(t)])},deserialize(t){const n=Va.from(t).readUIntBE(0,1),r=Da[n-1];if(null==r)throw new He(n);if(!tr(r,e))throw new j("Address encoding",e.join(", "),r);return Cr(t.subarray(1),r)}}}function ja(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Fa={serialize(e){if(Number(e)<0)throw new j("value","greater or equal to 0",e);return $r(e,!0)},deserialize(e){return sa(e)}},Ha={...Fa,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Ze.AETTOS,...r}){return Fa.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}},Ja=n(8287).Buffer;function Wa(e,t){return{serialize(e){if(null==e){if(!0===t)return Ja.from([]);throw new j("Encoded data","provided",e)}return Sr(e)},deserialize(t){return Cr(t,e)}}}var Ka=n(8287).Buffer;function Ya(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Ka.from(t):"string"==typeof t&&t.startsWith("tx_")?Sr(t):Sr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(Cr(t,cr.Bytearray),e)}}}var Qa=n(8287).Buffer;function Xa(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new j("value","to be a number",e);if(e>255)throw new j("value","to be less than 256",e);if(!tr(e,t))throw new j("value","to be a value of Enum",e);return Qa.from([e])},deserialize(e){if(1!==e.length)throw new j("buffer","to have single element",e.length);const n=e[0];if(!tr(n,t))throw new j("value","to be a value of Enum",n);return n}}}const Za=new WeakMap;async function ei(e){const t=Za.get(e);if(null!=t&&t.time>Date.now()-2e4)return t.gasPrice;const{minGasPrice:n,utilization:r}=(await e.getRecentGasPrices())[0];let a=r<70?0n:BigInt(new E(n.toString()).times(1.01).integerValue().toFixed());const i=100000n*BigInt(Lr);return a>i&&(console.warn(`Estimated gas price ${a} exceeds the maximum safe value for unknown reason. It will be limited to ${i}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),a=i),Za.set(e,{gasPrice:a,time:Date.now()}),a}var ti={...Ha,async prepare(e,t,{onNode:n,denomination:r}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `gasPrice` instead)",n);const a=await ei(n);return 0n!==a?tt(a,{targetDenomination:r}):void 0},serializeAettos(e=Lr.toString()){if(+e<Lr)throw new F(`Gas price ${e.toString()} must be bigger than ${Lr}`);return e}};function ni(e){const t={[Xr.OracleRegisterTx]:"oracleTtlValue",[Xr.OracleExtendTx]:"oracleTtlValue",[Xr.OracleQueryTx]:"queryTtlValue",[Xr.OracleRespondTx]:"responseTtlValue"},{tag:n}=e;return er(n,t)?e[t[n]]:1}function ri(e,t,n){const{length:r}=Sr(e),a=t(e);let i=0;return a.tag!==Xr.GaMetaTx&&a.tag!==Xr.PayingForTx||(i=Sr(n(a.tx.encodedTx)).length),(e=>{var t;return 15e3*(null!==(t={[Xr.ChannelForceProgressTx]:30,[Xr.ChannelOffChainTx]:0,[Xr.ContractCreateTx]:5,[Xr.ContractCallTx]:12,[Xr.GaAttachTx]:5,[Xr.GaMetaTx]:5,[Xr.PayingForTx]:.2}[e])&&void 0!==t?t:1)})(a.tag)+((e,t,{relativeTtl:n,innerTxSize:r})=>{switch(e){case Xr.OracleRegisterTx:case Xr.OracleExtendTx:case Xr.OracleQueryTx:case Xr.OracleRespondTx:return 20*t+Math.ceil(32e3*n/Math.floor(175200));case Xr.GaMetaTx:case Xr.PayingForTx:return 20*(t-r);default:return 20*t}})(a.tag,r,{relativeTtl:ni(a),innerTxSize:i})}const ai="_gas-price:";var ii={...Ha,async prepare(e,t,{onNode:n}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `fee` instead)",n);const r=await ei(n);return 0n!==r?ai+r:void 0},serializeAettos(e,{rebuildTx:t,unpackTx:n,buildTx:r,_computingMinFee:a},{_canIncreaseFee:i}){if(null!=a)return a.toFixed();const s=function(e,t,n){let r,a=new E(0);do{r=a,a=new E(Lr).times(ri(e(a),t,n))}while(!a.eq(r));return a}((e=>t({_computingMinFee:e})),n,r),o=!0===e?.startsWith(ai)?s.dividedBy(Lr).times(e.replace(ai,"")):new E(null!=e?e:s);if(s.gt(o)){if(!0===i)return s.toFixed();throw new F(`Fee ${o.toString()} must be bigger than ${s}`)}return o.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(ai)?Fa.serialize(this.serializeAettos(e,t,n)):Ha.serialize.call(this,e,t,n)}},si={serialize(e){return Fa.serialize(e)},deserialize(e){return+Fa.deserialize(e)}},oi={...si,serialize(e,{tag:t,rebuildTx:n,unpackTx:r,buildTx:a,_computingGasLimit:i},{gasMax:s=6e6}){if(null!=i)return si.serialize(i);const o=t===Xr.GaMetaTx?Dr:function(e,t,n,r){return e-+ri(t(e),n,r)}(s,(e=>n({_computingGasLimit:e,_canIncreaseFee:!0})),r,a),c=null!=e?e:o;if(c>o)throw new F(`Gas limit ${c} must be less or equal to ${o}`);return si.serialize(c)}},ci=n(8287).Buffer,ui={serialize(e){return ci.from(e)},deserialize(e){return e.toString()}},li={serialize(e){return ui.serialize(e)},deserialize(e){return ui.deserialize(e)}},mi={...Ha,serializeAettos(e,t){const n=ma(t.name),r=new E(null!=e?e:n);if(n.gt(r))throw new ce(r,n);return r.toFixed()},serialize(e,t,n){return Ha.serialize.call(this,e,t,n)}};const pi=La(cr.Name);var di={...pi,serialize(e){return pi.serialize(ca(e)?aa(e):e)}};function hi(e){return{...si,serialize(e,{tag:t}){if(Xr.GaAttachTx===t&&1!==e)throw new j("nonce","equal 1 if GaAttachTx",e);return si.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:a,strategy:i}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==a)throw new j("onNode",o,a);if(null==s)throw new j("senderId",o,s);return(await a.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:i}).catch((e=>{if(!nr(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var fi=n(8287).Buffer;const yi=fi.from([1]),gi=fi.from([2]),Ni=La(...Da);var wi=e=>({serialize(t){if(t.length>32)throw new F(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(zr(n,...Da)&&(r=[...e?[yi]:[],Ni.serialize(n)]),zr(n,cr.Bytearray)){const e=Sr(n);if(e.length>1024)throw new j("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[gi,e]}if(null==r)throw new Ve(`Unknown AENS pointer value: ${n}`);return[$r(t),fi.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:Ni.deserialize(n)};const r=n.subarray(0,1),a=n.subarray(1);let i;if(r.equals(yi)&&(i=Ni.deserialize(a)),r.equals(gi)&&(i=Cr(a,cr.Bytearray)),null==i)throw new Ve(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:i}}))}}),vi={...Ha,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:a}=n,i="provided (or provide `queryFee` instead)";if(null==r)throw new j("onNode",i,r);if(null==a)throw new j("oracleId",i,a);return(await r.getOracleByPubkey(a)).queryFee.toString()}},bi=n(8287).Buffer,xi={serialize(e){return bi.from(e)},deserialize(e){return e}};function _i(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new j("ShortUIntConst",e,n);return si.serialize(e)},deserialize(t){const n=si.deserialize(t);if(n!==e)throw new j("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Si={serialize(e){return $r(e)},deserialize(e){return e.toString()}},Ci=n(8287).Buffer;function Ai(e){return{serialize(t,{buildTx:n}){return ArrayBuffer.isView(t)?Ci.from(t):"string"==typeof t&&t.startsWith("tx_")?Sr(t):Sr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackTx:n}){return n(Cr(t,cr.Transaction),e)}}}var Pi={...si,serialize(e){return si.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,...a}){if(!0!==r&&0!==e&&null!=e){if(null==n)throw new j("onNode","provided",n);e+=await ga({...a,onNode:n,cached:!0})}return e}};function Ti(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function zi(e,t){return{...t,serialize(n,r,a){return t.serialize(e(n),r,a)}}}let Ii=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),Ei=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",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.Channel=58]="Channel",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.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),Mi=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const qi=Ai(),Ri=Ai(Xr.SignedTx),Oi=Ya(Ei.TreesPoi),ki=Ti(3600,si),Bi=zi((e=>{const t=18e4;if(null!=e||(e=t),e>=1&&e<=t)return e;throw new j("nameTtl","a number between 1 and 180000 blocks",e)}),si),Ui=[{tag:_i(Xr.SignedTx),version:_i(1,!0),signatures:ja(xi),encodedTx:qi},{tag:_i(Xr.SpendTx),version:_i(1,!0),senderId:La(cr.AccountAddress),recipientId:La(cr.AccountAddress,cr.ContractAddress,cr.Name),amount:Ha,fee:ii,ttl:Pi,nonce:hi("senderId"),payload:Wa(cr.Bytearray,!0)},{tag:_i(Xr.NamePreclaimTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),commitmentId:La(cr.Commitment),fee:ii,ttl:Pi},{tag:_i(Xr.NameClaimTx),version:_i(2,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),name:li,nameSalt:Ti(0,Fa),nameFee:mi,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:di,nameTtl:Bi,pointers:wi(!1),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameUpdateTx),version:_i(2),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:di,nameTtl:Bi,pointers:wi(!0),clientTtl:ki,fee:ii,ttl:Pi},{tag:_i(Xr.NameTransferTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:di,recipientId:La(cr.AccountAddress,cr.Name),fee:ii,ttl:Pi},{tag:_i(Xr.NameRevokeTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),nameId:di,fee:ii,ttl:Pi},{tag:_i(Xr.ContractCreateTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),ctVersion:Ua,fee:ii,ttl:Pi,deposit:zi(((e=0)=>{if(0==+e)return e;throw new j("deposit","equal 0 (because is not refundable)",e)}),Ha),amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.ContractCallTx),version:_i(1,!0),callerId:La(cr.AccountAddress),nonce:hi("callerId"),contractId:La(cr.ContractAddress,cr.Name),abiVersion:$a,fee:ii,ttl:Pi,amount:Ha,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.OracleRegisterTx),version:_i(1,!0),accountId:La(cr.AccountAddress),nonce:hi("accountId"),queryFormat:Si,responseFormat:Si,queryFee:Ha,oracleTtlType:Ti(Mi.delta,Xa(Mi)),oracleTtlValue:Ti(500,si),fee:ii,ttl:Pi,abiVersion:$a},{tag:_i(Xr.OracleExtendTx),version:_i(1,!0),oracleId:La(cr.OracleAddress,cr.Name),nonce:hi("oracleId"),oracleTtlType:Ti(Mi.delta,Xa(Mi)),oracleTtlValue:Ti(500,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleQueryTx),version:_i(1,!0),senderId:La(cr.AccountAddress),nonce:hi("senderId"),oracleId:La(cr.OracleAddress,cr.Name),query:Si,queryFee:vi,queryTtlType:Ti(Mi.delta,Xa(Mi)),queryTtlValue:Ti(10,si),responseTtlType:Ti(Mi.delta,Xa(Mi)),responseTtlValue:Ti(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.OracleRespondTx),version:_i(1,!0),oracleId:La(cr.OracleAddress),nonce:hi("oracleId"),queryId:Wa(cr.OracleQueryId),response:Si,responseTtlType:Ti(Mi.delta,Xa(Mi)),responseTtlValue:Ti(10,si),fee:ii,ttl:Pi},{tag:_i(Xr.ChannelCreateTx),version:_i(2,!0),initiator:La(cr.AccountAddress),initiatorAmount:Fa,responder:La(cr.AccountAddress),responderAmount:Fa,channelReserve:Fa,lockPeriod:Fa,ttl:Pi,fee:ii,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),nonce:hi("initiator")},{tag:_i(Xr.ChannelCloseMutualTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelCloseSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelSlashTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),poi:Oi,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelDepositTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelWithdrawTx),version:_i(1,!0),channelId:La(cr.Channel),toId:La(cr.AccountAddress),amount:Fa,ttl:Pi,fee:ii,stateHash:Wa(cr.State),round:si,nonce:hi("fromId")},{tag:_i(Xr.ChannelSettleTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),initiatorAmountFinal:Fa,responderAmountFinal:Fa,ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelForceProgressTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),round:si,update:Wa(cr.ContractBytearray),stateHash:Wa(cr.State),offChainTrees:Wa(cr.StateTrees),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.ChannelOffChainTx),version:_i(2,!0),channelId:La(cr.Channel),round:si,stateHash:Wa(cr.State)},{tag:_i(Xr.ChannelSnapshotSoloTx),version:_i(1,!0),channelId:La(cr.Channel),fromId:La(cr.AccountAddress),payload:Wa(cr.Transaction),ttl:Pi,fee:ii,nonce:hi("fromId")},{tag:_i(Xr.GaAttachTx),version:_i(1,!0),ownerId:La(cr.AccountAddress),nonce:hi("ownerId"),code:Wa(cr.ContractBytearray),authFun:xi,ctVersion:Ua,fee:ii,ttl:Pi,gasLimit:oi,gasPrice:ti,callData:Wa(cr.ContractBytearray)},{tag:_i(Xr.GaMetaTx),version:_i(2,!0),gaId:La(cr.AccountAddress),authData:Wa(cr.ContractBytearray),abiVersion:$a,fee:ii,gasLimit:oi,gasPrice:ti,tx:Ri},{tag:_i(Xr.PayingForTx),version:_i(1,!0),payerId:La(cr.AccountAddress),nonce:hi("payerId"),fee:ii,tx:Ri}];var Gi=n(858),$i=n(8287).Buffer;function Vi(e,t,n,r){const a=e.filter((e=>e.tag.constValue===n));if(0===a.length)throw new Je(`${t[n]} (${n})`,0);if(null==r){const e=a.find((e=>e.version.constValueOptional));if(null==e)throw new ae(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const i=a.find((e=>e.version.constValue===r));if(null==i)throw new Je(`${t[n]} (${n})`,r);return Object.entries(i)}function Di(e,t,n,r,a){const i=Vi(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Cr((0,Gi.encode)(i),a)}function Li(e,t,n,r,a){const i=(0,Gi.decode)(Sr(n));if(!ArrayBuffer.isView(i[0])||!ArrayBuffer.isView(i[1]))throw new Ve("Can't parse tag or version in provided RLP");const s=$i.from(i[0]).readUintBE(0,i[0].length),o=Vi(e,t,s,$i.from(i[1]).readUintBE(0,i[1].length));if(null!=r&&r!==s)throw new Ve(`Expected ${t[r]} tag, got ${t[s]} instead`);if(i.length!==o.length)throw new j("RLP length",o.length,i.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(i[n],a)])))}var ji=n(8287).Buffer,Fi={serialize(e){return ji.from([e?1:0])},deserialize(e){return 1===e[0]}};function Hi(e,t){return{serialize(e,{packEntry:n}){return Sr(n({tag:Ei.Mtree,values:Object.entries(e).map((([e,r])=>({tag:Ei.MtreeValue,key:Sr(e),value:Sr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:a}=r(Cr(n,cr.Bytearray),Ei.Mtree);return Object.fromEntries(a.filter((({key:t})=>e!==cr.ContractAddress||32===t.length)).map((({key:n,value:a})=>[Cr(n,e),r(Cr(a,cr.Bytearray),t)])))},recursiveType:!0}}var Ji,Wi=n(8287).Buffer;function Ki(e,t,n){Yi(e,t),t.set(e,n)}function Yi(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qi(e,t,n){return e.set(Zi(e,t),n),n}function Xi(e,t){return e.get(Zi(e,t))}function Zi(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 es=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(es||{}),ts=new WeakMap,ns=new WeakMap,rs=new WeakMap,as=new WeakMap,is=new WeakMap,ss=new WeakMap,os=new WeakSet;class cs{get isComplete(){return Xi(ns,this)}constructor(e,t,n,r){var a;if(Yi(this,a=os),a.add(this),Ki(this,ts,void 0),Ki(this,ns,!0),Ki(this,rs,void 0),Ki(this,as,void 0),Ki(this,is,void 0),Ki(this,ss,void 0),Qi(as,this,t),Qi(is,this,n),Qi(ss,this,r),Qi(ts,this,e[0].toString("hex")),Qi(rs,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=Xi(rs,this)[Xi(ts,this)])Object.entries(Xi(rs,this)).forEach((([e,t])=>{if(us.call(cs,t)!==e)throw new Oe;const{type:n}=ls.call(cs,t);switch(n){case es.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==Xi(rs,this)[e.toString("hex")]&&Qi(ns,this,!1)}));break;case es.Extension:if(null==Xi(rs,this)[t[1].toString("hex")])throw new ke("Can't find a node by hash in extension node");break;case es.Leaf:break;default:throw new ae(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(Xi(rs,this)).length)throw new ke("Can't find a node by root hash");Qi(ns,this,!1)}}isEqual(e){return Xi(ts,this)===Xi(ts,e)}serialize(){return[Wi.from(Xi(ts,this),"hex"),Object.entries(Xi(rs,this)).map((([e,t])=>[Wi.from(e,"hex"),t]))]}get(e){const t=Zi(os,this,ms).call(this,Sr(e).toString("hex"));return null==t?t:Xi(ss,this).call(this,Cr(t,cr.Bytearray),Xi(is,this))}toObject(){return Object.fromEntries(Zi(os,this,ps).call(this).filter((([e])=>Xi(as,this)!==cr.ContractAddress||66!==e.length)).map((([e,t])=>[Cr(Wi.from(e,"hex"),Xi(as,this)),Xi(ss,this).call(this,Cr(t,cr.Bytearray),Xi(is,this))])))}}function us(e){return Wi.from(Mr((0,Gi.encode)(e))).toString("hex")}function ls(e){switch(e.length){case 17:return{type:es.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Ue(t);const n=t<=1?es.Extension:es.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===es.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Be(e.length)}}function ms(e){let t=Xi(ts,this),n=e;for(;;){const e=Xi(rs,this)[t];if(null==e){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:r,value:a,path:i}=ls.call(Ji,e);switch(r){case es.Branch:if(0===n.length)return a;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case es.Extension:if(n.substring(0,i?.length)!==i)return;t=e[1].toString("hex"),n=n.substring(i.length);break;case es.Leaf:if(i!==n)return;return a;default:throw new ae(`Unknown MPTree node type: ${r}`)}}}function ps(){const e=[],t=(n,r)=>{const a=Xi(rs,this)[n];if(null==a){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:i,value:s,path:o}=ls.call(Ji,a);switch(i){case es.Branch:a.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case es.Extension:t(a[1].toString("hex"),r+o);break;case es.Leaf:if(null==s)throw new ie;e.push([r+o,s]);break;default:throw new ae(`Unknown MPTree node type: ${i}`)}};return t(Xi(ts,this),""),e}function ds(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new cs(n,e,t,r)}}}function hs(e){return{serialize(t,{packEntry:n}){return Sr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(Cr(t,cr.Bytearray),e).payload},recursiveType:!0}}Ji=cs;const fs=ja(Ya(Ei.MtreeValue)),ys=Hi(cr.ContractAddress,Ei.Contract),gs=Hi(cr.AccountAddress,Ei.Account),Ns=Hi(cr.Bytearray,Ei.ContractCall),ws=Hi(cr.Channel,Ei.Channel),vs=Hi(cr.Name,Ei.Name),bs=Hi(cr.OracleAddress,Ei.Oracle),xs=[{tag:_i(Ei.Account),version:_i(1),nonce:si,balance:Fa},{tag:_i(Ei.Account),version:_i(2,!0),flags:Fa,nonce:si,balance:Fa,gaContract:La(cr.ContractAddress,cr.Name),gaAuthFun:Wa(cr.ContractBytearray)},{tag:_i(Ei.Name),version:_i(1,!0),accountId:La(cr.AccountAddress),nameTtl:si,status:xi,clientTtl:si,pointers:wi},{tag:_i(Ei.Contract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),log:Wa(cr.ContractBytearray),active:Fi,referers:ja(La(cr.AccountAddress)),deposit:Ha},{tag:_i(Ei.ContractCall),version:_i(2,!0),callerId:La(cr.AccountAddress),callerNonce:si,height:si,contractId:La(cr.ContractAddress),gasPrice:Fa,gasUsed:si,returnValue:Wa(cr.ContractBytearray),returnType:Xa(Ii),log:ja(xi)},{tag:_i(Ei.Oracle),version:_i(1,!0),accountId:La(cr.AccountAddress),queryFormat:Si,responseFormat:Si,queryFee:Ha,oracleTtlValue:si,abiVersion:$a},{tag:_i(Ei.Channel),version:_i(3,!0),initiator:La(cr.AccountAddress),responder:La(cr.AccountAddress),channelAmount:Fa,initiatorAmount:Fa,responderAmount:Fa,channelReserve:Fa,initiatorDelegateIds:ja(La(...Da)),responderDelegateIds:ja(La(...Da)),stateHash:Wa(cr.State),round:si,soloRound:Fa,lockPeriod:Fa,lockedUntil:Fa,initiatorAuth:Wa(cr.ContractBytearray),responderAuth:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateTransfer),version:_i(1,!0),from:La(cr.AccountAddress),to:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateDeposit),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateWithdraw),version:_i(1,!0),from:La(cr.AccountAddress),amount:Fa},{tag:_i(Ei.ChannelOffChainUpdateCreateContract),version:_i(1,!0),owner:La(cr.AccountAddress),ctVersion:Ua,code:Wa(cr.ContractBytearray),deposit:Fa,callData:Wa(cr.ContractBytearray)},{tag:_i(Ei.ChannelOffChainUpdateCallContract),version:_i(1,!0),caller:La(cr.AccountAddress),contract:La(cr.ContractAddress),abiVersion:$a,amount:Fa,callData:Wa(cr.ContractBytearray),callStack:xi,gasPrice:ti,gasLimit:oi},{tag:_i(Ei.TreesPoi),version:_i(1,!0),accounts:ja(ds(cr.AccountAddress,Ei.Account)),calls:ja(ds(cr.Bytearray,Ei.ContractCall)),channels:ja(ds(cr.Channel,Ei.Channel)),contracts:ja(ds(cr.ContractAddress,Ei.Contract)),ns:ja(ds(cr.Name,Ei.Name)),oracles:ja(ds(cr.OracleAddress,Ei.Oracle))},{tag:_i(Ei.StateTrees),version:_i(0,!0),contracts:hs(Ei.ContractsMtree),calls:hs(Ei.CallsMtree),channels:hs(Ei.ChannelsMtree),ns:hs(Ei.NameserviceMtree),oracles:hs(Ei.OraclesMtree),accounts:hs(Ei.AccountsMtree)},{tag:_i(Ei.Mtree),version:_i(1,!0),values:fs},{tag:_i(Ei.MtreeValue),version:_i(1,!0),key:xi,value:xi},{tag:_i(Ei.ContractsMtree),version:_i(1,!0),payload:ys},{tag:_i(Ei.CallsMtree),version:_i(1,!0),payload:Ns},{tag:_i(Ei.ChannelsMtree),version:_i(1,!0),payload:ws},{tag:_i(Ei.NameserviceMtree),version:_i(1,!0),payload:vs},{tag:_i(Ei.OraclesMtree),version:_i(1,!0),payload:bs},{tag:_i(Ei.AccountsMtree),version:_i(1,!0),payload:gs},{tag:_i(Ei.GaMetaTxAuthData),version:_i(1,!0),fee:Ha,gasPrice:ti,txHash:Wa(cr.TxHash)}],_s=[[Ei.CallsMtree,cr.CallStateTree],[Ei.StateTrees,cr.StateTrees],[Ei.TreesPoi,cr.Poi]];function Ss(e){var t;const n=null!==(t=_s.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:cr.Bytearray;return Di(xs,Ei,e,{packEntry:Ss},n)}function Cs(e,t){return null!=t||(t=_s.find((([,t])=>e.startsWith(t)))?.[0]),Li(xs,Ei,e,t,{unpackEntry:Cs})}function As(e,t){return Vi(Ui,Xr,e,t)}function Ps(e){return Di(Ui,Xr,e,{unpackTx:zs,buildTx:Ps,rebuildTx:t=>Ps({...e,...t}),packEntry:Ss},cr.Transaction)}async function Ts(e){return await Promise.all(As(e.tag,e.version).map((async([t,n])=>{null!=n.prepare&&(e[t]=await n.prepare(e[t],e,e))}))),Ps(e)}function zs(e,t){return Li(Ui,Xr,e,t,{unpackTx:zs,unpackEntry:Cs})}function Is(e){return Cr(Mr("string"==typeof e&&e.startsWith("tx_")?Sr(e):e),cr.TxHash)}function Es(e){let t=zs(e);if(Xr.SignedTx===t.tag&&(t=t.encodedTx),Xr.ContractCreateTx!==t.tag&&Xr.GaAttachTx!==t.tag)throw new j("contractTx","a contractCreateTx or gaAttach",t.tag);return ea(t.ownerId,t.nonce)}function Ms(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function qs(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 Rs="$",Os="_",ks=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,Bs=/^[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 Us(e,t){var n,r;const a=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},a),{body:e.parsedBody});const i=t&&t.bodyMapper,s=Boolean(null==i?void 0:i.nullable),o=null==i?void 0:i.type.name;if("Stream"===o)return Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&i.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||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(a)for(const e of Object.keys(a))t[e]=a[e];return!s||e.parsedBody||a||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:a,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,m=o,"Composite"!==m&&"Dictionary"!==m&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==m?void 0:m.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,m}class Gs{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:a,InclusiveMaximum:i,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:m,Pattern:p,UniqueItems:d}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==a&&t<=a&&r("ExclusiveMinimum",a),void 0!==i&&t>i&&r("InclusiveMaximum",i),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),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!==m&&t%m!=0&&r("MultipleOf",m),p){const e="string"==typeof p?new RegExp(p):p;"string"==typeof t&&null!==t.match(e)||r("Pattern",p)}d&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",d)}}serialize(e,t,n,r={xml:{}}){var a,i,s;const o={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os}};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:m}=e;if(l&&m&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!m&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===m&&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,!Bs.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 ks.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=Ms(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){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(Ms(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,a,i){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);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}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,i);if(a&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][Rs]={[e]:o.xmlNamespace}):(c[t]={},c[t][i.xml.xmlCharKey]=s,c[t][Rs]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,a,i){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,i);o[t]=js(s,c,a,i)}if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[Rs]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,a,i){if(Js(e,t)&&(t=Hs(e,t,n,"clientName")),null!=n){const s={},o=Ls(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,m=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=Vs(u.serializedName);l=e.pop();for(const t of e){null==m[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(m[t]={}),m=m[t]}}if(null!=m){if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";m[Rs]=Object.assign(Object.assign({},m[Rs]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const p=Js(e,t);p&&p.clientName===c&&null==o&&(o=t.serializedName);const d=e.serialize(u,o,s,i);if(void 0!==d&&null!=l){const e=js(u,d,a,i);a&&u.xmlIsAttribute?(m[Rs]=m[Rs]||{},m[Rs][l]=d):a&&u.xmlIsWrapped?m[l]={[u.xmlElementName]:e}:m[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=Ds(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const a in n)t.every((e=>e!==a))&&(s[a]=e.serialize(c,n[a],r+'["'+a+'"]',i))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var a,i,s,o;const c={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:Os},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};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,a){var i,s;const o=null!==(i=a.xml.xmlCharKey)&&void 0!==i?i:Os;Js(e,t)&&(t=Hs(e,t,n,"serializedName"));const c=Ls(e,t,r);let u={};const l=[];for(const i of Object.keys(c)){const m=c[i],p=Vs(c[i].serializedName);l.push(p[0]);const{serializedName:d,xmlName:h,xmlElementName:f}=m;let y=r;""!==d&&void 0!==d&&(y=r+"."+d);const g=m.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(m.type.value,n[r],y,a)),l.push(r);u[i]=t}else if(e.isXML)if(m.xmlIsAttribute&&n[Rs])u[i]=e.deserialize(m,n[Rs][h],y,a);else if(m.xmlIsMsText)void 0!==n[o]?u[i]=n[o]:"string"==typeof n&&(u[i]=n);else{const t=f||h||d;if(m.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[i]=e.deserialize(m,r,y,a),l.push(h)}else{const r=n[t];u[i]=e.deserialize(m,r,y,a),l.push(t)}}else{let r,s=n,o=0;for(const e of p){if(!s)break;o++,s=s[e]}null===s&&o<p.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let d;if(l&&i===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[i])&&""===c[i].serializedName){r=n[i];const t=e.deserialize(m,r,y,a);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===m.defaultValue||(d=e.deserialize(m,r,y,a),u[i]=d)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in c)if(Vs(c[t].serializedName)[0]===e)return!1;return!0};for(const i in n)t(i)&&(u[i]=e.deserialize(m,n[i],r+'["'+i+'"]',a))}else if(n&&!a.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||Fs(e,a)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[Rs]&&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=qs(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 qs(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,a){var i;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}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(i=e.modelMappers[s.type.className])&&void 0!==i?i:s);const t=[];for(let i=0;i<n.length;i++)t[i]=e.deserialize(s,n[i],`${r}[${i}]`,a);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,a){const i=t.type.value;if(!i||"object"!=typeof i)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 s of Object.keys(n))t[s]=e.deserialize(i,n[s],r,a);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function $s(e={},t=!1){return new Gs(e,t)}function Vs(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 Ds(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 Ls(e,t,n){let r=t.type.modelProperties;if(!r){const a=Ds(e,t,n);if(!a)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==a?void 0:a.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(a)}" of type "${t.type.className}" for object "${n}".`)}return r}function js(e,t,n,r){if(!n||!e.xmlNamespace)return t;const a=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",i={[a]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[Rs])return t;{const e=Object.assign({},t);return e[Rs]=i,e}}const s={};return s[r.xml.xmlCharKey]=t,s[Rs]=i,s}function Fs(e,t){return[Rs,t.xml.xmlCharKey].includes(e)}function Hs(e,t,n,r){var a;const i=Js(e,t);if(i){let s=i[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const i=n[s],o=null!==(a=t.type.uberParent)&&void 0!==a?a:t.type.className;if("string"==typeof i&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),a=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,a))return e[a];for(const[t,a]of Object.entries(e))t.startsWith(n+".")&&a.type.uberParent===n&&a.type.className&&r.push(a.type.className)}}(e.modelMappers.discriminators,i,o);n&&(t=n)}}}return t}function Js(e,t){return t.type.polymorphicDiscriminator||Ws(e,t.type.uberParent)||Ws(e,t.type.className)}function Ws(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const Ks="Sequence",Ys="Stream",Qs={operationRequestMap:new WeakMap};function Xs(e,t,n){let r=t.parameterPath;const a=t.mapper;let i;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(a.isConstant)i=a.defaultValue;else{let t=Zs(e,r);!t.propertyFound&&n&&(t=Zs(n,r));let s=!1;t.propertyFound||(s=a.required||"options"===r[0]&&2===r.length),i=s?a.defaultValue:t.propertyValue}}else{a.required&&(i={});for(const t in r){const s=a.type.modelProperties[t],o=Xs(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(i||(i={}),i[t]=o)}}return i}function Zs(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 eo=Symbol.for("@azure/core-client original request");function to(e){if(function(e){return eo in e}(e))return to(e[eo]);let t=Qs.operationRequestMap.get(e);return t||(t={},Qs.operationRequestMap.set(e,t)),t}const no=["application/json","text/json"],ro=["application/xml","application/atom+xml"];function ao(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function io(e={}){const t=$n(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t,n,r;const{credential:a,scopes:i,challengeCallbacks:s}=e,o=e.logger||Ot,c={authorizeRequest:null!==(n=null===(t=null==s?void 0:s.authorizeRequest)||void 0===t?void 0:t.bind(s))&&void 0!==n?n:Hn,authorizeRequestOnChallenge:null===(r=null==s?void 0:s.authorizeRequestOnChallenge)||void 0===r?void 0:r.bind(s)},u=a?function(e,t){let n,r=null,a=null;const i=Object.assign(Object.assign({},jn),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==a?void 0:a.refreshAfterTimestamp)&&a.refreshAfterTimestamp<Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-i.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-i.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.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 a=await r();for(;null===a;)await wn(t),a=await r();return a}((()=>e.getToken(t,o)),i.retryIntervalInMs,null!==(c=null==a?void 0:a.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,a=e,n=o.tenantId,a))).catch((e=>{throw r=null,a=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),i=n!==t.tenantId;return r&&(a=null),i||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),a)}}(a):()=>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,r,a;if(await c.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:u,logger:o}),[n,r]=await Fn(e,t),Jn(n)){let s=Kn(n.headers.get("WWW-Authenticate"));if(s){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}else if(c.authorizeRequestOnChallenge&&(a=await c.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:u,logger:o}),a&&([n,r]=await Fn(e,t)),Jn(n)&&(s=Kn(n.headers.get("WWW-Authenticate")),s))){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Fn(e,t))}}if(r)throw r;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=to(e),a=null==r?void 0:r.operationSpec,i=null==r?void 0:r.operationArguments;return a&&i&&(function(e,t,n){var r,a;if(n.headerParameters)for(const r of n.headerParameters){let a=Xs(t,r);if(null!=a||r.mapper.required){a=n.serializer.serialize(r.mapper,a,ao(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(a))e.headers.set(t+n,a[n]);else e.headers.set(r.mapper.serializedName||ao(r),a)}}const i=null===(a=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===a?void 0:a.customHeaders;if(i)for(const t of Object.keys(i))e.headers.set(t,i[t])}(e,i,a),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var a,i,s,o,c;const u=null===(a=t.options)||void 0===a?void 0:a.serializerOptions,l={xml:{rootName:null!==(i=null==u?void 0:u.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:Os}},m=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Xs(t,n.requestBody);const a=n.requestBody.mapper,{required:i,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:p,xmlNamespacePrefix:d,nullable:h}=a,f=a.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||i){const t=ao(n.requestBody);e.body=n.serializer.serialize(a,e.body,t,l);const i=f===Ys;if(n.isXML){const t=d?`xmlns:${d}`:"xmlns",n=function(e,t,n,r,a){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[a.xml.xmlCharKey]=r,n[Rs]={[t]:e},n}return r}(p,t,f,e.body,l);f===Ks?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const a={[t]:e};return a[Rs]={[n]:r},a}(n,u||o||s,t,p),{rootName:o||s,xmlCharKey:m}):i||(e.body=r(n,{rootName:o||s,xmlCharKey:m}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;i||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const a=Xs(t,r);if(null!=a){const t=r.mapper.serializedName||ao(r);e.formData[t]=n.serializer.serialize(r.mapper,a,ao(r),l)}}}}(e,i,a,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,a,i,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:no,u=null!==(a=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==a?a:ro,l=e.parseXML,m=e.serializerOptions,p={xml:{rootName:null!==(i=null==m?void 0:m.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==m?void 0:m.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==m?void 0:m.xml.xmlCharKey)&&void 0!==o?o:Os}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,a){const i=await async function(e,t,n,r,a){var i;if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&n.bodyAsText){const i=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(i),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!a)throw new Error("Parsing XML not supported.");const e=await a(i,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||Un.PARSE_ERROR;throw new Un(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,a);if(!function(e){const t=to(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(i))return i;const s=to(i.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return i;const c=function(e){let t;const n=to(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}(i),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var a,i,s,o,c;const u=200<=e.status&&e.status<300,l=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?u:!!n;if(l){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const m=null!=n?n:t.responses.default,p=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,d=new Un(p,{statusCode:e.status,request:e.request,response:e});if(!(m||(null===(s=null===(i=e.parsedBody)||void 0===i?void 0:i.error)||void 0===s?void 0:s.code)&&(null===(c=null===(o=e.parsedBody)||void 0===o?void 0:o.error)||void 0===c?void 0:c.message)))throw d;const h=null==m?void 0:m.bodyMapper,f=null==m?void 0:m.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(h){let e=n;if(t.isXML&&h.type.name===Ks){e=[];const t=h.xmlElementName;"object"==typeof n&&t&&(e=n[t])}a=t.serializer.deserialize(h,e,"error.response.parsedBody",r)}const i=n.error||a||n;d.code=i.code,i.message&&(d.message=i.message),h&&(d.response.parsedBody=a)}e.headers&&f&&(d.response.parsedHeaders=t.serializer.deserialize(f,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){d.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}(i,o,c,r);if(u)throw u;if(l)return i;if(c){if(c.bodyMapper){let e=i.parsedBody;o.isXML&&c.bodyMapper.type.name===Ks&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{i.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new Un(`Error ${e} occurred in deserializing the responseBody - ${i.bodyAsText}`,{statusCode:i.status,request:i.request,response:i})}}else"HEAD"===o.httpMethod&&(i.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(i.parsedHeaders=o.serializer.deserialize(c.headersMapper,i.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return i}(c,u,n,p,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let so;const oo={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function co(e,t,n,r){const a=function(e,t,n){var r;const a=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let i=Xs(t,r,n);const s=ao(r);i=e.serializer.serialize(r.mapper,i,s),r.skipEncoding||(i=encodeURIComponent(i)),a.set(`{${r.mapper.serializedName||s}}`,i)}return a}(t,n,r);let i=!1,s=uo(e,a);if(t.path){let e=uo(t.path,a);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,i=!0):s=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 a=t.indexOf("?");if(-1!==a){const e=t.substring(0,a),i=t.substring(a+1);r+=e,i&&(n.search=n.search?`${n.search}&${i}`:i)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const a=new Map,i=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&&i.add(r.mapper.serializedName);let s=Xs(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,ao(r));const t=r.collectionFormat?oo[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),a.set(r.mapper.serializedName||ao(r),s)}}return{queryParams:a,sequenceParams:i}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const a=new URL(e),i=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),a=t.get(n);a?Array.isArray(a)?a.push(r):t.set(n,[a,r]):t.set(n,r)}return t}(a.search);for(const[e,a]of t){const t=i.get(e);if(Array.isArray(t))if(Array.isArray(a)){t.push(...a);const n=new Set(t);i.set(e,Array.from(n))}else t.push(a);else t?(Array.isArray(a)?a.unshift(t):n.has(e)&&i.set(e,[t,a]),r||i.set(e,a)):i.set(e,a)}const s=[];for(const[e,t]of i)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return a.search=s.length?`?${s.join("&")}`:"",a.toString()}(s,o,c,i),s}function uo(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const lo=It("core-client");class mo{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&lo.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(so||(so=new Vn),so),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 io(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 Ln(e)}({url:co(n,t,e,this)});r.method=t.httpMethod;const a=to(r);a.operationSpec=t,a.operationArguments=e;const i=t.contentType||this._requestContentType;i&&t.requestBody&&r.headers.set("Content-Type",i);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(a.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.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===Ys&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=Us(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=Us(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function po(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),a=n(t),i=Math.max(...r,...a)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*i**n),0);return s(r)-s(a)}function ho(e,t,n){return po(e,t)>=0&&(null==n||po(e,n)<0)}const fo="_sdk-big-int-",yo=(...e)=>{const t=$s(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,a]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,a);if("bigint"!=typeof t)throw null!=r||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,a]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(fo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(fo,""));const i=r.call(this,e,t,n,a);return i instanceof Date?new Date(+i/1e3):i}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new ae(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(fo,""))}})},go=Number.MAX_SAFE_INTEGER.toString().length,No=new RegExp(String.raw`("\w+":\s*)(\d{${go},})(\s*[,}])`,"m"),wo=new RegExp(String.raw`([[,]\s*)(\d{${go},})\b`,"m"),vo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(No,"g"),(e=>{const t=e.match(No);if(null==t)throw new ie;const[,n,r,a]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${fo}${r}"`:r,a].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(wo,"g"),(e=>{const t=e.match(wo);if(null==t)throw new ie;const[,n,r]=t;return`${n}"${fo}${r}"`}))),n}},bo=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const a=t.headers.get("__queue");t.headers.delete("__queue");const i=async()=>n(t);if(null==a)return i();const s=(null!==(r=e.get(a))&&void 0!==r?r:Promise.resolve()).then(i);return e.set(a,s.catch((()=>{}))),s}},position:"perCall"}},xo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);e.set(a,i);try{return await i}finally{e.delete(a)}}},position:"perCall"}},_o=()=>{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 a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);return e.set(a,i),i}},position:"perCall"}},So=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof Un)||null==t.request||t.message.startsWith("Error "))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 a=null==r?` ${t.response.status} status code`:e(r);throw""!==a&&(t.message+=`:${a}`),t}}},position:"perCall"}),Co=(e,t,n,r,a)=>({policy:{name:"version-check",async sendRequest(i,s){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),s(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!ho(...o)){const t=new ne(e,...o);if(!a)throw t;console.warn(t.message)}return s(i)}},position:"perCall"}),Ao=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var a;if(null!=n.headers.get("__no-retry"))return n.headers.delete("__no-retry"),r(n);const i=null!==(a=n.headers.get("__retry-code"))&&void 0!==a?a:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+i)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new Un("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Qn(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 m;if(!(e instanceof Un))throw e;if(s.includes(null!==(m=e.response?.status)&&void 0!==m?m:0))throw e;l=e}}throw l}},position:"perCall"}),Po={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},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"}}}}},To={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},zo={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},Io={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},Eo={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},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"}}}}}}},Mo={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},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:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},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"]}}}}},qo={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"}}}}}}},Ro={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Oo={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},ko={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Bo={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Uo={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",required:!0,type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"BigInt"}}}}},Go={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:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},$o={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Vo={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Do={type:{name:"Composite",className:"PoI",modelProperties:{poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Lo={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_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"}}}}},jo={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},Fo={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"}}}}},Ho={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Jo={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"}}}}},Wo={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Ko={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"}}}}},Yo={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"}}}}}}}}},Qo={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"}}}}},Xo={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},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"]}}}}},Zo={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},ec={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"}}}}}}},tc={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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"}},flags:{serializedName:"flags",required:!0,type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nc={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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"}},flags:{serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},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"}}}}},rc={type:{name:"Composite",className:"PinningTx",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},parentPayload:{serializedName:"parent_payload",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},parentType:{serializedName:"parent_type",required:!0,type:{name:"String"}},parentNetworkId:{serializedName:"parent_network_id",required:!0,type:{name:"String"}}}}},ac={type:{name:"Composite",className:"HCContractPubkeys",modelProperties:{staking:{serializedName:"staking",required:!0,type:{name:"String"}},election:{serializedName:"election",type:{name:"String"}},rewards:{serializedName:"rewards",type:{name:"String"}}}}},ic={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},sc={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},cc={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},uc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointerComplete"}}}}}}},lc={type:{name:"Composite",className:"NamePointerComplete",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",required:!0,type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},mc={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},pc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},dc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},hc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},fc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},yc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},gc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},Nc={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},wc={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},vc={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},bc={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xc={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"}}}}},_c={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},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"}}}}},Sc={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Cc={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Ac={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},Pc={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Tc={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},zc={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Ic={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},Ec={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},Mc={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},qc={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},Rc={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},kc={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Uc={type:{name:"Composite",className:"UnsignedTx",modelProperties:{tx:{serializedName:"tx",required:!0,type:{name:"String"}}}}},Gc={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},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"}}}}},$c={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Vc={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Dc={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}}}}},Lc={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},jc={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Fc={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Hc={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Jc={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},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"}}}}},Wc={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Kc={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Yc={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Qc={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Xc={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Zc={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},eu={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},tu={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},nu={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"}}}}}}},ru={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},au={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},iu={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},su={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},ou={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},cu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},uu={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},lu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:Ro.type.polymorphicDiscriminator,modelProperties:{...Ro.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},mu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...Uc.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}};let pu={OffChainUpdate:Ro,"OffChainUpdate.OffChainCallContract":su,"OffChainUpdate.OffChainDeposit":ou,"OffChainUpdate.OffChainNewContract":cu,"OffChainUpdate.OffChainTransfer":uu,"OffChainUpdate.OffChainWithdrawal":lu};const du={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},hu={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},fu={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},yu={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},gu={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Nu={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},wu={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},vu={parameterPath:"body",mapper:Fo},bu={parameterPath:"body",mapper:vc};class xu extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-node/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Su)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Cu)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},Au)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},Pu)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Tu)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},zu)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Iu)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},Eu)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},Mu)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},qu)}getCurrency(e){return this.sendOperationRequest({options:e},Ru)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},Ou)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},ku)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Bu)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Uu)}getTopHeader(e){return this.sendOperationRequest({options:e},Gu)}getPinningTx(e){return this.sendOperationRequest({options:e},$u)}getHyperchainContractPubkeys(e){return this.sendOperationRequest({options:e},Vu)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},Du)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},Lu)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},ju)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Fu)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},Hu)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},Ju)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Wu)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Ku)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Yu)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Qu)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Xu)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Zu)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},el)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},tl)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},nl)}getPeerPubkey(e){return this.sendOperationRequest({options:e},rl)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},al)}getStatus(e){return this.sendOperationRequest({options:e},il)}getChainEnds(e){return this.sendOperationRequest({options:e},sl)}getSyncStatus(e){return this.sendOperationRequest({options:e},ol)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},cl)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ul)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},ll)}}const _u=yo(a,!1),Su={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},Cu={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu,yu],headerParameters:[du],serializer:_u},Au={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Po},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0},410:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu,gu],headerParameters:[du],serializer:_u},Pu={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:zo},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[hu,fu],headerParameters:[du],serializer:_u},Tu={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},zu={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Uo},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,Nu],headerParameters:[du],serializer:_u},Iu={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Go},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},Eu={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:$o},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},Mu={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Vo},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},qu={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:Do},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},Ru={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:Lo}},urlParameters:[hu],headerParameters:[du],serializer:_u},Ou={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Yo},400:{bodyMapper:To,isError:!0},403:{bodyMapper:To,isError:!0}},requestBody:vu,urlParameters:[hu],headerParameters:[du,wu],mediaType:"json",serializer:_u},ku={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Bu={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ec},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},Uu={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:ec},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,gu],headerParameters:[du],serializer:_u},Gu={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:nc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},$u={path:"/v3/hyperchain/pin-tx",httpMethod:"GET",responses:{200:{bodyMapper:rc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Vu={path:"/v3/hyperchain/contracts",httpMethod:"GET",responses:{200:{bodyMapper:ac},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Du={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Lu={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:ic},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},ju={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:sc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Fu={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},Hu={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:tc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,gu],headerParameters:[du],serializer:_u},Ju={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:tc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},Wu={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:oc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},Ku={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:Io},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},Yu={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},Qu={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[du],serializer:_u},Xu={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,Nu],headerParameters:[du],serializer:_u},Zu={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:uc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[du],serializer:_u},el={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:mc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu],headerParameters:[du],serializer:_u},tl={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:pc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},queryParameters:[{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:[hu,fu],headerParameters:[du],serializer:_u},nl={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:dc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,fu,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[du],serializer:_u},rl={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:hc}},urlParameters:[hu],headerParameters:[du],serializer:_u},al={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},il={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:yc}},urlParameters:[hu],headerParameters:[du],serializer:_u},sl={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}}},urlParameters:[hu],headerParameters:[du],serializer:_u},ol={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:wc},404:{bodyMapper:To,isError:!0}},urlParameters:[hu],headerParameters:[du],serializer:_u},cl={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:bc},400:{bodyMapper:To,isError:!0}},requestBody:bu,urlParameters:[hu],headerParameters:[du,wu],mediaType:"json",serializer:_u},ul={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Eo},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u},ll={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:xc},400:{bodyMapper:To,isError:!0},404:{bodyMapper:To,isError:!0},410:{bodyMapper:To,isError:!0}},urlParameters:[hu,yu],headerParameters:[du],serializer:_u};function ml(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)}function pl(e,t){return e.get(hl(e,t))}function dl(e,t,n){return e.set(hl(e,t),n),n}function hl(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 fl=new WeakMap,yl=new WeakMap,gl=new WeakMap;class Nl extends xu{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){super(e,{allowInsecureConnection:!0,additionalPolicies:[Co("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0",t),bo(),xo(),Ao(n,r),So((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...a}),ml(this,fl,void 0),ml(this,yl,void 0),ml(this,gl,void 0),dl(fl,this,t),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=pl(yl,this)?pl(yl,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{dl(yl,this,t)}),(()=>{})),t}async _isHyperchain(){return null!=pl(gl,this)||dl(gl,this,this.getHyperchainContractPubkeys({requestOptions:{customHeaders:{"__no-retry":"true"}}}).then((()=>!0),(e=>{if("v3/hyperchain/contracts error: 404 status code"!==e.message)throw e;return!1}))),pl(gl,this)}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),a=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Kr[a]){const e=a.toString(),t=Object.values(Kr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString(),i=new ne("consensus protocol",e,n,r);if(!pl(fl,this))throw i;console.warn(i.message)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:a}}}function wl(e){const t=zs(e);switch(t.tag){case Xr.SignedTx:return wl(Ps(t.encodedTx));case Xr.GaMetaTx:return t.gaId}const n=As(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new D(`Transaction doesn't have nonce: ${Xr[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class vl{}class bl extends Error{constructor(e){super(e),this.name="TypeResolveError"}}var xl=bl;const _l=e=>({name:"bytes",size:e}),Sl=(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),Cl=(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),Al=e=>({name:"list",valuesType:e}),Pl=(e=[])=>({name:"tuple",valueTypes:e}),Tl=(e,t)=>({name:"record",keys:e,valueTypes:t}),zl=e=>({name:"set",valuesType:e}),Il=(e,t)=>({name:"map",keyType:e,valueType:t}),El=e=>({name:"variant",variants:e}),Ml=()=>El([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),ql=()=>El([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),Rl=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[_l()]}];return El(e)},Ol=e=>({name:"tvar",id:e});var kl=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,r=[],a=[];var i;if((i=e)&&"object"==typeof i&&i.constructor===Object&&([[n,r]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,r);return this.resolveType(e,t)}if("variant"!==n&&(a=this.resolveValueTypes(r,t)),"void"===n)return{name:"void"};if("unit"===n)return Pl([]);if("int"===n)return{name:"int"};if("bool"===n)return{name:"bool"};if("string"===n)return{name:"string"};if("bits"===n)return{name:"bits"};if("hash"===n)return{name:"hash"};if("signature"===n)return{name:"signature"};if("address"===n)return{name:"account_pubkey"};if("contract_pubkey"===n)return{name:"contract_pubkey"};if("Chain.ttl"===n)return Ml();if("Chain.ga_meta_tx"===n)return El([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.paying_for_tx"===n)return El([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.base_tx"===n)return El([{"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":[]}]);if("AENS.pointee"===n)return ql();if("AENSv2.pointee"===n)return Rl();if("AENS.name"===n)return(()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},ql())]}];return El(e)})();if("AENSv2.name"===n)return(()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},Ml(),Il({name:"string"},Rl())]}];return El(e)})();if("Set.set"===n)return zl(...a);if("MCL_BLS12_381.fr"===n)return{name:"bls12_381.fr"};if("MCL_BLS12_381.fp"===n)return{name:"bls12_381.fp"};if("bytes"===n)return _l("any"===r?void 0:r);if("list"===n)return Al(...a);if("map"===n)return Il(...a);if(("tuple"===n||"record"===n)&&1===a.length)return a[0];if("tuple"===n)return Pl(a);if("record"===n){const e=r.map((e=>e.name));return Tl(e,a)}if("variant"===n)return this.resolveVariant(r,t);if("option"===n)return(e=>El([{None:[]},{Some:e}]))(a);if("oracle"===n)return Sl(...a);if("oracle_query"===n)return Cl(...a);throw new xl("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),a=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:a}}));return El(n)}},Bl=class{constructor(){this._internalResolver=new kl}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}};class Ul extends Error{constructor(e){super(e),this.name="InternalError"}}var Gl=Ul,$l=(e,t)=>{if(!e)throw new Gl(t)},Vl=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,CONTRACT_BYTEARRAY:143,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});class Dl extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}var Ll=Dl;const jl={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_BYTES]:_l(),[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Sl(),[Vl.OTYPE_ORACLE_QUERY]:Cl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var Fl=class{createType(e){const t=e[0];if(t===Vl.TRUE||t===Vl.FALSE)return{name:"bool"};if((1&t)===Vl.SMALL_INT||t===Vl.POS_BIG_INT||t===Vl.NEG_BIG_INT)return{name:"int"};if((3&t)===Vl.SHORT_STRING||t===Vl.LONG_STRING||t===Vl.EMPTY_STRING)return{name:"string"};if((15&t)===Vl.SHORT_LIST||t===Vl.LONG_LIST)return Al();if((15&t)===Vl.SHORT_TUPLE||t===Vl.LONG_TUPLE||t===Vl.EMPTY_TUPLE)return Pl();if(t===Vl.MAP||t===Vl.EMPTY_MAP)return Il();if(t===Vl.POS_BITS||t===Vl.NEG_BITS)return{name:"bits"};if(t===Vl.VARIANT)return El();if(t===Vl.OBJECT){const t=e[1];return $l(jl.hasOwnProperty(t),`Unsupported object type "${t}"`),jl[t]}if(t===Vl.CONTRACT_BYTEARRAY)return{name:"contract_bytearray"};if(t===Vl.TYPE_INTEGER||t===Vl.TYPE_BOOLEAN||t===Vl.TYPE_LIST||t===Vl.TYPE_TUPLE||t===Vl.TYPE_OBJECT||t===Vl.TYPE_BITS||t===Vl.TYPE_MAP||t===Vl.TYPE_STRING||t===Vl.TYPE_VARIANT||t===Vl.TYPE_BYTES||t===Vl.TYPE_CONTRACT_BYTEARRAY||t===Vl.TYPE_VAR||t===Vl.TYPE_ANY)return{name:"type",type:undefined};throw new Ll(t)}},Hl=class{constructor(e){this.name=e}valueOf(){throw new Gl("Not implemented.")}accept(e){return e.visitData(this)}};class Jl extends Error{constructor(e){super(e),this.name="SerializerError"}}var Wl=Jl,Kl=class{constructor(e){this.globalSerializer=e}serialize(e){throw new Wl("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new Wl("Not implemented.")}};const Yl=e=>{const t=BigInt(e);return t<256n?new Uint8Array([Number(t)]):new Uint8Array([...Yl(t>>8n),Number(0xffn&t)])},Ql=e=>[...e].map((e=>e.toString(16).padStart(2,"0"))),Xl=e=>{if(0===e.length)return 0n;const t=Ql(e);return BigInt("0x"+t.join(""))},Zl=e=>Ql(e).join("");class em extends Error{constructor(e){super(e),this.name="FormatError"}}var tm=em;class nm extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}var rm=nm,am=class extends Hl{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(e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new tm(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))})(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new rm("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=Yl(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 rm(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}get type(){return _l(this._size)}valueOf(){return this._value}},im=class extends am{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}},sm=class extends im{constructor(e){super(e,"account_pubkey","ak")}get type(){return{name:"account_pubkey"}}},om=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ADDRESS,...Gi.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=Gi.decode(t.slice(2),!0);return[new sm(n.data),new Uint8Array(n.remainder)]}};function cm(e){return new Uint8Array(Gi.encode(Yl(e)))}function um(e){const t=Gi.decode(e,!0);return[Xl(t.data),t.remainder]}var lm=class extends Hl{constructor(e){super("bits"),this._value=BigInt(e)}get type(){return{name:"bits"}}get value(){return this._value}valueOf(){return this._value}},mm=e=>e>0?e:-1n*e,pm=class extends Kl{serialize(e){return[e.value>=0?Vl.POS_BITS:Vl.NEG_BITS,...cm(mm(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===Vl.POS_BITS?1n:-1n,[r,a]=um(t.slice(1));return[new lm(r*n),new Uint8Array(a)]}},dm=class extends Hl{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return{name:"bool"}}valueOf(){return this._value}},hm=class extends Kl{serialize(e){return!0===e.valueOf()?[Vl.TRUE]:[Vl.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],r=t.slice(1);if(n===Vl.TRUE)return[new dm(!0),r];if(n===Vl.FALSE)return[new dm(!1),r];throw new Ll(n)}},fm=class extends Hl{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return{name:"byte_array"}}valueOf(){return this._value}},ym=class extends Hl{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return{name:"int"}}valueOf(){return this._value}},gm=class extends Kl{serialize(e){const t=e instanceof ym?e.value:BigInt(e),n=mm(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[Vl.NEG_BIG_INT,...cm(n-64n)]:[Vl.POS_BIG_INT,...cm(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new ym(-((126&n)>>1)),t.slice(1)]:[new ym(n>>1),t.slice(1)];if(n===Vl.POS_BIG_INT||n===Vl.NEG_BIG_INT){const e=n===Vl.POS_BIG_INT?1n:-1n,[r,a]=um(t.slice(1));return[new ym((r+64n)*e),new Uint8Array(a)]}throw new Ll(n)}};const Nm=new gm;var wm=class extends Kl{serialize(e){return 0===e.length?[Vl.EMPTY_STRING]:e.length<64?[e.length<<2|Vl.SHORT_STRING,...e.valueOf()]:[Vl.LONG_STRING,...Nm.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===Vl.EMPTY_STRING)return[new fm,t.slice(1)];if(n===Vl.LONG_STRING){const[e,n]=Nm.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new fm(n.slice(0,r)),n.slice(r)]}const r=1+(n>>2);return[new fm(t.slice(1,r)),t.slice(r)]}};const vm=new wm;var bm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_BYTES,...vm.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=vm.deserializeStream(t.slice(2));return[new am(n.valueOf()),r]}},xm=class extends im{constructor(e){super(e,"channel","ch")}get type(){return{name:"channel"}}},_m=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CHANNEL,...Gi.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=Gi.decode(t.slice(2),!0);return[new xm(n.data),new Uint8Array(n.remainder)]}},Sm=class extends im{constructor(e){super(e,"contract_pubkey","ct")}get type(){return{name:"contract_pubkey"}}},Cm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_CONTRACT,...Gi.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=Gi.decode(t.slice(2),!0);return[new Sm(n.data),new Uint8Array(n.remainder)]}},Am=class extends Hl{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return{name:"void"}}valueOf(){return this._value}},Pm=class extends Kl{serialize(){return""}deserialize(){return new Am}deserializeStream(e){return[new Am,e]}},Tm=class extends Hl{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return Al(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}},zm=class extends Kl{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|Vl.SHORT_LIST,...t]:[Vl.LONG_LIST,...cm(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a,i,s=0n,o=n.slice(1);r===Vl.LONG_LIST&&([s,o]=um(n.slice(1)),s+=16n),(15&r)===Vl.SHORT_LIST&&(s=BigInt((240&r)>>4)),void 0!==t&&(a=t.valuesType);const c=[];for(let e=0n;e<s;e++)[i,o]=this.globalSerializer.deserializeStream(o,a),c.push(i);return 0n===s?[new Tm,o]:(void 0===t&&(a=c[0].type),[new Tm(a,c),o])}};const Im=e=>{const[t,n]=e;return{key:t,value:n}};var Em=class extends Hl{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=Il(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(Im)}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)}},Mm=class extends Hl{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?Pl(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)}},qm=class extends Hl{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 zl(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}},Rm=class extends Kl{serialize(e){return this.globalSerializer.serialize(new Em(e.itemsType,Pl(),e.items.map((e=>[e,new Mm]))))}deserializeStream(e,t){const n=Il(t.valuesType,Pl()),[r,a]=this.globalSerializer.deserializeStream(e,n);return[new qm(t.valuesType,r.keys),a]}};const Om=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=$m(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const a=n(e.items[r],t.items[r]);if(0!==a)return a}return e.length===t.length?0:-1},km=e=>{const t=$m(e);return(e,n)=>t(e.key,n.key)},Bm=(e,t)=>{const n=new Tm({name:"int"},e.valueOf()),r=new Tm({name:"int"},t.valueOf());return Om(n,r)},Um=(e,t)=>Number(BigInt(e)-BigInt(t)),Gm={int:Um,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),a=t.toString();return r.length===a.length?Bm(n.encode(e),n.encode(t)):r.length-a.length},bits:(e,t)=>e<0||t<0?-Um(e,t):Um(e,t),list:Om,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],a=$m(r)(e.items[n],t.items[n]);if(0!==a)return a}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new Tm(e.aritiesType,e.arities),a=new Tm(t.aritiesType,t.arities),i=$m(r)(r,a);if(0!==i)return i;const s=e.tag-t.tag;return 0!==s?s:$m(Pl())(new Mm(e.valueTypes,e.value),new Mm(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(km(e.keyType)),r.sort(km(t.keyType));const a=$m(e.keyType),i=$m(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=a(t.key,s.key);if(0!==o)return o;const c=i(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:Bm,account_pubkey:Bm,channel:Bm,contract_pubkey:Bm,oracle_query_id:Bm,oracle_pubkey:Bm},$m=e=>($l(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),$l(Gm.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),Gm[e.name]);var Vm=$m,Dm=class extends Kl{serialize(e){const t=e.length,n=Vm(e.keyType),r=[...e.items];r.sort(((e,t)=>n(e.key,t.key)));const a=r.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[Vl.MAP,...cm(t),...a.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];if(r!==Vl.MAP)throw new Ll(r);const[a,i]=um(n.slice(1));let s,o,c=i;if(0n===a)return[new Em,c];void 0!==t&&({keyType:s,valueType:o}=t);const u=[];for(let e=0n;e<a;e++){const[e,t]=this.globalSerializer.deserializeStream(c,s),[n,r]=this.globalSerializer.deserializeStream(t,o);u.push([e,n]),c=r}const l=u[0];return void 0===t&&(s=l[0].type,o=l[1].type),[new Em(s,o,u),c]}},Lm=class extends im{constructor(e){super(e,"oracle_query_id","oq")}get type(){return Cl()}},jm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE_QUERY,...Gi.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=Gi.decode(t.slice(2),!0);return[new Lm(n.data),new Uint8Array(n.remainder)]}},Fm=class extends im{constructor(e){super(e,"oracle_pubkey","ok")}get type(){return Sl()}},Hm=class extends Kl{serialize(e){return[Vl.OBJECT,Vl.OTYPE_ORACLE,...Gi.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=Gi.decode(t.slice(2),!0);return[new Fm(n.data),new Uint8Array(n.remainder)]}};const Jm=e=>e instanceof Uint8Array?(new TextDecoder).decode(e):e.toString(),Wm=e=>"string"==typeof e?(new TextEncoder).encode(e):e;var Km=class extends Hl{constructor(e){super("string"),this._value=Wm(e)}get type(){return{name:"string"}}toString(){return Jm(this._value)}toBytes(){return this._value}valueOf(){return(e=>{const t=Wm(Jm(e));return Xl(e)===Xl(t)})(this._value)?this.toString():this._value}};const Ym=new wm;var Qm=class extends Kl{serialize(e){let t=e.valueOf();return"string"==typeof t&&(t=(new TextEncoder).encode(t)),Ym.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==Vl.SHORT_STRING&&![Vl.EMPTY_STRING,Vl.LONG_STRING].includes(n))throw new Ll(n);const[r,a]=Ym.deserializeStream(t);return[new Km(r.valueOf()),a]}},Xm=class extends Kl{serialize(e){const t=e.size;if(0===t)return[Vl.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|Vl.SHORT_TUPLE,...n]:[Vl.LONG_TUPLE,...cm(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a=0n,i=n.slice(1);if(r===Vl.EMPTY_TUPLE)return[new Mm,i];(15&r)===Vl.SHORT_TUPLE&&(a=(240&r)>>4),r===Vl.LONG_TUPLE&&([a,i]=um(n.slice(1)),a+=16n);let s=[];void 0!==t&&(s=t.valueTypes);const o=[];let c=null;for(let e=0n;e<a;e++)[c,i]=this.globalSerializer.deserializeStream(i,s[e]),o.push(c);let u=t;return void 0===t&&(u=o.map((e=>e.type))),[new Mm(u,o),i]}},Zm=class extends Hl{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=El(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return{name:"int"}}get variantType(){return Pl(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)}},ep=class extends Kl{serialize(e){const t=new Mm(e.valueTypes,e.value);return[Vl.VARIANT,...Gi.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),r=Gi.decode(n.slice(1),!0),a=[...r.data],i=r.remainder[0],s=r.remainder.slice(1);let o,c=[];void 0!==t&&void 0!==t.variants&&(c=t.variants,o=Pl(Object.values(c[i])[0]));const[u,l]=this.globalSerializer.deserializeStream(s,o);return[new Zm(a,i,u.items,u.valueTypes,c),l]}},tp=class extends Hl{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new rm(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new rm(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}},np=class extends tp{constructor(e){super(e,32,"bls12_381.fr")}get type(){return{name:"bls12_381.fr"}}accept(e){return e.visitBls12381Fr(this)}},rp=class extends tp{constructor(e){super(e,48,"bls12_381.fp")}get type(){return{name:"bls12_381.fp"}}accept(e){return e.visitBls12381Fp(this)}};const ap=new bm,ip=(e,t)=>{switch(e.name){case"bls12_381.fr":return new np(t);case"bls12_381.fp":return new rp(t);default:throw new Error(`Unsupported type "${e.name}"`)}};var sp=class extends Kl{serialize(e){return ap.serialize(e)}deserializeStream(e,t){const[n,r]=ap.deserializeStream(e);return[ip(t,n.valueOf()),r]}},op=class extends Hl{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)}},cp=class extends Kl{serialize(e){const t=new fm(e.functionId),n=new Mm(e.argTypes,e.args),r=new Mm([t.type,n.type],[t,n]);return this.globalSerializer.serialize(r)}deserialize(e,t){const n=Pl([{name:"byte_array"},Pl(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,i]=r.items;return new op(a.valueOf(),i.valueTypes,i.items)}};const up={[Vl.TYPE_INTEGER]:{name:"int"},[Vl.TYPE_BOOLEAN]:{name:"bool"},[Vl.TYPE_BITS]:{name:"bits"},[Vl.TYPE_STRING]:{name:"string"},[Vl.TYPE_ANY]:{name:"any"}},lp={[Vl.OTYPE_ADDRESS]:{name:"account_pubkey"},[Vl.OTYPE_CONTRACT]:{name:"contract_pubkey"},[Vl.OTYPE_ORACLE]:Sl(),[Vl.OTYPE_ORACLE_QUERY]:Cl(),[Vl.OTYPE_CHANNEL]:{name:"channel"}};var mp=class extends Kl{constructor(e){super(e),this._intSerializer=new gm}serialize(e){const t=Object.entries(up).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries(lp).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([Vl.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([Vl.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([Vl.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([Vl.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([Vl.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([Vl.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([Vl.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new rm(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(up.hasOwnProperty(n))return[up[n],t.slice(1)];if(n===Vl.TYPE_OBJECT){const e=t[1];if(!lp.hasOwnProperty(e))throw new Ll(e,"Unsupported object type");return[lp[e],t.slice(2)]}if(n===Vl.TYPE_VAR)return[Ol(t[1]),t.slice(2)];if(n===Vl.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[_l(e.valueOf()),n]}if(n===Vl.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[Al(e),n]}if(n===Vl.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,a]=this.deserializeStream(n);return[Il(e,r),a]}if(n===Vl.TYPE_TUPLE){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[Pl(n),a]}if(n===Vl.TYPE_VARIANT){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[El(n),a]}throw new Ll(n)}},pp=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}});const dp={3:"immediate",2:"var",1:"arg",0:"stack"};var hp=class extends Kl{constructor(e){super(e),this._typeSerializer=new mp}deserialize(e){const t=Gi.decode(e,!0),n=Gi.decode(t.remainder,!0),r=Gi.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(r)}}deserializeFunctions(e,t){let n={},r=e;const a=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),a.push(n);return a}deserializeFunction(e,t){const n=e[0],r=Zl(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const a=t[r],[i,s]=this.deserializeAttributes(e.slice(5)),[o,c,u]=this.deserializeSignature(s),[l,m]=this.deserializeInstructions(u);return[{id:r,name:a,attributes:i,args:o,returnType:c,instructions:l},m]}deserializeInstructions(e){let t={},n=e;const r=[];let a=0,i=!1;for(;n.length&&254!==n[0];)void 0===r[a]&&(r[a]=[]),[t,n,i]=this.deserializeInstruction(n),r[a].push(t),i&&a++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!pp.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=pp[t],{mnemonic:a,end:i}=r;if(0===r.args)return[{mnemonic:a,args:[]},n,i];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:a,args:s},o,i]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),a=e.slice(n),i=((e,t=1)=>{const n=[];let r=Number(Xl(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),s=[];let o,c=a;return i.forEach((e=>{[o,c]=this.deserializeArgument(e,c),s.push(o)})),[s,c]}deserializeArgument(e,t){const n=dp[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,a]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},a]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,a]=this._typeSerializer.deserializeStream(n);return[t,r,a]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),a=[];return 1&r&&a.push("private"),2&r&&a.push("payable"),[a,n]}deserializeSymbols(e){const t=Il({name:"byte_array"},{name:"string"}),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=Zl(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}},fp=class extends Kl{constructor(e){super(),this._bytecodeSerializer=new hp(e),this._intSerializer=new gm}deserializeStream(e){const t=new Uint8Array(e),[n,r]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),i=Gi.decode(r.slice(0,a)),s=new TextDecoder;return[{tag:Xl(i[0]),vsn:Xl(i[1]),sourceHash:Zl(i[2]),aevmTypeInfo:i[3],bytecode:this._bytecodeSerializer.deserialize(i[4]),compilerVersion:s.decode(i[5]),payable:Boolean(i[6][0])},r.slice(a)]}},yp=class extends Kl{constructor(){super(),this.typeFactory=new Fl,this._serializers={void:new Pm,bool:new hm,int:new gm,tuple:new Xm(this),record:new Xm(this),list:new zm(this),set:new Rm(this),map:new Dm(this),byte_array:new wm,string:new Qm,hash:new bm,signature:new bm,bits:new pm,variant:new ep(this),bytes:new bm,account_pubkey:new om,contract_pubkey:new Cm,oracle_pubkey:new Hm,oracle_query_id:new jm,channel:new _m,"bls12_381.fr":new sp,"bls12_381.fp":new sp,calldata:new cp(this),contract_bytearray:new fp(this),type:new mp}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new Wl("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new Wl("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new Wl("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof Hl))throw new Wl("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new Wl("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new Wl("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 Wl("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}},gp=n(2861);const Np=e=>(new lr).update(e).digest(),wp=e=>Np(Np(e)).slice(0,4),vp=e=>{const t=gp.Buffer.from(e),n=wp(e);return gp.Buffer.concat([t,n],t.length+4)},bp=e=>{const t=gp.Buffer.from(e),n=t.slice(0,-4),r=t.slice(-4),a=wp(n);if(!r.equals(a))throw new tm("Invalid checksum");return new Uint8Array(n)},xp=e=>vp(e).toString("base64"),_p=e=>{const t=gp.Buffer.from(e,"base64");return bp(t)},Sp=e=>ur.encode(vp(e)),Cp=e=>bp(ur.decode(e)),Ap={key_block_hash:{tag:"kh",size:32,encoder:s},micro_block_hash:{tag:"mh",size:32,encoder:s},block_pof_hash:{tag:"bf",size:32,encoder:s},block_tx_hash:{tag:"bx",size:32,encoder:s},block_state_hash:{tag:"bs",size:32,encoder:s},contract_bytearray:{tag:"cb",size:0,encoder:i},contract_pubkey:{tag:"ct",size:32,encoder:s},account_pubkey:{tag:"ak",size:32,encoder:s},account_seckey:{tag:"sk",size:32,encoder:s},channel:{tag:"ch",size:32,encoder:s},oracle_pubkey:{tag:"ok",size:32,encoder:s},oracle_query_id:{tag:"oq",size:32,encoder:s},peer_pubkey:{tag:"pp",size:32,encoder:s},name:{tag:"nm",size:0,encoder:s},tx_hash:{tag:"th",size:32,encoder:s},signature:{tag:"sg",size:64,encoder:s},commitment:{tag:"cm",size:32,encoder:s},bytearray:{tag:"ba",size:0,encoder:i}},Pp={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",sk:"account_seckey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};var Tp=class{encode(e,t){if(!Ap.hasOwnProperty(e))throw new rm(e,`Unsupported API type ${e}`);const n=Ap[e];if(n.size>0&&t.length!==n.size)throw new rm(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(!Pp.hasOwnProperty(t))throw new tm(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new tm(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=Ap[Pp[t]],r=e.substring(3),a=n.encoder.decode(r);if(n.size>0&&a.length!==n.size)throw new tm(`Invalid API data format. Expected size ${n.size}, but got ${a.length}`);return a}decodeWithType(e,t){const n=e.substring(0,2);if(!Ap.hasOwnProperty(t))throw new rm(t,"Unsupported API type");const r=Ap[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new rm(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)}};const zp={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},Ip=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,a]=Ip(t,e%t);return[r,n-r*(e/t),a]},Ep=(e,t)=>{const n=zp[t],r=BigInt(e)*n.R%n.N;return Yl(r)},Mp=(e,t)=>{const n=zp[t],r=(e=>{const t=Ql(e).reverse();return BigInt("0x"+t.join(""))})(e),a=((e,t)=>{const[n,r,a]=Ip(e,t);return(n+t)%t})(n.R,n.N);return r*a%n.N};var qp=class{constructor(){this._apiEncoder=new Tp}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 Mp(e.valueOf(),"r")}visitBls12381Fp(e){return Mp(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:Zl(t),args:n.map((e=>e.accept(this)))}}},Rp=class extends am{constructor(e){super(e,32,"hash")}},Op=class extends am{constructor(e){super(e,64,"signature")}},kp=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.")}};const Bp=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];var Up=class extends kp{supports({name:e,_valueTypes:t}){return Bp.includes(e)}create(e,t){switch(e.name){case"int":return new ym(t);case"bool":return new dm(t);case"string":return new Km(t);case"bits":return new lm(t);case"hash":return new Rp(t);case"bytes":return new am(t,e.valueTypes);case"signature":return new Op(t);case"account_pubkey":return new sm(t);case"contract_pubkey":return new Sm(t);case"channel":return new xm(t);case"oracle_pubkey":return new Fm(t);case"oracle_query_id":return new Lm(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},Gp=class extends kp{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new Tm(e.valuesType,n)}},$p=class extends kp{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 qm(e.valuesType,n)}},Vp=class extends kp{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 Em(e.keyType,e.valueType,n)}},Dp=class extends kp{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new rm(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 Mm(e.valueTypes,n)}},Lp=class extends kp{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new rm(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new rm(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const a=e.keys[r];return this.valueFactory.create(n,t[a])}));return 1===r.length?r[0]:new Mm(Tl(e.keys,e.valueTypes),r)}};const jp=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];var Fp=class extends kp{supports({name:e,_valueTypes:t}){return jp.includes(e)}create(e,t){if(!this.isValid(t))throw new rm(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,r]=Object.entries(t)[0],a=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),i=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===i)throw new rm(e.name,`Unknown variant constructor: ${n}`);const[[,s]]=Object.entries(e.variants[i]);if(r.length!==s.length)throw new rm(e.name,`"${n}" variant constructor expects ${s.length} argument(s) but got ${r.length} instead`);const o=this.valueFactory.createMultiple(s,r);return new Zm(a,i,o,s,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}};const Hp=e=>Array.from(or.blake2b(e,null,32)),Jp=["string","signature","bytes"];var Wp=class extends kp{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[r,...a]=t;if("bigint"!=typeof r)throw new xl(`Event name hash (first topic) should be of type "BigInt", got "${typeof r}" instead.`);const i=e.variants.map((e=>Xl(Hp(Object.keys(e)[0])))).findIndex((e=>e===r));if(-1===i)throw new xl("Event name hash does not match any event variant constructor");const s=e.variants[i],o=Object.keys(s)[0],[c]=Object.values(s),u=c.map((e=>this._isData(e)?n:a.shift()));return this.valueFactory.create(e,{[o]:u})}_isData(e){return!(!Jp.includes(e.name)||"bytes"===e.name&&e.size<=32)}};const Kp=["bls12_381.fr","bls12_381.fp"];var Yp=class extends kp{supports({name:e,_valueTypes:t}){return Kp.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new np(t);case"bls12_381.fp":return new rp(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},Qp=class extends kp{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new rm(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),r=(a=e.functionName,Hp(a).slice(0,4));var a;return new op(r,e.argumentTypes,n)}},Xp=class{constructor(){this._factories=[new Up(this),new Gp(this),new $p(this),new Vp(this),new Dp(this),new Lp(this),new Wp(this),new Fp(this),new Yp(this),new Qp(this)]}createMultiple(e,t){return $l(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),((e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e]))))(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return $l(n,`Unsupported type "${e.name}"`),n.create(e,t)}},Zp=class{constructor(){this._apiEncoder=new Tp}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 rm("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 rm("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 rm(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),Ep(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),Ep(t,"p")}},ed=class extends Xp{constructor(){super(),this._mapper=new Zp}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}},td=class{constructor(){this._serializer=new yp,this._apiEncoder=new Tp,this._externalDataFactory=new ed,this._canonicalMapper=new qp}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),a=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",a)}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)}},nd=class{constructor(){this._internalEncoder=new td}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)}},rd=n(2341),ad=n.n(rd);function id(e){var t;return Mr(null!==(t=ad()(e))&&void 0!==t?t:"")}function sd(e){const t=(new Bl).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return Mr(Sr((new nd).encodeWithType(e,t)))}function od(e,t,n){return Mr(Zn([kr,new Uint8Array([0]),sd(n),id(t),Mr(Sr(e))]))}var cd=n(8287).Buffer;function ud(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")}function ld(e,t,n){const r=[t];n&&r.push("inner_tx");const a=Sr(e);return Zn([cd.from(r.join("-")),Mr(a)])}var md=new WeakMap;class pd extends vl{constructor(e){super(),function(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)}(this,md,void 0),this.secretKey=e;const t=sr().sign.keyPair.fromSeed(Sr(e));var n,r;n=md,r=t.secretKey,n.set(ud(n,this),r),this.address=Cr(t.publicKey,cr.AccountAddress)}static generate(){const e=Cr(sr().randomBytes(32),cr.AccountSecretKey);return new pd(e)}async sign(e,t){return this.unsafeSign(e,t)}async unsafeSign(e,t){return sr().sign.detached(cd.from(e),(n=md).get(ud(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new j("networkId","provided",n);const a=Sr(e),i=ld(e,n,!0===t),s=[await this.unsafeSign(i,r)];return Ps({tag:Xr.SignedTx,encodedTx:a,signatures:s})}async signMessage(e,t){return this.unsafeSign(Br(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:a,contractAddress:i,...s}={}){const o=od(e,t,{name:n,version:r,networkId:a,contractAddress:i});return Cr(await this.unsafeSign(o,s),cr.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new j("networkId","provided",t);const n=Zn([kr,new Uint8Array([1]),cd.from(t),Sr(e)]);return Cr(await this.unsafeSign(n),cr.Signature)}}function dd(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:a}={}){const i=zs(e);if(i.tag===Xr.SignedTx)throw new F("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in i&&"freeloader"!==t&&(s+=BigInt(i.fee)),i.tag===Xr.NameClaimTx&&(s+=BigInt(i.nameFee)),i.tag===Xr.OracleQueryTx&&(s+=BigInt(i.queryFee)),i.tag===Xr.OracleRespondTx&&(s-=BigInt(null!=r?r:0)),i.tag===Xr.ChannelSettleTx&&(!0===a&&(s-=BigInt(i.initiatorAmountFinal)),!1===a&&(s-=BigInt(i.responderAmountFinal))),i.tag!==Xr.SpendTx&&i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(i.amount)),i.tag===Xr.ContractCreateTx&&(s+=BigInt(i.deposit)),i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.GaAttachTx&&i.tag!==Xr.GaMetaTx||"freeloader"===t||(s+=BigInt(i.gasPrice)*BigInt(null!=n?n:i.gasLimit)),i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s+=dd(Ps(i.tx.encodedTx),i.tag===Xr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function hd(e,t,n){const r=zs(e,Xr.SignedTx);if(r.encodedTx.tag===Xr.GaMetaTx)return dd(Ps(r.encodedTx),n);const a=Ps(r.encodedTx),i=wl(a),[s,o]=[!0,!1].map((e=>qr(ld(a,t,e),r.signatures[0],i)));if(!s&&!o)throw new D("Can't verify signature");return dd(Ps(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function fd(e,t,{isMined:n,...r}={}){let a=zs(e);const i=a.tag===Xr.SignedTx,s=i&&!0===n&&Is(e);if(a.tag===Xr.SignedTx&&(a=a.encodedTx),null==r.gasUsed&&!1!==s&&[Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(a.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),a=null!=e?e:n;if(null==a)throw new ae(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=a.gasUsed}if(null==r.queryFee&&Xr.OracleRespondTx===a.tag&&(r.queryFee=(await t.getOracleByPubkey(a.oracleId)).queryFee.toString()),null==r.isInitiator&&Xr.ChannelSettleTx===a.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(a.channelId);r.isInitiator=a.fromId===e}return i?hd(e,await t.getNetworkId(),r):dd(e,r)}var yd=n(8287).Buffer;const gd=[];async function Nd(e,t,n){const r=wl(Ps(e)),[a,{height:i},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!nr(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(gd.map((async r=>r(e,{node:t,account:a,height:i,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function wd(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new Nl(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[_o()]});return r._getCachedStatus=async()=>t._getCachedStatus(),Nd(zs(e),r,[])}gd.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Xr.SignedTx)return[];const{encodedTx:a,signatures:i}=e;if(null==(null!=a?a:i))return[];if(1!==i.length)return[];const s=yd.from([n,...r.includes(Xr.PayingForTx)?["inner_tx"]:[]].join("-")),o=Sr(Ps(a)),c=Zn([s,o]),u=Zn([s,Mr(o)]);return qr(c,i[0],t.id)||qr(u,i[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?[]:Nd(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 a=await fd(Ps(e),r).catch((()=>0n));return a<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${a}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Xr.SpendTx||zr(e.recipientId,cr.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!nr(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===Xr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Xr.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 a=Xr.OracleRegisterTx===e.tag,i=Xr.ContractCreateTx===e.tag||Xr.GaAttachTx===e.tag,s=Xr.ContractCallTx===e.tag||Xr.GaMetaTx===e.tag,o=null!==(n=null!==(r=a?"oracle-call":null)&&void 0!==r?r:i?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=ka[t][o];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)||i&&!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(Xr.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 Un)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class vd extends D{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function bd(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:a=!0,confirm:i,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:Is(c),rawTx:c};if(r){const e=await wd(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new vd(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(a){const e=await Na(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=i&&+i>0){const e="boolean"==typeof i?void 0:i;return{...n,confirmationHeight:await va(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw rr(e),Object.assign(e,{rawTx:c,verifyTx:async()=>wd(c,t)})}}var xd=n(8287).Buffer;const _d=e=>xd.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Sd=e=>xd.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),Cd=e=>{var t;return _d(null!==(t=ad()(e))&&void 0!==t?t:"")},Ad="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function Pd(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:_d(Sr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${Ad}.${Cd(n)}`,a=await t.unsafeSign(r);return`${r}.${_d(a)}`}function Td(e,t){var n;const r=e.split(".");if(3!==r.length)throw new j("JWT components count",3,r.length);const[a,i,s]=r;if(a!==Ad)throw new j("JWT header",Ad,a);const o=JSON.parse(Sd(i).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Cr(Sd(c.x),cr.AccountAddress);if(null!=t&&u!==t)throw new j("address",`${u} ("sub_jwk")`,t);if(null!=u&&!qr(xd.from(`${a}.${i}`),Sd(s),u))throw new Fe(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function zd(e){try{return Td(e),!0}catch(e){return!1}}function Id(e){Td(e)}function Ed(e,t){try{const{signer:n}=Td(e,t);return null!=n}catch(e){return!1}}let Md=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 qd=La(cr.OracleAddress),Rd={serialize(e){return qd.serialize(Cr(Sr(e),cr.OracleAddress))},deserialize(e){return Cr(Sr(qd.deserialize(e)),cr.OracleQueryId)}},Od=La(cr.ContractAddress),kd=[{tag:_i(Md.AensWildcard),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Od},{tag:_i(Md.AensName),version:_i(1,!0),accountAddress:La(cr.AccountAddress),nameId:di,contractAddress:Od},{tag:_i(Md.AensPreclaim),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Od},{tag:_i(Md.Oracle),version:_i(1,!0),accountAddress:La(cr.AccountAddress),contractAddress:Od},{tag:_i(Md.OracleResponse),version:_i(1,!0),queryId:Rd,contractAddress:Od}];function Bd(e){return Di(kd,Md,e,{},cr.Bytearray)}function Ud(e,t){return Li(kd,Md,e,t,{})}function Gd(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")}class $d extends re{constructor(e,t){super(`Can't ${t} because ${e} is not an auction name`),this.name="NotAuctionNameError"}}var Vd=new WeakMap;class Dd{constructor(e,t){var n,r,a;a=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=Vd),r.set(n,a),this.value=e,this.options=t,this.options=t}get id(){return aa(this.value)}async revoke(e={}){const t={...this.options,...e};return bd(await Ts({_isInternalBuild:!0,...t,tag:Xr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},a={...!0===n&&Object.fromEntries((await r.onNode.getNameEntryByName(this.value)).pointers.map((({key:e,id:t})=>[e,t]))),...e},i=Object.values(a).some((e=>zr(e,cr.Bytearray))),s=await Ts({_isInternalBuild:!0,...r,tag:Xr.NameUpdateTx,version:i?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(a).map((([e,t])=>({key:e,id:t})))});return bd(s,r)}async transfer(e,t={}){const n={...this.options,...t};return bd(await Ts({_isInternalBuild:!0,...n,tag:Xr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async getAuctionState(e={}){var t;if(!ha(this.value))throw new $d(this.value,"get auction state");const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getAuctionEntryByName(this.value);return{...r,id:r.id,highestBidder:r.highestBidder}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return bd(await Ts({_isInternalBuild:!0,nameSalt:(n=Vd,n.get(Gd(n,this))),...t,tag:Xr.NameClaimTx,accountId:t.onAccount.address,name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Ir(),r=await Ts({_isInternalBuild:!0,...t,tag:Xr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:ia(this.value,n)}),a=await bd(r,t);var i,s;return s=n,(i=Vd).set(Gd(i,this),s),{...a,nameSalt:n}}async bid(e,t={}){if(!ha(this.value))throw new $d(this.value,"make a bid");const n={...this.options,...t};return bd(await Ts({_isInternalBuild:!0,...n,tag:Xr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}const Ld=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};var jd=class extends kl{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(Ld);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new xl(`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 xl(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new xl("Missing event declaration");return((e,t)=>({name:"event",variantType:e,topics:t}))(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 xl("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const i=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!i)throw new xl("Unknown type definition: "+JSON.stringify(e));const s={};return i.vars.forEach(((e,n)=>{const[[r,a]]=Object.entries(e);s[a]=t[n]})),[s.hasOwnProperty(i.typedef)?s[i.typedef]:i.typedef,s]}},Fd=class{constructor(){this._dataFactory=new Xp,this._apiEncoder=new Tp,this._canonicalMapper=new qp}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}};class Hd extends Error{constructor(e){super(e),this.name="EncoderError"}}var Jd=Hd,Wd=class{constructor(e){this._byteArrayEncoder=new td,this._typeResolver=new jd(e),this._apiEncoder=new Tp,this._eventEncoder=new Fd,this._canonicalMapper=new qp}encode(e,t,n){const{types:r,required:a}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<a)throw new Jd(`Non matching number of arguments. ${t} expects between ${a} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode({name:"calldata",functionName:t,argumentTypes: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,{name:"string"})}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}},Kd=class{constructor(e){this._internalEncoder=new Wd(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)}};function Yd(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Qd(e,t){return e.get(Xd(e,t))}function Xd(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 Zd=new WeakSet,eh=new WeakMap;function th({returnType:e,returnValue:t,log:n},r,a,i){let s;switch(e){case"ok":{const e=Xd(Zd,this,rh).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,i)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=Sr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new xe("ACI",`. Error provided by node: "${s}".`);if(/Trying to call undefined function: <<\d+,\d+,\d+,\d+>>/.test(s))throw new xe("ACI",`. Error provided by node: "${s}", function name: ${r}.`);break;default:throw new ae(`Unknown return type: ${e}`)}throw new ze(s,a)}async function nh(e,t,n){const r=await bd(e,{...this.$options,...n});return{hash:r.hash,tx:zs(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function rh(e){const t=Qd(eh,this).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 Ie(e)}function ah(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const a=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),i=a.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${Mr(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(i.length){case 0:throw new Me(t.toString(),e);case 1:return i[0][0];default:throw new qe(e,i)}}const ih=class{async $compile(){if(null!=this.$options.bytecode)return this.$options.bytecode;if(null==this.$options.onCompiler)throw new F("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 F("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 G(`callInfo is not available for transaction ${e}`);const a=r;return{...Xd(Zd,this,th).call(this,a,t,void 0,n),result:a}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:a}=r;return Math.floor(1.25*a)}async $deploy(e,t){var n;const{callStatic:r,...a}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...a,callStatic:r});if(null!=this.$options.address)throw new _e;if(null==a.onAccount)throw new F("Can't deploy without account");const i=a.onAccount.address;if(null==this.$options.bytecode)throw new F("Can't deploy without bytecode");const s=await Ts({_isInternalBuild:!0,...a,tag:Xr.ContractCreateTx,gasLimit:null!==(n=a.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,a),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:i}),{hash:o,...c}=await Xd(Zd,this,nh).call(this,s,"init",{...a,onAccount:a.onAccount});return this.$options.address=Es(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,a)},owner:i,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:a,top:i,...s}={...this.$options,...n},o=Xd(Zd,this,rh).call(this,e),{address:c,name:u}=this.$options,l=null!=u?aa(u):c,{onNode:m}=s;if(null==e)throw new Te;if("init"===e&&!0!==a)throw new Ce('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Ee(s.amount,e);let p;try{if(null==s.onAccount)throw new ae("Use fallback account");p=s.onAccount.address}catch(e){if(!0!==a||!(e instanceof X&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof Qe||e instanceof ae&&"Use fallback account"===e.message))throw e;p=Vr.pub}const d=this._calldata.encode(this._name,e,t);if(!0===a){if(null==s.nonce){const e=null!=i&&{["number"==typeof i?"height":"hash"]:i},t=await ba(p,{...e,onNode:m}).catch((e=>{if(!nr(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:m,callData:d};let n;if("init"===e){if(null==this.$options.bytecode)throw new F('Can\'t dry-run "init" without bytecode');n=await Ts({...t,tag:Xr.ContractCreateTx,code:this.$options.bytecode,ownerId:p})}else{if(null==l)throw new Ae("Can't dry-run contract without address");n=await Ts({...t,tag:Xr.ContractCallTx,callerId:p,contractId:l})}const{callObj:r,...a}=await Ia(n,p,{...s,top:i});if(null==r)throw new ae(`callObj is not available for transaction ${n}`);const o=r;return{...a,...Xd(Zd,this,th).call(this,o,e,n,s),tx:zs(n),result:o,rawTx:n,hash:Is(n),txData:void 0}}if(null!=i)throw new F("Can't handle `top` option in on-chain contract call");if(null==l)throw new Ae("Can't call contract without address");const h=await Ts({_isInternalBuild:!0,...s,tag:Xr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:p,contractId:l,callData:d});if(null==s.onAccount)throw new F("Can't call contract on chain without account");return Xd(Zd,this,nh).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Xd(Zd,this,ah).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Me)return null;throw e}const a=this._calldata.decodeEvent(r,e.data,e.topics),[i,s]=Object.entries(a)[0];return{name:i,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:a,sourceCodePath:i,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;null!=i&&(t=await e.compile(i)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!=n||(n=t.bytecode))}if(null==r)throw new Pe;let l;if(null!=a&&ca(a=await Ra(a,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(l=a),null==a&&null==s&&null==i&&null==n)throw new Ae("Can't create instance by ACI without address");if(null!=a&&null==(await t.getContract(a)).active)throw new Se(a);if(!0===c){if(null==a)throw new Ae("Can't validate bytecode without contract address");const r=(await t.getContractCode(a)).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=i){if(null==e)throw new F("Can't validate bytecode without compiler");c=await e.validate(r,i)}if(!c)throw new xe(null!=(null!=s?s:i)?"source code":"bytecode")}return new ih({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:i,bytecode:n,aci:r,address:a,name:l,fileSystem:o,...u})}constructor({aci:e,...t}){var n;Yd(this,n=Zd),n.add(this),function(e,t){Yd(e,t),t.set(e,void 0)}(this,eh),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new F(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Xd(e,t),n)}(eh,this,r.contract),this._name=Qd(eh,this).name,this._calldata=new Kd(e),this.$options=t,Object.assign(this,Object.fromEntries(Qd(eh,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const a=n.length===t.length+1?n.pop():{};if("object"!=typeof a)throw new X(`Options should be an object: ${a}`);return"init"===e?this.$deploy(n,{callStatic:r,...a}):this.$call(e,n,{callStatic:r,...a})}]}))))}};var sh=ih;function oh(e){return{...e,id:e.id,decodedQuery:Sr(e.query).toString(),decodedResponse:Sr(e.response).toString()}}class ch{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQueries(e={}){const t={...this.options,...e};return(await t.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries.map(oh)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return oh(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function uh(e,t,n){return e.set(mh(e,t),n),n}function lh(e,t){return e.get(mh(e,t))}function mh(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 ph=new WeakMap;class dh extends ch{constructor(e,t){var n,r,a;super(Cr(Sr(e.address),cr.OracleAddress),t),a=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=ph),r.set(n,a),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return bd(await Ts({_isInternalBuild:!0,...r,tag:Xr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return bd(await Ts({_isInternalBuild:!0,...t,tag:Xr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let a=!1;const i=async()=>{if(a)return;a=!0;const i=(await this.getQueries(n)).filter((({id:e})=>!r.has(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));i.forEach((e=>r.add(e.id))),a=!1,await Promise.all(i.map((t=>e(t))))};i();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await fa("micro-block",n);return setInterval((async()=>i()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return bd(await Ts({_isInternalBuild:!0,...r,tag:Xr.OracleRespondTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=lh(ph,this))throw new re("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const a=async t=>{const a=await e(t),i=r.then((async()=>this.respondToQuery(t.id,a,n)));r=i.then((()=>{}),(()=>{})),await i};uh(ph,this,Promise.resolve());const i=this.pollQueries((async e=>{const t=a(e);if(null==lh(ph,this))throw new ie;return uh(ph,this,lh(ph,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{i(),await lh(ph,this),uh(ph,this,void 0)}}}class hh extends ch{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,a=await Ts({_isInternalBuild:!0,...n,tag:Xr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:i}=zs(a,Xr.OracleQueryTx);return{...await bd(a,n),queryId:ta(r,i,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},a=null!==(n=r.interval)&&void 0!==n?n:await fa("micro-block",r);let i,s,o;do{({response:o,ttl:s}=await this.getQuery(e,r));const t=Sr(o);if(t.length>0)return t.toString();await Qn(a),i=await ga({...r,cached:!0})}while(s>=i);throw new Y(i)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function fh(e,t,n){return bd(await Ts({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:n.onAccount.address,recipientId:await Ra(t,"account_pubkey",n),amount:e}),n)}async function yh(e,t,n){if(+e<0||+e>1)throw new j("fraction","a number between 0 and 1",e);const r=await Ra(t,"account_pubkey",n),a=n.onAccount.address,i=new E(await xa.bind(n.onAccount)(a,n)),s=i.times(e).integerValue(E.ROUND_HALF_UP),{fee:o}=zs(await Ts({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:s}),Xr.SpendTx),c=s.plus(o).gt(i)?i.minus(o):s;return bd(await Ts({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:c}),n)}async function gh(e,t){return bd(await Ts({_isInternalBuild:!0,...t,tag:Xr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var Nh=n(8287).Buffer;async function wh(e,t,{onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var m;const p=n.address;if("generalized"===(await ba(p,{onNode:a})).kind)throw new F(`Account ${p} is already GA`);const d=await sh.initialize({onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await Ts({_isInternalBuild:!0,...l,tag:Xr.GaAttachTx,onNode:a,code:await d.$compile(),gasLimit:null!==(m=l.gasLimit)&&void 0!==m?m:await d._estimateGas("init",t,l),ownerId:p,callData:d._calldata.encode(d._name,"init",t),authFun:Mr(e)}),{hash:f,rawTx:y}=await bd(h,{onNode:a,onAccount:n,onCompiler:r,...l}),g=Es(y);return Object.freeze({owner:p,transaction:f,rawTx:y,gaContractId:g})}async function vh(e,{fee:t,gasPrice:n,onNode:r}){const{nodeNetworkId:a,consensusProtocolVersion:i}=await r.getNodeInfo();let s=Mr(Zn([Nh.from(a),Sr(e)]));if(i===Kr.Ceres){if(null==t)throw new j("fee","provided (in Ceres)",t);if(null==n)throw new j("gasPrice","provided (in Ceres)",n);s=Mr(Sr(Ss({tag:Ei.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Cr(s,cr.TxHash)})))}return s}async function bh(e,{onNode:t}){const n=zs(e,Xr.SignedTx);if(n.encodedTx.tag!==Xr.GaMetaTx)throw new j("transaction","to include GaMetaTx",Xr[n.encodedTx.tag]);return vh(Ps(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t})}var xh=n(4997),_h=n(2321),Sh=n(2231);function Ch(e){return Ch="function"==typeof _h&&"symbol"==typeof Sh?function(e){return typeof e}:function(e){return e&&"function"==typeof _h&&e.constructor===_h&&e!==_h.prototype?"symbol":typeof e},Ch(e)}var Ah=n(9280);function Ph(e,t,n){return(t=function(e){var t=function(e){if("object"!=Ch(e)||!e)return e;var t=e[Ah];if(void 0!==t){var n=t.call(e,"string");if("object"!=Ch(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==Ch(t)?t:t+""}(t))in e?xh(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Th(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")}const zh={...t,sendTransaction:bd,...o,...c};var Ih=new WeakMap;class Eh{constructor(e={}){var t,n;Ph(this,"_options",{}),function(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)}(this,Ih,void 0),Object.assign(this._options,e),t=Ih,n={onAccount:ar((()=>this._options.onAccount)),onNode:ar((()=>this._options.onNode)),onCompiler:ar((()=>this._options.onCompiler))},t.set(Th(t,this),n)}getContext(e={}){return{...this._options,...(t=Ih,t.get(Th(t,this))),...e};var t}async buildTx(e){return Ts({...this.getContext(),...e})}}Object.assign(Eh.prototype,Xn(zh,(([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 Mh=Eh;function qh(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 Rh=new WeakMap;class Oh extends Mh{constructor({nodes:e=[],...t}={}){var n,r;super(t),Ph(this,"pool",new Map),function(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)}(this,Rh,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=Rh,r={onNode:ar((()=>this.api)),onCompiler:ar((()=>this.compilerApi)),onAccount:ar((()=>this._resolveAccount()))},n.set(qh(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new U("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 Ge(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new $e(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new $e("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 te("Address in AccountResolver");if("object"==typeof e)return e;throw new X(`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,t={}){return this.unsafeSign(e,t)}async unsafeSign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).unsafeSign(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 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,...(t=Rh,t.get(qh(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class kh extends Oh{constructor({accounts:e,...t}={}){super(t),Ph(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(Sr(t),null==this.accounts[t])throw new se(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 se(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(Sr(e),null==this.accounts[e])throw new se(e);this.selectedAddress=e}}let Bh=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),Uh=function(e){return e.window="window",e.extension="extension",e}({}),Gh=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),$h=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.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Vh=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const Dh=[];class Lh extends q{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=Dh.find((t=>t.code===e.code));if(null==t)throw new ae(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class jh extends Lh{constructor(e){super("Invalid transaction"),Ph(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}Ph(jh,"code",2),Dh.push(jh);class Fh extends Lh{constructor(e){super("Operation rejected by user"),Ph(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}Ph(Fh,"code",4),Dh.push(Fh);class Hh extends Lh{constructor(){super("Unsupported Protocol Version"),Ph(this,"code",5),this.name="RpcUnsupportedProtocolError"}}Ph(Hh,"code",5),Dh.push(Hh);class Jh extends Lh{constructor(e){super("Wallet deny your connection request"),Ph(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}Ph(Jh,"code",9),Dh.push(Jh);class Wh extends Lh{constructor(){super("You are not connected to the wallet"),Ph(this,"code",10),this.name="RpcNotAuthorizeError"}}Ph(Wh,"code",10),Dh.push(Wh);class Kh extends Lh{constructor(e){super(`You are not subscribed for account ${e}`),Ph(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}Ph(Kh,"code",11),Dh.push(Kh);class Yh extends Lh{constructor(){super("The peer failed to execute your request due to unknown error"),Ph(this,"code",12),this.name="RpcInternalError"}}Ph(Yh,"code",12),Dh.push(Yh);class Qh extends Lh{constructor(e){super(`Wallet can't find a network by id "${e}"`),Ph(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}Ph(Qh,"code",13),Dh.push(Qh);class Xh extends Lh{constructor(){super("Method not found"),Ph(this,"code",-32601),this.name="RpcMethodNotFoundError"}}Ph(Xh,"code",-32601),Dh.push(Xh);var Zh=n(8287).Buffer;class ef extends vl{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){return this.unsafeSign(e)}async unsafeSign(e){const t=Cr(Zh.from(e),cr.Bytearray),{signature:n}=await this._rpcClient.request($h.unsafeSign,{onAccount:this.address,data:t});return Sr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new j("networkId","provided",n);const r=await this._rpcClient.request($h.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new ee("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request($h.signMessage,{onAccount:this.address,message:e});return Zh.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:a,networkId:i}={}){const{signature:s}=await this._rpcClient.request($h.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:i,contractAddress:a},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request($h.signDelegation,{delegation:e,onAccount:this.address});return t}}function tf(e,t,n){nf(e,t),t.set(e,n)}function nf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function rf(e,t){return e.get(sf(e,t))}function af(e,t,n){return e.set(sf(e,t),n),n}function sf(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 of=new WeakMap,cf=new WeakMap,uf=new WeakMap,lf=new WeakSet;class mf{constructor(e,t,n){var r;nf(this,r=lf),r.add(this),tf(this,of,new Map),tf(this,cf,0),tf(this,uf,void 0),this.connection=e,af(uf,this,n),e.connect(sf(lf,this,pf).bind(this),t)}async request(e,t){return sf(lf,this,df).call(this,af(cf,this,rf(cf,this)+1),e,t),new Promise(((e,t)=>{rf(of,this).set(rf(cf,this),{resolve:e,reject:t})}))}notify(e,t){sf(lf,this,df).call(this,void 0,e,t)}}async function pf(e,t){if("2.0"!==e?.jsonrpc)throw new le(JSON.stringify(e));if("result"in e||"error"in e)return void sf(lf,this,ff).call(this,e);const n=e;let r,a;try{if(!(n.method in rf(uf,this)))throw new Xh;const e=n.method;r=await rf(uf,this)[e](n.params,t)}catch(e){rr(e),a=e}if(null!=n.id&&sf(lf,this,hf).call(this,n.id,n.method,r,null==a||a instanceof Lh?a:new Yh),null!=a&&!(a instanceof Lh))throw a}function df(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function hf(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function ff({id:e,error:t,result:n}){const r=rf(of,this).get(e);if(null==r)throw new me(e);null!=t?r.reject(Lh.deserialize(t)):r.resolve(n),rf(of,this).delete(e)}class yf extends Oh{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...a}){super(a),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(Sr(t),!this.addresses().includes(t))throw new pe(t);this._ensureConnected(),e=new ef(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 Ye("You are already connected to wallet");let r;const a=e=>{if(t){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Nl(e.node.url),!0)}this.onNetworkChange(e)},i=new mf(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[$h.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[$h.updateNetwork]:a,[$h.closeConnection]:e=>{r=e,i.connection.disconnect()},[$h.readyToConnect]:()=>{}}),s=await i.request($h.connect,{name:this.name,version:1,connectNode:t});return a(s),this.rpcClient=i,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify($h.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request($h.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request($h.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request($h.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new Qe("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new he}}var gf=n(228);function Nf(e,t,n){wf(e,t),t.set(e,n)}function wf(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function vf(e,t,n){return e.set(xf(e,t),n),n}function bf(e,t){return e.get(xf(e,t))}function xf(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 _f=new WeakMap,Sf=new WeakSet,Cf=new WeakMap;class Af extends gf{get isConnected(){return null!=bf(_f,this)}get accounts(){return bf(Cf,this)}constructor(){var e;super(),wf(this,e=Sf),e.add(this),Nf(this,_f,void 0),Nf(this,Cf,[])}static async _connect(e,t,n,r){let a;const i=new mf(t,(()=>{vf(_f,n,void 0),vf(Cf,n,[]),n.emit("disconnect",a)}),{[$h.updateAddress]:xf(Sf,n,Tf).bind(n),[$h.updateNetwork]:n._updateNetwork.bind(n),[$h.closeConnection]:e=>{a=e,i.connection.disconnect()},[$h.readyToConnect]:()=>{}});vf(_f,n,i);const s=await bf(_f,n).request($h.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=xf(Sf,this,Pf).call(this);e.notify($h.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=xf(Sf,this,Pf).call(this);return(await e.request($h.address,void 0)).map((t=>new ef(e,t)))}async subscribeAccounts(e,t){const n=await xf(Sf,this,Pf).call(this).request($h.subscribeAddress,{type:e,value:t});return xf(Sf,this,Tf).call(this,n.address),bf(Cf,this)}async askToSelectNetwork(e){await xf(Sf,this,Pf).call(this).request($h.updateNetwork,e)}}function Pf(){if(null==bf(_f,this))throw new Qe("You are not connected to Wallet");return bf(_f,this)}function Tf(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];vf(Cf,this,t.map((e=>new ef(xf(Sf,this,Pf).call(this),e)))),this.emit("accountsChange",bf(Cf,this))}function zf(e,t){return e.get(If(e,t))}function If(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 Ef=new WeakMap;class Mf extends Af{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Ef),n.set(t,r)}get networkId(){return zf(Ef,this)}_updateNetwork(e){var t,n;t=Ef,n=e.networkId,t.set(If(t,this),n),this.emit("networkIdChange",zf(Ef,this))}static async connect(e,t){const n=new Mf;return await Mf._connect(e,t,n,!1),n}}function qf(e,t){return e.get(Rf(e,t))}function Rf(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 Of=new WeakMap;class kf extends Af{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=Of),n.set(t,r)}get node(){return qf(Of,this)}_updateNetwork(e){if(null==e.node?.url)throw new Xe("Missing URLs of the Node");var t,n;t=Of,n=new Nl(e.node.url),t.set(Rf(t,this),n),this.emit("nodeChange",qf(Of,this))}static async connect(e,t){const n=new kf;return await super._connect(e,t,n,!0),n}}var Bf=n(1013);const Uf=n.n(Bf)()({storeAsString:!0}),Gf=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Xn(e,(([e,t])=>[e,Gf(t)]));if(Array.isArray(e))return e.map((e=>Gf(e)));if("string"==typeof e&&new E(e).toString(10)===e){const t=new E(e);return t.toJSON=()=>t.toString(10),t}return e};var $f={stringify:(...e)=>Uf.stringify(Gf(e[0]),...e.slice(1)),parse:Uf.parse},Vf=n(8287).Buffer;class Df extends kh{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:a,onDisconnect:i,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),Ph(this,"_clients",new Map),this.onConnection=r,this.onSubscription=a,this.onDisconnect=i,this.onAskAccounts=s,this.onAskToSelectNetwork=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($h.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($h.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 Vh.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Vh.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=Vf.from(sr().randomBytes(8)).toString("base64");let n;const r={id:t,status:Vh.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new mf(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[$h.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[$h.connect]:async({name:e,version:n,icons:a,connectNode:i},s)=>{if(1!==n)throw new Hh;return await this.onConnection(t,{name:e,icons:a,connectNode:i},s),r.status=Vh.CONNECTED,r.connectNode=i,{...await this.getWalletInfo(),...i&&this._getNode()}},[$h.subscribeAddress]:async({type:e,value:n},a)=>{if(!this._isRpcClientConnected(t))throw new Wh;switch(e){case Gh.subscribe:await this.onSubscription(t,{type:e,value:n},a),r.addressSubscription.add(n);break;case Gh.unsubscribe:r.addressSubscription.delete(n);break;default:throw new ae(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[$h.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskAccounts(t,e,n),this.addresses()},[$h.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:a},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const s={onAccount:n,aeppOrigin:i,aeppRpcClientId:t,innerTx:a};if(r||!0===a)return{signedTransaction:await this.signTransaction(e,s)};try{return $f.parse($f.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await wd(e,this.api);if(n.length>0)throw new jh(n);throw t}},[$h.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Vf.from(await this.signMessage(e,a)).toString("hex")}},[$h.signTypedData]:async({domain:e,aci:n,data:r,onAccount:a=this.address},i)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(a))throw new Kh(a);const s={...e,onAccount:a,aeppOrigin:i,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[$h.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Cr(await this.unsafeSign(Sr(e),a),cr.Signature)}},[$h.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Wh;if(!this.addresses().includes(n))throw new Kh(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,a)}},[$h.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Wh;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify($h.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function Lf(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function jf(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function Ff(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");Lf(e.outputLen),Lf(e.blockLen)}function Hf(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function Jf(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Wf(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Kf=async()=>{};async function Yf(e,t,n){let r=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-r;e>=0&&e<t||(await Kf(),r+=e)}}function Qf(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function Xf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}function Zf(e){return"string"==typeof e&&(e=Qf(e)),jf(e),e}class ey{}function ty(e){const t=t=>e().update(Xf(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class ny extends ey{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,Ff(e);const n=Xf(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),Jf(a)}update(e){return Hf(this),this.iHash.update(e),this}digestInto(e){Hf(this),jf(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const ry=(e,t,n)=>new ny(e,t).update(n).digest();function ay(e,t,n,r){Ff(e);const a=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:i,dkLen:s,asyncTick:o}=a;if(Lf(i),Lf(s),Lf(o),i<1)throw new Error("iterations (c) should be >= 1");const c=Zf(t),u=Zf(n),l=new Uint8Array(s),m=ry.create(e,c),p=m._cloneInto().update(u);return{c:i,dkLen:s,asyncTick:o,DK:l,PRF:m,PRFSalt:p}}function iy(e,t,n,r,a){return e.destroy(),t.destroy(),r&&r.destroy(),Jf(a),n}ry.create=(e,t)=>new ny(e,t);class sy extends ey{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Wf(this.buffer)}update(e){Hf(this),jf(e=Xf(e));const{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(r-this.pos,a-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Wf(e);for(;r<=a-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){Hf(this),function(e,t){jf(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:a}=this;let{pos:i}=this;t[i++]=128,Jf(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const a=BigInt(32),i=BigInt(4294967295),s=Number(n>>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=Wf(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const oy=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),cy=BigInt(2**32-1),uy=BigInt(32);function ly(e,t=!1){return t?{h:Number(e&cy),l:Number(e>>uy&cy)}:{h:0|Number(e>>uy&cy),l:0|Number(e&cy)}}const my=(e,t,n)=>e>>>n,py=(e,t,n)=>e<<32-n|t>>>n,dy=(e,t,n)=>e>>>n|t<<32-n,hy=(e,t,n)=>e<<32-n|t>>>n,fy=(e,t,n)=>e<<64-n|t>>>n-32,yy=(e,t,n)=>e>>>n-32|t<<64-n;function gy(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}}const Ny=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),wy=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,vy=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),by=(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,xy=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),_y=(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,Sy=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:s}=ly(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),Cy=(()=>Sy[0])(),Ay=(()=>Sy[1])(),Py=new Uint32Array(80),Ty=new Uint32Array(80);class zy extends sy{constructor(e=64){super(128,e,16,!1),this.Ah=0|oy[0],this.Al=0|oy[1],this.Bh=0|oy[2],this.Bl=0|oy[3],this.Ch=0|oy[4],this.Cl=0|oy[5],this.Dh=0|oy[6],this.Dl=0|oy[7],this.Eh=0|oy[8],this.El=0|oy[9],this.Fh=0|oy[10],this.Fl=0|oy[11],this.Gh=0|oy[12],this.Gl=0|oy[13],this.Hh=0|oy[14],this.Hl=0|oy[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:m,Gh:p,Gl:d,Hh:h,Hl:f}=this;return[e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f]}set(e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|m,this.Gh=0|p,this.Gl=0|d,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)Py[n]=e.getUint32(t),Ty[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|Py[e-15],n=0|Ty[e-15],r=dy(t,n,1)^dy(t,n,8)^my(t,0,7),a=hy(t,n,1)^hy(t,n,8)^py(t,n,7),i=0|Py[e-2],s=0|Ty[e-2],o=dy(i,s,19)^fy(i,s,61)^my(i,0,6),c=hy(i,s,19)^yy(i,s,61)^py(i,s,6),u=vy(a,c,Ty[e-7],Ty[e-16]),l=by(u,r,o,Py[e-7],Py[e-16]);Py[e]=0|l,Ty[e]=0|u}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:m,Fh:p,Fl:d,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=dy(l,m,14)^dy(l,m,18)^fy(l,m,41),N=hy(l,m,14)^hy(l,m,18)^yy(l,m,41),w=l&p^~l&h,v=xy(g,N,m&d^~m&f,Ay[e],Ty[e]),b=_y(v,y,t,w,Cy[e],Py[e]),x=0|v,_=dy(n,r,28)^fy(n,r,34)^fy(n,r,39),S=hy(n,r,28)^yy(n,r,34)^yy(n,r,39),C=n&a^n&s^a&s,A=r&i^r&o^i&o;y=0|h,g=0|f,h=0|p,f=0|d,p=0|l,d=0|m,({h:l,l:m}=gy(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;const P=Ny(x,S,A);n=wy(P,b,_,C),r=0|P}({h:n,l:r}=gy(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=gy(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=gy(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=gy(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:m}=gy(0|this.Eh,0|this.El,0|l,0|m)),({h:p,l:d}=gy(0|this.Fh,0|this.Fl,0|p,0|d)),({h:h,l:f}=gy(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=gy(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,g)}roundClean(){Jf(Py,Ty)}destroy(){Jf(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const Iy=ty((()=>new zy));function Ey(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function My(e){const t=Ey(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}const qy=e=>Ey("mnemonic"+e);var Ry=n(9234),Oy=n.n(Ry);class ky{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}}var By=n(8287).Buffer;function Uy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Gy(e,t){return e.get(Vy(e,t))}function $y(e,t,n){return e.set(Vy(e,t),n),n}function Vy(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")}const Dy=By.from("ed25519 seed");function Ly(e,t){const n=Oy().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function jy(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=By.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),Ly(Zn([By.alloc(1,0),e,r]),t)}),e)}var Fy=new WeakMap,Hy=new WeakSet;class Jy extends ky{constructor(e){var t;super(),Uy(this,t=Hy),t.add(this),function(e,t){Uy(e,t),t.set(e,void 0)}(this,Fy),$y(Fy,this,e)}async getWallet(){return Vy(Hy,this,Wy).call(this,!1)}getWalletSync(){return Vy(Hy,this,Wy).call(this,!0)}async initialize(e){const t=await this.getWallet();return Vy(Hy,this,Ky).call(this,e,t)}initializeSync(e){const t=this.getWalletSync();return Vy(Hy,this,Ky).call(this,e,t)}}function Wy(e){const t=e=>{const t=jy(Ly(e,Dy),[44,457]);return $y(Fy,this,{secretKey:Cr(t.secretKey,cr.Bytearray),chainCode:Cr(t.chainCode,cr.Bytearray)}),Gy(Fy,this)};if(ArrayBuffer.isView(Gy(Fy,this))){if(64!==Gy(Fy,this).length)throw new j("seed length",64,Gy(Fy,this).length);return t(Gy(Fy,this))}return"object"==typeof Gy(Fy,this)?Gy(Fy,this):e?t(function(e,t=""){return function(e,t,n){const{c:r,dkLen:a,DK:i,PRF:s,PRFSalt:o}=ay(e,t,n,{c:2048,dkLen:64});let c;const u=new Uint8Array(4),l=Wf(u),m=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){const n=i.subarray(t,t+s.outputLen);l.setInt32(0,e,!1),(c=o._cloneInto(c)).update(u).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<r;e++){s._cloneInto(c).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return iy(s,o,i,c,m)}(Iy,My(e).nfkd,qy(t))}(Gy(Fy,this))):function(e,t=""){return async function(e,t,n){const{c:r,dkLen:a,asyncTick:i,DK:s,PRF:o,PRFSalt:c}=ay(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),m=Wf(l),p=new Uint8Array(o.outputLen);for(let e=1,t=0;t<a;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);m.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(p),n.set(p.subarray(0,n.length)),await Yf(r-1,i,(()=>{o._cloneInto(u).update(p).digestInto(p);for(let e=0;e<n.length;e++)n[e]^=p[e]}))}return iy(o,c,s,u,p)}(Iy,My(e).nfkd,qy(t))}(Gy(Fy,this)).then(t)}function Ky(e,t){const n=jy({secretKey:Sr(t.secretKey),chainCode:Sr(t.chainCode)},[e,0,0]).secretKey;return new pd(Cr(n,cr.AccountSecretKey))}function Yy(e,t){return e.get(Qy(e,t))}function Qy(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 Xy=new WeakMap;class Zy extends vl{constructor(e){var t,n,r;super(),r=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=Xy),n.set(t,r),Sr(e),this.address=e}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("Can't sign using generalized account")}async signMessage(){throw new te("Can't sign using generalized account")}async signTypedData(){throw new te("Can't sign using generalized account")}async signDelegation(){throw new te("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r}){if(null==t||null==n||null==r)throw new j("authData, onCompiler, onNode","provided",null);const{callData:a,sourceCode:i,args:s,fee:o,gasLimit:c,gasPrice:u}="function"==typeof t?await t(e):t,l=null!=a?a:await(async()=>{if(null==Yy(Xy,this)){const n=await ba(this.address,{onNode:r});if("generalized"!==n.kind)throw new j("account kind","generalized",n.kind);e=Xy,t=n.authFun,e.set(Qy(e,this),t)}var e,t;if(null==Yy(Xy,this))throw new ae("Account in generalised, but authFun not provided");if(null==i||null==s)throw new be("Auth data must contain sourceCode and args or callData.");const a=await sh.initialize({onCompiler:n,onNode:r,sourceCode:i});return a._calldata.encode(a._name,Yy(Xy,this),s)})(),m=await Ts({tag:Xr.GaMetaTx,tx:{tag:Xr.SignedTx,encodedTx:Sr(e),signatures:[]},gaId:this.address,authData:l,fee:o,gasLimit:c,gasPrice:u,onNode:r});return Ps({tag:Xr.SignedTx,encodedTx:Sr(m),signatures:[]})}}var eg=n(8287).Buffer;const tg=224;class ng extends vl{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using Ledger HW")}async signTypedData(){throw new te("Typed data signing using Ledger HW")}async signDelegation(){throw new te("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountLedger");if(null==n)throw new j("networkId","provided",n);const r=Sr(e);let a=0;const i=eg.from(n),s=[];for(;a!==r.length;){const e=0===a?141-i.length:150,t=a+e>r.length?r.length-a:e,n=eg.alloc(0===a?9+i.length+t:t);if(0===a){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(i.length,e),e+=i.copy(n,e,0,i.length),r.copy(n,e,0,150-e)}else r.copy(n,0,a,a+t);s.push(n),a+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(tg,4,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)];return Ps({tag:Xr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=eg.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,a=t+e>n.length?n.length-t:e,i=eg.alloc(0===t?8+a:a);0===t?(i.writeUInt32BE(this.index,0),i.writeUInt32BE(n.length,4),n.copy(i,8,t,t+a)):n.copy(i,0,t,t+a),r.push(i),t+=a}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(tg,8,0===n?0:128,0,t))),Promise.resolve(eg.alloc(0)))).subarray(0,64)}}var rg=n(8287).Buffer;function ag(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ig(e,t){return e.get(og(e,t))}function sg(e,t,n){return e.set(og(e,t),n),n}function og(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 cg=new WeakMap,ug=new WeakSet;class lg extends ky{constructor(e){var t;super(),ag(this,t=ug),t.add(this),function(e,t){ag(e,t),t.set(e,void 0)}(this,cg),Ph(this,"_enableExperimentalLedgerAppSupport",!1),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await og(ug,this,pg).call(this),t=[e,"0.4.4","0.5.0"],n=[e,"1.0.0","2.0.0"];if(!(ho(...t)||this._enableExperimentalLedgerAppSupport&&ho(...n)))throw new ne("Aeternity app on Ledger",...t);sg(cg,this,Promise.resolve())}async getAppConfiguration(){return og(ug,this,pg).call(this)}async getAddress(e,t=!1){await og(ug,this,mg).call(this);const n=rg.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(tg,2,t?1:0,0,n),a=r[0];return r.subarray(1,1+a).toString("ascii")}async initialize(e){return new ng(this.transport,e,await this.getAddress(e))}}async function mg(){var e;return null!==(e=ig(cg,this))&&void 0!==e||sg(cg,this,this.ensureReady()),ig(cg,this)}async function pg(){let e=await this.transport.send(tg,6,0,0);return 6===e.length&&(e=e.subarray(1)),{version:[e[0],e[1],e[2]].join(".")}}var dg=n(8287).Buffer;const hg="npm:@aeternity-snap/plugin";async function fg(e,t,n,r){const a=await e.request({method:"wallet_invokeSnap",params:{snapId:hg,request:{method:t,params:n}}});if(null==a)throw new ae("Empty MetaMask response");if(!(r in a))throw new ae(`Key ${r} missed in response ${JSON.stringify(a)}`);return a[r]}class yg extends vl{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using MetaMask")}async signTypedData(){throw new te("Typed data signing using MetaMask")}async signDelegation(){throw new te("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountMetamask");if(null==n)throw new j("networkId","provided",n);return fg(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await fg(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:dg.from(e).toString("base64")},"signature");return dg.from(t,"base64")}}function gg(e,t,n){Ng(e,t),t.set(e,n)}function Ng(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function wg(e,t,n){return e.set(bg(e,t),n),n}function vg(e,t){return e.get(bg(e,t))}function bg(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")}const xg="0.0.9",_g="0.1.0";var Sg=new WeakMap,Cg=new WeakSet,Ag=new WeakMap;class Pg extends ky{get provider(){if(null==vg(Sg,this))throw new Z("Metamask is not detected yet");return vg(Sg,this)}constructor(e){var t;if(super(),Ng(this,t=Cg),t.add(this),gg(this,Sg,void 0),gg(this,Ag,void 0),wg(Sg,this,e),null==vg(Sg,this)&&null==window)throw new Z("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider")}async installSnap(){const e=await bg(Cg,this,Ig).call(this);return(await e.request({method:"wallet_requestSnaps",params:{[hg]:{version:xg}}}))[hg]}async requestSnap(e=`>=${xg} <${_g}`){const t=await bg(Cg,this,Ig).call(this);return(await t.request({method:"wallet_requestSnaps",params:{[hg]:{version:e}}}))[hg]}async ensureReady(){const e=[await this.getSnapVersion(),xg,_g];if(!ho(...e))throw new ne("Aeternity snap in MetaMask",...e)}async getSnapVersion(){const e=await bg(Cg,this,Ig).call(this),t=await e.request({method:"wallet_getSnaps"}),n=t[hg]?.version;if(null==n)throw new Z("Aeternity snap is not installed to MetaMask or not connected to this aepp");return n}async initialize(e){await this.requestSnap();const t=await bg(Cg,this,Ig).call(this),n=await fg(t,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new yg(t,e,n)}}async function Tg(){if(!("ethereum"in window)||null==window.ethereum)return;const e=window.ethereum,t=await e.request({method:"web3_clientVersion"});if(null==t)throw new ae("Can't get Ethereum Provider version");return t.startsWith("MetaMask/v")?e:void 0}async function zg(){return setTimeout((()=>window.dispatchEvent(new Event("eip6963:requestProvider")))),new Promise((e=>{const t=n=>{"io.metamask"===n.detail.info.rdns&&(window.removeEventListener("eip6963:announceProvider",t),e(n.detail.provider))};window.addEventListener("eip6963:announceProvider",t),setTimeout((()=>{window.removeEventListener("eip6963:announceProvider",t),e(void 0)}),500)}))}async function Ig(){var e;return null!==(e=vg(Ag,this))&&void 0!==e||wg(Ag,this,(async(e,t)=>{if(null!==(e=vg(Sg,this))&&void 0!==e||wg(Sg,this,null!==(t=await bg(Cg,this,Tg).call(this))&&void 0!==t?t:await bg(Cg,this,zg).call(this)),null==vg(Sg,this))throw new Z("Can't find a Metamask extension as an injected provider and over EIP-6963. Ensure that Metamask is installed or setup a provider.");const n=await vg(Sg,this).request({method:"web3_clientVersion"});if(null==n)throw new ae("Can't get Ethereum Provider version");const r=[n.slice(10),"12.2.4"];if(!ho(...r))throw new ne("Metamask",...r);return vg(Sg,this)})()),vg(Ag,this)}class Eg{}const Mg={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},qg={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},Rg={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"}}}}},Og={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"}}}}},kg={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"}}}}}}},Bg={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"}}}}},Ug={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"}}}}},Gg={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"}}}}}}},$g={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"}}}}}}},Vg={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Dg={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Lg={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"}}}}}}}}},jg={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},Fg={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"}}}}},Hg={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},Jg={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Wg={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"}}}}},Kg={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Yg={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},Qg={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Xg={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Zg={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},eN={parameterPath:"body",mapper:Mg},tN={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},nN={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},rN={parameterPath:"body",mapper:Bg},aN={parameterPath:"body",mapper:Ug},iN={parameterPath:"body",mapper:$g},sN={parameterPath:"body",mapper:Dg},oN={parameterPath:"body",mapper:Fg},cN={parameterPath:"body",mapper:Hg},uN={parameterPath:"body",mapper:Wg};class lN extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-compiler/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},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},pN)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},dN)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},hN)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},fN)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},yN)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},gN)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},NN)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},wN)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},vN)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},bN)}version(e){return this.sendOperationRequest({options:e},xN)}apiVersion(e){return this.sendOperationRequest({options:e},_N)}api(e){return this.sendOperationRequest({options:e},SN)}}const mN=$s(u,!1),pN={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:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},dN={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:kg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:eN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},hN={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:rN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},fN={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Gg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:aN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},yN={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:Vg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:iN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},gN={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:jg,isError:!0}},requestBody:sN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},NN={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:Lg},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:oN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},wN={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:Jg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},vN={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:uN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},bN={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Kg},400:{bodyMapper:jg,isError:!0}},requestBody:cN,urlParameters:[nN],headerParameters:[Zg,tN],mediaType:"json",serializer:mN},xN={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Kg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},_N={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Yg},500:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN},SN={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:jg,isError:!0}},urlParameters:[nN],headerParameters:[tN],serializer:mN};class CN extends Eg{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new lN(e,{allowInsecureConnection:!0,additionalPolicies:[Co("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0",t),So((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:cn}),this.api.pipeline.removePolicy({name:In})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof Un&&400===e.statusCode)throw new U(e.message);throw e}}async compile(e){throw new te("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 Un&&400===e.statusCode)throw new U(e.message);throw e}}async generateAci(e){throw new te("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 te("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function AN(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var PN=n(952),TN=n.n(PN);const{w3cwebsocket:zN}=TN();function IN(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function EN(e,t){if(null==t)throw new ve;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),kN(e)}function MN(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,IN(e,"statusChanged",t))}function qN(e,t){e._state=t,IN(e,"stateChanged",t)}function RN(e,t){e._debug("send message",t.method,t.params),e._websocket.send($f.stringify({jsonrpc:"2.0",...t}))}function ON(e,t,n={}){RN(e,{method:t,params:n})}async function kN(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,EN(e,r)}async function BN(e,t){const{handler:n,state:r}=e._fsm,a=await Promise.resolve(n(e,t,r));if(EN(e,a),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===a?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;IN(e,"newContract",ea(r,n+1))}}function UN(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function GN(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{ON(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{UN(e),IN(e,"error",new ge)}),15e3)}),1e4)}async function $N(e,t,n){return new Promise(((r,a)=>{const i=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(i,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";a(new fe(e.error.message+n))}else r(e.result)})),RN(e,{method:t,id:i,params:n})}))}async function VN(e,t){const{signatures:n,encodedTx:r}=zs(e,Xr.SignedTx),a=Ps(r),i=await t(a);if("string"==typeof i){const{signatures:e}=zs(i,Xr.SignedTx);return Ps({tag:Xr.SignedTx,signatures:n.concat(e),encodedTx:Sr(a)})}return i}async function DN(e,t,n,r){let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new B("Can't find transaction in message");a=await VN(n.signed_tx,r)}const i="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return ON(e,t,i?{error:null!=a?a:1}:{[s]:a}),i}function LN(e,t,n){return n?.reject?.(Object.assign(new Ne(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:QN}}function jN(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:QN};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:QN};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new J("Insufficient balance")):e.includes(1002)?n.reject(new F("Amount cannot be negative")):n.reject(new ye(t.error.message)),{handler:QN}}return LN(0,t,n)}function FN(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?(MN(e,r),{handler:WN}):"channel_reestablished"===t.params.data.event?{handler:YN}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:FN}):{handler:FN}}if("channels.error"===t.method)return IN(e,"error",new ye(t?.payload?.message)),{handler:tw}}async function HN(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:YN}:LN(0,t,n)}}):LN(0,t,n)}async function JN(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 qN(e,null==n?"":Ps(n)),{handler:QN}}return LN(0,t,n)}async function WN(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await DN(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:KN}}function KN(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:YN}}if("channels.on_chain_tx"===r.method)return IN(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,MN(e,"signed"),{handler:KN}}function YN(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(qN(e,n.params.data.state),{handler:QN}):LN(0,n,r)}}):LN(0,t,n)}async function QN(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:XN};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return IN(e,AN(t.params.data.event)),{handler:QN};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:QN};case"timeout":case"close_mutual":case"shutdown":return{handler:QN};case"closing":return MN(e,"closing"),{handler:QN};case"closed_confirmed":return MN(e,"closed"),{handler:tw};case"died":return MN(e,"died"),{handler:tw}}break;case"channels.on_chain_tx":return IN(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:QN};case"channels.leave":return{handler:QN};case"channels.update":return qN(e,t.params.data.state),{handler:QN};case"channels.sign.shutdown_sign_ack":return XN(e,t,n)}}async function XN(e,t,n){var r;const[,a]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==a?LN(0,t,n):await DN(e,`channels.${a}`,t.params.data,(async n=>e._options.sign(a,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:QN}:LN(0,r,n)},state:n}:{handler:QN}}async function ZN(e,t,n){return"channels.sign.shutdown_sign"!==t.method?LN(0,t,n):(await DN(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?LN(0,t,n):{handler:tw,state:n}},state:n})}function ew(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),UN(e),{handler:tw}):"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):LN(0,t,n)}function tw(e,t,n){return null==n?{handler:tw}:"closing"===t.params.data.event?{handler:tw,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:tw,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:tw}):{handler:tw,state:n}}QN.enter=e=>{MN(e,"open")};var nw=n(7007),rw=n.n(nw);function aw(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")}let iw=0;var sw=new WeakMap;class ow{constructor(){var e,t;Ph(this,"_eventEmitter",new(rw())),Ph(this,"_nextRpcMessageId",0),Ph(this,"_rpcCallbacks",new Map),Ph(this,"_messageQueue",[]),Ph(this,"_isMessageQueueLocked",!1),Ph(this,"_actionQueue",[]),Ph(this,"_isActionQueueLocked",!1),Ph(this,"_status","disconnected"),Ph(this,"_state",""),function(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)}(this,sw,void 0),iw+=1,t=iw,(e=sw).set(aw(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=sw,t.get(aw(t,this))}`,...e)}static async initialize(e){return ow._initialize(new ow,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new F("`existingChannelId`, `existingFsmId` should be both provided or missed");const a=l[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...a}){e._options={url:r,...a};const i=new URL(r);Object.entries(a).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>i.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),i.searchParams.set("protocol","json-rpc"),MN(e,"connecting"),e._websocket=new zN(i.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),MN(e,"connected",r),EN(e,{handler:t}),GN(e)},onclose:t=>{MN(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=$f.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 BN(e,t)}catch(n){rr(n),IN(e,"error",new we(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||GN(e):IN(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void IN(e,"error",new B(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?a:FN,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return UN(this)}status(){return this._status}async state(){const e=(t=await $N(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[AN(t)]:n})),{}));var t;return{calls:Cs(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:zs(e.halfSignedTx,Xr.SignedTx)},...""!==e.signedTx&&{signedTx:zs(e.signedTx,Xr.SignedTx)},trees:Cs(e.trees)}}round(){if(""===this._state)return null;const e=zs(this._state,Xr.SignedTx).encodedTx;switch(e.tag){case Xr.ChannelCreateTx:return 1;case Xr.ChannelOffChainTx:case Xr.ChannelWithdrawTx:case Xr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new B("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new B("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,a)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:a}}}})}));return kN(e),r}(this,((e,t)=>t?.handler===QN),e)}async leave(){return this.enqueueAction((()=>(ON(this,"channels.leave"),{handler:ew})))}async shutdown(e){return this.enqueueAction((()=>(ON(this,"channels.shutdown"),{handler:ZN,state:{sign:e}})))}}class cw extends ow{async update(e,t,n,r,a=[]){return this.enqueueAction((()=>{ON(this,"channels.update.new",{from:e,to:t,amount:n,meta:a});const i=async(e,t,n)=>"channels.sign.update"===t.method?await DN(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:i,state:n}:{handler:(e,t)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}:"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:QN}):jN(this,t,n);return{handler:i}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await $N(this,"channels.get.poi",{accounts:e,contracts:t});return Cs(n)}async balances(e){return Object.fromEntries((await $N(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 LN(0,t,n);const r=(t,a)=>{if("channels.on_chain_tx"===a.method)return n.onOnChainTx?.(a.params.data.tx),{handler:r,state:n};if("channels.info"===a.method&&[`own_${e}_locked`,`${e}_locked`].includes(a.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",i=a.params.data.event.startsWith("own_");return n[`on${i?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return jN(this,a,n,(()=>(qN(this,a.params.data.state),n.resolve({accepted:!0,signedTx:a.params.data.state}),{handler:QN})))},{sign:a}=n;return await DN(this,`channels.${e}_tx`,t.params.data,(async e=>a(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}={}){return this.enqueueAction((()=>(ON(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}})))}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 Qn(500)),ON(this,"channels.message",{info:n,to:t})}}function uw(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[AN(t)]:n})),{})}class lw extends cw{static async initialize(e){return ow._initialize(new lw,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:a},i){return this.enqueueAction((()=>(ON(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:a}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>jN(this,t,n,(()=>{const e=zs(t.params.data.state,Xr.SignedTx).encodedTx;if(e.tag!==Xr.ChannelOffChainTx)throw new B(`Tag should be ${Xr[Xr.ChannelOffChainTx]}, got ${Xr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",a=this._options[r];qN(this,t.params.data.state);const i=ea(a,e.round);return IN(this,"newContract",i),n.resolve({accepted:!0,address:i,signedTx:t.params.data.state}),{handler:QN}})),state:n}),state:{sign:i}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},a){return this.enqueueAction((()=>(ON(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?LN(0,t,n):(await DN(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>jN(this,t,n,(()=>(qN(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:QN}))),state:n}),state:{sign:a}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:a=1e6,gasPrice:i=Lr},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(ON(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:i,gas:a}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?LN(0,t,n):(await DN(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),IN(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})),LN(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return uw(await $N(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 uw(await $N(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await $N(this,"channels.get.contract",{pubkey:e});return uw({...t,contract:uw(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(ON(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:QN}):(n.reject(new Ne("Unexpected message received")),{handler:tw})}})))}}var mw=null;"undefined"!=typeof WebSocket?mw=WebSocket:"undefined"!=typeof MozWebSocket?mw=MozWebSocket:void 0!==n.g?mw=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?mw=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(mw=self.WebSocket||self.MozWebSocket);var pw=mw;function dw(e,t,n){hw(e,t),t.set(e,n)}function hw(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fw(e,t,n){return n(Nw(e,t))}function yw(e,t,n){return e.set(Nw(e,t),n),n}function gw(e,t){return e.get(Nw(e,t))}function Nw(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 ww=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(ww||{});class vw extends q{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class bw extends vw{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var xw=new WeakMap,_w=new WeakMap,Sw=new WeakMap,Cw=new WeakSet;class Aw{get webSocket(){return gw(Sw,this)}constructor(e){var t;hw(this,t=Cw),t.add(this),dw(this,xw,[]),dw(this,_w,[]),dw(this,Sw,void 0),this.url=e}async reconnect(){Nw(Cw,this,Ew).call(this),yw(Sw,this,await new Promise((e=>{const t=new pw(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{Nw(Cw,this,Iw).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new ae("Unknown incoming message type: "+typeof e.data);Nw(Cw,this,Mw).call(this,JSON.parse(e.data))},onclose:e=>{Nw(Cw,this,Iw).call(this,(()=>!0),void 0,new bw(e)),Nw(Cw,this,Ew).call(this,!0)}})}))),await Promise.all([...fw(Cw,this,Pw)].map((e=>Nw(Cw,this,zw).call(this,!0,e))))}subscribeKeyBlocks(e){return Nw(Cw,this,qw).call(this,"KeyBlocks",ww.Middleware,e)}subscribeKeyBlocksNode(e){return Nw(Cw,this,qw).call(this,"KeyBlocks",ww.Node,e)}subscribeKeyBlocksAll(e){return Nw(Cw,this,qw).call(this,"KeyBlocks",ww.All,e)}subscribeMicroBlocks(e){return Nw(Cw,this,qw).call(this,"MicroBlocks",ww.Middleware,e)}subscribeMicroBlocksNode(e){return Nw(Cw,this,qw).call(this,"MicroBlocks",ww.Node,e)}subscribeMicroBlocksAll(e){return Nw(Cw,this,qw).call(this,"MicroBlocks",ww.All,e)}subscribeTransactions(e){return Nw(Cw,this,qw).call(this,"Transactions",ww.Middleware,e)}subscribeTransactionsNode(e){return Nw(Cw,this,qw).call(this,"Transactions",ww.Node,e)}subscribeTransactionsAll(e){return Nw(Cw,this,qw).call(this,"Transactions",ww.All,e)}subscribeObject(e,t){return Nw(Cw,this,qw).call(this,e,ww.Middleware,t)}subscribeObjectNode(e,t){return Nw(Cw,this,qw).call(this,e,ww.Node,t)}subscribeObjectAll(e,t){return Nw(Cw,this,qw).call(this,e,ww.All,t)}}function Pw(e){return new Set(gw(xw,e).map((([e])=>e)))}function Tw(e){if(null==gw(Sw,this))throw new ie;gw(Sw,this).send(JSON.stringify(e))}function zw(e,t){if(null==gw(Sw,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";Nw(Cw,this,Tw).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),gw(_w,this).push([e,t])}function Iw(e,t,n){gw(xw,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function Ew(e=!1){null!=gw(Sw,this)&&(e||gw(Sw,this).close(),Object.assign(gw(Sw,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),yw(Sw,this,void 0))}function Mw(e){if("string"==typeof e||Array.isArray(e)){const t=gw(_w,this).shift();if(null==t)throw new ae("Request queue is empty");const[n,r]=t;let a;return"string"==typeof e&&(a=new vw(e)),e.includes(r)!==n&&(a=new ae(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=a&&Nw(Cw,this,Iw).call(this,(e=>r===e),void 0,a))}Nw(Cw,this,Iw).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==ww.All)),e.payload)}function qw(e,t,n){const r=[e,t,n];return 0===fw(Cw,this,Pw).size&&this.reconnect(),fw(Cw,this,Pw).has(e)||Nw(Cw,this,zw).call(this,!0,e),gw(xw,this).push(r),()=>{yw(xw,this,gw(xw,this).filter((e=>e!==r))),fw(Cw,this,Pw).has(e)||Nw(Cw,this,zw).call(this,!1,e),0===fw(Cw,this,Pw).size&&Nw(Cw,this,Ew).call(this)}}const Rw={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Ow={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},kw={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},Bw={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},Uw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Gw={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},$w={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},Vw={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},Dw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},Lw={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},jw={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},Fw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Hw={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},Jw={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},Ww={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},Kw={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Yw={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Qw={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Xw={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(epoch):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Zw={parameterPath:"validator",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"validator",required:!0,type:{name:"String"}}},ev={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},tv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},nv={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},rv={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},av={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},iv={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},sv={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},ov={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},cv={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},uv={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},lv={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},mv={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},pv={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},dv={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},hv={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(time|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},fv={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},yv={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},gv={type:{name:"Composite",className:"PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},Nv={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTxEvent","OracleRegisterTxEvent","OracleExtendTxEvent","OracleQueryTxEvent","OracleResponseTxEvent","NamePreclaimTxEvent","NameClaimTxEvent","NameTransferTxEvent","NameUpdateTxEvent","NameRevokeTxEvent","ContractCreateTxEvent","ContractCallTxEvent","GaAttachTxEvent","GaMetaTxEvent","ChannelCreateTxEvent","ChannelDepositTxEvent","ChannelWithdrawTxEvent","ChannelForceProgressTxEvent","ChannelCloseMutualTxEvent","ChannelCloseSoloTxEvent","ChannelSlashTxEvent","ChannelSettleTxEvent","ChannelSnapshotSoloTxEvent","ChannelSetDelegatesTxEvent","ChannelOffchainTxEvent","ChannelClientReconnectTxEvent","PayingForTxEvent"]}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}}}}},wv={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},vv={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"Number"}},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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},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:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},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"]}}}}},bv={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"}}}}}}},xv={serializedName:"OffChainUpdate",type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},_v={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Sv={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},Cv={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},Av={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",type:{name:"Number"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},Pv={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"}}}}},Tv={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},zv={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Iv={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},Ev={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},Mv={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},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"}}}}},qv={type:{name:"Composite",className:"Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Rv={type:{name:"Composite",className:"DexSwap",modelProperties:{amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},action:{serializedName:"action",required:!0,type:{name:"Enum",allowedValues:["SWAP","BUY","SELL"]}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Ov={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},kv={type:{name:"Composite",className:"Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Bv={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameClaimTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},Uv={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Gv={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},$v={type:{name:"Composite",className:"PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},Vv={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},key:{serializedName:"key",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}}}}},Dv={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Lv={type:{name:"Composite",className:"PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema",modelProperties:{contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},jv={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Fv={type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{contractId:{serializedName:"contract_id",type:{name:"Number"}},callerId:{serializedName:"caller_id",type:{name:"Number"}}}}},Hv={type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},Jv={type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},Wv={type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Kv={type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Yv={type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},Qv={type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Xv={type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Zv={type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},eb={type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},tb={type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},nb={type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},rb={type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},ab={type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},ib={type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},sb={type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ob={type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},cb={type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},ub={type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},lb={type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},mb={type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},pb={type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},db={type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},hb={type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},fb={type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},yb={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},gb={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",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"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}}}}},Nb={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},wb={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},vb={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},bb={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},xb={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},_b={type:{name:"Composite",className:"Aex141TokenDetailResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},metadata:{serializedName:"metadata",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},Sb={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},Cb={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Ab={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},Pb={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}}}}},Tb={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},zb={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},Ib={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},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"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}}}}},Eb={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},Mb={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},qb={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},Rb={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},Ob={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},kb={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},Bb={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},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"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},Ub={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},Gb={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},$b={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Composite",className:"ContractCreateTx"}}}}},Vb={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},Db={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},Lb={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},jb={type:{name:"Composite",className:"Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfo"}}}}}}},Fb={type:{name:"Composite",className:"EpochInfo",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},first:{serializedName:"first",required:!0,type:{name:"Number"}},last:{serializedName:"last",required:!0,type:{name:"Number"}},length:{serializedName:"length",required:!0,type:{name:"Number"}},seed:{serializedName:"seed",required:!0,type:{name:"String"}},lastPinHeight:{serializedName:"last_pin_height",required:!0,type:{name:"Number"}},parentBlockHash:{serializedName:"parent_block_hash",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},epochStartTime:{serializedName:"epoch_start_time",required:!0,type:{name:"Number"}},validators:{serializedName:"validators",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfoValidatorsItem"}}}}}}},Hb={type:{name:"Composite",className:"EpochInfoValidatorsItem",modelProperties:{validator:{serializedName:"validator",type:{name:"String"}},stake:{serializedName:"stake",type:{name:"Number"}}}}},Jb={type:{name:"Composite",className:"Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Schedule"}}}}}}},Wb={type:{name:"Composite",className:"Schedule",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},leader:{serializedName:"leader",required:!0,type:{name:"String"}}}}},Kb={type:{name:"Composite",className:"Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Validator"}}}}}}},Yb={type:{name:"Composite",className:"Validator",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}},totalStakes:{serializedName:"total_stakes",required:!0,type:{name:"Number"}},delegates:{serializedName:"delegates",required:!0,type:{name:"Number"}},rewardsEarned:{serializedName:"rewards_earned",required:!0,type:{name:"Number"}},pinningHistory:{serializedName:"pinning_history",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"}}}}}}},Qb={type:{name:"Composite",className:"Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},Xb={type:{name:"Composite",className:"Delegate",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},delegate:{serializedName:"delegate",required:!0,type:{name:"String"}},stake:{serializedName:"stake",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}}}}},Zb={type:{name:"Composite",className:"PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},ex={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlockExtended"}}}}}}},tx={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},nx={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlockExtended"}}}}}}},rx={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},ax={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},ix={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},sx={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},ox={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}},claimsCount:{serializedName:"claims_count",type:{name:"Number"}}}}},cx={type:{name:"Composite",className:"Auction",modelProperties:{auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},claimsCount:{serializedName:"claims_count",required:!0,type:{name:"Number"}}}}},ux={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"AuctionLastBidTx"}}}}},lx={type:{name:"Composite",className:"Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},mx={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},px={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},dx={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},hx={type:{name:"Composite",className:"Components171VsjiSchemasNametxPropertiesTxAllof1",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},fx={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},yx={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},gx={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},Nx={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},wx={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTransferTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},vx={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},bx={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},xx={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},_x={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},Sx={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}}}}},Cx={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},Ax={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}}}}},Px={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Tx={type:{name:"Composite",className:"Components1Viuqa3SchemasOracletxPropertiesTxAllof1",modelProperties:{oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},zx={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},Ix={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},Ex={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Mx={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},qx={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Rx={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleQuery"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_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"}}}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},Ox={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},kx={type:{name:"Composite",className:"Stats",modelProperties:{minersCount:{serializedName:"miners_count",type:{name:"Number"}},feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},Bx={type:{name:"Composite",className:"PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Ux={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}}}}},Gx={type:{name:"Composite",className:"Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},$x={type:{name:"Composite",className:"Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Vx={type:{name:"Composite",className:"Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Dx={type:{name:"Composite",className:"Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},Lx={type:{name:"Composite",className:"DeltaStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}}}}},jx={type:{name:"Composite",className:"Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Fx={type:{name:"Composite",className:"Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Hx={type:{name:"Composite",className:"Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},Jx={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},Wx={type:{name:"Composite",className:"PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Kx={type:{name:"Composite",className:"Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},Yx={type:{name:"Composite",className:"TotalStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},Qx={type:{name:"Composite",className:"Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Xx={type:{name:"Composite",className:"Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},Zx={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"}}}}},e_={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"}}}}},t_={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},n_={type:{name:"Composite",className:"PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"PendingTransaction"}}}}}}},r_={type:{name:"Composite",className:"PendingTransaction",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},failures:{serializedName:"failures",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},a_={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},i_={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["reward_dev","reward_block"]}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},s_={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},o_={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},c_={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}}}}},u_={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},l_={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},m_={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},p_={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},d_={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},h_={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},f_={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},y_={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},g_={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},N_={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},w_={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},v_={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},b_={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},x_={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},__={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},S_={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},C_={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},A_={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},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"}}}}},P_={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},T_={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},z_={type:{name:"Composite",className:"Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...gv.type.modelProperties,...Pv.type.modelProperties}}},I_={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...zv.type.modelProperties,...Pv.type.modelProperties}}},E_={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Ev.type.modelProperties}}},M_={type:{name:"Composite",className:"PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...qv.type.modelProperties,...Pv.type.modelProperties}}},q_={type:{name:"Composite",className:"Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kv.type.modelProperties,...Pv.type.modelProperties}}},R_={type:{name:"Composite",className:"Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...$v.type.modelProperties,...Pv.type.modelProperties}}},O_={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...yb.type.modelProperties,...Pv.type.modelProperties}}},k_={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nb.type.modelProperties,...Pv.type.modelProperties}}},B_={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...vb.type.modelProperties,...Pv.type.modelProperties}}},U_={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...xb.type.modelProperties,...Pv.type.modelProperties}}},G_={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Sb.type.modelProperties,...Pv.type.modelProperties}}},$_={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...Ab.type.modelProperties,...Pv.type.modelProperties}}},V_={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...zb.type.modelProperties,...Pv.type.modelProperties}}},D_={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...Pv.type.modelProperties,...Mb.type.modelProperties}}},L_={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Rb.type.modelProperties,...Pv.type.modelProperties}}},j_={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...kb.type.modelProperties,...Pv.type.modelProperties}}},F_={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ub.type.modelProperties,...Pv.type.modelProperties}}},H_={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Db.type.modelProperties,...Pv.type.modelProperties}}},J_={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Lb.type.modelProperties,...Pv.type.modelProperties}}},W_={type:{name:"Composite",className:"Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema",modelProperties:{...jb.type.modelProperties,...Pv.type.modelProperties}}},K_={type:{name:"Composite",className:"Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema",modelProperties:{...Jb.type.modelProperties,...Pv.type.modelProperties}}},Y_={type:{name:"Composite",className:"Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kb.type.modelProperties,...Pv.type.modelProperties}}},Q_={type:{name:"Composite",className:"Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qb.type.modelProperties,...Pv.type.modelProperties}}},X_={type:{name:"Composite",className:"Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zb.type.modelProperties,...Pv.type.modelProperties}}},Z_={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...ex.type.modelProperties,...Pv.type.modelProperties}}},eS={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...nx.type.modelProperties,...Pv.type.modelProperties}}},tS={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...ax.type.modelProperties,...Pv.type.modelProperties}}},nS={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...sx.type.modelProperties,...Pv.type.modelProperties}}},rS={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...fx.type.modelProperties,...Pv.type.modelProperties}}},aS={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gx.type.modelProperties,...Pv.type.modelProperties}}},iS={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Nx.type.modelProperties,...Pv.type.modelProperties}}},sS={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...bx.type.modelProperties,...Pv.type.modelProperties}}},oS={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{..._x.type.modelProperties,...Pv.type.modelProperties}}},cS={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...zx.type.modelProperties,...Pv.type.modelProperties}}},uS={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Mx.type.modelProperties,...Pv.type.modelProperties}}},lS={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Ox.type.modelProperties,...Pv.type.modelProperties}}},mS={type:{name:"Composite",className:"PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Bx.type.modelProperties,...Pv.type.modelProperties}}},pS={type:{name:"Composite",className:"Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Gx.type.modelProperties,...Pv.type.modelProperties}}},dS={type:{name:"Composite",className:"Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...$x.type.modelProperties,...Pv.type.modelProperties}}},hS={type:{name:"Composite",className:"PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Vx.type.modelProperties,...Pv.type.modelProperties}}},fS={type:{name:"Composite",className:"Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema",modelProperties:{...Dx.type.modelProperties,...Pv.type.modelProperties}}},yS={type:{name:"Composite",className:"Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema",modelProperties:{...jx.type.modelProperties,...Pv.type.modelProperties}}},gS={type:{name:"Composite",className:"PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema",modelProperties:{...Fx.type.modelProperties,...Pv.type.modelProperties}}},NS={type:{name:"Composite",className:"PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema",modelProperties:{...Hx.type.modelProperties,...Pv.type.modelProperties}}},wS={type:{name:"Composite",className:"PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wx.type.modelProperties,...Pv.type.modelProperties}}},vS={type:{name:"Composite",className:"PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema",modelProperties:{...Kx.type.modelProperties,...Pv.type.modelProperties}}},bS={type:{name:"Composite",className:"Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Qx.type.modelProperties,...Pv.type.modelProperties}}},xS={type:{name:"Composite",className:"Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...Xx.type.modelProperties,...Pv.type.modelProperties}}},_S={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...t_.type.modelProperties,...Pv.type.modelProperties}}},SS={type:{name:"Composite",className:"PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema",modelProperties:{...n_.type.modelProperties,...Pv.type.modelProperties}}},CS={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...a_.type.modelProperties,...Pv.type.modelProperties}}},AS={type:{name:"Composite",className:"AuctionLastBidTx",modelProperties:{...Uv.type.modelProperties,...lx.type.modelProperties}}},PS={type:{name:"Composite",className:"KeyBlockExtended",modelProperties:{...tx.type.modelProperties,beneficiaryReward:{serializedName:"beneficiary_reward",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}}}}},TS={type:{name:"Composite",className:"MicroBlockExtended",modelProperties:{...rx.type.modelProperties,microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},gas:{serializedName:"gas",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}}}}},zS={type:{name:"Composite",className:"NameTxTx",modelProperties:{...dx.type.modelProperties,...hx.type.modelProperties}}},IS={type:{name:"Composite",className:"OracleTxTx",modelProperties:{...Px.type.modelProperties,...Tx.type.modelProperties}}};let ES={"OffChainUpdate.OffChainUpdate":xv};class MS extends mo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-middleware/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},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({accountId:e,options:t},RS)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},OS)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},kS)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},BS)}getAccountNameClaims(e,t){return this.sendOperationRequest({accountId:e,options:t},US)}getAccountPointees(e,t){return this.sendOperationRequest({accountId:e,options:t},GS)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({accountId:e,options:t},$S)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},VS)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},DS)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},LS)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},jS)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},FS)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},HS)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},JS)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},WS)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},KS)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},YS)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},QS)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},XS)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},ZS)}getChannels(e){return this.sendOperationRequest({options:e},eC)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},tC)}getContractCalls(e){return this.sendOperationRequest({options:e},nC)}getContractLogs(e){return this.sendOperationRequest({options:e},rC)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},aC)}getDexSwaps(e){return this.sendOperationRequest({options:e},iC)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},sC)}getEpochs(e){return this.sendOperationRequest({options:e},oC)}getEpochTop(e){return this.sendOperationRequest({options:e},cC)}getSchedules(e){return this.sendOperationRequest({options:e},uC)}getSchedule(e,t){return this.sendOperationRequest({height:e,options:t},lC)}getValidators(e){return this.sendOperationRequest({options:e},mC)}getValidator(e,t){return this.sendOperationRequest({validator:e,options:t},pC)}getValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},dC)}getTopValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},hC)}getKeyBlocks(e){return this.sendOperationRequest({options:e},fC)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},yC)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},gC)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},NC)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},wC)}getNames(e){return this.sendOperationRequest({options:e},vC)}getNamesAuctions(e){return this.sendOperationRequest({options:e},bC)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},xC)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},_C)}getNamesCount(e){return this.sendOperationRequest({options:e},SC)}getName(e,t){return this.sendOperationRequest({id:e,options:t},CC)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},AC)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},PC)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},TC)}getOracles(e){return this.sendOperationRequest({options:e},zC)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},IC)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},EC)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},MC)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},qC)}getStats(e){return this.sendOperationRequest({options:e},RC)}getActiveAccountsStats(e){return this.sendOperationRequest({options:e},OC)}getAex9TransfersStats(e){return this.sendOperationRequest({options:e},kC)}getBlocksStats(e){return this.sendOperationRequest({options:e},BC)}getContractsStats(e){return this.sendOperationRequest({options:e},UC)}getDeltaStats(e){return this.sendOperationRequest({options:e},GC)}getDifficultyStats(e){return this.sendOperationRequest({options:e},$C)}getHashrateStats(e){return this.sendOperationRequest({options:e},VC)}getMinerStats(e){return this.sendOperationRequest({options:e},DC)}getNamesStats(e){return this.sendOperationRequest({options:e},LC)}getTotalStats(e){return this.sendOperationRequest({options:e},jC)}getTotalAccountsStats(e){return this.sendOperationRequest({options:e},FC)}getTransactionsStats(e){return this.sendOperationRequest({options:e},HC)}getStatus(e){return this.sendOperationRequest({options:e},JC)}getTransactions(e){return this.sendOperationRequest({options:e},WC)}getTransactionsCount(e){return this.sendOperationRequest({options:e},KC)}getPendingTransactions(e){return this.sendOperationRequest({options:e},YC)}getPendingTransactionsCount(e){return this.sendOperationRequest({options:e},QC)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},XC)}getTransfers(e){return this.sendOperationRequest({options:e},ZC)}}const qS=yo(m,!1),RS={path:"/v3/accounts/{accountId}/activities",httpMethod:"GET",responses:{200:{bodyMapper:z_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["transactions","aexn","aex9","aex141","contract","transfers","claims","swaps"]}}},Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},OS={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:I_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Gw],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},kS={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:E_},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},BS={path:"/v3/accounts/{accountId}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:M_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},US={path:"/v3/accounts/{accountId}/names/claims",httpMethod:"GET",responses:{200:{bodyMapper:q_},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},GS={path:"/v3/accounts/{accountId}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:R_},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},$S={path:"/v3/accounts/{accountId}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:Lv},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,kw],headerParameters:[Rw],serializer:qS},VS={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:O_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}},$w,Vw],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},DS={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:k_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qS},LS={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:B_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qS},jS={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:U_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qS},FS={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:_b},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,Dw,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qS},HS={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:G_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Lw,jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qS},JS={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:gb},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qS},WS={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:$_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,$w,Vw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},KS={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:Tb}},urlParameters:[Ow],headerParameters:[Rw],serializer:qS},YS={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:V_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Hw,Jw],urlParameters:[Ow,Dw],headerParameters:[Rw],serializer:qS},QS={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:Eb},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Ww],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qS},XS={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:D_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,kw,Dw],headerParameters:[Rw],serializer:qS},ZS={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Pb},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qS},eC={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:L_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"Enum",allowedValues:["active","inactive"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},tC={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Ob},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,Kw],headerParameters:[Rw],serializer:qS},nC={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:j_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},rC={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:F_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,Yw,{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"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},aC={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:$b},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,Fw],headerParameters:[Rw],serializer:qS},iC={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:H_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},sC={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:J_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Qw],headerParameters:[Rw],serializer:qS},oC={path:"/v3/hyperchain/epochs",httpMethod:"GET",responses:{200:{bodyMapper:W_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Xw],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},cC={path:"/v3/hyperchain/epochs/top",httpMethod:"GET",responses:{200:{bodyMapper:Fb},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qS},uC={path:"/v3/hyperchain/schedule",httpMethod:"GET",responses:{200:{bodyMapper:K_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},lC={path:"/v3/hyperchain/schedule/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Wb},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,{parameterPath:"height",mapper:{serializedName:"height",required:!0,type:{name:"Number"}}}],headerParameters:[Rw],serializer:qS},mC={path:"/v3/hyperchain/validators",httpMethod:"GET",responses:{200:{bodyMapper:Y_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},pC={path:"/v3/hyperchain/validators/{validator}",httpMethod:"GET",responses:{200:{bodyMapper:Yb},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qS},dC={path:"/v3/hyperchain/validators/{validator}/delegates",httpMethod:"GET",responses:{200:{bodyMapper:Q_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qS},hC={path:"/v3/hyperchain/validators/{validator}/delegates/top",httpMethod:"GET",responses:{200:{bodyMapper:X_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Xw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,Zw],headerParameters:[Rw],serializer:qS},fC={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:Z_},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},yC={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:PS},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qS},gC={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:eS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,ev],headerParameters:[Rw],serializer:qS},NC={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:TS},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qS},wC={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:tS},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow,tv],headerParameters:[Rw],serializer:qS},vC={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:nS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,$w,Hw,nv,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},bC={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:rS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},xC={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:cx},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},_C={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:yx},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},SC={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Tv,isError:!0}},queryParameters:[nv],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},CC={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:ox},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},AC={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:aS},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},PC={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:iS},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},TC={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:sS},404:{bodyMapper:Gv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow,av],headerParameters:[Rw],serializer:qS},zC={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:oS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,rv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},IC={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Sx},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qS},EC={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:cS},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qS},MC={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:uS},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qS},qC={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:lS},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,iv],headerParameters:[Rw],serializer:qS},RC={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:kx},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qS},OC={path:"/v3/stats/active-accounts",httpMethod:"GET",responses:{200:{bodyMapper:mS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},kC={path:"/v3/stats/aex9-transfers",httpMethod:"GET",responses:{200:{bodyMapper:pS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},sv,ov,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},BC={path:"/v3/stats/blocks",httpMethod:"GET",responses:{200:{bodyMapper:dS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["key","micro"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},UC={path:"/v3/stats/contracts",httpMethod:"GET",responses:{200:{bodyMapper:hS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},GC={path:"/v3/stats/delta",httpMethod:"GET",responses:{200:{bodyMapper:fS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},$C={path:"/v3/stats/difficulty",httpMethod:"GET",responses:{200:{bodyMapper:yS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},VC={path:"/v3/stats/hashrate",httpMethod:"GET",responses:{200:{bodyMapper:gS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},DC={path:"/v3/stats/miners",httpMethod:"GET",responses:{200:{bodyMapper:NS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},LC={path:"/v3/stats/names",httpMethod:"GET",responses:{200:{bodyMapper:wS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},jC={path:"/v3/stats/total",httpMethod:"GET",responses:{200:{bodyMapper:vS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},FC={path:"/v3/stats/total-accounts",httpMethod:"GET",responses:{200:{bodyMapper:bS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},HC={path:"/v3/stats/transactions",httpMethod:"GET",responses:{200:{bodyMapper:xS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,sv,ov,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},cv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},JC={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Zx}},urlParameters:[Ow],headerParameters:[Rw],serializer:qS},WC={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:_S},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Gw,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel_close_mutual","channel_close_solo","channel_create","channel_deposit","channel_force_progress","channel_offchain","channel_settle","channel_slash","channel_snapshot_solo","channel_withdraw","contract_call","contract_create","ga_attach","ga_meta","name_claim","name_preclaim","name_revoke","name_transfer","name_update","oracle_extend","oracle_query","oracle_register","oracle_response","paying_for","spend"]}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel","contract","ga","name","oracle","paying_for","spend"]}}}},collectionFormat:"Multi"},uv,lv,mv,pv,dv,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},hv,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},KC={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[Uw,cv,fv],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},YC={path:"/v3/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:SS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},QC={path:"/v3/transactions/pending/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:Tv,isError:!0}},urlParameters:[Ow],headerParameters:[Rw],serializer:qS},XC={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ix},400:{bodyMapper:Tv,isError:!0},404:{bodyMapper:Gv,isError:!0}},urlParameters:[Ow,yv],headerParameters:[Rw],serializer:qS},ZC={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:CS},400:{bodyMapper:Tv,isError:!0}},queryParameters:[Bw,Uw,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[Ow],headerParameters:[Rw],serializer:qS},eA=[RS,OS,kS,BS,US,GS,$S,VS,DS,LS,jS,FS,HS,JS,WS,KS,YS,QS,ZS,eC,tC,nC,rC,aC,iC,sC,oC,cC,uC,lC,mC,pC,dC,hC,fC,yC,gC,NC,wC,vC,bC,xC,_C,SC,CC,AC,PC,TC,zC,IC,EC,MC,qC,RC,OC,kC,BC,UC,GC,$C,VC,DC,LC,jC,FC,HC,JC,WC,KC,YC,QC,XC,ZC];function tA(e,t){return e.get(nA(e,t))}function nA(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")}class rA extends q{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var aA=new WeakMap;class iA{constructor(e,t){var n,r;(function(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)})(this,aA,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=aA).set(nA(n,this),r)}async next(){if(null==this.nextPath)throw new rA(!0);return tA(aA,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new rA(!1);return tA(aA,this).requestByPath(this.prevPath)}}class sA extends MS{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){let i;super(e,{allowInsecureConnection:!0,additionalPolicies:[Co("middleware",(async e=>(null!=i||(i=(await this.getStatus(e)).mdwVersion),i)),"1.81.0","2.0.0",t),bo(),xo(),Ao(n,r),So((e=>` ${e.error}`))],...a}),this.pipeline.addPolicy(vo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:In}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),a=eA.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new ae(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==a)throw new F(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...a,path:n,urlParameters:a.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new iA(n,this):n}}var oA=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class cA{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ye("You already connected")}disconnect(){if(!this.isConnected())throw new Qe("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 uA(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)}function lA(e,t){return e.get(pA(e,t))}function mA(e,t,n){return e.set(pA(e,t),n),n}function pA(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 dA=new WeakMap,hA=new WeakMap,fA=new WeakMap;class yA extends cA{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:a=Bh.to_aepp,...i}={}){super(i),uA(this,dA,void 0),uA(this,hA,void 0),uA(this,fA,void 0),mA(hA,this,e),mA(fA,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=a}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!=lA(hA,this)&&lA(hA,this)!==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)},lA(fA,this).addEventListener("message",this.listener),mA(dA,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==lA(dA,this))throw new ae("Expected to not happen, required for TS");lA(fA,this).removeEventListener("message",this.listener),delete this.listener,lA(dA,this).call(this),mA(dA,this,void 0)}sendMessage(e){var t;if(null==lA(hA,this))throw new Xe("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),lA(hA,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var gA=(e,t)=>{if(null==window)throw new Z("Window object not found, you can run wallet detector only in browser");const n={};return e.connect((({method:e,params:r},a,i)=>{if(e!==$h.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new yA({target:i,..."extension"===r.type?{sendDirection:Bh.to_waellet,receiveDirection:Bh.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function NA(e,t,n){return e.set(vA(e,t),n),n}function wA(e,t){return e.get(vA(e,t))}function vA(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 bA=new WeakMap;class xA extends cA{constructor({port:e,...t}){var n,r,a;super(t),a=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=bA),r.set(n,a),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==wA(bA,this))throw new ie;this.port.onMessage.removeListener(wA(bA,this)[0]),this.port.onDisconnect.removeListener(wA(bA,this)[1]),NA(bA,this,void 0)}connect(e,t){super.connect(e,t),NA(bA,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(wA(bA,this)[0]),this.port.onDisconnect.addListener(wA(bA,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=wA(bA,this)}}}(),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={7526:function(e,t){"use strict";t.byteLength=function(e){var t=o(e),n=t[0],r=t[1];return 3*(n+r)/4-r},t.toByteArray=function(e){var t,n,i=o(e),s=i[0],c=i[1],u=new a(function(e,t,n){return 3*(t+n)/4-n}(0,s,c)),l=0,m=c>0?s-4:s;for(n=0;n<m;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,a=r%3,i=[],s=16383,o=0,u=r-a;o<u;o+=s)i.push(c(e,o,o+s>u?u:o+s));return 1===a?(t=e[r-1],i.push(n[t>>2]+n[t<<4&63]+"==")):2===a&&(t=(e[r-2]<<8)+e[r-1],i.push(n[t>>10]+n[t>>4&63]+n[t<<2&63]+"=")),i.join("")};for(var n=[],r=[],a="undefined"!=typeof Uint8Array?Uint8Array:Array,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)n[s]=i[s],r[i.charCodeAt(s)]=s;function o(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 a,i,s=[],o=t;o<r;o+=3)a=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),s.push(n[(i=a)>>18&63]+n[i>>12&63]+n[i>>6&63]+n[63&i]);return s.join("")}r["-".charCodeAt(0)]=62,r["_".charCodeAt(0)]=63},1594:function(e,t,n){var r;!function(){"use strict";var a,i=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,s=Math.ceil,o=Math.floor,c="[BigNumber Error] ",u=c+"Number primitive has more than 15 significant digits: ",l=1e14,m=14,p=9007199254740991,d=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],h=1e7,f=1e9;function y(e){var t=0|e;return e>0||e===t?t:t-1}function g(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=m-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function N(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function w(e,t,n,r){if(e<t||e>n||e!==o(e))throw Error(c+(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 y(e.e/m)==t&&e.c[t]%2!=0}function b(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function x(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}a=function e(t){var n,r,a,_,P,C,A,S,T,z,E=j.prototype={constructor:j,toString:null,valueOf:null},I=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,G=!1,$=1,U=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,s,c,l,d,h,f,y,g=this;if(!(g instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return g.s=e.s,void(!e.c||e.e>B?g.c=g.e=null:e.e<k?g.c=[g.e=0]:(g.e=e.e,g.c=e.c.slice()));if((h="number"==typeof e)&&0*e==0){if(g.s=1/e<0?(e=-e,-1):1,e===~~e){for(l=0,d=e;d>=10;d/=10,l++);return void(l>B?g.c=g.e=null:(g.e=l,g.c=[e]))}y=String(e)}else{if(!i.test(y=String(e)))return a(g,y,h);g.s=45==y.charCodeAt(0)?(y=y.slice(1),-1):1}(l=y.indexOf("."))>-1&&(y=y.replace(".","")),(d=y.search(/e/i))>0?(l<0&&(l=d),l+=+y.slice(d+1),y=y.substring(0,d)):l<0&&(l=y.length)}else{if(w(t,2,D.length,"Base"),10==t&&L)return W(g=new j(e),M+g.e+1,q);if(y=String(e),h="number"==typeof e){if(0*e!=0)return a(g,y,h,t);if(g.s=1/e<0?(y=y.slice(1),-1):1,j.DEBUG&&y.replace(/^0\.0*|\./,"").length>15)throw Error(u+e)}else g.s=45===y.charCodeAt(0)?(y=y.slice(1),-1):1;for(n=D.slice(0,t),l=d=0,f=y.length;d<f;d++)if(n.indexOf(s=y.charAt(d))<0){if("."==s){if(d>l){l=f;continue}}else if(!c&&(y==y.toUpperCase()&&(y=y.toLowerCase())||y==y.toLowerCase()&&(y=y.toUpperCase()))){c=!0,d=-1,l=0;continue}return a(g,String(e),h,t)}h=!1,(l=(y=r(y,t,10,g.s)).indexOf("."))>-1?y=y.replace(".",""):l=y.length}for(d=0;48===y.charCodeAt(d);d++);for(f=y.length;48===y.charCodeAt(--f););if(y=y.slice(d,++f)){if(f-=d,h&&j.DEBUG&&f>15&&(e>p||e!==o(e)))throw Error(u+g.s*e);if((l=l-d-1)>B)g.c=g.e=null;else if(l<k)g.c=[g.e=0];else{if(g.e=l,g.c=[],d=(l+1)%m,l<0&&(d+=m),d<f){for(d&&g.c.push(+y.slice(0,d)),f-=m;d<f;)g.c.push(+y.slice(d,d+=m));d=m-(y=y.slice(d)).length}else d-=f;for(;d--;y+="0");g.c.push(+y)}}else g.c=[g.e=0]}function H(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:w(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=g(e.c),c=1==r||2==r&&(s<=R||s>=O)?b(c,s):x(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=g(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=b(c,i)}else if(t-=s,c=x(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function F(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=N(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*m-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,c,u,p,h,f,y=e.c,g=d;if(y){e:{for(a=1,u=y[0];u>=10;u/=10,a++);if((i=t-a)<0)i+=m,c=t,p=y[h=0],f=o(p/g[a-c-1]%10);else if((h=s((i+1)/m))>=y.length){if(!r)break e;for(;y.length<=h;y.push(0));p=f=0,a=1,c=(i%=m)-m+1}else{for(p=u=y[h],a=1;u>=10;u/=10,a++);f=(c=(i%=m)-m+a)<0?0:o(p/g[a-c-1]%10)}if(r=r||t<0||null!=y[h+1]||(c<0?p:p%g[a-c-1]),r=n<4?(f||r)&&(0==n||n==(e.s<0?3:2)):f>5||5==f&&(4==n||r||6==n&&(i>0?c>0?p/g[a-c]:0:y[h-1])%10&1||n==(e.s<0?8:7)),t<1||!y[0])return y.length=0,r?(t-=e.e+1,y[0]=g[(m-t%m)%m],e.e=-t||0):y[0]=e.e=0,e;if(0==i?(y.length=h,u=1,h--):(y.length=h+1,u=g[m-i],y[h]=c>0?o(p/g[a-c]%g[c])*u:0),r)for(;;){if(0==h){for(i=1,c=y[0];c>=10;c/=10,i++);for(c=y[0]+=u,u=1;c>=10;c/=10,u++);i!=u&&(e.e++,y[0]==l&&(y[0]=1));break}if(y[h]+=u,y[h]!=l)break;y[h--]=0,u=1}for(i=y.length;0===y[--i];y.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=g(e.c),t=n<=R||n>=O?b(t,n):x(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(c+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(w(n=e[t],0,f,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(w(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(w(n[0],-f,0,t),w(n[1],0,f,t),R=n[0],O=n[1]):(w(n,-f,f,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)w(n[0],-f,-1,t),w(n[1],1,f,t),k=n[0],B=n[1];else{if(w(n,-f,f,t),!n)throw Error(c+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(c+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw G=!n,Error(c+"crypto unavailable");G=n}else G=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(w(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(w(n=e[t],0,f,t),U=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(c+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(c+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:G,MODULO_MODE:$,POW_PRECISION:U,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-f&&a<=f&&a===o(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%m)<1&&(t+=m),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=l||n!==o(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(c+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return F(arguments,-1)},j.minimum=j.min=function(){return F(arguments,1)},j.random=(_=9007199254740992,P=Math.random()*_&2097151?function(){return o(Math.random()*_)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,u=0,l=[],p=new j(I);if(null==e?e=M:w(e,0,f),a=s(e/m),G)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));u<a;)(i=131072*t[u]+(t[u+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[u]=n[0],t[u+1]=n[1]):(l.push(i%1e14),u+=2);u=a/2}else{if(!crypto.randomBytes)throw G=!1,Error(c+"crypto unavailable");for(t=crypto.randomBytes(a*=7);u<a;)(i=281474976710656*(31&t[u])+1099511627776*t[u+1]+4294967296*t[u+2]+16777216*t[u+3]+(t[u+4]<<16)+(t[u+5]<<8)+t[u+6])>=9e15?crypto.randomBytes(7).copy(t,u):(l.push(i%1e14),u+=7);u=a/7}if(!G)for(;u<a;)(i=P())<9e15&&(l[u++]=i%1e14);for(a=l[--u],e%=m,a&&e&&(i=d[m-e],l[u]=o(a/i)*i);0===l[u];l.pop(),u--);if(u<0)l=[r=0];else{for(r=-1;0===l[0];l.splice(0,1),r-=m);for(u=1,i=l[0];i>=10;i/=10,u++);u<m&&(r-=m-u)}return p.e=r,p.c=l,p}),j.sum=function(){for(var e=1,t=arguments,n=new j(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 a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),N=M,w=q;for(y>=0&&(m=U,U=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),U=m,f.c=t(x(g(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,N,w,i)).c,p=d.r,l=d.e),y=h[u=l+N+1],m=i/2,p=p||u<0||null!=h[u+1],p=w<4?(null!=y||p)&&(0==w||w==(d.s<0?3:2)):y>m||y==m&&(4==w||p||6==w&&1&h[u-1]||w==(d.s<0?8:7)),u<1||!h[0])r=p?x(c.charAt(1),-N,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=x(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%h,l=t/h|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%h)+(r=l*i+(s=e[c]/h|0)*u)%h*h+o)/n|0)+(r/h|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,c){var u,p,d,h,f,g,N,w,v,b,x,_,P,C,A,S,T,z=r.s==a.s?1:-1,E=r.c,I=a.c;if(!(E&&E[0]&&I&&I[0]))return new j(r.s&&a.s&&(E?!I||E[0]!=I[0]:I)?E&&0==E[0]||!I?0*z:z/0:NaN);for(v=(w=new j(z)).c=[],z=i+(p=r.e-a.e)+1,c||(c=l,p=y(r.e/m)-y(a.e/m),z=z/m|0),d=0;I[d]==(E[d]||0);d++);if(I[d]>(E[d]||0)&&p--,z<0)v.push(1),h=!0;else{for(C=E.length,S=I.length,d=0,z+=2,(f=o(c/(I[0]+1)))>1&&(I=e(I,f,c),E=e(E,f,c),S=I.length,C=E.length),P=S,x=(b=E.slice(0,S)).length;x<S;b[x++]=0);T=I.slice(),T=[0].concat(T),A=I[0],I[1]>=c/2&&A++;do{if(f=0,(u=t(I,b,S,x))<0){if(_=b[0],S!=x&&(_=_*c+(b[1]||0)),(f=o(_/A))>1)for(f>=c&&(f=c-1),N=(g=e(I,f,c)).length,x=b.length;1==t(g,b,N,x);)f--,n(g,S<N?T:I,N,c),N=g.length,u=1;else 0==f&&(u=f=1),N=(g=I.slice()).length;if(N<x&&(g=[0].concat(g)),n(b,g,x,c),x=b.length,-1==u)for(;t(I,b,S,x)<1;)f++,n(b,S<x?T:I,x,c),x=b.length}else 0===u&&(f++,b=[0]);v[d++]=f,b[0]?b[x++]=E[P]||0:(b=[E[P]],x=1)}while((P++<C||null!=b[0])&&z--);h=null!=b[0],v[0]||v.splice(0,1)}if(c==l){for(d=1,z=v[0];z>=10;z/=10,d++);W(w,i+(w.e=d+p*m-1)+1,s,h)}else w.e=p,w.r=+h;return w}}(),C=/^(-?)0([xbo])(?=\w[\w.]*$)/i,A=/^([^.]+)\.$/,S=/^\.([^.]+)$/,T=/^-?(Infinity|NaN)$/,z=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(z,"");if(T.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(C,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(A,"$1").replace(S,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(c+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return N(this,new j(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a,i=this;if(null!=e)return w(e,0,f),null==t?t=q:w(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-y(this.e/m))*m,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new j(e,t),M,q)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new j(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,i,u,l,p,d,h=this;if((e=new j(e)).c&&!e.isInteger())throw Error(c+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),u=e.e>14,!h.c||!h.c[0]||1==h.c[0]&&!h.e&&1==h.c.length||!e.c||!e.c[0])return d=new j(Math.pow(+K(h),u?e.s*(2-v(e)):+K(e))),t?d.mod(t):d;if(l=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!l&&h.isInteger()&&t.isInteger())&&(h=h.mod(t))}else{if(e.e>9&&(h.e>0||h.e<-1||(0==h.e?h.c[0]>1||u&&h.c[1]>=24e7:h.c[0]<8e13||u&&h.c[0]<=9999975e7)))return i=h.s<0&&v(e)?-0:0,h.e>-1&&(i=1/i),new j(l?1/i:i);U&&(i=s(U/m+2))}for(u?(n=new j(.5),l&&(e.s=1),p=v(e)):p=(a=Math.abs(+K(e)))%2,d=new j(I);;){if(p){if(!(d=d.times(h)).c)break;i?d.c.length>i&&(d.c.length=i):r&&(d=d.mod(t))}if(a){if(0===(a=o(a/2)))break;p=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)p=v(e);else{if(0==(a=+K(e)))break;p=a%2}h=h.times(h),i?h.c&&h.c.length>i&&(h.c.length=i):r&&(h=h.mod(t))}return r?d:(l&&(d=I.div(d)),t?d.mod(t):i?W(d,U,q,void 0):d)},E.integerValue=function(e){var t=new j(this);return null==e?e=q:w(e,0,8),W(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===N(this,new j(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return N(this,new j(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=N(this,new j(e,t)))||0===t},E.isInteger=function(){return!!this.c&&y(this.e/m)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return N(this,new j(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=N(this,new j(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/m,u=e.e/m,p=s.c,d=e.c;if(!c||!u){if(!p||!d)return p?(e.s=-t,e):new j(d?s:NaN);if(!p[0]||!d[0])return d[0]?(e.s=-t,e):new j(p[0]?s:3==q?-0:0)}if(c=y(c),u=y(u),p=p.slice(),o=c-u){for((i=o<0)?(o=-o,a=p):(u=c,a=d),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=p.length)<(t=d.length))?o:t,o=t=0;t<r;t++)if(p[t]!=d[t]){i=p[t]<d[t];break}if(i&&(a=p,p=d,d=a,e.s=-e.s),(t=(r=d.length)-(n=p.length))>0)for(;t--;p[n++]=0);for(t=l-1;r>o;){if(p[--r]<d[r]){for(n=r;n&&!p[--n];p[n]=t);--p[n],p[r]+=l}p[r]-=d[r]}for(;0==p[0];p.splice(0,1),--u);return p[0]?J(e,p,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,i,s,o,c,u,p,d,f,g,N,w,v,b=this,x=b.c,_=(e=new j(e,t)).c;if(!(x&&_&&x[0]&&_[0]))return!b.s||!e.s||x&&!x[0]&&!_||_&&!_[0]&&!x?e.c=e.e=e.s=null:(e.s*=b.s,x&&_?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=y(b.e/m)+y(e.e/m),e.s*=b.s,(c=x.length)<(d=_.length)&&(N=x,x=_,_=N,a=c,c=d,d=a),a=c+d,N=[];a--;N.push(0));for(w=l,v=h,a=d;--a>=0;){for(n=0,f=_[a]%v,g=_[a]/v|0,i=a+(s=c);i>a;)n=((u=f*(u=x[--s]%v)+(o=g*u+(p=x[s]/v|0)*f)%v*v+N[i]+n)/w|0)+(o/v|0)+g*p,N[i--]=u%w;N[i]=n}return n?++r:N.splice(0,1),J(e,N,r)},E.negated=function(){var e=new j(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/m,s=e.e/m,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=y(i),s=y(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/l|0,o[t]=l===o[t]?0:o[t]%l;return a&&(o=[a].concat(o),++s),J(e,o,s)},E.precision=E.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return w(e,1,f),null==t?t=q:w(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*m+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},E.shiftedBy=function(e){return w(e,-9007199254740991,p),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=g(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=y((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),g(i.c).slice(0,c)===(t=g(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},E.toExponential=function(e,t){return null!=e&&(w(e,0,f),e++),H(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(w(e,0,f),e=e+this.e+1),H(this,e,t)},E.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(c+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,u=+n.secondaryGroupSize,l=n.groupSeparator||"",m=s[0],p=s[1],d=a.s<0,h=d?m.slice(1):m,f=h.length;if(u&&(i=o,o=u,u=i,f-=i),o>0&&f>0){for(i=f%o||o,m=h.substr(0,i);i<f;i+=o)m+=l+h.substr(i,o);u>0&&(m+=l+h.slice(i)),d&&(m="-"+m)}r=p?m+(n.decimalSeparator||"")+((u=+n.fractionGroupSize)?p.replace(new RegExp("\\d{"+u+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):p):m}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,i,s,o,u,l,p,h,f,y,N=this,w=N.c;if(null!=e&&(!(u=new j(e)).isInteger()&&(u.c||1!==u.s)||u.lt(I)))throw Error(c+"Argument "+(u.isInteger()?"out of range: ":"not an integer: ")+K(u));if(!w)return new j(N);for(t=new j(I),p=r=new j(I),a=l=new j(I),y=g(w),s=t.e=y.length-N.e-1,t.c[0]=d[(o=s%m)<0?m+o:o],e=!e||u.comparedTo(t)>0?s>0?t:p:u,o=B,B=1/0,u=new j(y),l.c[0]=0;h=n(u,t,0,1),1!=(i=r.plus(h.times(a))).comparedTo(e);)r=a,a=i,p=l.plus(h.times(i=p)),l=i,t=u.minus(h.times(i=t)),u=i;return i=n(e.minus(r),a,0,1),l=l.plus(i.times(p)),r=r.plus(i.times(a)),l.s=p.s=N.s,f=n(p,a,s*=2,q).minus(N).abs().comparedTo(n(l,r,s,q).minus(N).abs())<1?[p,a]:[l,r],B=o,f},E.toNumber=function(){return+K(this)},E.toPrecision=function(e,t){return null!=e&&w(e,1,f),H(this,e,t,2)},E.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?b(g(n.c),i):x(g(n.c),i,"0"):10===e&&L?t=x(g((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(w(e,2,D.length,"Base"),t=r(x(g(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return K(this)},E._isBigNumber=!0,null!=t&&j.set(t),j}(),a.default=a.BigNumber=a,void 0===(r=function(){return a}.call(t,n,t,e))||(e.exports=r)}()},4156:function(e,t,n){const r=n(829);function a(e,t,n){const r=e[t]+e[n];let a=e[t+1]+e[n+1];r>=4294967296&&a++,e[t]=r,e[t+1]=a}function i(e,t,n,r){let a=e[t]+n;n<0&&(a+=4294967296);let i=e[t+1]+r;a>=4294967296&&i++,e[t]=a,e[t+1]=i}function s(e,t){return e[t]^e[t+1]<<8^e[t+2]<<16^e[t+3]<<24}function o(e,t,n,r,s,o){const c=m[s],u=m[s+1],p=m[o],d=m[o+1];a(l,e,t),i(l,e,c,u);let h=l[r]^l[e],f=l[r+1]^l[e+1];l[r]=f,l[r+1]=h,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=h>>>24^f<<8,l[t+1]=f>>>24^h<<8,a(l,e,t),i(l,e,p,d),h=l[r]^l[e],f=l[r+1]^l[e+1],l[r]=h>>>16^f<<16,l[r+1]=f>>>16^h<<16,a(l,n,r),h=l[t]^l[n],f=l[t+1]^l[n+1],l[t]=f>>>31^h<<1,l[t+1]=h>>>31^f<<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),m=new Uint32Array(32);function p(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++)m[n]=s(e.b,4*n);for(n=0;n<12;n++)o(0,8,16,24,u[16*n+0],u[16*n+1]),o(2,10,18,26,u[16*n+2],u[16*n+3]),o(4,12,20,28,u[16*n+4],u[16*n+5]),o(6,14,22,30,u[16*n+6],u[16*n+7]),o(0,10,20,30,u[16*n+8],u[16*n+9]),o(2,12,22,24,u[16*n+10],u[16*n+11]),o(4,14,16,26,u[16*n+12],u[16*n+13]),o(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 d=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 h(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 a={b:new Uint8Array(128),h:new Uint32Array(16),t:0,c:0,outlen:e};d.fill(0),d[0]=e,t&&(d[1]=t.length),d[2]=1,d[3]=1,n&&d.set(n,32),r&&d.set(r,48);for(let e=0;e<16;e++)a.h[e]=c[e]^s(d,4*e);return t&&(f(a,t),a.c=128),a}function f(e,t){for(let n=0;n<t.length;n++)128===e.c&&(e.t+=e.c,p(e,!1),e.c=0),e.b[e.c++]=t[n]}function y(e){for(e.t+=e.c;e.c<128;)e.b[e.c++]=0;p(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 g(e,t,n,a,i){n=n||64,e=r.normalizeInput(e),a&&(a=r.normalizeInput(a)),i&&(i=r.normalizeInput(i));const s=h(n,t,a,i);return f(s,e),y(s)}e.exports={blake2b:g,blake2bHex:function(e,t,n,a,i){const s=g(e,t,n,a,i);return r.toHex(s)},blake2bInit:h,blake2bUpdate:f,blake2bFinal:y}},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 a="\n"+e+" = ";for(let i=0;i<n.length;i+=2){if(32===r)a+=t(n[i]).toUpperCase(),a+=" ",a+=t(n[i+1]).toUpperCase();else{if(64!==r)throw new Error("Invalid size "+r);a+=t(n[i+1]).toUpperCase(),a+=t(n[i]).toUpperCase()}i%6==4?a+="\n"+new Array(e.length+4).join(" "):i<n.length-2&&(a+=" ")}console.log(a)},testSpeed:function(e,t,n){let r=(new Date).getTime();const a=new Uint8Array(t);for(let e=0;e<t;e++)a[e]=e%256;const i=(new Date).getTime();console.log("Generated random input in "+(i-r)+"ms"),r=i;for(let i=0;i<n;i++){const n=e(a),i=(new Date).getTime(),s=i-r;r=i,console.log("Hashed in "+s+"ms: "+n.substring(0,20)+"..."),console.log(Math.round(t/(1<<20)/(s/1e3)*100)/100+" MB PER SECOND")}}}},8287:function(e,t,n){"use strict";const r=n(7526),a=n(251),i="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 s=2147483647;function o(e){if(e>s)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 m(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|f(e,t);let r=o(n);const a=r.write(e,t);return a!==n&&(r=r.slice(0,a)),r}(e,t);if(ArrayBuffer.isView(e))return function(e){if(K(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return p(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(K(e,ArrayBuffer)||e&&K(e.buffer,ArrayBuffer))return d(e,t,n);if("undefined"!=typeof SharedArrayBuffer&&(K(e,SharedArrayBuffer)||e&&K(e.buffer,SharedArrayBuffer)))return d(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 a=function(e){if(c.isBuffer(e)){const t=0|h(e.length),n=o(t);return 0===n.length||e.copy(n,0,0,t),n}return void 0!==e.length?"number"!=typeof e.length||Y(e.length)?o(0):p(e):"Buffer"===e.type&&Array.isArray(e.data)?p(e.data):void 0}(e);if(a)return a;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 m(e){return l(e),o(e<0?0:0|h(e))}function p(e){const t=e.length<0?0:0|h(e.length),n=o(t);for(let r=0;r<t;r+=1)n[r]=255&e[r];return n}function d(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 h(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function f(e,t){if(c.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||K(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 a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return n;case"utf8":case"utf-8":return F(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*n;case"hex":return n>>>1;case"base64":return J(e).length;default:if(a)return r?-1:F(e).length;t=(""+t).toLowerCase(),a=!0}}function y(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 E(this,t,n);case"utf8":case"utf-8":return A(this,t,n);case"ascii":return T(this,t,n);case"latin1":case"binary":return z(this,t,n);case"base64":return C(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,t,n);default:if(r)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),r=!0}}function g(e,t,n){const r=e[t];e[t]=e[n],e[n]=r}function N(e,t,n,r,a){if(0===e.length)return-1;if("string"==typeof n?(r=n,n=0):n>2147483647?n=2147483647:n<-2147483648&&(n=-2147483648),Y(n=+n)&&(n=a?0:e.length-1),n<0&&(n=e.length+n),n>=e.length){if(a)return-1;n=e.length-1}else if(n<0){if(!a)return-1;n=0}if("string"==typeof t&&(t=c.from(t,r)),c.isBuffer(t))return 0===t.length?-1:w(e,t,n,r,a);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?a?Uint8Array.prototype.indexOf.call(e,t,n):Uint8Array.prototype.lastIndexOf.call(e,t,n):w(e,[t],n,r,a);throw new TypeError("val must be string, number or Buffer")}function w(e,t,n,r,a){let i,s=1,o=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;s=2,o/=2,c/=2,n/=2}function u(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(a){let r=-1;for(i=n;i<o;i++)if(u(e,i)===u(t,-1===r?0:i-r)){if(-1===r&&(r=i),i-r+1===c)return r*s}else-1!==r&&(i-=i-r),r=-1}else for(n+c>o&&(n=o-c),i=n;i>=0;i--){let n=!0;for(let r=0;r<c;r++)if(u(e,i+r)!==u(t,r)){n=!1;break}if(n)return i}return-1}function v(e,t,n,r){n=Number(n)||0;const a=e.length-n;r?(r=Number(r))>a&&(r=a):r=a;const i=t.length;let s;for(r>i/2&&(r=i/2),s=0;s<r;++s){const r=parseInt(t.substr(2*s,2),16);if(Y(r))return s;e[n+s]=r}return s}function b(e,t,n,r){return W(F(t,e.length-n),e,n,r)}function x(e,t,n,r){return W(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 _(e,t,n,r){return W(J(t),e,n,r)}function P(e,t,n,r){return W(function(e,t){let n,r,a;const i=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)n=e.charCodeAt(s),r=n>>8,a=n%256,i.push(a),i.push(r);return i}(t,e.length-n),e,n,r)}function C(e,t,n){return 0===t&&n===e.length?r.fromByteArray(e):r.fromByteArray(e.slice(t,n))}function A(e,t,n){n=Math.min(e.length,n);const r=[];let a=t;for(;a<n;){const t=e[a];let i=null,s=t>239?4:t>223?3:t>191?2:1;if(a+s<=n){let n,r,o,c;switch(s){case 1:t<128&&(i=t);break;case 2:n=e[a+1],128==(192&n)&&(c=(31&t)<<6|63&n,c>127&&(i=c));break;case 3:n=e[a+1],r=e[a+2],128==(192&n)&&128==(192&r)&&(c=(15&t)<<12|(63&n)<<6|63&r,c>2047&&(c<55296||c>57343)&&(i=c));break;case 4:n=e[a+1],r=e[a+2],o=e[a+3],128==(192&n)&&128==(192&r)&&128==(192&o)&&(c=(15&t)<<18|(63&n)<<12|(63&r)<<6|63&o,c>65535&&c<1114112&&(i=c))}}null===i?(i=65533,s=1):i>65535&&(i-=65536,r.push(i>>>10&1023|55296),i=56320|1023&i),r.push(i),a+=s}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=s,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?o(e):void 0!==t?"string"==typeof n?o(e).fill(t,n):o(e).fill(t):o(e)}(e,t,n)},c.allocUnsafe=function(e){return m(e)},c.allocUnsafeSlow=function(e){return m(e)},c.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==c.prototype},c.compare=function(e,t){if(K(e,Uint8Array)&&(e=c.from(e,e.offset,e.byteLength)),K(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 a=0,i=Math.min(n,r);a<i;++a)if(e[a]!==t[a]){n=e[a],r=t[a];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 a=0;for(n=0;n<e.length;++n){let t=e[n];if(K(t,Uint8Array))a+t.length>r.length?(c.isBuffer(t)||(t=c.from(t)),t.copy(r,a)):Uint8Array.prototype.set.call(r,t,a);else{if(!c.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(r,a)}a+=t.length}return r},c.byteLength=f,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)g(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)g(this,t,t+3),g(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)g(this,t,t+7),g(this,t+1,t+6),g(this,t+2,t+5),g(this,t+3,t+4);return this},c.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?A(this,0,e):y.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+">"},i&&(c.prototype[i]=c.prototype.inspect),c.prototype.compare=function(e,t,n,r,a){if(K(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===a&&(a=this.length),t<0||n>e.length||r<0||a>this.length)throw new RangeError("out of range index");if(r>=a&&t>=n)return 0;if(r>=a)return-1;if(t>=n)return 1;if(this===e)return 0;let i=(a>>>=0)-(r>>>=0),s=(n>>>=0)-(t>>>=0);const o=Math.min(i,s),u=this.slice(r,a),l=e.slice(t,n);for(let e=0;e<o;++e)if(u[e]!==l[e]){i=u[e],s=l[e];break}return i<s?-1:s<i?1:0},c.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},c.prototype.indexOf=function(e,t,n){return N(this,e,t,n,!0)},c.prototype.lastIndexOf=function(e,t,n){return N(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 a=this.length-t;if((void 0===n||n>a)&&(n=a),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");r||(r="utf8");let i=!1;for(;;)switch(r){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return b(this,e,t,n);case"ascii":case"latin1":case"binary":return x(this,e,t,n);case"base64":return _(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return P(this,e,t,n);default:if(i)throw new TypeError("Unknown encoding: "+r);r=(""+r).toLowerCase(),i=!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 a=t;a<n;++a)r+=String.fromCharCode(127&e[a]);return r}function z(e,t,n){let r="";n=Math.min(e.length,n);for(let a=t;a<n;++a)r+=String.fromCharCode(e[a]);return r}function E(e,t,n){const r=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>r)&&(n=r);let a="";for(let r=t;r<n;++r)a+=Q[e[r]];return a}function I(e,t,n){const r=e.slice(t,n);let a="";for(let e=0;e<r.length-1;e+=2)a+=String.fromCharCode(r[e]+256*r[e+1]);return a}function M(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 q(e,t,n,r,a,i){if(!c.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||t<i)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,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i,i>>=8,e[n++]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,s>>=8,e[n++]=s,n}function O(e,t,n,r,a){D(t,r,a,e,n,7);let i=Number(t&BigInt(4294967295));e[n+7]=i,i>>=8,e[n+6]=i,i>>=8,e[n+5]=i,i>>=8,e[n+4]=i;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[n+3]=s,s>>=8,e[n+2]=s,s>>=8,e[n+1]=s,s>>=8,e[n]=s,n+8}function k(e,t,n,r,a,i){if(n+r>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function B(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,4),a.write(e,t,n,r,23,4),n+4}function G(e,t,n,r,i){return t=+t,n>>>=0,i||k(e,0,n,8),a.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||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return r},c.prototype.readUintBE=c.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e+--t],a=1;for(;t>0&&(a*=256);)r+=this[e+--t]*a;return r},c.prototype.readUint8=c.prototype.readUInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),this[e]},c.prototype.readUint16LE=c.prototype.readUInt16LE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]|this[e+1]<<8},c.prototype.readUint16BE=c.prototype.readUInt16BE=function(e,t){return e>>>=0,t||M(e,2,this.length),this[e]<<8|this[e+1]},c.prototype.readUint32LE=c.prototype.readUInt32LE=function(e,t){return e>>>=0,t||M(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||M(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},c.prototype.readBigUInt64LE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,a=this[++e]+256*this[++e]+65536*this[++e]+n*2**24;return BigInt(r)+(BigInt(a)<<BigInt(32))})),c.prototype.readBigUInt64BE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(e,this.length-8);const r=t*2**24+65536*this[++e]+256*this[++e]+this[++e],a=this[++e]*2**24+65536*this[++e]+256*this[++e]+n;return(BigInt(r)<<BigInt(32))+BigInt(a)})),c.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=this[e],a=1,i=0;for(;++i<t&&(a*=256);)r+=this[e+i]*a;return a*=128,r>=a&&(r-=Math.pow(2,8*t)),r},c.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||M(e,t,this.length);let r=t,a=1,i=this[e+--r];for(;r>0&&(a*=256);)i+=this[e+--r]*a;return a*=128,i>=a&&(i-=Math.pow(2,8*t)),i},c.prototype.readInt8=function(e,t){return e>>>=0,t||M(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},c.prototype.readInt16LE=function(e,t){e>>>=0,t||M(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||M(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||M(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||M(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},c.prototype.readBigInt64LE=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(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=Z((function(e){L(e>>>=0,"offset");const t=this[e],n=this[e+7];void 0!==t&&void 0!==n||j(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||M(e,4,this.length),a.read(this,e,!0,23,4)},c.prototype.readFloatBE=function(e,t){return e>>>=0,t||M(e,4,this.length),a.read(this,e,!1,23,4)},c.prototype.readDoubleLE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!0,52,8)},c.prototype.readDoubleBE=function(e,t){return e>>>=0,t||M(e,8,this.length),a.read(this,e,!1,52,8)},c.prototype.writeUintLE=c.prototype.writeUIntLE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=1,i=0;for(this[t]=255&e;++i<n&&(a*=256);)this[t+i]=e/a&255;return t+n},c.prototype.writeUintBE=c.prototype.writeUIntBE=function(e,t,n,r){e=+e,t>>>=0,n>>>=0,r||q(this,e,t,n,Math.pow(2,8*n)-1,0);let a=n-1,i=1;for(this[t+a]=255&e;--a>=0&&(i*=256);)this[t+a]=e/i&255;return t+n},c.prototype.writeUint8=c.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||q(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||q(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||q(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||q(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||q(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=Z((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),c.prototype.writeBigUInt64BE=Z((function(e,t=0){return O(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);q(this,e,t,n,r-1,-r)}let a=0,i=1,s=0;for(this[t]=255&e;++a<n&&(i*=256);)e<0&&0===s&&0!==this[t+a-1]&&(s=1),this[t+a]=(e/i|0)-s&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);q(this,e,t,n,r-1,-r)}let a=n-1,i=1,s=0;for(this[t+a]=255&e;--a>=0&&(i*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/i|0)-s&255;return t+n},c.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||q(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||q(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||q(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||q(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||q(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=Z((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeBigInt64BE=Z((function(e,t=0){return O(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),c.prototype.writeFloatLE=function(e,t,n){return B(this,e,t,!0,n)},c.prototype.writeFloatBE=function(e,t,n){return B(this,e,t,!1,n)},c.prototype.writeDoubleLE=function(e,t,n){return G(this,e,t,!0,n)},c.prototype.writeDoubleBE=function(e,t,n){return G(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 a=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),a},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 a;if(t>>>=0,n=void 0===n?this.length:n>>>0,e||(e=0),"number"==typeof e)for(a=t;a<n;++a)this[a]=e;else{const i=c.isBuffer(e)?e:c.from(e,r),s=i.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(a=0;a<n-t;++a)this[a+t]=i[a%s]}return this};const $={};function U(e,t,n){$[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 V(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 D(e,t,n,r,a,i){if(e>n||e<t){const r="bigint"==typeof t?"n":"";let a;throw a=i>3?0===t||t===BigInt(0)?`>= 0${r} and < 2${r} ** ${8*(i+1)}${r}`:`>= -(2${r} ** ${8*(i+1)-1}${r}) and < 2 ** ${8*(i+1)-1}${r}`:`>= ${t}${r} and <= ${n}${r}`,new $.ERR_OUT_OF_RANGE("value",a,e)}!function(e,t,n){L(t,"offset"),void 0!==e[t]&&void 0!==e[t+n]||j(t,e.length-(n+1))}(r,a,i)}function L(e,t){if("number"!=typeof e)throw new $.ERR_INVALID_ARG_TYPE(t,"number",e)}function j(e,t,n){if(Math.floor(e)!==e)throw L(e,n),new $.ERR_OUT_OF_RANGE(n||"offset","an integer",e);if(t<0)throw new $.ERR_BUFFER_OUT_OF_BOUNDS;throw new $.ERR_OUT_OF_RANGE(n||"offset",`>= ${n?1:0} and <= ${t}`,e)}U("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),U("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),U("ERR_OUT_OF_RANGE",(function(e,t,n){let r=`The value of "${e}" is out of range.`,a=n;return Number.isInteger(n)&&Math.abs(n)>2**32?a=V(String(n)):"bigint"==typeof n&&(a=String(n),(n>BigInt(2)**BigInt(32)||n<-(BigInt(2)**BigInt(32)))&&(a=V(a)),a+="n"),r+=` It must be ${t}. Received ${a}`,r}),RangeError);const H=/[^+/0-9A-Za-z-_]/g;function F(e,t){let n;t=t||1/0;const r=e.length;let a=null;const i=[];for(let s=0;s<r;++s){if(n=e.charCodeAt(s),n>55295&&n<57344){if(!a){if(n>56319){(t-=3)>-1&&i.push(239,191,189);continue}if(s+1===r){(t-=3)>-1&&i.push(239,191,189);continue}a=n;continue}if(n<56320){(t-=3)>-1&&i.push(239,191,189),a=n;continue}n=65536+(a-55296<<10|n-56320)}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,n<128){if((t-=1)<0)break;i.push(n)}else if(n<2048){if((t-=2)<0)break;i.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;i.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;i.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return i}function J(e){return r.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(H,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,n,r){let a;for(a=0;a<r&&!(a+n>=t.length||a>=e.length);++a)t[a+n]=e[a];return a}function K(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Y(e){return e!=e}const Q=function(){const e="0123456789abcdef",t=new Array(256);for(let n=0;n<16;++n){const r=16*n;for(let a=0;a<16;++a)t[r+a]=e[n]+e[a]}return t}();function Z(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},3144:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(76),s=n(7119);e.exports=s||r.call(i,a)},2205:function(e,t,n){"use strict";var r=n(6743),a=n(1002),i=n(3144);e.exports=function(){return i(r,a,arguments)}},1002:function(e){"use strict";e.exports=Function.prototype.apply},76:function(e){"use strict";e.exports=Function.prototype.call},3126:function(e,t,n){"use strict";var r=n(6743),a=n(9675),i=n(76),s=n(3144);e.exports=function(e){if(e.length<1||"function"!=typeof e[0])throw new a("a function is required");return s(r,i,e)}},7119:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect&&Reflect.apply},487:function(e,t,n){"use strict";var r=n(6897),a=n(655),i=n(3126),s=n(2205);e.exports=function(e){var t=i(arguments),n=e.length-(arguments.length-1);return r(t,1+(n>0?n:0),!0)},a?a(e.exports,"apply",{value:s}):e.exports.apply=s},6556:function(e,t,n){"use strict";var r=n(453),a=n(3126),i=a([r("%String.prototype.indexOf%")]);e.exports=function(e,t){var n=r(e,!!t);return"function"==typeof n&&i(e,".prototype.")>-1?a([n]):n}},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])}`),"")}}`}},41:function(e,t,n){"use strict";var r=n(655),a=n(8068),i=n(9675),s=n(5795);e.exports=function(e,t,n){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new i("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new i("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new i("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new i("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new i("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new i("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],m=!!s&&s(e,t);if(r)r(e,t,{configurable:null===u&&m?m.configurable:!u,enumerable:null===o&&m?m.enumerable:!o,value:n,writable:null===c&&m?m.writable:!c});else{if(!l&&(o||c||u))throw new a("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=n}}},7176:function(e,t,n){"use strict";var r,a=n(3126),i=n(5795);try{r=[].__proto__===Array.prototype}catch(e){if(!e||"object"!=typeof e||!("code"in e)||"ERR_PROTO_ACCESS"!==e.code)throw e}var s=!!r&&i&&i(Object.prototype,"__proto__"),o=Object,c=o.getPrototypeOf;e.exports=s&&"function"==typeof s.get?a([s.get]):"function"==typeof c&&function(e){return c(null==e?e:o(e))}},655:function(e){"use strict";var t=Object.defineProperty||!1;if(t)try{t({},"a",{value:1})}catch(e){t=!1}e.exports=t},1237:function(e){"use strict";e.exports=EvalError},9383:function(e){"use strict";e.exports=Error},9290:function(e){"use strict";e.exports=RangeError},9538:function(e){"use strict";e.exports=ReferenceError},8068:function(e){"use strict";e.exports=SyntaxError},9675:function(e){"use strict";e.exports=TypeError},5345:function(e){"use strict";e.exports=URIError},9612:function(e){"use strict";e.exports=Object},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__}}()},228:function(e){"use strict";var t=Object.prototype.hasOwnProperty,n="~";function r(){}function a(e,t,n){this.fn=e,this.context=t,this.once=n||!1}function i(e,t,r,i,s){if("function"!=typeof r)throw new TypeError("The listener must be a function");var o=new a(r,i||e,s),c=n?n+t:t;return e._events[c]?e._events[c].fn?e._events[c]=[e._events[c],o]:e._events[c].push(o):(e._events[c]=o,e._eventsCount++),e}function s(e,t){0==--e._eventsCount?e._events=new r:delete e._events[t]}function o(){this._events=new r,this._eventsCount=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),o.prototype.eventNames=function(){var e,r,a=[];if(0===this._eventsCount)return a;for(r in e=this._events)t.call(e,r)&&a.push(n?r.slice(1):r);return Object.getOwnPropertySymbols?a.concat(Object.getOwnPropertySymbols(e)):a},o.prototype.listeners=function(e){var t=n?n+e:e,r=this._events[t];if(!r)return[];if(r.fn)return[r.fn];for(var a=0,i=r.length,s=new Array(i);a<i;a++)s[a]=r[a].fn;return s},o.prototype.listenerCount=function(e){var t=n?n+e:e,r=this._events[t];return r?r.fn?1:r.length:0},o.prototype.emit=function(e,t,r,a,i,s){var o=n?n+e:e;if(!this._events[o])return!1;var c,u,l=this._events[o],m=arguments.length;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),m){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,r),!0;case 4:return l.fn.call(l.context,t,r,a),!0;case 5:return l.fn.call(l.context,t,r,a,i),!0;case 6:return l.fn.call(l.context,t,r,a,i,s),!0}for(u=1,c=new Array(m-1);u<m;u++)c[u-1]=arguments[u];l.fn.apply(l.context,c)}else{var p,d=l.length;for(u=0;u<d;u++)switch(l[u].once&&this.removeListener(e,l[u].fn,void 0,!0),m){case 1:l[u].fn.call(l[u].context);break;case 2:l[u].fn.call(l[u].context,t);break;case 3:l[u].fn.call(l[u].context,t,r);break;case 4:l[u].fn.call(l[u].context,t,r,a);break;default:if(!c)for(p=1,c=new Array(m-1);p<m;p++)c[p-1]=arguments[p];l[u].fn.apply(l[u].context,c)}}return!0},o.prototype.on=function(e,t,n){return i(this,e,t,n,!1)},o.prototype.once=function(e,t,n){return i(this,e,t,n,!0)},o.prototype.removeListener=function(e,t,r,a){var i=n?n+e:e;if(!this._events[i])return this;if(!t)return s(this,i),this;var o=this._events[i];if(o.fn)o.fn!==t||a&&!o.once||r&&o.context!==r||s(this,i);else{for(var c=0,u=[],l=o.length;c<l;c++)(o[c].fn!==t||a&&!o[c].once||r&&o[c].context!==r)&&u.push(o[c]);u.length?this._events[i]=1===u.length?u[0]:u:s(this,i)}return this},o.prototype.removeAllListeners=function(e){var t;return e?(t=n?n+e:e,this._events[t]&&s(this,t)):(this._events=new r,this._eventsCount=0),this},o.prototype.off=o.prototype.removeListener,o.prototype.addListener=o.prototype.on,o.prefixed=n,o.EventEmitter=o,e.exports=o},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 a=Number.isNaN||function(e){return e!=e};function i(){i.init.call(this)}e.exports=i,e.exports.once=function(e,t){return new Promise((function(n,r){function a(n){e.removeListener(t,i),r(n)}function i(){"function"==typeof e.removeListener&&e.removeListener("error",a),n([].slice.call(arguments))}f(e,t,i,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&f(e,"error",t,{once:!0})}(e,a)}))},i.EventEmitter=i,i.prototype._events=void 0,i.prototype._eventsCount=0,i.prototype._maxListeners=void 0;var s=10;function o(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?i.defaultMaxListeners:e._maxListeners}function u(e,t,n,r){var a,i,s,u;if(o(n),void 0===(i=e._events)?(i=e._events=Object.create(null),e._eventsCount=0):(void 0!==i.newListener&&(e.emit("newListener",t,n.listener?n.listener:n),i=e._events),s=i[t]),void 0===s)s=i[t]=n,++e._eventsCount;else if("function"==typeof s?s=i[t]=r?[n,s]:[s,n]:r?s.unshift(n):s.push(n),(a=c(e))>0&&s.length>a&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.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 m(e,t,n){var r={fired:!1,wrapFn:void 0,target:e,type:t,listener:n},a=l.bind(r);return a.listener=n,r.wrapFn=a,a}function p(e,t,n){var r=e._events;if(void 0===r)return[];var a=r[t];return void 0===a?[]:"function"==typeof a?n?[a.listener||a]:[a]: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}(a):h(a,a.length)}function d(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 h(e,t){for(var n=new Array(t),r=0;r<t;++r)n[r]=e[r];return n}function f(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 a(i){r.once&&e.removeEventListener(t,a),n(i)}))}}Object.defineProperty(i,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||a(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),i.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},i.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||a(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},i.prototype.getMaxListeners=function(){return c(this)},i.prototype.emit=function(e){for(var t=[],n=1;n<arguments.length;n++)t.push(arguments[n]);var a="error"===e,i=this._events;if(void 0!==i)a=a&&void 0===i.error;else if(!a)return!1;if(a){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var o=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw o.context=s,o}var c=i[e];if(void 0===c)return!1;if("function"==typeof c)r(c,this,t);else{var u=c.length,l=h(c,u);for(n=0;n<u;++n)r(l[n],this,t)}return!0},i.prototype.addListener=function(e,t){return u(this,e,t,!1)},i.prototype.on=i.prototype.addListener,i.prototype.prependListener=function(e,t){return u(this,e,t,!0)},i.prototype.once=function(e,t){return o(t),this.on(e,m(this,e,t)),this},i.prototype.prependOnceListener=function(e,t){return o(t),this.prependListener(e,m(this,e,t)),this},i.prototype.removeListener=function(e,t){var n,r,a,i,s;if(o(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(a=-1,i=n.length-1;i>=0;i--)if(n[i]===t||n[i].listener===t){s=n[i].listener,a=i;break}if(a<0)return this;0===a?n.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(n,a),1===n.length&&(r[e]=n[0]),void 0!==r.removeListener&&this.emit("removeListener",e,s||t)}return this},i.prototype.off=i.prototype.removeListener,i.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 a,i=Object.keys(n);for(r=0;r<i.length;++r)"removeListener"!==(a=i[r])&&this.removeAllListeners(a);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},i.prototype.listeners=function(e){return p(this,e,!0)},i.prototype.rawListeners=function(e){return p(this,e,!1)},i.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},i.prototype.listenerCount=d,i.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},2682:function(e,t,n){"use strict";var r=n(9600),a=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,n){if(!r(t))throw new TypeError("iterator must be a function");var s,o;arguments.length>=3&&(s=n),o=e,"[object Array]"===a.call(o)?function(e,t,n){for(var r=0,a=e.length;r<a;r++)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s):"string"==typeof e?function(e,t,n){for(var r=0,a=e.length;r<a;r++)null==n?t(e.charAt(r),r,e):t.call(n,e.charAt(r),r,e)}(e,t,s):function(e,t,n){for(var r in e)i.call(e,r)&&(null==n?t(e[r],r,e):t.call(n,e[r],r,e))}(e,t,s)}},9353:function(e){"use strict";var t=Object.prototype.toString,n=Math.max,r=function(e,t){for(var n=[],r=0;r<e.length;r+=1)n[r]=e[r];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n};e.exports=function(e){var a=this;if("function"!=typeof a||"[object Function]"!==t.apply(a))throw new TypeError("Function.prototype.bind called on incompatible "+a);for(var i,s=function(e){for(var t=[],n=1,r=0;n<e.length;n+=1,r+=1)t[r]=e[n];return t}(arguments),o=n(0,a.length-s.length),c=[],u=0;u<o;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e){for(var t="",n=0;n<e.length;n+=1)t+=e[n],n+1<e.length&&(t+=",");return t}(c)+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=a.apply(this,r(s,arguments));return Object(t)===t?t:this}return a.apply(e,r(s,arguments))})),a.prototype){var l=function(){};l.prototype=a.prototype,i.prototype=new l,l.prototype=null}return i}},6743:function(e,t,n){"use strict";var r=n(9353);e.exports=Function.prototype.bind||r},453:function(e,t,n){"use strict";var r,a=n(9612),i=n(9383),s=n(1237),o=n(9290),c=n(9538),u=n(8068),l=n(9675),m=n(5345),p=n(1514),d=n(8968),h=n(6188),f=n(8002),y=n(5880),g=n(414),N=n(3093),w=Function,v=function(e){try{return w('"use strict"; return ('+e+").constructor;")()}catch(e){}},b=n(5795),x=n(655),_=function(){throw new l},P=b?function(){try{return _}catch(e){try{return b(arguments,"callee").get}catch(e){return _}}}():_,C=n(4039)(),A=n(3628),S=n(1064),T=n(8648),z=n(1002),E=n(76),I={},M="undefined"!=typeof Uint8Array&&A?A(Uint8Array):r,q={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?r:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?r:ArrayBuffer,"%ArrayIteratorPrototype%":C&&A?A([][Symbol.iterator]()):r,"%AsyncFromSyncIteratorPrototype%":r,"%AsyncFunction%":I,"%AsyncGenerator%":I,"%AsyncGeneratorFunction%":I,"%AsyncIteratorPrototype%":I,"%Atomics%":"undefined"==typeof Atomics?r:Atomics,"%BigInt%":"undefined"==typeof BigInt?r:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?r:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?r:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?r:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":i,"%eval%":eval,"%EvalError%":s,"%Float16Array%":"undefined"==typeof Float16Array?r:Float16Array,"%Float32Array%":"undefined"==typeof Float32Array?r:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?r:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?r:FinalizationRegistry,"%Function%":w,"%GeneratorFunction%":I,"%Int8Array%":"undefined"==typeof Int8Array?r:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?r:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?r:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&A?A(A([][Symbol.iterator]())):r,"%JSON%":"object"==typeof JSON?JSON:r,"%Map%":"undefined"==typeof Map?r:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&C&&A?A((new Map)[Symbol.iterator]()):r,"%Math%":Math,"%Number%":Number,"%Object%":a,"%Object.getOwnPropertyDescriptor%":b,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?r:Promise,"%Proxy%":"undefined"==typeof Proxy?r:Proxy,"%RangeError%":o,"%ReferenceError%":c,"%Reflect%":"undefined"==typeof Reflect?r:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?r:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&C&&A?A((new Set)[Symbol.iterator]()):r,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?r:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&A?A(""[Symbol.iterator]()):r,"%Symbol%":C?Symbol:r,"%SyntaxError%":u,"%ThrowTypeError%":P,"%TypedArray%":M,"%TypeError%":l,"%Uint8Array%":"undefined"==typeof Uint8Array?r:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?r:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?r:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?r:Uint32Array,"%URIError%":m,"%WeakMap%":"undefined"==typeof WeakMap?r:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?r:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?r:WeakSet,"%Function.prototype.call%":E,"%Function.prototype.apply%":z,"%Object.defineProperty%":x,"%Object.getPrototypeOf%":S,"%Math.abs%":p,"%Math.floor%":d,"%Math.max%":h,"%Math.min%":f,"%Math.pow%":y,"%Math.round%":g,"%Math.sign%":N,"%Reflect.getPrototypeOf%":T};if(A)try{null.error}catch(e){var R=A(A(e));q["%Error.prototype%"]=R}var O=function e(t){var n;if("%AsyncFunction%"===t)n=v("async function () {}");else if("%GeneratorFunction%"===t)n=v("function* () {}");else if("%AsyncGeneratorFunction%"===t)n=v("async function* () {}");else if("%AsyncGenerator%"===t){var r=e("%AsyncGeneratorFunction%");r&&(n=r.prototype)}else if("%AsyncIteratorPrototype%"===t){var a=e("%AsyncGenerator%");a&&A&&(n=A(a.prototype))}return q[t]=n,n},k={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},B=n(6743),G=n(9957),$=B.call(E,Array.prototype.concat),U=B.call(z,Array.prototype.splice),V=B.call(E,String.prototype.replace),D=B.call(E,String.prototype.slice),L=B.call(E,RegExp.prototype.exec),j=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,H=/\\(\\)?/g,F=function(e,t){var n,r=e;if(G(k,r)&&(r="%"+(n=k[r])[0]+"%"),G(q,r)){var a=q[r];if(a===I&&(a=O(r)),void 0===a&&!t)throw new l("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:n,name:r,value:a}}throw new u("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new l("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new l('"allowMissing" argument must be a boolean');if(null===L(/^%?[^%]*%?$/,e))throw new u("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=function(e){var t=D(e,0,1),n=D(e,-1);if("%"===t&&"%"!==n)throw new u("invalid intrinsic syntax, expected closing `%`");if("%"===n&&"%"!==t)throw new u("invalid intrinsic syntax, expected opening `%`");var r=[];return V(e,j,(function(e,t,n,a){r[r.length]=n?V(a,H,"$1"):t||e})),r}(e),r=n.length>0?n[0]:"",a=F("%"+r+"%",t),i=a.name,s=a.value,o=!1,c=a.alias;c&&(r=c[0],U(n,$([0,1],c)));for(var m=1,p=!0;m<n.length;m+=1){var d=n[m],h=D(d,0,1),f=D(d,-1);if(('"'===h||"'"===h||"`"===h||'"'===f||"'"===f||"`"===f)&&h!==f)throw new u("property names with quotes must have matching quotes");if("constructor"!==d&&p||(o=!0),G(q,i="%"+(r+="."+d)+"%"))s=q[i];else if(null!=s){if(!(d in s)){if(!t)throw new l("base intrinsic for "+e+" exists, but the property is not available.");return}if(b&&m+1>=n.length){var y=b(s,d);s=(p=!!y)&&"get"in y&&!("originalValue"in y.get)?y.get:s[d]}else p=G(s,d),s=s[d];p&&!o&&(q[i]=s)}}return s}},1064:function(e,t,n){"use strict";var r=n(9612);e.exports=r.getPrototypeOf||null},8648:function(e){"use strict";e.exports="undefined"!=typeof Reflect&&Reflect.getPrototypeOf||null},3628:function(e,t,n){"use strict";var r=n(8648),a=n(1064),i=n(7176);e.exports=r?function(e){return r(e)}:a?function(e){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("getProto: not an object");return a(e)}:i?function(e){return i(e)}:null},6549:function(e){"use strict";e.exports=Object.getOwnPropertyDescriptor},5795:function(e,t,n){"use strict";var r=n(6549);if(r)try{r([],"length")}catch(e){r=null}e.exports=r},592:function(e,t,n){"use strict";var r=n(655),a=function(){return!!r};a.hasArrayLengthDefineBug=function(){if(!r)return null;try{return 1!==r([],"length",{value:1}).length}catch(e){return!0}},e.exports=a},4039:function(e,t,n){"use strict";var r="undefined"!=typeof Symbol&&Symbol,a=n(1333);e.exports=function(){return"function"==typeof r&&"function"==typeof Symbol&&"symbol"==typeof r("foo")&&"symbol"==typeof Symbol("bar")&&a()}},1333:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),n=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(n))return!1;for(var r in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var a=Object.getOwnPropertySymbols(e);if(1!==a.length||a[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var i=Object.getOwnPropertyDescriptor(e,t);if(42!==i.value||!0!==i.enumerable)return!1}return!0}},9092:function(e,t,n){"use strict";var r=n(1333);e.exports=function(){return r()&&!!Symbol.toStringTag}},9957:function(e,t,n){"use strict";var r=Function.prototype.call,a=Object.prototype.hasOwnProperty,i=n(6743);e.exports=i.call(r,a)},251:function(e,t){t.read=function(e,t,n,r,a){var i,s,o=8*a-r-1,c=(1<<o)-1,u=c>>1,l=-7,m=n?a-1:0,p=n?-1:1,d=e[t+m];for(m+=p,i=d&(1<<-l)-1,d>>=-l,l+=o;l>0;i=256*i+e[t+m],m+=p,l-=8);for(s=i&(1<<-l)-1,i>>=-l,l+=r;l>0;s=256*s+e[t+m],m+=p,l-=8);if(0===i)i=1-u;else{if(i===c)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,r),i-=u}return(d?-1:1)*s*Math.pow(2,i-r)},t.write=function(e,t,n,r,a,i){var s,o,c,u=8*i-a-1,l=(1<<u)-1,m=l>>1,p=23===a?Math.pow(2,-24)-Math.pow(2,-77):0,d=r?0:i-1,h=r?1:-1,f=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(o=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-s))<1&&(s--,c*=2),(t+=s+m>=1?p/c:p*Math.pow(2,1-m))*c>=2&&(s++,c/=2),s+m>=l?(o=0,s=l):s+m>=1?(o=(t*c-1)*Math.pow(2,a),s+=m):(o=t*Math.pow(2,m-1)*Math.pow(2,a),s=0));a>=8;e[n+d]=255&o,d+=h,o/=256,a-=8);for(s=s<<a|o,u+=a;u>0;e[n+d]=255&s,d+=h,s/=256,u-=8);e[n+d-h]|=128*f}},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}}},9600:function(e){"use strict";var t,n,r=Function.prototype.toString,a="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof a&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw n}}),n={},a((function(){throw 42}),null,t)}catch(e){e!==n&&(a=null)}else a=null;var i=/^\s*class\b/,s=function(e){try{var t=r.call(e);return i.test(t)}catch(e){return!1}},o=function(e){try{return!s(e)&&(r.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),m=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(m=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=a?function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{a(e,null,t)}catch(e){if(e!==n)return!1}return!s(e)&&o(e)}:function(e){if(m(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return o(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&o(e)}},5680:function(e,t,n){"use strict";var r=n(5767);e.exports=function(e){return!!r(e)}},4634:function(e){var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},1013:function(e,t,n){var r=n(7372).stringify,a=n(8146);e.exports=function(e){return{parse:a(e),stringify:r}},e.exports.parse=a(),e.exports.stringify=r},8146:function(e,t,n){var r=null;const a=/(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])/,i=/(?: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 s,o,c,u,l={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},m=function(e){throw{name:"SyntaxError",message:e,at:s,text:c}},p=function(e){return e&&e!==o&&m("Expected '"+e+"' instead of '"+o+"'"),o=c.charAt(s),s+=1,o},d=function(){var e,a="";for("-"===o&&(a="-",p("-"));o>="0"&&o<="9";)a+=o,p();if("."===o)for(a+=".";p()&&o>="0"&&o<="9";)a+=o;if("e"===o||"E"===o)for(a+=o,p(),"-"!==o&&"+"!==o||(a+=o,p());o>="0"&&o<="9";)a+=o,p();if(e=+a,isFinite(e))return null==r&&(r=n(1594)),a.length>15?t.storeAsString?a:t.useNativeBigInt?BigInt(a):new r(a):t.alwaysParseAsBig?t.useNativeBigInt?BigInt(e):new r(e):e;m("Bad number")},h=function(){var e,t,n,r="";if('"'===o)for(var a=s;p();){if('"'===o)return s-1>a&&(r+=c.substring(a,s-1)),p(),r;if("\\"===o){if(s-1>a&&(r+=c.substring(a,s-1)),p(),"u"===o){for(n=0,t=0;t<4&&(e=parseInt(p(),16),isFinite(e));t+=1)n=16*n+e;r+=String.fromCharCode(n)}else{if("string"!=typeof l[o])break;r+=l[o]}a=s}}m("Bad string")},f=function(){for(;o&&o<=" ";)p()};return u=function(){switch(f(),o){case"{":return function(){var e,n=Object.create(null);if("{"===o){if(p("{"),f(),"}"===o)return p("}"),n;for(;o;){if(e=h(),f(),p(":"),!0===t.strict&&Object.hasOwnProperty.call(n,e)&&m('Duplicate key "'+e+'"'),!0===a.test(e)?"error"===t.protoAction?m("Object contains forbidden prototype property"):"ignore"===t.protoAction?u():n[e]=u():!0===i.test(e)?"error"===t.constructorAction?m("Object contains forbidden constructor property"):"ignore"===t.constructorAction?u():n[e]=u():n[e]=u(),f(),"}"===o)return p("}"),n;p(","),f()}}m("Bad object")}();case"[":return function(){var e=[];if("["===o){if(p("["),f(),"]"===o)return p("]"),e;for(;o;){if(e.push(u()),f(),"]"===o)return p("]"),e;p(","),f()}}m("Bad array")}();case'"':return h();case"-":return d();default:return o>="0"&&o<="9"?d():function(){switch(o){case"t":return p("t"),p("r"),p("u"),p("e"),!0;case"f":return p("f"),p("a"),p("l"),p("s"),p("e"),!1;case"n":return p("n"),p("u"),p("l"),p("l"),null}m("Unexpected '"+o+"'")}()}},function(e,t){var n;return c=e+"",s=0,o=" ",n=u(),f(),o&&m("Syntax error"),"function"==typeof t?function e(n,r){var a,i=n[r];return i&&"object"==typeof i&&Object.keys(i).forEach((function(t){void 0!==(a=e(i,t))?i[t]=a:delete i[t]})),t.call(n,r,i)}({"":n},""):n}}},7372:function(e,t,n){var r=n(1594),a=e.exports;!function(){"use strict";var e,t,n,i=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,s={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function o(e){return i.lastIndex=0,i.test(e)?'"'+e.replace(i,(function(e){var t=s[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)}))+'"':'"'+e+'"'}function c(a,i){var s,u,l,m,p,d=e,h=i[a],f=null!=h&&(h instanceof r||r.isBigNumber(h));switch(h&&"object"==typeof h&&"function"==typeof h.toJSON&&(h=h.toJSON(a)),"function"==typeof n&&(h=n.call(i,a,h)),typeof h){case"string":return f?h:o(h);case"number":return isFinite(h)?String(h):"null";case"boolean":case"null":case"bigint":return String(h);case"object":if(!h)return"null";if(e+=t,p=[],"[object Array]"===Object.prototype.toString.apply(h)){for(m=h.length,s=0;s<m;s+=1)p[s]=c(s,h)||"null";return l=0===p.length?"[]":e?"[\n"+e+p.join(",\n"+e)+"\n"+d+"]":"["+p.join(",")+"]",e=d,l}if(n&&"object"==typeof n)for(m=n.length,s=0;s<m;s+=1)"string"==typeof n[s]&&(l=c(u=n[s],h))&&p.push(o(u)+(e?": ":":")+l);else Object.keys(h).forEach((function(t){var n=c(t,h);n&&p.push(o(t)+(e?": ":":")+n)}));return l=0===p.length?"{}":e?"{\n"+e+p.join(",\n"+e)+"\n"+d+"}":"{"+p.join(",")+"}",e=d,l}}"function"!=typeof a.stringify&&(a.stringify=function(r,a,i){var s;if(e="",t="","number"==typeof i)for(s=0;s<i;s+=1)t+=" ";else"string"==typeof i&&(t=i);if(n=a,a&&"function"!=typeof a&&("object"!=typeof a||"number"!=typeof a.length))throw new Error("JSON.stringify");return c("",{"":r})})}()},1514:function(e){"use strict";e.exports=Math.abs},8968:function(e){"use strict";e.exports=Math.floor},4459:function(e){"use strict";e.exports=Number.isNaN||function(e){return e!=e}},6188:function(e){"use strict";e.exports=Math.max},8002:function(e){"use strict";e.exports=Math.min},5880:function(e){"use strict";e.exports=Math.pow},414:function(e){"use strict";e.exports=Math.round},3093:function(e,t,n){"use strict";var r=n(4459);e.exports=function(e){return r(e)||0===e?e:e<0?-1:1}},6578:function(e){"use strict";e.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]},5606:function(e){var t,n,r=e.exports={};function a(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===a||!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:a}catch(e){t=a}try{n="function"==typeof clearTimeout?clearTimeout:i}catch(e){n=i}}();var o,c=[],u=!1,l=-1;function m(){u&&o&&(u=!1,o.length?c=o.concat(c):l=-1,c.length&&p())}function p(){if(!u){var e=s(m);u=!0;for(var t=c.length;t;){for(o=c,c=[];++l<t;)o&&o[l].run();l=-1,t=c.length}o=null,u=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===i||!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 d(e,t){this.fun=e,this.array=t}function h(){}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 d(e,t)),1!==c.length||u||s(p)},d.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=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,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=p(...t);return p(i(r.length,192),r)}const t=y(e);return 1===t.length&&t[0]<128?t:p(i(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 a(e){if(0===e[0])throw new Error("invalid RLP: extra zeros");return l(u(e))}function i(e,t){if(e<56)return Uint8Array.from([e+t]);const n=h(e),r=h(t+55+n.length/2);return Uint8Array.from(m(r+n))}function s(e,t=!1){if(!e||0===e.length)return Uint8Array.from([]);const n=o(y(e));if(t)return n;if(0!==n.remainder.length)throw new Error("invalid RLP: remainder must be zero");return n.data}function o(e){let t,n,i,s,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,i=128===l?Uint8Array.from([]):r(e,1,t),2===t&&i[0]<128)throw new Error("invalid RLP encoding: invalid prefix, single byte < 0x80 are not prefixed");return{data:i,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=a(r(e,1,n)),t<=55)throw new Error("invalid RLP: expected string length to be greater than 55");return i=r(e,n,t+n),{data:i,remainder:e.slice(t+n)}}if(l<=247){for(t=l-191,s=r(e,1,t);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(t)}}{if(n=l-246,t=a(r(e,1,n)),t<56)throw new Error("invalid RLP: encoded list too short");const i=n+t;if(i>e.length)throw new Error("invalid RLP: total length is larger than the data");for(s=r(e,n,i);s.length;)c=o(s),u.push(c.data),s=c.remainder;return{data:u,remainder:e.slice(i)}}}Object.defineProperty(t,"__esModule",{value:!0}),t.utils=t.decode=t.encode=void 0,t.encode=n,t.decode=s;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 m(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 p(...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 a=e[t];n.set(a,r),r+=a.length}return n}function d(e){return(new TextEncoder).encode(e)}function h(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 f(e){return e.length>=2&&"0"===e[0]&&"x"===e[1]}function y(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return f(e)?m((t="string"!=typeof(n=e)?n:f(n)?n.slice(2):n).length%2?`0${t}`:t):d(e);var t,n;if("number"==typeof e||"bigint"==typeof e)return e?m(h(e)):Uint8Array.from([]);if(null==e)return Uint8Array.from([]);throw new Error("toBytes: received unsupported type "+typeof e)}t.utils={bytesToHex:u,concatBytes:p,hexToBytes:m,utf8ToBytes:d};const g={encode:n,decode:s};t.default=g},2861:function(e,t,n){var r=n(8287),a=r.Buffer;function i(e,t){for(var n in e)t[n]=e[n]}function s(e,t,n){return a(e,t,n)}a.from&&a.alloc&&a.allocUnsafe&&a.allocUnsafeSlow?e.exports=r:(i(r,t),t.Buffer=s),s.prototype=Object.create(a.prototype),i(a,s),s.from=function(e,t,n){if("number"==typeof e)throw new TypeError("Argument must not be a number");return a(e,t,n)},s.alloc=function(e,t,n){if("number"!=typeof e)throw new TypeError("Argument must be a number");var r=a(e);return void 0!==t?"string"==typeof n?r.fill(t,n):r.fill(t):r.fill(0),r},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return a(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return r.SlowBuffer(e)}},6897:function(e,t,n){"use strict";var r=n(453),a=n(41),i=n(592)(),s=n(5795),o=n(9675),c=r("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new o("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new o("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],r=!0,u=!0;if("length"in e&&s){var l=s(e,"length");l&&!l.configurable&&(r=!1),l&&!l.writable&&(u=!1)}return(r||u||!n)&&(i?a(e,"length",t,!0,!0):a(e,"length",t)),e}},392:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(5377);function i(e,t){this._block=r.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){e=a(e,t||"utf8");for(var n=this._block,r=this._blockSize,i=e.length,s=this._len,o=0;o<i;){for(var c=s%r,u=Math.min(i-o,r-c),l=0;l<u;l++)n[c+l]=e[o+l];o+=u,(s+=u)%r==0&&this._update(n)}return this._len+=i,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,a=(n-r)/4294967296;this._block.writeUInt32BE(a,this._blockSize-8),this._block.writeUInt32BE(r,this._blockSize-4)}this._update(this._block);var i=this._hash();return e?i.toString(e):i},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},4107:function(e,t,n){"use strict";var r=n(6698),a=n(392),i=n(2861).Buffer,s=[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],o=new Array(64);function c(){this.init(),this._w=o,a.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 m(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function p(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}r(c,a),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,a=0|this._b,i=0|this._c,o=0|this._d,c=0|this._e,h=0|this._f,f=0|this._g,y=0|this._h,g=0;g<16;++g)n[g]=e.readInt32BE(4*g);for(;g<64;++g)n[g]=0|(((t=n[g-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+n[g-7]+d(n[g-15])+n[g-16];for(var N=0;N<64;++N){var w=y+p(c)+u(c,h,f)+s[N]+n[N]|0,v=m(r)+l(r,a,i)|0;y=f,f=h,h=c,c=o+w|0,o=i,i=a,a=r,r=w+v|0}this._a=r+this._a|0,this._b=a+this._b|0,this._c=i+this._c|0,this._d=o+this._d|0,this._e=c+this._e|0,this._f=h+this._f|0,this._g=f+this._g|0,this._h=y+this._h|0},c.prototype._hash=function(){var e=i.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},5377:function(e,t,n){"use strict";var r=n(2861).Buffer,a=n(4634),i=n(4372),s=ArrayBuffer.isView||function(e){try{return i(e),!0}catch(e){return!1}},o="undefined"!=typeof Uint8Array,c="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array,u=c&&(r.prototype instanceof Uint8Array||r.TYPED_ARRAY_SUPPORT);e.exports=function(e,t){if(r.isBuffer(e))return e.constructor&&!("isBuffer"in e)?r.from(e):e;if("string"==typeof e)return r.from(e,t);if(c&&s(e)){if(0===e.byteLength)return r.alloc(0);if(u){var n=r.from(e.buffer,e.byteOffset,e.byteLength);if(n.byteLength===e.byteLength)return n}var i=e instanceof Uint8Array?e:new Uint8Array(e.buffer,e.byteOffset,e.byteLength),l=r.from(i);if(l.length===e.byteLength)return l}if(o&&e instanceof Uint8Array)return r.from(e);var m=a(e);if(m)for(var p=0;p<e.length;p+=1){var d=e[p];if("number"!=typeof d||d<0||d>255||~~d!==d)throw new RangeError("Array items must be numbers in the range 0-255.")}if(m||r.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return r.from(e);throw new TypeError('The "data" argument must be a string, an Array, a Buffer, a Uint8Array, or a DataView.')}},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;function n(n,r){var a,i,s=new Uint8Array(t+Math.max(64,n.length));for(r.length>t&&(r=e.hash(r)),a=0;a<t;a++)s[a]=54;for(a=0;a<r.length;a++)s[a]^=r[a];for(s.set(n,t),i=e.hash(s.subarray(0,t+n.length)),a=0;a<t;a++)s[a]=92;for(a=0;a<r.length;a++)s[a]^=r[a];return s.set(i,t),e.hash(s.subarray(0,t+i.length))}function r(e,t){var r=new Uint8Array(32);return r.set(n(e,t).subarray(0,32)),r}return r.full=function(e,t){return n(e,t)},r.authLength=32,r.authFullLength=64,r.keyLength=32,r}))},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")},a=new Uint8Array(16),i=new Uint8Array(32);i[0]=9;var s=t(),o=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]),m=t([54554,36645,11616,51542,42930,38181,51040,26924,56412,64982,57905,49316,21502,52590,14035,8553]),p=t([26200,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214,26214]),d=t([41136,18958,6951,50414,58488,44335,6150,12099,55207,15867,153,11085,57099,20417,9344,11139]);function h(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 f(e,t,n,r,a){var i,s=0;for(i=0;i<a;i++)s|=e[t+i]^n[r+i];return(1&s-1>>>8)-1}function y(e,t,n,r){return f(e,t,n,r,16)}function g(e,t,n,r){return f(e,t,n,r,32)}function N(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=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,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=i,x=s,_=o,P=c,C=u,A=l,S=m,T=p,z=d,E=h,I=f,M=y,q=g,R=N,O=w,k=v,B=0;B<20;B+=2)b^=(a=(q^=(a=(z^=(a=(C^=(a=b+q|0)<<7|a>>>25)+b|0)<<9|a>>>23)+C|0)<<13|a>>>19)+z|0)<<18|a>>>14,A^=(a=(x^=(a=(R^=(a=(E^=(a=A+x|0)<<7|a>>>25)+A|0)<<9|a>>>23)+E|0)<<13|a>>>19)+R|0)<<18|a>>>14,I^=(a=(S^=(a=(_^=(a=(O^=(a=I+S|0)<<7|a>>>25)+I|0)<<9|a>>>23)+O|0)<<13|a>>>19)+_|0)<<18|a>>>14,k^=(a=(M^=(a=(T^=(a=(P^=(a=k+M|0)<<7|a>>>25)+k|0)<<9|a>>>23)+P|0)<<13|a>>>19)+T|0)<<18|a>>>14,b^=(a=(P^=(a=(_^=(a=(x^=(a=b+P|0)<<7|a>>>25)+b|0)<<9|a>>>23)+x|0)<<13|a>>>19)+_|0)<<18|a>>>14,A^=(a=(C^=(a=(T^=(a=(S^=(a=A+C|0)<<7|a>>>25)+A|0)<<9|a>>>23)+S|0)<<13|a>>>19)+T|0)<<18|a>>>14,I^=(a=(E^=(a=(z^=(a=(M^=(a=I+E|0)<<7|a>>>25)+I|0)<<9|a>>>23)+M|0)<<13|a>>>19)+z|0)<<18|a>>>14,k^=(a=(O^=(a=(R^=(a=(q^=(a=k+O|0)<<7|a>>>25)+k|0)<<9|a>>>23)+q|0)<<13|a>>>19)+R|0)<<18|a>>>14;b=b+i|0,x=x+s|0,_=_+o|0,P=P+c|0,C=C+u|0,A=A+l|0,S=S+m|0,T=T+p|0,z=z+d|0,E=E+h|0,I=I+f|0,M=M+y|0,q=q+g|0,R=R+N|0,O=O+w|0,k=k+v|0,e[0]=b>>>0&255,e[1]=b>>>8&255,e[2]=b>>>16&255,e[3]=b>>>24&255,e[4]=x>>>0&255,e[5]=x>>>8&255,e[6]=x>>>16&255,e[7]=x>>>24&255,e[8]=_>>>0&255,e[9]=_>>>8&255,e[10]=_>>>16&255,e[11]=_>>>24&255,e[12]=P>>>0&255,e[13]=P>>>8&255,e[14]=P>>>16&255,e[15]=P>>>24&255,e[16]=C>>>0&255,e[17]=C>>>8&255,e[18]=C>>>16&255,e[19]=C>>>24&255,e[20]=A>>>0&255,e[21]=A>>>8&255,e[22]=A>>>16&255,e[23]=A>>>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]=z>>>0&255,e[33]=z>>>8&255,e[34]=z>>>16&255,e[35]=z>>>24&255,e[36]=E>>>0&255,e[37]=E>>>8&255,e[38]=E>>>16&255,e[39]=E>>>24&255,e[40]=I>>>0&255,e[41]=I>>>8&255,e[42]=I>>>16&255,e[43]=I>>>24&255,e[44]=M>>>0&255,e[45]=M>>>8&255,e[46]=M>>>16&255,e[47]=M>>>24&255,e[48]=q>>>0&255,e[49]=q>>>8&255,e[50]=q>>>16&255,e[51]=q>>>24&255,e[52]=R>>>0&255,e[53]=R>>>8&255,e[54]=R>>>16&255,e[55]=R>>>24&255,e[56]=O>>>0&255,e[57]=O>>>8&255,e[58]=O>>>16&255,e[59]=O>>>24&255,e[60]=k>>>0&255,e[61]=k>>>8&255,e[62]=k>>>16&255,e[63]=k>>>24&255}(e,t,n,r)}function w(e,t,n,r){!function(e,t,n,r){for(var a,i=255&r[0]|(255&r[1])<<8|(255&r[2])<<16|(255&r[3])<<24,s=255&n[0]|(255&n[1])<<8|(255&n[2])<<16|(255&n[3])<<24,o=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,m=255&t[0]|(255&t[1])<<8|(255&t[2])<<16|(255&t[3])<<24,p=255&t[4]|(255&t[5])<<8|(255&t[6])<<16|(255&t[7])<<24,d=255&t[8]|(255&t[9])<<8|(255&t[10])<<16|(255&t[11])<<24,h=255&t[12]|(255&t[13])<<8|(255&t[14])<<16|(255&t[15])<<24,f=255&r[8]|(255&r[9])<<8|(255&r[10])<<16|(255&r[11])<<24,y=255&n[16]|(255&n[17])<<8|(255&n[18])<<16|(255&n[19])<<24,g=255&n[20]|(255&n[21])<<8|(255&n[22])<<16|(255&n[23])<<24,N=255&n[24]|(255&n[25])<<8|(255&n[26])<<16|(255&n[27])<<24,w=255&n[28]|(255&n[29])<<8|(255&n[30])<<16|(255&n[31])<<24,v=255&r[12]|(255&r[13])<<8|(255&r[14])<<16|(255&r[15])<<24,b=0;b<20;b+=2)i^=(a=(g^=(a=(d^=(a=(u^=(a=i+g|0)<<7|a>>>25)+i|0)<<9|a>>>23)+u|0)<<13|a>>>19)+d|0)<<18|a>>>14,l^=(a=(s^=(a=(N^=(a=(h^=(a=l+s|0)<<7|a>>>25)+l|0)<<9|a>>>23)+h|0)<<13|a>>>19)+N|0)<<18|a>>>14,f^=(a=(m^=(a=(o^=(a=(w^=(a=f+m|0)<<7|a>>>25)+f|0)<<9|a>>>23)+w|0)<<13|a>>>19)+o|0)<<18|a>>>14,v^=(a=(y^=(a=(p^=(a=(c^=(a=v+y|0)<<7|a>>>25)+v|0)<<9|a>>>23)+c|0)<<13|a>>>19)+p|0)<<18|a>>>14,i^=(a=(c^=(a=(o^=(a=(s^=(a=i+c|0)<<7|a>>>25)+i|0)<<9|a>>>23)+s|0)<<13|a>>>19)+o|0)<<18|a>>>14,l^=(a=(u^=(a=(p^=(a=(m^=(a=l+u|0)<<7|a>>>25)+l|0)<<9|a>>>23)+m|0)<<13|a>>>19)+p|0)<<18|a>>>14,f^=(a=(h^=(a=(d^=(a=(y^=(a=f+h|0)<<7|a>>>25)+f|0)<<9|a>>>23)+y|0)<<13|a>>>19)+d|0)<<18|a>>>14,v^=(a=(w^=(a=(N^=(a=(g^=(a=v+w|0)<<7|a>>>25)+v|0)<<9|a>>>23)+g|0)<<13|a>>>19)+N|0)<<18|a>>>14;e[0]=i>>>0&255,e[1]=i>>>8&255,e[2]=i>>>16&255,e[3]=i>>>24&255,e[4]=l>>>0&255,e[5]=l>>>8&255,e[6]=l>>>16&255,e[7]=l>>>24&255,e[8]=f>>>0&255,e[9]=f>>>8&255,e[10]=f>>>16&255,e[11]=f>>>24&255,e[12]=v>>>0&255,e[13]=v>>>8&255,e[14]=v>>>16&255,e[15]=v>>>24&255,e[16]=m>>>0&255,e[17]=m>>>8&255,e[18]=m>>>16&255,e[19]=m>>>24&255,e[20]=p>>>0&255,e[21]=p>>>8&255,e[22]=p>>>16&255,e[23]=p>>>24&255,e[24]=d>>>0&255,e[25]=d>>>8&255,e[26]=d>>>16&255,e[27]=d>>>24&255,e[28]=h>>>0&255,e[29]=h>>>8&255,e[30]=h>>>16&255,e[31]=h>>>24&255}(e,t,n,r)}var v=new Uint8Array([101,120,112,97,110,100,32,51,50,45,98,121,116,101,32,107]);function b(e,t,n,r,a,i,s){var o,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]=i[c];for(;a>=64;){for(N(l,u,s,v),c=0;c<64;c++)e[t+c]=n[r+c]^l[c];for(o=1,c=8;c<16;c++)o=o+(255&u[c])|0,u[c]=255&o,o>>>=8;a-=64,t+=64,r+=64}if(a>0)for(N(l,u,s,v),c=0;c<a;c++)e[t+c]=n[r+c]^l[c];return 0}function x(e,t,n,r,a){var i,s,o=new Uint8Array(16),c=new Uint8Array(64);for(s=0;s<16;s++)o[s]=0;for(s=0;s<8;s++)o[s]=r[s];for(;n>=64;){for(N(c,o,a,v),s=0;s<64;s++)e[t+s]=c[s];for(i=1,s=8;s<16;s++)i=i+(255&o[s])|0,o[s]=255&i,i>>>=8;n-=64,t+=64}if(n>0)for(N(c,o,a,v),s=0;s<n;s++)e[t+s]=c[s];return 0}function _(e,t,n,r,a){var i=new Uint8Array(32);w(i,r,a,v);for(var s=new Uint8Array(8),o=0;o<8;o++)s[o]=r[o+16];return x(e,t,n,s,i)}function P(e,t,n,r,a,i,s){var o=new Uint8Array(32);w(o,i,s,v);for(var c=new Uint8Array(8),u=0;u<8;u++)c[u]=i[u+16];return b(e,t,n,r,a,c,o)}var C=function(e){var t,n,r,a,i,s,o,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),a=255&e[6]|(255&e[7])<<8,this.r[3]=8191&(r>>>7|a<<9),i=255&e[8]|(255&e[9])<<8,this.r[4]=255&(a>>>4|i<<12),this.r[5]=i>>>1&8190,s=255&e[10]|(255&e[11])<<8,this.r[6]=8191&(i>>>14|s<<2),o=255&e[12]|(255&e[13])<<8,this.r[7]=8065&(s>>>11|o<<5),c=255&e[14]|(255&e[15])<<8,this.r[8]=8191&(o>>>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 A(e,t,n,r,a,i){var s=new C(i);return s.update(n,r,a),s.finish(e,t),0}function S(e,t,n,r,a,i){var s=new Uint8Array(16);return A(s,0,n,r,a,i),y(e,t,s,0)}function T(e,t,n,r,a){var i;if(n<32)return-1;for(P(e,0,t,0,n,r,a),A(e,16,e,32,n-32,e),i=0;i<16;i++)e[i]=0;return 0}function z(e,t,n,r,a){var i,s=new Uint8Array(32);if(n<32)return-1;if(_(s,0,32,r,a),0!==S(t,16,t,32,n-32,s))return-1;for(P(e,0,t,0,n,r,a),i=0;i<32;i++)e[i]=0;return 0}function E(e,t){var n;for(n=0;n<16;n++)e[n]=0|t[n]}function I(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 M(e,t,n){for(var r,a=~(n-1),i=0;i<16;i++)r=a&(e[i]^t[i]),e[i]^=r,t[i]^=r}function q(e,n){var r,a,i,s=t(),o=t();for(r=0;r<16;r++)o[r]=n[r];for(I(o),I(o),I(o),a=0;a<2;a++){for(s[0]=o[0]-65517,r=1;r<15;r++)s[r]=o[r]-65535-(s[r-1]>>16&1),s[r-1]&=65535;s[15]=o[15]-32767-(s[14]>>16&1),i=s[15]>>16&1,s[14]&=65535,M(o,s,1-i)}for(r=0;r<16;r++)e[2*r]=255&o[r],e[2*r+1]=o[r]>>8}function R(e,t){var n=new Uint8Array(32),r=new Uint8Array(32);return q(n,e),q(r,t),g(n,0,r,0)}function O(e){var t=new Uint8Array(32);return q(t,e),1&t[0]}function k(e,t){var n;for(n=0;n<16;n++)e[n]=t[2*n]+(t[2*n+1]<<8);e[15]&=32767}function B(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]+n[r]}function G(e,t,n){for(var r=0;r<16;r++)e[r]=t[r]-n[r]}function $(e,t,n){var r,a,i=0,s=0,o=0,c=0,u=0,l=0,m=0,p=0,d=0,h=0,f=0,y=0,g=0,N=0,w=0,v=0,b=0,x=0,_=0,P=0,C=0,A=0,S=0,T=0,z=0,E=0,I=0,M=0,q=0,R=0,O=0,k=n[0],B=n[1],G=n[2],$=n[3],U=n[4],V=n[5],D=n[6],L=n[7],j=n[8],H=n[9],F=n[10],J=n[11],W=n[12],K=n[13],Y=n[14],Q=n[15];i+=(r=t[0])*k,s+=r*B,o+=r*G,c+=r*$,u+=r*U,l+=r*V,m+=r*D,p+=r*L,d+=r*j,h+=r*H,f+=r*F,y+=r*J,g+=r*W,N+=r*K,w+=r*Y,v+=r*Q,s+=(r=t[1])*k,o+=r*B,c+=r*G,u+=r*$,l+=r*U,m+=r*V,p+=r*D,d+=r*L,h+=r*j,f+=r*H,y+=r*F,g+=r*J,N+=r*W,w+=r*K,v+=r*Y,b+=r*Q,o+=(r=t[2])*k,c+=r*B,u+=r*G,l+=r*$,m+=r*U,p+=r*V,d+=r*D,h+=r*L,f+=r*j,y+=r*H,g+=r*F,N+=r*J,w+=r*W,v+=r*K,b+=r*Y,x+=r*Q,c+=(r=t[3])*k,u+=r*B,l+=r*G,m+=r*$,p+=r*U,d+=r*V,h+=r*D,f+=r*L,y+=r*j,g+=r*H,N+=r*F,w+=r*J,v+=r*W,b+=r*K,x+=r*Y,_+=r*Q,u+=(r=t[4])*k,l+=r*B,m+=r*G,p+=r*$,d+=r*U,h+=r*V,f+=r*D,y+=r*L,g+=r*j,N+=r*H,w+=r*F,v+=r*J,b+=r*W,x+=r*K,_+=r*Y,P+=r*Q,l+=(r=t[5])*k,m+=r*B,p+=r*G,d+=r*$,h+=r*U,f+=r*V,y+=r*D,g+=r*L,N+=r*j,w+=r*H,v+=r*F,b+=r*J,x+=r*W,_+=r*K,P+=r*Y,C+=r*Q,m+=(r=t[6])*k,p+=r*B,d+=r*G,h+=r*$,f+=r*U,y+=r*V,g+=r*D,N+=r*L,w+=r*j,v+=r*H,b+=r*F,x+=r*J,_+=r*W,P+=r*K,C+=r*Y,A+=r*Q,p+=(r=t[7])*k,d+=r*B,h+=r*G,f+=r*$,y+=r*U,g+=r*V,N+=r*D,w+=r*L,v+=r*j,b+=r*H,x+=r*F,_+=r*J,P+=r*W,C+=r*K,A+=r*Y,S+=r*Q,d+=(r=t[8])*k,h+=r*B,f+=r*G,y+=r*$,g+=r*U,N+=r*V,w+=r*D,v+=r*L,b+=r*j,x+=r*H,_+=r*F,P+=r*J,C+=r*W,A+=r*K,S+=r*Y,T+=r*Q,h+=(r=t[9])*k,f+=r*B,y+=r*G,g+=r*$,N+=r*U,w+=r*V,v+=r*D,b+=r*L,x+=r*j,_+=r*H,P+=r*F,C+=r*J,A+=r*W,S+=r*K,T+=r*Y,z+=r*Q,f+=(r=t[10])*k,y+=r*B,g+=r*G,N+=r*$,w+=r*U,v+=r*V,b+=r*D,x+=r*L,_+=r*j,P+=r*H,C+=r*F,A+=r*J,S+=r*W,T+=r*K,z+=r*Y,E+=r*Q,y+=(r=t[11])*k,g+=r*B,N+=r*G,w+=r*$,v+=r*U,b+=r*V,x+=r*D,_+=r*L,P+=r*j,C+=r*H,A+=r*F,S+=r*J,T+=r*W,z+=r*K,E+=r*Y,I+=r*Q,g+=(r=t[12])*k,N+=r*B,w+=r*G,v+=r*$,b+=r*U,x+=r*V,_+=r*D,P+=r*L,C+=r*j,A+=r*H,S+=r*F,T+=r*J,z+=r*W,E+=r*K,I+=r*Y,M+=r*Q,N+=(r=t[13])*k,w+=r*B,v+=r*G,b+=r*$,x+=r*U,_+=r*V,P+=r*D,C+=r*L,A+=r*j,S+=r*H,T+=r*F,z+=r*J,E+=r*W,I+=r*K,M+=r*Y,q+=r*Q,w+=(r=t[14])*k,v+=r*B,b+=r*G,x+=r*$,_+=r*U,P+=r*V,C+=r*D,A+=r*L,S+=r*j,T+=r*H,z+=r*F,E+=r*J,I+=r*W,M+=r*K,q+=r*Y,R+=r*Q,v+=(r=t[15])*k,s+=38*(x+=r*G),o+=38*(_+=r*$),c+=38*(P+=r*U),u+=38*(C+=r*V),l+=38*(A+=r*D),m+=38*(S+=r*L),p+=38*(T+=r*j),d+=38*(z+=r*H),h+=38*(E+=r*F),f+=38*(I+=r*J),y+=38*(M+=r*W),g+=38*(q+=r*K),N+=38*(R+=r*Y),w+=38*(O+=r*Q),i=(r=(i+=38*(b+=r*B))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i=(r=(i+=a-1+37*(a-1))+(a=1)+65535)-65536*(a=Math.floor(r/65536)),s=(r=s+a+65535)-65536*(a=Math.floor(r/65536)),o=(r=o+a+65535)-65536*(a=Math.floor(r/65536)),c=(r=c+a+65535)-65536*(a=Math.floor(r/65536)),u=(r=u+a+65535)-65536*(a=Math.floor(r/65536)),l=(r=l+a+65535)-65536*(a=Math.floor(r/65536)),m=(r=m+a+65535)-65536*(a=Math.floor(r/65536)),p=(r=p+a+65535)-65536*(a=Math.floor(r/65536)),d=(r=d+a+65535)-65536*(a=Math.floor(r/65536)),h=(r=h+a+65535)-65536*(a=Math.floor(r/65536)),f=(r=f+a+65535)-65536*(a=Math.floor(r/65536)),y=(r=y+a+65535)-65536*(a=Math.floor(r/65536)),g=(r=g+a+65535)-65536*(a=Math.floor(r/65536)),N=(r=N+a+65535)-65536*(a=Math.floor(r/65536)),w=(r=w+a+65535)-65536*(a=Math.floor(r/65536)),v=(r=v+a+65535)-65536*(a=Math.floor(r/65536)),i+=a-1+37*(a-1),e[0]=i,e[1]=s,e[2]=o,e[3]=c,e[4]=u,e[5]=l,e[6]=m,e[7]=p,e[8]=d,e[9]=h,e[10]=f,e[11]=y,e[12]=g,e[13]=N,e[14]=w,e[15]=v}function U(e,t){$(e,t,t)}function V(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=253;r>=0;r--)U(a,a),2!==r&&4!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function D(e,n){var r,a=t();for(r=0;r<16;r++)a[r]=n[r];for(r=250;r>=0;r--)U(a,a),1!==r&&$(a,a,n);for(r=0;r<16;r++)e[r]=a[r]}function L(e,n,r){var a,i,s=new Uint8Array(32),o=new Float64Array(80),u=t(),l=t(),m=t(),p=t(),d=t(),h=t();for(i=0;i<31;i++)s[i]=n[i];for(s[31]=127&n[31]|64,s[0]&=248,k(o,r),i=0;i<16;i++)l[i]=o[i],p[i]=u[i]=m[i]=0;for(u[0]=p[0]=1,i=254;i>=0;--i)M(u,l,a=s[i>>>3]>>>(7&i)&1),M(m,p,a),B(d,u,m),G(u,u,m),B(m,l,p),G(l,l,p),U(p,d),U(h,u),$(u,m,u),$(m,l,d),B(d,u,m),G(u,u,m),U(l,u),G(m,p,h),$(u,m,c),B(u,u,p),$(m,m,u),$(u,p,h),$(p,l,o),U(l,d),M(u,l,a),M(m,p,a);for(i=0;i<16;i++)o[i+16]=u[i],o[i+32]=m[i],o[i+48]=l[i],o[i+64]=p[i];var f=o.subarray(32),y=o.subarray(16);return V(f,f),$(y,y,f),q(e,y),0}function j(e,t){return L(e,t,i)}function H(e,t){return r(t,32),j(e,t)}function F(e,t,n){var r=new Uint8Array(32);return L(r,n,t),w(e,a,r,v)}C.prototype.blocks=function(e,t,n){for(var r,a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x=this.fin?0:2048,_=this.h[0],P=this.h[1],C=this.h[2],A=this.h[3],S=this.h[4],T=this.h[5],z=this.h[6],E=this.h[7],I=this.h[8],M=this.h[9],q=this.r[0],R=this.r[1],O=this.r[2],k=this.r[3],B=this.r[4],G=this.r[5],$=this.r[6],U=this.r[7],V=this.r[8],D=this.r[9];n>=16;)p=m=0,p+=(_+=8191&(r=255&e[t+0]|(255&e[t+1])<<8))*q,p+=(P+=8191&(r>>>13|(a=255&e[t+2]|(255&e[t+3])<<8)<<3))*(5*D),p+=(C+=8191&(a>>>10|(i=255&e[t+4]|(255&e[t+5])<<8)<<6))*(5*V),p+=(A+=8191&(i>>>7|(s=255&e[t+6]|(255&e[t+7])<<8)<<9))*(5*U),m=(p+=(S+=8191&(s>>>4|(o=255&e[t+8]|(255&e[t+9])<<8)<<12))*(5*$))>>>13,p&=8191,p+=(T+=o>>>1&8191)*(5*G),p+=(z+=8191&(o>>>14|(c=255&e[t+10]|(255&e[t+11])<<8)<<2))*(5*B),p+=(E+=8191&(c>>>11|(u=255&e[t+12]|(255&e[t+13])<<8)<<5))*(5*k),p+=(I+=8191&(u>>>8|(l=255&e[t+14]|(255&e[t+15])<<8)<<8))*(5*O),d=m+=(p+=(M+=l>>>5|x)*(5*R))>>>13,d+=_*R,d+=P*q,d+=C*(5*D),d+=A*(5*V),m=(d+=S*(5*U))>>>13,d&=8191,d+=T*(5*$),d+=z*(5*G),d+=E*(5*B),d+=I*(5*k),m+=(d+=M*(5*O))>>>13,d&=8191,h=m,h+=_*O,h+=P*R,h+=C*q,h+=A*(5*D),m=(h+=S*(5*V))>>>13,h&=8191,h+=T*(5*U),h+=z*(5*$),h+=E*(5*G),h+=I*(5*B),f=m+=(h+=M*(5*k))>>>13,f+=_*k,f+=P*O,f+=C*R,f+=A*q,m=(f+=S*(5*D))>>>13,f&=8191,f+=T*(5*V),f+=z*(5*U),f+=E*(5*$),f+=I*(5*G),y=m+=(f+=M*(5*B))>>>13,y+=_*B,y+=P*k,y+=C*O,y+=A*R,m=(y+=S*q)>>>13,y&=8191,y+=T*(5*D),y+=z*(5*V),y+=E*(5*U),y+=I*(5*$),g=m+=(y+=M*(5*G))>>>13,g+=_*G,g+=P*B,g+=C*k,g+=A*O,m=(g+=S*R)>>>13,g&=8191,g+=T*q,g+=z*(5*D),g+=E*(5*V),g+=I*(5*U),N=m+=(g+=M*(5*$))>>>13,N+=_*$,N+=P*G,N+=C*B,N+=A*k,m=(N+=S*O)>>>13,N&=8191,N+=T*R,N+=z*q,N+=E*(5*D),N+=I*(5*V),w=m+=(N+=M*(5*U))>>>13,w+=_*U,w+=P*$,w+=C*G,w+=A*B,m=(w+=S*k)>>>13,w&=8191,w+=T*O,w+=z*R,w+=E*q,w+=I*(5*D),v=m+=(w+=M*(5*V))>>>13,v+=_*V,v+=P*U,v+=C*$,v+=A*G,m=(v+=S*B)>>>13,v&=8191,v+=T*k,v+=z*O,v+=E*R,v+=I*q,b=m+=(v+=M*(5*D))>>>13,b+=_*D,b+=P*V,b+=C*U,b+=A*$,m=(b+=S*G)>>>13,b&=8191,b+=T*B,b+=z*k,b+=E*O,b+=I*R,_=p=8191&(m=(m=((m+=(b+=M*q)>>>13)<<2)+m|0)+(p&=8191)|0),P=d+=m>>>=13,C=h&=8191,A=f&=8191,S=y&=8191,T=g&=8191,z=N&=8191,E=w&=8191,I=v&=8191,M=b&=8191,t+=16,n-=16;this.h[0]=_,this.h[1]=P,this.h[2]=C,this.h[3]=A,this.h[4]=S,this.h[5]=T,this.h[6]=z,this.h[7]=E,this.h[8]=I,this.h[9]=M},C.prototype.finish=function(e,t){var n,r,a,i,s=new Uint16Array(10);if(this.leftover){for(i=this.leftover,this.buffer[i++]=1;i<16;i++)this.buffer[i]=0;this.fin=1,this.blocks(this.buffer,0,16)}for(n=this.h[1]>>>13,this.h[1]&=8191,i=2;i<10;i++)this.h[i]+=n,n=this.h[i]>>>13,this.h[i]&=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,s[0]=this.h[0]+5,n=s[0]>>>13,s[0]&=8191,i=1;i<10;i++)s[i]=this.h[i]+n,n=s[i]>>>13,s[i]&=8191;for(s[9]-=8192,r=(1^n)-1,i=0;i<10;i++)s[i]&=r;for(r=~r,i=0;i<10;i++)this.h[i]=this.h[i]&r|s[i];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),a=this.h[0]+this.pad[0],this.h[0]=65535&a,i=1;i<8;i++)a=(this.h[i]+this.pad[i]|0)+(a>>>16)|0,this.h[i]=65535&a;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},C.prototype.update=function(e,t,n){var r,a;if(this.leftover){for((a=16-this.leftover)>n&&(a=n),r=0;r<a;r++)this.buffer[this.leftover+r]=e[t+r];if(n-=a,t+=a,this.leftover+=a,this.leftover<16)return;this.blocks(this.buffer,0,16),this.leftover=0}if(n>=16&&(a=n-n%16,this.blocks(e,t,a),t+=a,n-=a),n){for(r=0;r<n;r++)this.buffer[this.leftover+r]=e[t+r];this.leftover+=n}};var J=T,W=z,K=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function Y(e,t,n,r){for(var a,i,s,o,c,u,l,m,p,d,h,f,y,g,N,w,v,b,x,_,P,C,A,S,T,z,E=new Int32Array(16),I=new Int32Array(16),M=e[0],q=e[1],R=e[2],O=e[3],k=e[4],B=e[5],G=e[6],$=e[7],U=t[0],V=t[1],D=t[2],L=t[3],j=t[4],H=t[5],F=t[6],J=t[7],W=0;r>=128;){for(x=0;x<16;x++)_=8*x+W,E[x]=n[_+0]<<24|n[_+1]<<16|n[_+2]<<8|n[_+3],I[x]=n[_+4]<<24|n[_+5]<<16|n[_+6]<<8|n[_+7];for(x=0;x<80;x++)if(a=M,i=q,s=R,o=O,c=k,u=B,l=G,p=U,d=V,h=D,f=L,y=j,g=H,N=F,A=65535&(C=J),S=C>>>16,T=65535&(P=$),z=P>>>16,A+=65535&(C=(j>>>14|k<<18)^(j>>>18|k<<14)^(k>>>9|j<<23)),S+=C>>>16,T+=65535&(P=(k>>>14|j<<18)^(k>>>18|j<<14)^(j>>>9|k<<23)),z+=P>>>16,A+=65535&(C=j&H^~j&F),S+=C>>>16,T+=65535&(P=k&B^~k&G),z+=P>>>16,A+=65535&(C=K[2*x+1]),S+=C>>>16,T+=65535&(P=K[2*x]),z+=P>>>16,P=E[x%16],S+=(C=I[x%16])>>>16,T+=65535&P,z+=P>>>16,T+=(S+=(A+=65535&C)>>>16)>>>16,A=65535&(C=b=65535&A|S<<16),S=C>>>16,T=65535&(P=v=65535&T|(z+=T>>>16)<<16),z=P>>>16,A+=65535&(C=(U>>>28|M<<4)^(M>>>2|U<<30)^(M>>>7|U<<25)),S+=C>>>16,T+=65535&(P=(M>>>28|U<<4)^(U>>>2|M<<30)^(U>>>7|M<<25)),z+=P>>>16,S+=(C=U&V^U&D^V&D)>>>16,T+=65535&(P=M&q^M&R^q&R),z+=P>>>16,m=65535&(T+=(S+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,w=65535&A|S<<16,A=65535&(C=f),S=C>>>16,T=65535&(P=o),z=P>>>16,S+=(C=b)>>>16,T+=65535&(P=v),z+=P>>>16,q=a,R=i,O=s,k=o=65535&(T+=(S+=(A+=65535&C)>>>16)>>>16)|(z+=T>>>16)<<16,B=c,G=u,$=l,M=m,V=p,D=d,L=h,j=f=65535&A|S<<16,H=y,F=g,J=N,U=w,x%16==15)for(_=0;_<16;_++)P=E[_],A=65535&(C=I[_]),S=C>>>16,T=65535&P,z=P>>>16,P=E[(_+9)%16],A+=65535&(C=I[(_+9)%16]),S+=C>>>16,T+=65535&P,z+=P>>>16,v=E[(_+1)%16],A+=65535&(C=((b=I[(_+1)%16])>>>1|v<<31)^(b>>>8|v<<24)^(b>>>7|v<<25)),S+=C>>>16,T+=65535&(P=(v>>>1|b<<31)^(v>>>8|b<<24)^v>>>7),z+=P>>>16,v=E[(_+14)%16],S+=(C=((b=I[(_+14)%16])>>>19|v<<13)^(v>>>29|b<<3)^(b>>>6|v<<26))>>>16,T+=65535&(P=(v>>>19|b<<13)^(b>>>29|v<<3)^v>>>6),z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,E[_]=65535&T|z<<16,I[_]=65535&A|S<<16;A=65535&(C=U),S=C>>>16,T=65535&(P=M),z=P>>>16,P=e[0],S+=(C=t[0])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[0]=M=65535&T|z<<16,t[0]=U=65535&A|S<<16,A=65535&(C=V),S=C>>>16,T=65535&(P=q),z=P>>>16,P=e[1],S+=(C=t[1])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[1]=q=65535&T|z<<16,t[1]=V=65535&A|S<<16,A=65535&(C=D),S=C>>>16,T=65535&(P=R),z=P>>>16,P=e[2],S+=(C=t[2])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[2]=R=65535&T|z<<16,t[2]=D=65535&A|S<<16,A=65535&(C=L),S=C>>>16,T=65535&(P=O),z=P>>>16,P=e[3],S+=(C=t[3])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[3]=O=65535&T|z<<16,t[3]=L=65535&A|S<<16,A=65535&(C=j),S=C>>>16,T=65535&(P=k),z=P>>>16,P=e[4],S+=(C=t[4])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[4]=k=65535&T|z<<16,t[4]=j=65535&A|S<<16,A=65535&(C=H),S=C>>>16,T=65535&(P=B),z=P>>>16,P=e[5],S+=(C=t[5])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[5]=B=65535&T|z<<16,t[5]=H=65535&A|S<<16,A=65535&(C=F),S=C>>>16,T=65535&(P=G),z=P>>>16,P=e[6],S+=(C=t[6])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[6]=G=65535&T|z<<16,t[6]=F=65535&A|S<<16,A=65535&(C=J),S=C>>>16,T=65535&(P=$),z=P>>>16,P=e[7],S+=(C=t[7])>>>16,T+=65535&P,z+=P>>>16,z+=(T+=(S+=(A+=65535&C)>>>16)>>>16)>>>16,e[7]=$=65535&T|z<<16,t[7]=J=65535&A|S<<16,W+=128,r-=128}return r}function Q(e,t,n){var r,a=new Int32Array(8),i=new Int32Array(8),s=new Uint8Array(256),o=n;for(a[0]=1779033703,a[1]=3144134277,a[2]=1013904242,a[3]=2773480762,a[4]=1359893119,a[5]=2600822924,a[6]=528734635,a[7]=1541459225,i[0]=4089235720,i[1]=2227873595,i[2]=4271175723,i[3]=1595750129,i[4]=2917565137,i[5]=725511199,i[6]=4215389547,i[7]=327033209,Y(a,i,t,n),n%=128,r=0;r<n;r++)s[r]=t[o-n+r];for(s[n]=128,s[(n=256-128*(n<112?1:0))-9]=0,h(s,n-8,o/536870912|0,o<<3),Y(a,i,s,n),r=0;r<8;r++)h(e,8*r,a[r],i[r]);return 0}function Z(e,n){var r=t(),a=t(),i=t(),s=t(),o=t(),c=t(),u=t(),m=t(),p=t();G(r,e[1],e[0]),G(p,n[1],n[0]),$(r,r,p),B(a,e[0],e[1]),B(p,n[0],n[1]),$(a,a,p),$(i,e[3],n[3]),$(i,i,l),$(s,e[2],n[2]),B(s,s,s),G(o,a,r),G(c,s,i),B(u,s,i),B(m,a,r),$(e[0],o,c),$(e[1],m,u),$(e[2],u,c),$(e[3],o,m)}function X(e,t,n){var r;for(r=0;r<4;r++)M(e[r],t[r],n)}function ee(e,n){var r=t(),a=t(),i=t();V(i,n[2]),$(r,n[0],i),$(a,n[1],i),q(e,a),e[31]^=O(r)<<7}function te(e,t,n){var r,a;for(E(e[0],s),E(e[1],o),E(e[2],o),E(e[3],s),a=255;a>=0;--a)X(e,t,r=n[a/8|0]>>(7&a)&1),Z(t,e),Z(e,e),X(e,t,r)}function ne(e,n){var r=[t(),t(),t(),t()];E(r[0],m),E(r[1],p),E(r[2],o),$(r[3],m,p),te(e,r,n)}function re(e,n,a){var i,s=new Uint8Array(64),o=[t(),t(),t(),t()];for(a||r(n,32),Q(s,n,32),s[0]&=248,s[31]&=127,s[31]|=64,ne(o,s),ee(e,o),i=0;i<32;i++)n[i+32]=e[i];return 0}var ae=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 ie(e,t){var n,r,a,i;for(r=63;r>=32;--r){for(n=0,a=r-32,i=r-12;a<i;++a)t[a]+=n-16*t[r]*ae[a-(r-32)],n=Math.floor((t[a]+128)/256),t[a]-=256*n;t[a]+=n,t[r]=0}for(n=0,a=0;a<32;a++)t[a]+=n-(t[31]>>4)*ae[a],n=t[a]>>8,t[a]&=255;for(a=0;a<32;a++)t[a]-=n*ae[a];for(r=0;r<32;r++)t[r+1]+=t[r]>>8,e[r]=255&t[r]}function se(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;ie(e,n)}function oe(e,n,r,a){var i,s,o=new Uint8Array(64),c=new Uint8Array(64),u=new Uint8Array(64),l=new Float64Array(64),m=[t(),t(),t(),t()];Q(o,a,32),o[0]&=248,o[31]&=127,o[31]|=64;var p=r+64;for(i=0;i<r;i++)e[64+i]=n[i];for(i=0;i<32;i++)e[32+i]=o[32+i];for(Q(u,e.subarray(32),r+32),se(u),ne(m,u),ee(e,m),i=32;i<64;i++)e[i]=a[i];for(Q(c,e,r+64),se(c),i=0;i<64;i++)l[i]=0;for(i=0;i<32;i++)l[i]=u[i];for(i=0;i<32;i++)for(s=0;s<32;s++)l[i+s]+=c[i]*o[s];return ie(e.subarray(32),l),p}function ce(e,n,r,a){var i,c=new Uint8Array(32),l=new Uint8Array(64),m=[t(),t(),t(),t()],p=[t(),t(),t(),t()];if(r<64)return-1;if(function(e,n){var r=t(),a=t(),i=t(),c=t(),l=t(),m=t(),p=t();return E(e[2],o),k(e[1],n),U(i,e[1]),$(c,i,u),G(i,i,e[2]),B(c,e[2],c),U(l,c),U(m,l),$(p,m,l),$(r,p,i),$(r,r,c),D(r,r),$(r,r,i),$(r,r,c),$(r,r,c),$(e[0],r,c),U(a,e[0]),$(a,a,c),R(a,i)&&$(e[0],e[0],d),U(a,e[0]),$(a,a,c),R(a,i)?-1:(O(e[0])===n[31]>>7&&G(e[0],s,e[0]),$(e[3],e[0],e[1]),0)}(p,a))return-1;for(i=0;i<r;i++)e[i]=n[i];for(i=0;i<32;i++)e[i+32]=a[i];if(Q(l,e,r),se(l),te(m,p,l),ne(p,n.subarray(32)),Z(m,p),ee(c,m),r-=64,g(n,0,c,0)){for(i=0;i<r;i++)e[i]=0;return-1}for(i=0;i<r;i++)e[i]=n[i+64];return r}var ue=64,le=32,me=64;function pe(e,t){if(32!==e.length)throw new Error("bad key size");if(24!==t.length)throw new Error("bad nonce size")}function de(){for(var e=0;e<arguments.length;e++)if(!(arguments[e]instanceof Uint8Array))throw new TypeError("unexpected type, use Uint8Array")}function he(e){for(var t=0;t<e.length;t++)e[t]=0}e.lowlevel={crypto_core_hsalsa20:w,crypto_stream_xor:P,crypto_stream:_,crypto_stream_salsa20_xor:b,crypto_stream_salsa20:x,crypto_onetimeauth:A,crypto_onetimeauth_verify:S,crypto_verify_16:y,crypto_verify_32:g,crypto_secretbox:T,crypto_secretbox_open:z,crypto_scalarmult:L,crypto_scalarmult_base:j,crypto_box_beforenm:F,crypto_box_afternm:J,crypto_box:function(e,t,n,r,a,i){var s=new Uint8Array(32);return F(s,a,i),J(e,t,n,r,s)},crypto_box_open:function(e,t,n,r,a,i){var s=new Uint8Array(32);return F(s,a,i),W(e,t,n,r,s)},crypto_box_keypair:H,crypto_hash:Q,crypto_sign:oe,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:me,crypto_sign_SEEDBYTES:32,crypto_hash_BYTES:64,gf:t,D:u,L:ae,pack25519:q,unpack25519:k,M:$,A:B,S:U,Z:G,pow2523:D,add:Z,set25519:E,modL:ie,scalarmult:te,scalarbase:ne},e.randomBytes=function(e){var t=new Uint8Array(e);return r(t,e),t},e.secretbox=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(32+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+32]=e[i];return T(a,r,r.length,t,n),a.subarray(16)},e.secretbox.open=function(e,t,n){de(e,t,n),pe(n,t);for(var r=new Uint8Array(16+e.length),a=new Uint8Array(r.length),i=0;i<e.length;i++)r[i+16]=e[i];return r.length<32||0!==z(a,r,r.length,t,n)?null:a.subarray(32)},e.secretbox.keyLength=32,e.secretbox.nonceLength=24,e.secretbox.overheadLength=16,e.scalarMult=function(e,t){if(de(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(de(e),32!==e.length)throw new Error("bad n size");var t=new Uint8Array(32);return j(t,e),t},e.scalarMult.scalarLength=32,e.scalarMult.groupElementLength=32,e.box=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox(t,n,i)},e.box.before=function(e,t){de(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 F(n,e,t),n},e.box.after=e.secretbox,e.box.open=function(t,n,r,a){var i=e.box.before(r,a);return e.secretbox.open(t,n,i)},e.box.open.after=e.secretbox.open,e.box.keyPair=function(){var e=new Uint8Array(32),t=new Uint8Array(32);return H(e,t),{publicKey:e,secretKey:t}},e.box.keyPair.fromSecretKey=function(e){if(de(e),32!==e.length)throw new Error("bad secret key size");var t=new Uint8Array(32);return j(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(de(e,t),t.length!==me)throw new Error("bad secret key size");var n=new Uint8Array(ue+e.length);return oe(n,e,e.length,t),n},e.sign.open=function(e,t){if(de(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 a=new Uint8Array(r),i=0;i<a.length;i++)a[i]=n[i];return a},e.sign.detached=function(t,n){for(var r=e.sign(t,n),a=new Uint8Array(ue),i=0;i<a.length;i++)a[i]=r[i];return a},e.sign.detached.verify=function(e,t,n){if(de(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,a=new Uint8Array(ue+e.length),i=new Uint8Array(ue+e.length);for(r=0;r<ue;r++)a[r]=t[r];for(r=0;r<e.length;r++)a[r+ue]=e[r];return ce(i,a,a.length,n)>=0},e.sign.keyPair=function(){var e=new Uint8Array(le),t=new Uint8Array(me);return re(e,t),{publicKey:e,secretKey:t}},e.sign.keyPair.fromSecretKey=function(e){if(de(e),e.length!==me)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(de(e),32!==e.length)throw new Error("bad seed size");for(var t=new Uint8Array(le),n=new Uint8Array(me),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=me,e.sign.seedLength=32,e.sign.signatureLength=ue,e.hash=function(e){de(e);var t=new Uint8Array(64);return Q(t,e,e.length),t},e.hash.hashLength=64,e.verify=function(e,t){return de(e,t),0!==e.length&&0!==t.length&&e.length===t.length&&0===f(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,a=new Uint8Array(n);for(r=0;r<n;r+=65536)t.getRandomValues(a.subarray(r,r+Math.min(n-r,65536)));for(r=0;r<n;r++)e[r]=a[r];he(a)})):(t=n(1281))&&t.randomBytes&&e.setPRNG((function(e,n){var r,a=t.randomBytes(n);for(r=0;r<n;r++)e[r]=a[r];he(a)}))}()}(e.exports?e.exports:self.nacl=self.nacl||{})},4372:function(e,t,n){"use strict";var r=n(9675),a=n(6556)("TypedArray.prototype.buffer",!0),i=n(5680);e.exports=a||function(e){if(!i(e))throw new r("Not a Typed Array");return e.buffer}},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 a=r.WebSocket||r.MozWebSocket,i=n(9840);function s(e,t){return t?new a(e,t):new a(e)}a&&["CONNECTING","OPEN","CLOSING","CLOSED"].forEach((function(e){Object.defineProperty(s,e,{get:function(){return a[e]}})})),e.exports={w3cwebsocket:a?s:null,version:i}},9840:function(e,t,n){e.exports=n(9003).version},5767:function(e,t,n){"use strict";var r=n(2682),a=n(9209),i=n(487),s=n(6556),o=n(5795),c=n(3628),u=s("Object.prototype.toString"),l=n(9092)(),m="undefined"==typeof globalThis?n.g:globalThis,p=a(),d=s("String.prototype.slice"),h=s("Array.prototype.indexOf",!0)||function(e,t){for(var n=0;n<e.length;n+=1)if(e[n]===t)return n;return-1},f={__proto__:null};r(p,l&&o&&c?function(e){var t=new m[e];if(Symbol.toStringTag in t&&c){var n=c(t),r=o(n,Symbol.toStringTag);if(!r&&n){var a=c(n);r=o(a,Symbol.toStringTag)}f["$"+e]=i(r.get)}}:function(e){var t=new m[e],n=t.slice||t.set;n&&(f["$"+e]=i(n))}),e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!l){var t=d(u(e),8,-1);return h(p,t)>-1?t:"Object"===t&&function(e){var t=!1;return r(f,(function(n,r){if(!t)try{n(e),t=d(r,1)}catch(e){}})),t}(e)}return o?function(e){var t=!1;return r(f,(function(n,r){if(!t)try{"$"+n(e)===r&&(t=d(r,1))}catch(e){}})),t}(e):null}},1281:function(){},9209:function(e,t,n){"use strict";var r=n(6578),a="undefined"==typeof globalThis?n.g:globalThis;e.exports=function(){for(var e=[],t=0;t<r.length;t++)"function"==typeof a[r[t]]&&(e[e.length]=r[t]);return e}},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,a=e.exports=function(e,t,n){return r.defineProperty(e,t,n)};r.defineProperty.sham&&(a.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(1697),n(4664),n(3422),n(36),n(8703),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),a=n(4640),i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not a function")}},43:function(e,t,n){"use strict";var r=n(4018),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i("Can't set "+a(e)+" as a prototype")}},2156:function(e){"use strict";e.exports=function(){}},6624:function(e,t,n){"use strict";var r=n(6285),a=String,i=TypeError;e.exports=function(e){if(r(e))return e;throw new i(a(e)+" is not an object")}},4436:function(e,t,n){"use strict";var r=n(7374),a=n(4849),i=n(575),s=function(e){return function(t,n,s){var o=r(t),c=i(o);if(0===c)return!e&&-1;var u,l=a(s,c);if(e&&n!=n){for(;c>l;)if((u=o[l++])!=u)return!0}else for(;c>l;l++)if((e||l in o)&&o[l]===n)return e||l||0;return!e&&-1}};e.exports={includes:s(!0),indexOf:s(!1)}},726:function(e,t,n){"use strict";var r=n(8311),a=n(1907),i=n(6946),s=n(9298),o=n(575),c=n(6968),u=a([].push),l=function(e){var t=1===e,n=2===e,a=3===e,l=4===e,m=6===e,p=7===e,d=5===e||m;return function(h,f,y,g){for(var N,w,v=s(h),b=i(v),x=o(b),_=r(f,y),P=0,C=g||c,A=t?C(h,x):n||p?C(h,0):void 0;x>P;P++)if((d||P in b)&&(w=_(N=b[P],P,v),e))if(t)A[P]=w;else if(w)switch(e){case 3:return!0;case 5:return N;case 6:return P;case 2:u(A,N)}else switch(e){case 4:return!1;case 7:u(A,N)}return m?-1:a||l?l:A}};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),a=n(6264),i=n(798),s=a("species");e.exports=function(e){return i>=51||!r((function(){var t=[];return(t.constructor={})[s]=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),a=n(5468),i=n(6285),s=n(6264)("species"),o=Array;e.exports=function(e){var t;return r(e)&&(t=e.constructor,(a(t)&&(t===o||r(t.prototype))||i(t)&&null===(t=t[s]))&&(t=void 0)),void 0===t?o: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),a=r({}.toString),i=r("".slice);e.exports=function(e){return i(a(e),8,-1)}},3948:function(e,t,n){"use strict";var r=n(2623),a=n(2250),i=n(5807),s=n(6264)("toStringTag"),o=Object,c="Arguments"===i(function(){return arguments}());e.exports=r?i: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=o(e),s))?n:c?i(t):"Object"===(r=i(t))&&a(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),a=n(4284),i=n(5817);e.exports=r?function(e,t,n){return a.f(e,t,i(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(9447),a=n(4284),i=n(5817);e.exports=function(e,t,n){r?a.f(e,t,i(0,n)):e[t]=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,a){return a&&a.enumerable?e[t]=n:r(e,t,n),e}},2532:function(e,t,n){"use strict";var r=n(5951),a=Object.defineProperty;e.exports=function(e,t){try{a(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(5951),a=n(6285),i=r.document,s=a(i)&&a(i.createElement);e.exports=function(e){return s?i.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}},376:function(e){"use strict";e.exports=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"]},6794:function(e,t,n){"use strict";var r=n(5951).navigator,a=r&&r.userAgent;e.exports=a?String(a):""},798:function(e,t,n){"use strict";var r,a,i=n(5951),s=n(6794),o=i.process,c=i.Deno,u=o&&o.versions||c&&c.version,l=u&&u.v8;l&&(a=(r=l.split("."))[0]>0&&r[0]<4?1:+(r[0]+r[1])),!a&&s&&(!(r=s.match(/Edge\/(\d+)/))||r[1]>=74)&&(r=s.match(/Chrome\/(\d+)/))&&(a=+r[1]),e.exports=a},1091:function(e,t,n){"use strict";var r=n(5951),a=n(6024),i=n(2361),s=n(2250),o=n(3846).f,c=n(7463),u=n(2046),l=n(8311),m=n(1626),p=n(9724);n(6128);var d=function(e){var t=function(n,r,i){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,i)}return a(e,this,arguments)};return t.prototype=e.prototype,t};e.exports=function(e,t){var n,a,h,f,y,g,N,w,v,b=e.target,x=e.global,_=e.stat,P=e.proto,C=x?r:_?r[b]:r[b]&&r[b].prototype,A=x?u:u[b]||m(u,b,{})[b],S=A.prototype;for(f in t)a=!(n=c(x?f:b+(_?".":"#")+f,e.forced))&&C&&p(C,f),g=A[f],a&&(N=e.dontCallGetSet?(v=o(C,f))&&v.value:C[f]),y=a&&N?N:t[f],(n||P||typeof g!=typeof y)&&(w=e.bind&&a?l(y,r):e.wrap&&a?d(y):P&&s(y)?i(y):y,(e.sham||y&&y.sham||g&&g.sham)&&m(w,"sham",!0),m(A,f,w),P&&(p(u,h=b+"Prototype")||m(u,h,{}),m(u[h],f,y),e.real&&S&&(n||!S[f])&&m(S,f,y)))}},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),a=Function.prototype,i=a.apply,s=a.call;e.exports="object"==typeof Reflect&&Reflect.apply||(r?s.bind(i):function(){return s.apply(i,arguments)})},8311:function(e,t,n){"use strict";var r=n(2361),a=n(2159),i=n(1505),s=r(r.bind);e.exports=function(e,t){return a(e),void 0===t?e:i?s(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),a=Function.prototype.call;e.exports=r?a.bind(a):function(){return a.apply(a,arguments)}},6833:function(e,t,n){"use strict";var r=n(9447),a=n(9724),i=Function.prototype,s=r&&Object.getOwnPropertyDescriptor,o=a(i,"name"),c=o&&"something"===function(){}.name,u=o&&(!r||r&&s(i,"name").configurable);e.exports={EXISTS:o,PROPER:c,CONFIGURABLE:u}},1871:function(e,t,n){"use strict";var r=n(1907),a=n(2159);e.exports=function(e,t,n){try{return r(a(Object.getOwnPropertyDescriptor(e,t)[n]))}catch(e){}}},2361:function(e,t,n){"use strict";var r=n(5807),a=n(1907);e.exports=function(e){if("Function"===r(e))return a(e)}},1907:function(e,t,n){"use strict";var r=n(1505),a=Function.prototype,i=a.call,s=r&&a.bind.bind(i,i);e.exports=r?s:function(e){return function(){return i.apply(e,arguments)}}},5582:function(e,t,n){"use strict";var r=n(2046),a=n(5951),i=n(2250),s=function(e){return i(e)?e:void 0};e.exports=function(e,t){return arguments.length<2?s(r[e])||s(a[e]):r[e]&&r[e][t]||a[e]&&a[e][t]}},6656:function(e,t,n){"use strict";var r=n(1907),a=n(1793),i=n(2250),s=n(5807),o=n(160),c=r([].push);e.exports=function(e){if(i(e))return e;if(a(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"!==s(u)&&"String"!==s(u)||c(n,o(u))}var l=n.length,m=!0;return function(e,t){if(m)return m=!1,t;if(a(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),a=n(7136);e.exports=function(e,t){var n=e[t];return a(n)?void 0:r(n)}},5951: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),a=n(9298),i=r({}.hasOwnProperty);e.exports=Object.hasOwn||function(e,t){return i(a(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),a=n(8828),i=n(9552);e.exports=!r&&!a((function(){return 7!==Object.defineProperty(i("div"),"a",{get:function(){return 7}}).a}))},6946:function(e,t,n){"use strict";var r=n(1907),a=n(8828),i=n(5807),s=Object,o=r("".split);e.exports=a((function(){return!s("z").propertyIsEnumerable(0)}))?function(e){return"String"===i(e)?o(e,""):s(e)}:s},2647:function(e,t,n){"use strict";var r=n(1907),a=n(2250),i=n(6128),s=r(Function.toString);a(i.inspectSource)||(i.inspectSource=function(e){return s(e)}),e.exports=i.inspectSource},4932:function(e,t,n){"use strict";var r,a,i,s=n(551),o=n(5951),c=n(6285),u=n(1626),l=n(9724),m=n(6128),p=n(2522),d=n(8530),h="Object already initialized",f=o.TypeError,y=o.WeakMap;if(s||m.state){var g=m.state||(m.state=new y);g.get=g.get,g.has=g.has,g.set=g.set,r=function(e,t){if(g.has(e))throw new f(h);return t.facade=e,g.set(e,t),t},a=function(e){return g.get(e)||{}},i=function(e){return g.has(e)}}else{var N=p("state");d[N]=!0,r=function(e,t){if(l(e,N))throw new f(h);return t.facade=e,u(e,N,t),t},a=function(e){return l(e,N)?e[N]:{}},i=function(e){return l(e,N)}}e.exports={set:r,get:a,has:i,enforce:function(e){return i(e)?a(e):r(e,{})},getterFor:function(e){return function(t){var n;if(!c(t)||(n=a(t)).type!==e)throw new f("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),a=n(8828),i=n(2250),s=n(3948),o=n(5582),c=n(2647),u=function(){},l=o("Reflect","construct"),m=/^\s*(?:class|function)\b/,p=r(m.exec),d=!m.test(u),h=function(e){if(!i(e))return!1;try{return l(u,[],e),!0}catch(e){return!1}},f=function(e){if(!i(e))return!1;switch(s(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return d||!!p(m,c(e))}catch(e){return!0}};f.sham=!0,e.exports=!l||a((function(){var e;return h(h.call)||!h(Object)||!h((function(){e=!0}))||e}))?f:h},7463:function(e,t,n){"use strict";var r=n(8828),a=n(2250),i=/#|\.prototype\./,s=function(e,t){var n=c[o(e)];return n===l||n!==u&&(a(t)?r(t):!!t)},o=s.normalize=function(e){return String(e).replace(i,".").toLowerCase()},c=s.data={},u=s.NATIVE="N",l=s.POLYFILL="P";e.exports=s},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),a=n(2250),i=n(8280),s=n(1175),o=Object;e.exports=s?function(e){return"symbol"==typeof e}:function(e){var t=r("Symbol");return a(t)&&i(t.prototype,o(e))}},7181:function(e,t,n){"use strict";var r=n(5116).IteratorPrototype,a=n(8075),i=n(5817),s=n(4840),o=n(3742),c=function(){return this};e.exports=function(e,t,n,u){var l=t+" Iterator";return e.prototype=a(r,{next:i(+!u,n)}),s(e,l,!1,!0),o[l]=c,e}},183:function(e,t,n){"use strict";var r=n(1091),a=n(3930),i=n(7376),s=n(6833),o=n(2250),c=n(7181),u=n(5972),l=n(9192),m=n(4840),p=n(1626),d=n(8055),h=n(6264),f=n(3742),y=n(5116),g=s.PROPER,N=s.CONFIGURABLE,w=y.IteratorPrototype,v=y.BUGGY_SAFARI_ITERATORS,b=h("iterator"),x="keys",_="values",P="entries",C=function(){return this};e.exports=function(e,t,n,s,h,y,A){c(n,t,s);var S,T,z,E=function(e){if(e===h&&O)return O;if(!v&&e&&e in q)return q[e];switch(e){case x:case _:case P:return function(){return new n(this,e)}}return function(){return new n(this)}},I=t+" Iterator",M=!1,q=e.prototype,R=q[b]||q["@@iterator"]||h&&q[h],O=!v&&R||E(h),k="Array"===t&&q.entries||R;if(k&&(S=u(k.call(new e)))!==Object.prototype&&S.next&&(i||u(S)===w||(l?l(S,w):o(S[b])||d(S,b,C)),m(S,I,!0,!0),i&&(f[I]=C)),g&&h===_&&R&&R.name!==_&&(!i&&N?p(q,"name",_):(M=!0,O=function(){return a(R,this)})),h)if(T={values:E(_),keys:y?O:E(x),entries:E(P)},A)for(z in T)(v||M||!(z in q))&&d(q,z,T[z]);else r({target:t,proto:!0,forced:v||M},T);return i&&!A||q[b]===O||d(q,b,O,{name:h}),f[t]=O,T}},5116:function(e,t,n){"use strict";var r,a,i,s=n(8828),o=n(2250),c=n(6285),u=n(8075),l=n(5972),m=n(8055),p=n(6264),d=n(7376),h=p("iterator"),f=!1;[].keys&&("next"in(i=[].keys())?(a=l(l(i)))!==Object.prototype&&(r=a):f=!0),!c(r)||s((function(){var e={};return r[h].call(e)!==e}))?r={}:d&&(r=u(r)),o(r[h])||m(r,h,(function(){return this})),e.exports={IteratorPrototype:r,BUGGY_SAFARI_ITERATORS:f}},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,a=n(6624),i=n(2220),s=n(376),o=n(8530),c=n(2416),u=n(9552),l=n(2522),m="prototype",p="script",d=l("IE_PROTO"),h=function(){},f=function(e){return"<"+p+">"+e+"</"+p+">"},y=function(e){e.write(f("")),e.close();var t=e.parentWindow.Object;return e=null,t},g=function(){try{r=new ActiveXObject("htmlfile")}catch(e){}var e,t,n;g="undefined"!=typeof document?document.domain&&r?y(r):(t=u("iframe"),n="java"+p+":",t.style.display="none",c.appendChild(t),t.src=String(n),(e=t.contentWindow.document).open(),e.write(f("document.F=Object")),e.close(),e.F):y(r);for(var a=s.length;a--;)delete g[m][s[a]];return g()};o[d]=!0,e.exports=Object.create||function(e,t){var n;return null!==e?(h[m]=a(e),n=new h,h[m]=null,n[d]=e):n=g(),void 0===t?n:i.f(n,t)}},2220:function(e,t,n){"use strict";var r=n(9447),a=n(8661),i=n(4284),s=n(6624),o=n(7374),c=n(2875);t.f=r&&!a?Object.defineProperties:function(e,t){s(e);for(var n,r=o(t),a=c(t),u=a.length,l=0;u>l;)i.f(e,n=a[l++],r[n]);return e}},4284:function(e,t,n){"use strict";var r=n(9447),a=n(3648),i=n(8661),s=n(6624),o=n(470),c=TypeError,u=Object.defineProperty,l=Object.getOwnPropertyDescriptor,m="enumerable",p="configurable",d="writable";t.f=r?i?function(e,t,n){if(s(e),t=o(t),s(n),"function"==typeof e&&"prototype"===t&&"value"in n&&d in n&&!n[d]){var r=l(e,t);r&&r[d]&&(e[t]=n.value,n={configurable:p in n?n[p]:r[p],enumerable:m in n?n[m]:r[m],writable:!1})}return u(e,t,n)}:u:function(e,t,n){if(s(e),t=o(t),s(n),a)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),a=n(3930),i=n(2574),s=n(5817),o=n(7374),c=n(470),u=n(9724),l=n(3648),m=Object.getOwnPropertyDescriptor;t.f=r?m:function(e,t){if(e=o(e),t=c(t),l)try{return m(e,t)}catch(e){}if(u(e,t))return s(!a(i.f,e,t),e[t])}},5407:function(e,t,n){"use strict";var r=n(5807),a=n(7374),i=n(4443).f,s=n(3427),o="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[];e.exports.f=function(e){return o&&"Window"===r(e)?function(e){try{return i(e)}catch(e){return s(o)}}(e):i(a(e))}},4443:function(e,t,n){"use strict";var r=n(3045),a=n(376).concat("length","prototype");t.f=Object.getOwnPropertyNames||function(e){return r(e,a)}},7170:function(e,t){"use strict";t.f=Object.getOwnPropertySymbols},5972:function(e,t,n){"use strict";var r=n(9724),a=n(2250),i=n(9298),s=n(2522),o=n(7382),c=s("IE_PROTO"),u=Object,l=u.prototype;e.exports=o?u.getPrototypeOf:function(e){var t=i(e);if(r(t,c))return t[c];var n=t.constructor;return a(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),a=n(9724),i=n(7374),s=n(4436).indexOf,o=n(8530),c=r([].push);e.exports=function(e,t){var n,r=i(e),u=0,l=[];for(n in r)!a(o,n)&&a(r,n)&&c(l,n);for(;t.length>u;)a(r,n=t[u++])&&(~s(l,n)||c(l,n));return l}},2875:function(e,t,n){"use strict";var r=n(3045),a=n(376);e.exports=Object.keys||function(e){return r(e,a)}},2574:function(e,t){"use strict";var n={}.propertyIsEnumerable,r=Object.getOwnPropertyDescriptor,a=r&&!n.call({1:2},1);t.f=a?function(e){var t=r(this,e);return!!t&&t.enumerable}:n},9192:function(e,t,n){"use strict";var r=n(1871),a=n(6285),i=n(4239),s=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),s(r),a(n)?(t?e(n,r):n.__proto__=r,n):n}}():void 0)},4878:function(e,t,n){"use strict";var r=n(2623),a=n(3948);e.exports=r?{}.toString:function(){return"[object "+a(this)+"]"}},581:function(e,t,n){"use strict";var r=n(3930),a=n(2250),i=n(6285),s=TypeError;e.exports=function(e,t){var n,o;if("string"===t&&a(n=e.toString)&&!i(o=r(n,e)))return o;if(a(n=e.valueOf)&&!i(o=r(n,e)))return o;if("string"!==t&&a(n=e.toString)&&!i(o=r(n,e)))return o;throw new s("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),a=TypeError;e.exports=function(e){if(r(e))throw new a("Can't call method on "+e);return e}},4840:function(e,t,n){"use strict";var r=n(2623),a=n(4284).f,i=n(1626),s=n(9724),o=n(4878),c=n(6264)("toStringTag");e.exports=function(e,t,n,u){var l=n?e:e&&e.prototype;l&&(s(l,c)||a(l,c,{configurable:!0,value:t}),u&&!r&&i(l,"toString",o))}},2522:function(e,t,n){"use strict";var r=n(5816),a=n(6499),i=r("keys");e.exports=function(e){return i[e]||(i[e]=a(e))}},6128:function(e,t,n){"use strict";var r=n(7376),a=n(5951),i=n(2532),s="__core-js_shared__",o=e.exports=a[s]||i(s,{});(o.versions||(o.versions=[])).push({version:"3.41.0",mode:r?"pure":"global",copyright:"© 2014-2025 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.41.0/LICENSE",source:"https://github.com/zloirock/core-js"})},5816:function(e,t,n){"use strict";var r=n(6128);e.exports=function(e,t){return r[e]||(r[e]=t||{})}},1470:function(e,t,n){"use strict";var r=n(1907),a=n(5482),i=n(160),s=n(4239),o=r("".charAt),c=r("".charCodeAt),u=r("".slice),l=function(e){return function(t,n){var r,l,m=i(s(t)),p=a(n),d=m.length;return p<0||p>=d?e?"":void 0:(r=c(m,p))<55296||r>56319||p+1===d||(l=c(m,p+1))<56320||l>57343?e?o(m,p):r:e?u(m,p,p+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(798),a=n(8828),i=n(5951).String;e.exports=!!Object.getOwnPropertySymbols&&!a((function(){var e=Symbol("symbol detection");return!i(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&r&&r<41}))},3467:function(e,t,n){"use strict";var r=n(3930),a=n(5582),i=n(6264),s=n(8055);e.exports=function(){var e=a("Symbol"),t=e&&e.prototype,n=t&&t.valueOf,o=i("toPrimitive");t&&!t[o]&&s(t,o,(function(e){return r(n,this)}),{arity:1})}},2595:function(e,t,n){"use strict";var r=n(5582),a=n(1907),i=r("Symbol"),s=i.keyFor,o=a(i.prototype.valueOf);e.exports=i.isRegisteredSymbol||function(e){try{return void 0!==s(o(e))}catch(e){return!1}}},9197:function(e,t,n){"use strict";for(var r=n(5816),a=n(5582),i=n(1907),s=n(5594),o=n(6264),c=a("Symbol"),u=c.isWellKnownSymbol,l=a("Object","getOwnPropertyNames"),m=i(c.prototype.valueOf),p=r("wks"),d=0,h=l(c),f=h.length;d<f;d++)try{var y=h[d];s(c[y])&&o(y)}catch(e){}e.exports=function(e){if(u&&u(e))return!0;try{for(var t=m(e),n=0,r=l(p),a=r.length;n<a;n++)if(p[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),a=Math.max,i=Math.min;e.exports=function(e,t){var n=r(e);return n<0?a(n+t,0):i(n,t)}},7374:function(e,t,n){"use strict";var r=n(6946),a=n(4239);e.exports=function(e){return r(a(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),a=Math.min;e.exports=function(e){var t=r(e);return t>0?a(t,9007199254740991):0}},9298:function(e,t,n){"use strict";var r=n(4239),a=Object;e.exports=function(e){return a(r(e))}},6028:function(e,t,n){"use strict";var r=n(3930),a=n(6285),i=n(5594),s=n(9367),o=n(581),c=n(6264),u=TypeError,l=c("toPrimitive");e.exports=function(e,t){if(!a(e)||i(e))return e;var n,c=s(e,l);if(c){if(void 0===t&&(t="default"),n=r(c,e,t),!a(n)||i(n))return n;throw new u("Can't convert object to primitive value")}return void 0===t&&(t="number"),o(e,t)}},470:function(e,t,n){"use strict";var r=n(6028),a=n(5594);e.exports=function(e){var t=r(e,"string");return a(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),a=String;e.exports=function(e){if("Symbol"===r(e))throw new TypeError("Cannot convert a Symbol value to a string");return a(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),a=0,i=Math.random(),s=r(1..toString);e.exports=function(e){return"Symbol("+(void 0===e?"":e)+")_"+s(++a+i,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),a=n(8828);e.exports=r&&a((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype}))},551:function(e,t,n){"use strict";var r=n(5951),a=n(2250),i=r.WeakMap;e.exports=a(i)&&/native code/.test(String(i))},366:function(e,t,n){"use strict";var r=n(2046),a=n(9724),i=n(560),s=n(4284).f;e.exports=function(e){var t=r.Symbol||(r.Symbol={});a(t,e)||s(t,e,{value:i.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(5951),a=n(5816),i=n(9724),s=n(6499),o=n(9846),c=n(1175),u=r.Symbol,l=a("wks"),m=c?u.for||u:u&&u.withoutSetter||s;e.exports=function(e){return i(l,e)||(l[e]=o&&i(u,e)?u[e]:m("Symbol."+e)),l[e]}},8545:function(e,t,n){"use strict";var r=n(1091),a=n(8828),i=n(1793),s=n(6285),o=n(9298),c=n(575),u=n(8024),l=n(5543),m=n(6968),p=n(7171),d=n(6264),h=n(798),f=d("isConcatSpreadable"),y=h>=51||!a((function(){var e=[];return e[f]=!1,e.concat()[0]!==e})),g=function(e){if(!s(e))return!1;var t=e[f];return void 0!==t?!!t:i(e)};r({target:"Array",proto:!0,arity:1,forced:!y||!p("concat")},{concat:function(e){var t,n,r,a,i,s=o(this),p=m(s,0),d=0;for(t=-1,r=arguments.length;t<r;t++)if(g(i=-1===t?s:arguments[t]))for(a=c(i),u(d+a),n=0;n<a;n++,d++)n in i&&l(p,d,i[n]);else u(d+1),l(p,d++,i);return p.length=d,p}})},9363:function(e,t,n){"use strict";var r=n(7374),a=n(2156),i=n(3742),s=n(4932),o=n(4284).f,c=n(183),u=n(9550),l=n(7376),m=n(9447),p="Array Iterator",d=s.set,h=s.getterFor(p);e.exports=c(Array,"Array",(function(e,t){d(this,{type:p,target:r(e),index:0,kind:t})}),(function(){var e=h(this),t=e.target,n=e.index++;if(!t||n>=t.length)return e.target=null,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 f=i.Arguments=i.Array;if(a("keys"),a("values"),a("entries"),!l&&m&&"values"!==f.name)try{o(f,"name",{value:"values"})}catch(e){}},8537:function(){},9721:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(6024),s=n(3930),o=n(1907),c=n(8828),u=n(2250),l=n(5594),m=n(3427),p=n(6656),d=n(9846),h=String,f=a("JSON","stringify"),y=o(/./.exec),g=o("".charAt),N=o("".charCodeAt),w=o("".replace),v=o(1..toString),b=/[\uD800-\uDFFF]/g,x=/^[\uD800-\uDBFF]$/,_=/^[\uDC00-\uDFFF]$/,P=!d||c((function(){var e=a("Symbol")("stringify detection");return"[null]"!==f([e])||"{}"!==f({a:e})||"{}"!==f(Object(e))})),C=c((function(){return'"\\udf06\\ud834"'!==f("\udf06\ud834")||'"\\udead"'!==f("\udead")})),A=function(e,t){var n=m(arguments),r=p(t);if(u(r)||void 0!==e&&!l(e))return n[1]=function(e,t){if(u(r)&&(t=s(r,this,h(e),t)),!l(t))return t},i(f,null,n)},S=function(e,t,n){var r=g(n,t-1),a=g(n,t+1);return y(x,e)&&!y(_,a)||y(_,e)&&!y(x,r)?"\\u"+v(N(e,0),16):e};f&&r({target:"JSON",stat:!0,arity:3,forced:P||C},{stringify:function(e,t,n){var r=m(arguments),a=i(P?A:f,null,r);return C&&"string"==typeof a?w(a,b,S):a}})},7024:function(e,t,n){"use strict";var r=n(5951);n(4840)(r.JSON,"JSON",!0)},8172:function(){},6750:function(e,t,n){"use strict";var r=n(1091),a=n(9447),i=n(4284).f;r({target:"Object",stat:!0,forced:Object.defineProperty!==i,sham:!a},{defineProperty:i})},5264:function(e,t,n){"use strict";var r=n(1091),a=n(9846),i=n(8828),s=n(7170),o=n(9298);r({target:"Object",stat:!0,forced:!a||i((function(){s.f(1)}))},{getOwnPropertySymbols:function(e){var t=s.f;return t?t(o(e)):[]}})},3643:function(){},5205:function(){},7057:function(e,t,n){"use strict";var r=n(1470).charAt,a=n(160),i=n(4932),s=n(183),o=n(9550),c="String Iterator",u=i.set,l=i.getterFor(c);s(String,"String",(function(e){u(this,{type:c,string:a(e),index:0})}),(function(){var e,t=l(this),n=t.string,a=t.index;return a>=n.length?o(void 0,!0):(e=r(n,a),t.index+=e.length,o(e,!1))}))},3997:function(e,t,n){"use strict";n(366)("asyncIterator")},3674:function(e,t,n){"use strict";var r=n(1091),a=n(5951),i=n(3930),s=n(1907),o=n(7376),c=n(9447),u=n(9846),l=n(8828),m=n(9724),p=n(8280),d=n(6624),h=n(7374),f=n(470),y=n(160),g=n(5817),N=n(8075),w=n(2875),v=n(4443),b=n(5407),x=n(7170),_=n(3846),P=n(4284),C=n(2220),A=n(2574),S=n(8055),T=n(9251),z=n(5816),E=n(2522),I=n(8530),M=n(6499),q=n(6264),R=n(560),O=n(366),k=n(3467),B=n(4840),G=n(4932),$=n(726).forEach,U=E("hidden"),V="Symbol",D="prototype",L=G.set,j=G.getterFor(V),H=Object[D],F=a.Symbol,J=F&&F[D],W=a.RangeError,K=a.TypeError,Y=a.QObject,Q=_.f,Z=P.f,X=b.f,ee=A.f,te=s([].push),ne=z("symbols"),re=z("op-symbols"),ae=z("wks"),ie=!Y||!Y[D]||!Y[D].findChild,se=function(e,t,n){var r=Q(H,t);r&&delete H[t],Z(e,t,n),r&&e!==H&&Z(H,t,r)},oe=c&&l((function(){return 7!==N(Z({},"a",{get:function(){return Z(this,"a",{value:7}).a}})).a}))?se:Z,ce=function(e,t){var n=ne[e]=N(J);return L(n,{type:V,tag:e,description:t}),c||(n.description=t),n},ue=function(e,t,n){e===H&&ue(re,t,n),d(e);var r=f(t);return d(n),m(ne,r)?(n.enumerable?(m(e,U)&&e[U][r]&&(e[U][r]=!1),n=N(n,{enumerable:g(0,!1)})):(m(e,U)||Z(e,U,g(1,N(null))),e[U][r]=!0),oe(e,r,n)):Z(e,r,n)},le=function(e,t){d(e);var n=h(t),r=w(n).concat(he(n));return $(r,(function(t){c&&!i(me,n,t)||ue(e,t,n[t])})),e},me=function(e){var t=f(e),n=i(ee,this,t);return!(this===H&&m(ne,t)&&!m(re,t))&&(!(n||!m(this,t)||!m(ne,t)||m(this,U)&&this[U][t])||n)},pe=function(e,t){var n=h(e),r=f(t);if(n!==H||!m(ne,r)||m(re,r)){var a=Q(n,r);return!a||!m(ne,r)||m(n,U)&&n[U][r]||(a.enumerable=!0),a}},de=function(e){var t=X(h(e)),n=[];return $(t,(function(e){m(ne,e)||m(I,e)||te(n,e)})),n},he=function(e){var t=e===H,n=X(t?re:h(e)),r=[];return $(n,(function(e){!m(ne,e)||t&&!m(H,e)||te(r,ne[e])})),r};u||(F=function(){if(p(J,this))throw new K("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?y(arguments[0]):void 0,t=M(e),n=function(e){var r=void 0===this?a:this;r===H&&i(n,re,e),m(r,U)&&m(r[U],t)&&(r[U][t]=!1);var s=g(1,e);try{oe(r,t,s)}catch(e){if(!(e instanceof W))throw e;se(r,t,s)}};return c&&ie&&oe(H,t,{configurable:!0,set:n}),ce(t,e)},S(J=F[D],"toString",(function(){return j(this).tag})),S(F,"withoutSetter",(function(e){return ce(M(e),e)})),A.f=me,P.f=ue,C.f=le,_.f=pe,v.f=b.f=de,x.f=he,R.f=function(e){return ce(q(e),e)},c&&(T(J,"description",{configurable:!0,get:function(){return j(this).description}}),o||S(H,"propertyIsEnumerable",me,{unsafe:!0}))),r({global:!0,constructor:!0,wrap:!0,forced:!u,sham:!u},{Symbol:F}),$(w(ae),(function(e){O(e)})),r({target:V,stat:!0,forced:!u},{useSetter:function(){ie=!0},useSimple:function(){ie=!1}}),r({target:"Object",stat:!0,forced:!u,sham:!c},{create:function(e,t){return void 0===t?N(e):le(N(e),t)},defineProperty:ue,defineProperties:le,getOwnPropertyDescriptor:pe}),r({target:"Object",stat:!0,forced:!u},{getOwnPropertyNames:de}),k(),B(F,V),I[U]=!0},5084:function(){},3313:function(e,t,n){"use strict";var r=n(1091),a=n(5582),i=n(9724),s=n(160),o=n(5816),c=n(4411),u=o("string-to-symbol-registry"),l=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{for:function(e){var t=s(e);if(i(u,t))return u[t];var n=a("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),a=n(9724),i=n(5594),s=n(4640),o=n(5816),c=n(4411),u=o("symbol-to-string-registry");r({target:"Symbol",stat:!0,forced:!c},{keyFor:function(e){if(!i(e))throw new TypeError(s(e)+" is not a symbol");if(a(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),a=n(3467);r("toPrimitive"),a()},4810:function(e,t,n){"use strict";var r=n(5582),a=n(366),i=n(4840);a("toStringTag"),i(r("Symbol"),"Symbol")},3325:function(e,t,n){"use strict";n(366)("unscopables")},768:function(e,t,n){"use strict";var r=n(6264),a=n(4284).f,i=r("metadata"),s=Function.prototype;void 0===s[i]&&a(s,i,{value:null})},8549:function(e,t,n){"use strict";n(366)("asyncDispose")},1697:function(e,t,n){"use strict";n(366)("customMatcher")},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),a=n(5951),i=n(4840),s=n(3742);for(var o in r)i(a[o],o),s[o]=s.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.35"}}},t={};function n(r){var a=t[r];if(void 0!==a)return a.exports;var i=t[r]={exports:{}};return e[r].call(i.exports,i,i.exports,n),i.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 Xe},AbiVersion:function(){return Zr},AccountBase:function(){return Km},AccountError:function(){return R},AccountGeneralized:function(){return zN},AccountLedger:function(){return MN},AccountLedgerFactory:function(){return UN},AccountMemory:function(){return Vh},AccountMetamask:function(){return FN},AccountMetamaskFactory:function(){return rw},AccountMnemonicFactory:function(){return _N},AeSdk:function(){return dy},AeSdkAepp:function(){return Fy},AeSdkBase:function(){return py},AeSdkMethods:function(){return uy},AeSdkWallet:function(){return Ng},AensError:function(){return O},AensPointerContextError:function(){return oe},AeppError:function(){return k},AlreadyConnectedError:function(){return Ye},AmbiguousEventDefinitionError:function(){return qe},ArgumentCountMismatchError:function(){return F},ArgumentError:function(){return j},BaseError:function(){return q},BrowserRuntimeConnection:function(){return ZS},BrowserWindowMessageConnection:function(){return FS},BytecodeMismatchError:function(){return xe},CallReturnType:function(){return as},Channel:function(){return Uv},ChannelCallError:function(){return fe},ChannelConnectionError:function(){return ye},ChannelError:function(){return B},ChannelIncomingMessageError:function(){return we},ChannelPingTimedOutError:function(){return ge},CompilerBase:function(){return ow},CompilerError:function(){return G},CompilerHttp:function(){return tv},ConsensusProtocolVersion:function(){return Yr},Contract:function(){return kf},ContractError:function(){return $},CryptographyError:function(){return U},DRY_RUN_ACCOUNT:function(){return Dr},DecodeError:function(){return Ve},DelegationTag:function(){return cf},DryRunError:function(){return Le},DuplicateContractError:function(){return _e},DuplicateNodeError:function(){return $e},Encoded:function(){return e},Encoding:function(){return ur},EntryTag:function(){return is},IllegalArgumentError:function(){return H},IllegalBidFeeError:function(){return je},InactiveContractError:function(){return Pe},InsufficientBalanceError:function(){return J},InsufficientNameFeeError:function(){return ce},InternalError:function(){return ae},InvalidAensNameError:function(){return ue},InvalidAuthDataError:function(){return be},InvalidChecksumError:function(){return Re},InvalidMethodInvocationError:function(){return Ce},InvalidRpcMessageError:function(){return le},InvalidSignatureError:function(){return He},InvalidTxError:function(){return Kh},LogicError:function(){return re},MAX_AUTH_FUN_GAS:function(){return Lr},MESSAGE_DIRECTION:function(){return hy},METHODS:function(){return gy},MIN_GAS_PRICE:function(){return jr},MemoryAccount:function(){return Vh},MerkleTreeHashMismatchError:function(){return Oe},Middleware:function(){return kS},MiddlewarePageMissed:function(){return qS},MiddlewareSubscriber:function(){return nb},MiddlewareSubscriberDisconnected:function(){return Qv},MiddlewareSubscriberError:function(){return Yv},MissingCallbackError:function(){return me},MissingContractAddressError:function(){return Ae},MissingContractDefError:function(){return Se},MissingEventDefinitionError:function(){return Me},MissingFunctionNameError:function(){return Te},MissingNodeInTreeError:function(){return ke},MissingParamError:function(){return W},NAME_BID_RANGES:function(){return Kr},NAME_BID_TIMEOUT_BLOCKS:function(){return Jr},NAME_FEE_BID_INCREMENT:function(){return Fr},NAME_FEE_MULTIPLIER:function(){return Hr},NAME_MAX_LENGTH_FEE:function(){return Wr},Name:function(){return Nf},NoSerializerFoundError:function(){return K},NoSuchContractFunctionError:function(){return Ee},NoWalletConnectedError:function(){return Qe},Node:function(){return Jm},NodeError:function(){return V},NodeInvocationError:function(){return ze},NodeNotFoundError:function(){return Ue},NotImplementedError:function(){return te},NotPayableFunctionError:function(){return Ie},ORACLE_TTL_TYPES:function(){return ss},Oracle:function(){return Lf},OracleClient:function(){return jf},PayloadLengthError:function(){return De},PrefixNotFoundError:function(){return Fe},RPC_STATUS:function(){return Ny},RequestTimedOutError:function(){return Y},RpcConnectionDenyError:function(){return Py},RpcConnectionError:function(){return Ze},RpcError:function(){return vy},RpcInternalError:function(){return Sy},RpcInvalidTransactionError:function(){return by},RpcMethodNotFoundError:function(){return zy},RpcNoNetworkById:function(){return Ty},RpcNotAuthorizeError:function(){return Cy},RpcPermissionDenyError:function(){return Ay},RpcRejectedByUserError:function(){return xy},RpcUnsupportedProtocolError:function(){return _y},SUBSCRIPTION_TYPES:function(){return yy},SchemaNotFoundError:function(){return Je},Tag:function(){return Xr},TagNotFoundError:function(){return We},TransactionError:function(){return D},TxNotInChainError:function(){return Ke},TxTimedOutError:function(){return Q},TypeError:function(){return Z},UnAuthorizedAccountError:function(){return pe},UnavailableAccountError:function(){return se},UnexpectedChannelMessageError:function(){return Ne},UnexpectedTsError:function(){return ie},UnknownChannelStateError:function(){return ve},UnknownNodeLengthError:function(){return Be},UnknownPathNibbleError:function(){return Ge},UnknownRpcClientError:function(){return de},UnsubscribedAccountError:function(){return he},UnsupportedPlatformError:function(){return X},UnsupportedProtocolError:function(){return ee},UnsupportedVersionError:function(){return ne},VmVersion:function(){return Qr},WALLET_TYPE:function(){return fy},WalletConnectorFrame:function(){return cg},WalletConnectorFrameWithNode:function(){return pg},WalletError:function(){return L},_getPollInterval:function(){return ya},awaitHeight:function(){return va},buildAuthTxHash:function(){return Qf},buildAuthTxHashByGaMetaTx:function(){return Zf},buildContractId:function(){return ta},buildContractIdByContractTx:function(){return co},buildTx:function(){return to},buildTxAsync:function(){return io},buildTxHash:function(){return oo},commitmentHash:function(){return sa},computeAuctionEndBlock:function(){return ha},computeBidFee:function(){return da},connectionProxy:function(){return BS},createGeneralizedAccount:function(){return Kf},decode:function(){return Cr},defaultProtocolParameters:function(){return si},encode:function(){return Ar},encodeContractAddress:function(){return ta},encodeUnsigned:function(){return Mr},ensureEncoded:function(){return zr},ensureJwt:function(){return sf},ensureName:function(){return ca},formatAmount:function(){return tt},genSalt:function(){return Ir},getAccount:function(){return xa},getBalance:function(){return _a},getCachedProtocolParameters:function(){return Ci},getContract:function(){return qa},getContractByteCode:function(){return Ma},getCurrentGeneration:function(){return Pa},getDefaultPointerKey:function(){return ma},getExecutionCost:function(){return Dh},getExecutionCostBySignedTx:function(){return Lh},getExecutionCostUsingNode:function(){return jh},getFloorGasPrice:function(){return vi},getGeneration:function(){return Ca},getHeight:function(){return Na},getKeyBlock:function(){return Sa},getMicroBlockHeader:function(){return Ta},getMicroBlockTransactions:function(){return Aa},getMinimumNameFee:function(){return pa},getName:function(){return Ra},getTransactionSignerAddress:function(){return Wm},hash:function(){return qr},hashDomain:function(){return Oh},hashJson:function(){return Rh},hashMessage:function(){return Gr},hashTypedData:function(){return kh},isAddressValid:function(){return Tr},isAuctionName:function(){return fa},isEncoded:function(){return Er},isJwt:function(){return af},isName:function(){return ua},isNameValid:function(){return ua},messageToHash:function(){return Gr},oracleQueryId:function(){return na},packDelegation:function(){return df},packEntry:function(){return Zs},payForTransaction:function(){return Jf},poll:function(){return wa},prefixedAmount:function(){return ot},produceNameId:function(){return ia},readInt:function(){return oa},rebuildUnpackedTx:function(){return no},resolveName:function(){return Oa},sendTransaction:function(){return Yh},signJwt:function(){return nf},spend:function(){return Hf},toAe:function(){return nt},toAettos:function(){return rt},toBytes:function(){return Vr},transferFunds:function(){return Ff},txDryRun:function(){return Ia},unpackDelegation:function(){return hf},unpackEntry:function(){return Xs},unpackJwt:function(){return rf},unpackTx:function(){return so},verify:function(){return Rr},verifyJwt:function(){return of},verifyMessage:function(){return $r},verifyMessageSignature:function(){return $r},verifySignature:function(){return Rr},verifyTransaction:function(){return Wh},waitForTxConfirm:function(){return ba},walletDetector:function(){return JS}});var e={};n.r(e),n.d(e,{Encoding:function(){return ur}});var t={};n.r(t),n.d(t,{_getPollInterval:function(){return ya},awaitHeight:function(){return va},getAccount:function(){return xa},getBalance:function(){return _a},getContract:function(){return qa},getContractByteCode:function(){return Ma},getCurrentGeneration:function(){return Pa},getGeneration:function(){return Ca},getHeight:function(){return Na},getKeyBlock:function(){return Sa},getMicroBlockHeader:function(){return Ta},getMicroBlockTransactions:function(){return Aa},getName:function(){return Ra},poll:function(){return wa},resolveName:function(){return Oa},txDryRun:function(){return Ia},waitForTxConfirm:function(){return ba}});var a={};n.r(a),n.d(a,{Account:function(){return ac},AuctionEntry:function(){return fc},ByteCode:function(){return Nc},Channel:function(){return yc},ChannelCloseMutualTx:function(){return su},ChannelCloseSoloTx:function(){return ou},ChannelCreateTx:function(){return cu},ChannelDepositTx:function(){return uu},ChannelForceProgressTx:function(){return lu},ChannelSetDelegatesTx:function(){return mu},ChannelSettleTx:function(){return pu},ChannelSlashTx:function(){return du},ChannelSnapshotSoloTx:function(){return hu},ChannelWithdrawTx:function(){return fu},CheckTxInPoolResponse:function(){return yu},CommitmentId:function(){return gu},ContractCallObject:function(){return zc},ContractCallTx:function(){return Nu},ContractCreateTx:function(){return wu},ContractObject:function(){return gc},ContractTxBaseGas:function(){return Wc},ContractVersion:function(){return Qc},CountResponse:function(){return $c},CreateContractUnsignedTx:function(){return Wu},Currency:function(){return vc},Delegates:function(){return lc},DryRunAccount:function(){return _c},DryRunCallContext:function(){return Ac},DryRunCallReq:function(){return Cc},DryRunInput:function(){return xc},DryRunInputItem:function(){return Pc},DryRunResult:function(){return Tc},DryRunResults:function(){return Sc},EncodedTx:function(){return nu},ErrorModel:function(){return ic},Event:function(){return Ec},GAAttachTx:function(){return vu},GAMetaTx:function(){return bu},GAObject:function(){return iu},GasPricesItem:function(){return Hc},Generation:function(){return Ic},HCContractPubkeys:function(){return Oc},HashResponse:function(){return kc},Header:function(){return qc},HeightResponse:function(){return Bc},Image:function(){return bc},KeyBlock:function(){return Mc},MicroBlockHeader:function(){return Gc},NameAuctionTimeout:function(){return Yc},NameClaimTx:function(){return xu},NameEntry:function(){return Uc},NameEntryPointersItem:function(){return Fu},NameHash:function(){return _u},NamePointer:function(){return hc},NamePreclaimTx:function(){return Pu},NameRevokeTx:function(){return Cu},NameTransferTx:function(){return Au},NameUpdateTx:function(){return Su},NextNonceResponse:function(){return sc},NodeGetAccountByPubkeyAndHashExceptionHeaders:function(){return Qu},NodeGetAccountByPubkeyAndHeightExceptionHeaders:function(){return Zu},NodeGetAccountByPubkeyExceptionHeaders:function(){return Yu},NodeGetAccountNextNonceExceptionHeaders:function(){return Xu},NodeGetAuctionEntryByNameExceptionHeaders:function(){return tl},NodeGetChainEndsExceptionHeaders:function(){return Rl},NodeGetChannelByPubkeyExceptionHeaders:function(){return nl},NodeGetContractCodeExceptionHeaders:function(){return al},NodeGetContractExceptionHeaders:function(){return rl},NodeGetContractPoIExceptionHeaders:function(){return il},NodeGetCurrencyExceptionHeaders:function(){return sl},NodeGetCurrentGenerationExceptionHeaders:function(){return cl},NodeGetCurrentKeyBlockExceptionHeaders:function(){return hl},NodeGetCurrentKeyBlockHashExceptionHeaders:function(){return fl},NodeGetCurrentKeyBlockHeightExceptionHeaders:function(){return yl},NodeGetGenerationByHashExceptionHeaders:function(){return ul},NodeGetGenerationByHeightExceptionHeaders:function(){return ll},NodeGetHyperchainContractPubkeysExceptionHeaders:function(){return dl},NodeGetKeyBlockByHashExceptionHeaders:function(){return gl},NodeGetKeyBlockByHeightExceptionHeaders:function(){return Nl},NodeGetMicroBlockHeaderByHashExceptionHeaders:function(){return vl},NodeGetMicroBlockTransactionByHashAndIndexExceptionHeaders:function(){return _l},NodeGetMicroBlockTransactionsByHashExceptionHeaders:function(){return bl},NodeGetMicroBlockTransactionsCountByHashExceptionHeaders:function(){return xl},NodeGetNameEntryByNameExceptionHeaders:function(){return Pl},NodeGetNameEntryByNameHashExceptionHeaders:function(){return Cl},NodeGetNodeSettingsExceptionHeaders:function(){return Il},NodeGetOracleByPubkeyExceptionHeaders:function(){return Al},NodeGetOracleQueriesByPubkeyExceptionHeaders:function(){return Sl},NodeGetOracleQueryByPubkeyAndQueryIdExceptionHeaders:function(){return Tl},NodeGetPeerPubkeyExceptionHeaders:function(){return zl},NodeGetPendingAccountTransactionsByPubkeyExceptionHeaders:function(){return el},NodeGetPendingKeyBlockExceptionHeaders:function(){return wl},NodeGetPinningTxExceptionHeaders:function(){return pl},NodeGetProtocolParametersExceptionHeaders:function(){return Ml},NodeGetRecentGasPricesExceptionHeaders:function(){return El},NodeGetStatusExceptionHeaders:function(){return ql},NodeGetSyncStatusExceptionHeaders:function(){return Ol},NodeGetTopHeaderExceptionHeaders:function(){return ml},NodeGetTransactionByHashExceptionHeaders:function(){return Bl},NodeGetTransactionInfoByHashExceptionHeaders:function(){return Gl},NodePostTransactionExceptionHeaders:function(){return kl},NodeProtectedDryRunTxsExceptionHeaders:function(){return ol},NodeSettings:function(){return Fc},OffChainCallContract:function(){return Vu},OffChainDeposit:function(){return Du},OffChainNewContract:function(){return Lu},OffChainTransfer:function(){return ju},OffChainUpdate:function(){return mc},OffChainWithdrawal:function(){return Hu},OracleExtendTx:function(){return zu},OracleQueries:function(){return Dc},OracleQuery:function(){return Lc},OracleQueryTx:function(){return Eu},OracleRegisterTx:function(){return Iu},OracleRespondTx:function(){return Mu},PayingForTx:function(){return qu},PeerConnections:function(){return eu},PeerCount:function(){return Ru},PeerCountAvailable:function(){return ku},PeerCountConnected:function(){return Ou},PeerDetails:function(){return Tu},PeerPubKey:function(){return jc},Peers:function(){return Bu},PinningTx:function(){return Rc},PoI:function(){return wc},PostTxResponse:function(){return ru},Protocol:function(){return Zc},ProtocolConsensusParameters:function(){return Ju},ProtocolParameters:function(){return Jc},PubKey:function(){return Gu},RegisteredOracle:function(){return Vc},RelativeTTL:function(){return pc},SignedTx:function(){return cc},SignedTxs:function(){return oc},SpendTx:function(){return Ku},SpendTxInput:function(){return $u},StateGasPerBlock:function(){return Kc},Status:function(){return Xc},SyncStatus:function(){return tu},TokenSupply:function(){return Uu},Ttl:function(){return dc},Tx:function(){return uc},TxInfoObject:function(){return au},discriminators:function(){return $l}});var i={};n.r(i),n.d(i,{addChecksum:function(){return Kd},decode:function(){return Zd},encode:function(){return Qd},getPayload:function(){return Yd}});var s={};n.r(s),n.d(s,{decode:function(){return eh},encode:function(){return Xd}});var o={};n.r(o),n.d(o,{payForTransaction:function(){return Jf},spend:function(){return Hf},transferFunds:function(){return Ff}});var c={};n.r(c),n.d(c,{buildAuthTxHash:function(){return Qf},buildAuthTxHashByGaMetaTx:function(){return Zf},createGeneralizedAccount:function(){return Kf}});var u={};n.r(u),n.d(u,{ApiVersion:function(){return Aw},ByteCodeInput:function(){return xw},BytecodeCallResultInput:function(){return hw},Calldata:function(){return gw},CompileOpts:function(){return uw},CompileResult:function(){return pw},CompilerError:function(){return lw},CompilerVersion:function(){return Cw},Contract:function(){return cw},DecodeCalldataBytecode:function(){return Nw},DecodeCalldataSource:function(){return bw},DecodedCalldata:function(){return ww},DecodedCallresult:function(){return fw},ErrorModel:function(){return vw},ErrorPos:function(){return mw},FateAssembler:function(){return _w},FunctionCallInput:function(){return yw},SophiaBinaryData:function(){return Sw},SophiaCallResultInput:function(){return dw},SophiaJsonData:function(){return Tw},ValidateByteCodeInput:function(){return Pw}});var l={};n.r(l),n.d(l,{appendSignature:function(){return gv},awaitingChannelCreateTx:function(){return Pv},awaitingCompletion:function(){return vv},awaitingConnection:function(){return bv},awaitingLeave:function(){return Ev},awaitingOnChainTx:function(){return Cv},awaitingReconnection:function(){return _v},awaitingReestablish:function(){return xv},awaitingShutdownTx:function(){return zv},channelClosed:function(){return Iv},channelOpen:function(){return Sv},handleUnexpectedMessage:function(){return wv},signAndNotify:function(){return Nv}});var m={};n.r(m),n.d(m,{Activity:function(){return Wb},ActivityPayload:function(){return Kb},Aex141Response:function(){return Jx},Aex141TemplateTokensResponse:function(){return Qx},Aex141TemplatesResponse:function(){return Kx},Aex141TokenDetailResponse:function(){return Xx},Aex141TokenResponse:function(){return sx},Aex141TransferEvent:function(){return t_},Aex9BalanceResponse:function(){return cx},Aex9ContractBalanceResponse:function(){return s_},Aex9Response:function(){return r_},Aex9TransferEvent:function(){return kP},Aex9TransferResponse:function(){return BP},Auction:function(){return G_},AuctionLastBid:function(){return $_},AuctionLastBidTx:function(){return nA},Channel:function(){return m_},ChannelCloseMutualTx:function(){return FP},ChannelCloseSoloTx:function(){return JP},ChannelCreateTx:function(){return DP},ChannelDepositTx:function(){return LP},ChannelForceProgressTx:function(){return HP},ChannelSetDelegatesTx:function(){return QP},ChannelSettleTx:function(){return KP},ChannelSlashTx:function(){return WP},ChannelSnapshotSoloTx:function(){return YP},ChannelWithdrawTx:function(){return jP},Components171VsjiSchemasNametxPropertiesTxAllof1:function(){return j_},Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1:function(){return U_},Components1Viuqa3SchemasOracletxPropertiesTxAllof1:function(){return aP},Contract:function(){return y_},ContractCall:function(){return d_},ContractCallTx:function(){return tC},ContractCreateTx:function(){return g_},ContractLog:function(){return f_},Delegate:function(){return T_},Delegates:function(){return Qb},DeltaStat:function(){return wP},DexSwap:function(){return lx},DexSwapAmounts:function(){return mx},EpochInfo:function(){return b_},EpochInfoValidatorsItem:function(){return x_},ErrorResponse:function(){return ax},GAAttachTx:function(){return nC},GAMetaTx:function(){return rC},Get200ApplicationJsonAllOfPropertiesItemsItem:function(){return u_},Get200ApplicationJsonProperties:function(){return vx},InternalContractCallEvent:function(){return GP},InternalTransferEvent:function(){return $P},KeyBlock:function(){return I_},KeyBlockExtended:function(){return rA},MicroBlockExtended:function(){return aA},MicroBlockHeader:function(){return q_},Miner:function(){return _P},Name:function(){return B_},NameClaim:function(){return dx},NameClaimEvent:function(){return UP},NameClaimTx:function(){return hx},NameOwnership:function(){return V_},NamePointer:function(){return tx},NamePreclaimTx:function(){return eC},NameRevokeTx:function(){return L_},NameTransfer:function(){return K_},NameTransferTx:function(){return Y_},NameTx:function(){return D_},NameTxTx:function(){return iA},NameUpdate:function(){return Z_},NameUpdateTx:function(){return Nx},NotFoundResponse:function(){return fx},OffChainUpdate:function(){return Zb},Oracle:function(){return eP},OracleExtend:function(){return sP},OracleExtendTx:function(){return oP},OracleFormat:function(){return tP},OracleQuery:function(){return uP},OracleQueryTx:function(){return ZP},OracleRegisterTx:function(){return rP},OracleRespondTx:function(){return XP},OracleResponse:function(){return lP},OracleTx:function(){return nP},OracleTxTx:function(){return sA},PaginatedResponse:function(){return rx},Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1:function(){return c_},Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return h_},Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ux},Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx:function(){return Sx},Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema:function(){return EC},Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx:function(){return jx},Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema:function(){return MC},Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema:function(){return IC},Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema:function(){return QC},Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema:function(){return TC},Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema:function(){return dC},Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema:function(){return uC},Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return px},Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx:function(){return $x},Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema:function(){return pC},Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return k_},Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return p_},Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema:function(){return PC},Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema:function(){return a_},Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yP},Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return e_},Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx:function(){return Cx},Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema:function(){return FC},Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema:function(){return xC},Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema:function(){return BC},Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema:function(){return kC},Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema:function(){return iC},Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return v_},Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return RC},Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return fP},Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema:function(){return SC},Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema:function(){return AC},Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema:function(){return ZC},Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0:function(){return bP},Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0:function(){return NP},Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx:function(){return Tx},Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0:function(){return CP},Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema:function(){return GC},Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx:function(){return xx},Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema:function(){return lC},Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema:function(){return gC},Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx:function(){return Lx},Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx:function(){return Ux},Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema:function(){return fC},Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema:function(){return XC},Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return ix},Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return C_},Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx:function(){return qx},Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0:function(){return vP},Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return H_},Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx:function(){return Ox},Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema:function(){return OC},Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema:function(){return CC},Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx:function(){return _x},Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema:function(){return LC},Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return mP},Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Zx},Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema:function(){return vC},Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx:function(){return Dx},Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return W_},Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return cP},Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0:function(){return n_},Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema:function(){return DC},Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema:function(){return NC},Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema:function(){return yC},Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema:function(){return mC},Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema:function(){return zC},Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return SP},Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema:function(){return wC},Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema:function(){return sC},Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx:function(){return Hx},Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return xP},Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx:function(){return Mx},Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema:function(){return HC},Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return TP},Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return w_},Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return gP},Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema:function(){return bC},Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return S_},Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0:function(){return __},Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema:function(){return $C},Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0:function(){return Fx},Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return N_},PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return yx},PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema:function(){return tA},PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema:function(){return WC},PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Jb},PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx:function(){return Rx},PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema:function(){return KC},PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema:function(){return VC},PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema:function(){return F_},PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx:function(){return Ex},PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return PP},PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0:function(){return z_},PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return i_},PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return E_},PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx:function(){return bx},PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx:function(){return Ix},PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return dP},PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return X_},PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx:function(){return Ax},PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return IP},PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0:function(){return MP},PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema:function(){return YC},PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema:function(){return qC},PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema:function(){return oC},PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema:function(){return o_},PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx:function(){return kx},PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema:function(){return _C},PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx:function(){return Vx},PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return J_},PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx:function(){return zx},PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0:function(){return M_},PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx:function(){return Bx},PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return l_},PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema:function(){return JC},PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Yx},PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Q_},PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx:function(){return Px},PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx:function(){return Gx},PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema:function(){return eA},PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0:function(){return RP},PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema:function(){return UC},PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema:function(){return jC},PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0:function(){return Wx},PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema:function(){return hC},PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema:function(){return wx},PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return R_},PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0:function(){return iP},PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1:function(){return ox},PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema:function(){return cC},PayingForTx:function(){return aC},PendingTransaction:function(){return qP},Pointee:function(){return gx},RelativeTTL:function(){return Xb},Schedule:function(){return P_},SignedTx:function(){return nx},SpendTx:function(){return VP},Stat:function(){return hP},Stats:function(){return pP},Status:function(){return zP},StatusMdwAsyncTasks:function(){return EP},TotalStat:function(){return AP},Transaction:function(){return O_},Transfer:function(){return OP},Ttl:function(){return ex},Tx:function(){return Yb},Validator:function(){return A_},discriminators:function(){return oA}});var p=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,d=Math.ceil,h=Math.floor,f="[BigNumber Error] ",y=f+"Number primitive has more than 15 significant digits: ",g=1e14,N=14,w=9007199254740991,v=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13],b=1e7,x=1e9;function _(e){var t=0|e;return e>0||e===t?t:t-1}function P(e){for(var t,n,r=1,a=e.length,i=e[0]+"";r<a;){for(t=e[r++]+"",n=N-t.length;n--;t="0"+t);i+=t}for(a=i.length;48===i.charCodeAt(--a););return i.slice(0,a+1||1)}function C(e,t){var n,r,a=e.c,i=t.c,s=e.s,o=t.s,c=e.e,u=t.e;if(!s||!o)return null;if(n=a&&!a[0],r=i&&!i[0],n||r)return n?r?0:-o:s;if(s!=o)return s;if(n=s<0,r=c==u,!a||!i)return r?0:!a^n?1:-1;if(!r)return c>u^n?1:-1;for(o=(c=a.length)<(u=i.length)?c:u,s=0;s<o;s++)if(a[s]!=i[s])return a[s]>i[s]^n?1:-1;return c==u?0:c>u^n?1:-1}function A(e,t,n,r){if(e<t||e>n||e!==h(e))throw Error(f+(r||"Argument")+("number"==typeof e?e<t||e>n?" out of range: ":" not an integer: ":" not a primitive number: ")+String(e))}function S(e){var t=e.c.length-1;return _(e.e/N)==t&&e.c[t]%2!=0}function T(e,t){return(e.length>1?e.charAt(0)+"."+e.slice(1):e)+(t<0?"e":"e+")+t}function z(e,t,n){var r,a;if(t<0){for(a=n+".";++t;a+=n);e=a+e}else if(++t>(r=e.length)){for(a=n,t-=r;--t;a+=n);e+=a}else t<r&&(e=e.slice(0,t)+"."+e.slice(t));return e}var E=function e(t){var n,r,a,i,s,o,c,u,l,m,E=j.prototype={constructor:j,toString:null,valueOf:null},I=new j(1),M=20,q=4,R=-7,O=21,k=-1e7,B=1e7,G=!1,$=1,U=0,V={prefix:"",groupSize:3,secondaryGroupSize:0,groupSeparator:",",decimalSeparator:".",fractionGroupSize:0,fractionGroupSeparator:" ",suffix:""},D="0123456789abcdefghijklmnopqrstuvwxyz",L=!0;function j(e,t){var n,i,s,o,c,u,l,m,d=this;if(!(d instanceof j))return new j(e,t);if(null==t){if(e&&!0===e._isBigNumber)return d.s=e.s,void(!e.c||e.e>B?d.c=d.e=null:e.e<k?d.c=[d.e=0]:(d.e=e.e,d.c=e.c.slice()));if((u="number"==typeof e)&&0*e==0){if(d.s=1/e<0?(e=-e,-1):1,e===~~e){for(o=0,c=e;c>=10;c/=10,o++);return void(o>B?d.c=d.e=null:(d.e=o,d.c=[e]))}m=String(e)}else{if(!p.test(m=String(e)))return a(d,m,u);d.s=45==m.charCodeAt(0)?(m=m.slice(1),-1):1}(o=m.indexOf("."))>-1&&(m=m.replace(".","")),(c=m.search(/e/i))>0?(o<0&&(o=c),o+=+m.slice(c+1),m=m.substring(0,c)):o<0&&(o=m.length)}else{if(A(t,2,D.length,"Base"),10==t&&L)return W(d=new j(e),M+d.e+1,q);if(m=String(e),u="number"==typeof e){if(0*e!=0)return a(d,m,u,t);if(d.s=1/e<0?(m=m.slice(1),-1):1,j.DEBUG&&m.replace(/^0\.0*|\./,"").length>15)throw Error(y+e)}else d.s=45===m.charCodeAt(0)?(m=m.slice(1),-1):1;for(n=D.slice(0,t),o=c=0,l=m.length;c<l;c++)if(n.indexOf(i=m.charAt(c))<0){if("."==i){if(c>o){o=l;continue}}else if(!s&&(m==m.toUpperCase()&&(m=m.toLowerCase())||m==m.toLowerCase()&&(m=m.toUpperCase()))){s=!0,c=-1,o=0;continue}return a(d,String(e),u,t)}u=!1,(o=(m=r(m,t,10,d.s)).indexOf("."))>-1?m=m.replace(".",""):o=m.length}for(c=0;48===m.charCodeAt(c);c++);for(l=m.length;48===m.charCodeAt(--l););if(m=m.slice(c,++l)){if(l-=c,u&&j.DEBUG&&l>15&&(e>w||e!==h(e)))throw Error(y+d.s*e);if((o=o-c-1)>B)d.c=d.e=null;else if(o<k)d.c=[d.e=0];else{if(d.e=o,d.c=[],c=(o+1)%N,o<0&&(c+=N),c<l){for(c&&d.c.push(+m.slice(0,c)),l-=N;c<l;)d.c.push(+m.slice(c,c+=N));c=N-(m=m.slice(c)).length}else c-=l;for(;c--;m+="0");d.c.push(+m)}}else d.c=[d.e=0]}function H(e,t,n,r){var a,i,s,o,c;if(null==n?n=q:A(n,0,8),!e.c)return e.toString();if(a=e.c[0],s=e.e,null==t)c=P(e.c),c=1==r||2==r&&(s<=R||s>=O)?T(c,s):z(c,s,"0");else if(i=(e=W(new j(e),t,n)).e,o=(c=P(e.c)).length,1==r||2==r&&(t<=i||i<=R)){for(;o<t;c+="0",o++);c=T(c,i)}else if(t-=s,c=z(c,i,"0"),i+1>o){if(--t>0)for(c+=".";t--;c+="0");}else if((t+=i-o)>0)for(i+1==o&&(c+=".");t--;c+="0");return e.s<0&&a?"-"+c:c}function F(e,t){for(var n,r,a=1,i=new j(e[0]);a<e.length;a++)(!(r=new j(e[a])).s||(n=C(i,r))===t||0===n&&i.s===t)&&(i=r);return i}function J(e,t,n){for(var r=1,a=t.length;!t[--a];t.pop());for(a=t[0];a>=10;a/=10,r++);return(n=r+n*N-1)>B?e.c=e.e=null:n<k?e.c=[e.e=0]:(e.e=n,e.c=t),e}function W(e,t,n,r){var a,i,s,o,c,u,l,m=e.c,p=v;if(m){e:{for(a=1,o=m[0];o>=10;o/=10,a++);if((i=t-a)<0)i+=N,s=t,c=m[u=0],l=h(c/p[a-s-1]%10);else if((u=d((i+1)/N))>=m.length){if(!r)break e;for(;m.length<=u;m.push(0));c=l=0,a=1,s=(i%=N)-N+1}else{for(c=o=m[u],a=1;o>=10;o/=10,a++);l=(s=(i%=N)-N+a)<0?0:h(c/p[a-s-1]%10)}if(r=r||t<0||null!=m[u+1]||(s<0?c:c%p[a-s-1]),r=n<4?(l||r)&&(0==n||n==(e.s<0?3:2)):l>5||5==l&&(4==n||r||6==n&&(i>0?s>0?c/p[a-s]:0:m[u-1])%10&1||n==(e.s<0?8:7)),t<1||!m[0])return m.length=0,r?(t-=e.e+1,m[0]=p[(N-t%N)%N],e.e=-t||0):m[0]=e.e=0,e;if(0==i?(m.length=u,o=1,u--):(m.length=u+1,o=p[N-i],m[u]=s>0?h(c/p[a-s]%p[s])*o:0),r)for(;;){if(0==u){for(i=1,s=m[0];s>=10;s/=10,i++);for(s=m[0]+=o,o=1;s>=10;s/=10,o++);i!=o&&(e.e++,m[0]==g&&(m[0]=1));break}if(m[u]+=o,m[u]!=g)break;m[u--]=0,o=1}for(i=m.length;0===m[--i];m.pop());}e.e>B?e.c=e.e=null:e.e<k&&(e.c=[e.e=0])}return e}function K(e){var t,n=e.e;return null===n?e.toString():(t=P(e.c),t=n<=R||n>=O?T(t,n):z(t,n,"0"),e.s<0?"-"+t:t)}return j.clone=e,j.ROUND_UP=0,j.ROUND_DOWN=1,j.ROUND_CEIL=2,j.ROUND_FLOOR=3,j.ROUND_HALF_UP=4,j.ROUND_HALF_DOWN=5,j.ROUND_HALF_EVEN=6,j.ROUND_HALF_CEIL=7,j.ROUND_HALF_FLOOR=8,j.EUCLID=9,j.config=j.set=function(e){var t,n;if(null!=e){if("object"!=typeof e)throw Error(f+"Object expected: "+e);if(e.hasOwnProperty(t="DECIMAL_PLACES")&&(A(n=e[t],0,x,t),M=n),e.hasOwnProperty(t="ROUNDING_MODE")&&(A(n=e[t],0,8,t),q=n),e.hasOwnProperty(t="EXPONENTIAL_AT")&&((n=e[t])&&n.pop?(A(n[0],-x,0,t),A(n[1],0,x,t),R=n[0],O=n[1]):(A(n,-x,x,t),R=-(O=n<0?-n:n))),e.hasOwnProperty(t="RANGE"))if((n=e[t])&&n.pop)A(n[0],-x,-1,t),A(n[1],1,x,t),k=n[0],B=n[1];else{if(A(n,-x,x,t),!n)throw Error(f+t+" cannot be zero: "+n);k=-(B=n<0?-n:n)}if(e.hasOwnProperty(t="CRYPTO")){if((n=e[t])!==!!n)throw Error(f+t+" not true or false: "+n);if(n){if("undefined"==typeof crypto||!crypto||!crypto.getRandomValues&&!crypto.randomBytes)throw G=!n,Error(f+"crypto unavailable");G=n}else G=n}if(e.hasOwnProperty(t="MODULO_MODE")&&(A(n=e[t],0,9,t),$=n),e.hasOwnProperty(t="POW_PRECISION")&&(A(n=e[t],0,x,t),U=n),e.hasOwnProperty(t="FORMAT")){if("object"!=typeof(n=e[t]))throw Error(f+t+" not an object: "+n);V=n}if(e.hasOwnProperty(t="ALPHABET")){if("string"!=typeof(n=e[t])||/^.?$|[+\-.\s]|(.).*\1/.test(n))throw Error(f+t+" invalid: "+n);L="0123456789"==n.slice(0,10),D=n}}return{DECIMAL_PLACES:M,ROUNDING_MODE:q,EXPONENTIAL_AT:[R,O],RANGE:[k,B],CRYPTO:G,MODULO_MODE:$,POW_PRECISION:U,FORMAT:V,ALPHABET:D}},j.isBigNumber=function(e){if(!e||!0!==e._isBigNumber)return!1;if(!j.DEBUG)return!0;var t,n,r=e.c,a=e.e,i=e.s;e:if("[object Array]"=={}.toString.call(r)){if((1===i||-1===i)&&a>=-x&&a<=x&&a===h(a)){if(0===r[0]){if(0===a&&1===r.length)return!0;break e}if((t=(a+1)%N)<1&&(t+=N),String(r[0]).length==t){for(t=0;t<r.length;t++)if((n=r[t])<0||n>=g||n!==h(n))break e;if(0!==n)return!0}}}else if(null===r&&null===a&&(null===i||1===i||-1===i))return!0;throw Error(f+"Invalid BigNumber: "+e)},j.maximum=j.max=function(){return F(arguments,-1)},j.minimum=j.min=function(){return F(arguments,1)},j.random=(i=9007199254740992,s=Math.random()*i&2097151?function(){return h(Math.random()*i)}:function(){return 8388608*(1073741824*Math.random()|0)+(8388608*Math.random()|0)},function(e){var t,n,r,a,i,o=0,c=[],u=new j(I);if(null==e?e=M:A(e,0,x),a=d(e/N),G)if(crypto.getRandomValues){for(t=crypto.getRandomValues(new Uint32Array(a*=2));o<a;)(i=131072*t[o]+(t[o+1]>>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),t[o]=n[0],t[o+1]=n[1]):(c.push(i%1e14),o+=2);o=a/2}else{if(!crypto.randomBytes)throw G=!1,Error(f+"crypto unavailable");for(t=crypto.randomBytes(a*=7);o<a;)(i=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):(c.push(i%1e14),o+=7);o=a/7}if(!G)for(;o<a;)(i=s())<9e15&&(c[o++]=i%1e14);for(a=c[--o],e%=N,a&&e&&(i=v[N-e],c[o]=h(a/i)*i);0===c[o];c.pop(),o--);if(o<0)c=[r=0];else{for(r=-1;0===c[0];c.splice(0,1),r-=N);for(o=1,i=c[0];i>=10;i/=10,o++);o<N&&(r-=N-o)}return u.e=r,u.c=c,u}),j.sum=function(){for(var e=1,t=arguments,n=new j(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 a,i,s=[0],o=0,c=e.length;o<c;){for(i=s.length;i--;s[i]*=t);for(s[0]+=r.indexOf(e.charAt(o++)),a=0;a<s.length;a++)s[a]>n-1&&(null==s[a+1]&&(s[a+1]=0),s[a+1]+=s[a]/n|0,s[a]%=n)}return s.reverse()}return function(r,a,i,s,o){var c,u,l,m,p,d,h,f,y=r.indexOf("."),g=M,N=q;for(y>=0&&(m=U,U=0,r=r.replace(".",""),d=(f=new j(a)).pow(r.length-y),U=m,f.c=t(z(P(d.c),d.e,"0"),10,i,e),f.e=f.c.length),l=m=(h=t(r,a,i,o?(c=D,e):(c=e,D))).length;0==h[--m];h.pop());if(!h[0])return c.charAt(0);if(y<0?--l:(d.c=h,d.e=l,d.s=s,h=(d=n(d,f,g,N,i)).c,p=d.r,l=d.e),y=h[u=l+g+1],m=i/2,p=p||u<0||null!=h[u+1],p=N<4?(null!=y||p)&&(0==N||N==(d.s<0?3:2)):y>m||y==m&&(4==N||p||6==N&&1&h[u-1]||N==(d.s<0?8:7)),u<1||!h[0])r=p?z(c.charAt(1),-g,c.charAt(0)):c.charAt(0);else{if(h.length=u,p)for(--i;++h[--u]>i;)h[u]=0,u||(++l,h=[1].concat(h));for(m=h.length;!h[--m];);for(y=0,r="";y<=m;r+=c.charAt(h[y++]));r=z(r,l,c.charAt(0))}return r}}(),n=function(){function e(e,t,n){var r,a,i,s,o=0,c=e.length,u=t%b,l=t/b|0;for(e=e.slice();c--;)o=((a=u*(i=e[c]%b)+(r=l*i+(s=e[c]/b|0)*u)%b*b+o)/n|0)+(r/b|0)+l*s,e[c]=a%n;return o&&(e=[o].concat(e)),e}function t(e,t,n,r){var a,i;if(n!=r)i=n>r?1:-1;else for(a=i=0;a<n;a++)if(e[a]!=t[a]){i=e[a]>t[a]?1:-1;break}return i}function n(e,t,n,r){for(var a=0;n--;)e[n]-=a,a=e[n]<t[n]?1:0,e[n]=a*r+e[n]-t[n];for(;!e[0]&&e.length>1;e.splice(0,1));}return function(r,a,i,s,o){var c,u,l,m,p,d,f,y,w,v,b,x,P,C,A,S,T,z=r.s==a.s?1:-1,E=r.c,I=a.c;if(!(E&&E[0]&&I&&I[0]))return new j(r.s&&a.s&&(E?!I||E[0]!=I[0]:I)?E&&0==E[0]||!I?0*z:z/0:NaN);for(w=(y=new j(z)).c=[],z=i+(u=r.e-a.e)+1,o||(o=g,u=_(r.e/N)-_(a.e/N),z=z/N|0),l=0;I[l]==(E[l]||0);l++);if(I[l]>(E[l]||0)&&u--,z<0)w.push(1),m=!0;else{for(C=E.length,S=I.length,l=0,z+=2,(p=h(o/(I[0]+1)))>1&&(I=e(I,p,o),E=e(E,p,o),S=I.length,C=E.length),P=S,b=(v=E.slice(0,S)).length;b<S;v[b++]=0);T=I.slice(),T=[0].concat(T),A=I[0],I[1]>=o/2&&A++;do{if(p=0,(c=t(I,v,S,b))<0){if(x=v[0],S!=b&&(x=x*o+(v[1]||0)),(p=h(x/A))>1)for(p>=o&&(p=o-1),f=(d=e(I,p,o)).length,b=v.length;1==t(d,v,f,b);)p--,n(d,S<f?T:I,f,o),f=d.length,c=1;else 0==p&&(c=p=1),f=(d=I.slice()).length;if(f<b&&(d=[0].concat(d)),n(v,d,b,o),b=v.length,-1==c)for(;t(I,v,S,b)<1;)p++,n(v,S<b?T:I,b,o),b=v.length}else 0===c&&(p++,v=[0]);w[l++]=p,v[0]?v[b++]=E[P]||0:(v=[E[P]],b=1)}while((P++<C||null!=v[0])&&z--);m=null!=v[0],w[0]||w.splice(0,1)}if(o==g){for(l=1,z=w[0];z>=10;z/=10,l++);W(y,i+(y.e=l+u*N-1)+1,s,m)}else y.e=u,y.r=+m;return y}}(),o=/^(-?)0([xbo])(?=\w[\w.]*$)/i,c=/^([^.]+)\.$/,u=/^\.([^.]+)$/,l=/^-?(Infinity|NaN)$/,m=/^\s*\+(?=[\w.])|^\s+|\s+$/g,a=function(e,t,n,r){var a,i=n?t:t.replace(m,"");if(l.test(i))e.s=isNaN(i)?null:i<0?-1:1;else{if(!n&&(i=i.replace(o,(function(e,t,n){return a="x"==(n=n.toLowerCase())?16:"b"==n?2:8,r&&r!=a?e:t})),r&&(a=r,i=i.replace(c,"$1").replace(u,"0.$1")),t!=i))return new j(i,a);if(j.DEBUG)throw Error(f+"Not a"+(r?" base "+r:"")+" number: "+t);e.s=null}e.c=e.e=null},E.absoluteValue=E.abs=function(){var e=new j(this);return e.s<0&&(e.s=1),e},E.comparedTo=function(e,t){return C(this,new j(e,t))},E.decimalPlaces=E.dp=function(e,t){var n,r,a,i=this;if(null!=e)return A(e,0,x),null==t?t=q:A(t,0,8),W(new j(i),e+i.e+1,t);if(!(n=i.c))return null;if(r=((a=n.length-1)-_(this.e/N))*N,a=n[a])for(;a%10==0;a/=10,r--);return r<0&&(r=0),r},E.dividedBy=E.div=function(e,t){return n(this,new j(e,t),M,q)},E.dividedToIntegerBy=E.idiv=function(e,t){return n(this,new j(e,t),0,1)},E.exponentiatedBy=E.pow=function(e,t){var n,r,a,i,s,o,c,u,l=this;if((e=new j(e)).c&&!e.isInteger())throw Error(f+"Exponent not an integer: "+K(e));if(null!=t&&(t=new j(t)),s=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 j(Math.pow(+K(l),s?e.s*(2-S(e)):+K(e))),t?u.mod(t):u;if(o=e.s<0,t){if(t.c?!t.c[0]:!t.s)return new j(NaN);(r=!o&&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||s&&l.c[1]>=24e7:l.c[0]<8e13||s&&l.c[0]<=9999975e7)))return i=l.s<0&&S(e)?-0:0,l.e>-1&&(i=1/i),new j(o?1/i:i);U&&(i=d(U/N+2))}for(s?(n=new j(.5),o&&(e.s=1),c=S(e)):c=(a=Math.abs(+K(e)))%2,u=new j(I);;){if(c){if(!(u=u.times(l)).c)break;i?u.c.length>i&&(u.c.length=i):r&&(u=u.mod(t))}if(a){if(0===(a=h(a/2)))break;c=a%2}else if(W(e=e.times(n),e.e+1,1),e.e>14)c=S(e);else{if(0==(a=+K(e)))break;c=a%2}l=l.times(l),i?l.c&&l.c.length>i&&(l.c.length=i):r&&(l=l.mod(t))}return r?u:(o&&(u=I.div(u)),t?u.mod(t):i?W(u,U,q,void 0):u)},E.integerValue=function(e){var t=new j(this);return null==e?e=q:A(e,0,8),W(t,t.e+1,e)},E.isEqualTo=E.eq=function(e,t){return 0===C(this,new j(e,t))},E.isFinite=function(){return!!this.c},E.isGreaterThan=E.gt=function(e,t){return C(this,new j(e,t))>0},E.isGreaterThanOrEqualTo=E.gte=function(e,t){return 1===(t=C(this,new j(e,t)))||0===t},E.isInteger=function(){return!!this.c&&_(this.e/N)>this.c.length-2},E.isLessThan=E.lt=function(e,t){return C(this,new j(e,t))<0},E.isLessThanOrEqualTo=E.lte=function(e,t){return-1===(t=C(this,new j(e,t)))||0===t},E.isNaN=function(){return!this.s},E.isNegative=function(){return this.s<0},E.isPositive=function(){return this.s>0},E.isZero=function(){return!!this.c&&0==this.c[0]},E.minus=function(e,t){var n,r,a,i,s=this,o=s.s;if(t=(e=new j(e,t)).s,!o||!t)return new j(NaN);if(o!=t)return e.s=-t,s.plus(e);var c=s.e/N,u=e.e/N,l=s.c,m=e.c;if(!c||!u){if(!l||!m)return l?(e.s=-t,e):new j(m?s:NaN);if(!l[0]||!m[0])return m[0]?(e.s=-t,e):new j(l[0]?s:3==q?-0:0)}if(c=_(c),u=_(u),l=l.slice(),o=c-u){for((i=o<0)?(o=-o,a=l):(u=c,a=m),a.reverse(),t=o;t--;a.push(0));a.reverse()}else for(r=(i=(o=l.length)<(t=m.length))?o:t,o=t=0;t<r;t++)if(l[t]!=m[t]){i=l[t]<m[t];break}if(i&&(a=l,l=m,m=a,e.s=-e.s),(t=(r=m.length)-(n=l.length))>0)for(;t--;l[n++]=0);for(t=g-1;r>o;){if(l[--r]<m[r]){for(n=r;n&&!l[--n];l[n]=t);--l[n],l[r]+=g}l[r]-=m[r]}for(;0==l[0];l.splice(0,1),--u);return l[0]?J(e,l,u):(e.s=3==q?-1:1,e.c=[e.e=0],e)},E.modulo=E.mod=function(e,t){var r,a,i=this;return e=new j(e,t),!i.c||!e.s||e.c&&!e.c[0]?new j(NaN):!e.c||i.c&&!i.c[0]?new j(i):(9==$?(a=e.s,e.s=1,r=n(i,e,0,3),e.s=a,r.s*=a):r=n(i,e,0,$),(e=i.minus(r.times(e))).c[0]||1!=$||(e.s=i.s),e)},E.multipliedBy=E.times=function(e,t){var n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,w=this,v=w.c,x=(e=new j(e,t)).c;if(!(v&&x&&v[0]&&x[0]))return!w.s||!e.s||v&&!v[0]&&!x||x&&!x[0]&&!v?e.c=e.e=e.s=null:(e.s*=w.s,v&&x?(e.c=[0],e.e=0):e.c=e.e=null),e;for(r=_(w.e/N)+_(e.e/N),e.s*=w.s,(c=v.length)<(m=x.length)&&(h=v,v=x,x=h,a=c,c=m,m=a),a=c+m,h=[];a--;h.push(0));for(f=g,y=b,a=m;--a>=0;){for(n=0,p=x[a]%y,d=x[a]/y|0,i=a+(s=c);i>a;)n=((u=p*(u=v[--s]%y)+(o=d*u+(l=v[s]/y|0)*p)%y*y+h[i]+n)/f|0)+(o/y|0)+d*l,h[i--]=u%f;h[i]=n}return n?++r:h.splice(0,1),J(e,h,r)},E.negated=function(){var e=new j(this);return e.s=-e.s||null,e},E.plus=function(e,t){var n,r=this,a=r.s;if(t=(e=new j(e,t)).s,!a||!t)return new j(NaN);if(a!=t)return e.s=-t,r.minus(e);var i=r.e/N,s=e.e/N,o=r.c,c=e.c;if(!i||!s){if(!o||!c)return new j(a/0);if(!o[0]||!c[0])return c[0]?e:new j(o[0]?r:0*a)}if(i=_(i),s=_(s),o=o.slice(),a=i-s){for(a>0?(s=i,n=c):(a=-a,n=o),n.reverse();a--;n.push(0));n.reverse()}for((a=o.length)-(t=c.length)<0&&(n=c,c=o,o=n,t=a),a=0;t;)a=(o[--t]=o[t]+c[t]+a)/g|0,o[t]=g===o[t]?0:o[t]%g;return a&&(o=[a].concat(o),++s),J(e,o,s)},E.precision=E.sd=function(e,t){var n,r,a,i=this;if(null!=e&&e!==!!e)return A(e,1,x),null==t?t=q:A(t,0,8),W(new j(i),e,t);if(!(n=i.c))return null;if(r=(a=n.length-1)*N+1,a=n[a]){for(;a%10==0;a/=10,r--);for(a=n[0];a>=10;a/=10,r++);}return e&&i.e+1>r&&(r=i.e+1),r},E.shiftedBy=function(e){return A(e,-9007199254740991,w),this.times("1e"+e)},E.squareRoot=E.sqrt=function(){var e,t,r,a,i,s=this,o=s.c,c=s.s,u=s.e,l=M+4,m=new j("0.5");if(1!==c||!o||!o[0])return new j(!c||c<0&&(!o||o[0])?NaN:o?s:1/0);if(0==(c=Math.sqrt(+K(s)))||c==1/0?(((t=P(o)).length+u)%2==0&&(t+="0"),c=Math.sqrt(+t),u=_((u+1)/2)-(u<0||u%2),r=new j(t=c==1/0?"5e"+u:(t=c.toExponential()).slice(0,t.indexOf("e")+1)+u)):r=new j(c+""),r.c[0])for((c=(u=r.e)+l)<3&&(c=0);;)if(i=r,r=m.times(i.plus(n(s,i,l,1))),P(i.c).slice(0,c)===(t=P(r.c)).slice(0,c)){if(r.e<u&&--c,"9999"!=(t=t.slice(c-3,c+1))&&(a||"4999"!=t)){+t&&(+t.slice(1)||"5"!=t.charAt(0))||(W(r,r.e+M+2,1),e=!r.times(r).eq(s));break}if(!a&&(W(i,i.e+M+2,0),i.times(i).eq(s))){r=i;break}l+=4,c+=4,a=1}return W(r,r.e+M+1,q,e)},E.toExponential=function(e,t){return null!=e&&(A(e,0,x),e++),H(this,e,t,1)},E.toFixed=function(e,t){return null!=e&&(A(e,0,x),e=e+this.e+1),H(this,e,t)},E.toFormat=function(e,t,n){var r,a=this;if(null==n)null!=e&&t&&"object"==typeof t?(n=t,t=null):e&&"object"==typeof e?(n=e,e=t=null):n=V;else if("object"!=typeof n)throw Error(f+"Argument not an object: "+n);if(r=a.toFixed(e,t),a.c){var i,s=r.split("."),o=+n.groupSize,c=+n.secondaryGroupSize,u=n.groupSeparator||"",l=s[0],m=s[1],p=a.s<0,d=p?l.slice(1):l,h=d.length;if(c&&(i=o,o=c,c=i,h-=i),o>0&&h>0){for(i=h%o||o,l=d.substr(0,i);i<h;i+=o)l+=u+d.substr(i,o);c>0&&(l+=u+d.slice(i)),p&&(l="-"+l)}r=m?l+(n.decimalSeparator||"")+((c=+n.fractionGroupSize)?m.replace(new RegExp("\\d{"+c+"}\\B","g"),"$&"+(n.fractionGroupSeparator||"")):m):l}return(n.prefix||"")+r+(n.suffix||"")},E.toFraction=function(e){var t,r,a,i,s,o,c,u,l,m,p,d,h=this,y=h.c;if(null!=e&&(!(c=new j(e)).isInteger()&&(c.c||1!==c.s)||c.lt(I)))throw Error(f+"Argument "+(c.isInteger()?"out of range: ":"not an integer: ")+K(c));if(!y)return new j(h);for(t=new j(I),l=r=new j(I),a=u=new j(I),d=P(y),s=t.e=d.length-h.e-1,t.c[0]=v[(o=s%N)<0?N+o:o],e=!e||c.comparedTo(t)>0?s>0?t:l:c,o=B,B=1/0,c=new j(d),u.c[0]=0;m=n(c,t,0,1),1!=(i=r.plus(m.times(a))).comparedTo(e);)r=a,a=i,l=u.plus(m.times(i=l)),u=i,t=c.minus(m.times(i=t)),c=i;return i=n(e.minus(r),a,0,1),u=u.plus(i.times(l)),r=r.plus(i.times(a)),u.s=l.s=h.s,p=n(l,a,s*=2,q).minus(h).abs().comparedTo(n(u,r,s,q).minus(h).abs())<1?[l,a]:[u,r],B=o,p},E.toNumber=function(){return+K(this)},E.toPrecision=function(e,t){return null!=e&&A(e,1,x),H(this,e,t,2)},E.toString=function(e){var t,n=this,a=n.s,i=n.e;return null===i?a?(t="Infinity",a<0&&(t="-"+t)):t="NaN":(null==e?t=i<=R||i>=O?T(P(n.c),i):z(P(n.c),i,"0"):10===e&&L?t=z(P((n=W(new j(n),M+i+1,q)).c),n.e,"0"):(A(e,2,D.length,"Base"),t=r(z(P(n.c),i,"0"),10,e,a,!0)),a<0&&n.c[0]&&(t="-"+t)),t},E.valueOf=E.toJSON=function(){return K(this)},E._isBigNumber=!0,E[Symbol.toStringTag]="BigNumber",E[Symbol.for("nodejs.util.inspect.custom")]=E.valueOf,null!=t&&j.set(t),j}(),I=E;const M=e=>e.integerValue(I.ROUND_CEIL);class q extends Error{constructor(e){super(e),this.name="BaseError"}}class R extends q{constructor(e){super(e),this.name="AccountError"}}class O extends q{constructor(e){super(e),this.name="AensError"}}class k extends q{constructor(e){super(e),this.name="AeppError"}}class B extends q{constructor(e){super(e),this.name="ChannelError"}}class G extends q{constructor(e){super(e),this.name="CompilerError"}}class $ extends q{constructor(e){super(e),this.name="ContractError"}}class U extends q{constructor(e){super(e),this.name="CryptographyError"}}class V extends q{constructor(e){super(e),this.name="NodeError"}}class D extends q{constructor(e){super(e),this.name="TransactionError"}}class L extends q{constructor(e){super(e),this.name="WalletError"}}class j extends q{constructor(e,t,n){super(`${e} should be ${t}, got ${n} instead`),this.name="ArgumentError"}}class H extends U{constructor(e){super(e),this.name="IllegalArgumentError"}}class F extends q{constructor(e,t,n){super(`${e} expects ${t} arguments, got ${n} instead`),this.name="ArgumentCountMismatchError"}}class J extends q{constructor(e){super(e),this.name="InsufficientBalanceError"}}class W extends q{constructor(e){super(e),this.name="MissingParamError"}}class K extends q{constructor(){super("Byte serialization not supported"),this.name="NoSerializerFoundError"}}class Y extends q{constructor(e){super(`Giving up at height ${e}`),this.name="RequestTimedOutError"}}class Q extends q{constructor(e,t){super(`Giving up after ${e} blocks mined, transaction hash: ${t}`),this.name="TxTimedOutError"}}class Z extends q{constructor(e){super(e),this.name="TypeError"}}class X extends q{constructor(e){super(e),this.name="UnsupportedPlatformError"}}class ee extends q{constructor(e){super(e),this.name="UnsupportedProtocolError"}}class te extends q{constructor(e){super(e),this.name="NotImplementedError"}}class ne extends q{constructor(e,t,n,r){super(`Unsupported ${e} version ${t}. Supported: >= ${n}`+(null==r?"":` < ${r}`)),this.name="UnsupportedVersionError"}}class re extends q{constructor(e){super(e),this.name="LogicError"}}class ae extends q{constructor(e){super(e),this.name="InternalError"}}class ie extends ae{constructor(e="Expected to not happen, required for TS"){super(e),this.name="UnexpectedTsError"}}class se extends R{constructor(e){super(`Account for ${e} not available`),this.name="UnavailableAccountError"}}class oe extends O{constructor(e,t){super(`Name ${e} don't have pointers for ${t}`),this.name="AensPointerContextError"}}class ce extends O{constructor(e,t){super(`the provided fee ${e.toString()} is not enough to execute the claim, required: ${t.toString()}`),this.name="InsufficientNameFeeError"}}class ue extends O{constructor(e){super(e),this.name="InvalidAensNameError"}}class le extends k{constructor(e){super(`Received invalid message: ${e}`),this.name="InvalidRpcMessageError"}}class me extends k{constructor(e){super(`Can't find callback for this messageId ${e}`),this.name="MissingCallbackError"}}class pe 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 he extends k{constructor(){super("You are not subscribed for an account."),this.name="UnsubscribedAccountError"}}class fe extends B{constructor(e){super(e),this.name="ChannelCallError"}}class ye extends B{constructor(e){super(e),this.name="ChannelConnectionError"}}class ge extends B{constructor(){super("Server pong timed out"),this.name="ChannelPingTimedOutError"}}class Ne extends B{constructor(e){super(e),this.name="UnexpectedChannelMessageError"}}class we extends B{constructor(e,t){super(e.message),this.handlerError=e,this.incomingMessage=t,this.name="ChannelIncomingMessageError"}}class ve extends B{constructor(){super("State Channels FSM entered unknown state"),this.name="UnknownChannelStateError"}}class be extends G{constructor(e){super(e),this.name="InvalidAuthDataError"}}class xe extends ${constructor(e,t=""){super(`Contract ${e} do not correspond to the bytecode deployed on the chain`+t),this.name="BytecodeMismatchError"}}class _e extends ${constructor(){super("Contract already deployed"),this.name="DuplicateContractError"}}class Pe extends ${constructor(e){super(`Contract with address ${e} not active`),this.name="InactiveContractError"}}class Ce extends ${constructor(e){super(e),this.name="InvalidMethodInvocationError"}}class Ae extends ${constructor(e){super(e),this.name="MissingContractAddressError"}}class Se extends ${constructor(){super("Either ACI or sourceCode or sourceCodePath is required"),this.name="MissingContractDefError"}}class Te extends ${constructor(){super("Function name is required"),this.name="MissingFunctionNameError"}}class ze extends ${constructor(e,t){super("Invocation failed"+(null==e?"":`: "${e}"`)),this.name="NodeInvocationError",this.transaction=t}}class Ee extends ${constructor(e){super(`Function ${e} doesn't exist in contract`),this.name="NoSuchContractFunctionError"}}class Ie extends ${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 Me extends ${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 qe extends ${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 Re extends U{constructor(){super("Invalid checksum"),this.name="InvalidChecksumError"}}class Oe extends U{constructor(){super("Node hash is not equal to provided one"),this.name="MerkleTreeHashMismatchError"}}class ke extends U{constructor(e){super(e),this.name="MissingNodeInTreeError"}}class Be extends U{constructor(e){super(`Unknown node length: ${e}`),this.name="UnknownNodeLengthError"}}class Ge extends U{constructor(e){super(`Unknown path nibble: ${e}`),this.name="UnknownPathNibbleError"}}class $e extends V{constructor(e){super(`Node with name ${e} already exist`),this.name="DuplicateNodeError"}}class Ue extends V{constructor(e){super(e),this.name="NodeNotFoundError"}}class Ve extends D{constructor(e){super(e),this.name="DecodeError"}}class De extends D{constructor(e){super(e),this.name="PayloadLengthError"}}class Le extends D{constructor(e){super(e),this.name="DryRunError"}}class je extends D{constructor(e){super(e),this.name="IllegalBidFeeError"}}class He extends D{constructor(e){super(e),this.name="InvalidSignatureError"}}class Fe extends D{constructor(e){super(`Prefix for id-tag ${e} not found.`),this.name="PrefixNotFoundError"}}class Je extends D{constructor(e,t){super(`Transaction schema not implemented for tag ${e} version ${t}`),this.name="SchemaNotFoundError"}}class We extends D{constructor(e){super(`Id tag for prefix ${e} not found.`),this.name="DecodeError"}}class Ke extends D{constructor(e){super(`Transaction ${e} is removed from chain`),this.name="TxNotInChainError"}}class Ye extends L{constructor(e){super(e),this.name="AlreadyConnectedError"}}class Qe extends L{constructor(e){super(e),this.name="NoWalletConnectedError"}}class Ze extends L{constructor(e){super(e),this.name="RpcConnectionError"}}let Xe=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={[Xe.AE]:0,[Xe.MILI_AE]:-3,[Xe.MICRO_AE]:-6,[Xe.NANO_AE]:-9,[Xe.PICO_AE]:-12,[Xe.FEMTO_AE]:-15,[Xe.AETTOS]:-18},tt=(e,{denomination:t=Xe.AETTOS,targetDenomination:n=Xe.AETTOS})=>{if("bigint"!=typeof(r=e)&&(!["number","object","string"].includes(typeof r)||isNaN(r)&&!Number.isInteger(r)&&!I.isBigNumber(r)))throw new j("value","a number",e);var r;return new I("bigint"==typeof e?e.toString():e).shiftedBy(et[t]-et[n]).toFixed()},nt=(e,{denomination:t=Xe.AETTOS}={})=>tt(e,{denomination:t,targetDenomination:Xe.AE}),rt=(e,{denomination:t=Xe.AE}={})=>tt(e,{denomination:t}),at=[{name:"exa",magnitude:18},{name:"giga",magnitude:9},{name:"",magnitude:0},{name:"pico",magnitude:-12}],it=e=>at.reduce(((t,n)=>Math.abs(n.magnitude-e)<Math.abs(t.magnitude-e)?n:t)),st=e=>{var t;return null!==(t=at.find((t=>t.magnitude<=e)))&&void 0!==t?t:at[at.length-1]},ot=e=>{var t;const n=new I(e),r=null!==(t=n.e)&&void 0!==t?t:0,{name:a,magnitude:i}=(r<0?it:st)(r);return`${n.shiftedBy(-i).precision(9+Math.min(r-i,0)).toFixed()}${""!==a?" ":""}${a}`},ct=new Set(["Deserialize","Serialize","Retry","Sign"]);class ut{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&&!ct.has(t.phase))throw new Error(`Invalid phase name: ${t.phase}`);if(t.afterPhase&&!ct.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 ut(this._policies)}static create(){return new ut}orderPolicies(){const e=[],t=new Map;function n(e){return{name:e,policies:new Set,hasRun:!1,hasAfterPolicies:!1}}const r=n("Serialize"),a=n("None"),i=n("Deserialize"),s=n("Retry"),o=n("Sign"),c=[r,a,i,s,o];function u(e){return"Retry"===e?s:"Serialize"===e?r:"Deserialize"===e?i:"Sign"===e?o:a}for(const e of this._policies){const n=e.policy,r=e.options,a=n.name;if(t.has(a))throw new Error("Duplicate policy names not allowed in pipeline");const i={policy:n,dependsOn:new Set,dependants:new Set};r.afterPhase&&(i.afterPhase=u(r.afterPhase),i.afterPhase.hasAfterPolicies=!0),t.set(a,i),u(r.phase).policies.add(i)}for(const e of this._policies){const{policy:n,options:r}=e,a=n.name,i=t.get(a);if(!i)throw new Error(`Missing node for policy ${a}`);if(r.afterPolicies)for(const e of r.afterPolicies){const n=t.get(e);n&&(i.dependsOn.add(n),n.dependants.add(i))}if(r.beforePolicies)for(const e of r.beforePolicies){const n=t.get(e);n&&(n.dependsOn.add(i),i.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 m(){for(const e of c){if(l(e),e.policies.size>0&&e!==a)return void(a.hasRun||l(a));e.hasAfterPolicies&&l(a)}}let p=0;for(;t.size>0;){p++;const t=e.length;if(m(),e.length<=t&&p>1)throw new Error("Cannot satisfy policy dependencies due to requirements cycle.")}return e}}var lt=n(5606);const mt=void 0!==lt&<.env&<.env.DEBUG||void 0;let pt,dt=[],ht=[];const ft=[];mt&>(mt);const yt=Object.assign((e=>wt(e)),{enable:gt,enabled:Nt,disable:function(){const e=pt||"";return gt(""),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 gt(e){pt=e,dt=[],ht=[];const t=/\*/g,n=e.split(",").map((e=>e.trim().replace(t,".*?")));for(const e of n)e.startsWith("-")?ht.push(new RegExp(`^${e.substr(1)}$`)):dt.push(new RegExp(`^${e}$`));for(const e of ft)e.enabled=Nt(e.namespace)}function Nt(e){if(e.endsWith("*"))return!0;for(const t of ht)if(t.test(e))return!1;for(const t of dt)if(t.test(e))return!0;return!1}function wt(e){const t=Object.assign((function(...n){t.enabled&&(n.length>0&&(n[0]=`${e} ${n[0]}`),t.log(...n))}),{enabled:Nt(e),destroy:vt,log:yt.log,namespace:e,extend:bt});return ft.push(t),t}function vt(){const e=ft.indexOf(this);return e>=0&&(ft.splice(e,1),!0)}function bt(e){const t=wt(`${this.namespace}:${e}`);return t.log=this.log,t}var xt=yt,_t=n(5606);const Pt=new Set,Ct=void 0!==_t&&_t.env&&_t.env.AZURE_LOG_LEVEL||void 0;let At;const St=xt("azure");St.log=(...e)=>{xt.log(...e)};const Tt=["verbose","info","warning","error"];Ct&&(Rt(Ct)?function(e){if(e&&!Rt(e))throw new Error(`Unknown log level '${e}'. Acceptable values: ${Tt.join(",")}`);At=e;const t=[];for(const e of Pt)qt(e)&&t.push(e.namespace);xt.enable(t.join(","))}(Ct):console.error(`AZURE_LOG_LEVEL set to unknown log level '${Ct}'; logging is not enabled. Acceptable values: ${Tt.join(", ")}.`));const zt={verbose:400,info:300,warning:200,error:100};function Et(e){const t=St.extend(e);return It(St,t),{error:Mt(t,"error"),warning:Mt(t,"warning"),info:Mt(t,"info"),verbose:Mt(t,"verbose")}}function It(e,t){t.log=(...t)=>{e.log(...t)}}function Mt(e,t){const n=Object.assign(e.extend(t),{level:t});if(It(e,n),qt(n)){const e=xt.disable();xt.enable(e+","+n.namespace)}return Pt.add(n),n}function qt(e){return Boolean(At&&zt[e.level]<=zt[At])}function Rt(e){return Tt.includes(e)}const Ot=Et("core-rest-pipeline");class kt extends Error{constructor(e){super(e),this.name="AbortError"}}function Bt(e){return!("object"!=typeof e||null===e||Array.isArray(e)||e instanceof RegExp||e instanceof Date)}function Gt(e){if(Bt(e)){const t="string"==typeof e.name,n="string"==typeof e.message;return t&&n}return!1}function $t(e){if(Gt(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}`}}function Ut(e,t){switch(t){case"utf-8":return function(e){return(new TextEncoder).encode(e)}(e);case"base64":return Vt(e);case"base64url":return function(e){return Vt(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],a=e[2*n+1];if(!Dt.has(r)||!Dt.has(a))return t.slice(0,n);t[n]=parseInt(`${r}${a}`,16)}return t}(e)}}function Vt(e){return new Uint8Array([...atob(e)].map((e=>e.charCodeAt(0))))}const Dt=new Set("0123456789abcdefABCDEF");var Lt;const jt="function"==typeof(null===(Lt=null===globalThis||void 0===globalThis?void 0:globalThis.crypto)||void 0===Lt?void 0:Lt.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 Ht(){return jt()}var Ft,Jt,Wt,Kt;"undefined"!=typeof window&&window.document,"object"==typeof self&&"function"==typeof(null===self||void 0===self?void 0:self.importScripts)&&("DedicatedWorkerGlobalScope"===(null===(Ft=self.constructor)||void 0===Ft?void 0:Ft.name)||"ServiceWorkerGlobalScope"===(null===(Jt=self.constructor)||void 0===Jt?void 0:Jt.name)||null===(Wt=self.constructor)||void 0===Wt||Wt.name),"undefined"!=typeof Deno&&void 0!==Deno.version&&Deno.version.deno,"undefined"!=typeof Bun&&Bun.version;const Yt=void 0!==globalThis.process&&Boolean(globalThis.process.version)&&Boolean(null===(Kt=globalThis.process.versions)||void 0===Kt?void 0:Kt.node),Qt=("undefined"!=typeof navigator&&(null===navigator||void 0===navigator||navigator.product),"REDACTED"),Zt=["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"],Xt=["api-version"];class en{constructor({additionalAllowedHeaderNames:e=[],additionalAllowedQueryParameters:t=[]}={}){e=Zt.concat(e),t=Xt.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)||Bt(n)){if(t.has(n))return"[Circular]";t.add(n)}return n}}),2)}sanitizeUrl(e){if("string"!=typeof e||null===e||""===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,Qt);return t.toString()}sanitizeHeaders(e){const t={};for(const n of Object.keys(e))this.allowedHeaderNames.has(n.toLowerCase())?t[n]=e[n]:t[n]=Qt;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]=Qt;return t}}const tn=["GET","HEAD"];function nn(e={}){const{maxRetries:t=20}=e;return{name:"redirectPolicy",async sendRequest(e,n){const r=await n(e);return rn(n,r,t)}}}async function rn(e,t,n,r=0){const{request:a,status:i,headers:s}=t,o=s.get("location");if(o&&(300===i||301===i&&tn.includes(a.method)||302===i&&tn.includes(a.method)||303===i&&"POST"===a.method||307===i)&&r<n){const t=new URL(o,a.url);a.url=t.toString(),303===i&&(a.method="GET",a.headers.delete("Content-Length"),delete a.body),a.headers.delete("Authorization");const s=await e(a);return rn(e,s,n,r+1)}return t}const an="1.19.1";async function sn(e){const t=new Map;t.set("core-rest-pipeline",an),await async function(e){const t=globalThis.navigator;let n="unknown";if(null==t?void 0:t.userAgentData){const r=await t.userAgentData.getHighEntropyValues(["architecture","platformVersion"]);n=`${r.architecture}-${r.platform}-${r.platformVersion}`;const a=function(e){const t=["Google Chrome","Microsoft Edge","Opera","Brave","Chromium"];for(const n of t){const t=e.find((e=>e.brand===n));if(t)return t}}(t.userAgentData.brands);a&&e.set(a.brand,a.version)}else if(null==t?void 0:t.platform){n=t.platform;const r=function(e){const t=[{name:"Firefox",regex:/Firefox\/([\d.]+)/},{name:"Safari",regex:/Version\/([\d.]+).*Safari/}];for(const n of t){const t=e.match(n.regex);if(t)return{brand:n.name,version:t[1]}}}(t.userAgent);r&&e.set(r.brand,r.version)}else"string"==typeof globalThis.EdgeRuntime&&e.set("EdgeRuntime",globalThis.EdgeRuntime);e.set("OS",n)}(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 on="x-ms-useragent",cn="userAgentPolicy",un=Symbol("rawContent");function ln(e){return"function"==typeof e[un]?e[un]():e.stream()}function mn(e){return Boolean(e&&"function"==typeof e.pipe)}function pn(e){return Boolean(e&&"function"==typeof e.getReader&&"function"==typeof e.tee)}async function dn(e){if(e instanceof Blob||e instanceof Uint8Array)return e;if(pn(e))return new Response(e).blob();const t=ln(e);if(mn(t))throw new Error("Encountered unexpected type. In the browser, `concat` supports Web ReadableStream, Blob, Uint8Array, and files created using `createFile` only.");return dn(t)}function hn(e){let t="";for(const[n,r]of e)t+=`${n}: ${r}\r\n`;return t}function fn(e){return e instanceof Uint8Array?e.byteLength:"function"==typeof e.stream?-1===e.size?void 0:e.size:void 0}const yn="multipartPolicy",gn=new Set("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789'()+,-./:=?");function Nn(){return{name:yn,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 a=null!==(n=e.headers.get("Content-Type"))&&void 0!==n?n:"multipart/mixed",i=a.match(/^(multipart\/[^ ;]+)(?:; *boundary=(.+))?$/);if(!i)throw new Error(`Got multipart request body, but content-type header was not multipart: ${a}`);const[,s,o]=i;if(o&&r&&o!==r)throw new Error(`Multipart boundary was specified as ${o} in the header, but got ${r} in the request body`);return null!=r||(r=o),r?function(e){if(e.length>70)throw new Error(`Multipart boundary "${e}" exceeds maximum length of 70 characters`);if(Array.from(e).some((e=>!gn.has(e))))throw new Error(`Multipart boundary "${e}" contains invalid characters`)}(r):r=`----AzSDKFormBoundary${Ht()}`,e.headers.set("Content-Type",`${s}; boundary=${r}`),await async function(e,t,n){const r=[Ut(`--${n}`,"utf-8"),...t.flatMap((e=>[Ut("\r\n","utf-8"),Ut(hn(e.headers),"utf-8"),Ut("\r\n","utf-8"),e.body,Ut(`\r\n--${n}`,"utf-8")])),Ut("--\r\n\r\n","utf-8")],a=function(e){let t=0;for(const n of e){const e=fn(n);if(void 0===e)return;t+=e}return t}(r);a&&e.headers.set("Content-Length",a),e.body=await async function(e){const t=[];for(const n of e)t.push(await dn("function"==typeof n?n():n));return new Blob(t)}(r)}(e,e.multipartBody.parts,r),e.multipartBody=void 0,t(e)}}}function wn(e,t,n){return new Promise(((r,a)=>{let i,s;const o=()=>a(new kt((null==n?void 0:n.abortErrorMsg)?null==n?void 0:n.abortErrorMsg:"The operation was aborted.")),c=()=>{(null==n?void 0:n.abortSignal)&&s&&n.abortSignal.removeEventListener("abort",s)};if(s=()=>(i&&clearTimeout(i),c(),o()),(null==n?void 0:n.abortSignal)&&n.abortSignal.aborted)return o();i=setTimeout((()=>{c(),r(t)}),e),(null==n?void 0:n.abortSignal)&&n.abortSignal.addEventListener("abort",s)}))}function vn(e,t){const n=e.headers.get(t);if(!n)return;const r=Number(n);return Number.isNaN(r)?void 0:r}const bn="Retry-After",xn=["retry-after-ms","x-ms-retry-after-ms",bn];function _n(e){if(e&&[429,503].includes(e.status))try{for(const t of xn){const n=vn(e,t);if(0===n||n)return n*(t===bn?1e3:1)}const t=e.headers.get(bn);if(!t)return;const n=Date.parse(t)-Date.now();return Number.isFinite(n)?Math.max(0,n):void 0}catch(e){return}}function Pn(e={}){var t,n;const r=null!==(t=e.retryDelayInMs)&&void 0!==t?t:1e3,a=null!==(n=e.maxRetryDelayInMs)&&void 0!==n?n:64e3;return{name:"exponentialRetryStrategy",retry({retryCount:t,response:n,responseError:i}){const s=!!(m=i)&&("ETIMEDOUT"===m.code||"ESOCKETTIMEDOUT"===m.code||"ECONNREFUSED"===m.code||"ECONNRESET"===m.code||"ENOENT"===m.code||"ENOTFOUND"===m.code),o=s&&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(_n(e))}(n)||!c);var m;return l||u||o?{skipStrategy:!0}:!i||s||c?function(e,t){const n=t.retryDelayInMs*Math.pow(2,e),r=Math.min(t.maxRetryDelayInMs,n);var a,i;return{retryAfterInMs:r/2+(a=0,i=r/2,a=Math.ceil(a),i=Math.floor(i),Math.floor(Math.random()*(i-a+1))+a)}}(t,{retryDelayInMs:r,maxRetryDelayInMs:a}):{errorToThrow:i}}}}const Cn=Et("core-rest-pipeline retryPolicy");function An(e,t={maxRetries:3}){const n=t.logger||Cn;return{name:"retryPolicy",async sendRequest(r,a){var i,s;let o,c,u=-1;e:for(;;){u+=1,o=void 0,c=void 0;try{n.info(`Retry ${u}: Attempting to send request`,r.requestId),o=await a(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;o=c.response}if(null===(i=r.abortSignal)||void 0===i?void 0:i.aborted)throw n.error(`Retry ${u}: Request aborted.`),new kt;if(u>=(null!==(s=t.maxRetries)&&void 0!==s?s:3)){if(n.info(`Retry ${u}: Maximum retries reached. Returning the last received response, or throwing the last received error.`),c)throw c;if(o)return o;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||Cn;e.info(`Retry ${u}: Processing retry strategy ${t.name}.`);const n=t.retry({retryCount:u,response:o,responseError:c});if(n.skipStrategy){e.info(`Retry ${u}: Skipped.`);continue t}const{errorToThrow:a,retryAfterInMs:i,redirectTo:s}=n;if(a)throw e.error(`Retry ${u}: Retry strategy ${t.name} throws error:`,a),a;if(i||0===i){e.info(`Retry ${u}: Retry strategy ${t.name} retries after ${i}`),await wn(i,void 0,{abortSignal:r.abortSignal});continue e}if(s){e.info(`Retry ${u}: Retry strategy ${t.name} redirects to ${s}`),r.url=s;continue e}}if(c)throw n.info("None of the retry strategies could work with the received error. Throwing it."),c;if(o)return n.info("None of the retry strategies could work with the received response. Returning it."),o}}}}function Sn(e){return e.toLowerCase()}class Tn{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(Sn(e),{name:e,value:String(t).trim()})}get(e){var t;return null===(t=this._headersMap.get(Sn(e)))||void 0===t?void 0:t.value}has(e){return this._headersMap.has(Sn(e))}delete(e){this._headersMap.delete(Sn(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 zn(e){return new Tn(e)}const En="setClientRequestIdPolicy",In={span:Symbol.for("@azure/core-tracing span"),namespace:Symbol.for("@azure/core-tracing namespace")};function Mn(e={}){let t=new qn(e.parentContext);return e.span&&(t=t.setValue(In.span,e.span)),e.namespace&&(t=t.setValue(In.namespace,e.namespace)),t}class qn{constructor(e){this._contextMap=e instanceof qn?new Map(e._contextMap):new Map}setValue(e,t){const n=new qn(this);return n._contextMap.set(e,t),n}getValue(e){return this._contextMap.get(e)}deleteValue(e){const t=new qn(this);return t._contextMap.delete(e),t}}const Rn={instrumenterImplementation:void 0};function On(){return Rn.instrumenterImplementation||(Rn.instrumenterImplementation={createRequestHeaders:()=>({}),parseTraceparentHeader:()=>{},startSpan:(e,t)=>({span:{end:()=>{},isRecording:()=>!1,recordException:()=>{},setAttribute:()=>{},setStatus:()=>{},addEvent:()=>{}},tracingContext:Mn({parentContext:t.tracingContext})}),withContext(e,t,...n){return t(...n)}}),Rn.instrumenterImplementation}const kn={},Bn=new en;class Gn extends Error{constructor(e,t={}){super(e),this.name="RestError",this.code=t.code,this.statusCode=t.statusCode,Object.defineProperty(this,"request",{value:t.request,enumerable:!1}),Object.defineProperty(this,"response",{value:t.response,enumerable:!1}),Object.setPrototypeOf(this,Gn.prototype)}[kn](){return`RestError: ${this.message} \n ${Bn.sanitize(Object.assign(Object.assign({},this),{request:this.request,response:this.response}))}`}}function $n(e){return e instanceof Gn||Gt(e)&&"RestError"===e.name}function Un(e){var t;const n=ut.create();var r,a;return Yt&&(e.agent&&n.addPolicy((a=e.agent,{name:"agentPolicy",sendRequest:async(e,t)=>(e.agent||(e.agent=a),t(e))})),e.tlsOptions&&n.addPolicy((r=e.tlsOptions,{name:"tlsPolicy",sendRequest:async(e,t)=>(e.tlsSettings||(e.tlsSettings=r),t(e))})),n.addPolicy(function(){throw new Error("proxyPolicy is not supported in browser environment")}(e.proxyOptions)),n.addPolicy(function(){throw new Error("decompressResponsePolicy is not supported in browser environment")}())),n.addPolicy({name:"formDataPolicy",async sendRequest(e,t){if(Yt&&"undefined"!=typeof FormData&&e.body instanceof FormData&&(e.formData=function(e){var t;const n={};for(const[r,a]of e.entries())null!==(t=n[r])&&void 0!==t||(n[r]=[]),n[r].push(a);return n}(e.body),e.body=void 0),e.formData){const t=e.headers.get("Content-Type");t&&-1!==t.indexOf("application/x-www-form-urlencoded")?e.body=function(e){const t=new URLSearchParams;for(const[n,r]of Object.entries(e))if(Array.isArray(r))for(const e of r)t.append(n,e.toString());else t.append(n,r.toString());return t.toString()}(e.formData):await async function(e,t){const n=t.headers.get("Content-Type");if(n&&!n.startsWith("multipart/form-data"))return;t.headers.set("Content-Type",null!=n?n:"multipart/form-data");const r=[];for(const[t,n]of Object.entries(e))for(const e of Array.isArray(n)?n:[n])if("string"==typeof e)r.push({headers:zn({"Content-Disposition":`form-data; name="${t}"`}),body:Ut(e,"utf-8")});else{if(null==e||"object"!=typeof e)throw new Error(`Unexpected value for key ${t}: ${e}. Value should be serialized to string first.`);{const n=e.name||"blob",a=zn();a.set("Content-Disposition",`form-data; name="${t}"; filename="${n}"`),a.set("Content-Type",e.type||"application/octet-stream"),r.push({headers:a,body:e})}}t.multipartBody={parts:r}}(e.formData,e),e.formData=void 0}return t(e)}},{beforePolicies:[yn]}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix);return{name:cn,async sendRequest(e,n){return e.headers.has(on)||e.headers.set(on,await t),n(e)}}}(e.userAgentOptions)),n.addPolicy(function(e="x-ms-client-request-id"){return{name:En,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(Nn(),{afterPhase:"Deserialize"}),n.addPolicy(function(e={}){var t;return{name:"defaultRetryPolicy",sendRequest:An([{name:"throttlingRetryStrategy",retry({response:e}){const t=_n(e);return Number.isFinite(t)?{retryAfterInMs:t}:{skipStrategy:!0}}},Pn(e)],{maxRetries:null!==(t=e.maxRetries)&&void 0!==t?t:3}).sendRequest}}(e.retryOptions),{phase:"Retry"}),n.addPolicy(function(e={}){const t=sn(e.userAgentPrefix),n=new en({additionalAllowedQueryParameters:e.additionalAllowedQueryParameters}),r=function(){try{return function(e){const{namespace:t,packageName:n,packageVersion:r}=e;function a(e,a,i){var s;const o=On().startSpan(e,Object.assign(Object.assign({},i),{packageName:n,packageVersion:r,tracingContext:null===(s=null==a?void 0:a.tracingOptions)||void 0===s?void 0:s.tracingContext}));let c=o.tracingContext;const u=o.span;return c.getValue(In.namespace)||(c=c.setValue(In.namespace,t)),u.setAttribute("az.namespace",c.getValue(In.namespace)),{span:u,updatedOptions:Object.assign({},a,{tracingOptions:Object.assign(Object.assign({},null==a?void 0:a.tracingOptions),{tracingContext:c})})}}function i(e,t,...n){return On().withContext(e,t,...n)}return{startSpan:a,withSpan:async function(e,t,n,r){const{span:s,updatedOptions:o}=a(e,t,r);try{const e=await i(o.tracingOptions.tracingContext,(()=>Promise.resolve(n(o,s))));return s.setStatus({status:"success"}),e}catch(e){throw s.setStatus({status:"error",error:e}),e}finally{s.end()}},withContext:i,parseTraceparentHeader:function(e){return On().parseTraceparentHeader(e)},createRequestHeaders:function(e){return On().createRequestHeaders(e)}}}({namespace:"",packageName:"@azure/core-rest-pipeline",packageVersion:an})}catch(e){return void Ot.warning(`Error when creating the TracingClient: ${$t(e)}`)}}();return{name:"tracingPolicy",async sendRequest(e,a){var i;if(!r)return a(e);const s=await t,o={"http.url":n.sanitizeUrl(e.url),"http.method":e.method,"http.user_agent":s,requestId:e.requestId};s&&(o["http.user_agent"]=s);const{span:c,tracingContext:u}=null!==(i=function(e,t,n){try{const{span:r,updatedOptions:a}=e.startSpan(`HTTP ${t.method}`,{tracingOptions:t.tracingOptions},{spanKind:"client",spanAttributes:n});if(!r.isRecording())return void r.end();const i=e.createRequestHeaders(a.tracingOptions.tracingContext);for(const[e,n]of Object.entries(i))t.headers.set(e,n);return{span:r,tracingContext:a.tracingOptions.tracingContext}}catch(e){return void Ot.warning(`Skipping creating a tracing span due to an error: ${$t(e)}`)}}(r,e,o))&&void 0!==i?i:{};if(!c||!u)return a(e);try{const t=await r.withContext(u,a,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),t.status>=400&&e.setStatus({status:"error"}),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,t),t}catch(e){throw function(e,t){try{e.setStatus({status:"error",error:Gt(t)?t:void 0}),$n(t)&&t.statusCode&&e.setAttribute("http.status_code",t.statusCode),e.end()}catch(e){Ot.warning(`Skipping tracing span processing due to an error: ${$t(e)}`)}}(c,e),e}}}}(Object.assign(Object.assign({},e.userAgentOptions),e.loggingOptions)),{afterPhase:"Retry"}),Yt&&n.addPolicy(nn(e.redirectOptions),{afterPhase:"Retry"}),n.addPolicy(function(e={}){var t;const n=null!==(t=e.logger)&&void 0!==t?t:Ot.info,r=new en({additionalAllowedHeaderNames:e.additionalAllowedHeaderNames,additionalAllowedQueryParameters:e.additionalAllowedQueryParameters});return{name:"logPolicy",async sendRequest(e,t){if(!n.enabled)return t(e);n(`Request: ${r.sanitize(e)}`);const a=await t(e);return n(`Response status code: ${a.status}`),n(`Headers: ${r.sanitize(a.headers)}`),a}}}(e.loggingOptions),{afterPhase:"Sign"}),n}Gn.REQUEST_SEND_ERROR="REQUEST_SEND_ERROR",Gn.PARSE_ERROR="PARSE_ERROR";class Vn{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 kt("The operation was aborted. Request has already been canceled.");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:a,body:i}=function(e){const t="function"==typeof e.body?e.body():e.body;if(mn(t))throw new Error("Node streams are not supported in browser environment.");return pn(t)?{streaming:!0,body:Dn(t,{onProgress:e.onUploadProgress})}:{streaming:!1,body:t}}(e),s=Object.assign(Object.assign({body:i,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"}:{});a&&(s.duplex="half");const o=await fetch(e.url,s);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,a;const i=function(e){const t=zn();for(const[n,r]of e.headers)t.set(n,r);return t}(e),s={request:t,headers:i,status:e.status},o=pn(e.body)?Dn(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===(a=t.streamResponseStatusCodes)||void 0===a?void 0:a.has(s.status)))if(t.enableBrowserStreams)s.browserStreamBody=null!=o?o:void 0;else{const e=new Response(o);s.blobBody=e.blob(),null==n||n()}else{const e=new Response(o);s.bodyAsText=await e.text(),null==n||n()}return s}(o,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 Gn(`Error sending request: ${e.message}`,{code:null!==(n=null==e?void 0:e.code)&&void 0!==n?n:Gn.REQUEST_SEND_ERROR,request:t})}(t,e)}}}function Dn(e,t={}){let n=0;const{onProgress:r,onEnd:a}=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==a||a()}}));{const t=e.getReader();return new ReadableStream({async pull(e){var i;const{done:s,value:o}=await t.read();if(s||!o)return null==a||a(),e.close(),void t.releaseLock();n+=null!==(i=null==o?void 0:o.length)&&void 0!==i?i:0,e.enqueue(o),r&&r({loadedBytes:n})},cancel(e){return null==a||a(),t.cancel(e)}})}}class Ln{constructor(e){var t,n,r,a,i,s,o;this.url=e.url,this.body=e.body,this.headers=null!==(t=e.headers)&&void 0!==t?t:zn(),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!==(a=e.disableKeepAlive)&&void 0!==a&&a,this.proxySettings=e.proxySettings,this.streamResponseStatusCodes=e.streamResponseStatusCodes,this.withCredentials=null!==(i=e.withCredentials)&&void 0!==i&&i,this.abortSignal=e.abortSignal,this.tracingOptions=e.tracingOptions,this.onUploadProgress=e.onUploadProgress,this.onDownloadProgress=e.onDownloadProgress,this.requestId=e.requestId||Ht(),this.allowInsecureConnection=null!==(s=e.allowInsecureConnection)&&void 0!==s&&s,this.enableBrowserStreams=null!==(o=e.enableBrowserStreams)&&void 0!==o&&o,this.agent=e.agent,this.tlsSettings=e.tlsSettings}}const jn={forcedRefreshWindowInMs:1e3,retryIntervalInMs:3e3,refreshWindowInMs:12e4};async function Hn(e,t){try{return[await t(e),void 0]}catch(e){if($n(e)&&e.response)return[e.response,e];throw e}}async function Fn(e){const{scopes:t,getAccessToken:n,request:r}=e,a={abortSignal:r.abortSignal,tracingOptions:r.tracingOptions,enableCae:!0},i=await n(t,a);i&&e.request.headers.set("Authorization",`Bearer ${i.token}`)}function Jn(e){return 401===e.status&&e.headers.has("WWW-Authenticate")}async function Wn(e,t){var n;const{scopes:r}=e,a=await e.getAccessToken(r,{enableCae:!0,claims:t});return!!a&&(e.request.headers.set("Authorization",`${null!==(n=a.tokenType)&&void 0!==n?n:"Bearer"} ${a.token}`),!0)}function Kn(e){var t;if(!e)return;const n=function(e){const t=/(\w+)\s+((?:\w+=(?:"[^"]*"|[^,]*),?\s*)+)/g,n=/(\w+)="([^"]*)"/g,r=[];let a;for(;null!==(a=t.exec(e));){const e=a[1],t=a[2],i={};let s;for(;null!==(s=n.exec(t));)i[s[1]]=s[2];r.push({scheme:e,params:i})}return r}(e);return null===(t=n.find((e=>"Bearer"===e.scheme&&e.params.claims&&"insufficient_claims"===e.params.error)))||void 0===t?void 0:t.params.claims}var Yn=n(8287).Buffer;const Qn=async e=>new Promise((t=>{setTimeout(t,e)})),Zn=(e,t)=>Object.fromEntries(Object.entries(e).map(t)),Xn=(()=>{try{return Yn.concat([Uint8Array.from([])]),!1}catch(e){return!0}})()?(e,t)=>Yn.concat(e.map((e=>Yn.from(e))),t):Yn.concat;function er(e,t){return e in t}function tr(e,t){return t.includes(e)}function nr(e){return e instanceof Gn&&404===e.statusCode&&e.message.includes("Account not found")}function rr(e){if(!(e instanceof Error))throw e}function ar(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 a=e();if(null==a)throw new j("wrapped value","defined",a);if("get"===t&&"_wrappedValue"===r[0])return a;const i=Reflect[t](a,...r);return"function"==typeof i&&"get"===t?i.bind(a):i}]))))}function ir(e){var t;return null!==(t=e._wrappedValue)&&void 0!==t?t:e}var sr=n(8947),or=n.n(sr),cr=n(4156);let ur=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.AccountSecretKey="sk",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 lr=function(e){if(e.length>=255)throw new TypeError("Alphabet too long");const t=new Uint8Array(256);for(let e=0;e<t.length;e++)t[e]=255;for(let n=0;n<e.length;n++){const r=e.charAt(n),a=r.charCodeAt(0);if(255!==t[a])throw new TypeError(r+" is ambiguous");t[a]=n}const n=e.length,r=e.charAt(0),a=Math.log(n)/Math.log(256),i=Math.log(256)/Math.log(n);function s(e){if("string"!=typeof e)throw new TypeError("Expected String");if(0===e.length)return new Uint8Array;let i=0,s=0,o=0;for(;e[i]===r;)s++,i++;const c=(e.length-i)*a+1>>>0,u=new Uint8Array(c);for(;i<e.length;){const r=e.charCodeAt(i);if(r>255)return;let a=t[r];if(255===a)return;let s=0;for(let e=c-1;(0!==a||s<o)&&-1!==e;e--,s++)a+=n*u[e]>>>0,u[e]=a%256>>>0,a=a/256>>>0;if(0!==a)throw new Error("Non-zero carry");o=s,i++}let l=c-o;for(;l!==c&&0===u[l];)l++;const m=new Uint8Array(s+(c-l));let p=s;for(;l!==c;)m[p++]=u[l++];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"";let a=0,s=0,o=0;const c=t.length;for(;o!==c&&0===t[o];)o++,a++;const u=(c-o)*i+1>>>0,l=new Uint8Array(u);for(;o!==c;){let e=t[o],r=0;for(let t=u-1;(0!==e||r<s)&&-1!==t;t--,r++)e+=256*l[t]>>>0,l[t]=e%n>>>0,e=e/n>>>0;if(0!==e)throw new Error("Non-zero carry");s=r,o++}let m=u-s;for(;m!==u&&0===l[m];)m++;let p=r.repeat(a);for(;m<u;++m)p+=e.charAt(l[m]);return p},decodeUnsafe:s,decode:function(e){const t=s(e);if(t)return t;throw new Error("Non-base"+n+" character")}}}("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),mr=n(4107),pr=n.n(mr),dr=n(8287).Buffer;function hr(e){return(new(pr())).update(e).digest()}const fr=[ur.ContractBytearray,ur.ContractStoreKey,ur.ContractStoreValue,ur.Transaction,ur.OracleQuery,ur.OracleResponse,ur.State,ur.Poi,ur.StateTrees,ur.CallStateTree,ur.Bytearray],yr=[ur.KeyBlockHash,ur.MicroBlockHash,ur.BlockPofHash,ur.BlockTxHash,ur.BlockStateHash,ur.Channel,ur.ContractAddress,ur.TxHash,ur.OracleAddress,ur.OracleQueryId,ur.AccountAddress,ur.AccountSecretKey,ur.Signature,ur.Commitment,ur.PeerPubkey,ur.Name],gr={[ur.KeyBlockHash]:32,[ur.MicroBlockHash]:32,[ur.BlockPofHash]:32,[ur.BlockTxHash]:32,[ur.BlockStateHash]:32,[ur.Channel]:32,[ur.ContractAddress]:32,[ur.TxHash]:32,[ur.OracleAddress]:32,[ur.OracleQueryId]:32,[ur.AccountAddress]:32,[ur.AccountSecretKey]:32,[ur.Signature]:64,[ur.Commitment]:32,[ur.PeerPubkey]:32,[ur.State]:32};function Nr(e,t){if(!er(t,gr))return;const n=gr[t];if(null!=n&&e.length!==n)throw new De(`Payload should be ${n} bytes, got ${e.length} instead`)}const wr=e=>hr(hr(e)).slice(0,4),vr=e=>Xn([e,wr(e)]);function br(e){const t=e.slice(0,-4);if(!wr(t).equals(e.slice(-4)))throw new Re;return t}const xr={encode:e=>vr(e).toString("base64"),decode:e=>br(dr.from(e,"base64"))},_r={encode:e=>lr.encode(vr(e)),decode:e=>br(dr.from(lr.decode(e)))},Pr=e=>{const t=fr.find((t=>t===e));if(null!=t)return[t,xr];const n=yr.find((t=>t===e));if(null!=n)return[n,_r];throw new j("prefix",`one of ${[...yr,...fr].join(", ")}`,e)};function Cr(e){const[t,n,r]=e.split("_");if(null==n)throw new Ve(`Encoded string missing payload: ${e}`);if(null!=r)throw new Ve(`Encoded string have extra parts: ${e}`);const[a,i]=Pr(t),s=i.decode(n);return Nr(s,a),s}function Ar(e,t){const[,n]=Pr(t);return Nr(e,t),`${t}_${n.encode(e)}`}var Sr=n(8287).Buffer;function Tr(e,...t){0===t.length&&(t=[ur.AccountAddress]);try{Cr(e);const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n);return!0}catch(e){return!1}}function zr(e,...t){if(Cr(e),0===t.length)return;const n=e.split("_")[0];if(!tr(n,t))throw new j("Encoded string type",t.length>1?`one of ${t.join(", ")}`:t[0],n)}function Er(e,...t){try{return zr(e,...t),!0}catch(e){return!1}}function Ir(){const[e]=new BigUint64Array(or().randomBytes(8).buffer);return Number(e%BigInt(Number.MAX_SAFE_INTEGER))}function Mr(e){const t=Sr.allocUnsafe(4);return t.writeUInt32BE(e),t.subarray(t.findIndex((e=>0!==e)))}function qr(e){return Sr.from((0,cr.blake2b)(e,void 0,32))}function Rr(e,t,n){return or().sign.detached.verify(e,t,Cr(n))}function Or(e){return e<253?Sr.from([e]):Xn(e<=65535?[Sr.from([253]),Sr.from(new Uint16Array([e]).buffer)]:e<=4294967295?[Sr.from([254]),Sr.from(new Uint32Array([e]).buffer)]:[Sr.from([255]),Sr.from(new BigUint64Array([BigInt(e)]).buffer)])}const kr=Sr.from("aeternity Signed Message:\n","utf8"),Br=Or(kr.length);function Gr(e){const t=Sr.from(e,"utf8");return qr(Xn([Br,kr,Or(t.length),t]))}function $r(e,t,n){return Rr(Gr(e),t,n)}var Ur=n(8287).Buffer;function Vr(e,t=!1){if(null==e)return Ur.from([]);if(Number.isInteger(e)||I.isBigNumber(e)||t){if(I.isBigNumber(e)||(e=new I(e)),!e.isInteger())throw new Z(`Unexpected not integer value: ${e.toFixed()}`);let t=e.toString(16);return t.length%2==1&&(t=`0${t}`),Ur.from(t,"hex")}if("string"==typeof e)return Ur.from(e);throw new K}const Dr={pub:"ak_11111111111111111111111111111111273Yts",amount:100000000000000000000000000000000000n},Lr=5e4,jr=1e9,Hr=1e14,Fr=.05,Jr=480,Wr=31,Kr=Zn({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 I(t).times(Hr)]));let Yr=function(e){return e[e.Ceres=6]="Ceres",e[e.Arcus=7]="Arcus",e}({}),Qr=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}({}),Zr=function(e){return e[e.NoAbi=0]="NoAbi",e[e.Sophia=1]="Sophia",e[e.Fate=3]="Fate",e}({}),Xr=function(e){return e[e.SignedTx=11]="SignedTx",e[e.SpendTx=12]="SpendTx",e[e.OracleRegisterTx=22]="OracleRegisterTx",e[e.OracleQueryTx=23]="OracleQueryTx",e[e.OracleResponseTx=24]="OracleResponseTx",e[e.OracleRespondTx=24]="OracleRespondTx",e[e.OracleExtendTx=25]="OracleExtendTx",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.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.ChannelSnapshotSoloTx=59]="ChannelSnapshotSoloTx",e[e.GaAttachTx=80]="GaAttachTx",e[e.GaMetaTx=81]="GaMetaTx",e[e.PayingForTx=82]="PayingForTx",e}({});var ea=n(8287).Buffer;function ta(e,t){return Ar(qr(ea.from([...Cr(e),...Vr(t)])),ur.ContractAddress)}function na(e,t,n){return Ar(qr(ea.from([...Cr(e),...function(e){const t=Vr(e,!0);return Xn([ea.alloc(32-t.length),t])}(t),...Cr(n)])),ur.OracleQueryId)}const ra=".chain";function aa(e){const[t,n,...r]=e.split(".");if(0!==r.length)throw new j("aens name","including only one dot",e);if(n!==ra.slice(1))throw new j("aens name",`suffixed with ${ra}`,e);if(/\p{Emoji_Presentation}/u.test(t))throw new j("aens name","not containing emoji",e);if("-"===t[2]&&"-"===t[3])throw new j("aens name",'without "-" char in both the third and fourth positions',e);if("-"===t[0])throw new j("aens name",'starting with no "-" char',e);if("-"===t.at(-1))throw new j("aens name",'ending with no "-" char',e);let a;try{const r=new URL(`http://${t}.${n}`);if(r.username+r.password+r.port+r.search+r.hash!==""||"/"!==r.pathname)throw new j("aens name","valid",e);a=r.host}catch(t){if(t instanceof TypeError&&t.message.includes("Invalid URL"))throw new j("aens name","valid",e);throw t}if(!/^[a-z0-9.-]+$/i.test(a))throw new j("aens name","without illegal chars",e);if(a.length>63+ra.length)throw new j("aens name","not too long",e);return a}function ia(e){return Ar(qr(aa(e)),ur.Name)}function sa(e,t=Ir()){return Ar(qr(Xn([ea.from(aa(e)),ea.from(t.toString(16).padStart(64,"0"),"hex")])),ur.Commitment)}function oa(e=ea.from([])){return BigInt("0x"+ea.from(e).toString("hex")).toString()}function ca(e){aa(e)}function ua(e){try{return ca(e),!0}catch(e){return!1}}const la=[[ur.AccountAddress,"account_pubkey"],[ur.OracleAddress,"oracle_pubkey"],[ur.ContractAddress,"contract_pubkey"],[ur.Channel,"channel"]];function ma(e){Cr(e);const t=e.substring(0,2),n=la.find((([e])=>e===t))?.[1];if(null!=n)return n;throw new j("identifier",`prefixed with one of ${la.map((([e])=>`${e}_`)).join(", ")}`,e)}function pa(e){const t=aa(e).length-ra.length;return Kr[Math.min(t,Wr)]}function da(e,{startFee:t,increment:n=Fr}={}){if(Number(n)!==n||n%1==0)throw new je(`Increment must be float. Current increment ${n}`);if(n<Fr)throw new je(`minimum increment percentage is ${Fr}`);return M(new I(null!=t?t:pa(e)).times(new I(Fr).plus(1)))}function ha(e,t){var n,r,a;const i=aa(e).length-ra.length;return(null!==(n=null!==(r=null!==(a=i<=4?2400:null)&&void 0!==a?a:i<=8?960:null)&&void 0!==r?r:i<=12?480:null)&&void 0!==n?n:0)+t}function fa(e){return aa(e).length<13+ra.length}async function ya(e,t){return Math.floor(await async function(e,{_expectedMineRate:t,_microBlockCycle:n,onNode:r}){if(null!=t&&"key-block"===e)return t;if(null!=n&&"micro-block"===e)return n;const a=await r.getNetworkId();return"ae_dev"===a?0:!["ae_mainnet","ae_uat"].includes(a)&&await r._isHyperchain()?3e3:"key-block"===e?18e4:3e3}(e,t)/3)}const ga=new WeakMap;async function Na({cached:e=!1,...t}){const n=ir(t.onNode);if(e){const e=ga.get(n);if(null!=e&&e.time>Date.now()-await ya("key-block",t))return e.height}const{height:r}=await n.getCurrentKeyBlockHeight();return ga.set(n,{height:r,time:Date.now()}),r}async function wa(e,{blocks:t=5,interval:n,...r}){let a;null!=n||(n=await ya("micro-block",r));do{const i=await r.onNode.getTransactionByHash(e);if(-1!==i.blockHeight)return i;null==a&&(a=0!==i.tx.ttl?-1:await Na({...r,cached:!0})+t),await Qn(n)}while(-1===a||await Na({...r,cached:!0})<a);throw new Q(t,e)}async function va(e,{interval:t,...n}){let r;null!=t||(t=Math.min(await ya("key-block",n),5e3));do{null!=r&&await Qn(t),r=await Na(n)}while(r<e);return r}async function ba(e,{confirm:t=3,onNode:n,...r}){const{blockHeight:a}=await n.getTransactionByHash(e),i=await va(a+t,{onNode:n,...r}),{blockHeight:s}=await n.getTransactionByHash(e);switch(s){case-1:throw new Ke(e);case a:return i;default:return ba(e,{onNode:n,confirm:t,...r})}}async function xa(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 _a(e,{format:t=Xe.AETTOS,...n}){const r=e.startsWith("ok_")?Ar(Cr(e),ur.AccountAddress):e,{balance:a}=await xa(r,n).catch((e=>{if(!nr(e))throw e;return{balance:0n}}));return tt(a,{targetDenomination:t})}async function Pa({onNode:e}){return e.getCurrentGeneration()}async function Ca(e,{onNode:t}){return"number"==typeof e?t.getGenerationByHeight(e):t.getGenerationByHash(e)}async function Aa(e,{onNode:t}){return(await t.getMicroBlockTransactionsByHash(e)).transactions}async function Sa(e,{onNode:t}){return"number"==typeof e?t.getKeyBlockByHeight(e):t.getKeyBlockByHash(e)}async function Ta(e,{onNode:t}){return t.getMicroBlockHeaderByHash(e)}const za=new Map;async function Ea(e,t){const n=za.get(e);if(za.delete(e),null==n)throw new ae("Can't get dry-run request");let r;try{const e="number"==typeof n[0].top?(await t.getKeyBlockByHeight(n[0].top)).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:Dr.amount})))})}catch(e){return void n.forEach((({reject:t})=>t(e)))}const{results:a,txEvents:i}=r;a.forEach((({result:e,reason:t,...r},a)=>{const{resolve:s,reject:o,tx:c,accountAddress:u}=n[a];"ok"===e?s({...r,txEvents:i}):o(Object.assign(new Le(t),{tx:c,accountAddress:u}))}))}async function Ia(e,t,{top:n,txEvents:r,combine:a,onNode:i}){var s;const o=!0===a?[n,r].join():"immediate",c=null!==(s=za.get(o))&&void 0!==s?s:[];return za.set(o,c),new Promise(((s,u)=>{var l;c.push({tx:e,accountAddress:t,top:n,txEvents:r,resolve:s,reject:u}),!0===a?null!==(l=c.timeout)&&void 0!==l||(c.timeout=setTimeout((()=>{Ea(o,i)}))):Ea(o,i)}))}async function Ma(e,{onNode:t}){return t.getContractCode(e)}async function qa(e,{onNode:t}){return t.getContract(e)}async function Ra(e,{onNode:t}){return t.getNameEntryByName(e)}async function Oa(e,t,{verify:n=!0,resolveByNode:r=!1,onNode:a}){if(ua(e)){if(n||r){const n=(await a.getNameEntryByName(e)).pointers.find((e=>e.key===t));if(null==n)throw new oe(e,t);if(r)return n.id}return ia(e)}try{return Cr(e),e}catch(t){throw new ue(`Invalid name or address: ${e}`)}}var ka=n(8287).Buffer;const Ba={[Yr.Ceres]:{"contract-create":{vmVersion:[Qr.Fate3],abiVersion:[Zr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Zr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Zr.NoAbi,Zr.Fate]}},[Yr.Arcus]:{"contract-create":{vmVersion:[Qr.Fate3],abiVersion:[Zr.Fate]},"contract-call":{vmVersion:[],abiVersion:[Zr.Fate]},"oracle-call":{vmVersion:[],abiVersion:[Zr.NoAbi,Zr.Fate]}}};function Ga(e,t){var n;const r=Ba[e][t];return{vmVersion:null!==(n=r.vmVersion[0])&&void 0!==n?n:Qr.Fate2,abiVersion:r.abiVersion[0]}}function $a(e){const[t,...n]=Object.keys(Ba).map((t=>Ga(+t,e)));return n.every((({vmVersion:e,abiVersion:n})=>e===t.vmVersion&&n===t.abiVersion))}var Ua={serialize(e,t,{consensusProtocolVersion:n=Yr.Ceres}){return null!=e||(e=Ga(n,"contract-create")),ka.from([e.vmVersion,0,e.abiVersion])},async prepare(e,t,n){return null!=e?e:null!=n.consensusProtocolVersion||$a("contract-create")?void 0:null!=n.onNode?Ga((await n.onNode.getNodeInfo()).consensusProtocolVersion,"contract-create"):void 0},deserialize(e){const[t,,n]=e;return{vmVersion:+t,abiVersion:+n}}};const Va=Symbol("serializeAsIs");var Da=n(8287).Buffer;function La(e){return Xr.ContractCallTx===e||Xr.GaMetaTx===e?"contract-call":"oracle-call"}var ja={_getProtocolDetails(e,t){return Ga(e,La(t)).abiVersion},serialize(e,{tag:t},{consensusProtocolVersion:n=Yr.Ceres}){const r=null!=e?e:this._getProtocolDetails(n,t);return Da.from([r])},async prepare(e,{tag:t},n){return null!=e?e:null!=n.consensusProtocolVersion||$a(La(t))?void 0:null!=n.onNode?this._getProtocolDetails((await n.onNode.getNodeInfo()).consensusProtocolVersion,t):void 0},deserialize(e){return e[0]}},Ha=n(8287).Buffer;const Fa=[ur.AccountAddress,ur.Name,ur.Commitment,ur.OracleAddress,ur.ContractAddress,ur.Channel];function Ja(...e){return{serialize(t){const n=t.slice(0,2);if(!tr(n,Fa))throw new We(n);if(!tr(n,e))throw new j("Address encoding",e.join(", "),n);const r=Fa.indexOf(n)+1;return Ha.from([...Vr(r),...Cr(t)])},deserialize(t){const n=Ha.from(t).readUIntBE(0,1),r=Fa[n-1];if(null==r)throw new Fe(n);if(!tr(r,e))throw new j("Address encoding",e.join(", "),r);return Ar(t.subarray(1),r)}}}function Wa(e){return{serialize(t,n){return t.map((t=>e.serialize(t,n)))},deserialize(t,n){return t.map((t=>e.deserialize(t,n)))}}}var Ka={serialize(e){if(Number(e)<0)throw new j("value","greater or equal to 0",e);return Vr(e,!0)},deserialize(e){return oa(e)}},Ya={...Ka,serializeAettos(e,t,n){return null!=e?e:"0"},serialize(e,t,{denomination:n=Xe.AETTOS,...r}){return Ka.serialize(this.serializeAettos(null!=e?tt(e,{denomination:n}):e,t,r))}},Qa=n(8287).Buffer;function Za(e,t){return{serialize(e){if(null==e){if(!0===t)return Qa.from([]);throw new j("Encoded data","provided",e)}return Cr(e)},deserialize(t){return Ar(t,e)}}}var Xa=n(8287).Buffer;function ei(e){return{serialize(t,{packEntry:n}){return ArrayBuffer.isView(t)?Xa.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(n({...t,...null!=e&&{tag:e}}))},deserialize(t,{unpackEntry:n}){return n(Ar(t,ur.Bytearray),e)}}}var ti=n(8287).Buffer;function ni(e){const t=Object.values(e).filter((e=>"number"==typeof e));return{serialize(e){if("number"!=typeof e)throw new j("value","to be a number",e);if(e>255)throw new j("value","to be less than 256",e);if(!tr(e,t))throw new j("value","to be a value of Enum",e);return ti.from([e])},deserialize(e){if(1!==e.length)throw new j("buffer","to have single element",e.length);const n=e[0];if(!tr(n,t))throw new j("value","to be a value of Enum",n);return n}}}const ri=15e3,ai={part:32e3,whole:Math.floor(175200)};function ii(e){return Object.values(e.contractTxBaseGas).forEach(Object.freeze),Object.values(e.stateGasPerBlock).forEach(Object.freeze),Object.freeze(e.txBaseGas),Object.freeze(e.contractTxBaseGas),Object.freeze(e.stateGasPerBlock),Object.freeze(e)}const si=ii({minGasPrice:BigInt(jr),minMinerGasPrice:BigInt(jr),gasPerByte:20,blockGasLimit:6e6,maxAuthFunGas:Lr,txBaseGas:{...Object.fromEntries(Object.values(Xr).filter((e=>"number"==typeof e)).filter((e=>![Xr.SignedTx,Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(e))).map((e=>[e,ri]))),[Xr.ChannelForceProgressTx]:30*ri,[Xr.ChannelOffChainTx]:0,[Xr.PayingForTx]:ri/5},contractTxBaseGas:{[Xr.ContractCreateTx]:{[Zr.Sophia]:5*ri,[Zr.Fate]:5*ri},[Xr.ContractCallTx]:{[Zr.Sophia]:30*ri,[Zr.Fate]:12*ri},[Xr.GaAttachTx]:{[Zr.Sophia]:5*ri,[Zr.Fate]:5*ri},[Xr.GaMetaTx]:{[Zr.Sophia]:5*ri,[Zr.Fate]:5*ri}},stateGasPerBlock:Object.fromEntries([Xr.OracleRegisterTx,Xr.OracleExtendTx,Xr.OracleQueryTx,Xr.OracleRespondTx].map((e=>[e,{...ai}])))}),oi={GAAttachTx:Xr.GaAttachTx,GAMetaTx:Xr.GaMetaTx};function ci(e){const t=t=>Object.prototype.hasOwnProperty.call(t,e);if(t(oi)&&er(e,oi))return oi[e];if(!t(Xr)||!er(e,Xr))return;const n=Xr[e];return"number"==typeof n?n:void 0}const ui=1e3;function li(e,t,n){return new V(`Node reports ${e} as ${String(t)}, which is outside of the range the SDK considers plausible (0..${n}). Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`)}function mi(e,t){return new ae(`Node reports ${e} as ${String(t)}, which doesn't match the schema it declares for it`)}function pi(e,t,n){const r=e=>0===n?1:e/n,a=n*ui;if("bigint"==typeof t){if(t<0n||t>BigInt(a))throw li(e,t,a);return r(Number(t))}if(!Number.isSafeInteger(t))throw mi(e,t);if(t<0||t>a)throw li(e,t,a);return r(t)}function di(e){return e.reduce(((e,t)=>t>e?t:e),-1/0)}const hi=new WeakMap,fi=new WeakSet;function yi(e,t){if(!Number.isSafeInteger(t)||t<0)throw new j(`protocolParameters.${e}`,"a non-negative safe integer",t)}function gi(e){if(!hi.has(e)&&!fi.has(e)){if("bigint"!=typeof e.minGasPrice||e.minGasPrice<1n)throw new j("protocolParameters.minGasPrice","a positive bigint (a transaction can’t be priced against 0)",e.minGasPrice);if("bigint"!=typeof e.minMinerGasPrice||e.minMinerGasPrice<0n)throw new j("protocolParameters.minMinerGasPrice","a non-negative bigint",e.minMinerGasPrice);yi("gasPerByte",e.gasPerByte),yi("blockGasLimit",e.blockGasLimit),yi("maxAuthFunGas",e.maxAuthFunGas),Object.entries(e.txBaseGas).forEach((([e,t])=>{var n;return yi(`txBaseGas.${null!==(n=Xr[+e])&&void 0!==n?n:e}`,t)})),Object.entries(e.contractTxBaseGas).forEach((([e,t])=>Object.entries(null!=t?t:{}).forEach((([t,n])=>{var r;return yi(`contractTxBaseGas.${null!==(r=Xr[+e])&&void 0!==r?r:e}.${t}`,n)})))),Object.entries(e.stateGasPerBlock).forEach((([e,t])=>{var n,r;const a=`stateGasPerBlock.${null!==(n=Xr[+e])&&void 0!==n?n:e}`;if(yi(`${a}.part`,t?.part),!Number.isSafeInteger(t?.whole)||(null!==(r=t?.whole)&&void 0!==r?r:0)<1)throw new j(`${a}.whole`,"a positive safe integer",t?.whole)})),fi.add(e)}}function Ni(e){var t;const n=si,r=[n.txBaseGas[e],...Object.values(null!==(t=n.contractTxBaseGas[e])&&void 0!==t?t:{})].filter((e=>null!=e)),a=0!==r.length?di(r):ri;return 0!==a?a:ri}function wi(e,t){if(!(t<=ui))throw new V(`Node reports parameters raising ${e} ${Math.round(t)} times above the one of the SDK release, more than the ${ui} times the SDK considers plausible. Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`)}function vi(e){const{minGasPrice:t,minMinerGasPrice:n}=e;return n>t?n:t}function bi(e,t){return Object.fromEntries(e.map((([e,n])=>[ci(e),t(n)])).filter((e=>null!=e[0])))}const xi=new WeakMap,_i=6e5,Pi=3e4;async function Ci(e){const t=ir(e),n=xi.get(t);if(null!=n&&n.expiresAt>Date.now())return n.parameters;let r=_i;const a=(async()=>{const e=e=>(r=Pi,console.warn(`Can't get protocol parameters from node, using the ones of the SDK release instead. A transaction may be rejected if this node runs other parameters. Reason: ${e instanceof Error?e.message:String(e)}`),si);if("function"!=typeof t.getProtocolParameters||"function"!=typeof t.getNodeSettings)return si;const n={requestOptions:{customHeaders:{"__no-retry":"true"}}};let a,i;try{[a,i]=await Promise.all([t.getProtocolParameters(n),t.getNodeSettings(n)])}catch(t){const{statusCode:n}=t;return 404===n||403===n?si:e(t)}try{return function(e,t){const{currentProtocolVersion:n,protocols:r}=e,a=r.find((({version:e})=>e===n));if(null==a)throw new ae(`Node doesn't provide parameters of the current protocol ${n}`);const i=Object.fromEntries(Object.entries(si.contractTxBaseGas).map((([e,t])=>[e,{...t}])));a.contractTxBaseGas.forEach((({txType:e,abiVersion:t,txBaseGas:n})=>{var r;const a=ci(e);null!=a&&Number.isInteger(t)&&((null!==(r=i[a])&&void 0!==r?r:i[a]={})[t]=n)}));const s=bi(Object.entries(a.txBaseGas),(e=>e)),o=ii({minGasPrice:a.minimumGasPrice,minMinerGasPrice:t.minMinerGasPrice,gasPerByte:a.gasPerByte,blockGasLimit:t.blockGasLimit,maxAuthFunGas:t.maxAuthFunGas,txBaseGas:{...si.txBaseGas,...s},contractTxBaseGas:i,stateGasPerBlock:{...si.stateGasPerBlock,...bi(Object.entries(a.stateGasPerBlock),(e=>({part:e.part,whole:e.whole})))}});return hi.set(o,function(e){const t=si,n=Number(t.minGasPrice);if(e.minGasPrice<1n)throw new V(`Node reports the minimum gas price as ${e.minGasPrice}, a transaction can't be priced against it. Provide \`protocolParameters\` in options to build a transaction against these parameters anyway.`);const r=di([pi("the minimum gas price",e.minGasPrice,n),pi("the miner minimum gas price",e.minMinerGasPrice,n)]),a=[pi("the gas per byte",e.gasPerByte,t.gasPerByte)];Object.entries(e.txBaseGas).forEach((([e,t])=>{a.push(pi(`the base gas of ${Xr[+e]}`,t,Ni(+e)))})),Object.entries(e.contractTxBaseGas).forEach((([e,n])=>{Object.entries(n).forEach((([n,r])=>{const i=`the base gas of ${Xr[+e]} at abi version ${n}`,s=t.contractTxBaseGas[+e]?.[+n];a.push(pi(i,r,null!=s?s:Ni(+e)))}))}));const i=ai.part/ai.whole;Object.entries(e.stateGasPerBlock).forEach((([e,t])=>{const n=`the state gas per block of ${Xr[+e]}`;a.push(function(e,{part:t,whole:n},r){if(!Number.isSafeInteger(t)||!Number.isSafeInteger(n))throw mi(e,`${String(t)}/${String(n)}`);const a=r*ui,i=t>=0&&n>0?t/n:NaN;if(!(i>=0)||i>a)throw li(e,`${t}/${n}`,a);return i/r}(n,t,i))}));const s=di(a);wi("the minimum transaction fee",r*s);const o=pi("the block gas limit",e.blockGasLimit,t.blockGasLimit),c=pi("the max auth fun gas",e.maxAuthFunGas,t.maxAuthFunGas);return wi("the cost of a contract transaction",r*di([o,c])),{fee:di([1,s]),blockGasLimit:di([1,o]),maxAuthFunGas:di([1,c])}}(o)),o}(a,i)}catch(t){if(t instanceof V)throw t;return e(t)}})(),i={expiresAt:Date.now()+_i,parameters:a};return a.then((()=>{i.expiresAt=Date.now()+r}),(()=>{i.expiresAt=Date.now()+Pi})),xi.set(t,i),a}const Ai=new WeakMap,Si=100000n*si.minGasPrice;async function Ti(e,t){const n=ir(e),r=function(e){const t=Ai.get(e);if(null!=t&&t.time>Date.now()-2e4)return t;const n=(async()=>{const{minGasPrice:t,utilization:n}=(await e.getRecentGasPrices())[0],r=n<70?0n:BigInt(new I(t.toString()).times(1.01).integerValue().toFixed());return r<=Si?r:(console.warn(`Estimated gas price ${r} exceeds the maximum safe value for unknown reason. It will be limited to ${Si}. To overcome this restriction provide \`gasPrice\`/\`fee\` in options.`),Si)})(),r={gasPrice:n,time:Date.now()};return Ai.set(e,r),n.then((()=>{r.time=Date.now()}),(()=>{Ai.get(e)===r&&Ai.delete(e)})),r}(n),[a,i]=await Promise.all([null!=t?t:Ci(n),r.gasPrice]);let s=i;const o=vi(a);o>a.minGasPrice&&s<o&&(s=o);const c=BigInt(Math.ceil(1e3*function(e){var t;return null!==(t=hi.get(e)?.fee)&&void 0!==t?t:1}(a))),u=1000n*Si/c;return s>u&&(c>1000n&&!0!==r.ceilingWarned&&(r.ceilingWarned=!0,console.warn(`Estimated gas price ${s} exceeds the maximum safe value ${u} for the protocol parameters node reports. It will be limited to it, so the transaction may be not mined while the demand stays above it. To overcome this restriction provide \`gasPrice\`/\`fee\`, or \`protocolParameters\` in options.`)),s=u),s}var zi={...Ya,async prepare(e,t,{onNode:n,denomination:r,protocolParameters:a}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `gasPrice` instead)",n);const i=await Ti(n,a);return 0n!==i?tt(i,{targetDenomination:r}):void 0},serializeAettos(e,t,{protocolParameters:n=si}){const r=vi(n).toString();if(null==e)return r;if(!0===t[Va])return e;if(new I(e).lt(r))throw new H(`Gas price ${e} must be bigger than ${r}`);return e}};function Ei(e){const t={[Xr.OracleRegisterTx]:"oracleTtlValue",[Xr.OracleExtendTx]:"oracleTtlValue",[Xr.OracleQueryTx]:"queryTtlValue",[Xr.OracleRespondTx]:"responseTtlValue"},{tag:n}=e;return er(n,t)?e[t[n]]:1}function Ii(e,t,n,r){const{length:a}=Cr(e),i=t(e);let s=0;return i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s=Cr(n({...i.tx.encodedTx,[Va]:!0})).length),function(e,t){const{tag:n}=e,r=t.contractTxBaseGas[n];if(null!=r){var a;const t=null!==(a=e.ctVersion?.abiVersion)&&void 0!==a?a:e.abiVersion,n=Object.prototype.hasOwnProperty.call(r,t)?r[t]:void 0;if(null!=n)return n;const i=Object.values(r);if(0!==i.length)return di(i)}const i=t.txBaseGas[n];if(null==i)throw new ae(`Base gas of ${Xr[n]} is not known`);return i}(i,r)+function(e,t,{relativeTtl:n,innerTxSize:r},a){const{gasPerByte:i}=a,s=(e===Xr.GaMetaTx||e===Xr.PayingForTx?t-r:t)*i,o=a.stateGasPerBlock[e];return null==o?s:s+Math.ceil(o.part*n/o.whole)}(i.tag,a,{relativeTtl:Ei(i),innerTxSize:s},r)}const Mi="_gas-price:";var qi={...Ya,async prepare(e,t,{onNode:n,protocolParameters:r}){if(null!=e)return e;if(null==n)throw new j("onNode","provided (or provide `fee` instead)",n);const a=await Ti(n,r);return 0n!==a?Mi+a:void 0},serializeAettos(e,t,{_canIncreaseFee:n,protocolParameters:r=si}){const{rebuildTx:a,unpackTx:i,buildTx:s,_computingMinFee:o}=t;if(null!=o)return o.toFixed();if(!0===t[Va]&&null!=e)return new I(e).toFixed();const c=function(e,t,n,r){const a=new I(vi(r).toString());let i,s=new I(0);do{i=s,s=a.times(Ii(e(s),t,n,r))}while(!s.eq(i));return s}((e=>a({_computingMinFee:e})),i,s,r),u=!0===e?.startsWith(Mi)?c.dividedBy(vi(r).toString()).times(e.replace(Mi,"")):new I(null!=e?e:c);if(c.gt(u)){if(!0===n)return c.toFixed();throw new H(`Fee ${u.toString()} must be bigger than ${c}`)}return u.toFixed()},serialize(e,t,n){return"string"==typeof e&&e.startsWith(Mi)?Ka.serialize(this.serializeAettos(e,t,n)):Ya.serialize.call(this,e,t,n)}},Ri={serialize(e){return Ka.serialize(e)},deserialize(e){return+Ka.deserialize(e)}},Oi={...Ri,serialize(e,t,{gasMax:n,protocolParameters:r=si}){const{tag:a,rebuildTx:i,unpackTx:s,buildTx:o,_computingGasLimit:c}=t;if(null!=c)return Ri.serialize(c);if(!0===t[Va]&&null!=e)return Ri.serialize(e);const u=a===Xr.GaMetaTx?r.maxAuthFunGas:function(e,t,n,r,a){return e-+Ii(t(e),n,r,a)}(null!=n?n:r.blockGasLimit,(e=>i({_computingGasLimit:e,_canIncreaseFee:!0})),s,o,r),l=null!=n&&a!==Xr.GaMetaTx?1:function(e,t){const n=hi.get(e);return null==n?1:t===Xr.GaMetaTx?n.maxAuthFunGas:n.blockGasLimit}(r,a),m=null!=e?e:l>1?Math.floor(u/l):u;if(m>u)throw new H(`Gas limit ${m} must be less or equal to ${u}`);return Ri.serialize(m)}},ki=n(8287).Buffer,Bi={serialize(e){return ki.from(e)},deserialize(e){return e.toString()}},Gi={serialize(e){return Bi.serialize(e)},deserialize(e){return Bi.deserialize(e)}},$i={...Ya,serializeAettos(e,t){if(!0===t[Va]&&null!=e)return new I(e).toFixed();const n=pa(t.name),r=new I(null!=e?e:n);if(n.gt(r))throw new ce(r,n);return r.toFixed()},serialize(e,t,n){return Ya.serialize.call(this,e,t,n)}};const Ui=Ja(ur.Name);var Vi={...Ui,serialize(e){return Ui.serialize(ua(e)?ia(e):e)}};function Di(e){return{...Ri,serialize(e,{tag:t}){if(Xr.GaAttachTx===t&&1!==e)throw new j("nonce","equal 1 if GaAttachTx",e);return Ri.serialize(e)},async prepare(t,n,r){if(null!=t)return t;const{onNode:a,strategy:i}=r,s=r[e],o="provided (or provide `nonce` instead)";if(null==a)throw new j("onNode",o,a);if(null==s)throw new j("senderId",o,s);return(await a.getAccountNextNonce(s.replace(/^ok_/,"ak_"),{strategy:i}).catch((e=>{if(!nr(e))throw e;return{nextNonce:1}}))).nextNonce},senderKey:e}}var Li=n(8287).Buffer;const ji=Li.from([1]),Hi=Li.from([2]),Fi=Ja(...Fa);var Ji=e=>({serialize(t,n){if(!0!==n[Va]&&t.length>32)throw new H(`Expected 32 pointers or less, got ${t.length} instead`);return t.map((({key:t,id:n})=>{let r;if(Er(n,...Fa)&&(r=[...e?[ji]:[],Fi.serialize(n)]),Er(n,ur.Bytearray)){const e=Cr(n);if(e.length>1024)throw new j("Raw pointer","shorter than 1025 bytes",`${e.length} bytes`);r=[Hi,e]}if(null==r)throw new Ve(`Unknown AENS pointer value: ${n}`);return[Vr(t),Li.concat(r)]}))},deserialize(t){return t.map((([t,n])=>{if(!e)return{key:t.toString(),id:Fi.deserialize(n)};const r=n.subarray(0,1),a=n.subarray(1);let i;if(r.equals(ji)&&(i=Fi.deserialize(a)),r.equals(Hi)&&(i=Ar(a,ur.Bytearray)),null==i)throw new Ve(`Unknown AENS pointer tag: ${r}`);return{key:t.toString(),id:i}}))}}),Wi={...Ya,async prepare(e,t,n){if(null!=e)return e;const{onNode:r,oracleId:a}=n,i="provided (or provide `queryFee` instead)";if(null==r)throw new j("onNode",i,r);if(null==a)throw new j("oracleId",i,a);return(await r.getOracleByPubkey(a)).queryFee.toString()}},Ki=n(8287).Buffer,Yi={serialize(e){return Ki.from(e)},deserialize(e){return e}};function Qi(e,t){return{serialize(n){if((!0!==t||null!=n)&&n!==e)throw new j("ShortUIntConst",e,n);return Ri.serialize(e)},deserialize(t){const n=Ri.deserialize(t);if(n!==e)throw new j("ShortUIntConst",e,n);return e},constValue:e,constValueOptional:!0===t}}var Zi={serialize(e){return Vr(e)},deserialize(e){return e.toString()}},Xi=n(8287).Buffer;function es(e){return{nestedTransaction:!0,serialize(t,n){const{buildTx:r,protocolParameters:a}=n;return ArrayBuffer.isView(t)?Xi.from(t):"string"==typeof t&&t.startsWith("tx_")?Cr(t):Cr(r({...t,...null!=e&&{tag:e},...null!=a&&{protocolParameters:a},...!0===n[Va]&&{[Va]:!0}}))},deserialize(t,{unpackTx:n}){return n(Ar(t,ur.Transaction),e)}}}var ts={...Ri,serialize(e){return Ri.serialize(null!=e?e:0)},async prepare(e,t,{onNode:n,absoluteTtl:r,...a}){if(!0!==r&&0!==e&&null!=e){if(null==n)throw new j("onNode","provided",n);e+=await Na({...a,onNode:n,cached:!0})}return e}};function ns(e,t){return{...t,serialize(n,r){return t.serialize(null!=n?n:e,r)}}}function rs(e,t){return{...t,serialize(n,r,a){return t.serialize(e(n,r),r,a)}}}let as=function(e){return e[e.Ok=0]="Ok",e[e.Error=1]="Error",e[e.Revert=2]="Revert",e}({}),is=function(e){return e[e.Account=10]="Account",e[e.Oracle=20]="Oracle",e[e.Name=30]="Name",e[e.Contract=40]="Contract",e[e.ContractCall=41]="ContractCall",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.Channel=58]="Channel",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.GaMetaTxAuthData=810]="GaMetaTxAuthData",e}({}),ss=function(e){return e[e.delta=0]="delta",e[e.block=1]="block",e}({});const os=es(),cs=es(Xr.SignedTx),us=ei(is.TreesPoi),ls=ns(3600,Ri),ms=rs(((e,t)=>{const n=18e4;if(null!=e||(e=n),!0===t[Va])return e;if(e>=1&&e<=n)return e;throw new j("nameTtl","a number between 1 and 180000 blocks",e)}),Ri),ps=[{tag:Qi(Xr.SignedTx),version:Qi(1,!0),signatures:Wa(Yi),encodedTx:os},{tag:Qi(Xr.SpendTx),version:Qi(1,!0),senderId:Ja(ur.AccountAddress),recipientId:Ja(ur.AccountAddress,ur.ContractAddress,ur.Name),amount:Ya,fee:qi,ttl:ts,nonce:Di("senderId"),payload:Za(ur.Bytearray,!0)},{tag:Qi(Xr.NamePreclaimTx),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),commitmentId:Ja(ur.Commitment),fee:qi,ttl:ts},{tag:Qi(Xr.NameClaimTx),version:Qi(2,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),name:Gi,nameSalt:ns(0,Ka),nameFee:$i,fee:qi,ttl:ts},{tag:Qi(Xr.NameUpdateTx),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),nameId:Vi,nameTtl:ms,pointers:Ji(!1),clientTtl:ls,fee:qi,ttl:ts},{tag:Qi(Xr.NameUpdateTx),version:Qi(2),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),nameId:Vi,nameTtl:ms,pointers:Ji(!0),clientTtl:ls,fee:qi,ttl:ts},{tag:Qi(Xr.NameTransferTx),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),nameId:Vi,recipientId:Ja(ur.AccountAddress,ur.Name),fee:qi,ttl:ts},{tag:Qi(Xr.NameRevokeTx),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),nameId:Vi,fee:qi,ttl:ts},{tag:Qi(Xr.ContractCreateTx),version:Qi(1,!0),ownerId:Ja(ur.AccountAddress),nonce:Di("ownerId"),code:Za(ur.ContractBytearray),ctVersion:Ua,fee:qi,ttl:ts,deposit:rs(((e=0)=>{if(0==+e)return e;throw new j("deposit","equal 0 (because is not refundable)",e)}),Ya),amount:Ya,gasLimit:Oi,gasPrice:zi,callData:Za(ur.ContractBytearray)},{tag:Qi(Xr.ContractCallTx),version:Qi(1,!0),callerId:Ja(ur.AccountAddress),nonce:Di("callerId"),contractId:Ja(ur.ContractAddress,ur.Name),abiVersion:ja,fee:qi,ttl:ts,amount:Ya,gasLimit:Oi,gasPrice:zi,callData:Za(ur.ContractBytearray)},{tag:Qi(Xr.OracleRegisterTx),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nonce:Di("accountId"),queryFormat:Zi,responseFormat:Zi,queryFee:Ya,oracleTtlType:ns(ss.delta,ni(ss)),oracleTtlValue:ns(500,Ri),fee:qi,ttl:ts,abiVersion:ja},{tag:Qi(Xr.OracleExtendTx),version:Qi(1,!0),oracleId:Ja(ur.OracleAddress,ur.Name),nonce:Di("oracleId"),oracleTtlType:ns(ss.delta,ni(ss)),oracleTtlValue:ns(500,Ri),fee:qi,ttl:ts},{tag:Qi(Xr.OracleQueryTx),version:Qi(1,!0),senderId:Ja(ur.AccountAddress),nonce:Di("senderId"),oracleId:Ja(ur.OracleAddress,ur.Name),query:Zi,queryFee:Wi,queryTtlType:ns(ss.delta,ni(ss)),queryTtlValue:ns(10,Ri),responseTtlType:ns(ss.delta,ni(ss)),responseTtlValue:ns(10,Ri),fee:qi,ttl:ts},{tag:Qi(Xr.OracleRespondTx),version:Qi(1,!0),oracleId:Ja(ur.OracleAddress),nonce:Di("oracleId"),queryId:Za(ur.OracleQueryId),response:Zi,responseTtlType:ns(ss.delta,ni(ss)),responseTtlValue:ns(10,Ri),fee:qi,ttl:ts},{tag:Qi(Xr.ChannelCreateTx),version:Qi(2,!0),initiator:Ja(ur.AccountAddress),initiatorAmount:Ka,responder:Ja(ur.AccountAddress),responderAmount:Ka,channelReserve:Ka,lockPeriod:Ka,ttl:ts,fee:qi,initiatorDelegateIds:Wa(Ja(...Fa)),responderDelegateIds:Wa(Ja(...Fa)),stateHash:Za(ur.State),nonce:Di("initiator")},{tag:Qi(Xr.ChannelCloseMutualTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),initiatorAmountFinal:Ka,responderAmountFinal:Ka,ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.ChannelCloseSoloTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),payload:Za(ur.Transaction),poi:us,ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.ChannelSlashTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),payload:Za(ur.Transaction),poi:us,ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.ChannelDepositTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),amount:Ka,ttl:ts,fee:qi,stateHash:Za(ur.State),round:Ri,nonce:Di("fromId")},{tag:Qi(Xr.ChannelWithdrawTx),version:Qi(1,!0),channelId:Ja(ur.Channel),toId:Ja(ur.AccountAddress),amount:Ka,ttl:ts,fee:qi,stateHash:Za(ur.State),round:Ri,nonce:Di("fromId")},{tag:Qi(Xr.ChannelSettleTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),initiatorAmountFinal:Ka,responderAmountFinal:Ka,ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.ChannelForceProgressTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),payload:Za(ur.Transaction),round:Ri,update:Za(ur.ContractBytearray),stateHash:Za(ur.State),offChainTrees:Za(ur.StateTrees),ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.ChannelOffChainTx),version:Qi(2,!0),channelId:Ja(ur.Channel),round:Ri,stateHash:Za(ur.State)},{tag:Qi(Xr.ChannelSnapshotSoloTx),version:Qi(1,!0),channelId:Ja(ur.Channel),fromId:Ja(ur.AccountAddress),payload:Za(ur.Transaction),ttl:ts,fee:qi,nonce:Di("fromId")},{tag:Qi(Xr.GaAttachTx),version:Qi(1,!0),ownerId:Ja(ur.AccountAddress),nonce:Di("ownerId"),code:Za(ur.ContractBytearray),authFun:Yi,ctVersion:Ua,fee:qi,ttl:ts,gasLimit:Oi,gasPrice:zi,callData:Za(ur.ContractBytearray)},{tag:Qi(Xr.GaMetaTx),version:Qi(2,!0),gaId:Ja(ur.AccountAddress),authData:Za(ur.ContractBytearray),abiVersion:ja,fee:qi,gasLimit:Oi,gasPrice:zi,tx:cs},{tag:Qi(Xr.PayingForTx),version:Qi(1,!0),payerId:Ja(ur.AccountAddress),nonce:Di("payerId"),fee:qi,tx:cs}];var ds=n(858),hs=n(8287).Buffer;function fs(e,t,n,r){const a=e.filter((e=>e.tag.constValue===n));if(0===a.length)throw new Je(`${t[n]} (${n})`,0);if(null==r){const e=a.find((e=>e.version.constValueOptional));if(null==e)throw new ae(`Can't find default schema of ${t[n]} (${n})`);r=e.version.constValue}const i=a.find((e=>e.version.constValue===r));if(null==i)throw new Je(`${t[n]} (${n})`,r);return Object.entries(i)}function ys(e,t,n,r,a){const i=fs(e,t,n.tag,n.version).map((([e,t])=>t.serialize(n[e],{...n,...r},n)));return Ar((0,ds.encode)(i),a)}function gs(e,t,n,r,a){const i=(0,ds.decode)(Cr(n));if(!ArrayBuffer.isView(i[0])||!ArrayBuffer.isView(i[1]))throw new Ve("Can't parse tag or version in provided RLP");const s=hs.from(i[0]).readUintBE(0,i[0].length),o=fs(e,t,s,hs.from(i[1]).readUintBE(0,i[1].length));if(null!=r&&r!==s)throw new Ve(`Expected ${t[r]} tag, got ${t[s]} instead`);if(i.length!==o.length)throw new j("RLP length",o.length,i.length);return Object.fromEntries(o.map((([e,t],n)=>[e,t.deserialize(i[n],a)])))}var Ns=n(8287).Buffer,ws={serialize(e){return Ns.from([e?1:0])},deserialize(e){return 1===e[0]}};function vs(e,t){return{serialize(e,{packEntry:n}){return Cr(n({tag:is.Mtree,values:Object.entries(e).map((([e,r])=>({tag:is.MtreeValue,key:Cr(e),value:Cr(n({...r,tag:t}))})))}))},deserialize(n,{unpackEntry:r}){const{values:a}=r(Ar(n,ur.Bytearray),is.Mtree);return Object.fromEntries(a.filter((({key:t})=>e!==ur.ContractAddress||32===t.length)).map((({key:n,value:a})=>[Ar(n,e),r(Ar(a,ur.Bytearray),t)])))},recursiveType:!0}}var bs,xs=n(8287).Buffer;function _s(e,t,n){Ps(e,t),t.set(e,n)}function Ps(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Cs(e,t,n){return e.set(Ss(e,t),n),n}function As(e,t){return e.get(Ss(e,t))}function Ss(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 Ts=function(e){return e[e.Branch=0]="Branch",e[e.Extension=1]="Extension",e[e.Leaf=2]="Leaf",e}(Ts||{}),zs=new WeakMap,Es=new WeakMap,Is=new WeakMap,Ms=new WeakMap,qs=new WeakMap,Rs=new WeakMap,Os=new WeakSet;class ks{get isComplete(){return As(Es,this)}constructor(e,t,n,r){var a;if(Ps(this,a=Os),a.add(this),_s(this,zs,void 0),_s(this,Es,!0),_s(this,Is,void 0),_s(this,Ms,void 0),_s(this,qs,void 0),_s(this,Rs,void 0),Cs(Ms,this,t),Cs(qs,this,n),Cs(Rs,this,r),Cs(zs,this,e[0].toString("hex")),Cs(Is,this,Object.fromEntries(e[1].map((e=>[e[0].toString("hex"),e[1]])))),null!=As(Is,this)[As(zs,this)])Object.entries(As(Is,this)).forEach((([e,t])=>{if(Bs.call(ks,t)!==e)throw new Oe;const{type:n}=Gs.call(ks,t);switch(n){case Ts.Branch:t.slice(0,16).filter((e=>e.length)).forEach((e=>{null==As(Is,this)[e.toString("hex")]&&Cs(Es,this,!1)}));break;case Ts.Extension:if(null==As(Is,this)[t[1].toString("hex")])throw new ke("Can't find a node by hash in extension node");break;case Ts.Leaf:break;default:throw new ae(`Unknown MPTree node type: ${n}`)}}));else{if(0!==Object.keys(As(Is,this)).length)throw new ke("Can't find a node by root hash");Cs(Es,this,!1)}}isEqual(e){return As(zs,this)===As(zs,e)}serialize(){return[xs.from(As(zs,this),"hex"),Object.entries(As(Is,this)).map((([e,t])=>[xs.from(e,"hex"),t]))]}get(e){const t=Ss(Os,this,$s).call(this,Cr(e).toString("hex"));return null==t?t:As(Rs,this).call(this,Ar(t,ur.Bytearray),As(qs,this))}toObject(){return Object.fromEntries(Ss(Os,this,Us).call(this).filter((([e])=>As(Ms,this)!==ur.ContractAddress||66!==e.length)).map((([e,t])=>[Ar(xs.from(e,"hex"),As(Ms,this)),As(Rs,this).call(this,Ar(t,ur.Bytearray),As(qs,this))])))}}function Bs(e){return xs.from(qr((0,ds.encode)(e))).toString("hex")}function Gs(e){switch(e.length){case 17:return{type:Ts.Branch,...0!==e[16].length&&{value:e[16]}};case 2:{const t=e[0][0]>>4;if(t>3)throw new Ge(t);const n=t<=1?Ts.Extension:Ts.Leaf,r=[0,2].includes(t)?2:1;return{type:n,...n===Ts.Leaf&&{value:e[1]},path:e[0].toString("hex").slice(r)}}default:throw new Be(e.length)}}function $s(e){let t=As(zs,this),n=e;for(;;){const e=As(Is,this)[t];if(null==e){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:r,value:a,path:i}=Gs.call(bs,e);switch(r){case Ts.Branch:if(0===n.length)return a;t=e[+`0x${n[0]}`].toString("hex"),n=n.substring(1);break;case Ts.Extension:if(n.substring(0,i?.length)!==i)return;t=e[1].toString("hex"),n=n.substring(i.length);break;case Ts.Leaf:if(i!==n)return;return a;default:throw new ae(`Unknown MPTree node type: ${r}`)}}}function Us(){const e=[],t=(n,r)=>{const a=As(Is,this)[n];if(null==a){if(!this.isComplete)return;throw new ae("Can't find node in complete tree")}const{type:i,value:s,path:o}=Gs.call(bs,a);switch(i){case Ts.Branch:a.slice(0,16).map(((e,t)=>[e,t])).filter((([e])=>e.length)).forEach((([e,n])=>t(e.toString("hex"),r+n.toString(16)))),null!=s&&e.push([r,s]);break;case Ts.Extension:t(a[1].toString("hex"),r+o);break;case Ts.Leaf:if(null==s)throw new ie;e.push([r+o,s]);break;default:throw new ae(`Unknown MPTree node type: ${i}`)}};return t(As(zs,this),""),e}function Vs(e,t){return{serialize(e){return e.serialize()},deserialize(n,{unpackEntry:r}){return new ks(n,e,t,r)}}}function Ds(e){return{serialize(t,{packEntry:n}){return Cr(n({tag:e,payload:t}))},deserialize(t,{unpackEntry:n}){return n(Ar(t,ur.Bytearray),e).payload},recursiveType:!0}}bs=ks;const Ls=Wa(ei(is.MtreeValue)),js=vs(ur.ContractAddress,is.Contract),Hs=vs(ur.AccountAddress,is.Account),Fs=vs(ur.Bytearray,is.ContractCall),Js=vs(ur.Channel,is.Channel),Ws=vs(ur.Name,is.Name),Ks=vs(ur.OracleAddress,is.Oracle),Ys=[{tag:Qi(is.Account),version:Qi(1),nonce:Ri,balance:Ka},{tag:Qi(is.Account),version:Qi(2,!0),flags:Ka,nonce:Ri,balance:Ka,gaContract:Ja(ur.ContractAddress,ur.Name),gaAuthFun:Za(ur.ContractBytearray)},{tag:Qi(is.Name),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),nameTtl:Ri,status:Yi,clientTtl:Ri,pointers:Ji},{tag:Qi(is.Contract),version:Qi(1,!0),owner:Ja(ur.AccountAddress),ctVersion:Ua,code:Za(ur.ContractBytearray),log:Za(ur.ContractBytearray),active:ws,referers:Wa(Ja(ur.AccountAddress)),deposit:Ya},{tag:Qi(is.ContractCall),version:Qi(2,!0),callerId:Ja(ur.AccountAddress),callerNonce:Ri,height:Ri,contractId:Ja(ur.ContractAddress),gasPrice:Ka,gasUsed:Ri,returnValue:Za(ur.ContractBytearray),returnType:ni(as),log:Wa(Yi)},{tag:Qi(is.Oracle),version:Qi(1,!0),accountId:Ja(ur.AccountAddress),queryFormat:Zi,responseFormat:Zi,queryFee:Ya,oracleTtlValue:Ri,abiVersion:ja},{tag:Qi(is.Channel),version:Qi(3,!0),initiator:Ja(ur.AccountAddress),responder:Ja(ur.AccountAddress),channelAmount:Ka,initiatorAmount:Ka,responderAmount:Ka,channelReserve:Ka,initiatorDelegateIds:Wa(Ja(...Fa)),responderDelegateIds:Wa(Ja(...Fa)),stateHash:Za(ur.State),round:Ri,soloRound:Ka,lockPeriod:Ka,lockedUntil:Ka,initiatorAuth:Za(ur.ContractBytearray),responderAuth:Za(ur.ContractBytearray)},{tag:Qi(is.ChannelOffChainUpdateTransfer),version:Qi(1,!0),from:Ja(ur.AccountAddress),to:Ja(ur.AccountAddress),amount:Ka},{tag:Qi(is.ChannelOffChainUpdateDeposit),version:Qi(1,!0),from:Ja(ur.AccountAddress),amount:Ka},{tag:Qi(is.ChannelOffChainUpdateWithdraw),version:Qi(1,!0),from:Ja(ur.AccountAddress),amount:Ka},{tag:Qi(is.ChannelOffChainUpdateCreateContract),version:Qi(1,!0),owner:Ja(ur.AccountAddress),ctVersion:Ua,code:Za(ur.ContractBytearray),deposit:Ka,callData:Za(ur.ContractBytearray)},{tag:Qi(is.ChannelOffChainUpdateCallContract),version:Qi(1,!0),caller:Ja(ur.AccountAddress),contract:Ja(ur.ContractAddress),abiVersion:ja,amount:Ka,callData:Za(ur.ContractBytearray),callStack:Yi,gasPrice:zi,gasLimit:Oi},{tag:Qi(is.TreesPoi),version:Qi(1,!0),accounts:Wa(Vs(ur.AccountAddress,is.Account)),calls:Wa(Vs(ur.Bytearray,is.ContractCall)),channels:Wa(Vs(ur.Channel,is.Channel)),contracts:Wa(Vs(ur.ContractAddress,is.Contract)),ns:Wa(Vs(ur.Name,is.Name)),oracles:Wa(Vs(ur.OracleAddress,is.Oracle))},{tag:Qi(is.StateTrees),version:Qi(0,!0),contracts:Ds(is.ContractsMtree),calls:Ds(is.CallsMtree),channels:Ds(is.ChannelsMtree),ns:Ds(is.NameserviceMtree),oracles:Ds(is.OraclesMtree),accounts:Ds(is.AccountsMtree)},{tag:Qi(is.Mtree),version:Qi(1,!0),values:Ls},{tag:Qi(is.MtreeValue),version:Qi(1,!0),key:Yi,value:Yi},{tag:Qi(is.ContractsMtree),version:Qi(1,!0),payload:js},{tag:Qi(is.CallsMtree),version:Qi(1,!0),payload:Fs},{tag:Qi(is.ChannelsMtree),version:Qi(1,!0),payload:Js},{tag:Qi(is.NameserviceMtree),version:Qi(1,!0),payload:Ws},{tag:Qi(is.OraclesMtree),version:Qi(1,!0),payload:Ks},{tag:Qi(is.AccountsMtree),version:Qi(1,!0),payload:Hs},{tag:Qi(is.GaMetaTxAuthData),version:Qi(1,!0),fee:Ya,gasPrice:zi,txHash:Za(ur.TxHash)}],Qs=[[is.CallsMtree,ur.CallStateTree],[is.StateTrees,ur.StateTrees],[is.TreesPoi,ur.Poi]];function Zs(e){var t;const{protocolParameters:n}=e;null!=n&&gi(n);const r=null!==(t=Qs.find((([t])=>t===e.tag))?.[1])&&void 0!==t?t:ur.Bytearray;return ys(Ys,is,e,{packEntry:Zs},r)}function Xs(e,t){return null!=t||(t=Qs.find((([,t])=>e.startsWith(t)))?.[0]),gs(Ys,is,e,t,{unpackEntry:Xs})}function eo(e,t){return fs(ps,Xr,e,t)}function to(e){const{protocolParameters:t}=e;return null!=t&&gi(t),ys(ps,Xr,e,{unpackTx:so,buildTx:to,rebuildTx:t=>to({...e,...t}),packEntry:Zs},ur.Transaction)}function no(e){return to({...e,[Va]:!0})}const ro=["fee","gasPrice","gasLimit"];function ao(e,t){return e.some((([e,n])=>{const r=t[e];if(ro.includes(e))return null==r;if(!0!==n.nestedTransaction)return!1;if(null==r||"string"==typeof r||ArrayBuffer.isView(r))return!1;const a=r;let i;try{i=eo(a.tag,a.version)}catch{return!0}return ao(i,a)}))}async function io(e){var t;const n={...e},{onNode:r}=n,a=n,i=eo(n.tag,n.version),s=null!=r?function(e){try{return ir(e)}catch{return}}(r):void 0,o=null!=s&&null==a.protocolParameters&&ao(i,n)?Ci(s):void 0;o?.catch((()=>{})),await Promise.all(i.map((async([e,t])=>{null!=t.prepare&&(n[e]=await t.prepare(n[e],n,n))})));const c=null!==(t=a.protocolParameters)&&void 0!==t?t:await o;return to({...n,...null!=c&&{protocolParameters:c}})}function so(e,t){return gs(ps,Xr,e,t,{unpackTx:so,unpackEntry:Xs})}function oo(e){return Ar(qr("string"==typeof e&&e.startsWith("tx_")?Cr(e):e),ur.TxHash)}function co(e){let t=so(e);if(Xr.SignedTx===t.tag&&(t=t.encodedTx),Xr.ContractCreateTx!==t.tag&&Xr.GaAttachTx!==t.tag)throw new j("contractTx","a contractCreateTx or gaAttach",t.tag);return ta(t.ownerId,t.nonce)}function uo(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function lo(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 mo="$",po="_",ho=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/,fo=/^[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 yo(e,t){var n,r;const a=e.parsedHeaders;if("HEAD"===e.request.method)return Object.assign(Object.assign({},a),{body:e.parsedBody});const i=t&&t.bodyMapper,s=Boolean(null==i?void 0:i.nullable),o=null==i?void 0:i.type.name;if("Stream"===o)return Object.assign(Object.assign({},a),{blobBody:e.blobBody,readableStreamBody:e.readableStreamBody});const c="Composite"===o&&i.type.modelProperties||{},u=Object.keys(c).some((e=>""===c[e].serializedName));if("Sequence"===o||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(a)for(const e of Object.keys(a))t[e]=a[e];return!s||e.parsedBody||a||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:a,hasNullableType:s,shouldWrapBody:(l=e.parsedBody,m=o,"Composite"!==m&&"Dictionary"!==m&&("string"==typeof l||"number"==typeof l||"boolean"==typeof l||null!==(null==m?void 0:m.match(/^(Date|DateTime|DateTimeRfc1123|UnixTime|ByteArray|Base64Url)$/i))||null==l))});var l,m}class go{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:a,InclusiveMaximum:i,InclusiveMinimum:s,MaxItems:o,MaxLength:c,MinItems:u,MinLength:l,MultipleOf:m,Pattern:p,UniqueItems:d}=e.constraints;if(void 0!==n&&t>=n&&r("ExclusiveMaximum",n),void 0!==a&&t<=a&&r("ExclusiveMinimum",a),void 0!==i&&t>i&&r("InclusiveMaximum",i),void 0!==s&&t<s&&r("InclusiveMinimum",s),void 0!==o&&t.length>o&&r("MaxItems",o),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!==m&&t%m!=0&&r("MultipleOf",m),p){const e="string"==typeof p?new RegExp(p):p;"string"==typeof t&&null!==t.match(e)||r("Pattern",p)}d&&t.some(((e,t,n)=>n.indexOf(e)!==t))&&r("UniqueItems",d)}}serialize(e,t,n,r={xml:{}}){var a,i,s;const o={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:po}};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:m}=e;if(l&&m&&void 0===t)throw new Error(`${n} cannot be undefined.`);if(l&&!m&&null==t)throw new Error(`${n} cannot be null or undefined.`);if(!l&&!1===m&&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,!fo.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 ho.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=uo(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){let t=e.length;for(;t-1>=0&&"="===e[t-1];)--t;return e.substr(0,t)}(uo(e)).replace(/\+/g,"-").replace(/\//g,"_")}}(t)}return t}(n,t):null!==u.match(/^Sequence$/i)?c=function(e,t,n,r,a,i){var s;if(!Array.isArray(n))throw new Error(`${r} must be of type Array.`);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}.`);"Composite"===o.type.name&&o.type.className&&(o=null!==(s=e.modelMappers[o.type.className])&&void 0!==s?s:o);const c=[];for(let t=0;t<n.length;t++){const s=e.serialize(o,n[t],r,i);if(a&&o.xmlNamespace){const e=o.xmlNamespacePrefix?`xmlns:${o.xmlNamespacePrefix}`:"xmlns";"Composite"===o.type.name?(c[t]=Object.assign({},s),c[t][mo]={[e]:o.xmlNamespace}):(c[t]={},c[t][i.xml.xmlCharKey]=s,c[t][mo]={[e]:o.xmlNamespace})}else c[t]=s}return c}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Dictionary$/i)?c=function(e,t,n,r,a,i){if("object"!=typeof n)throw new Error(`${r} must be of type object.`);const s=t.type.value;if(!s||"object"!=typeof s)throw new Error(`"value" metadata for a Dictionary must be defined in the mapper and it must of type "object" in ${r}.`);const o={};for(const t of Object.keys(n)){const c=e.serialize(s,n[t],r,i);o[t]=xo(s,c,a,i)}if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns",n=o;return n[mo]={[e]:t.xmlNamespace},n}return o}(this,e,t,n,Boolean(this.isXML),o):null!==u.match(/^Composite$/i)&&(c=function(e,t,n,r,a,i){if(Co(e,t)&&(t=Po(e,t,n,"clientName")),null!=n){const s={},o=bo(e,t,r);for(const c of Object.keys(o)){const u=o[c];if(u.readOnly)continue;let l,m=s;if(e.isXML)l=u.xmlIsWrapped?u.xmlName:u.xmlElementName||u.xmlName;else{const e=wo(u.serializedName);l=e.pop();for(const t of e){null==m[t]&&(void 0!==n[c]&&null!==n[c]||void 0!==u.defaultValue)&&(m[t]={}),m=m[t]}}if(null!=m){if(a&&t.xmlNamespace){const e=t.xmlNamespacePrefix?`xmlns:${t.xmlNamespacePrefix}`:"xmlns";m[mo]=Object.assign(Object.assign({},m[mo]),{[e]:t.xmlNamespace})}const s=""!==u.serializedName?r+"."+u.serializedName:r;let o=n[c];const p=Co(e,t);p&&p.clientName===c&&null==o&&(o=t.serializedName);const d=e.serialize(u,o,s,i);if(void 0!==d&&null!=l){const e=xo(u,d,a,i);a&&u.xmlIsAttribute?(m[mo]=m[mo]||{},m[mo][l]=d):a&&u.xmlIsWrapped?m[l]={[u.xmlElementName]:e}:m[l]=e}}}const c=function(e,t,n){const r=t.type.additionalProperties;if(!r&&t.type.className){const r=vo(e,t,n);return null==r?void 0:r.type.additionalProperties}return r}(e,t,r);if(c){const t=Object.keys(o);for(const a in n)t.every((e=>e!==a))&&(s[a]=e.serialize(c,n[a],r+'["'+a+'"]',i))}return s}return n}(this,e,t,n,Boolean(this.isXML),o)),c}deserialize(e,t,n,r={xml:{}}){var a,i,s,o;const c={xml:{rootName:null!==(a=r.xml.rootName)&&void 0!==a?a:"",includeRoot:null!==(i=r.xml.includeRoot)&&void 0!==i&&i,xmlCharKey:null!==(s=r.xml.xmlCharKey)&&void 0!==s?s:po},ignoreUnknownProperties:null!==(o=r.ignoreUnknownProperties)&&void 0!==o&&o};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,a){var i,s;const o=null!==(i=a.xml.xmlCharKey)&&void 0!==i?i:po;Co(e,t)&&(t=Po(e,t,n,"serializedName"));const c=bo(e,t,r);let u={};const l=[];for(const i of Object.keys(c)){const m=c[i],p=wo(c[i].serializedName);l.push(p[0]);const{serializedName:d,xmlName:h,xmlElementName:f}=m;let y=r;""!==d&&void 0!==d&&(y=r+"."+d);const g=m.headerCollectionPrefix;if(g){const t={};for(const r of Object.keys(n))r.startsWith(g)&&(t[r.substring(g.length)]=e.deserialize(m.type.value,n[r],y,a)),l.push(r);u[i]=t}else if(e.isXML)if(m.xmlIsAttribute&&n[mo])u[i]=e.deserialize(m,n[mo][h],y,a);else if(m.xmlIsMsText)void 0!==n[o]?u[i]=n[o]:"string"==typeof n&&(u[i]=n);else{const t=f||h||d;if(m.xmlIsWrapped){const t=n[h],r=null!==(s=null==t?void 0:t[f])&&void 0!==s?s:[];u[i]=e.deserialize(m,r,y,a),l.push(h)}else{const r=n[t];u[i]=e.deserialize(m,r,y,a),l.push(t)}}else{let r,s=n,o=0;for(const e of p){if(!s)break;o++,s=s[e]}null===s&&o<p.length&&(s=void 0),r=s;const l=t.type.polymorphicDiscriminator;let d;if(l&&i===l.clientName&&null==r&&(r=t.serializedName),Array.isArray(n[i])&&""===c[i].serializedName){r=n[i];const t=e.deserialize(m,r,y,a);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===m.defaultValue||(d=e.deserialize(m,r,y,a),u[i]=d)}}const m=t.type.additionalProperties;if(m){const t=e=>{for(const t in c)if(wo(c[t].serializedName)[0]===e)return!1;return!0};for(const i in n)t(i)&&(u[i]=e.deserialize(m,n[i],r+'["'+i+'"]',a))}else if(n&&!a.ignoreUnknownProperties)for(const e of Object.keys(n))void 0!==u[e]||l.includes(e)||_o(e,a)||(u[e]=n[e]);return u}(this,e,t,n,c);else{if(this.isXML){const e=c.xml.xmlCharKey;void 0!==t[mo]&&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=lo(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 lo(e=e.replace(/-/g,"+").replace(/_/g,"/"))}}(t):null!==l.match(/^Sequence$/i)?u=function(e,t,n,r,a){var i;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}`);if(n){Array.isArray(n)||(n=[n]),"Composite"===s.type.name&&s.type.className&&(s=null!==(i=e.modelMappers[s.type.className])&&void 0!==i?i:s);const t=[];for(let i=0;i<n.length;i++)t[i]=e.deserialize(s,n[i],`${r}[${i}]`,a);return t}return n}(this,e,t,n,c):null!==l.match(/^Dictionary$/i)&&(u=function(e,t,n,r,a){const i=t.type.value;if(!i||"object"!=typeof i)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 s of Object.keys(n))t[s]=e.deserialize(i,n[s],r,a);return t}return n}(this,e,t,n,c))}return e.isConstant&&(u=e.defaultValue),u}}function No(e={},t=!1){return new go(e,t)}function wo(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 vo(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 bo(e,t,n){let r=t.type.modelProperties;if(!r){const a=vo(e,t,n);if(!a)throw new Error(`mapper() cannot be null or undefined for model "${t.type.className}".`);if(r=null==a?void 0:a.type.modelProperties,!r)throw new Error(`modelProperties cannot be null or undefined in the mapper "${JSON.stringify(a)}" of type "${t.type.className}" for object "${n}".`)}return r}function xo(e,t,n,r){if(!n||!e.xmlNamespace)return t;const a=e.xmlNamespacePrefix?`xmlns:${e.xmlNamespacePrefix}`:"xmlns",i={[a]:e.xmlNamespace};if(["Composite"].includes(e.type.name)){if(t[mo])return t;{const e=Object.assign({},t);return e[mo]=i,e}}const s={};return s[r.xml.xmlCharKey]=t,s[mo]=i,s}function _o(e,t){return[mo,t.xml.xmlCharKey].includes(e)}function Po(e,t,n,r){var a;const i=Co(e,t);if(i){let s=i[r];if(s){"serializedName"===r&&(s=s.replace(/\\/gi,""));const i=n[s],o=null!==(a=t.type.uberParent)&&void 0!==a?a:t.type.className;if("string"==typeof i&&o){const n=function(e,t,n){const r=[n];for(;r.length;){const n=r.shift(),a=t===n?t:n+"."+t;if(Object.prototype.hasOwnProperty.call(e,a))return e[a];for(const[t,a]of Object.entries(e))t.startsWith(n+".")&&a.type.uberParent===n&&a.type.className&&r.push(a.type.className)}}(e.modelMappers.discriminators,i,o);n&&(t=n)}}}return t}function Co(e,t){return t.type.polymorphicDiscriminator||Ao(e,t.type.uberParent)||Ao(e,t.type.className)}function Ao(e,t){return t&&e.modelMappers[t]&&e.modelMappers[t].type.polymorphicDiscriminator}const So="Sequence",To="Stream",zo={operationRequestMap:new WeakMap};function Eo(e,t,n){let r=t.parameterPath;const a=t.mapper;let i;if("string"==typeof r&&(r=[r]),Array.isArray(r)){if(r.length>0)if(a.isConstant)i=a.defaultValue;else{let t=Io(e,r);!t.propertyFound&&n&&(t=Io(n,r));let s=!1;t.propertyFound||(s=a.required||"options"===r[0]&&2===r.length),i=s?a.defaultValue:t.propertyValue}}else{a.required&&(i={});for(const t in r){const s=a.type.modelProperties[t],o=Eo(e,{parameterPath:r[t],mapper:s},n);void 0!==o&&(i||(i={}),i[t]=o)}}return i}function Io(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 Mo=Symbol.for("@azure/core-client original request");function qo(e){if(function(e){return Mo in e}(e))return qo(e[Mo]);let t=zo.operationRequestMap.get(e);return t||(t={},zo.operationRequestMap.set(e,t)),t}const Ro=["application/json","text/json"],Oo=["application/xml","application/atom+xml"];function ko(e){const{parameterPath:t,mapper:n}=e;let r;return r="string"==typeof t?t:Array.isArray(t)?t.join("."):n.serializedName,r}function Bo(e={}){const t=Un(null!=e?e:{});return e.credentialOptions&&t.addPolicy(function(e){var t,n,r;const{credential:a,scopes:i,challengeCallbacks:s}=e,o=e.logger||Ot,c={authorizeRequest:null!==(n=null===(t=null==s?void 0:s.authorizeRequest)||void 0===t?void 0:t.bind(s))&&void 0!==n?n:Fn,authorizeRequestOnChallenge:null===(r=null==s?void 0:s.authorizeRequestOnChallenge)||void 0===r?void 0:r.bind(s)},u=a?function(e,t){let n,r=null,a=null;const i=Object.assign(Object.assign({},jn),t),s={get isRefreshing(){return null!==r},get shouldRefresh(){var e;return!s.isRefreshing&&(!!((null==a?void 0:a.refreshAfterTimestamp)&&a.refreshAfterTimestamp<Date.now())||(null!==(e=null==a?void 0:a.expiresOnTimestamp)&&void 0!==e?e:0)-i.refreshWindowInMs<Date.now())},get mustRefresh(){return null===a||a.expiresOnTimestamp-i.forcedRefreshWindowInMs<Date.now()}};function o(t,o){var c;return s.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 a=await r();for(;null===a;)await wn(t),a=await r();return a}((()=>e.getToken(t,o)),i.retryIntervalInMs,null!==(c=null==a?void 0:a.expiresOnTimestamp)&&void 0!==c?c:Date.now()).then((e=>(r=null,a=e,n=o.tenantId,a))).catch((e=>{throw r=null,a=null,n=void 0,e}))),r}return async(e,t)=>{const r=Boolean(t.claims),i=n!==t.tenantId;return r&&(a=null),i||r||s.mustRefresh?o(e,t):(s.shouldRefresh&&o(e,t),a)}}(a):()=>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,r,a;if(await c.authorizeRequest({scopes:Array.isArray(i)?i:[i],request:e,getAccessToken:u,logger:o}),[n,r]=await Hn(e,t),Jn(n)){let s=Kn(n.headers.get("WWW-Authenticate"));if(s){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Hn(e,t))}else if(c.authorizeRequestOnChallenge&&(a=await c.authorizeRequestOnChallenge({scopes:Array.isArray(i)?i:[i],request:e,response:n,getAccessToken:u,logger:o}),a&&([n,r]=await Hn(e,t)),Jn(n)&&(s=Kn(n.headers.get("WWW-Authenticate")),s))){let c;try{c=atob(s)}catch(e){return o.warning(`The WWW-Authenticate header contains "claims" that cannot be parsed. Unable to perform the Continuous Access Evaluation authentication flow. Unparsable claims: ${s}`),n}a=await Wn({scopes:Array.isArray(i)?i:[i],response:n,request:e,getAccessToken:u,logger:o},c),a&&([n,r]=await Hn(e,t))}}if(r)throw r;return n}}}({credential:e.credentialOptions.credential,scopes:e.credentialOptions.credentialScopes})),t.addPolicy(function(e={}){const t=e.stringifyXML;return{name:"serializationPolicy",async sendRequest(e,n){const r=qo(e),a=null==r?void 0:r.operationSpec,i=null==r?void 0:r.operationArguments;return a&&i&&(function(e,t,n){var r,a;if(n.headerParameters)for(const r of n.headerParameters){let a=Eo(t,r);if(null!=a||r.mapper.required){a=n.serializer.serialize(r.mapper,a,ko(r));const t=r.mapper.headerCollectionPrefix;if(t)for(const n of Object.keys(a))e.headers.set(t+n,a[n]);else e.headers.set(r.mapper.serializedName||ko(r),a)}}const i=null===(a=null===(r=t.options)||void 0===r?void 0:r.requestOptions)||void 0===a?void 0:a.customHeaders;if(i)for(const t of Object.keys(i))e.headers.set(t,i[t])}(e,i,a),function(e,t,n,r=function(){throw new Error("XML serialization unsupported!")}){var a,i,s,o,c;const u=null===(a=t.options)||void 0===a?void 0:a.serializerOptions,l={xml:{rootName:null!==(i=null==u?void 0:u.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==u?void 0:u.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==u?void 0:u.xml.xmlCharKey)&&void 0!==o?o:po}},m=l.xml.xmlCharKey;if(n.requestBody&&n.requestBody.mapper){e.body=Eo(t,n.requestBody);const a=n.requestBody.mapper,{required:i,serializedName:s,xmlName:o,xmlElementName:u,xmlNamespace:p,xmlNamespacePrefix:d,nullable:h}=a,f=a.type.name;try{if(void 0!==e.body&&null!==e.body||h&&null===e.body||i){const t=ko(n.requestBody);e.body=n.serializer.serialize(a,e.body,t,l);const i=f===To;if(n.isXML){const t=d?`xmlns:${d}`:"xmlns",n=function(e,t,n,r,a){if(e&&!["Composite","Sequence","Dictionary"].includes(n)){const n={};return n[a.xml.xmlCharKey]=r,n[mo]={[t]:e},n}return r}(p,t,f,e.body,l);f===So?e.body=r(function(e,t,n,r){if(Array.isArray(e)||(e=[e]),!n||!r)return{[t]:e};const a={[t]:e};return a[mo]={[n]:r},a}(n,u||o||s,t,p),{rootName:o||s,xmlCharKey:m}):i||(e.body=r(n,{rootName:o||s,xmlCharKey:m}))}else{if("String"===f&&((null===(c=n.contentType)||void 0===c?void 0:c.match("text/plain"))||"text"===n.mediaType))return;i||(e.body=JSON.stringify(e.body))}}}catch(e){throw new Error(`Error "${e.message}" occurred in serializing the payload - ${JSON.stringify(s,void 0," ")}.`)}}else if(n.formDataParameters&&n.formDataParameters.length>0){e.formData={};for(const r of n.formDataParameters){const a=Eo(t,r);if(null!=a){const t=r.mapper.serializedName||ko(r);e.formData[t]=n.serializer.serialize(r.mapper,a,ko(r),l)}}}}(e,i,a,t)),n(e)}}}(e.serializationOptions),{phase:"Serialize"}),t.addPolicy(function(e={}){var t,n,r,a,i,s,o;const c=null!==(n=null===(t=e.expectedContentTypes)||void 0===t?void 0:t.json)&&void 0!==n?n:Ro,u=null!==(a=null===(r=e.expectedContentTypes)||void 0===r?void 0:r.xml)&&void 0!==a?a:Oo,l=e.parseXML,m=e.serializerOptions,p={xml:{rootName:null!==(i=null==m?void 0:m.xml.rootName)&&void 0!==i?i:"",includeRoot:null!==(s=null==m?void 0:m.xml.includeRoot)&&void 0!==s&&s,xmlCharKey:null!==(o=null==m?void 0:m.xml.xmlCharKey)&&void 0!==o?o:po}};return{name:"deserializationPolicy",async sendRequest(e,t){const n=await t(e);return async function(e,t,n,r,a){const i=await async function(e,t,n,r,a){var i;if(!(null===(i=n.request.streamResponseStatusCodes)||void 0===i?void 0:i.has(n.status))&&n.bodyAsText){const i=n.bodyAsText,s=n.headers.get("Content-Type")||"",o=s?s.split(";").map((e=>e.toLowerCase())):[];try{if(0===o.length||o.some((t=>-1!==e.indexOf(t))))return n.parsedBody=JSON.parse(i),n;if(o.some((e=>-1!==t.indexOf(e)))){if(!a)throw new Error("Parsing XML not supported.");const e=await a(i,r.xml);return n.parsedBody=e,n}}catch(e){const t=`Error "${e}" occurred while parsing the response body - ${n.bodyAsText}.`,r=e.code||Gn.PARSE_ERROR;throw new Gn(t,{code:r,statusCode:n.status,request:n.request,response:n})}}return n}(e,t,n,r,a);if(!function(e){const t=qo(e.request),n=null==t?void 0:t.shouldDeserialize;let r;return r=void 0===n||("boolean"==typeof n?n:n(e)),r}(i))return i;const s=qo(i.request),o=null==s?void 0:s.operationSpec;if(!o||!o.responses)return i;const c=function(e){let t;const n=qo(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}(i),{error:u,shouldReturnResponse:l}=function(e,t,n,r){var a,i,s,o,c;const u=200<=e.status&&e.status<300,l=function(e){const t=Object.keys(e.responses);return 0===t.length||1===t.length&&"default"===t[0]}(t)?u:!!n;if(l){if(!n)return{error:null,shouldReturnResponse:!1};if(!n.isError)return{error:null,shouldReturnResponse:!1}}const m=null!=n?n:t.responses.default,p=(null===(a=e.request.streamResponseStatusCodes)||void 0===a?void 0:a.has(e.status))?`Unexpected status code: ${e.status}`:e.bodyAsText,d=new Gn(p,{statusCode:e.status,request:e.request,response:e});if(!(m||(null===(s=null===(i=e.parsedBody)||void 0===i?void 0:i.error)||void 0===s?void 0:s.code)&&(null===(c=null===(o=e.parsedBody)||void 0===o?void 0:o.error)||void 0===c?void 0:c.message)))throw d;const h=null==m?void 0:m.bodyMapper,f=null==m?void 0:m.headersMapper;try{if(e.parsedBody){const n=e.parsedBody;let a;if(h){let e=n;if(t.isXML&&h.type.name===So){e=[];const t=h.xmlElementName;"object"==typeof n&&t&&(e=n[t])}a=t.serializer.deserialize(h,e,"error.response.parsedBody",r)}const i=n.error||a||n;d.code=i.code,i.message&&(d.message=i.message),h&&(d.response.parsedBody=a)}e.headers&&f&&(d.response.parsedHeaders=t.serializer.deserialize(f,e.headers.toJSON(),"operationRes.parsedHeaders"))}catch(t){d.message=`Error "${t.message}" occurred in deserializing the responseBody - "${e.bodyAsText}" for the default response.`}return{error:d,shouldReturnResponse:!1}}(i,o,c,r);if(u)throw u;if(l)return i;if(c){if(c.bodyMapper){let e=i.parsedBody;o.isXML&&c.bodyMapper.type.name===So&&(e="object"==typeof e?e[c.bodyMapper.xmlElementName]:[]);try{i.parsedBody=o.serializer.deserialize(c.bodyMapper,e,"operationRes.parsedBody",r)}catch(e){throw new Gn(`Error ${e} occurred in deserializing the responseBody - ${i.bodyAsText}`,{statusCode:i.status,request:i.request,response:i})}}else"HEAD"===o.httpMethod&&(i.parsedBody=n.status>=200&&n.status<300);c.headersMapper&&(i.parsedHeaders=o.serializer.deserialize(c.headersMapper,i.headers.toJSON(),"operationRes.parsedHeaders",{xml:{},ignoreUnknownProperties:!0}))}return i}(c,u,n,p,l)}}}(e.deserializationOptions),{phase:"Deserialize"}),t}let Go;const $o={CSV:",",SSV:" ",Multi:"Multi",TSV:"\t",Pipes:"|"};function Uo(e,t,n,r){const a=function(e,t,n){var r;const a=new Map;if(null===(r=e.urlParameters)||void 0===r?void 0:r.length)for(const r of e.urlParameters){let i=Eo(t,r,n);const s=ko(r);i=e.serializer.serialize(r.mapper,i,s),r.skipEncoding||(i=encodeURIComponent(i)),a.set(`{${r.mapper.serializedName||s}}`,i)}return a}(t,n,r);let i=!1,s=Vo(e,a);if(t.path){let e=Vo(t.path,a);"/{nextLink}"===t.path&&e.startsWith("/")&&(e=e.substring(1)),e.includes("://")?(s=e,i=!0):s=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 a=t.indexOf("?");if(-1!==a){const e=t.substring(0,a),i=t.substring(a+1);r+=e,i&&(n.search=n.search?`${n.search}&${i}`:i)}else r+=t;return n.pathname=r,n.toString()}(s,e)}const{queryParams:o,sequenceParams:c}=function(e,t,n){var r;const a=new Map,i=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&&i.add(r.mapper.serializedName);let s=Eo(t,r,n);if(null!=s||r.mapper.required){s=e.serializer.serialize(r.mapper,s,ko(r));const t=r.collectionFormat?$o[r.collectionFormat]:"";if(Array.isArray(s)&&(s=s.map((e=>null==e?"":e))),"Multi"===r.collectionFormat&&0===s.length)continue;!Array.isArray(s)||"SSV"!==r.collectionFormat&&"TSV"!==r.collectionFormat||(s=s.join(t)),r.skipEncoding||(s=Array.isArray(s)?s.map((e=>encodeURIComponent(e))):encodeURIComponent(s)),!Array.isArray(s)||"CSV"!==r.collectionFormat&&"Pipes"!==r.collectionFormat||(s=s.join(t)),a.set(r.mapper.serializedName||ko(r),s)}}return{queryParams:a,sequenceParams:i}}(t,n,r);return s=function(e,t,n,r=!1){if(0===t.size)return e;const a=new URL(e),i=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),a=t.get(n);a?Array.isArray(a)?a.push(r):t.set(n,[a,r]):t.set(n,r)}return t}(a.search);for(const[e,a]of t){const t=i.get(e);if(Array.isArray(t))if(Array.isArray(a)){t.push(...a);const n=new Set(t);i.set(e,Array.from(n))}else t.push(a);else t?(Array.isArray(a)?a.unshift(t):n.has(e)&&i.set(e,[t,a]),r||i.set(e,a)):i.set(e,a)}const s=[];for(const[e,t]of i)if("string"==typeof t)s.push(`${e}=${t}`);else if(Array.isArray(t))for(const n of t)s.push(`${e}=${n}`);else s.push(`${e}=${t}`);return a.search=s.length?`?${s.join("&")}`:"",a.toString()}(s,o,c,i),s}function Vo(e,t){let n=e;for(const[e,r]of t)n=n.split(e).join(r);return n}const Do=Et("core-client");class Lo{constructor(e={}){var t,n;if(this._requestContentType=e.requestContentType,this._endpoint=null!==(t=e.endpoint)&&void 0!==t?t:e.baseUri,e.baseUri&&Do.warning("The baseUri option for SDK Clients has been deprecated, please use endpoint instead."),this._allowInsecureConnection=e.allowInsecureConnection,this._httpClient=e.httpClient||(Go||(Go=new Vn),Go),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 Bo(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 Ln(e)}({url:Uo(n,t,e,this)});r.method=t.httpMethod;const a=qo(r);a.operationSpec=t,a.operationArguments=e;const i=t.contentType||this._requestContentType;i&&t.requestBody&&r.headers.set("Content-Type",i);const s=e.options;if(s){const e=s.requestOptions;e&&(e.timeout&&(r.timeout=e.timeout),e.onUploadProgress&&(r.onUploadProgress=e.onUploadProgress),e.onDownloadProgress&&(r.onDownloadProgress=e.onDownloadProgress),void 0!==e.shouldDeserialize&&(a.shouldDeserialize=e.shouldDeserialize),e.allowInsecureConnection&&(r.allowInsecureConnection=!0)),s.abortSignal&&(r.abortSignal=s.abortSignal),s.tracingOptions&&(r.tracingOptions=s.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===To&&t.add(Number(n))}return t}(t));try{const e=await this.sendRequest(r),n=yo(e,t.responses[e.status]);return(null==s?void 0:s.onResponse)&&s.onResponse(e,n),n}catch(e){if("object"==typeof e&&(null==e?void 0:e.response)){const n=e.response,r=yo(n,t.responses[e.statusCode]||t.responses.default);e.details=r,(null==s?void 0:s.onResponse)&&s.onResponse(n,r,e)}throw e}}}function jo(e,t){const n=e=>e.split(/[-+]/)[0].split(".").map((e=>+e)),r=n(e),a=n(t),i=Math.max(...r,...a)+1,s=e=>e.reverse().reduce(((e,t,n)=>e+t*i**n),0);return s(r)-s(a)}function Ho(e,t,n){return jo(e,t)>=0&&(null==n||jo(e,n)<0)}const Fo="_sdk-big-int-",Jo=(...e)=>{const t=No(...e),{serialize:n,deserialize:r}=t;return Object.assign(t,{serialize(...[e,t,r,a]){if("BigInt"!==e.type.name||null==t)return n.call(this,e,t,r,a);if("bigint"!=typeof t)throw null!=r||(r=e.serializedName),new Error(`${r} with value ${t} must be of type bigint.`);return t.toString()},deserialize(...[e,t,n,a]){if("BigInt"!==e.type.name||null==t){"string"==typeof t&&t.startsWith(Fo)&&(console.warn(`AeSdk internal error: BigInt value ${t} handled incorrectly`),t=+t.replace(Fo,""));const i=r.call(this,e,t,n,a);return i instanceof Date?new Date(+i/1e3):i}if("number"==typeof t&&t>Number.MAX_SAFE_INTEGER)throw new ae(`Number ${t} is not accurate to be converted to BigInt`);return BigInt(t.toString().replace(Fo,""))}})},Wo=Number.MAX_SAFE_INTEGER.toString().length,Ko=new RegExp(String.raw`("\w+":\s*)(\d{${Wo},})(\s*[,}])`,"m"),Yo=new RegExp(String.raw`([[,]\s*)(\d{${Wo},})\b`,"m"),Qo={name:"parse-big-int",async sendRequest(e,t){const n=await t(e);return null==n.bodyAsText||(n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(Ko,"g"),(e=>{const t=e.match(Ko);if(null==t)throw new ie;const[,n,r,a]=t;return[n,+r>Number.MAX_SAFE_INTEGER?`"${Fo}${r}"`:r,a].join("")})),n.bodyAsText=n.bodyAsText.replaceAll(new RegExp(Yo,"g"),(e=>{const t=e.match(Yo);if(null==t)throw new ie;const[,n,r]=t;return`${n}"${Fo}${r}"`}))),n}},Zo=()=>{const e=new Map;return{policy:{name:"request-queues",async sendRequest(t,n){var r;const a=t.headers.get("__queue");t.headers.delete("__queue");const i=async()=>n(t);if(null==a)return i();const s=(null!==(r=e.get(a))&&void 0!==r?r:Promise.resolve()).then(i);return e.set(a,s.catch((()=>{}))),s}},position:"perCall"}},Xo=()=>{const e=new Map;return{policy:{name:"combine-get-requests",async sendRequest(t,n){var r;if("GET"!==t.method)return n(t);const a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);e.set(a,i);try{return await i}finally{e.delete(a)}}},position:"perCall"}},ec=()=>{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 a=JSON.stringify([t.url,t.body]),i=null!==(r=e.get(a))&&void 0!==r?r:n(t);return e.set(a,i),i}},position:"perCall"}},tc=e=>({policy:{name:"error-formatter",async sendRequest(t,n){try{return await n(t)}catch(t){if(!(t instanceof Gn)||null==t.request||t.message.startsWith("Error "))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 a=null==r?` ${t.response.status} status code`:e(r);throw""!==a&&(t.message+=`:${a}`),t}}},position:"perCall"}),nc=(e,t,n,r,a)=>({policy:{name:"version-check",async sendRequest(i,s){if(i.headers.has("__version-check"))return i.headers.delete("__version-check"),s(i);const o=[await t({requestOptions:{customHeaders:{"__version-check":"true"}}}),n,r];if(!Ho(...o)){const t=new ne(e,...o);if(!a)throw t;console.warn(t.message)}return s(i)}},position:"perCall"}),rc=(e,t)=>({policy:{name:"retry-on-failure",async sendRequest(n,r){var a;if(null!=n.headers.get("__no-retry"))return n.headers.delete("__no-retry"),r(n);const i=null!==(a=n.headers.get("__retry-code"))&&void 0!==a?a:NaN;n.headers.delete("__retry-code");const s=[200,400,403,410,500].filter((e=>e!==+i)),o=new Array(e).fill(0).map(((t,n)=>((n+1)/e)**2)),c=o.reduce(((e,t)=>e+t),0),u=o.map((e=>Math.floor(e/c*t)));let l=new Gn("Not expected to be thrown");for(let t=0;t<=e;t+=1){if(0!==t){await Qn(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 m;if(!(e instanceof Gn))throw e;if(s.includes(null!==(m=e.response?.status)&&void 0!==m?m:0))throw e;l=e}}throw l}},position:"perCall"}),ac={type:{name:"Composite",className:"Account",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},balance:{constraints:{InclusiveMinimum:0},serializedName:"balance",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},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"}}}}},ic={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}},errorCode:{serializedName:"error_code",type:{name:"String"}}}}},sc={type:{name:"Composite",className:"NextNonceResponse",modelProperties:{nextNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"next_nonce",required:!0,type:{name:"Number"}}}}},oc={type:{name:"Composite",className:"SignedTxs",modelProperties:{transactions:{serializedName:"transactions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"SignedTx"}}}}}}},cc={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"hash",required:!0,type:{name:"String"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}}}}},uc={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{constraints:{Pattern:new RegExp("^ss_[0-9A-Za-z+/=]+$")},serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"BigInt"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},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:{constraints:{Pattern:new RegExp("^oq_\\w+$")},serializedName:"query_id",type:{name:"String"}},response:{serializedName:"response",type:{name:"String"}},commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",type:{name:"String"}},name:{serializedName:"name",type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},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:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"auth_data",type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}},payerId:{serializedName:"payer_id",type:{name:"String"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},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"]}}}}},lc={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"}}}}}}},mc={type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},pc={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},dc={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},hc={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},fc={type:{name:"Composite",className:"AuctionEntry",modelProperties:{id:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},startedAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"started_at",required:!0,type:{name:"Number"}},endsAt:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ends_at",required:!0,type:{name:"Number"}},highestBidder:{serializedName:"highest_bidder",required:!0,type:{name:"String"}},highestBid:{constraints:{InclusiveMinimum:0},serializedName:"highest_bid",required:!0,type:{name:"BigInt"}}}}},yc={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:{constraints:{InclusiveMinimum:0},serializedName:"channel_amount",required:!0,type:{name:"BigInt"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solo_round",required:!0,type:{name:"Number"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"locked_until",required:!0,type:{name:"Number"}}}}},gc={type:{name:"Composite",className:"ContractObject",modelProperties:{id:{serializedName:"id",required:!0,type:{name:"String"}},ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},active:{serializedName:"active",required:!0,type:{name:"Boolean"}},referrerIds:{serializedName:"referrer_ids",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},deposit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}}}}},Nc={type:{name:"Composite",className:"ByteCode",modelProperties:{bytecode:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"bytecode",required:!0,type:{name:"String"}}}}},wc={type:{name:"Composite",className:"PoI",modelProperties:{poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"subunits_per_unit",required:!0,type:{name:"BigInt"}},fiatConverstionUrl:{serializedName:"fiat_converstion_url",type:{name:"String"}},fiatConversionUrl:{serializedName:"fiat_conversion_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"}}}}},bc={type:{name:"Composite",className:"Image",modelProperties:{type:{serializedName:"type",type:{name:"String"}},data:{serializedName:"data",type:{name:"String"}}}}},xc={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"}}}}},_c={type:{name:"Composite",className:"DryRunAccount",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Pc={type:{name:"Composite",className:"DryRunInputItem",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",type:{name:"String"}},callReq:{serializedName:"call_req",type:{name:"Composite",className:"DryRunCallReq"}}}}},Cc={type:{name:"Composite",className:"DryRunCallReq",modelProperties:{calldata:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"calldata",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},gas:{constraints:{InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},caller:{serializedName:"caller",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},context:{serializedName:"context",type:{name:"Composite",className:"DryRunCallContext"}}}}},Ac={type:{name:"Composite",className:"DryRunCallContext",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",type:{name:"String"}},stateful:{serializedName:"stateful",type:{name:"Boolean"}}}}},Sc={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"}}}}}}}}},Tc={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"}}}}},zc={type:{name:"Composite",className:"ContractCallObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},callerNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"caller_nonce",required:!0,type:{name:"Number"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},log:{serializedName:"log",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Event"}}}},returnValue:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"return_value",required:!0,type:{name:"String"}},returnType:{serializedName:"return_type",required:!0,type:{name:"Enum",allowedValues:["ok","error","revert"]}}}}},Ec={type:{name:"Composite",className:"Event",modelProperties:{address:{serializedName:"address",required:!0,type:{name:"String"}},topics:{serializedName:"topics",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMinimum:0},type:{name:"BigInt"}}}},data:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"data",required:!0,type:{name:"String"}}}}},Ic={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"}}}}}}},Mc={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"info",required:!0,type:{name:"String"}}}}},qc={type:{name:"Composite",className:"Header",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}},target:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"info",type:{name:"String"}},pofHash:{constraints:{Pattern:new RegExp("^(no_fraud|bf_\\w+)$")},serializedName:"pof_hash",type:{name:"String"}},txsHash:{serializedName:"txs_hash",type:{name:"String"}},signature:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",type:{name:"String"}}}}},Rc={type:{name:"Composite",className:"PinningTx",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},parentPayload:{serializedName:"parent_payload",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},parentType:{serializedName:"parent_type",required:!0,type:{name:"String"}},parentNetworkId:{serializedName:"parent_network_id",required:!0,type:{name:"String"}}}}},Oc={type:{name:"Composite",className:"HCContractPubkeys",modelProperties:{staking:{serializedName:"staking",required:!0,type:{name:"String"}},election:{serializedName:"election",type:{name:"String"}},rewards:{serializedName:"rewards",type:{name:"String"}}}}},kc={type:{name:"Composite",className:"HashResponse",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}}}}},Bc={type:{name:"Composite",className:"HeightResponse",modelProperties:{height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}}}},Gc={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},pofHash:{constraints:{Pattern:new RegExp("^(no_fraud|bf_\\w+)$")},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:{constraints:{Pattern:new RegExp("^sg_\\w+$")},serializedName:"signature",required:!0,type:{name:"String"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_[0-9A-Za-z+/=]+$")},serializedName:"flags",type:{name:"String"}}}}},$c={type:{name:"Composite",className:"CountResponse",modelProperties:{count:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"count",required:!0,type:{name:"Number"}}}}},Uc={type:{name:"Composite",className:"NameEntry",modelProperties:{id:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},owner:{serializedName:"owner",type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameEntryPointersItem"}}}}}}},Vc={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},Dc={type:{name:"Composite",className:"OracleQueries",modelProperties:{oracleQueries:{serializedName:"oracle_queries",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},Lc={type:{name:"Composite",className:"OracleQuery",modelProperties:{id:{constraints:{Pattern:new RegExp("^oq_\\w+$")},serializedName:"id",required:!0,type:{name:"String"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},senderNonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"sender_nonce",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",required:!0,type:{name:"Number"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"Ttl"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}}}}},jc={type:{name:"Composite",className:"PeerPubKey",modelProperties:{pubkey:{serializedName:"pubkey",required:!0,type:{name:"String"}}}}},Hc={type:{name:"Composite",className:"GasPricesItem",modelProperties:{minGasPrice:{constraints:{InclusiveMinimum:0},serializedName:"min_gas_price",required:!0,type:{name:"BigInt"}},utilization:{constraints:{InclusiveMaximum:100,InclusiveMinimum:0},serializedName:"utilization",required:!0,type:{name:"Number"}},minutes:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"minutes",required:!0,type:{name:"Number"}}}}},Fc={type:{name:"Composite",className:"NodeSettings",modelProperties:{minMinerGasPrice:{serializedName:"min_miner_gas_price",required:!0,type:{name:"BigInt"}},maxAuthFunGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"max_auth_fun_gas",required:!0,type:{name:"Number"}},mempoolTxTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"mempool_tx_ttl",required:!0,type:{name:"Number"}},mempoolNonceOffset:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"mempool_nonce_offset",required:!0,type:{name:"Number"}},dryRunGasLimit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"dry_run_gas_limit",required:!0,type:{name:"Number"}},blockGasLimit:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"block_gas_limit",required:!0,type:{name:"Number"}}}}},Jc={type:{name:"Composite",className:"ProtocolParameters",modelProperties:{networkId:{serializedName:"network_id",required:!0,type:{name:"String"}},currentProtocolVersion:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"current_protocol_version",required:!0,type:{name:"Number"}},lockedCoinsHolderAccount:{serializedName:"locked_coins_holder_account",required:!0,type:{name:"String"}},expectedBlockMineRate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"expected_block_mine_rate",type:{name:"Number"}},childBlockTime:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"child_block_time",type:{name:"Number"}},microBlockCycle:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"micro_block_cycle",required:!0,type:{name:"Number"}},protocols:{constraints:{MinItems:1},serializedName:"protocols",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ProtocolConsensusParameters"}}}}}}},Wc={type:{name:"Composite",className:"ContractTxBaseGas",modelProperties:{txType:{serializedName:"tx_type",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},txBaseGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"tx_base_gas",required:!0,type:{name:"Number"}}}}},Kc={type:{name:"Composite",className:"StateGasPerBlock",modelProperties:{part:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"part",required:!0,type:{name:"Number"}},whole:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"whole",required:!0,type:{name:"Number"}}}}},Yc={type:{name:"Composite",className:"NameAuctionTimeout",modelProperties:{length:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"length",required:!0,type:{name:"Number"}},bidTimeout:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"bid_timeout",required:!0,type:{name:"Number"}},bidExtension:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"bid_extension",required:!0,type:{name:"Number"}}}}},Qc={type:{name:"Composite",className:"ContractVersion",modelProperties:{vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}}}}},Zc={type:{name:"Composite",className:"Protocol",modelProperties:{version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},effectiveAtHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"effective_at_height",required:!0,type:{name:"Number"}}}}},Xc={type:{name:"Composite",className:"Status",modelProperties:{genesisKeyBlockHash:{serializedName:"genesis_key_block_hash",required:!0,type:{name:"String"}},solutions:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"solutions",required:!0,type:{name:"Number"}},difficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"difficulty",required:!0,type:{name:"Number"}},hashrate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"hashrate",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"peer_count",required:!0,type:{name:"Number"}},peerConnections:{serializedName:"peer_connections",type:{name:"Composite",className:"PeerConnections"}},pendingTransactionsCount:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"pending_transactions_count",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_block_height",required:!0,type:{name:"Number"}}}}},eu={type:{name:"Composite",className:"PeerConnections",modelProperties:{inbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"inbound",required:!0,type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"outbound",required:!0,type:{name:"Number"}}}}},tu={type:{name:"Composite",className:"SyncStatus",modelProperties:{progress:{serializedName:"progress",required:!0,type:{name:"Number"}},target:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},speed:{serializedName:"speed",required:!0,type:{name:"Number"}},estimate:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"estimate",required:!0,type:{name:"Number"}}}}},nu={type:{name:"Composite",className:"EncodedTx",modelProperties:{tx:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"tx",required:!0,type:{name:"String"}}}}},ru={type:{name:"Composite",className:"PostTxResponse",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w+$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},au={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"}}}}},iu={type:{name:"Composite",className:"GAObject",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},gasUsed:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_used",required:!0,type:{name:"Number"}},returnValue:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},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"}}}}},su={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},ou={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",required:!0,type:{name:"String"}}}}},cu={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},uu={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},lu={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:{constraints:{Pattern:new RegExp("^tx_[0-9A-Za-z+/=]+$")},serializedName:"payload",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{constraints:{Pattern:new RegExp("^ss_[0-9A-Za-z+/=]+$")},serializedName:"offchain_trees",type:{name:"String"}}}}},mu={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},pu={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"BigInt"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},du={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{constraints:{Pattern:new RegExp("^pi_[0-9A-Za-z+/=]+$")},serializedName:"poi",required:!0,type:{name:"String"}}}}},hu={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},fu={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},yu={type:{name:"Composite",className:"CheckTxInPoolResponse",modelProperties:{status:{serializedName:"status",required:!0,type:{name:"String"}}}}},gu={type:{name:"Composite",className:"CommitmentId",modelProperties:{commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",required:!0,type:{name:"String"}}}}},Nu={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},wu={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},vu={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},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"}}}}},bu={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},xu={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},_u={type:{name:"Composite",className:"NameHash",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}}}}},Pu={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{constraints:{Pattern:new RegExp("^cm_\\w+$")},serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Cu={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Au={type:{name:"Composite",className:"NameTransferTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Su={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w+$")},serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Tu={type:{name:"Composite",className:"PeerDetails",modelProperties:{host:{serializedName:"host",required:!0,type:{name:"String"}},port:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"port",required:!0,type:{name:"Number"}},firstSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"first_seen",required:!0,type:{name:"Number"}},lastSeen:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"last_seen",required:!0,type:{name:"Number"}},genesisHash:{serializedName:"genesis_hash",required:!0,type:{name:"String"}},topHash:{serializedName:"top_hash",required:!0,type:{name:"String"}},topDifficulty:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"top_difficulty",required:!0,type:{name:"Number"}},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"}}}}},zu={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},Eu={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Iu={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},Mu={type:{name:"Composite",className:"OracleRespondTx",modelProperties:{queryId:{constraints:{Pattern:new RegExp("^oq_\\w+$")},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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},qu={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},Ru={type:{name:"Composite",className:"PeerCount",modelProperties:{connected:{serializedName:"connected",type:{name:"Composite",className:"PeerCountConnected"}},available:{serializedName:"available",type:{name:"Composite",className:"PeerCountAvailable"}},blocked:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"blocked",required:!0,type:{name:"Number"}}}}},Ou={type:{name:"Composite",className:"PeerCountConnected",modelProperties:{inbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"inbound",type:{name:"Number"}},outbound:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"outbound",type:{name:"Number"}}}}},ku={type:{name:"Composite",className:"PeerCountAvailable",modelProperties:{verified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"verified",type:{name:"Number"}},unverified:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"unverified",type:{name:"Number"}}}}},Bu={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"}}}}}}},Gu={type:{name:"Composite",className:"PubKey",modelProperties:{pubKey:{serializedName:"pub_key",required:!0,type:{name:"String"}}}}},$u={type:{name:"Composite",className:"SpendTxInput",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"any"}}}}},Uu={type:{name:"Composite",className:"TokenSupply",modelProperties:{accounts:{constraints:{InclusiveMinimum:0},serializedName:"accounts",type:{name:"Number"}},contracts:{constraints:{InclusiveMinimum:0},serializedName:"contracts",type:{name:"Number"}},contractOracles:{constraints:{InclusiveMinimum:0},serializedName:"contract_oracles",type:{name:"Number"}},locked:{constraints:{InclusiveMinimum:0},serializedName:"locked",type:{name:"Number"}},oracles:{constraints:{InclusiveMinimum:0},serializedName:"oracles",type:{name:"Number"}},oracleQueries:{constraints:{InclusiveMinimum:0},serializedName:"oracle_queries",type:{name:"Number"}},pendingRewards:{constraints:{InclusiveMinimum:0},serializedName:"pending_rewards",type:{name:"Number"}},total:{constraints:{InclusiveMinimum:0},serializedName:"total",type:{name:"Number"}}}}},Vu={serializedName:"OffChainCallContract",type:{name:"Composite",className:"OffChainCallContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:mc.type.polymorphicDiscriminator,modelProperties:{...mc.type.modelProperties,caller:{serializedName:"caller",required:!0,type:{name:"String"}},contract:{serializedName:"contract",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},Du={serializedName:"OffChainDeposit",type:{name:"Composite",className:"OffChainDeposit",uberParent:"OffChainUpdate",polymorphicDiscriminator:mc.type.polymorphicDiscriminator,modelProperties:{...mc.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Lu={serializedName:"OffChainNewContract",type:{name:"Composite",className:"OffChainNewContract",uberParent:"OffChainUpdate",polymorphicDiscriminator:mc.type.polymorphicDiscriminator,modelProperties:{...mc.type.modelProperties,owner:{serializedName:"owner",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},code:{serializedName:"code",type:{name:"Composite",className:"ByteCode"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},callData:{constraints:{Pattern:new RegExp("^cb_[0-9A-Za-z+/=]+$")},serializedName:"call_data",required:!0,type:{name:"String"}}}}},ju={serializedName:"OffChainTransfer",type:{name:"Composite",className:"OffChainTransfer",uberParent:"OffChainUpdate",polymorphicDiscriminator:mc.type.polymorphicDiscriminator,modelProperties:{...mc.type.modelProperties,from:{serializedName:"from",required:!0,type:{name:"String"}},to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Hu={serializedName:"OffChainWithdrawal",type:{name:"Composite",className:"OffChainWithdrawal",uberParent:"OffChainUpdate",polymorphicDiscriminator:mc.type.polymorphicDiscriminator,modelProperties:{...mc.type.modelProperties,to:{serializedName:"to",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}}}}},Fu={type:{name:"Composite",className:"NameEntryPointersItem",modelProperties:{...hc.type.modelProperties}}},Ju={type:{name:"Composite",className:"ProtocolConsensusParameters",modelProperties:{...Zc.type.modelProperties,minimumGasPrice:{serializedName:"minimum_gas_price",required:!0,type:{name:"BigInt"}},gasPerByte:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas_per_byte",required:!0,type:{name:"Number"}},storeByteGas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"store_byte_gas",required:!0,type:{name:"Number"}},txBaseGas:{serializedName:"tx_base_gas",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"},constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0}}}},contractTxBaseGas:{serializedName:"contract_tx_base_gas",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractTxBaseGas"}}}},stateGasPerBlock:{serializedName:"state_gas_per_block",required:!0,type:{name:"Dictionary",value:{type:{name:"Composite",className:"StateGasPerBlock"}}}},nameClaimFees:{constraints:{MinItems:31,MaxItems:31},serializedName:"name_claim_fees",required:!0,type:{name:"Sequence",element:{type:{name:"BigInt"}}}},nameAuctionTimeouts:{serializedName:"name_auction_timeouts",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameAuctionTimeout"}}}},nameClaimBidIncrement:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_bid_increment",required:!0,type:{name:"Number"}},nameMaxLengthStartingAuction:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_max_length_starting_auction",required:!0,type:{name:"Number"}},nameClaimMaxExpiration:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_max_expiration",required:!0,type:{name:"Number"}},nameRegistrars:{serializedName:"name_registrars",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},namePointersMaxCount:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_pointers_max_count",type:{name:"Number"}},namePointerMaxKeySize:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_pointer_max_key_size",type:{name:"Number"}},namePreclaimExpiration:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_preclaim_expiration",required:!0,type:{name:"Number"}},nameClaimPreclaimDelta:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_claim_preclaim_delta",required:!0,type:{name:"Number"}},nameProtectionPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_protection_period",required:!0,type:{name:"Number"}},nameClaimLockedFee:{serializedName:"name_claim_locked_fee",required:!0,type:{name:"BigInt"}},allowedContractVersions:{serializedName:"allowed_contract_versions",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractVersion"}}}},allowedOracleAbiVersions:{serializedName:"allowed_oracle_abi_versions",required:!0,type:{name:"Sequence",element:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},type:{name:"Number"}}}}}}},Wu={type:{name:"Composite",className:"CreateContractUnsignedTx",modelProperties:{...nu.type.modelProperties,contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}}}}},Ku={type:{name:"Composite",className:"SpendTx",modelProperties:{...$u.type.modelProperties}}},Yu={type:{name:"Composite",className:"NodeGetAccountByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Qu={type:{name:"Composite",className:"NodeGetAccountByPubkeyAndHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Zu={type:{name:"Composite",className:"NodeGetAccountByPubkeyAndHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Xu={type:{name:"Composite",className:"NodeGetAccountNextNonceExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},el={type:{name:"Composite",className:"NodeGetPendingAccountTransactionsByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},tl={type:{name:"Composite",className:"NodeGetAuctionEntryByNameExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},nl={type:{name:"Composite",className:"NodeGetChannelByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},rl={type:{name:"Composite",className:"NodeGetContractExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},al={type:{name:"Composite",className:"NodeGetContractCodeExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},il={type:{name:"Composite",className:"NodeGetContractPoIExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},sl={type:{name:"Composite",className:"NodeGetCurrencyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ol={type:{name:"Composite",className:"NodeProtectedDryRunTxsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},cl={type:{name:"Composite",className:"NodeGetCurrentGenerationExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ul={type:{name:"Composite",className:"NodeGetGenerationByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ll={type:{name:"Composite",className:"NodeGetGenerationByHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ml={type:{name:"Composite",className:"NodeGetTopHeaderExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},pl={type:{name:"Composite",className:"NodeGetPinningTxExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},dl={type:{name:"Composite",className:"NodeGetHyperchainContractPubkeysExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},hl={type:{name:"Composite",className:"NodeGetCurrentKeyBlockExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},fl={type:{name:"Composite",className:"NodeGetCurrentKeyBlockHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},yl={type:{name:"Composite",className:"NodeGetCurrentKeyBlockHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},gl={type:{name:"Composite",className:"NodeGetKeyBlockByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Nl={type:{name:"Composite",className:"NodeGetKeyBlockByHeightExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},wl={type:{name:"Composite",className:"NodeGetPendingKeyBlockExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},vl={type:{name:"Composite",className:"NodeGetMicroBlockHeaderByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},bl={type:{name:"Composite",className:"NodeGetMicroBlockTransactionsByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},xl={type:{name:"Composite",className:"NodeGetMicroBlockTransactionsCountByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},_l={type:{name:"Composite",className:"NodeGetMicroBlockTransactionByHashAndIndexExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Pl={type:{name:"Composite",className:"NodeGetNameEntryByNameExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Cl={type:{name:"Composite",className:"NodeGetNameEntryByNameHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Al={type:{name:"Composite",className:"NodeGetOracleByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Sl={type:{name:"Composite",className:"NodeGetOracleQueriesByPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Tl={type:{name:"Composite",className:"NodeGetOracleQueryByPubkeyAndQueryIdExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},zl={type:{name:"Composite",className:"NodeGetPeerPubkeyExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},El={type:{name:"Composite",className:"NodeGetRecentGasPricesExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Il={type:{name:"Composite",className:"NodeGetNodeSettingsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Ml={type:{name:"Composite",className:"NodeGetProtocolParametersExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},ql={type:{name:"Composite",className:"NodeGetStatusExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Rl={type:{name:"Composite",className:"NodeGetChainEndsExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Ol={type:{name:"Composite",className:"NodeGetSyncStatusExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},kl={type:{name:"Composite",className:"NodePostTransactionExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Bl={type:{name:"Composite",className:"NodeGetTransactionByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}},Gl={type:{name:"Composite",className:"NodeGetTransactionInfoByHashExceptionHeaders",modelProperties:{retryAfter:{constraints:{InclusiveMinimum:0},serializedName:"retry-after",type:{name:"Number"}}}}};let $l={OffChainUpdate:mc,"OffChainUpdate.OffChainCallContract":Vu,"OffChainUpdate.OffChainDeposit":Du,"OffChainUpdate.OffChainNewContract":Lu,"OffChainUpdate.OffChainTransfer":ju,"OffChainUpdate.OffChainWithdrawal":Hu};const Ul={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Vl={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},Dl={parameterPath:"pubkey",mapper:{serializedName:"pubkey",required:!0,type:{name:"String"}}},Ll={parameterPath:"hash",mapper:{serializedName:"hash",required:!0,type:{name:"String"}}},jl={parameterPath:"height",mapper:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}}},Hl={parameterPath:"name",mapper:{serializedName:"name",required:!0,type:{name:"String"}}},Fl={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Jl={parameterPath:"body",mapper:xc},Wl={parameterPath:"body",mapper:nu};class Kl extends Lo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-node/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},endpoint:null!==(n=null!==(r=t.endpoint)&&void 0!==r?r:t.baseUri)&&void 0!==n?n:"{$host}"}),this.$host=e}getAccountByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Ql)}getAccountByPubkeyAndHash(e,t,n){return this.sendOperationRequest({pubkey:e,hash:t,options:n},Zl)}getAccountByPubkeyAndHeight(e,t,n){return this.sendOperationRequest({pubkey:e,height:t,options:n},Xl)}getAccountNextNonce(e,t){return this.sendOperationRequest({pubkey:e,options:t},em)}getPendingAccountTransactionsByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},tm)}getAuctionEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},nm)}getChannelByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},rm)}getContract(e,t){return this.sendOperationRequest({pubkey:e,options:t},am)}getContractCode(e,t){return this.sendOperationRequest({pubkey:e,options:t},im)}getContractPoI(e,t){return this.sendOperationRequest({pubkey:e,options:t},sm)}getCurrency(e){return this.sendOperationRequest({options:e},om)}protectedDryRunTxs(e,t){return this.sendOperationRequest({body:e,options:t},cm)}getCurrentGeneration(e){return this.sendOperationRequest({options:e},um)}getGenerationByHash(e,t){return this.sendOperationRequest({hash:e,options:t},lm)}getGenerationByHeight(e,t){return this.sendOperationRequest({height:e,options:t},mm)}getTopHeader(e){return this.sendOperationRequest({options:e},pm)}getPinningTx(e){return this.sendOperationRequest({options:e},dm)}getHyperchainContractPubkeys(e){return this.sendOperationRequest({options:e},hm)}getCurrentKeyBlock(e){return this.sendOperationRequest({options:e},fm)}getCurrentKeyBlockHash(e){return this.sendOperationRequest({options:e},ym)}getCurrentKeyBlockHeight(e){return this.sendOperationRequest({options:e},gm)}getKeyBlockByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Nm)}getKeyBlockByHeight(e,t){return this.sendOperationRequest({height:e,options:t},wm)}getPendingKeyBlock(e){return this.sendOperationRequest({options:e},vm)}getMicroBlockHeaderByHash(e,t){return this.sendOperationRequest({hash:e,options:t},bm)}getMicroBlockTransactionsByHash(e,t){return this.sendOperationRequest({hash:e,options:t},xm)}getMicroBlockTransactionsCountByHash(e,t){return this.sendOperationRequest({hash:e,options:t},_m)}getMicroBlockTransactionByHashAndIndex(e,t,n){return this.sendOperationRequest({hash:e,index:t,options:n},Pm)}getNameEntryByName(e,t){return this.sendOperationRequest({name:e,options:t},Cm)}getNameEntryByNameHash(e,t){return this.sendOperationRequest({nameHash:e,options:t},Am)}getOracleByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Sm)}getOracleQueriesByPubkey(e,t){return this.sendOperationRequest({pubkey:e,options:t},Tm)}getOracleQueryByPubkeyAndQueryId(e,t,n){return this.sendOperationRequest({pubkey:e,queryId:t,options:n},zm)}getPeerPubkey(e){return this.sendOperationRequest({options:e},Em)}getRecentGasPrices(e){return this.sendOperationRequest({options:e},Im)}getNodeSettings(e){return this.sendOperationRequest({options:e},Mm)}getProtocolParameters(e){return this.sendOperationRequest({options:e},qm)}getStatus(e){return this.sendOperationRequest({options:e},Rm)}getChainEnds(e){return this.sendOperationRequest({options:e},Om)}getSyncStatus(e){return this.sendOperationRequest({options:e},km)}postTransaction(e,t){return this.sendOperationRequest({body:e,options:t},Bm)}getTransactionByHash(e,t){return this.sendOperationRequest({hash:e,options:t},Gm)}getTransactionInfoByHash(e,t){return this.sendOperationRequest({hash:e,options:t},$m)}}const Yl=Jo(a,!1),Ql={path:"/v3/accounts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:ac},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Yu,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},Zl={path:"/v3/accounts/{pubkey}/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:ac},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Qu,isError:!0}},urlParameters:[Vl,Dl,Ll],headerParameters:[Ul],serializer:Yl},Xl={path:"/v3/accounts/{pubkey}/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:ac},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},410:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Zu,isError:!0}},urlParameters:[Vl,Dl,jl],headerParameters:[Ul],serializer:Yl},em={path:"/v3/accounts/{pubkey}/next-nonce",httpMethod:"GET",responses:{200:{bodyMapper:sc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Xu,isError:!0}},queryParameters:[{parameterPath:["options","strategy"],mapper:{defaultValue:"max",serializedName:"strategy",type:{name:"Enum",allowedValues:["max","continuity"]}}}],urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},tm={path:"/v3/accounts/{pubkey}/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:oc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:el,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},nm={path:"/v3/auctions/{name}",httpMethod:"GET",responses:{200:{bodyMapper:fc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:tl,isError:!0}},urlParameters:[Vl,Hl],headerParameters:[Ul],serializer:Yl},rm={path:"/v3/channels/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:yc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:nl,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},am={path:"/v3/contracts/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:gc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:rl,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},im={path:"/v3/contracts/{pubkey}/code",httpMethod:"GET",responses:{200:{bodyMapper:Nc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:al,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},sm={path:"/v3/contracts/{pubkey}/poi",httpMethod:"GET",responses:{200:{bodyMapper:wc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:il,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},om={path:"/v3/currency",httpMethod:"GET",responses:{200:{bodyMapper:vc},503:{bodyMapper:ic,headersMapper:sl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},cm={path:"/v3/dry-run",httpMethod:"POST",responses:{200:{bodyMapper:Sc},400:{bodyMapper:ic,isError:!0},403:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:ol,isError:!0}},requestBody:Jl,urlParameters:[Vl],headerParameters:[Ul,Fl],mediaType:"json",serializer:Yl},um={path:"/v3/generations/current",httpMethod:"GET",responses:{200:{bodyMapper:Ic},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:cl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},lm={path:"/v3/generations/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Ic},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:ul,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},mm={path:"/v3/generations/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Ic},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:ll,isError:!0}},urlParameters:[Vl,jl],headerParameters:[Ul],serializer:Yl},pm={path:"/v3/headers/top",httpMethod:"GET",responses:{200:{bodyMapper:qc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:ml,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},dm={path:"/v3/hyperchain/pin-tx",httpMethod:"GET",responses:{200:{bodyMapper:Rc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:pl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},hm={path:"/v3/hyperchain/contracts",httpMethod:"GET",responses:{200:{bodyMapper:Oc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:dl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},fm={path:"/v3/key-blocks/current",httpMethod:"GET",responses:{200:{bodyMapper:Mc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:hl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},ym={path:"/v3/key-blocks/current/hash",httpMethod:"GET",responses:{200:{bodyMapper:kc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:fl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},gm={path:"/v3/key-blocks/current/height",httpMethod:"GET",responses:{200:{bodyMapper:Bc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:yl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Nm={path:"/v3/key-blocks/hash/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:Mc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:gl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},wm={path:"/v3/key-blocks/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:Mc},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Nl,isError:!0}},urlParameters:[Vl,jl],headerParameters:[Ul],serializer:Yl},vm={path:"/v3/key-blocks/pending",httpMethod:"GET",responses:{200:{bodyMapper:Mc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:wl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},bm={path:"/v3/micro-blocks/hash/{hash}/header",httpMethod:"GET",responses:{200:{bodyMapper:Gc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:vl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},xm={path:"/v3/micro-blocks/hash/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:oc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:bl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},_m={path:"/v3/micro-blocks/hash/{hash}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:$c},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:xl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},Pm={path:"/v3/micro-blocks/hash/{hash}/transactions/index/{index}",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:_l,isError:!0}},urlParameters:[Vl,Ll,{parameterPath:"index",mapper:{constraints:{InclusiveMinimum:1},serializedName:"index",required:!0,type:{name:"Number"}}}],headerParameters:[Ul],serializer:Yl},Cm={path:"/v3/names/{name}",httpMethod:"GET",responses:{200:{bodyMapper:Uc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Pl,isError:!0}},urlParameters:[Vl,Hl],headerParameters:[Ul],serializer:Yl},Am={path:"/v3/names/hash/{name_hash}",httpMethod:"GET",responses:{200:{bodyMapper:Uc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Cl,isError:!0}},urlParameters:[Vl,{parameterPath:"nameHash",mapper:{serializedName:"name_hash",required:!0,type:{name:"String"}}}],headerParameters:[Ul],serializer:Yl},Sm={path:"/v3/oracles/{pubkey}",httpMethod:"GET",responses:{200:{bodyMapper:Vc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Al,isError:!0}},urlParameters:[Vl,Dl],headerParameters:[Ul],serializer:Yl},Tm={path:"/v3/oracles/{pubkey}/queries",httpMethod:"GET",responses:{200:{bodyMapper:Dc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Sl,isError:!0}},queryParameters:[{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:[Vl,Dl],headerParameters:[Ul],serializer:Yl},zm={path:"/v3/oracles/{pubkey}/queries/{query-id}",httpMethod:"GET",responses:{200:{bodyMapper:Lc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Tl,isError:!0}},urlParameters:[Vl,Dl,{parameterPath:"queryId",mapper:{serializedName:"query-id",required:!0,type:{name:"String"}}}],headerParameters:[Ul],serializer:Yl},Em={path:"/v3/peers/pubkey",httpMethod:"GET",responses:{200:{bodyMapper:jc},503:{bodyMapper:ic,headersMapper:zl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Im={path:"/v3/recent-gas-prices",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"GasPricesItem"}}}}},400:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:El,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Mm={path:"/v3/node-settings",httpMethod:"GET",responses:{200:{bodyMapper:Fc},503:{bodyMapper:ic,headersMapper:Il,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},qm={path:"/v3/protocol-parameters",httpMethod:"GET",responses:{200:{bodyMapper:Jc},503:{bodyMapper:ic,headersMapper:Ml,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Rm={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:Xc},503:{bodyMapper:ic,headersMapper:ql,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Om={path:"/v3/status/chain-ends",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"String"}}}}},503:{bodyMapper:ic,headersMapper:Rl,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},km={path:"/v3/sync-status",httpMethod:"GET",responses:{200:{bodyMapper:tu},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Ol,isError:!0}},urlParameters:[Vl],headerParameters:[Ul],serializer:Yl},Bm={path:"/v3/transactions",httpMethod:"POST",responses:{200:{bodyMapper:ru},400:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:kl,isError:!0}},requestBody:Wl,urlParameters:[Vl],headerParameters:[Ul,Fl],mediaType:"json",serializer:Yl},Gm={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:cc},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Bl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl},$m={path:"/v3/transactions/{hash}/info",httpMethod:"GET",responses:{200:{bodyMapper:au},400:{bodyMapper:ic,isError:!0},404:{bodyMapper:ic,isError:!0},410:{bodyMapper:ic,isError:!0},503:{bodyMapper:ic,headersMapper:Gl,isError:!0}},urlParameters:[Vl,Ll],headerParameters:[Ul],serializer:Yl};function Um(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)}function Vm(e,t){return e.get(Lm(e,t))}function Dm(e,t,n){return e.set(Lm(e,t),n),n}function Lm(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 jm=new WeakMap,Hm=new WeakMap,Fm=new WeakMap;class Jm extends Kl{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){super(e,{allowInsecureConnection:!0,additionalPolicies:[nc("node",(async e=>(await this._getCachedStatus(e)).nodeVersion),"7.1.0","8.0.0",t),Zo(),Xo(),rc(n,r),tc((e=>[" ",e.reason,null==e.errorCode?"":` (${e.errorCode})`].join("")))],...a}),Um(this,jm,void 0),Um(this,Hm,void 0),Um(this,Fm,void 0),Dm(jm,this,t),this.pipeline.addPolicy(Qo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:En}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async _getCachedStatus(e){return null!=Vm(Hm,this)?Vm(Hm,this):this.getStatus(e)}async getStatus(...e){const t=super.getStatus(...e);return t.then((()=>{Dm(Hm,this,t)}),(()=>{})),t}async _isHyperchain(){return null!=Vm(Fm,this)||Dm(Fm,this,this.getHyperchainContractPubkeys({requestOptions:{customHeaders:{"__no-retry":"true"}}}).then((()=>!0),(e=>{if("v3/hyperchain/contracts error: 404 status code"!==e.message)throw e;return!1}))),Vm(Fm,this)}async getNetworkId(){return(await this._getCachedStatus()).networkId}async getNodeInfo(){const{nodeVersion:e,networkId:t,protocols:n,topBlockHeight:r}=await this.getStatus(),a=n.filter((({effectiveAtHeight:e})=>r>=e)).reduce(((e,t)=>t.effectiveAtHeight>e.effectiveAtHeight?t:e),{effectiveAtHeight:-1,version:0}).version;if(null==Yr[a]){const e=a.toString(),t=Object.values(Yr).filter((e=>"number"==typeof e)).map((e=>+e)),n=Math.min(...t).toString(),r=(Math.max(...t)+1).toString(),i=new ne("consensus protocol",e,n,r);if(!Vm(jm,this))throw i;console.warn(i.message)}return{url:this.$host,nodeNetworkId:t,version:e,consensusProtocolVersion:a}}}function Wm(e){const t=so(e);switch(t.tag){case Xr.SignedTx:return Wm(no(t.encodedTx));case Xr.GaMetaTx:return t.gaId}const n=eo(t.tag,t.version).find((([e])=>"nonce"===e))?.[1];if(null==n)throw new D(`Transaction doesn't have nonce: ${Xr[t.tag]}`);if(!("senderKey"in n))throw new ie;return t[n.senderKey].replace(/^ok_/,"ak_")}class Km{}class Ym extends Error{constructor(e){super(e),this.name="TypeResolveError"}}var Qm=Ym;const Zm=e=>({name:"bytes",size:e}),Xm=(e,t)=>({name:"oracle_pubkey",questionType:e,answerType:t}),ep=(e,t)=>({name:"oracle_query_id",questionType:e,answerType:t}),tp=e=>({name:"list",valuesType:e}),np=(e=[])=>({name:"tuple",valueTypes:e}),rp=(e,t)=>({name:"record",keys:e,valueTypes:t}),ap=e=>({name:"set",valuesType:e}),ip=(e,t)=>({name:"map",keyType:e,valueType:t}),sp=e=>({name:"variant",variants:e}),op=()=>sp([{RelativeTTL:[{name:"int"}]},{FixedTTL:[{name:"int"}]}]),cp=()=>sp([{"AENS.AccountPt":[{name:"account_pubkey"}]},{"AENS.OraclePt":[{name:"account_pubkey"}]},{"AENS.ContractPt":[{name:"account_pubkey"}]},{"AENS.ChannelPt":[{name:"account_pubkey"}]}]),up=()=>{const e=[{"AENSv2.AccountPt":[{name:"account_pubkey"}]},{"AENSv2.OraclePt":[{name:"account_pubkey"}]},{"AENSv2.ContractPt":[{name:"account_pubkey"}]},{"AENSv2.ChannelPt":[{name:"account_pubkey"}]},{"AENSv2.DataPt":[Zm()]}];return sp(e)},lp=e=>({name:"tvar",id:e});var mp=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,r=[],a=[];var i;if((i=e)&&"object"==typeof i&&i.constructor===Object&&([[n,r]]=Object.entries(e)),this.isCustomType(n)){const[e,t]=this.resolveTypeDef(n,r);return this.resolveType(e,t)}if("variant"!==n&&(a=this.resolveValueTypes(r,t)),"void"===n)return{name:"void"};if("unit"===n)return np([]);if("int"===n)return{name:"int"};if("bool"===n)return{name:"bool"};if("string"===n)return{name:"string"};if("bits"===n)return{name:"bits"};if("hash"===n)return{name:"hash"};if("signature"===n)return{name:"signature"};if("address"===n)return{name:"account_pubkey"};if("contract_pubkey"===n)return{name:"contract_pubkey"};if("Chain.ttl"===n)return op();if("Chain.ga_meta_tx"===n)return sp([{"Chain.GAMetaTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.paying_for_tx"===n)return sp([{"Chain.PayingForTx":[{name:"account_pubkey"},{name:"int"}]}]);if("Chain.base_tx"===n)return sp([{"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":[]}]);if("AENS.pointee"===n)return cp();if("AENSv2.pointee"===n)return up();if("AENS.name"===n)return(()=>{const e=[{"AENS.Name":[{name:"account_pubkey"},op(),ip({name:"string"},cp())]}];return sp(e)})();if("AENSv2.name"===n)return(()=>{const e=[{"AENSv2.Name":[{name:"account_pubkey"},op(),ip({name:"string"},up())]}];return sp(e)})();if("Set.set"===n)return ap(...a);if("MCL_BLS12_381.fr"===n)return{name:"bls12_381.fr"};if("MCL_BLS12_381.fp"===n)return{name:"bls12_381.fp"};if("bytes"===n)return Zm("any"===r?void 0:r);if("list"===n)return tp(...a);if("map"===n)return ip(...a);if(("tuple"===n||"record"===n)&&1===a.length)return a[0];if("tuple"===n)return np(a);if("record"===n){const e=r.map((e=>e.name));return rp(e,a)}if("variant"===n)return this.resolveVariant(r,t);if("option"===n)return(e=>sp([{None:[]},{Some:e}]))(a);if("oracle"===n)return Xm(...a);if("oracle_query"===n)return ep(...a);throw new Qm("Cannot resolve type: "+JSON.stringify(e))}resolveVariant(e,t){const n=e.map((e=>{const[[n,r]]=Object.entries(e),a=r.map((e=>{const n=t.hasOwnProperty(e)?t[e]:e;return this.resolveType(n,t)}));return{[n]:a}}));return sp(n)}},pp=class{constructor(){this._internalResolver=new mp}resolveType(e,t={}){return this._internalResolver.resolveType(e,t)}};class dp extends Error{constructor(e){super(e),this.name="InternalError"}}var hp=dp,fp=(e,t)=>{if(!e)throw new hp(t)},yp=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,CONTRACT_BYTEARRAY:143,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});class gp extends Error{constructor(e){super("Invalid FATE prefix: 0b"+e.toString(2).padStart(8,"0")),this.name="FatePrefixError",this.prefix=e}}var Np=gp;const wp={[yp.OTYPE_ADDRESS]:{name:"account_pubkey"},[yp.OTYPE_BYTES]:Zm(),[yp.OTYPE_CONTRACT]:{name:"contract_pubkey"},[yp.OTYPE_ORACLE]:Xm(),[yp.OTYPE_ORACLE_QUERY]:ep(),[yp.OTYPE_CHANNEL]:{name:"channel"}};var vp=class{createType(e){const t=e[0];if(t===yp.TRUE||t===yp.FALSE)return{name:"bool"};if((1&t)===yp.SMALL_INT||t===yp.POS_BIG_INT||t===yp.NEG_BIG_INT)return{name:"int"};if((3&t)===yp.SHORT_STRING||t===yp.LONG_STRING||t===yp.EMPTY_STRING)return{name:"string"};if((15&t)===yp.SHORT_LIST||t===yp.LONG_LIST)return tp();if((15&t)===yp.SHORT_TUPLE||t===yp.LONG_TUPLE||t===yp.EMPTY_TUPLE)return np();if(t===yp.MAP||t===yp.EMPTY_MAP)return ip();if(t===yp.POS_BITS||t===yp.NEG_BITS)return{name:"bits"};if(t===yp.VARIANT)return sp();if(t===yp.OBJECT){const t=e[1];return fp(wp.hasOwnProperty(t),`Unsupported object type "${t}"`),wp[t]}if(t===yp.CONTRACT_BYTEARRAY)return{name:"contract_bytearray"};if(t===yp.TYPE_INTEGER||t===yp.TYPE_BOOLEAN||t===yp.TYPE_LIST||t===yp.TYPE_TUPLE||t===yp.TYPE_OBJECT||t===yp.TYPE_BITS||t===yp.TYPE_MAP||t===yp.TYPE_STRING||t===yp.TYPE_VARIANT||t===yp.TYPE_BYTES||t===yp.TYPE_CONTRACT_BYTEARRAY||t===yp.TYPE_VAR||t===yp.TYPE_ANY)return{name:"type",type:undefined};throw new Np(t)}},bp=class{constructor(e){this.name=e}valueOf(){throw new hp("Not implemented.")}accept(e){return e.visitData(this)}};class xp extends Error{constructor(e){super(e),this.name="SerializerError"}}var _p=xp,Pp=class{constructor(e){this.globalSerializer=e}serialize(e){throw new _p("Not implemented.")}deserialize(e,t){const[n,r]=this.deserializeStream(e,t);return n}deserializeStream(e,t){throw new _p("Not implemented.")}};const Cp=e=>{const t=BigInt(e);return t<256n?new Uint8Array([Number(t)]):new Uint8Array([...Cp(t>>8n),Number(0xffn&t)])},Ap=e=>[...e].map((e=>e.toString(16).padStart(2,"0"))),Sp=e=>{if(0===e.length)return 0n;const t=Ap(e);return BigInt("0x"+t.join(""))},Tp=e=>Ap(e).join("");class zp extends Error{constructor(e){super(e),this.name="FormatError"}}var Ep=zp;class Ip extends Error{constructor(e,t){super(t),this.name="FateTypeError",this.type=e}}var Mp=Ip,qp=class extends bp{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(e=>{const t=e.match(/^(0x)?([a-f0-9]*)$/i);if(!t)throw new Ep(`Invalid hex string: ${e}`);return new Uint8Array(t[2].split(/(.{1,2})/).filter((e=>e)).map((e=>parseInt(e,16))))})(e);if("bigint"!=typeof e&&!Number.isInteger(e))throw new Mp("byte_array",`Should be one of: Array, ArrayBuffer, hex string, Number, BigInt; got ${e} instead`);const n=Cp(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 Mp(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}get type(){return Zm(this._size)}valueOf(){return this._value}},Rp=class extends qp{constructor(e,t,n){super(e,32,t),this._prefix=n}get prefix(){return this._prefix}accept(e){return e.visitAddress(this)}},Op=class extends Rp{constructor(e){super(e,"account_pubkey","ak")}get type(){return{name:"account_pubkey"}}},kp=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_ADDRESS,...ds.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ds.decode(t.slice(2),!0);return[new Op(n.data),new Uint8Array(n.remainder)]}};function Bp(e){return new Uint8Array(ds.encode(Cp(e)))}function Gp(e){const t=ds.decode(e,!0);return[Sp(t.data),t.remainder]}var $p=class extends bp{constructor(e){super("bits"),this._value=BigInt(e)}get type(){return{name:"bits"}}get value(){return this._value}valueOf(){return this._value}},Up=e=>e>0?e:-1n*e,Vp=class extends Pp{serialize(e){return[e.value>=0?yp.POS_BITS:yp.NEG_BITS,...Bp(Up(e.value))]}deserializeStream(e){const t=new Uint8Array(e),n=t[0]===yp.POS_BITS?1n:-1n,[r,a]=Gp(t.slice(1));return[new $p(r*n),new Uint8Array(a)]}},Dp=class extends bp{constructor(e){super("bool"),this._value=!!e}get value(){return this._value}get type(){return{name:"bool"}}valueOf(){return this._value}},Lp=class extends Pp{serialize(e){return!0===e.valueOf()?[yp.TRUE]:[yp.FALSE]}deserializeStream(e){const t=new Uint8Array(e),n=t[0],r=t.slice(1);if(n===yp.TRUE)return[new Dp(!0),r];if(n===yp.FALSE)return[new Dp(!1),r];throw new Np(n)}},jp=class extends bp{constructor(e=[]){super("byte_array"),this._value=new Uint8Array(e)}get length(){return this._value.length}get type(){return{name:"byte_array"}}valueOf(){return this._value}},Hp=class extends bp{constructor(e){super("int"),this._value=BigInt(e)}get value(){return this._value}get type(){return{name:"int"}}valueOf(){return this._value}},Fp=class extends Pp{serialize(e){const t=e instanceof Hp?e.value:BigInt(e),n=Up(t);if(n<64){const e=Number(n);return t>=0?[e<<1]:[e<<1&254|128]}return t<0?[yp.NEG_BIG_INT,...Bp(n-64n)]:[yp.POS_BIG_INT,...Bp(n-64n)]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(!(1&n))return 128&n?[new Hp(-((126&n)>>1)),t.slice(1)]:[new Hp(n>>1),t.slice(1)];if(n===yp.POS_BIG_INT||n===yp.NEG_BIG_INT){const e=n===yp.POS_BIG_INT?1n:-1n,[r,a]=Gp(t.slice(1));return[new Hp((r+64n)*e),new Uint8Array(a)]}throw new Np(n)}};const Jp=new Fp;var Wp=class extends Pp{serialize(e){return 0===e.length?[yp.EMPTY_STRING]:e.length<64?[e.length<<2|yp.SHORT_STRING,...e.valueOf()]:[yp.LONG_STRING,...Jp.serialize(e.length-64),...e.valueOf()]}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(n===yp.EMPTY_STRING)return[new jp,t.slice(1)];if(n===yp.LONG_STRING){const[e,n]=Jp.deserializeStream(t.slice(1)),r=Number(e.valueOf())+64;return[new jp(n.slice(0,r)),n.slice(r)]}const r=1+(n>>2);return[new jp(t.slice(1,r)),t.slice(r)]}};const Kp=new Wp;var Yp=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_BYTES,...Kp.serialize(e.value)]}deserializeStream(e){const t=new Uint8Array(e),[n,r]=Kp.deserializeStream(t.slice(2));return[new qp(n.valueOf()),r]}},Qp=class extends Rp{constructor(e){super(e,"channel","ch")}get type(){return{name:"channel"}}},Zp=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_CHANNEL,...ds.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ds.decode(t.slice(2),!0);return[new Qp(n.data),new Uint8Array(n.remainder)]}},Xp=class extends Rp{constructor(e){super(e,"contract_pubkey","ct")}get type(){return{name:"contract_pubkey"}}},ed=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_CONTRACT,...ds.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ds.decode(t.slice(2),!0);return[new Xp(n.data),new Uint8Array(n.remainder)]}},td=class extends bp{constructor(){super("void"),this._value=void 0}get value(){return this._value}get type(){return{name:"void"}}valueOf(){return this._value}},nd=class extends Pp{serialize(){return""}deserialize(){return new td}deserializeStream(e){return[new td,e]}},rd=class extends bp{constructor(e,t=[]){super("list"),this._itemsType=e,this.items=Array.from(t)}get itemsType(){return this._itemsType}get type(){return tp(this.itemsType)}get length(){return this.items.length}valueOf(){return this.items.map((e=>e.valueOf()))}accept(e){return e.visitList(this)}},ad=class extends Pp{serialize(e){const t=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0),n=e.items.length;return n<16?[n<<4|yp.SHORT_LIST,...t]:[yp.LONG_LIST,...Bp(n-16),...t]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a,i,s=0n,o=n.slice(1);r===yp.LONG_LIST&&([s,o]=Gp(n.slice(1)),s+=16n),(15&r)===yp.SHORT_LIST&&(s=BigInt((240&r)>>4)),void 0!==t&&(a=t.valuesType);const c=[];for(let e=0n;e<s;e++)[i,o]=this.globalSerializer.deserializeStream(o,a),c.push(i);return 0n===s?[new rd,o]:(void 0===t&&(a=c[0].type),[new rd(a,c),o])}};const id=e=>{const[t,n]=e;return{key:t,value:n}};var sd=class extends bp{constructor(e,t,n=[]){super("map"),this._keyType=e,this._valueType=t,this._type=ip(e,t),this._value=new Map(n)}get items(){return[...this._value.entries()].map(id)}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)}},od=class extends bp{constructor(e=[],t=[]){super("tuple"),this._valueTypes=e.hasOwnProperty("valueTypes")?e.valueTypes:e,this._type=Array.isArray(e)?np(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)}},cd=class extends bp{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 ap(this.itemsType)}get length(){return this._items.size}valueOf(){return new Set(this.items.map((e=>e.valueOf())))}accept(e){return e.visitSet(this)}},ud=class extends Pp{serialize(e){return this.globalSerializer.serialize(new sd(e.itemsType,np(),e.items.map((e=>[e,new od]))))}deserializeStream(e,t){const n=ip(t.valuesType,np()),[r,a]=this.globalSerializer.deserializeStream(e,n);return[new cd(t.valuesType,r.keys),a]}};const ld=(e,t)=>{if(0===e.length)return-1;if(0===t.length)return 1;const n=fd(e.itemsType);for(let r=0;r<e.length;r++){if(void 0===t.items[r])return 1;const a=n(e.items[r],t.items[r]);if(0!==a)return a}return e.length===t.length?0:-1},md=e=>{const t=fd(e);return(e,n)=>t(e.key,n.key)},pd=(e,t)=>{const n=new rd({name:"int"},e.valueOf()),r=new rd({name:"int"},t.valueOf());return ld(n,r)},dd=(e,t)=>Number(BigInt(e)-BigInt(t)),hd={int:dd,bool:(e,t)=>e-t,string:(e,t)=>{const n=new TextEncoder,r=e.toString(),a=t.toString();return r.length===a.length?pd(n.encode(e),n.encode(t)):r.length-a.length},bits:(e,t)=>e<0||t<0?-dd(e,t):dd(e,t),list:ld,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],a=fd(r)(e.items[n],t.items[n]);if(0!==a)return a}return 0},variant:(e,t)=>{const n=e.arities.length-t.arities.length;if(0!==n)return n;const r=new rd(e.aritiesType,e.arities),a=new rd(t.aritiesType,t.arities),i=fd(r)(r,a);if(0!==i)return i;const s=e.tag-t.tag;return 0!==s?s:fd(np())(new od(e.valueTypes,e.value),new od(t.valueTypes,t.value))},map:(e,t)=>{const n=[...e.items],r=[...t.items];n.sort(md(e.keyType)),r.sort(md(t.keyType));const a=fd(e.keyType),i=fd(e.valueType);for(let e=0;e<n.length;e++){if(void 0===r[e])return 1;const t=n[e],s=r[e],o=a(t.key,s.key);if(0!==o)return o;const c=i(t.value,s.value);if(0!==c)return c}return n.length===r.length?0:-1},bytes:pd,account_pubkey:pd,channel:pd,contract_pubkey:pd,oracle_query_id:pd,oracle_pubkey:pd},fd=e=>(fp(e.hasOwnProperty("name"),`Cannot determine type name of ${JSON.stringify(e)}`),fp(hd.hasOwnProperty(e.name),`Unsupported comparator for ${e.name}`),hd[e.name]);var yd=fd,gd=class extends Pp{serialize(e){const t=e.length,n=yd(e.keyType),r=[...e.items];r.sort(((e,t)=>n(e.key,t.key)));const a=r.map((e=>[this.globalSerializer.serialize(e.key),this.globalSerializer.serialize(e.value)]));return[yp.MAP,...Bp(t),...a.flat(1/0)]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];if(r!==yp.MAP)throw new Np(r);const[a,i]=Gp(n.slice(1));let s,o,c=i;if(0n===a)return[new sd,c];void 0!==t&&({keyType:s,valueType:o}=t);const u=[];for(let e=0n;e<a;e++){const[e,t]=this.globalSerializer.deserializeStream(c,s),[n,r]=this.globalSerializer.deserializeStream(t,o);u.push([e,n]),c=r}const l=u[0];return void 0===t&&(s=l[0].type,o=l[1].type),[new sd(s,o,u),c]}},Nd=class extends Rp{constructor(e){super(e,"oracle_query_id","oq")}get type(){return ep()}},wd=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_ORACLE_QUERY,...ds.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ds.decode(t.slice(2),!0);return[new Nd(n.data),new Uint8Array(n.remainder)]}},vd=class extends Rp{constructor(e){super(e,"oracle_pubkey","ok")}get type(){return Xm()}},bd=class extends Pp{serialize(e){return[yp.OBJECT,yp.OTYPE_ORACLE,...ds.encode(e.value)]}deserializeStream(e){const t=new Uint8Array(e),n=ds.decode(t.slice(2),!0);return[new vd(n.data),new Uint8Array(n.remainder)]}};const xd=e=>e instanceof Uint8Array?(new TextDecoder).decode(e):e.toString(),_d=e=>"string"==typeof e?(new TextEncoder).encode(e):e;var Pd=class extends bp{constructor(e){super("string"),this._value=_d(e)}get type(){return{name:"string"}}toString(){return xd(this._value)}toBytes(){return this._value}valueOf(){return(e=>{const t=_d(xd(e));return Sp(e)===Sp(t)})(this._value)?this.toString():this._value}};const Cd=new Wp;var Ad=class extends Pp{serialize(e){let t=e.valueOf();return"string"==typeof t&&(t=(new TextEncoder).encode(t)),Cd.serialize(t)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if((3&n)!==yp.SHORT_STRING&&![yp.EMPTY_STRING,yp.LONG_STRING].includes(n))throw new Np(n);const[r,a]=Cd.deserializeStream(t);return[new Pd(r.valueOf()),a]}},Sd=class extends Pp{serialize(e){const t=e.size;if(0===t)return[yp.EMPTY_TUPLE];const n=e.items.map((e=>this.globalSerializer.serialize(e))).flat(1/0);return t<16?[t<<4|yp.SHORT_TUPLE,...n]:[yp.LONG_TUPLE,...Bp(t-16),...n]}deserializeStream(e,t){const n=new Uint8Array(e),r=n[0];let a=0n,i=n.slice(1);if(r===yp.EMPTY_TUPLE)return[new od,i];(15&r)===yp.SHORT_TUPLE&&(a=(240&r)>>4),r===yp.LONG_TUPLE&&([a,i]=Gp(n.slice(1)),a+=16n);let s=[];void 0!==t&&(s=t.valueTypes);const o=[];let c=null;for(let e=0n;e<a;e++)[c,i]=this.globalSerializer.deserializeStream(i,s[e]),o.push(c);let u=t;return void 0===t&&(u=o.map((e=>e.type))),[new od(u,o),i]}},Td=class extends bp{constructor(e,t,n=[],r=[],a=[]){super("variant"),this.arities=Array.from(e),this._tag=t,this._value=n,this._valueTypes=r,this._type=sp(a)}get valueTypes(){return this._valueTypes}get type(){return this._type}get tag(){return this._tag}get value(){return this._value}get aritiesType(){return{name:"int"}}get variantType(){return np(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)}},zd=class extends Pp{serialize(e){const t=new od(e.valueTypes,e.value);return[yp.VARIANT,...ds.encode(new Uint8Array(e.arities)),e.tag,...this.globalSerializer.serialize(t)]}deserializeStream(e,t){const n=new Uint8Array(e),r=ds.decode(n.slice(1),!0),a=[...r.data],i=r.remainder[0],s=r.remainder.slice(1);let o,c=[];void 0!==t&&void 0!==t.variants&&(c=t.variants,o=np(Object.values(c[i])[0]));const[u,l]=this.globalSerializer.deserializeStream(s,o);return[new Td(a,i,u.items,u.valueTypes,c),l]}},Ed=class extends bp{constructor(e,t,n){if(super(n),!Array.isArray(e)&&!ArrayBuffer.isView(e))throw new Mp(n,`Should be one of: Array or ArrayBuffer; got ${e} instead`);const r=new Uint8Array(e);if(r.byteLength!==t)throw new Mp(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}},Id=class extends Ed{constructor(e){super(e,32,"bls12_381.fr")}get type(){return{name:"bls12_381.fr"}}accept(e){return e.visitBls12381Fr(this)}},Md=class extends Ed{constructor(e){super(e,48,"bls12_381.fp")}get type(){return{name:"bls12_381.fp"}}accept(e){return e.visitBls12381Fp(this)}};const qd=new Yp,Rd=(e,t)=>{switch(e.name){case"bls12_381.fr":return new Id(t);case"bls12_381.fp":return new Md(t);default:throw new Error(`Unsupported type "${e.name}"`)}};var Od=class extends Pp{serialize(e){return qd.serialize(e)}deserializeStream(e,t){const[n,r]=qd.deserializeStream(e);return[Rd(t,n.valueOf()),r]}},kd=class extends bp{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)}},Bd=class extends Pp{serialize(e){const t=new jp(e.functionId),n=new od(e.argTypes,e.args),r=new od([t.type,n.type],[t,n]);return this.globalSerializer.serialize(r)}deserialize(e,t){const n=np([{name:"byte_array"},np(t.argumentTypes)]),[r]=this.globalSerializer.deserializeStream(e,n),[a,i]=r.items;return new kd(a.valueOf(),i.valueTypes,i.items)}};const Gd={[yp.TYPE_INTEGER]:{name:"int"},[yp.TYPE_BOOLEAN]:{name:"bool"},[yp.TYPE_BITS]:{name:"bits"},[yp.TYPE_STRING]:{name:"string"},[yp.TYPE_ANY]:{name:"any"}},$d={[yp.OTYPE_ADDRESS]:{name:"account_pubkey"},[yp.OTYPE_CONTRACT]:{name:"contract_pubkey"},[yp.OTYPE_ORACLE]:Xm(),[yp.OTYPE_ORACLE_QUERY]:ep(),[yp.OTYPE_CHANNEL]:{name:"channel"}};var Ud=class extends Pp{constructor(e){super(e),this._intSerializer=new Fp}serialize(e){const t=Object.entries(Gd).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=t)return new Uint8Array([t]);const n=Object.entries($d).find((([t,{name:n}])=>n===e.name))?.[0];if(null!=n)return new Uint8Array([yp.TYPE_OBJECT,n]);if("tvar"===e.name)return new Uint8Array([yp.TYPE_VAR,e.id]);if("bytes"===e.name)return new Uint8Array([yp.TYPE_BYTES,...this._intSerializer.serialize(e.size)]);if("list"===e.name)return new Uint8Array([yp.TYPE_LIST,...this.serialize(e.valuesType)]);if("map"===e.name)return new Uint8Array([yp.TYPE_MAP,...this.serialize(e.keyType),...this.serialize(e.valueType)]);if("tuple"===e.name)return new Uint8Array([yp.TYPE_TUPLE,e.valueTypes.length,...e.valueTypes.map((e=>[...this.serialize(e)])).flat()]);if("variant"===e.name)return new Uint8Array([yp.TYPE_VARIANT,e.variants.length,...e.variants.map((e=>[...this.serialize(e)])).flat()]);throw new Mp(e.name,`Unsupported type: ${e.name}`)}deserializeStream(e){const t=new Uint8Array(e),n=t[0];if(Gd.hasOwnProperty(n))return[Gd[n],t.slice(1)];if(n===yp.TYPE_OBJECT){const e=t[1];if(!$d.hasOwnProperty(e))throw new Np(e,"Unsupported object type");return[$d[e],t.slice(2)]}if(n===yp.TYPE_VAR)return[lp(t[1]),t.slice(2)];if(n===yp.TYPE_BYTES){const[e,n]=this._intSerializer.deserializeStream(t.slice(1));return[Zm(e.valueOf()),n]}if(n===yp.TYPE_LIST){const[e,n]=this.deserializeStream(t.slice(1));return[tp(e),n]}if(n===yp.TYPE_MAP){const[e,n]=this.deserializeStream(t.slice(1)),[r,a]=this.deserializeStream(n);return[ip(e,r),a]}if(n===yp.TYPE_TUPLE){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[np(n),a]}if(n===yp.TYPE_VARIANT){const e=t[1],n=[];let r,a=t.slice(2);for(let t=0;t<e;t++)[r,a]=this.deserializeStream(a),n.push(r);return[sp(n),a]}throw new Np(n)}},Vd=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}});const Dd={3:"immediate",2:"var",1:"arg",0:"stack"};var Ld=class extends Pp{constructor(e){super(e),this._typeSerializer=new Ud}deserialize(e){const t=ds.decode(e,!0),n=ds.decode(t.remainder,!0),r=ds.decode(n.remainder),a=this.deserializeSymbols(n.data);return{functions:this.deserializeFunctions(t.data,a),symbols:a,annotations:this.deserializeAnnotations(r)}}deserializeFunctions(e,t){let n={},r=e;const a=[];for(;r.length;)[n,r]=this.deserializeFunction(r,t),a.push(n);return a}deserializeFunction(e,t){const n=e[0],r=Tp(e.slice(1,5));if(254!==n)throw new Error(`Wrong function prefix, expected 0xfe got 0x${e[0].toString(16)}`);const a=t[r],[i,s]=this.deserializeAttributes(e.slice(5)),[o,c,u]=this.deserializeSignature(s),[l,m]=this.deserializeInstructions(u);return[{id:r,name:a,attributes:i,args:o,returnType:c,instructions:l},m]}deserializeInstructions(e){let t={},n=e;const r=[];let a=0,i=!1;for(;n.length&&254!==n[0];)void 0===r[a]&&(r[a]=[]),[t,n,i]=this.deserializeInstruction(n),r[a].push(t),i&&a++;return[r,n]}deserializeInstruction(e){const t=e[0],n=e.slice(1);if(!Vd.hasOwnProperty(t))throw new Error(`Unsupported opcode: 0x${t.toString(16)}`);const r=Vd[t],{mnemonic:a,end:i}=r;if(0===r.args)return[{mnemonic:a,args:[]},n,i];const[s,o]=this.deserializeArguments(n,r.args);return[{mnemonic:a,args:s},o,i]}deserializeArguments(e,t){const n=t<=4?1:2,r=e.subarray(0,n),a=e.slice(n),i=((e,t=1)=>{const n=[];let r=Number(Sp(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),s=[];let o,c=a;return i.forEach((e=>{[o,c]=this.deserializeArgument(e,c),s.push(o)})),[s,c]}deserializeArgument(e,t){const n=Dd[e];if("stack"===n)return[{mod:n,arg:0},t];const[r,a]=this.globalSerializer.deserializeStream(t);return[{mod:n,arg:r.valueOf()},a]}deserializeSignature(e){const[t,n]=this._typeSerializer.deserializeStream(e),[r,a]=this._typeSerializer.deserializeStream(n);return[t,r,a]}deserializeAttributes(e){const[t,n]=this.globalSerializer.deserializeStream(e),r=Number(t.valueOf()),a=[];return 1&r&&a.push("private"),2&r&&a.push("payable"),[a,n]}deserializeSymbols(e){const t=ip({name:"byte_array"},{name:"string"}),n=this.globalSerializer.deserializeWithType(e,t).valueOf(),r={};return n.forEach(((e,t)=>{const n=Tp(t);r[n]=e})),r}deserializeAnnotations(e){return this.globalSerializer.deserialize(e).valueOf()}},jd=class extends Pp{constructor(e){super(),this._bytecodeSerializer=new Ld(e),this._intSerializer=new Fp}deserializeStream(e){const t=new Uint8Array(e),[n,r]=this._intSerializer.deserializeStream(t.slice(1)),a=Number(n),i=ds.decode(r.slice(0,a)),s=new TextDecoder;return[{tag:Sp(i[0]),vsn:Sp(i[1]),sourceHash:Tp(i[2]),aevmTypeInfo:i[3],bytecode:this._bytecodeSerializer.deserialize(i[4]),compilerVersion:s.decode(i[5]),payable:Boolean(i[6][0])},r.slice(a)]}},Hd=class extends Pp{constructor(){super(),this.typeFactory=new vp,this._serializers={void:new nd,bool:new Lp,int:new Fp,tuple:new Sd(this),record:new Sd(this),list:new ad(this),set:new ud(this),map:new gd(this),byte_array:new Wp,string:new Ad,hash:new Yp,signature:new Yp,bits:new Vp,variant:new zd(this),bytes:new Yp,account_pubkey:new kp,contract_pubkey:new ed,oracle_pubkey:new bd,oracle_query_id:new wd,channel:new Zp,"bls12_381.fr":new Od,"bls12_381.fp":new Od,calldata:new Bd(this),contract_bytearray:new jd(this),type:new Ud}}_getSerializer(e){if(!e.hasOwnProperty("name"))throw new _p("Unsupported type: "+JSON.stringify(e));const t=e.name;if(!this._serializers.hasOwnProperty(t))throw new _p("Unsupported type: "+JSON.stringify(t));return this._serializers[t]}serialize(e){if("object"!=typeof e)throw new _p("Only object serialization is supported. Got: "+JSON.stringify(e));if(!(e instanceof bp))throw new _p("Only instances of FateData is supported.");return this._getSerializer(e).serialize(e)}deserializeWithType(e,t){if(!(e instanceof Uint8Array))throw new _p("Only instances of Uint8Array is supported.");return this._getSerializer(t).deserialize(e,t)}deserialize(e){if(!(e instanceof Uint8Array))throw new _p("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 _p("Only instances of Uint8Array is supported.");let n=t;return void 0===t&&(n=this.typeFactory.createType(e)),this._getSerializer(n).deserializeStream(e,t)}},Fd=n(2861);const Jd=e=>(new mr).update(e).digest(),Wd=e=>Jd(Jd(e)).slice(0,4),Kd=e=>{const t=Fd.Buffer.from(e),n=Wd(e);return Fd.Buffer.concat([t,n],t.length+4)},Yd=e=>{const t=Fd.Buffer.from(e),n=t.slice(0,-4),r=t.slice(-4),a=Wd(n);if(!r.equals(a))throw new Ep("Invalid checksum");return new Uint8Array(n)},Qd=e=>Kd(e).toString("base64"),Zd=e=>{const t=Fd.Buffer.from(e,"base64");return Yd(t)},Xd=e=>lr.encode(Kd(e)),eh=e=>Yd(lr.decode(e)),th={key_block_hash:{tag:"kh",size:32,encoder:s},micro_block_hash:{tag:"mh",size:32,encoder:s},block_pof_hash:{tag:"bf",size:32,encoder:s},block_tx_hash:{tag:"bx",size:32,encoder:s},block_state_hash:{tag:"bs",size:32,encoder:s},contract_bytearray:{tag:"cb",size:0,encoder:i},contract_pubkey:{tag:"ct",size:32,encoder:s},account_pubkey:{tag:"ak",size:32,encoder:s},account_seckey:{tag:"sk",size:32,encoder:s},channel:{tag:"ch",size:32,encoder:s},oracle_pubkey:{tag:"ok",size:32,encoder:s},oracle_query_id:{tag:"oq",size:32,encoder:s},peer_pubkey:{tag:"pp",size:32,encoder:s},name:{tag:"nm",size:0,encoder:s},tx_hash:{tag:"th",size:32,encoder:s},signature:{tag:"sg",size:64,encoder:s},commitment:{tag:"cm",size:32,encoder:s},bytearray:{tag:"ba",size:0,encoder:i}},nh={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",sk:"account_seckey",ch:"channel",ok:"oracle_pubkey",oq:"oracle_query_id",pp:"peer_pubkey",nm:"name",th:"tx_hash",sg:"signature",cm:"commitment",ba:"bytearray"};var rh=class{encode(e,t){if(!th.hasOwnProperty(e))throw new Mp(e,`Unsupported API type ${e}`);const n=th[e];if(n.size>0&&t.length!==n.size)throw new Mp(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(!nh.hasOwnProperty(t))throw new Ep(`Invalid API data format. Unsupported tag: ${t}`);if("_"!==e[2])throw new Ep(`Invalid API data format. Expected _ separator on position 2, got ${e[2]}`);const n=th[nh[t]],r=e.substring(3),a=n.encoder.decode(r);if(n.size>0&&a.length!==n.size)throw new Ep(`Invalid API data format. Expected size ${n.size}, but got ${a.length}`);return a}decodeWithType(e,t){const n=e.substring(0,2);if(!th.hasOwnProperty(t))throw new Mp(t,"Unsupported API type");const r=th[t].tag;if(n!==r){const n=this.capitalizeType(t);throw new Mp(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)}};const ah={r:{R:1n<<256n,N:0x73eda753299d7d483339d80809a1d80553bda402fffe5bfeffffffff00000001n},p:{R:1n<<384n,N:0x1a0111ea397fe69a4b1ba7b6434bacd764774b84f38512bf6730d2a0f6b0f6241eabfffeb153ffffb9feffffffffaaabn}},ih=(e,t)=>{if(0n===t)return[1n,0n,e];const[n,r,a]=ih(t,e%t);return[r,n-r*(e/t),a]},sh=(e,t)=>{const n=ah[t],r=BigInt(e)*n.R%n.N;return Cp(r)},oh=(e,t)=>{const n=ah[t],r=(e=>{const t=Ap(e).reverse();return BigInt("0x"+t.join(""))})(e),a=((e,t)=>{const[n,r,a]=ih(e,t);return(n+t)%t})(n.R,n.N);return r*a%n.N};var ch=class{constructor(){this._apiEncoder=new rh}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 oh(e.valueOf(),"r")}visitBls12381Fp(e){return oh(e.valueOf(),"p")}visitCalldata(e){const{functionId:t,args:n}=e.valueOf();return{functionId:Tp(t),args:n.map((e=>e.accept(this)))}}},uh=class extends qp{constructor(e){super(e,32,"hash")}},lh=class extends qp{constructor(e){super(e,64,"signature")}},mh=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.")}};const ph=["int","bool","string","bits","hash","bytes","signature","account_pubkey","contract_pubkey","channel","oracle_pubkey","oracle_query_id"];var dh=class extends mh{supports({name:e,_valueTypes:t}){return ph.includes(e)}create(e,t){switch(e.name){case"int":return new Hp(t);case"bool":return new Dp(t);case"string":return new Pd(t);case"bits":return new $p(t);case"hash":return new uh(t);case"bytes":return new qp(t,e.valueTypes);case"signature":return new lh(t);case"account_pubkey":return new Op(t);case"contract_pubkey":return new Xp(t);case"channel":return new Qp(t);case"oracle_pubkey":return new vd(t);case"oracle_query_id":return new Nd(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},hh=class extends mh{supports({name:e,_valueTypes:t}){return"list"===e}create(e,t){if(!Array.isArray(t))throw new Mp(e.name,`Fate list must be an Array, got ${t} instead`);const n=t.map((t=>this.valueFactory.create(e.valuesType,t)));return new rd(e.valuesType,n)}},fh=class extends mh{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 cd(e.valuesType,n)}},yh=class extends mh{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 sd(e.keyType,e.valueType,n)}},gh=class extends mh{supports({name:e,_valueTypes:t}){return"tuple"===e}create(e,t){if(!Array.isArray(t))throw new Mp(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 od(e.valueTypes,n)}},Nh=class extends mh{supports({name:e,_valueTypes:t}){return"record"===e}create(e,t){if("object"!=typeof t)throw new Mp(e.name,`Fate record must be an Object, got ${t} instead`);const n=Object.keys(t).length;if(n!==e.keys.length)throw new Mp(e.name,`Number of expected keys (${e.keys.length}) and actual keys (${n}) should match`);const r=e.valueTypes.map(((n,r)=>{const a=e.keys[r];return this.valueFactory.create(n,t[a])}));return 1===r.length?r[0]:new od(rp(e.keys,e.valueTypes),r)}};const wh=["variant","Chain.ttl","AENS.pointee","AENSv2.pointee","AENS.name","AENSv2.name"];var vh=class extends mh{supports({name:e,_valueTypes:t}){return wh.includes(e)}create(e,t){if(!this.isValid(t))throw new Mp(e.name,`Variant should be an object mapping constructor to array of values, got "${t}" instead`);const[n,r]=Object.entries(t)[0],a=e.variants.map((e=>{const[[,t]]=Object.entries(e);return t.length})),i=e.variants.findIndex((e=>{const[[t,r]]=Object.entries(e);return t===n}));if(-1===i)throw new Mp(e.name,`Unknown variant constructor: ${n}`);const[[,s]]=Object.entries(e.variants[i]);if(r.length!==s.length)throw new Mp(e.name,`"${n}" variant constructor expects ${s.length} argument(s) but got ${r.length} instead`);const o=this.valueFactory.createMultiple(s,r);return new Td(a,i,o,s,e.variants)}isValid(e){return"object"==typeof e&&null!==e&&1===Object.entries(e).length&&Array.isArray(Object.values(e)[0])}};const bh=e=>Array.from(cr.blake2b(e,null,32)),xh=["string","signature","bytes"];var _h=class extends mh{supports({name:e,_valueTypes:t}){return"event"===e}create({variantType:e,topics:t},n){const[r,...a]=t;if("bigint"!=typeof r)throw new Qm(`Event name hash (first topic) should be of type "BigInt", got "${typeof r}" instead.`);const i=e.variants.map((e=>Sp(bh(Object.keys(e)[0])))).findIndex((e=>e===r));if(-1===i)throw new Qm("Event name hash does not match any event variant constructor");const s=e.variants[i],o=Object.keys(s)[0],[c]=Object.values(s),u=c.map((e=>this._isData(e)?n:a.shift()));return this.valueFactory.create(e,{[o]:u})}_isData(e){return!(!xh.includes(e.name)||"bytes"===e.name&&e.size<=32)}};const Ph=["bls12_381.fr","bls12_381.fp"];var Ch=class extends mh{supports({name:e,_valueTypes:t}){return Ph.includes(e)}create(e,t){switch(e.name){case"bls12_381.fr":return new Id(t);case"bls12_381.fp":return new Md(t);default:throw new Error(`Unsupported type "${e.name}"`)}}},Ah=class extends mh{supports({name:e,_valueTypes:t}){return"calldata"===e}create(e,t){if(!Array.isArray(t))throw new Mp(e.name,`Fate calldata arguments must be an Array, got ${t} instead`);const n=this.valueFactory.createMultiple(e.argumentTypes,t),r=(a=e.functionName,bh(a).slice(0,4));var a;return new kd(r,e.argumentTypes,n)}},Sh=class{constructor(){this._factories=[new dh(this),new hh(this),new fh(this),new yh(this),new gh(this),new Nh(this),new _h(this),new vh(this),new Ch(this),new Ah(this)]}createMultiple(e,t){return fp(t.length===e.length,`Number of types (${e.length}) and values (${t.length}) should match`),((e,...t)=>e.map(((e,n)=>t.reduce(((e,t)=>[...e,t[n]]),[e]))))(e,t).map((e=>this.create(...e)))}create(e,t){const n=this._factories.find((t=>t.supports(e)));return fp(n,`Unsupported type "${e.name}"`),n.create(e,t)}},Th=class{constructor(){this._apiEncoder=new rh}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 Mp("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 Mp("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 Mp(e.name,`Should be one of: BigInt or Number; got ${t} instead`)}toBls12381Fr(e,t){return this.validateBls12381Field(e,t),sh(t,"r")}toBls12381Fp(e,t){return this.validateBls12381Field(e,t),sh(t,"p")}},zh=class extends Sh{constructor(){super(),this._mapper=new Th}create(e,t){const n=this._mapper.toInternal(e,t);return super.create(e,n)}},Eh=class{constructor(){this._serializer=new Hd,this._apiEncoder=new rh,this._externalDataFactory=new zh,this._canonicalMapper=new ch}encode(e,t){const n=this._externalDataFactory.create(e,t),r=this._serializer.serialize(n),a=new Uint8Array(r.flat(1/0));return this._apiEncoder.encode("contract_bytearray",a)}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)}},Ih=class{constructor(){this._internalEncoder=new Eh}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)}},Mh=n(2341),qh=n.n(Mh);function Rh(e){var t;return qr(null!==(t=qh()(e))&&void 0!==t?t:"")}function Oh(e){const t=(new pp).resolveType({record:[{name:"name",type:{option:["string"]}},{name:"version",type:{option:["int"]}},{name:"networkId",type:{option:["string"]}},{name:"contractAddress",type:{option:["contract_pubkey"]}}]},{});return qr(Cr((new Ih).encodeWithType(e,t)))}function kh(e,t,n){return qr(Xn([Br,new Uint8Array([0]),Oh(n),Rh(t),qr(Cr(e))]))}var Bh=n(8287).Buffer;function Gh(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")}function $h(e,t,n){const r=[t];n&&r.push("inner_tx");const a=Cr(e);return Xn([Bh.from(r.join("-")),qr(a)])}var Uh=new WeakMap;class Vh extends Km{constructor(e){super(),function(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)}(this,Uh,void 0),this.secretKey=e;const t=or().sign.keyPair.fromSeed(Cr(e));var n,r;n=Uh,r=t.secretKey,n.set(Gh(n,this),r),this.address=Ar(t.publicKey,ur.AccountAddress)}static generate(){const e=Ar(or().randomBytes(32),ur.AccountSecretKey);return new Vh(e)}async sign(e,t){return this.unsafeSign(e,t)}async unsafeSign(e,t){return or().sign.detached(Bh.from(e),(n=Uh).get(Gh(n,this)));var n}async signTransaction(e,{innerTx:t,networkId:n,...r}={}){if(null==n)throw new j("networkId","provided",n);const a=Cr(e),i=$h(e,n,!0===t),s=[await this.unsafeSign(i,r)];return to({tag:Xr.SignedTx,encodedTx:a,signatures:s})}async signMessage(e,t){return this.unsafeSign(Gr(e),t)}async signTypedData(e,t,{name:n,version:r,networkId:a,contractAddress:i,...s}={}){const o=kh(e,t,{name:n,version:r,networkId:a,contractAddress:i});return Ar(await this.unsafeSign(o,s),ur.Signature)}async signDelegation(e,{networkId:t}={}){if(null==t)throw new j("networkId","provided",t);const n=Xn([Br,new Uint8Array([1]),Bh.from(t),Cr(e)]);return Ar(await this.unsafeSign(n),ur.Signature)}}function Dh(e,{innerTx:t,gasUsed:n,queryFee:r,isInitiator:a}={}){const i=so(e);if(i.tag===Xr.SignedTx)throw new H("Transaction shouldn't be a SignedTx, use `getExecutionCostBySignedTx` instead");let s=0n;return"fee"in i&&"freeloader"!==t&&(s+=BigInt(i.fee)),i.tag===Xr.NameClaimTx&&(s+=BigInt(i.nameFee)),i.tag===Xr.OracleQueryTx&&(s+=BigInt(i.queryFee)),i.tag===Xr.OracleRespondTx&&(s-=BigInt(null!=r?r:0)),i.tag===Xr.ChannelSettleTx&&(!0===a&&(s-=BigInt(i.initiatorAmountFinal)),!1===a&&(s-=BigInt(i.responderAmountFinal))),i.tag!==Xr.SpendTx&&i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.ChannelDepositTx||"fee-payer"===t||(s+=BigInt(i.amount)),i.tag===Xr.ContractCreateTx&&(s+=BigInt(i.deposit)),i.tag!==Xr.ContractCreateTx&&i.tag!==Xr.ContractCallTx&&i.tag!==Xr.GaAttachTx&&i.tag!==Xr.GaMetaTx||"freeloader"===t||(s+=BigInt(i.gasPrice)*BigInt(null!=n?n:i.gasLimit)),i.tag!==Xr.GaMetaTx&&i.tag!==Xr.PayingForTx||(s+=Dh(no(i.tx.encodedTx),i.tag===Xr.PayingForTx?{innerTx:"fee-payer"}:{})),s}function Lh(e,t,n){const r=so(e,Xr.SignedTx);if(r.encodedTx.tag===Xr.GaMetaTx)return Dh(no(r.encodedTx),n);const a=no(r.encodedTx),i=Wm(a),[s,o]=[!0,!1].map((e=>Rr($h(a,t,e),r.signatures[0],i)));if(!s&&!o)throw new D("Can't verify signature");return Dh(no(r.encodedTx),{...s&&{innerTx:"freeloader"},...n})}async function jh(e,t,{isMined:n,...r}={}){let a=so(e);const i=a.tag===Xr.SignedTx,s=i&&!0===n&&oo(e);if(a.tag===Xr.SignedTx&&(a=a.encodedTx),null==r.gasUsed&&!1!==s&&[Xr.ContractCreateTx,Xr.ContractCallTx,Xr.GaAttachTx,Xr.GaMetaTx].includes(a.tag)){const{callInfo:e,gaInfo:n}=await t.getTransactionInfoByHash(s),a=null!=e?e:n;if(null==a)throw new ae(`callInfo and gaInfo is not available for transaction ${s}`);r.gasUsed=a.gasUsed}if(null==r.queryFee&&Xr.OracleRespondTx===a.tag&&(r.queryFee=(await t.getOracleByPubkey(a.oracleId)).queryFee.toString()),null==r.isInitiator&&Xr.ChannelSettleTx===a.tag&&!0!==n){const{initiatorId:e}=await t.getChannelByPubkey(a.channelId);r.isInitiator=a.fromId===e}return i?Lh(e,await t.getNetworkId(),r):Dh(e,r)}var Hh=n(8287).Buffer;const Fh=[];async function Jh(e,t,n){const r=Wm(no(e)),[a,{height:i},{consensusProtocolVersion:s,nodeNetworkId:o}]=await Promise.all([t.getAccountByPubkey(r).catch((e=>{if(!nr(e))throw e;return{id:r,balance:0n,nonce:0}})).then((e=>({...e,id:e.id}))),t.getCurrentKeyBlockHeight(),t.getNodeInfo()]);return(await Promise.all(Fh.map((async r=>r(e,{node:t,account:a,height:i,consensusProtocolVersion:s,nodeNetworkId:o,parentTxTypes:n}))))).flat()}async function Wh(e,t){const n=t.pipeline.clone();n.removePolicy({name:"parse-big-int"});const r=new Jm(t.$host,{ignoreVersion:!0,pipeline:n,additionalPolicies:[ec()]});return r._getCachedStatus=async()=>t._getCachedStatus(),Jh(so(e),r,[])}Fh.push(((e,{account:t,nodeNetworkId:n,parentTxTypes:r})=>{if(e.tag!==Xr.SignedTx)return[];const{encodedTx:a,signatures:i}=e;if(null==(null!=a?a:i))return[];if(1!==i.length)return[];const s=Hh.from([n,...r.includes(Xr.PayingForTx)?["inner_tx"]:[]].join("-")),o=Cr(no(a)),c=Xn([s,o]),u=Xn([s,qr(o)]);return Rr(c,i[0],t.id)||Rr(u,i[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?[]:Jh(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 a=await jh(no(e),r).catch((()=>0n));return a<=t.balance?[]:[{message:`Account balance ${t.balance} is not enough to execute the transaction that costs ${a}`,key:"InsufficientBalance",checkedKeys:["amount","fee","nameFee","gasLimit","gasPrice"]}]}),(async(e,{node:t})=>{if(e.tag!==Xr.SpendTx||Er(e.recipientId,ur.Name))return[];const n=await t.getAccountByPubkey(e.recipientId).catch((e=>{if(!nr(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===Xr.SignedTx&&"generalized"===t.kind&&0!==e.signatures.length&&(n="Generalized account can't be used to generate SignedTx with signatures"),e.tag===Xr.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 a=Xr.OracleRegisterTx===e.tag,i=Xr.ContractCreateTx===e.tag||Xr.GaAttachTx===e.tag,s=Xr.ContractCallTx===e.tag||Xr.GaMetaTx===e.tag,o=null!==(n=null!==(r=a?"oracle-call":null)&&void 0!==r?r:i?"contract-create":null)&&void 0!==n?n:s?"contract-call":null;if(null==o)return[];const c=Ba[t][o];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)||i&&!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(Xr.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 Gn)||null==e.response?.bodyAsText)throw e;return[{message:JSON.parse(e.response.bodyAsText).reason,key:"ContractNotFound",checkedKeys:["contractId"]}]}}));class Kh extends D{constructor(e,t,n){super(e),this.name="InvalidTxError",this.validation=t,this.transaction=n}}async function Yh(e,{onNode:t,onAccount:n,verify:r=!0,waitMined:a=!0,confirm:i,innerTx:s,...o}){const c=await n.signTransaction(e,{...o,onNode:t,innerTx:s,networkId:await t.getNetworkId()});if(!0===s)return{hash:oo(c),rawTx:c};if(r){const e=await Wh(c,t);if(e.length>0){const t=`Transaction verification errors: ${e.map((e=>e.message)).join(", ")}`;throw new Kh(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(a){const e=await wa(r,{onNode:t,...o}),n={...e,hash:e.hash,rawTx:c};if(null!=i&&+i>0){const e="boolean"==typeof i?void 0:i;return{...n,confirmationHeight:await ba(r,{onNode:t,confirm:e,...o})}}return n}return{hash:r,rawTx:c}}catch(e){throw rr(e),Object.assign(e,{rawTx:c,verifyTx:async()=>Wh(c,t)})}}var Qh=n(8287).Buffer;const Zh=e=>Qh.from(e).toString("base64").replaceAll("/","_").replaceAll("+","-").replace(/=+$/,""),Xh=e=>Qh.from(e.replaceAll("_","/").replaceAll("-","+"),"base64"),ef=e=>{var t;return Zh(null!==(t=qh()(e))&&void 0!==t?t:"")},tf="eyJhbGciOiJFZERTQSIsInR5cCI6IkpXVCJ9";async function nf(e,t){const n={...e};"sub_jwk"in n||(n.sub_jwk={kty:"OKP",crv:"Ed25519",x:Zh(Cr(t.address))}),void 0===n.sub_jwk&&delete n.sub_jwk;const r=`${tf}.${ef(n)}`,a=await t.unsafeSign(r);return`${r}.${Zh(a)}`}function rf(e,t){var n;const r=e.split(".");if(3!==r.length)throw new j("JWT components count",3,r.length);const[a,i,s]=r;if(a!==tf)throw new j("JWT header",tf,a);const o=JSON.parse(Xh(i).toString()),c=null!==(n=o.sub_jwk)&&void 0!==n?n:{},u=null==c.x||"OKP"!==c.kty||"Ed25519"!==c.crv?t:Ar(Xh(c.x),ur.AccountAddress);if(null!=t&&u!==t)throw new j("address",`${u} ("sub_jwk")`,t);if(null!=u&&!Rr(Qh.from(`${a}.${i}`),Xh(s),u))throw new He(`JWT is not signed by ${u}`);return{payload:o,signer:u}}function af(e){try{return rf(e),!0}catch(e){return!1}}function sf(e){rf(e)}function of(e,t){try{const{signer:n}=rf(e,t);return null!=n}catch(e){return!1}}let cf=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 uf=Ja(ur.OracleAddress),lf={serialize(e){return uf.serialize(Ar(Cr(e),ur.OracleAddress))},deserialize(e){return Ar(Cr(uf.deserialize(e)),ur.OracleQueryId)}},mf=Ja(ur.ContractAddress),pf=[{tag:Qi(cf.AensWildcard),version:Qi(1,!0),accountAddress:Ja(ur.AccountAddress),contractAddress:mf},{tag:Qi(cf.AensName),version:Qi(1,!0),accountAddress:Ja(ur.AccountAddress),nameId:Vi,contractAddress:mf},{tag:Qi(cf.AensPreclaim),version:Qi(1,!0),accountAddress:Ja(ur.AccountAddress),contractAddress:mf},{tag:Qi(cf.Oracle),version:Qi(1,!0),accountAddress:Ja(ur.AccountAddress),contractAddress:mf},{tag:Qi(cf.OracleResponse),version:Qi(1,!0),queryId:lf,contractAddress:mf}];function df(e){return ys(pf,cf,e,{},ur.Bytearray)}function hf(e,t){return gs(pf,cf,e,t,{})}function ff(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")}class yf extends re{constructor(e,t){super(`Can't ${t} because ${e} is not an auction name`),this.name="NotAuctionNameError"}}var gf=new WeakMap;class Nf{constructor(e,t){var n,r,a;a=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=gf),r.set(n,a),this.value=e,this.options=t,this.options=t}get id(){return ia(this.value)}async revoke(e={}){const t={...this.options,...e};return Yh(await io({_isInternalBuild:!0,...t,tag:Xr.NameRevokeTx,nameId:this.value,accountId:t.onAccount.address}),t)}async update(e,t={}){const{extendPointers:n,...r}={...this.options,...t},a={...!0===n&&Object.fromEntries((await r.onNode.getNameEntryByName(this.value)).pointers.map((({key:e,id:t})=>[e,t]))),...e},i=Object.values(a).some((e=>Er(e,ur.Bytearray))),s=await io({_isInternalBuild:!0,...r,tag:Xr.NameUpdateTx,version:i?2:1,nameId:this.value,accountId:r.onAccount.address,pointers:Object.entries(a).map((([e,t])=>({key:e,id:t})))});return Yh(s,r)}async transfer(e,t={}){const n={...this.options,...t};return Yh(await io({_isInternalBuild:!0,...n,tag:Xr.NameTransferTx,nameId:this.value,accountId:n.onAccount.address,recipientId:e}),n)}async getState(e={}){var t;const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getNameEntryByName(this.value);return{...r,id:r.id,owner:r.owner}}async getAuctionState(e={}){var t;if(!fa(this.value))throw new yf(this.value,"get auction state");const n=null!==(t=e.onNode)&&void 0!==t?t:this.options.onNode,r=await n.getAuctionEntryByName(this.value);return{...r,id:r.id,highestBidder:r.highestBidder}}async extendTtl(e,t={}){return this.update({},{...t,nameTtl:e,extendPointers:!0})}async claim(e={}){const t={...this.options,...e};var n;return Yh(await io({_isInternalBuild:!0,nameSalt:(n=gf,n.get(ff(n,this))),...t,tag:Xr.NameClaimTx,accountId:t.onAccount.address,name:this.value}),t)}async preclaim(e={}){const t={...this.options,...e},n=Ir(),r=await io({_isInternalBuild:!0,...t,tag:Xr.NamePreclaimTx,accountId:t.onAccount.address,commitmentId:sa(this.value,n)}),a=await Yh(r,t);var i,s;return s=n,(i=gf).set(ff(i,this),s),{...a,nameSalt:n}}async bid(e,t={}){if(!fa(this.value))throw new yf(this.value,"make a bid");const n={...this.options,...t};return Yh(await io({_isInternalBuild:!0,...n,tag:Xr.NameClaimTx,accountId:n.onAccount.address,nameSalt:0,name:this.value,nameFee:e}),n)}}const wf=({type:e})=>{let t,n=e;var r;return(r=n)&&"object"==typeof r&&r.constructor===Object&&([[n,t]]=Object.entries(n)),"option"===n};var vf=class extends mp{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(wf);return{types:e,required:e.length-t.length}}if("init"===t)return{types:[],required:0};throw new Qm(`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 Qm(`Unknown function ${t}`);return this.resolveType(n.returns)}getEventType(e,t){const n=this.getNamespaceAci(e);if(!n.hasOwnProperty("event"))throw new Qm("Missing event declaration");return((e,t)=>({name:"event",variantType:e,topics:t}))(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 Qm("Unknown namespace for "+JSON.stringify(e));if(a.name===e)return["contract_pubkey",[]];const i=[...a.typedefs||a.type_defs,...a.state?[{name:"state",typedef:a.state,vars:[]}]:[]].find((e=>e.name===r));if(!i)throw new Qm("Unknown type definition: "+JSON.stringify(e));const s={};return i.vars.forEach(((e,n)=>{const[[r,a]]=Object.entries(e);s[a]=t[n]})),[s.hasOwnProperty(i.typedef)?s[i.typedef]:i.typedef,s]}},bf=class{constructor(){this._dataFactory=new Sh,this._apiEncoder=new rh,this._canonicalMapper=new ch}decodeWithType(e,t){const n=this._apiEncoder.decode(e),r=this._dataFactory.create(t,n);return this._canonicalMapper.toCanonical(r)}};class xf extends Error{constructor(e){super(e),this.name="EncoderError"}}var _f=xf,Pf=class{constructor(e){this._byteArrayEncoder=new Eh,this._typeResolver=new vf(e),this._apiEncoder=new rh,this._eventEncoder=new bf,this._canonicalMapper=new ch}encode(e,t,n){const{types:r,required:a}=this._typeResolver.getCallTypes(e,t);if(n.length>r.length||n.length<a)throw new _f(`Non matching number of arguments. ${t} expects between ${a} and ${r.length} number of arguments but got ${n.length}`);for(;n.length<r.length;)n.push(void 0);return this._byteArrayEncoder.encode({name:"calldata",functionName:t,argumentTypes: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,{name:"string"})}decodeEvent(e,t,n){const r=this._typeResolver.getEventType(e,n);return this._eventEncoder.decodeWithType(t,r)}},Cf=class{constructor(e){this._internalEncoder=new Pf(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)}};function Af(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sf(e,t){return e.get(Tf(e,t))}function Tf(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 zf=new WeakSet,Ef=new WeakMap;function If({returnType:e,returnValue:t,log:n},r,a,i){let s;switch(e){case"ok":{const e=Tf(zf,this,qf).call(this,r);return{decodedResult:this._calldata.decode(this._name,e.name,t),decodedEvents:this.$decodeEvents(n,i)}}case"revert":s=this._calldata.decodeFateString(t);break;case"error":if(s=Cr(t).toString(),/Expected \d+ arguments, got \d+/.test(s))throw new xe("ACI",`. Error provided by node: "${s}".`);if(/Trying to call undefined function: <<\d+,\d+,\d+,\d+>>/.test(s))throw new xe("ACI",`. Error provided by node: "${s}", function name: ${r}.`);break;default:throw new ae(`Unknown return type: ${e}`)}throw new ze(s,a)}async function Mf(e,t,n){const r=await Yh(e,{...this.$options,...n});return{hash:r.hash,tx:so(r.rawTx),txData:r,rawTx:r.rawTx,...null!=r.blockHeight&&await this.$getCallResultByTxHash(r.hash,t,n)}}function qf(e){const t=Sf(Ef,this).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 Ee(e)}function Rf(e,t,{contractAddressToName:n}){const r={...this.$options.contractAddressToName,...n};if(null!=r[e])return r[e];const a=this._aci.map((({contract:e})=>e)).filter((e=>e?.event)),i=a.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${qr(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(i.length){case 0:throw new Me(t.toString(),e);case 1:return i[0][0];default:throw new qe(e,i)}}const Of=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 $(`callInfo is not available for transaction ${e}`);const a=r;return{...Tf(zf,this,If).call(this,a,t,void 0,n),result:a}}async _estimateGas(e,t,n={}){const{result:r}=await this.$call(e,t,{...n,callStatic:!0});if(null==r)throw new ie;const{gasUsed:a}=r;return Math.floor(1.25*a)}async $deploy(e,t){var n;const{callStatic:r,...a}={...this.$options,...t};if(null==this.$options.bytecode&&await this.$compile(),!0===r)return this.$call("init",e,{...a,callStatic:r});if(null!=this.$options.address)throw new _e;if(null==a.onAccount)throw new H("Can't deploy without account");const i=a.onAccount.address;if(null==this.$options.bytecode)throw new H("Can't deploy without bytecode");const s=await io({_isInternalBuild:!0,...a,tag:Xr.ContractCreateTx,gasLimit:null!==(n=a.gasLimit)&&void 0!==n?n:await this._estimateGas("init",e,a),callData:this._calldata.encode(this._name,"init",e),code:this.$options.bytecode,ownerId:i}),{hash:o,...c}=await Tf(zf,this,Mf).call(this,s,"init",{...a,onAccount:a.onAccount});return this.$options.address=co(c.rawTx),{...c,...null!=c.result?.log&&{decodedEvents:this.$decodeEvents(c.result.log,a)},owner:i,transaction:o,address:this.$options.address}}async $call(e,t,n={}){var r;const{callStatic:a,top:i,...s}={...this.$options,...n},o=Tf(zf,this,qf).call(this,e),{address:c,name:u}=this.$options,l=null!=u?ia(u):c,{onNode:m}=s;if(null==e)throw new Te;if("init"===e&&!0!==a)throw new Ce('"init" can be called only via dryRun');if("init"!==e&&null!=s.amount&&Number(s.amount)>0&&!o.payable)throw new Ie(s.amount,e);let p;try{if(null==s.onAccount)throw new ae("Use fallback account");p=s.onAccount.address}catch(e){if(!0!==a||!(e instanceof Z&&"Account should be an address (ak-prefixed string), or instance of AccountBase, got undefined instead"===e.message||e instanceof Qe||e instanceof ae&&"Use fallback account"===e.message))throw e;p=Dr.pub}const d=this._calldata.encode(this._name,e,t);if(!0===a){if(null==s.nonce){const e=null!=i&&{["number"==typeof i?"height":"hash"]:i},t=await xa(p,{...e,onNode:m}).catch((e=>{if(!nr(e))throw e;return{kind:"basic",nonce:0}}));s.nonce="generalized"===t.kind?0:t.nonce+1}const t={...s,onNode:m,callData:d};let n;if("init"===e){if(null==this.$options.bytecode)throw new H('Can\'t dry-run "init" without bytecode');n=await io({...t,tag:Xr.ContractCreateTx,code:this.$options.bytecode,ownerId:p})}else{if(null==l)throw new Ae("Can't dry-run contract without address");n=await io({...t,tag:Xr.ContractCallTx,callerId:p,contractId:l})}const{callObj:r,...a}=await Ia(n,p,{...s,top:i});if(null==r)throw new ae(`callObj is not available for transaction ${n}`);const o=r;return{...a,...Tf(zf,this,If).call(this,o,e,n,s),tx:so(n),result:o,rawTx:n,hash:oo(n),txData:void 0}}if(null!=i)throw new H("Can't handle `top` option in on-chain contract call");if(null==l)throw new Ae("Can't call contract without address");const h=await io({_isInternalBuild:!0,...s,tag:Xr.ContractCallTx,gasLimit:null!==(r=s.gasLimit)&&void 0!==r?r:await this._estimateGas(e,t,s),callerId:p,contractId:l,callData:d});if(null==s.onAccount)throw new H("Can't call contract on chain without account");return Tf(zf,this,Mf).call(this,h,e,{...s,onAccount:s.onAccount})}$decodeEvents(e,{omitUnknown:t,...n}={}){return e.map((e=>{let r;try{r=Tf(zf,this,Rf).call(this,e.address,e.topics[0],n)}catch(e){if(null!=t&&t&&e instanceof Me)return null;throw e}const a=this._calldata.decodeEvent(r,e.data,e.topics),[i,s]=Object.entries(a)[0];return{name:i,args:s,contract:{name:r,address:e.address}}})).filter((e=>null!=e))}static async initialize({onCompiler:e,onNode:t,bytecode:n,aci:r,address:a,sourceCodePath:i,sourceCode:s,fileSystem:o,validateBytecode:c,...u}){if(null==r&&null!=e){let t;null!=i&&(t=await e.compile(i)),null!=s&&(t=await e.compileBySourceCode(s,o)),null!=t&&(r=t.aci,null!=n||(n=t.bytecode))}if(null==r)throw new Se;let l;if(null!=a&&ua(a=await Oa(a,"contract_pubkey",{resolveByNode:!0,onNode:t}))&&(l=a),null==a&&null==s&&null==i&&null==n)throw new Ae("Can't create instance by ACI without address");if(null!=a&&null==(await t.getContract(a)).active)throw new Pe(a);if(!0===c){if(null==a)throw new Ae("Can't validate bytecode without contract address");const r=(await t.getContractCode(a)).bytecode;let c=!1;if(null!=n)c=n===r;else if(null!=s){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validateBySourceCode(r,s,o)}else if(null!=i){if(null==e)throw new H("Can't validate bytecode without compiler");c=await e.validate(r,i)}if(!c)throw new xe(null!=(null!=s?s:i)?"source code":"bytecode")}return new Of({onCompiler:e,onNode:t,sourceCode:s,sourceCodePath:i,bytecode:n,aci:r,address:a,name:l,fileSystem:o,...u})}constructor({aci:e,...t}){var n;Af(this,n=zf),n.add(this),function(e,t){Af(e,t),t.set(e,void 0)}(this,Ef),this._aci=e;const r=e[e.length-1];if(null==r.contract)throw new H(`The last 'aci' item should have 'contract' key, got ${Object.keys(r)} keys instead`);!function(e,t,n){e.set(Tf(e,t),n)}(Ef,this,r.contract),this._name=Sf(Ef,this).name,this._calldata=new Cf(e),this.$options=t,Object.assign(this,Object.fromEntries(Sf(Ef,this).functions.map((({name:e,arguments:t,stateful:n})=>{const r="init"!==e&&!n;return[e,async(...n)=>{const a=n.length===t.length+1?n.pop():{};if("object"!=typeof a)throw new Z(`Options should be an object: ${a}`);return"init"===e?this.$deploy(n,{callStatic:r,...a}):this.$call(e,n,{callStatic:r,...a})}]}))))}};var kf=Of;function Bf(e){return{...e,id:e.id,decodedQuery:Cr(e.query).toString(),decodedResponse:Cr(e.response).toString()}}class Gf{constructor(e,t){this.address=e,this.options=t}async getState(e={}){return{...this.options,...e}.onNode.getOracleByPubkey(this.address)}async getQueries(e={}){const t={...this.options,...e};return(await t.onNode.getOracleQueriesByPubkey(this.address)).oracleQueries.map(Bf)}async getQuery(e,t={}){const{onNode:n}={...this.options,...t};return Bf(await n.getOracleQueryByPubkeyAndQueryId(this.address,e))}}function $f(e,t,n){return e.set(Vf(e,t),n),n}function Uf(e,t){return e.get(Vf(e,t))}function Vf(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 Df=new WeakMap;class Lf extends Gf{constructor(e,t){var n,r,a;super(Ar(Cr(e.address),ur.OracleAddress),t),a=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=Df),r.set(n,a),this.account=e,this.options=t}async register(e,t,n={}){const r={...this.options,...n};return Yh(await io({_isInternalBuild:!0,...r,tag:Xr.OracleRegisterTx,accountId:this.account.address,queryFormat:e,responseFormat:t}),{...r,onAccount:this.account})}async extendTtl(e={}){const t={...this.options,...e};return Yh(await io({_isInternalBuild:!0,...t,tag:Xr.OracleExtendTx,oracleId:this.address}),{...t,onAccount:this.account})}pollQueries(e,t={}){const n={...this.options,...t},r=new Set;let a=!1;const i=async()=>{if(a)return;a=!0;const i=(await this.getQueries(n)).filter((({id:e})=>!r.has(e))).filter((e=>!0===t.includeResponded||""===e.decodedResponse));i.forEach((e=>r.add(e.id))),a=!1,await Promise.all(i.map((t=>e(t))))};i();const s=(async e=>{const t=null!==(e=n.interval)&&void 0!==e?e:await ya("micro-block",n);return setInterval((async()=>i()),t)})();return async()=>{const e=await s;clearInterval(e)}}async respondToQuery(e,t,n={}){const r={...this.options,...n};return Yh(await io({_isInternalBuild:!0,...r,tag:Xr.OracleRespondTx,oracleId:this.address,queryId:e,response:t}),{...r,onAccount:this.account})}handleQueries(e,t={}){if(null!=Uf(Df,this))throw new re("Another query handler already running, it needs to be stopped to run a new one");const n={...this.options,...t};let r=Promise.resolve();const a=async t=>{const a=await e(t),i=r.then((async()=>this.respondToQuery(t.id,a,n)));r=i.then((()=>{}),(()=>{})),await i};$f(Df,this,Promise.resolve());const i=this.pollQueries((async e=>{const t=a(e);if(null==Uf(Df,this))throw new ie;return $f(Df,this,Uf(Df,this).then((async()=>t)).then((()=>{}),(()=>{}))),t}),n);return async()=>{i(),await Uf(Df,this),$f(Df,this,void 0)}}}class jf extends Gf{constructor(e,t){super(e,t),this.options=t}async postQuery(e,t={}){const n={...this.options,...t},r=n.onAccount.address,a=await io({_isInternalBuild:!0,...n,tag:Xr.OracleQueryTx,oracleId:this.address,senderId:r,query:e}),{nonce:i}=so(a,Xr.OracleQueryTx);return{...await Yh(a,n),queryId:na(r,i,this.address)}}async pollForResponse(e,t={}){var n;const r={...this.options,...t},a=null!==(n=r.interval)&&void 0!==n?n:await ya("micro-block",r);let i,s,o;do{({response:o,ttl:s}=await this.getQuery(e,r));const t=Cr(o);if(t.length>0)return t.toString();await Qn(a),i=await Na({...r,cached:!0})}while(s>=i);throw new Y(i)}async query(e,t={}){const{queryId:n}=await this.postQuery(e,t);return this.pollForResponse(n,t)}}async function Hf(e,t,n){return Yh(await io({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:n.onAccount.address,recipientId:await Oa(t,"account_pubkey",n),amount:e}),n)}async function Ff(e,t,n){if(+e<0||+e>1)throw new j("fraction","a number between 0 and 1",e);const r=await Oa(t,"account_pubkey",n),a=n.onAccount.address,i=new I(await _a.bind(n.onAccount)(a,n)),s=i.times(e).integerValue(I.ROUND_HALF_UP),{fee:o}=so(await io({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:s}),Xr.SpendTx),c=s.plus(o).gt(i)?i.minus(o):s;return Yh(await io({_isInternalBuild:!0,...n,tag:Xr.SpendTx,senderId:a,recipientId:r,amount:c}),n)}async function Jf(e,t){return Yh(await io({_isInternalBuild:!0,...t,tag:Xr.PayingForTx,payerId:t.onAccount.address,tx:e}),t)}var Wf=n(8287).Buffer;async function Kf(e,t,{onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u,...l}){var m;const p=n.address;if("generalized"===(await xa(p,{onNode:a})).kind)throw new H(`Account ${p} is already GA`);const d=await kf.initialize({onAccount:n,onCompiler:r,onNode:a,bytecode:i,aci:s,sourceCodePath:o,sourceCode:c,fileSystem:u}),h=await io({_isInternalBuild:!0,...l,tag:Xr.GaAttachTx,onNode:a,code:await d.$compile(),gasLimit:null!==(m=l.gasLimit)&&void 0!==m?m:await d._estimateGas("init",t,l),ownerId:p,callData:d._calldata.encode(d._name,"init",t),authFun:qr(e)}),{hash:f,rawTx:y}=await Yh(h,{onNode:a,onAccount:n,onCompiler:r,...l}),g=co(y);return Object.freeze({owner:p,transaction:f,rawTx:y,gaContractId:g})}async function Yf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a,...i}){const{nodeNetworkId:s}=await r.getNodeInfo();let o=qr(Xn([Wf.from(s),Cr(e)]));if(null==t)throw new j("fee","provided (in Ceres)",t);if(null==n)throw new j("gasPrice","provided (in Ceres)",n);return o=qr(Cr(Zs({tag:is.GaMetaTxAuthData,fee:t,gasPrice:n,txHash:Ar(o,ur.TxHash),...!0===i[Va]?{[Va]:!0}:{protocolParameters:null!=a?a:await Ci(r)}}))),o}async function Qf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a}){return Yf(e,{fee:t,gasPrice:n,onNode:r,protocolParameters:a})}async function Zf(e,{onNode:t}){const n=so(e,Xr.SignedTx);if(n.encodedTx.tag!==Xr.GaMetaTx)throw new j("transaction","to include GaMetaTx",Xr[n.encodedTx.tag]);return Yf(no(n.encodedTx.tx.encodedTx),{fee:n.encodedTx.fee,gasPrice:n.encodedTx.gasPrice,onNode:t,[Va]:!0})}var Xf=n(4997),ey=n(2321),ty=n(2231);function ny(e){return ny="function"==typeof ey&&"symbol"==typeof ty?function(e){return typeof e}:function(e){return e&&"function"==typeof ey&&e.constructor===ey&&e!==ey.prototype?"symbol":typeof e},ny(e)}var ry=n(9280);function ay(e,t,n){return(t=function(e){var t=function(e){if("object"!=ny(e)||!e)return e;var t=e[ry];if(void 0!==t){var n=t.call(e,"string");if("object"!=ny(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==ny(t)?t:t+""}(t))in e?Xf(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function iy(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")}const sy={...t,sendTransaction:Yh,...o,...c};var oy=new WeakMap;class cy{constructor(e={}){var t,n;ay(this,"_options",{}),function(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)}(this,oy,void 0),Object.assign(this._options,e),t=oy,n={onAccount:ar((()=>this._options.onAccount)),onNode:ar((()=>this._options.onNode)),onCompiler:ar((()=>this._options.onCompiler))},t.set(iy(t,this),n)}getContext(e={}){return{...this._options,...(t=oy,t.get(iy(t,this))),...e};var t}async buildTx(e){return io({...this.getContext(),...e})}}Object.assign(cy.prototype,Zn(sy,(([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 uy=cy;function ly(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 my=new WeakMap;class py extends uy{constructor({nodes:e=[],...t}={}){var n,r;super(t),ay(this,"pool",new Map),function(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)}(this,my,void 0),e.forEach((({name:e,instance:t},n)=>this.addNode(e,t,0===n))),n=my,r={onNode:ar((()=>this.api)),onCompiler:ar((()=>this.compilerApi)),onAccount:ar((()=>this._resolveAccount()))},n.set(ly(n,this),r)}get compilerApi(){if(null==this._options.onCompiler)throw new G("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 $e(e);this.pool.set(e,t),(n||null==this.selectedNodeName)&&this.selectNode(e)}selectNode(e){if(!this.pool.has(e))throw new Ue(`Node with name ${e} not in pool`);this.selectedNodeName=e}isNodeConnected(){return null!=this.selectedNodeName}ensureNodeConnected(){if(!this.isNodeConnected())throw new Ue("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 te("Address in AccountResolver");if("object"==typeof e)return e;throw new Z(`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,t={}){return this.unsafeSign(e,t)}async unsafeSign(e,{onAccount:t,...n}={}){return this._resolveAccount(t).unsafeSign(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 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,...(t=my,t.get(ly(t,this))),...e,...null!=e.onAccount&&{onAccount:this._resolveAccount(e.onAccount)}};var t}}class dy extends py{constructor({accounts:e,...t}={}){super(t),ay(this,"accounts",{}),e?.forEach(((e,t)=>this.addAccount(e,{select:0===t})))}_resolveAccount(e=this.selectedAddress){if("string"==typeof e){const t=e;if(Cr(t),null==this.accounts[t])throw new se(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 se(e);delete this.accounts[e],this.selectedAddress===e&&delete this.selectedAddress}selectAccount(e){if(Cr(e),null==this.accounts[e])throw new se(e);this.selectedAddress=e}}let hy=function(e){return e.to_waellet="to_waellet",e.to_aepp="to_aepp",e}({}),fy=function(e){return e.window="window",e.extension="extension",e}({}),yy=function(e){return e.subscribe="subscribe",e.unsubscribe="unsubscribe",e}({}),gy=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.signDelegation="delegation.sign",e.subscribeAddress="address.subscribe",e.updateNetwork="networkId.update",e.closeConnection="connection.close",e}({}),Ny=function(e){return e.CONNECTED="CONNECTED",e.DISCONNECTED="DISCONNECTED",e.WAITING_FOR_CONNECTION_REQUEST="WAITING_FOR_CONNECTION_REQUEST",e}({});const wy=[];class vy extends q{toJSON(){return{code:this.code,message:this.message,data:this.data}}static deserialize(e){const t=wy.find((t=>t.code===e.code));if(null==t)throw new ae(`Can't find RpcError with code: ${e.code}`);return new t(e.data)}}class by extends vy{constructor(e){super("Invalid transaction"),ay(this,"code",2),this.data=e,this.name="RpcInvalidTransactionError"}}ay(by,"code",2),wy.push(by);class xy extends vy{constructor(e){super("Operation rejected by user"),ay(this,"code",4),this.data=e,this.name="RpcRejectedByUserError"}}ay(xy,"code",4),wy.push(xy);class _y extends vy{constructor(){super("Unsupported Protocol Version"),ay(this,"code",5),this.name="RpcUnsupportedProtocolError"}}ay(_y,"code",5),wy.push(_y);class Py extends vy{constructor(e){super("Wallet deny your connection request"),ay(this,"code",9),this.data=e,this.name="RpcConnectionDenyError"}}ay(Py,"code",9),wy.push(Py);class Cy extends vy{constructor(){super("You are not connected to the wallet"),ay(this,"code",10),this.name="RpcNotAuthorizeError"}}ay(Cy,"code",10),wy.push(Cy);class Ay extends vy{constructor(e){super(`You are not subscribed for account ${e}`),ay(this,"code",11),this.data=e,this.name="RpcPermissionDenyError"}}ay(Ay,"code",11),wy.push(Ay);class Sy extends vy{constructor(){super("The peer failed to execute your request due to unknown error"),ay(this,"code",12),this.name="RpcInternalError"}}ay(Sy,"code",12),wy.push(Sy);class Ty extends vy{constructor(e){super(`Wallet can't find a network by id "${e}"`),ay(this,"code",13),this.data=e,this.name="RpcNoNetworkById"}}ay(Ty,"code",13),wy.push(Ty);class zy extends vy{constructor(){super("Method not found"),ay(this,"code",-32601),this.name="RpcMethodNotFoundError"}}ay(zy,"code",-32601),wy.push(zy);var Ey=n(8287).Buffer;class Iy extends Km{constructor(e,t){super(),this._rpcClient=e,this.address=t}async sign(e){return this.unsafeSign(e)}async unsafeSign(e){const t=Ar(Ey.from(e),ur.Bytearray),{signature:n}=await this._rpcClient.request(gy.unsafeSign,{onAccount:this.address,data:t});return Cr(n)}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null==n)throw new j("networkId","provided",n);const r=await this._rpcClient.request(gy.sign,{onAccount:this.address,tx:e,returnSigned:!0,networkId:n,innerTx:t});if(null==r.signedTransaction)throw new ee("signedTransaction is missed in wallet response");return r.signedTransaction}async signMessage(e){const{signature:t}=await this._rpcClient.request(gy.signMessage,{onAccount:this.address,message:e});return Ey.from(t,"hex")}async signTypedData(e,t,{name:n,version:r,contractAddress:a,networkId:i}={}){const{signature:s}=await this._rpcClient.request(gy.signTypedData,{onAccount:this.address,domain:{name:n,version:r,networkId:i,contractAddress:a},aci:t,data:e});return s}async signDelegation(e){const{signature:t}=await this._rpcClient.request(gy.signDelegation,{delegation:e,onAccount:this.address});return t}}function My(e,t,n){qy(e,t),t.set(e,n)}function qy(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Ry(e,t){return e.get(ky(e,t))}function Oy(e,t,n){return e.set(ky(e,t),n),n}function ky(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 By=new WeakMap,Gy=new WeakMap,$y=new WeakMap,Uy=new WeakSet;class Vy{constructor(e,t,n){var r;qy(this,r=Uy),r.add(this),My(this,By,new Map),My(this,Gy,0),My(this,$y,void 0),this.connection=e,Oy($y,this,n),e.connect(ky(Uy,this,Dy).bind(this),t)}async request(e,t){return ky(Uy,this,Ly).call(this,Oy(Gy,this,Ry(Gy,this)+1),e,t),new Promise(((e,t)=>{Ry(By,this).set(Ry(Gy,this),{resolve:e,reject:t})}))}notify(e,t){ky(Uy,this,Ly).call(this,void 0,e,t)}}async function Dy(e,t){if("2.0"!==e?.jsonrpc)throw new le(JSON.stringify(e));if("result"in e||"error"in e)return void ky(Uy,this,Hy).call(this,e);const n=e;let r,a;try{if(!(n.method in Ry($y,this)))throw new zy;const e=n.method;r=await Ry($y,this)[e](n.params,t)}catch(e){rr(e),a=e}if(null!=n.id&&ky(Uy,this,jy).call(this,n.id,n.method,r,null==a||a instanceof vy?a:new Sy),null!=a&&!(a instanceof vy))throw a}function Ly(e,t,n){this.connection.sendMessage({jsonrpc:"2.0",...null!=e?{id:e}:{},method:t,...null!=n?{params:n}:{}})}function jy(e,t,n,r){this.connection.sendMessage({jsonrpc:"2.0",id:e,method:t,...null!=r?{error:r.toJSON()}:{result:n}})}function Hy({id:e,error:t,result:n}){const r=Ry(By,this).get(e);if(null==r)throw new me(e);null!=t?r.reject(vy.deserialize(t)):r.resolve(n),Ry(By,this).delete(e)}class Fy extends py{constructor({name:e,onAddressChange:t=()=>{},onDisconnect:n=()=>{},onNetworkChange:r=()=>{},...a}){super(a),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(Cr(t),!this.addresses().includes(t))throw new pe(t);this._ensureConnected(),e=new Iy(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 Ye("You are already connected to wallet");let r;const a=e=>{if(t){if(null==e.node?.url)throw new Ze("Missing URLs of the Node");this.pool.delete(n),this.addNode(n,new Jm(e.node.url),!0)}this.onNetworkChange(e)},i=new Vy(e,(()=>{delete this.rpcClient,delete this._accounts,this.onDisconnect(r)}),{[gy.updateAddress]:e=>{this._accounts=e,this.onAddressChange(e)},[gy.updateNetwork]:a,[gy.closeConnection]:e=>{r=e,i.connection.disconnect()},[gy.readyToConnect]:()=>{}}),s=await i.request(gy.connect,{name:this.name,version:1,connectNode:t});return a(s),this.rpcClient=i,s}disconnectWallet(){this._ensureConnected(),this.rpcClient.notify(gy.closeConnection,{reason:"bye"}),this.rpcClient.connection.disconnect()}async askAddresses(){return this._ensureConnected(),this.rpcClient.request(gy.address,void 0)}async subscribeAddress(e,t){this._ensureConnected();const n=await this.rpcClient.request(gy.subscribeAddress,{type:e,value:t});return this._accounts=n.address,n}async askToSelectNetwork(e){this._ensureConnected(),await this.rpcClient.request(gy.updateNetwork,e)}_ensureConnected(){if(null==this.rpcClient)throw new Qe("You are not connected to Wallet")}_ensureAccountAccess(){if(this._ensureConnected(),0===this.addresses().length)throw new he}}var Jy=n(228);function Wy(e,t,n){Ky(e,t),t.set(e,n)}function Ky(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Yy(e,t,n){return e.set(Zy(e,t),n),n}function Qy(e,t){return e.get(Zy(e,t))}function Zy(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 Xy=new WeakMap,eg=new WeakSet,tg=new WeakMap;class ng extends Jy{get isConnected(){return null!=Qy(Xy,this)}get accounts(){return Qy(tg,this)}constructor(){var e;super(),Ky(this,e=eg),e.add(this),Wy(this,Xy,void 0),Wy(this,tg,[])}static async _connect(e,t,n,r){let a;const i=new Vy(t,(()=>{Yy(Xy,n,void 0),Yy(tg,n,[]),n.emit("disconnect",a)}),{[gy.updateAddress]:Zy(eg,n,ag).bind(n),[gy.updateNetwork]:n._updateNetwork.bind(n),[gy.closeConnection]:e=>{a=e,i.connection.disconnect()},[gy.readyToConnect]:()=>{}});Yy(Xy,n,i);const s=await Qy(Xy,n).request(gy.connect,{name:e,version:1,connectNode:r});n._updateNetwork(s)}disconnect(){const e=Zy(eg,this,rg).call(this);e.notify(gy.closeConnection,{reason:"bye"}),e.connection.disconnect()}async getAccounts(){const e=Zy(eg,this,rg).call(this);return(await e.request(gy.address,void 0)).map((t=>new Iy(e,t)))}async subscribeAccounts(e,t){const n=await Zy(eg,this,rg).call(this).request(gy.subscribeAddress,{type:e,value:t});return Zy(eg,this,ag).call(this,n.address),Qy(tg,this)}async askToSelectNetwork(e){await Zy(eg,this,rg).call(this).request(gy.updateNetwork,e)}}function rg(){if(null==Qy(Xy,this))throw new Qe("You are not connected to Wallet");return Qy(Xy,this)}function ag(e){const t=[...new Set([...Object.keys(e.current),...Object.keys(e.connected)])];Yy(tg,this,t.map((e=>new Iy(Zy(eg,this,rg).call(this),e)))),this.emit("accountsChange",Qy(tg,this))}function ig(e,t){return e.get(sg(e,t))}function sg(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 og=new WeakMap;class cg extends ng{constructor(...e){var t,n,r;super(...e),r="",function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=og),n.set(t,r)}get networkId(){return ig(og,this)}_updateNetwork(e){var t,n;t=og,n=e.networkId,t.set(sg(t,this),n),this.emit("networkIdChange",ig(og,this))}static async connect(e,t){const n=new cg;return await cg._connect(e,t,n,!1),n}}function ug(e,t){return e.get(lg(e,t))}function lg(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 mg=new WeakMap;class pg extends ng{constructor(...e){var t,n,r;super(...e),r=null,function(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t=this,n=mg),n.set(t,r)}get node(){return ug(mg,this)}_updateNetwork(e){if(null==e.node?.url)throw new Ze("Missing URLs of the Node");var t,n;t=mg,n=new Jm(e.node.url),t.set(lg(t,this),n),this.emit("nodeChange",ug(mg,this))}static async connect(e,t){const n=new pg;return await super._connect(e,t,n,!0),n}}var dg=n(1013);const hg=n.n(dg)()({storeAsString:!0}),fg=e=>{if("object"==typeof e&&null!==e&&e.constructor===Object)return Zn(e,(([e,t])=>[e,fg(t)]));if(Array.isArray(e))return e.map((e=>fg(e)));if("string"==typeof e&&new I(e).toString(10)===e){const t=new I(e);return t.toJSON=()=>t.toString(10),t}return e};var yg={stringify:(...e)=>hg.stringify(fg(e[0]),...e.slice(1)),parse:hg.parse},gg=n(8287).Buffer;class Ng extends dy{constructor({name:e,id:t,type:n,onConnection:r,onSubscription:a,onDisconnect:i,onAskAccounts:s,onAskToSelectNetwork:o,...c}){super(c),ay(this,"_clients",new Map),this.onConnection=r,this.onSubscription=a,this.onDisconnect=i,this.onAskAccounts=s,this.onAskToSelectNetwork=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(gy.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(gy.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 Ny.CONNECTED===this._getClient(e).status&&this._getClient(e).rpc.connection.isConnected()}_disconnectRpcClient(e){const t=this._getClient(e);t.rpc.connection.disconnect(),t.status=Ny.DISCONNECTED,t.addressSubscription=new Set}removeRpcClient(e){this._disconnectRpcClient(e),this._clients.delete(e)}addRpcClient(e){const t=gg.from(or().randomBytes(8)).toString("base64");let n;const r={id:t,status:Ny.WAITING_FOR_CONNECTION_REQUEST,addressSubscription:new Set,connectNode:!1,rpc:new Vy(e,(()=>{this._clients.delete(t),this.onDisconnect(t,n)}),{[gy.closeConnection]:e=>{n=e,this._disconnectRpcClient(t)},[gy.connect]:async({name:e,version:n,icons:a,connectNode:i},s)=>{if(1!==n)throw new _y;return await this.onConnection(t,{name:e,icons:a,connectNode:i},s),r.status=Ny.CONNECTED,r.connectNode=i,{...await this.getWalletInfo(),...i&&this._getNode()}},[gy.subscribeAddress]:async({type:e,value:n},a)=>{if(!this._isRpcClientConnected(t))throw new Cy;switch(e){case yy.subscribe:await this.onSubscription(t,{type:e,value:n},a),r.addressSubscription.add(n);break;case yy.unsubscribe:r.addressSubscription.delete(n);break;default:throw new ae(`Unknown subscription type: ${e}`)}return{subscription:Array.from(r.addressSubscription),address:this._getAccountsForClient(r)}},[gy.address]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Cy;return await this.onAskAccounts(t,e,n),this.addresses()},[gy.sign]:async({tx:e,onAccount:n=this.address,returnSigned:r,innerTx:a},i)=>{if(!this._isRpcClientConnected(t))throw new Cy;if(!this.addresses().includes(n))throw new Ay(n);const s={onAccount:n,aeppOrigin:i,aeppRpcClientId:t,innerTx:a};if(r||!0===a)return{signedTransaction:await this.signTransaction(e,s)};try{return yg.parse(yg.stringify({transactionHash:await this.sendTransaction(e,{...s,verify:!1})}))}catch(t){const n=await Wh(e,this.api);if(n.length>0)throw new by(n);throw t}},[gy.signMessage]:async({message:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Cy;if(!this.addresses().includes(n))throw new Ay(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:gg.from(await this.signMessage(e,a)).toString("hex")}},[gy.signTypedData]:async({domain:e,aci:n,data:r,onAccount:a=this.address},i)=>{if(!this._isRpcClientConnected(t))throw new Cy;if(!this.addresses().includes(a))throw new Ay(a);const s={...e,onAccount:a,aeppOrigin:i,aeppRpcClientId:t};return{signature:await this.signTypedData(r,n,s)}},[gy.unsafeSign]:async({data:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Cy;if(!this.addresses().includes(n))throw new Ay(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:Ar(await this.unsafeSign(Cr(e),a),ur.Signature)}},[gy.signDelegation]:async({delegation:e,onAccount:n=this.address},r)=>{if(!this._isRpcClientConnected(t))throw new Cy;if(!this.addresses().includes(n))throw new Ay(n);const a={onAccount:n,aeppOrigin:r,aeppRpcClientId:t};return{signature:await this.signDelegation(e,a)}},[gy.updateNetwork]:async(e,n)=>{if(!this._isRpcClientConnected(t))throw new Cy;return await this.onAskToSelectNetwork(t,e,n),null}})};return this._clients.set(t,r),t}async shareWalletInfo(e){this._getClient(e).rpc.notify(gy.readyToConnect,await this.getWalletInfo())}async getWalletInfo(){const{origin:e}=window.location;return{id:this.id,name:this.name,networkId:await this.api.getNetworkId(),origin:"file://"===e?"*":e,type:this._type}}getAccounts(){return{current:null!=this.selectedAddress?{[this.selectedAddress]:{}}:{},connected:this.addresses().filter((e=>e!==this.selectedAddress)).reduce(((e,t)=>({...e,[t]:{}})),{})}}}function wg(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function vg(e,...t){if(!((n=e)instanceof Uint8Array||ArrayBuffer.isView(n)&&"Uint8Array"===n.constructor.name))throw new Error("Uint8Array expected");var n;if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function bg(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");wg(e.outputLen),wg(e.blockLen)}function xg(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function _g(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function Pg(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}const Cg=async()=>{};async function Ag(e,t,n){let r=Date.now();for(let a=0;a<e;a++){n(a);const e=Date.now()-r;e>=0&&e<t||(await Cg(),r+=e)}}function Sg(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function Tg(e){return"string"==typeof e&&(e=Sg(e)),vg(e),e}function zg(e){return"string"==typeof e&&(e=Sg(e)),vg(e),e}class Eg{}function Ig(e){const t=t=>e().update(Tg(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}class Mg extends Eg{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,bg(e);const n=Tg(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const r=this.blockLen,a=new Uint8Array(r);a.set(n.length>r?e.create().update(n).digest():n);for(let e=0;e<a.length;e++)a[e]^=54;this.iHash.update(a),this.oHash=e.create();for(let e=0;e<a.length;e++)a[e]^=106;this.oHash.update(a),_g(a)}update(e){return xg(this),this.iHash.update(e),this}digestInto(e){xg(this),vg(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:n,finished:r,destroyed:a,blockLen:i,outputLen:s}=this;return e.finished=r,e.destroyed=a,e.blockLen=i,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=n._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const qg=(e,t,n)=>new Mg(e,t).update(n).digest();function Rg(e,t,n,r){bg(e);const a=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign({dkLen:32,asyncTick:10},t)}(0,r),{c:i,dkLen:s,asyncTick:o}=a;if(wg(i),wg(s),wg(o),i<1)throw new Error("iterations (c) should be >= 1");const c=zg(t),u=zg(n),l=new Uint8Array(s),m=qg.create(e,c),p=m._cloneInto().update(u);return{c:i,dkLen:s,asyncTick:o,DK:l,PRF:m,PRFSalt:p}}function Og(e,t,n,r,a){return e.destroy(),t.destroy(),r&&r.destroy(),_g(a),n}qg.create=(e,t)=>new Mg(e,t);class kg extends Eg{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=Pg(this.buffer)}update(e){xg(this),vg(e=Tg(e));const{view:t,buffer:n,blockLen:r}=this,a=e.length;for(let i=0;i<a;){const s=Math.min(r-this.pos,a-i);if(s!==r)n.set(e.subarray(i,i+s),this.pos),this.pos+=s,i+=s,this.pos===r&&(this.process(t,0),this.pos=0);else{const t=Pg(e);for(;r<=a-i;i+=r)this.process(t,i)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){xg(this),function(e,t){vg(e);const n=t.outputLen;if(e.length<n)throw new Error("digestInto() expects output buffer of length at least "+n)}(e,this),this.finished=!0;const{buffer:t,view:n,blockLen:r,isLE:a}=this;let{pos:i}=this;t[i++]=128,_g(this.buffer.subarray(i)),this.padOffset>r-i&&(this.process(n,0),i=0);for(let e=i;e<r;e++)t[e]=0;!function(e,t,n,r){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,n,r);const a=BigInt(32),i=BigInt(4294967295),s=Number(n>>a&i),o=Number(n&i),c=r?4:0,u=r?0:4;e.setUint32(t+c,s,r),e.setUint32(t+u,o,r)}(n,r-8,BigInt(8*this.length),a),this.process(n,0);const s=Pg(e),o=this.outputLen;if(o%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const c=o/4,u=this.get();if(c>u.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<c;e++)s.setUint32(4*e,u[e],a)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:n,length:r,finished:a,destroyed:i,pos:s}=this;return e.destroyed=i,e.finished=a,e.length=r,e.pos=s,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}}const Bg=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),Gg=BigInt(2**32-1),$g=BigInt(32);function Ug(e,t=!1){return t?{h:Number(e&Gg),l:Number(e>>$g&Gg)}:{h:0|Number(e>>$g&Gg),l:0|Number(e&Gg)}}const Vg=(e,t,n)=>e>>>n,Dg=(e,t,n)=>e<<32-n|t>>>n,Lg=(e,t,n)=>e>>>n|t<<32-n,jg=(e,t,n)=>e<<32-n|t>>>n,Hg=(e,t,n)=>e<<64-n|t>>>n-32,Fg=(e,t,n)=>e>>>n-32|t<<64-n;function Jg(e,t,n,r){const a=(t>>>0)+(r>>>0);return{h:e+n+(a/2**32|0)|0,l:0|a}}const Wg=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),Kg=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,Yg=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),Qg=(e,t,n,r,a)=>t+n+r+a+(e/2**32|0)|0,Zg=(e,t,n,r,a)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(a>>>0),Xg=(e,t,n,r,a,i)=>t+n+r+a+i+(e/2**32|0)|0,eN=(()=>function(e,t=!1){const n=e.length;let r=new Uint32Array(n),a=new Uint32Array(n);for(let i=0;i<n;i++){const{h:n,l:s}=Ug(e[i],t);[r[i],a[i]]=[n,s]}return[r,a]}(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),tN=(()=>eN[0])(),nN=(()=>eN[1])(),rN=new Uint32Array(80),aN=new Uint32Array(80);class iN extends kg{constructor(e=64){super(128,e,16,!1),this.Ah=0|Bg[0],this.Al=0|Bg[1],this.Bh=0|Bg[2],this.Bl=0|Bg[3],this.Ch=0|Bg[4],this.Cl=0|Bg[5],this.Dh=0|Bg[6],this.Dl=0|Bg[7],this.Eh=0|Bg[8],this.El=0|Bg[9],this.Fh=0|Bg[10],this.Fl=0|Bg[11],this.Gh=0|Bg[12],this.Gl=0|Bg[13],this.Hh=0|Bg[14],this.Hl=0|Bg[15]}get(){const{Ah:e,Al:t,Bh:n,Bl:r,Ch:a,Cl:i,Dh:s,Dl:o,Eh:c,El:u,Fh:l,Fl:m,Gh:p,Gl:d,Hh:h,Hl:f}=this;return[e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f]}set(e,t,n,r,a,i,s,o,c,u,l,m,p,d,h,f){this.Ah=0|e,this.Al=0|t,this.Bh=0|n,this.Bl=0|r,this.Ch=0|a,this.Cl=0|i,this.Dh=0|s,this.Dl=0|o,this.Eh=0|c,this.El=0|u,this.Fh=0|l,this.Fl=0|m,this.Gh=0|p,this.Gl=0|d,this.Hh=0|h,this.Hl=0|f}process(e,t){for(let n=0;n<16;n++,t+=4)rN[n]=e.getUint32(t),aN[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|rN[e-15],n=0|aN[e-15],r=Lg(t,n,1)^Lg(t,n,8)^Vg(t,0,7),a=jg(t,n,1)^jg(t,n,8)^Dg(t,n,7),i=0|rN[e-2],s=0|aN[e-2],o=Lg(i,s,19)^Hg(i,s,61)^Vg(i,0,6),c=jg(i,s,19)^Fg(i,s,61)^Dg(i,s,6),u=Yg(a,c,aN[e-7],aN[e-16]),l=Qg(u,r,o,rN[e-7],rN[e-16]);rN[e]=0|l,aN[e]=0|u}let{Ah:n,Al:r,Bh:a,Bl:i,Ch:s,Cl:o,Dh:c,Dl:u,Eh:l,El:m,Fh:p,Fl:d,Gh:h,Gl:f,Hh:y,Hl:g}=this;for(let e=0;e<80;e++){const t=Lg(l,m,14)^Lg(l,m,18)^Hg(l,m,41),N=jg(l,m,14)^jg(l,m,18)^Fg(l,m,41),w=l&p^~l&h,v=Zg(g,N,m&d^~m&f,nN[e],aN[e]),b=Xg(v,y,t,w,tN[e],rN[e]),x=0|v,_=Lg(n,r,28)^Hg(n,r,34)^Hg(n,r,39),P=jg(n,r,28)^Fg(n,r,34)^Fg(n,r,39),C=n&a^n&s^a&s,A=r&i^r&o^i&o;y=0|h,g=0|f,h=0|p,f=0|d,p=0|l,d=0|m,({h:l,l:m}=Jg(0|c,0|u,0|b,0|x)),c=0|s,u=0|o,s=0|a,o=0|i,a=0|n,i=0|r;const S=Wg(x,P,A);n=Kg(S,b,_,C),r=0|S}({h:n,l:r}=Jg(0|this.Ah,0|this.Al,0|n,0|r)),({h:a,l:i}=Jg(0|this.Bh,0|this.Bl,0|a,0|i)),({h:s,l:o}=Jg(0|this.Ch,0|this.Cl,0|s,0|o)),({h:c,l:u}=Jg(0|this.Dh,0|this.Dl,0|c,0|u)),({h:l,l:m}=Jg(0|this.Eh,0|this.El,0|l,0|m)),({h:p,l:d}=Jg(0|this.Fh,0|this.Fl,0|p,0|d)),({h:h,l:f}=Jg(0|this.Gh,0|this.Gl,0|h,0|f)),({h:y,l:g}=Jg(0|this.Hh,0|this.Hl,0|y,0|g)),this.set(n,r,a,i,s,o,c,u,l,m,p,d,h,f,y,g)}roundClean(){_g(rN,aN)}destroy(){_g(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const sN=Ig((()=>new iN));function oN(e){if("string"!=typeof e)throw new TypeError("invalid mnemonic type: "+typeof e);return e.normalize("NFKD")}function cN(e){const t=oN(e),n=t.split(" ");if(![12,15,18,21,24].includes(n.length))throw new Error("Invalid mnemonic");return{nfkd:t,words:n}}const uN=e=>oN("mnemonic"+e);var lN=n(9234),mN=n.n(lN);class pN{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}}var dN=n(8287).Buffer;function hN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function fN(e,t){return e.get(gN(e,t))}function yN(e,t,n){return e.set(gN(e,t),n),n}function gN(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")}const NN=dN.from("ed25519 seed");function wN(e,t){const n=mN().full(e,t);return{secretKey:n.slice(0,32),chainCode:n.slice(32)}}function vN(e,t){return t.reduce((({secretKey:e,chainCode:t},n)=>{const r=dN.allocUnsafe(4);return r.writeUInt32BE(n+2147483648,0),wN(Xn([dN.alloc(1,0),e,r]),t)}),e)}var bN=new WeakMap,xN=new WeakSet;class _N extends pN{constructor(e){var t;super(),hN(this,t=xN),t.add(this),function(e,t){hN(e,t),t.set(e,void 0)}(this,bN),yN(bN,this,e)}async getWallet(){return gN(xN,this,PN).call(this,!1)}getWalletSync(){return gN(xN,this,PN).call(this,!0)}async initialize(e){const t=await this.getWallet();return gN(xN,this,CN).call(this,e,t)}initializeSync(e){const t=this.getWalletSync();return gN(xN,this,CN).call(this,e,t)}}function PN(e){const t=e=>{const t=vN(wN(e,NN),[44,457]);return yN(bN,this,{secretKey:Ar(t.secretKey,ur.Bytearray),chainCode:Ar(t.chainCode,ur.Bytearray)}),fN(bN,this)};if(ArrayBuffer.isView(fN(bN,this))){if(64!==fN(bN,this).length)throw new j("seed length",64,fN(bN,this).length);return t(fN(bN,this))}return"object"==typeof fN(bN,this)?fN(bN,this):e?t(function(e,t=""){return function(e,t,n){const{c:r,dkLen:a,DK:i,PRF:s,PRFSalt:o}=Rg(e,t,n,{c:2048,dkLen:64});let c;const u=new Uint8Array(4),l=Pg(u),m=new Uint8Array(s.outputLen);for(let e=1,t=0;t<a;e++,t+=s.outputLen){const n=i.subarray(t,t+s.outputLen);l.setInt32(0,e,!1),(c=o._cloneInto(c)).update(u).digestInto(m),n.set(m.subarray(0,n.length));for(let e=1;e<r;e++){s._cloneInto(c).update(m).digestInto(m);for(let e=0;e<n.length;e++)n[e]^=m[e]}}return Og(s,o,i,c,m)}(sN,cN(e).nfkd,uN(t))}(fN(bN,this))):function(e,t=""){return async function(e,t,n){const{c:r,dkLen:a,asyncTick:i,DK:s,PRF:o,PRFSalt:c}=Rg(e,t,n,{c:2048,dkLen:64});let u;const l=new Uint8Array(4),m=Pg(l),p=new Uint8Array(o.outputLen);for(let e=1,t=0;t<a;e++,t+=o.outputLen){const n=s.subarray(t,t+o.outputLen);m.setInt32(0,e,!1),(u=c._cloneInto(u)).update(l).digestInto(p),n.set(p.subarray(0,n.length)),await Ag(r-1,i,(()=>{o._cloneInto(u).update(p).digestInto(p);for(let e=0;e<n.length;e++)n[e]^=p[e]}))}return Og(o,c,s,u,p)}(sN,cN(e).nfkd,uN(t))}(fN(bN,this)).then(t)}function CN(e,t){const n=vN({secretKey:Cr(t.secretKey),chainCode:Cr(t.chainCode)},[e,0,0]).secretKey;return new Vh(Ar(n,ur.AccountSecretKey))}function AN(e,t){return e.get(SN(e,t))}function SN(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 TN=new WeakMap;class zN extends Km{constructor(e){var t,n,r;super(),r=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=TN),n.set(t,r),Cr(e),this.address=e}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("Can't sign using generalized account")}async signMessage(){throw new te("Can't sign using generalized account")}async signTypedData(){throw new te("Can't sign using generalized account")}async signDelegation(){throw new te("signing delegation using generalized account")}async signTransaction(e,{authData:t,onCompiler:n,onNode:r,protocolParameters:a}){if(null==t||null==n||null==r)throw new j("authData, onCompiler, onNode","provided",null);const{callData:i,sourceCode:s,args:o,fee:c,gasLimit:u,gasPrice:l}="function"==typeof t?await t(e):t,m=null!=i?i:await(async()=>{if(null==AN(TN,this)){const n=await xa(this.address,{onNode:r});if("generalized"!==n.kind)throw new j("account kind","generalized",n.kind);e=TN,t=n.authFun,e.set(SN(e,this),t)}var e,t;if(null==AN(TN,this))throw new ae("Account in generalised, but authFun not provided");if(null==s||null==o)throw new be("Auth data must contain sourceCode and args or callData.");const a=await kf.initialize({onCompiler:n,onNode:r,sourceCode:s});return a._calldata.encode(a._name,AN(TN,this),o)})(),p=await io({tag:Xr.GaMetaTx,tx:{tag:Xr.SignedTx,encodedTx:Cr(e),signatures:[]},gaId:this.address,authData:m,fee:c,gasLimit:u,gasPrice:l,...null!=a&&{protocolParameters:a},onNode:r});return to({tag:Xr.SignedTx,encodedTx:Cr(p),signatures:[]})}}var EN=n(8287).Buffer;const IN=224;class MN extends Km{constructor(e,t,n){super(),this.transport=e,this.index=t,this.address=n,e.decorateAppAPIMethods(this,["signTransaction","signMessage"],"w0w")}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using Ledger HW")}async signTypedData(){throw new te("Typed data signing using Ledger HW")}async signDelegation(){throw new te("signing delegation using Ledger HW")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountLedger");if(null==n)throw new j("networkId","provided",n);const r=Cr(e);let a=0;const i=EN.from(n),s=[];for(;a!==r.length;){const e=0===a?141-i.length:150,t=a+e>r.length?r.length-a:e,n=EN.alloc(0===a?9+i.length+t:t);if(0===a){let e=n.writeUInt32BE(this.index,0);e=n.writeUInt32BE(r.length,e),e=n.writeUInt8(i.length,e),e+=i.copy(n,e,0,i.length),r.copy(n,e,0,150-e)}else r.copy(n,0,a,a+t);s.push(n),a+=t}const o=[(await s.reduce((async(e,t,n)=>(await e,this.transport.send(IN,4,0===n?0:128,0,t))),Promise.resolve(EN.alloc(0)))).subarray(0,64)];return to({tag:Xr.SignedTx,encodedTx:r,signatures:o})}async signMessage(e){let t=0;const n=EN.from(e),r=[];for(;t!==n.length;){const e=0===t?142:150,a=t+e>n.length?n.length-t:e,i=EN.alloc(0===t?8+a:a);0===t?(i.writeUInt32BE(this.index,0),i.writeUInt32BE(n.length,4),n.copy(i,8,t,t+a)):n.copy(i,0,t,t+a),r.push(i),t+=a}return(await r.reduce((async(e,t,n)=>(await e,this.transport.send(IN,8,0===n?0:128,0,t))),Promise.resolve(EN.alloc(0)))).subarray(0,64)}}var qN=n(8287).Buffer;function RN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function ON(e,t){return e.get(BN(e,t))}function kN(e,t,n){return e.set(BN(e,t),n),n}function BN(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 GN=new WeakMap,$N=new WeakSet;class UN extends pN{constructor(e){var t;super(),RN(this,t=$N),t.add(this),function(e,t){RN(e,t),t.set(e,void 0)}(this,GN),ay(this,"_enableExperimentalLedgerAppSupport",!1),this.transport=e,e.decorateAppAPIMethods(this,["getAddress","getAppConfiguration"],"w0w")}async ensureReady(){const{version:e}=await BN($N,this,DN).call(this),t=[e,"0.4.4","0.5.0"],n=[e,"1.0.0","2.0.0"];if(!(Ho(...t)||this._enableExperimentalLedgerAppSupport&&Ho(...n)))throw new ne("Aeternity app on Ledger",...t);kN(GN,this,Promise.resolve())}async getAppConfiguration(){return BN($N,this,DN).call(this)}async getAddress(e,t=!1){await BN($N,this,VN).call(this);const n=qN.alloc(4);n.writeUInt32BE(e,0);const r=await this.transport.send(IN,2,t?1:0,0,n),a=r[0];return r.subarray(1,1+a).toString("ascii")}async initialize(e){return new MN(this.transport,e,await this.getAddress(e))}}async function VN(){var e;return null!==(e=ON(GN,this))&&void 0!==e||kN(GN,this,this.ensureReady()),ON(GN,this)}async function DN(){let e=await this.transport.send(IN,6,0,0);return 6===e.length&&(e=e.subarray(1)),{version:[e[0],e[1],e[2]].join(".")}}var LN=n(8287).Buffer;const jN="npm:@aeternity-snap/plugin";async function HN(e,t,n,r){const a=await e.request({method:"wallet_invokeSnap",params:{snapId:jN,request:{method:t,params:n}}});if(null==a)throw new ae("Empty MetaMask response");if(!(r in a))throw new ae(`Key ${r} missed in response ${JSON.stringify(a)}`);return a[r]}class FN extends Km{constructor(e,t,n){super(),this.provider=e,this.index=t,this.address=n}async sign(){return this.unsafeSign()}async unsafeSign(){throw new te("RAW signing using MetaMask")}async signTypedData(){throw new te("Typed data signing using MetaMask")}async signDelegation(){throw new te("signing delegation using MetaMask")}async signTransaction(e,{innerTx:t,networkId:n}={}){if(null!=t)throw new te("innerTx option in AccountMetamask");if(null==n)throw new j("networkId","provided",n);return HN(this.provider,"signTransaction",{derivationPath:[`${this.index}'`,"0'","0'"],tx:e,networkId:n},"signedTx")}async signMessage(e){const t=await HN(this.provider,"signMessage",{derivationPath:[`${this.index}'`,"0'","0'"],message:LN.from(e).toString("base64")},"signature");return LN.from(t,"base64")}}function JN(e,t,n){WN(e,t),t.set(e,n)}function WN(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function KN(e,t,n){return e.set(QN(e,t),n),n}function YN(e,t){return e.get(QN(e,t))}function QN(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")}const ZN="0.0.9",XN="0.1.0";var ew=new WeakMap,tw=new WeakSet,nw=new WeakMap;class rw extends pN{get provider(){if(null==YN(ew,this))throw new X("Metamask is not detected yet");return YN(ew,this)}constructor(e){var t;if(super(),WN(this,t=tw),t.add(this),JN(this,ew,void 0),JN(this,nw,void 0),KN(ew,this,e),null==YN(ew,this)&&null==window)throw new X("Window object not found, you can run AccountMetamaskFactory only in browser or setup a provider")}async installSnap(){const e=await QN(tw,this,sw).call(this);return(await e.request({method:"wallet_requestSnaps",params:{[jN]:{version:ZN}}}))[jN]}async requestSnap(e=`>=${ZN} <${XN}`){const t=await QN(tw,this,sw).call(this);return(await t.request({method:"wallet_requestSnaps",params:{[jN]:{version:e}}}))[jN]}async ensureReady(){const e=[await this.getSnapVersion(),ZN,XN];if(!Ho(...e))throw new ne("Aeternity snap in MetaMask",...e)}async getSnapVersion(){const e=await QN(tw,this,sw).call(this),t=await e.request({method:"wallet_getSnaps"}),n=t[jN]?.version;if(null==n)throw new X("Aeternity snap is not installed to MetaMask or not connected to this aepp");return n}async initialize(e){await this.requestSnap();const t=await QN(tw,this,sw).call(this),n=await HN(t,"getPublicKey",{derivationPath:[`${e}'`,"0'","0'"]},"publicKey");return new FN(t,e,n)}}async function aw(){if(!("ethereum"in window)||null==window.ethereum)return;const e=window.ethereum,t=await e.request({method:"web3_clientVersion"});if(null==t)throw new ae("Can't get Ethereum Provider version");return t.startsWith("MetaMask/v")?e:void 0}async function iw(){return setTimeout((()=>window.dispatchEvent(new Event("eip6963:requestProvider")))),new Promise((e=>{const t=n=>{"io.metamask"===n.detail.info.rdns&&(window.removeEventListener("eip6963:announceProvider",t),e(n.detail.provider))};window.addEventListener("eip6963:announceProvider",t),setTimeout((()=>{window.removeEventListener("eip6963:announceProvider",t),e(void 0)}),500)}))}async function sw(){var e;return null!==(e=YN(nw,this))&&void 0!==e||KN(nw,this,(async(e,t)=>{if(null!==(e=YN(ew,this))&&void 0!==e||KN(ew,this,null!==(t=await QN(tw,this,aw).call(this))&&void 0!==t?t:await QN(tw,this,iw).call(this)),null==YN(ew,this))throw new X("Can't find a Metamask extension as an injected provider and over EIP-6963. Ensure that Metamask is installed or setup a provider.");const n=await YN(ew,this).request({method:"web3_clientVersion"});if(null==n)throw new ae("Can't get Ethereum Provider version");const r=[n.slice(10),"12.2.4"];if(!Ho(...r))throw new ne("Metamask",...r);return YN(ew,this)})()),YN(nw,this)}class ow{}const cw={type:{name:"Composite",className:"Contract",modelProperties:{code:{serializedName:"code",required:!0,type:{name:"String"}},options:{serializedName:"options",type:{name:"Composite",className:"CompileOpts"}}}}},uw={type:{name:"Composite",className:"CompileOpts",modelProperties:{fileSystem:{serializedName:"file_system",type:{name:"Dictionary",value:{type:{name:"any"}}}},srcFile:{serializedName:"src_file",type:{name:"String"}}}}},lw={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"}}}}},mw={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"}}}}},pw={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"}}}}}}},dw={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"}}}}},hw={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"}}}}},fw={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"}}}}}}},yw={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"}}}}}}},gw={type:{name:"Composite",className:"Calldata",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}}}}},Nw={type:{name:"Composite",className:"DecodeCalldataBytecode",modelProperties:{calldata:{serializedName:"calldata",required:!0,type:{name:"String"}},bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},ww={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"}}}}}}}}},vw={type:{name:"Composite",className:"ErrorModel",modelProperties:{reason:{serializedName:"reason",required:!0,type:{name:"String"}}}}},bw={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"}}}}},xw={type:{name:"Composite",className:"ByteCodeInput",modelProperties:{bytecode:{serializedName:"bytecode",required:!0,type:{name:"String"}}}}},_w={type:{name:"Composite",className:"FateAssembler",modelProperties:{fateAssembler:{serializedName:"fate-assembler",required:!0,type:{name:"String"}}}}},Pw={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"}}}}},Cw={type:{name:"Composite",className:"CompilerVersion",modelProperties:{version:{serializedName:"version",required:!0,type:{name:"String"}}}}},Aw={type:{name:"Composite",className:"ApiVersion",modelProperties:{apiVersion:{serializedName:"api-version",required:!0,type:{name:"String"}}}}},Sw={type:{name:"Composite",className:"SophiaBinaryData",modelProperties:{sophiaType:{serializedName:"sophia-type",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}}}}},Tw={type:{name:"Composite",className:"SophiaJsonData",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},zw={parameterPath:["options","contentType"],mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Content-Type",type:{name:"String"}}},Ew={parameterPath:"body",mapper:cw},Iw={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},Mw={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},qw={parameterPath:"body",mapper:dw},Rw={parameterPath:"body",mapper:hw},Ow={parameterPath:"body",mapper:yw},kw={parameterPath:"body",mapper:Nw},Bw={parameterPath:"body",mapper:bw},Gw={parameterPath:"body",mapper:xw},$w={parameterPath:"body",mapper:Pw};class Uw extends Lo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-compiler/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},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},Dw)}compileContract(e,t){return this.sendOperationRequest({body:e,options:t},Lw)}decodeCallResult(e,t){return this.sendOperationRequest({body:e,options:t},jw)}decodeCallResultBytecode(e,t){return this.sendOperationRequest({body:e,options:t},Hw)}encodeCalldata(e,t){return this.sendOperationRequest({body:e,options:t},Fw)}decodeCalldataBytecode(e,t){return this.sendOperationRequest({body:e,options:t},Jw)}decodeCalldataSource(e,t){return this.sendOperationRequest({body:e,options:t},Ww)}getFateAssemblerCode(e,t){return this.sendOperationRequest({body:e,options:t},Kw)}validateByteCode(e,t){return this.sendOperationRequest({body:e,options:t},Yw)}getCompilerVersion(e,t){return this.sendOperationRequest({body:e,options:t},Qw)}version(e){return this.sendOperationRequest({options:e},Zw)}apiVersion(e){return this.sendOperationRequest({options:e},Xw)}api(e){return this.sendOperationRequest({options:e},ev)}}const Vw=No(u,!1),Dw={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:Ew,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Lw={path:"/compile",httpMethod:"POST",responses:{200:{bodyMapper:pw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Ew,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},jw={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:qw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Hw={path:"/decode-call-result/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:fw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Rw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Fw={path:"/encode-calldata",httpMethod:"POST",responses:{200:{bodyMapper:gw},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Ow,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Jw={path:"/decode-calldata/bytecode",httpMethod:"POST",responses:{200:{bodyMapper:ww},400:{bodyMapper:vw,isError:!0}},requestBody:kw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Ww={path:"/decode-calldata/source",httpMethod:"POST",responses:{200:{bodyMapper:ww},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:Bw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Kw={path:"/fate-assembler",httpMethod:"POST",responses:{200:{bodyMapper:_w},400:{bodyMapper:vw,isError:!0}},requestBody:Gw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Yw={path:"/validate-byte-code",httpMethod:"POST",responses:{200:{},400:{bodyMapper:{type:{name:"Sequence",element:{type:{name:"Composite",className:"CompilerError"}}}},isError:!0}},requestBody:$w,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Qw={path:"/compiler-version",httpMethod:"POST",responses:{200:{bodyMapper:Cw},400:{bodyMapper:vw,isError:!0}},requestBody:Gw,urlParameters:[Mw],headerParameters:[zw,Iw],mediaType:"json",serializer:Vw},Zw={path:"/version",httpMethod:"GET",responses:{200:{bodyMapper:Cw},500:{bodyMapper:vw,isError:!0}},urlParameters:[Mw],headerParameters:[Iw],serializer:Vw},Xw={path:"/api-version",httpMethod:"GET",responses:{200:{bodyMapper:Aw},500:{bodyMapper:vw,isError:!0}},urlParameters:[Mw],headerParameters:[Iw],serializer:Vw},ev={path:"/api",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Dictionary",value:{type:{name:"any"}}}}},400:{bodyMapper:vw,isError:!0}},urlParameters:[Mw],headerParameters:[Iw],serializer:Vw};class tv extends ow{constructor(e,{ignoreVersion:t=!1}={}){let n;super(),this.api=new Uw(e,{allowInsecureConnection:!0,additionalPolicies:[nc("compiler",(async e=>(null!=n||(n=(await this.api.apiVersion(e)).apiVersion),n)),"8.0.0","9.0.0",t),tc((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:cn}),this.api.pipeline.removePolicy({name:En})}async compileBySourceCode(e,t){try{const n=await this.api.compileContract({code:e,options:{fileSystem:t}}),r=n.warnings.map((({type:e,...t})=>t));return{...n,warnings:r}}catch(e){if(e instanceof Gn&&400===e.statusCode)throw new G(e.message);throw e}}async compile(e){throw new te("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 Gn&&400===e.statusCode)throw new G(e.message);throw e}}async generateAci(e){throw new te("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 te("File system access, use CompilerHttpNode instead")}async version(){return(await this.api.version()).version}}function nv(e){return e.replace(/_./g,(e=>e[1].toUpperCase()))}var rv=n(952),av=n.n(rv);const{w3cwebsocket:iv}=av();function sv(e,...t){const[n,...r]=t;e._eventEmitter.emit(n,...r)}function ov(e,t){if(null==t)throw new ve;e._debug("enter state",t.handler.name),e._fsm=t,null!=t?.handler?.enter&&t.handler.enter(e),pv(e)}function cv(e,t,n){e._debug(t,`(prev. ${e._status})`,null!=n?n:""),t!==e._status&&(e._status=t,sv(e,"statusChanged",t))}function uv(e,t){e._state=t,sv(e,"stateChanged",t)}function lv(e,t){e._debug("send message",t.method,t.params),e._websocket.send(yg.stringify({jsonrpc:"2.0",...t}))}function mv(e,t,n={}){lv(e,{method:t,params:n})}async function pv(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,ov(e,r)}async function dv(e,t){const{handler:n,state:r}=e._fsm,a=await Promise.resolve(n(e,t,r));if(ov(e,a),"OffChainNewContract"===t?.params?.data?.updates?.[0]?.op&&"channelOpen"===a?.handler.name){const n=e.round();if(null==n)throw new ie("Round is null");const r=t?.params?.data?.updates?.[0]?.owner;sv(e,"newContract",ta(r,n+1))}}function hv(e){e._websocket.close(),clearTimeout(e._pingTimeoutId)}function fv(e){clearTimeout(e._pingTimeoutId),e._pingTimeoutId=setTimeout((()=>{mv(e,"channels.system",{action:"ping"}),e._pingTimeoutId=setTimeout((()=>{hv(e),sv(e,"error",new ge)}),15e3)}),1e4)}async function yv(e,t,n){return new Promise(((r,a)=>{const i=e._nextRpcMessageId;e._nextRpcMessageId+=1,e._rpcCallbacks.set(i,(e=>{if(null!=e.error){var t;const n=null!==(t=e.error.data[0].message)&&void 0!==t?t:"";a(new fe(e.error.message+n))}else r(e.result)})),lv(e,{method:t,id:i,params:n})}))}async function gv(e,t){const{signatures:n,encodedTx:r}=so(e,Xr.SignedTx),a=no(r),i=await t(a);if("string"==typeof i){const{signatures:e}=so(i,Xr.SignedTx);return to({tag:Xr.SignedTx,signatures:n.concat(e),encodedTx:Cr(a)})}return i}async function Nv(e,t,n,r){let a;if(null!=n.tx)a=await r(n.tx);else{if(null==n.signed_tx)throw new B("Can't find transaction in message");a=await gv(n.signed_tx,r)}const i="string"!=typeof a,s=null!=n.tx?"tx":"signed_tx";return mv(e,t,i?{error:null!=a?a:1}:{[s]:a}),i}function wv(e,t,n){return n?.reject?.(Object.assign(new Ne(`Unexpected message received:\n\n${JSON.stringify(t)}`),{wsMessage:t})),{handler:Sv}}function vv(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:Sv};if("channels.info"===t.method&&"aborted_update"===t.params.data.event)return n.resolve({accepted:!1}),{handler:Sv};if(null!=t.error){const e=t.error.data.map((e=>e.code));return e.includes(1001)?n.reject(new J("Insufficient balance")):e.includes(1002)?n.reject(new H("Amount cannot be negative")):n.reject(new ye(t.error.message)),{handler:Sv}}return wv(0,t,n)}function bv(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?(cv(e,r),{handler:Pv}):"channel_reestablished"===t.params.data.event?{handler:Av}:"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:bv}):{handler:bv}}if("channels.error"===t.method)return sv(e,"error",new ye(t?.payload?.message)),{handler:Iv}}async function xv(e,t,n){return"channels.info"===t.method&&"fsm_up"===t.params.data.event?(e._fsmId=t.params.data.fsm_id,{handler:function(e,t,n){return"channels.info"===t.method&&"channel_reestablished"===t.params.data.event?{handler:Av}:wv(0,t,n)}}):wv(0,t,n)}async function _v(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 uv(e,null==n?"":no(n)),{handler:Sv}}return wv(0,t,n)}async function Pv(e,t){const n="initiator"===e._options.role?"initiator_sign":"responder_sign";if(t.method===`channels.sign.${n}`)return await Nv(e,`channels.${n}`,t.params.data,(async t=>e._options.sign(n,t))),{handler:Cv}}function Cv(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:Av}}if("channels.on_chain_tx"===r.method)return sv(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,cv(e,"signed"),{handler:Cv}}function Av(e,t,n){return"channels.info"===t.method&&"open"===t.params.data.event?(e._channelId=t.params.channel_id,{handler:function(t,n,r){return"channels.update"===n.method?(uv(e,n.params.data.state),{handler:Sv}):wv(0,n,r)}}):wv(0,t,n)}async function Sv(e,t,n){switch(t.method){case"channels.info":switch(t.params.data.event){case"update":case"withdraw_created":case"deposit_created":return{handler:Tv};case"own_withdraw_locked":case"withdraw_locked":case"own_deposit_locked":case"deposit_locked":case"peer_disconnected":case"channel_reestablished":case"open":return sv(e,nv(t.params.data.event)),{handler:Sv};case"fsm_up":return e._fsmId=t.params.data.fsm_id,{handler:Sv};case"timeout":case"close_mutual":case"shutdown":return{handler:Sv};case"closing":return cv(e,"closing"),{handler:Sv};case"closed_confirmed":return cv(e,"closed"),{handler:Iv};case"died":return cv(e,"died"),{handler:Iv}}break;case"channels.on_chain_tx":return sv(e,"onChainTx",t.params.data.tx,{info:t.params.data.info,type:t.params.data.type}),{handler:Sv};case"channels.leave":return{handler:Sv};case"channels.update":return uv(e,t.params.data.state),{handler:Sv};case"channels.sign.shutdown_sign_ack":return Tv(e,t,n)}}async function Tv(e,t,n){var r;const[,a]=null!==(r=t.method.match(/^channels\.sign\.([^.]+)$/))&&void 0!==r?r:[];return null==a?wv(0,t,n):await Nv(e,`channels.${a}`,t.params.data,(async n=>e._options.sign(a,n,{updates:t.params.data.updates})))?{handler:function e(t,r){return null!=r.error?{handler:e,state:n}:"channels.conflict"===r.method?{handler:Sv}:wv(0,r,n)},state:n}:{handler:Sv}}async function zv(e,t,n){return"channels.sign.shutdown_sign"!==t.method?wv(0,t,n):(await Nv(e,"channels.shutdown_sign",t.params.data,(async e=>n.sign(e))),{handler(e,t){return"channels.on_chain_tx"!==t.method?wv(0,t,n):{handler:Iv,state:n}},state:n})}function Ev(e,t,n){return"channels.leave"===t.method?(n.resolve({channelId:t.params.channel_id,signedTx:t.params.data.state}),hv(e),{handler:Iv}):"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:Sv}):wv(0,t,n)}function Iv(e,t,n){return null==n?{handler:Iv}:"closing"===t.params.data.event?{handler:Iv,state:n}:"channel_closed"===t.params.data.info?(n.closeTx=t.params.data.tx,{handler:Iv,state:n}):"closed_confirmed"===t.params.data.event?(n.resolve(n.closeTx),{handler:Iv}):{handler:Iv,state:n}}Sv.enter=e=>{cv(e,"open")};var Mv=n(7007),qv=n.n(Mv);function Rv(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")}let Ov=0;var kv=new WeakMap;class Bv{constructor(){var e,t;ay(this,"_eventEmitter",new(qv())),ay(this,"_nextRpcMessageId",0),ay(this,"_rpcCallbacks",new Map),ay(this,"_messageQueue",[]),ay(this,"_isMessageQueueLocked",!1),ay(this,"_actionQueue",[]),ay(this,"_isActionQueueLocked",!1),ay(this,"_status","disconnected"),ay(this,"_state",""),function(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)}(this,kv,void 0),Ov+=1,t=Ov,(e=kv).set(Rv(e,this),t)}_debug(...e){var t;!0===this._options.debug&&console.debug(`Channel #${t=kv,t.get(Rv(t,this))}`,...e)}static async initialize(e){return Bv._initialize(new Bv,e)}static async _initialize(e,t){var n;const r=null!=(null!==(n=t.existingFsmId)&&void 0!==n?n:t.existingChannelId);if(r&&(null==t.existingFsmId||null==t.existingChannelId))throw new H("`existingChannelId`, `existingFsmId` should be both provided or missed");const a=l[!0===t.reestablish?"awaitingReestablish":"awaitingReconnection"];return await async function(e,t,n,{url:r,...a}){e._options={url:r,...a};const i=new URL(r);Object.entries(a).filter((([e])=>!["sign","debug"].includes(e))).forEach((([e,t])=>i.searchParams.set(e.replace(/[A-Z]/g,(e=>`_${e.toLowerCase()}`)),t.toString()))),i.searchParams.set("protocol","json-rpc"),cv(e,"connecting"),e._websocket=new iv(i.toString()),await new Promise(((n,r)=>{Object.assign(e._websocket,{onerror:r,onopen:async r=>{n(),cv(e,"connected",r),ov(e,{handler:t}),fv(e)},onclose:t=>{cv(e,"disconnected",t),clearTimeout(e._pingTimeoutId)},onmessage:({data:t})=>function(e,t){const n=yg.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 dv(e,t)}catch(n){rr(n),sv(e,"error",new we(n,t))}}e._isMessageQueueLocked=!1}}(e)):n.params.channel_id!==e._channelId&&null!=e._channelId||fv(e):sv(e,"message",n.params.data.message);else{const t=e._rpcCallbacks.get(n.id);if(null==t)return void sv(e,"error",new B(`Can't find callback by id: ${n.id}`));try{t(n)}finally{e._rpcCallbacks.delete(n.id)}}}(e,t)})}))}(e,r?a:bv,0,t),e}on(e,t){this._eventEmitter.on(e,t)}off(e,t){this._eventEmitter.removeListener(e,t)}disconnect(){return hv(this)}status(){return this._status}async state(){const e=(t=await yv(this,"channels.get.offchain_state",{}),Object.entries(t).reduce(((e,[t,n])=>({...e,[nv(t)]:n})),{}));var t;return{calls:Xs(e.calls),...""!==e.halfSignedTx&&{halfSignedTx:so(e.halfSignedTx,Xr.SignedTx)},...""!==e.signedTx&&{signedTx:so(e.signedTx,Xr.SignedTx)},trees:Xs(e.trees)}}round(){if(""===this._state)return null;const e=so(this._state,Xr.SignedTx).encodedTx;switch(e.tag){case Xr.ChannelCreateTx:return 1;case Xr.ChannelOffChainTx:case Xr.ChannelWithdrawTx:case Xr.ChannelDepositTx:return e.round;default:return null}}id(){if(null==this._channelId)throw new B("Channel is not initialized");return this._channelId}fsmId(){if(null==this._fsmId)throw new B("Channel is not initialized");return this._fsmId}async enqueueAction(e){return async function(e,t,n){const r=new Promise(((r,a)=>{e._actionQueue.push({guard:t,action(){const e=n();return{...e,state:{...e.state,resolve:r,reject:a}}}})}));return pv(e),r}(this,((e,t)=>t?.handler===Sv),e)}async leave(){return this.enqueueAction((()=>(mv(this,"channels.leave"),{handler:Ev})))}async shutdown(e){return this.enqueueAction((()=>(mv(this,"channels.shutdown"),{handler:zv,state:{sign:e}})))}}class Gv extends Bv{async update(e,t,n,r,a=[]){return this.enqueueAction((()=>{mv(this,"channels.update.new",{from:e,to:t,amount:n,meta:a});const i=async(e,t,n)=>"channels.sign.update"===t.method?await Nv(this,"channels.update",t.params.data,(async e=>r(e,{updates:t.params.data.updates})))?{handler:i,state:n}:{handler:(e,t)=>vv(this,t,n,(()=>(uv(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Sv}))),state:n}:"channels.error"===t.method?(n.reject(new ye(t.data.message)),{handler:Sv}):vv(this,t,n);return{handler:i}}))}async poi({accounts:e,contracts:t}){const{poi:n}=await yv(this,"channels.get.poi",{accounts:e,contracts:t});return Xs(n)}async balances(e){return Object.fromEntries((await yv(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 wv(0,t,n);const r=(t,a)=>{if("channels.on_chain_tx"===a.method)return n.onOnChainTx?.(a.params.data.tx),{handler:r,state:n};if("channels.info"===a.method&&[`own_${e}_locked`,`${e}_locked`].includes(a.params.data.event)){const t="deposit"===e?"Deposit":"Withdraw",i=a.params.data.event.startsWith("own_");return n[`on${i?"Own":""}${t}Locked`]?.(),{handler:r,state:n}}return vv(this,a,n,(()=>(uv(this,a.params.data.state),n.resolve({accepted:!0,signedTx:a.params.data.state}),{handler:Sv})))},{sign:a}=n;return await Nv(this,`channels.${e}_tx`,t.params.data,(async e=>a(e,{updates:t.params.data.updates}))),{handler:r,state:n}}async withdraw(e,t,{onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}={}){return this.enqueueAction((()=>(mv(this,"channels.withdraw",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("withdraw",t,n),state:{sign:t,onOnChainTx:n,onOwnWithdrawLocked:r,onWithdrawLocked:a}})))}async deposit(e,t,{onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}={}){return this.enqueueAction((()=>(mv(this,"channels.deposit",{amount:e}),{handler:async(e,t,n)=>this.awaitingActionTx("deposit",t,n),state:{sign:t,onOnChainTx:n,onOwnDepositLocked:r,onDepositLocked:a}})))}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 Qn(500)),mv(this,"channels.message",{info:n,to:t})}}function $v(e){return Object.entries(e).reduce(((e,[t,n])=>({...e,[nv(t)]:n})),{})}class Uv extends Gv{static async initialize(e){return Bv._initialize(new Uv,e)}async createContract({code:e,callData:t,deposit:n,vmVersion:r,abiVersion:a},i){return this.enqueueAction((()=>(mv(this,"channels.update.new_contract",{code:e,call_data:t,deposit:n,vm_version:r,abi_version:a}),{handler:async(e,t,n)=>"channels.sign.update"!==t.method?wv(0,t,n):(await Nv(this,"channels.update",t.params.data,(async e=>n.sign(e))),{handler:(e,t,n)=>vv(this,t,n,(()=>{const e=so(t.params.data.state,Xr.SignedTx).encodedTx;if(e.tag!==Xr.ChannelOffChainTx)throw new B(`Tag should be ${Xr[Xr.ChannelOffChainTx]}, got ${Xr[e.tag]} instead`);const r="initiator"===this._options.role?"initiatorId":"responderId",a=this._options[r];uv(this,t.params.data.state);const i=ta(a,e.round);return sv(this,"newContract",i),n.resolve({accepted:!0,address:i,signedTx:t.params.data.state}),{handler:Sv}})),state:n}),state:{sign:i}})))}async callContract({amount:e,callData:t,contract:n,abiVersion:r},a){return this.enqueueAction((()=>(mv(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?wv(0,t,n):(await Nv(this,"channels.update",t.params.data,(async e=>n.sign(e,{updates:t.params.data.updates}))),{handler:(e,t,n)=>vv(this,t,n,(()=>(uv(this,t.params.data.state),n.resolve({accepted:!0,signedTx:t.params.data.state}),{handler:Sv}))),state:n}),state:{sign:a}})))}async forceProgress({amount:e,callData:t,contract:n,abiVersion:r,gasLimit:a=1e6,gasPrice:i=Number(si.minGasPrice)},s,{onOnChainTx:o}={}){return this.enqueueAction((()=>(mv(this,"channels.force_progress",{amount:e,call_data:t,contract_id:n,abi_version:r,gas_price:i,gas:a}),{handler:async(e,t,n)=>"channels.sign.force_progress_tx"!==t.method?wv(0,t,n):(await Nv(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),sv(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})),wv(0,t,n)),state:n}),state:{sign:s,onOnChainTx:o}})))}async callContractStatic({amount:e,callData:t,contract:n,abiVersion:r}){return $v(await yv(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 $v(await yv(this,"channels.get.contract_call",{caller_id:e,contract_id:t,round:n}))}async getContractState(e){const t=await yv(this,"channels.get.contract",{pubkey:e});return $v({...t,contract:$v(t.contract)})}async cleanContractCalls(){return this.enqueueAction((()=>(mv(this,"channels.clean_contract_calls"),{handler(e,t,n){return"channels.calls_pruned.reply"===t.method?(n.resolve(),{handler:Sv}):(n.reject(new Ne("Unexpected message received")),{handler:Iv})}})))}}var Vv=null;"undefined"!=typeof WebSocket?Vv=WebSocket:"undefined"!=typeof MozWebSocket?Vv=MozWebSocket:void 0!==n.g?Vv=n.g.WebSocket||n.g.MozWebSocket:"undefined"!=typeof window?Vv=window.WebSocket||window.MozWebSocket:"undefined"!=typeof self&&(Vv=self.WebSocket||self.MozWebSocket);var Dv=Vv;function Lv(e,t,n){jv(e,t),t.set(e,n)}function jv(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Hv(e,t,n){return n(Wv(e,t))}function Fv(e,t,n){return e.set(Wv(e,t),n),n}function Jv(e,t){return e.get(Wv(e,t))}function Wv(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 Kv=function(e){return e.Middleware="mdw",e.Node="node",e.All="all",e}(Kv||{});class Yv extends q{constructor(e){super(e),this.name="MiddlewareSubscriberError"}}class Qv extends Yv{constructor(e){super("Connection closed"),this.closeEvent=e,this.name="MiddlewareSubscriberDisconnected"}}var Zv=new WeakMap,Xv=new WeakMap,eb=new WeakMap,tb=new WeakSet;class nb{get webSocket(){return Jv(eb,this)}constructor(e){var t;jv(this,t=tb),t.add(this),Lv(this,Zv,[]),Lv(this,Xv,[]),Lv(this,eb,void 0),this.url=e}async reconnect(){Wv(tb,this,ob).call(this),Fv(eb,this,await new Promise((e=>{const t=new Dv(this.url);Object.assign(t,{onopen:()=>e(t),onerror:e=>{Wv(tb,this,sb).call(this,(()=>!0),void 0,e.error)},onmessage:e=>{if("string"!=typeof e.data)throw new ae("Unknown incoming message type: "+typeof e.data);Wv(tb,this,cb).call(this,JSON.parse(e.data))},onclose:e=>{Wv(tb,this,sb).call(this,(()=>!0),void 0,new Qv(e)),Wv(tb,this,ob).call(this,!0)}})}))),await Promise.all([...Hv(tb,this,rb)].map((e=>Wv(tb,this,ib).call(this,!0,e))))}subscribeKeyBlocks(e){return Wv(tb,this,ub).call(this,"KeyBlocks",Kv.Middleware,e)}subscribeKeyBlocksNode(e){return Wv(tb,this,ub).call(this,"KeyBlocks",Kv.Node,e)}subscribeKeyBlocksAll(e){return Wv(tb,this,ub).call(this,"KeyBlocks",Kv.All,e)}subscribeMicroBlocks(e){return Wv(tb,this,ub).call(this,"MicroBlocks",Kv.Middleware,e)}subscribeMicroBlocksNode(e){return Wv(tb,this,ub).call(this,"MicroBlocks",Kv.Node,e)}subscribeMicroBlocksAll(e){return Wv(tb,this,ub).call(this,"MicroBlocks",Kv.All,e)}subscribeTransactions(e){return Wv(tb,this,ub).call(this,"Transactions",Kv.Middleware,e)}subscribeTransactionsNode(e){return Wv(tb,this,ub).call(this,"Transactions",Kv.Node,e)}subscribeTransactionsAll(e){return Wv(tb,this,ub).call(this,"Transactions",Kv.All,e)}subscribeObject(e,t){return Wv(tb,this,ub).call(this,e,Kv.Middleware,t)}subscribeObjectNode(e,t){return Wv(tb,this,ub).call(this,e,Kv.Node,t)}subscribeObjectAll(e,t){return Wv(tb,this,ub).call(this,e,Kv.All,t)}}function rb(e){return new Set(Jv(Zv,e).map((([e])=>e)))}function ab(e){if(null==Jv(eb,this))throw new ie;Jv(eb,this).send(JSON.stringify(e))}function ib(e,t){if(null==Jv(eb,this))return;const n=["KeyBlocks","MicroBlocks","Transactions"].includes(t)?t:"Object";Wv(tb,this,ab).call(this,{op:e?"Subscribe":"Unsubscribe",payload:n,..."Object"===n&&{target:t}}),Jv(Xv,this).push([e,t])}function sb(e,t,n){Jv(Zv,this).filter((([t,n])=>e(t,n))).forEach((([,,e])=>e(t,n)))}function ob(e=!1){null!=Jv(eb,this)&&(e||Jv(eb,this).close(),Object.assign(Jv(eb,this),{onopen:void 0,onerror:void 0,onmessage:void 0}),Fv(eb,this,void 0))}function cb(e){if("string"==typeof e||Array.isArray(e)){const t=Jv(Xv,this).shift();if(null==t)throw new ae("Request queue is empty");const[n,r]=t;let a;return"string"==typeof e&&(a=new Yv(e)),e.includes(r)!==n&&(a=new ae(`Expected ${r} to be${n?"":" not"} included into ${e}`)),void(null!=a&&Wv(tb,this,sb).call(this,(e=>r===e),void 0,a))}Wv(tb,this,sb).call(this,((t,n)=>!(t!==e.subscription&&t!==e.target||n!==e.source&&n!==Kv.All)),e.payload)}function ub(e,t,n){const r=[e,t,n];return 0===Hv(tb,this,rb).size&&this.reconnect(),Hv(tb,this,rb).has(e)||Wv(tb,this,ib).call(this,!0,e),Jv(Zv,this).push(r),()=>{Fv(Zv,this,Jv(Zv,this).filter((e=>e!==r))),Hv(tb,this,rb).has(e)||Wv(tb,this,ib).call(this,!1,e),0===Hv(tb,this,rb).size&&Wv(tb,this,ob).call(this)}}const lb={parameterPath:"accept",mapper:{defaultValue:"application/json",isConstant:!0,serializedName:"Accept",type:{name:"String"}}},mb={parameterPath:"$host",mapper:{serializedName:"$host",required:!0,type:{name:"String"}},skipEncoding:!0},pb={parameterPath:"accountId",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"accountId",required:!0,type:{name:"String"}}},db={parameterPath:["options","limit"],mapper:{defaultValue:10,constraints:{InclusiveMaximum:100,InclusiveMinimum:1},serializedName:"limit",type:{name:"Number"}}},hb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},fb={parameterPath:["options","contract"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",type:{name:"String"}}},yb={parameterPath:["options","prefix"],mapper:{serializedName:"prefix",type:{name:"String"}}},gb={parameterPath:["options","exact"],mapper:{serializedName:"exact",type:{name:"String"}}},Nb={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contractId",required:!0,type:{name:"String"}}},wb={parameterPath:["options","from"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"from",type:{name:"String"}}},vb={parameterPath:["options","to"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to",type:{name:"String"}}},bb={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},xb={parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"String"}}},_b={parameterPath:["options","blockHash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}}},Pb={parameterPath:["options","hash"],mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}}},Cb={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},Ab={parameterPath:["options","contractId"],mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}}},Sb={parameterPath:"contractId",mapper:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}}},Tb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(epoch):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},zb={parameterPath:"validator",mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"validator",required:!0,type:{name:"String"}}},Eb={parameterPath:"hashOrKbi",mapper:{serializedName:"hash_or_kbi",required:!0,type:{name:"String"}}},Ib={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},Mb={parameterPath:["options","ownedBy"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owned_by",type:{name:"String"}}},qb={parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"String"}}},Rb={parameterPath:"id",mapper:{serializedName:"id",required:!0,type:{name:"String"}}},Ob={parameterPath:"id",mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"id",required:!0,type:{name:"String"}}},kb={parameterPath:["options","minStartDate"],mapper:{serializedName:"min_start_date",type:{name:"String"}}},Bb={parameterPath:["options","maxStartDate"],mapper:{serializedName:"max_start_date",type:{name:"String"}}},Gb={parameterPath:["options","txType"],mapper:{serializedName:"tx_type",type:{name:"String"}}},$b={parameterPath:["options","account"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",type:{name:"String"}}},Ub={parameterPath:["options","channel"],mapper:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",type:{name:"String"}}},Vb={parameterPath:["options","oracle"],mapper:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",type:{name:"String"}}},Db={parameterPath:["options","senderId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}}},Lb={parameterPath:["options","recipientId"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}}},jb={parameterPath:["options","scope"],mapper:{constraints:{Pattern:new RegExp("(time|gen):\\d+(-\\d+)?")},serializedName:"scope",type:{name:"String"}}},Hb={parameterPath:["options","id"],mapper:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"id",type:{name:"String"}}},Fb={parameterPath:"hash",mapper:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}}},Jb={type:{name:"Composite",className:"PathsBx0Ya3V3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Activity"}}}}}}},Wb={type:{name:"Composite",className:"Activity",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["SpendTxEvent","OracleRegisterTxEvent","OracleExtendTxEvent","OracleQueryTxEvent","OracleResponseTxEvent","NamePreclaimTxEvent","NameClaimTxEvent","NameTransferTxEvent","NameUpdateTxEvent","NameRevokeTxEvent","ContractCreateTxEvent","ContractCallTxEvent","GaAttachTxEvent","GaMetaTxEvent","ChannelCreateTxEvent","ChannelDepositTxEvent","ChannelWithdrawTxEvent","ChannelForceProgressTxEvent","ChannelCloseMutualTxEvent","ChannelCloseSoloTxEvent","ChannelSlashTxEvent","ChannelSettleTxEvent","ChannelSnapshotSoloTxEvent","ChannelSetDelegatesTxEvent","ChannelOffchainTxEvent","ChannelClientReconnectTxEvent","PayingForTxEvent"]}},payload:{serializedName:"payload",type:{name:"Composite",className:"ActivityPayload"}}}}},Kb={type:{name:"Composite",className:"ActivityPayload",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",type:{name:"String"}},blockHeight:{serializedName:"block_height",type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",type:{name:"String"}},microIndex:{serializedName:"micro_index",type:{name:"Number"}},microTime:{serializedName:"micro_time",type:{name:"UnixTime"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},amount:{serializedName:"amount",type:{name:"BigInt"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",type:{name:"String"}},logIdx:{serializedName:"log_idx",type:{name:"Number"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",type:{name:"String"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",type:{name:"String"}},tokenId:{serializedName:"token_id",type:{name:"Number"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",type:{name:"String"}},internalTx:{serializedName:"internal_tx",type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",type:{name:"Number"}},kind:{serializedName:"kind",type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",type:{name:"String"}}}}},Yb={type:{name:"Composite",className:"Tx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",type:{name:"String"}},initiatorId:{serializedName:"initiator_id",type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",type:{name:"BigInt"}},responderId:{serializedName:"responder_id",type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",type:{name:"Number"}},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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"String"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}},initiatorAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",type:{name:"Number"}},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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},accountId:{serializedName:"account_id",type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}},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:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},nameId:{serializedName:"name_id",type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",type:{name:"Number"}},pointers:{serializedName:"pointers",type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",type:{name:"Number"}},ownerId:{serializedName:"owner_id",type:{name:"String"}},code:{serializedName:"code",type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",type:{name:"BigInt"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},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"]}}}}},Qb={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"}}}}}}},Zb={serializedName:"OffChainUpdate",type:{name:"Composite",className:"OffChainUpdate",uberParent:"OffChainUpdate",polymorphicDiscriminator:{serializedName:"op",clientName:"op"},modelProperties:{op:{serializedName:"op",required:!0,type:{name:"String"}}}}},Xb={type:{name:"Composite",className:"RelativeTTL",modelProperties:{type:{defaultValue:"delta",isConstant:!0,serializedName:"type",type:{name:"String"}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},ex={type:{name:"Composite",className:"Ttl",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"Enum",allowedValues:["delta","block"]}},value:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"value",required:!0,type:{name:"Number"}}}}},tx={type:{name:"Composite",className:"NamePointer",modelProperties:{key:{serializedName:"key",required:!0,type:{name:"String"}},encodedKey:{serializedName:"encoded_key",type:{name:"String"}},id:{serializedName:"id",required:!0,type:{name:"String"}}}}},nx={type:{name:"Composite",className:"SignedTx",modelProperties:{tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}},blockHeight:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:-1},serializedName:"block_height",type:{name:"Number"}},blockHash:{serializedName:"block_hash",type:{name:"String"}},hash:{serializedName:"hash",type:{name:"String"}},encodedTx:{serializedName:"encoded_tx",type:{name:"String"}},signatures:{serializedName:"signatures",type:{name:"Sequence",element:{type:{name:"String"}}}}}}},rx={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"}}}}},ax={type:{name:"Composite",className:"ErrorResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},ix={type:{name:"Composite",className:"Paths1Q9E32FV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},sx={type:{name:"Composite",className:"Aex141TokenResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}}}}},ox={type:{name:"Composite",className:"PathsZ92TkfV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9BalanceResponse"}}}}}}},cx={type:{name:"Composite",className:"Aex9BalanceResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHash:{serializedName:"block_hash",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},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"}}}}},ux={type:{name:"Composite",className:"Paths10R8Q7PV3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},lx={type:{name:"Composite",className:"DexSwap",modelProperties:{amounts:{serializedName:"amounts",type:{name:"Composite",className:"DexSwapAmounts"}},action:{serializedName:"action",required:!0,type:{name:"Enum",allowedValues:["SWAP","BUY","SELL"]}},caller:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"caller",required:!0,type:{name:"String"}},fromToken:{serializedName:"from_token",required:!0,type:{name:"String"}},toToken:{serializedName:"to_token",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},toAccount:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"to_account",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},fromContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"from_contract",required:!0,type:{name:"String"}},toContract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"to_contract",required:!0,type:{name:"String"}},fromAmount:{serializedName:"from_amount",required:!0,type:{name:"BigInt"}},toAmount:{serializedName:"to_amount",required:!0,type:{name:"BigInt"}},fromDecimals:{serializedName:"from_decimals",required:!0,type:{name:"Number"}},toDecimals:{serializedName:"to_decimals",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},mx={type:{name:"Composite",className:"DexSwapAmounts",modelProperties:{amount0In:{serializedName:"amount0_in",required:!0,type:{name:"BigInt"}},amount1In:{serializedName:"amount1_in",required:!0,type:{name:"BigInt"}},amount0Out:{serializedName:"amount0_out",required:!0,type:{name:"BigInt"}},amount1Out:{serializedName:"amount1_out",required:!0,type:{name:"BigInt"}}}}},px={type:{name:"Composite",className:"Paths16G4GzrV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},dx={type:{name:"Composite",className:"NameClaim",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameClaimTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},hx={type:{name:"Composite",className:"NameClaimTx",modelProperties:{name:{serializedName:"name",required:!0,type:{name:"String"}},nameSalt:{constraints:{InclusiveMinimum:0},serializedName:"name_salt",required:!0,type:{name:"Number"}},nameFee:{constraints:{InclusiveMinimum:0},serializedName:"name_fee",type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},fx={type:{name:"Composite",className:"NotFoundResponse",modelProperties:{error:{serializedName:"error",required:!0,type:{name:"String"}}}}},yx={type:{name:"Composite",className:"PathsA60QxwV3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Pointee"}}}}}}},gx={type:{name:"Composite",className:"Pointee",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},key:{serializedName:"key",required:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}}}}},Nx={type:{name:"Composite",className:"NameUpdateTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},nameTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"name_ttl",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},clientTtl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"client_ttl",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},wx={type:{name:"Composite",className:"PathsXcg812V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchema",modelProperties:{contractCreateTx:{serializedName:"contract_create_tx",type:{name:"Composite",className:"Get200ApplicationJsonProperties"}},contractCallTx:{serializedName:"contract_call_tx",type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx"}},gaAttachTx:{serializedName:"ga_attach_tx",type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx"}},gaMetaTx:{serializedName:"ga_meta_tx",type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx"}},channelCloseMutualTx:{serializedName:"channel_close_mutual_tx",type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx"}},channelCloseSoloTx:{serializedName:"channel_close_solo_tx",type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx"}},channelCreateTx:{serializedName:"channel_create_tx",type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx"}},channelDepositTx:{serializedName:"channel_deposit_tx",type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx"}},channelForceProgressTx:{serializedName:"channel_force_progress_tx",type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx"}},channelSetDelegatesTx:{serializedName:"channel_set_delegates_tx",type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx"}},channelSettleTx:{serializedName:"channel_settle_tx",type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx"}},channelSlashTx:{serializedName:"channel_slash_tx",type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx"}},channelSnapshotSoloTx:{serializedName:"channel_snapshot_solo_tx",type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx"}},channelWithdrawTx:{serializedName:"channel_withdraw_tx",type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx"}},nameClaimTx:{serializedName:"name_claim_tx",type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx"}},namePreclaimTx:{serializedName:"name_preclaim_tx",type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx"}},nameRevokeTx:{serializedName:"name_revoke_tx",type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx"}},nameTransferTx:{serializedName:"name_transfer_tx",type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx"}},nameUpdateTx:{serializedName:"name_update_tx",type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx"}},oracleExtendTx:{serializedName:"oracle_extend_tx",type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx"}},oracleQueryTx:{serializedName:"oracle_query_tx",type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx"}},oracleRegisterTx:{serializedName:"oracle_register_tx",type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx"}},oracleResponseTx:{serializedName:"oracle_response_tx",type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx"}},payingForTx:{serializedName:"paying_for_tx",type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx"}},spendTx:{serializedName:"spend_tx",type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx"}},channelOffchainTx:{serializedName:"channel_offchain_tx",type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx"}},total:{serializedName:"total",required:!0,type:{name:"Number"}}}}},vx={type:{name:"Composite",className:"Get200ApplicationJsonProperties",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},bx={type:{name:"Composite",className:"PathsEvgmfsV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesContractCallTx",modelProperties:{contractId:{serializedName:"contract_id",type:{name:"Number"}},callerId:{serializedName:"caller_id",type:{name:"Number"}}}}},xx={type:{name:"Composite",className:"Paths1Mat0BzV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",type:{name:"Number"}}}}},_x={type:{name:"Composite",className:"Paths1Smy8TV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesGaMetaTx",modelProperties:{gaId:{serializedName:"ga_id",type:{name:"Number"}}}}},Px={type:{name:"Composite",className:"PathsTachlnV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseMutualTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Cx={type:{name:"Composite",className:"Paths1AeqodeV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCloseSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ax={type:{name:"Composite",className:"PathsGp6EyrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",type:{name:"Number"}},responderId:{serializedName:"responder_id",type:{name:"Number"}}}}},Sx={type:{name:"Composite",className:"Paths10Z6Jt8V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelDepositTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Tx={type:{name:"Composite",className:"Paths1Jkl3L3V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelForceProgressTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},zx={type:{name:"Composite",className:"PathsN9Iv8YV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSetDelegatesTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ex={type:{name:"Composite",className:"PathsCsym65V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSettleTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Ix={type:{name:"Composite",className:"PathsEwav40V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSlashTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},Mx={type:{name:"Composite",className:"Paths5Ehb0PV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelSnapshotSoloTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},fromId:{serializedName:"from_id",type:{name:"Number"}}}}},qx={type:{name:"Composite",className:"Paths1Qk8BkgV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelWithdrawTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}},toId:{serializedName:"to_id",type:{name:"Number"}}}}},Rx={type:{name:"Composite",className:"PathsC7WhtoV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameClaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Ox={type:{name:"Composite",className:"Paths1R4Z885V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNamePreclaimTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},commitmentId:{serializedName:"commitment_id",type:{name:"Number"}}}}},kx={type:{name:"Composite",className:"PathsKrpz02V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameRevokeTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},Bx={type:{name:"Composite",className:"PathsPs07B4V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameTransferTx",modelProperties:{recipientId:{serializedName:"recipient_id",type:{name:"Number"}},accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},Gx={type:{name:"Composite",className:"PathsTug6HrV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesNameUpdateTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}},nameId:{serializedName:"name_id",type:{name:"Number"}}}}},$x={type:{name:"Composite",className:"Paths17Dchb7V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleExtendTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Ux={type:{name:"Composite",className:"Paths1Ngkd7FV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleQueryTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Vx={type:{name:"Composite",className:"PathsMvqgifV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleRegisterTx",modelProperties:{accountId:{serializedName:"account_id",type:{name:"Number"}}}}},Dx={type:{name:"Composite",className:"Paths1U2Ve7RV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesOracleResponseTx",modelProperties:{oracleId:{serializedName:"oracle_id",type:{name:"Number"}}}}},Lx={type:{name:"Composite",className:"Paths1N757S0V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesPayingForTx",modelProperties:{payerId:{serializedName:"payer_id",type:{name:"Number"}}}}},jx={type:{name:"Composite",className:"Paths11Bqs5V3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesSpendTx",modelProperties:{senderId:{serializedName:"sender_id",type:{name:"Number"}},recipientId:{serializedName:"recipient_id",type:{name:"Number"}}}}},Hx={type:{name:"Composite",className:"Paths4Pjk8DV3AccountsAccountidTransactionsCountGetResponses200ContentApplicationJsonSchemaPropertiesChannelOffchainTx",modelProperties:{channelId:{serializedName:"channel_id",type:{name:"Number"}}}}},Fx={type:{name:"Composite",className:"Paths8I0YgwV3Aex141GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141Response"}}}}}}},Jx={type:{name:"Composite",className:"Aex141Response",modelProperties:{baseUrl:{serializedName:"base_url",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",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"}}}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}},creationTime:{serializedName:"creation_time",required:!0,type:{name:"UnixTime"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}}}}},Wx={type:{name:"Composite",className:"PathsWkpcwaV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplatesResponse"}}}}}}},Kx={type:{name:"Composite",className:"Aex141TemplatesResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Yx={type:{name:"Composite",className:"PathsRay4X0V3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TemplateTokensResponse"}}}}}}},Qx={type:{name:"Composite",className:"Aex141TemplateTokensResponse",modelProperties:{ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},Zx={type:{name:"Composite",className:"Paths1TkisghV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TokenResponse"}}}}}}},Xx={type:{name:"Composite",className:"Aex141TokenDetailResponse",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},ownerId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"owner_id",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},metadata:{serializedName:"metadata",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},e_={type:{name:"Composite",className:"Paths1A8Ah39V3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex141TransferEvent"}}}}}}},t_={type:{name:"Composite",className:"Aex141TransferEvent",modelProperties:{blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}},tokenId:{serializedName:"token_id",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},n_={type:{name:"Composite",className:"Paths1Uqqby0V3Aex9GetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9Response"}}}}}}},r_={type:{name:"Composite",className:"Aex9Response",modelProperties:{contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},initialSupply:{serializedName:"initial_supply",required:!0,type:{name:"BigInt"}},eventSupply:{serializedName:"event_supply",required:!0,type:{name:"BigInt"}},decimals:{serializedName:"decimals",required:!0,type:{name:"Number"}},extensions:{serializedName:"extensions",type:{name:"Sequence",element:{type:{name:"String"}}}},holders:{serializedName:"holders",required:!0,type:{name:"Number"}},name:{serializedName:"name",required:!0,type:{name:"String"}},symbol:{serializedName:"symbol",required:!0,type:{name:"String"}},invalid:{serializedName:"invalid",required:!0,type:{name:"Boolean"}}}}},a_={type:{name:"Composite",className:"Paths19IxhsmV3Aex9CountGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Number"}}}}},i_={type:{name:"Composite",className:"PathsEeiffwV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Aex9ContractBalanceResponse"}}}}}}},s_={type:{name:"Composite",className:"Aex9ContractBalanceResponse",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},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"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lastLogIdx:{serializedName:"last_log_idx",required:!0,type:{name:"Number"}}}}},o_={type:{name:"Composite",className:"PathsKr825V3Aex9ContractidBalancesAccountidGetResponses200ContentApplicationJsonSchema",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}}}}},c_={type:{name:"Composite",className:"Paths108B3VtV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchemaAllof1",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem"}}}}}}},u_={type:{name:"Composite",className:"Get200ApplicationJsonAllOfPropertiesItemsItem",modelProperties:{account:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}}}}},l_={type:{name:"Composite",className:"PathsQmewnaV3ChannelsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Channel"}}}}}}},m_={type:{name:"Composite",className:"Channel",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},channel:{constraints:{Pattern:new RegExp("^ch_\\w{38,50}$")},serializedName:"channel",required:!0,type:{name:"String"}},channelReserve:{serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},delegateIds:{serializedName:"delegate_ids",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},initiator:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"initiator",required:!0,type:{name:"String"}},initiatorAmount:{serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},lastUpdatedHeight:{serializedName:"last_updated_height",required:!0,type:{name:"Number"}},lastUpdatedTxType:{serializedName:"last_updated_tx_type",required:!0,type:{name:"String"}},lastUpdatedTime:{serializedName:"last_updated_time",required:!0,type:{name:"UnixTime"}},lastUpdatedTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_updated_tx_hash",required:!0,type:{name:"String"}},lockPeriod:{serializedName:"lock_period",required:!0,type:{name:"Number"}},lockedUntil:{serializedName:"locked_until",required:!0,type:{name:"Number"}},responder:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"responder",required:!0,type:{name:"String"}},responderAmount:{serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},round:{serializedName:"round",required:!0,type:{name:"Number"}},soloRound:{serializedName:"solo_round",required:!0,type:{name:"Number"}},stateHash:{constraints:{Pattern:new RegExp("^st_\\w+$")},serializedName:"state_hash",required:!0,type:{name:"String"}},updatesCount:{serializedName:"updates_count",required:!0,type:{name:"Number"}}}}},p_={type:{name:"Composite",className:"Paths18L84JcV3ContractsCallsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractCall"}}}}}}},d_={type:{name:"Composite",className:"ContractCall",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},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"}}}},localIdx:{serializedName:"local_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}}}}},h_={type:{name:"Composite",className:"Paths10Kk1UxV3ContractsLogsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"ContractLog"}}}}}}},f_={type:{name:"Composite",className:"ContractLog",modelProperties:{args:{serializedName:"args",required:!0,type:{name:"Sequence",element:{type:{name:"String"}}}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},data:{serializedName:"data",required:!0,type:{name:"String"}},eventHash:{serializedName:"event_hash",required:!0,type:{name:"String"}},eventName:{serializedName:"event_name",required:!0,nullable:!0,type:{name:"String"}},extCallerContractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"ext_caller_contract_id",required:!0,nullable:!0,type:{name:"String"}},extCallerContractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ext_caller_contract_tx_hash",required:!0,nullable:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},parentContractId:{serializedName:"parent_contract_id",required:!0,nullable:!0,type:{name:"Number"}}}}},y_={type:{name:"Composite",className:"Contract",modelProperties:{aexnType:{serializedName:"aexn_type",required:!0,nullable:!0,type:{name:"String"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},contract:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract",required:!0,type:{name:"String"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},createTx:{serializedName:"create_tx",type:{name:"Composite",className:"ContractCreateTx"}}}}},g_={type:{name:"Composite",className:"ContractCreateTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},deposit:{constraints:{InclusiveMinimum:0},serializedName:"deposit",required:!0,type:{name:"BigInt"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},N_={type:{name:"Composite",className:"Paths9Yfxl2V3DexSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},w_={type:{name:"Composite",className:"Paths6Vze8ZV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DexSwap"}}}}}}},v_={type:{name:"Composite",className:"Paths1F8GzwrV3HyperchainEpochsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfo"}}}}}}},b_={type:{name:"Composite",className:"EpochInfo",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},first:{serializedName:"first",required:!0,type:{name:"Number"}},last:{serializedName:"last",required:!0,type:{name:"Number"}},length:{serializedName:"length",required:!0,type:{name:"Number"}},seed:{serializedName:"seed",required:!0,type:{name:"String"}},lastPinHeight:{serializedName:"last_pin_height",required:!0,type:{name:"Number"}},parentBlockHash:{serializedName:"parent_block_hash",required:!0,type:{name:"String"}},lastLeader:{serializedName:"last_leader",required:!0,type:{name:"String"}},epochStartTime:{serializedName:"epoch_start_time",required:!0,type:{name:"Number"}},validators:{serializedName:"validators",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"EpochInfoValidatorsItem"}}}}}}},x_={type:{name:"Composite",className:"EpochInfoValidatorsItem",modelProperties:{validator:{serializedName:"validator",type:{name:"String"}},stake:{serializedName:"stake",type:{name:"Number"}}}}},__={type:{name:"Composite",className:"Paths7W5O80V3HyperchainScheduleGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Schedule"}}}}}}},P_={type:{name:"Composite",className:"Schedule",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},leader:{serializedName:"leader",required:!0,type:{name:"String"}}}}},C_={type:{name:"Composite",className:"Paths1Qg7SclV3HyperchainValidatorsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Validator"}}}}}}},A_={type:{name:"Composite",className:"Validator",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}},totalStakes:{serializedName:"total_stakes",required:!0,type:{name:"Number"}},delegates:{serializedName:"delegates",required:!0,type:{name:"Number"}},rewardsEarned:{serializedName:"rewards_earned",required:!0,type:{name:"Number"}},pinningHistory:{serializedName:"pinning_history",required:!0,type:{name:"Dictionary",value:{type:{name:"Number"}}}}}}},S_={type:{name:"Composite",className:"Paths7Ks32NV3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},T_={type:{name:"Composite",className:"Delegate",modelProperties:{epoch:{serializedName:"epoch",required:!0,type:{name:"Number"}},delegate:{serializedName:"delegate",required:!0,type:{name:"String"}},stake:{serializedName:"stake",required:!0,type:{name:"Number"}},validator:{serializedName:"validator",required:!0,type:{name:"String"}}}}},z_={type:{name:"Composite",className:"PathsDwhnfdV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Delegate"}}}}}}},E_={type:{name:"Composite",className:"PathsEue6HzV3KeyBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"KeyBlockExtended"}}}}}}},I_={type:{name:"Composite",className:"KeyBlock",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"target",required:!0,type:{name:"Number"}},pow:{constraints:{MinItems:42,MaxItems:42},serializedName:"pow",type:{name:"Sequence",element:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},type:{name:"Number"}}}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},time:{serializedName:"time",required:!0,type:{name:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}},info:{serializedName:"info",required:!0,type:{name:"String"}}}}},M_={type:{name:"Composite",className:"PathsNn60D7V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"MicroBlockExtended"}}}}}}},q_={type:{name:"Composite",className:"MicroBlockHeader",modelProperties:{hash:{serializedName:"hash",required:!0,type:{name:"String"}},height:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"height",required:!0,type:{name:"Number"}},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:"UnixTime"}},version:{constraints:{InclusiveMaximum:4294967295,InclusiveMinimum:0},serializedName:"version",required:!0,type:{name:"Number"}}}}},R_={type:{name:"Composite",className:"PathsXhlqwrV3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},O_={type:{name:"Composite",className:"Transaction",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},k_={type:{name:"Composite",className:"Paths181Cs9V3NamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Name"}}}}}}},B_={type:{name:"Composite",className:"Name",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},hash:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateActivationTime:{serializedName:"approximate_activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},pointers:{serializedName:"pointers",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NamePointer"}}}},auction:{serializedName:"auction",type:{name:"Composite",className:"Auction"}},auctionTimeout:{serializedName:"auction_timeout",required:!0,type:{name:"Number"}},ownership:{serializedName:"ownership",type:{name:"Composite",className:"NameOwnership"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},revoke:{serializedName:"revoke",type:{name:"Composite",className:"NameTx"}},claimsCount:{serializedName:"claims_count",type:{name:"Number"}}}}},G_={type:{name:"Composite",className:"Auction",modelProperties:{auctionEnd:{serializedName:"auction_end",required:!0,type:{name:"Number"}},activationTime:{serializedName:"activation_time",required:!0,type:{name:"UnixTime"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},lastBid:{serializedName:"last_bid",type:{name:"Composite",className:"AuctionLastBid"}},name:{constraints:{Pattern:new RegExp("^\\w+\\.chain$")},serializedName:"name",required:!0,type:{name:"String"}},nameFee:{serializedName:"name_fee",required:!0,type:{name:"BigInt"}},claimsCount:{serializedName:"claims_count",required:!0,type:{name:"Number"}}}}},$_={type:{name:"Composite",className:"AuctionLastBid",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"AuctionLastBidTx"}}}}},U_={type:{name:"Composite",className:"Components17W16A5SchemasAuctionPropertiesLastBidPropertiesTxAllof1",modelProperties:{nameId:{constraints:{Pattern:new RegExp("^nm_\\w{38,50}$")},serializedName:"name_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},V_={type:{name:"Composite",className:"NameOwnership",modelProperties:{current:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"current",type:{name:"String"}},original:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"original",type:{name:"String"}}}}},D_={type:{name:"Composite",className:"NameTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTxTx"}}}}},L_={type:{name:"Composite",className:"NameRevokeTx",modelProperties:{nameId:{serializedName:"name_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},j_={type:{name:"Composite",className:"Components171VsjiSchemasNametxPropertiesTxAllof1",modelProperties:{type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}}}}},H_={type:{name:"Composite",className:"Paths1R08F8HV3NamesAuctionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Auction"}}}}}}},F_={type:{name:"Composite",className:"PathsCrb9BgV3NamesAuctionsIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},J_={type:{name:"Composite",className:"PathsMyl4W2V3NamesIdClaimsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameClaim"}}}}}}},W_={type:{name:"Composite",className:"Paths1Ukwk06V3NamesIdTransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameTransfer"}}}}}}},K_={type:{name:"Composite",className:"NameTransfer",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameTransferTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},Y_={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},Q_={type:{name:"Composite",className:"PathsRcnvllV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"NameUpdate"}}}}}}},Z_={type:{name:"Composite",className:"NameUpdate",modelProperties:{activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"NameUpdateTx"}},internalSource:{serializedName:"internal_source",type:{name:"Boolean"}}}}},X_={type:{name:"Composite",className:"PathsGcr9MrV3OraclesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Oracle"}}}}}}},eP={type:{name:"Composite",className:"Oracle",modelProperties:{active:{serializedName:"active",required:!0,type:{name:"Boolean"}},activeFrom:{serializedName:"active_from",required:!0,type:{name:"Number"}},approximateExpireTime:{serializedName:"approximate_expire_time",required:!0,type:{name:"UnixTime"}},expireHeight:{serializedName:"expire_height",required:!0,type:{name:"Number"}},registerTime:{serializedName:"register_time",required:!0,type:{name:"UnixTime"}},registerTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"register_tx_hash",required:!0,type:{name:"String"}},format:{serializedName:"format",type:{name:"Composite",className:"OracleFormat"}},oracle:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},register:{serializedName:"register",type:{name:"Composite",className:"OracleTx"}}}}},tP={type:{name:"Composite",className:"OracleFormat",modelProperties:{query:{serializedName:"query",required:!0,type:{name:"String"}},response:{serializedName:"response",required:!0,type:{name:"String"}}}}},nP={type:{name:"Composite",className:"OracleTx",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleTxTx"}}}}},rP={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:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"Ttl"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",type:{name:"Number"}}}}},aP={type:{name:"Composite",className:"Components1Viuqa3SchemasOracletxPropertiesTxAllof1",modelProperties:{oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},type:{serializedName:"type",required:!0,type:{name:"String"}},version:{serializedName:"version",required:!0,type:{name:"Number"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},iP={type:{name:"Composite",className:"PathsZ4L2QlV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleExtend"}}}}}}},sP={type:{name:"Composite",className:"OracleExtend",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"OracleExtendTx"}}}}},oP={type:{name:"Composite",className:"OracleExtendTx",modelProperties:{fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},oracleTtl:{serializedName:"oracle_ttl",type:{name:"Composite",className:"RelativeTTL"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}}}}},cP={type:{name:"Composite",className:"Paths1Uni7AtV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleQuery"}}}}}}},uP={type:{name:"Composite",className:"OracleQuery",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},response:{serializedName:"response",type:{name:"Composite",className:"OracleResponse"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},responseTtl:{serializedName:"response_ttl",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},lP={type:{name:"Composite",className:"OracleResponse",modelProperties:{blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}},blockTime:{serializedName:"block_time",required:!0,type:{name:"UnixTime"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},queryId:{constraints:{Pattern:new RegExp("^oq_\\w{38,50}$")},serializedName:"query_id",required:!0,type:{name:"String"}},query:{serializedName:"query",type:{name:"Composite",className:"OracleQuery"}},sourceTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"source_tx_hash",required:!0,type:{name:"String"}},sourceTxType:{serializedName:"source_tx_type",required:!0,type:{name:"String"}},fee:{serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{serializedName:"nonce",required:!0,type:{name:"Number"}},oracleId:{constraints:{Pattern:new RegExp("^ok_\\w{38,50}$")},serializedName:"oracle_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"}}}},ttl:{serializedName:"ttl",required:!0,type:{name:"Number"}}}}},mP={type:{name:"Composite",className:"Paths1Tcj5A9V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"OracleResponse"}}}}}}},pP={type:{name:"Composite",className:"Stats",modelProperties:{minersCount:{serializedName:"miners_count",type:{name:"Number"}},feesTrend:{serializedName:"fees_trend",type:{name:"Number"}},last24HsAverageTransactionFees:{serializedName:"last_24hs_average_transaction_fees",type:{name:"Number"}},last24HsTransactions:{serializedName:"last_24hs_transactions",type:{name:"Number"}},maxTransactionsPerSecond:{serializedName:"max_transactions_per_second",type:{name:"Number"}},maxTransactionsPerSecondBlockHash:{constraints:{Pattern:new RegExp("^kh_\\w{38,50}$")},serializedName:"max_transactions_per_second_block_hash",type:{name:"String"}},transactionsTrend:{serializedName:"transactions_trend",type:{name:"Number"}}}}},dP={type:{name:"Composite",className:"PathsFso5IiV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},hP={type:{name:"Composite",className:"Stat",modelProperties:{count:{serializedName:"count",required:!0,type:{name:"Number"}},startDate:{serializedName:"start_date",required:!0,type:{name:"String"}},endDate:{serializedName:"end_date",required:!0,type:{name:"String"}}}}},fP={type:{name:"Composite",className:"Paths1Fl1Lh2V3StatsAex9TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},yP={type:{name:"Composite",className:"Paths1A27TirV3StatsBlocksGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},gP={type:{name:"Composite",className:"Paths72Dp44V3StatsContractsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},NP={type:{name:"Composite",className:"Paths1J83O75V3StatsDeltaGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"DeltaStat"}}}}}}},wP={type:{name:"Composite",className:"DeltaStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},auctionsStarted:{serializedName:"auctions_started",required:!0,type:{name:"Number"}},blockReward:{serializedName:"block_reward",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},channelsClosed:{serializedName:"channels_closed",required:!0,type:{name:"Number"}},channelsOpened:{serializedName:"channels_opened",required:!0,type:{name:"Number"}},contractsCreated:{serializedName:"contracts_created",required:!0,type:{name:"Number"}},devReward:{serializedName:"dev_reward",required:!0,type:{name:"BigInt"}},namesActivated:{serializedName:"names_activated",required:!0,type:{name:"Number"}},namesExpired:{serializedName:"names_expired",required:!0,type:{name:"Number"}},namesRevoked:{serializedName:"names_revoked",required:!0,type:{name:"Number"}},oraclesExpired:{serializedName:"oracles_expired",required:!0,type:{name:"Number"}},oraclesRegistered:{serializedName:"oracles_registered",required:!0,type:{name:"Number"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}}}}},vP={type:{name:"Composite",className:"Paths1Qw6KhfV3StatsDifficultyGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},bP={type:{name:"Composite",className:"Paths1IskjkV3StatsHashrateGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},xP={type:{name:"Composite",className:"Paths50Qhc7V3StatsMinersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Miner"}}}}}}},_P={type:{name:"Composite",className:"Miner",modelProperties:{miner:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"miner",required:!0,type:{name:"String"}},totalReward:{serializedName:"total_reward",required:!0,type:{name:"BigInt"}}}}},PP={type:{name:"Composite",className:"PathsD92Xl6V3StatsNamesGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},CP={type:{name:"Composite",className:"Paths1K55ZdgV3StatsTotalGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"TotalStat"}}}}}}},AP={type:{name:"Composite",className:"TotalStat",modelProperties:{height:{serializedName:"height",required:!0,type:{name:"Number"}},contracts:{serializedName:"contracts",required:!0,type:{name:"Number"}},lockedInAuctions:{serializedName:"locked_in_auctions",required:!0,type:{name:"BigInt"}},burnedInAuctions:{serializedName:"burned_in_auctions",required:!0,type:{name:"BigInt"}},lockedInChannels:{serializedName:"locked_in_channels",required:!0,type:{name:"BigInt"}},activeAuctions:{serializedName:"active_auctions",required:!0,type:{name:"Number"}},activeNames:{serializedName:"active_names",required:!0,type:{name:"Number"}},inactiveNames:{serializedName:"inactive_names",required:!0,type:{name:"Number"}},activeOracles:{serializedName:"active_oracles",required:!0,type:{name:"Number"}},inactiveOracles:{serializedName:"inactive_oracles",required:!0,type:{name:"Number"}},openChannels:{serializedName:"open_channels",required:!0,type:{name:"Number"}},sumBlockReward:{serializedName:"sum_block_reward",required:!0,type:{name:"BigInt"}},sumDevReward:{serializedName:"sum_dev_reward",required:!0,type:{name:"BigInt"}},totalTokenSupply:{serializedName:"total_token_supply",required:!0,type:{name:"BigInt"}},lastTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"last_tx_hash",required:!0,type:{name:"String"}}}}},SP={type:{name:"Composite",className:"Paths3Bfys0V3StatsTotalAccountsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},TP={type:{name:"Composite",className:"Paths6PaqluV3StatsTransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Stat"}}}}}}},zP={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"}}}}},EP={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"}}}}},IP={type:{name:"Composite",className:"PathsHa9C78V3TransactionsGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transaction"}}}}}}},MP={type:{name:"Composite",className:"PathsI72FylV3TransactionsPendingGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"PendingTransaction"}}}}}}},qP={type:{name:"Composite",className:"PendingTransaction",modelProperties:{blockHash:{serializedName:"block_hash",required:!0,type:{name:"String"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},encodedTx:{constraints:{Pattern:new RegExp("^tx_\\w+$")},serializedName:"encoded_tx",required:!0,type:{name:"String"}},failures:{serializedName:"failures",required:!0,type:{name:"Number"}},hash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"hash",required:!0,type:{name:"String"}},signatures:{serializedName:"signatures",required:!0,type:{name:"Sequence",element:{constraints:{Pattern:new RegExp("^sg_\\w+$")},type:{name:"String"}}}},tx:{serializedName:"tx",type:{name:"Composite",className:"Tx"}}}}},RP={type:{name:"Composite",className:"PathsVdg67V3TransfersGetResponses200ContentApplicationJsonSchemaAllof0",modelProperties:{data:{serializedName:"data",required:!0,type:{name:"Sequence",element:{type:{name:"Composite",className:"Transfer"}}}}}}},OP={type:{name:"Composite",className:"Transfer",modelProperties:{accountId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"account_id",required:!0,type:{name:"String"}},amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},height:{serializedName:"height",required:!0,type:{name:"Number"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["reward_dev","reward_block"]}},refBlockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"ref_block_hash",required:!0,nullable:!0,type:{name:"String"}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,nullable:!0,type:{name:"String"}},refTxType:{serializedName:"ref_tx_type",required:!0,nullable:!0,type:{name:"String"}}}}},kP={type:{name:"Composite",className:"Aex9TransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},logIdx:{serializedName:"log_idx",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},microTime:{serializedName:"micro_time",required:!0,type:{name:"UnixTime"}},recipientId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient_id",required:!0,type:{name:"String"}},senderId:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender_id",required:!0,type:{name:"String"}},txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}}}}},BP={type:{name:"Composite",className:"Aex9TransferResponse",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},blockHeight:{serializedName:"block_height",required:!0,type:{name:"Number"}},callTxi:{serializedName:"call_txi",required:!0,type:{name:"Number"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},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:"UnixTime"}},recipient:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"recipient",required:!0,type:{name:"String"}},sender:{constraints:{Pattern:new RegExp("^ak_\\w{38,50}$")},serializedName:"sender",required:!0,type:{name:"String"}}}}},GP={type:{name:"Composite",className:"InternalContractCallEvent",modelProperties:{contractTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"contract_tx_hash",required:!0,type:{name:"String"}},contractId:{constraints:{Pattern:new RegExp("^ct_\\w{38,50}$")},serializedName:"contract_id",required:!0,type:{name:"String"}},callTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"call_tx_hash",type:{name:"String"}},function:{serializedName:"function",required:!0,type:{name:"String"}},internalTx:{serializedName:"internal_tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}},height:{serializedName:"height",required:!0,type:{name:"Number"}},microIndex:{serializedName:"micro_index",required:!0,type:{name:"Number"}},blockHash:{constraints:{Pattern:new RegExp("^mh_\\w{38,50}$")},serializedName:"block_hash",required:!0,type:{name:"String"}}}}},$P={type:{name:"Composite",className:"InternalTransferEvent",modelProperties:{amount:{serializedName:"amount",required:!0,type:{name:"BigInt"}},kind:{serializedName:"kind",required:!0,type:{name:"Enum",allowedValues:["accounts_extra_lima","accounts_fortuna","accounts_genesis","accounts_lima","accounts_minerva","contracts_lima","reward_dev","reward_block","fee_refund_oracle","fee_lock_name","fee_refund_name","fee_spend_name","reward_oracle"]}},refTxHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"ref_tx_hash",required:!0,type:{name:"String"}}}}},UP={type:{name:"Composite",className:"NameClaimEvent",modelProperties:{txHash:{constraints:{Pattern:new RegExp("^th_\\w{38,50}$")},serializedName:"tx_hash",required:!0,type:{name:"String"}},tx:{serializedName:"tx",required:!0,type:{name:"Dictionary",value:{type:{name:"any"}}}}}}},VP={type:{name:"Composite",className:"SpendTx",modelProperties:{recipientId:{serializedName:"recipient_id",required:!0,type:{name:"String"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}}}}},DP={type:{name:"Composite",className:"ChannelCreateTx",modelProperties:{initiatorId:{serializedName:"initiator_id",required:!0,type:{name:"String"}},initiatorAmount:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount",required:!0,type:{name:"BigInt"}},responderId:{serializedName:"responder_id",required:!0,type:{name:"String"}},responderAmount:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount",required:!0,type:{name:"BigInt"}},channelReserve:{constraints:{InclusiveMinimum:0},serializedName:"channel_reserve",required:!0,type:{name:"BigInt"}},lockPeriod:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"lock_period",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},delegateIds:{serializedName:"delegate_ids",type:{name:"Composite",className:"Delegates"}}}}},LP={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},jP={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:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},round:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}}}}},HP={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},update:{serializedName:"update",type:{name:"Composite",className:"OffChainUpdate"}},stateHash:{serializedName:"state_hash",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},offchainTrees:{serializedName:"offchain_trees",type:{name:"String"}}}}},FP={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},JP={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},WP={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},poi:{serializedName:"poi",required:!0,type:{name:"String"}}}}},KP={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:{constraints:{InclusiveMinimum:0},serializedName:"initiator_amount_final",required:!0,type:{name:"Number"}},responderAmountFinal:{constraints:{InclusiveMinimum:0},serializedName:"responder_amount_final",required:!0,type:{name:"Number"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",required:!0,type:{name:"Number"}}}}},YP={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},QP={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:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"round",required:!0,type:{name:"Number"}},payload:{serializedName:"payload",required:!0,type:{name:"String"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},ZP={type:{name:"Composite",className:"OracleQueryTx",modelProperties:{oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},query:{serializedName:"query",required:!0,type:{name:"String"}},queryFee:{constraints:{InclusiveMinimum:0},serializedName:"query_fee",required:!0,type:{name:"BigInt"}},queryTtl:{serializedName:"query_ttl",type:{name:"Composite",className:"Ttl"}},responseTtl:{serializedName:"response_ttl",type:{name:"Composite",className:"RelativeTTL"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},senderId:{serializedName:"sender_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},XP={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:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},oracleId:{serializedName:"oracle_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},eC={type:{name:"Composite",className:"NamePreclaimTx",modelProperties:{commitmentId:{serializedName:"commitment_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},accountId:{serializedName:"account_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}}}}},tC={type:{name:"Composite",className:"ContractCallTx",modelProperties:{callerId:{serializedName:"caller_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},contractId:{serializedName:"contract_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},amount:{constraints:{InclusiveMinimum:0},serializedName:"amount",required:!0,type:{name:"BigInt"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},callData:{serializedName:"call_data",required:!0,type:{name:"String"}}}}},nC={type:{name:"Composite",className:"GAAttachTx",modelProperties:{ownerId:{serializedName:"owner_id",required:!0,type:{name:"String"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},code:{serializedName:"code",required:!0,type:{name:"String"}},vmVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"vm_version",required:!0,type:{name:"Number"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},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"}}}}},rC={type:{name:"Composite",className:"GAMetaTx",modelProperties:{gaId:{serializedName:"ga_id",required:!0,type:{name:"String"}},abiVersion:{constraints:{InclusiveMaximum:65535,InclusiveMinimum:0},serializedName:"abi_version",required:!0,type:{name:"Number"}},gas:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"gas",required:!0,type:{name:"Number"}},gasPrice:{constraints:{InclusiveMinimum:0},serializedName:"gas_price",required:!0,type:{name:"BigInt"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},ttl:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"ttl",type:{name:"Number"}},authData:{serializedName:"auth_data",required:!0,type:{name:"String"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},aC={type:{name:"Composite",className:"PayingForTx",modelProperties:{payerId:{serializedName:"payer_id",required:!0,type:{name:"String"}},fee:{constraints:{InclusiveMinimum:0},serializedName:"fee",required:!0,type:{name:"BigInt"}},nonce:{constraints:{InclusiveMaximum:0x10000000000000000,InclusiveMinimum:0},serializedName:"nonce",type:{name:"Number"}},tx:{serializedName:"tx",type:{name:"Composite",className:"SignedTx"}}}}},iC={type:{name:"Composite",className:"Paths1EfdbjrV3AccountsAccountidActivitiesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Jb.type.modelProperties,...rx.type.modelProperties}}},sC={type:{name:"Composite",className:"Paths3Hsv3GV3AccountsAccountidAex141TokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...ix.type.modelProperties,...rx.type.modelProperties}}},oC={type:{name:"Composite",className:"PathsKm52GqV3AccountsAccountidAex9BalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...rx.type.modelProperties,...ox.type.modelProperties}}},cC={type:{name:"Composite",className:"PathsZpy8S9V3AccountsAccountidDexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...ux.type.modelProperties,...rx.type.modelProperties}}},uC={type:{name:"Composite",className:"Paths16Cyh9EV3AccountsAccountidNamesClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...px.type.modelProperties,...rx.type.modelProperties}}},lC={type:{name:"Composite",className:"Paths1Mheci5V3AccountsAccountidNamesPointeesGetResponses200ContentApplicationJsonSchema",modelProperties:{...yx.type.modelProperties,...rx.type.modelProperties}}},mC={type:{name:"Composite",className:"Paths1XwlyjtV3Aex141GetResponses200ContentApplicationJsonSchema",modelProperties:{...Fx.type.modelProperties,...rx.type.modelProperties}}},pC={type:{name:"Composite",className:"Paths181AjwxV3Aex141ContractidTemplatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Wx.type.modelProperties,...rx.type.modelProperties}}},dC={type:{name:"Composite",className:"Paths15Mi2TaV3Aex141ContractidTemplatesTemplateidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Yx.type.modelProperties,...rx.type.modelProperties}}},hC={type:{name:"Composite",className:"PathsWl652MV3Aex141ContractidTokensGetResponses200ContentApplicationJsonSchema",modelProperties:{...Zx.type.modelProperties,...rx.type.modelProperties}}},fC={type:{name:"Composite",className:"Paths1O7Q6IhV3Aex141ContractidTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...e_.type.modelProperties,...rx.type.modelProperties}}},yC={type:{name:"Composite",className:"Paths1Vr3Y2EV3Aex9GetResponses200ContentApplicationJsonSchema",modelProperties:{...n_.type.modelProperties,...rx.type.modelProperties}}},gC={type:{name:"Composite",className:"Paths1N61UurV3Aex9ContractidBalancesGetResponses200ContentApplicationJsonSchema",modelProperties:{...i_.type.modelProperties,...rx.type.modelProperties}}},NC={type:{name:"Composite",className:"Paths1Uybd4PV3Aex9ContractidBalancesAccountidHistoryGetResponses200ContentApplicationJsonSchema",modelProperties:{...rx.type.modelProperties,...c_.type.modelProperties}}},wC={type:{name:"Composite",className:"Paths3EzhapV3ChannelsGetResponses200ContentApplicationJsonSchema",modelProperties:{...l_.type.modelProperties,...rx.type.modelProperties}}},vC={type:{name:"Composite",className:"Paths1Txblx8V3ContractsCallsGetResponses200ContentApplicationJsonSchema",modelProperties:{...p_.type.modelProperties,...rx.type.modelProperties}}},bC={type:{name:"Composite",className:"Paths7A1M6RV3ContractsLogsGetResponses200ContentApplicationJsonSchema",modelProperties:{...h_.type.modelProperties,...rx.type.modelProperties}}},xC={type:{name:"Composite",className:"Paths1Di8FnjV3DexSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...N_.type.modelProperties,...rx.type.modelProperties}}},_C={type:{name:"Composite",className:"PathsKwxlzlV3DexContractIdSwapsGetResponses200ContentApplicationJsonSchema",modelProperties:{...w_.type.modelProperties,...rx.type.modelProperties}}},PC={type:{name:"Composite",className:"Paths194Lg3IV3HyperchainEpochsGetResponses200ContentApplicationJsonSchema",modelProperties:{...v_.type.modelProperties,...rx.type.modelProperties}}},CC={type:{name:"Composite",className:"Paths1S5Zlt1V3HyperchainScheduleGetResponses200ContentApplicationJsonSchema",modelProperties:{...__.type.modelProperties,...rx.type.modelProperties}}},AC={type:{name:"Composite",className:"Paths1Ibn686V3HyperchainValidatorsGetResponses200ContentApplicationJsonSchema",modelProperties:{...C_.type.modelProperties,...rx.type.modelProperties}}},SC={type:{name:"Composite",className:"Paths1I4U8D5V3HyperchainValidatorsValidatorDelegatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...S_.type.modelProperties,...rx.type.modelProperties}}},TC={type:{name:"Composite",className:"Paths15K0AlgV3HyperchainValidatorsValidatorDelegatesTopGetResponses200ContentApplicationJsonSchema",modelProperties:{...z_.type.modelProperties,...rx.type.modelProperties}}},zC={type:{name:"Composite",className:"Paths277OngV3KeyBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...E_.type.modelProperties,...rx.type.modelProperties}}},EC={type:{name:"Composite",className:"Paths1159W94V3KeyBlocksHashOrKbiMicroBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...M_.type.modelProperties,...rx.type.modelProperties}}},IC={type:{name:"Composite",className:"Paths15Bkk50V3MicroBlocksHashTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...R_.type.modelProperties,...rx.type.modelProperties}}},MC={type:{name:"Composite",className:"Paths12S1Nd4V3NamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...k_.type.modelProperties,...rx.type.modelProperties}}},qC={type:{name:"Composite",className:"PathsKjq4D4V3NamesAuctionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...H_.type.modelProperties,...rx.type.modelProperties}}},RC={type:{name:"Composite",className:"Paths1F98AqgV3NamesIdClaimsGetResponses200ContentApplicationJsonSchema",modelProperties:{...J_.type.modelProperties,...rx.type.modelProperties}}},OC={type:{name:"Composite",className:"Paths1Raw8PV3NamesIdTransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...W_.type.modelProperties,...rx.type.modelProperties}}},kC={type:{name:"Composite",className:"Paths1Ec8CltV3NamesIdUpdatesGetResponses200ContentApplicationJsonSchema",modelProperties:{...Q_.type.modelProperties,...rx.type.modelProperties}}},BC={type:{name:"Composite",className:"Paths1E14NekV3OraclesGetResponses200ContentApplicationJsonSchema",modelProperties:{...X_.type.modelProperties,...rx.type.modelProperties}}},GC={type:{name:"Composite",className:"Paths1L5C64RV3OraclesIdExtendsGetResponses200ContentApplicationJsonSchema",modelProperties:{...iP.type.modelProperties,...rx.type.modelProperties}}},$C={type:{name:"Composite",className:"Paths8722JhV3OraclesIdQueriesGetResponses200ContentApplicationJsonSchema",modelProperties:{...cP.type.modelProperties,...rx.type.modelProperties}}},UC={type:{name:"Composite",className:"PathsVron83V3OraclesIdResponsesGetResponses200ContentApplicationJsonSchema",modelProperties:{...mP.type.modelProperties,...rx.type.modelProperties}}},VC={type:{name:"Composite",className:"PathsCgzmimV3StatsActiveAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...dP.type.modelProperties,...rx.type.modelProperties}}},DC={type:{name:"Composite",className:"Paths1UxyhelV3StatsAex9TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...fP.type.modelProperties,...rx.type.modelProperties}}},LC={type:{name:"Composite",className:"Paths1Sxjoy0V3StatsBlocksGetResponses200ContentApplicationJsonSchema",modelProperties:{...yP.type.modelProperties,...rx.type.modelProperties}}},jC={type:{name:"Composite",className:"PathsWbrhqnV3StatsContractsGetResponses200ContentApplicationJsonSchema",modelProperties:{...gP.type.modelProperties,...rx.type.modelProperties}}},HC={type:{name:"Composite",className:"Paths5Xf9ScV3StatsDeltaGetResponses200ContentApplicationJsonSchema",modelProperties:{...NP.type.modelProperties,...rx.type.modelProperties}}},FC={type:{name:"Composite",className:"Paths1D7Up0DV3StatsDifficultyGetResponses200ContentApplicationJsonSchema",modelProperties:{...vP.type.modelProperties,...rx.type.modelProperties}}},JC={type:{name:"Composite",className:"PathsR51VshV3StatsHashrateGetResponses200ContentApplicationJsonSchema",modelProperties:{...bP.type.modelProperties,...rx.type.modelProperties}}},WC={type:{name:"Composite",className:"PathsA8Q6T7V3StatsMinersGetResponses200ContentApplicationJsonSchema",modelProperties:{...xP.type.modelProperties,...rx.type.modelProperties}}},KC={type:{name:"Composite",className:"PathsCeyhpaV3StatsNamesGetResponses200ContentApplicationJsonSchema",modelProperties:{...PP.type.modelProperties,...rx.type.modelProperties}}},YC={type:{name:"Composite",className:"PathsJoz7P5V3StatsTotalGetResponses200ContentApplicationJsonSchema",modelProperties:{...CP.type.modelProperties,...rx.type.modelProperties}}},QC={type:{name:"Composite",className:"Paths15F3FfuV3StatsTotalAccountsGetResponses200ContentApplicationJsonSchema",modelProperties:{...SP.type.modelProperties,...rx.type.modelProperties}}},ZC={type:{name:"Composite",className:"Paths1IfhshmV3StatsTransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...TP.type.modelProperties,...rx.type.modelProperties}}},XC={type:{name:"Composite",className:"Paths1Pymq07V3TransactionsGetResponses200ContentApplicationJsonSchema",modelProperties:{...IP.type.modelProperties,...rx.type.modelProperties}}},eA={type:{name:"Composite",className:"PathsUq0T7JV3TransactionsPendingGetResponses200ContentApplicationJsonSchema",modelProperties:{...MP.type.modelProperties,...rx.type.modelProperties}}},tA={type:{name:"Composite",className:"PathsA7P0KiV3TransfersGetResponses200ContentApplicationJsonSchema",modelProperties:{...RP.type.modelProperties,...rx.type.modelProperties}}},nA={type:{name:"Composite",className:"AuctionLastBidTx",modelProperties:{...hx.type.modelProperties,...U_.type.modelProperties}}},rA={type:{name:"Composite",className:"KeyBlockExtended",modelProperties:{...I_.type.modelProperties,beneficiaryReward:{serializedName:"beneficiary_reward",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}},microBlocksCount:{serializedName:"micro_blocks_count",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}}}}},aA={type:{name:"Composite",className:"MicroBlockExtended",modelProperties:{...q_.type.modelProperties,microBlockIndex:{serializedName:"micro_block_index",required:!0,type:{name:"Number"}},transactionsCount:{serializedName:"transactions_count",required:!0,type:{name:"Number"}},gas:{serializedName:"gas",required:!0,type:{name:"Number"}},flags:{constraints:{Pattern:new RegExp("^ba_\\w+$")},serializedName:"flags",required:!0,type:{name:"String"}}}}},iA={type:{name:"Composite",className:"NameTxTx",modelProperties:{...L_.type.modelProperties,...j_.type.modelProperties}}},sA={type:{name:"Composite",className:"OracleTxTx",modelProperties:{...rP.type.modelProperties,...aP.type.modelProperties}}};let oA={"OffChainUpdate.OffChainUpdate":Zb};class cA extends Lo{constructor(e,t){var n,r;if(void 0===e)throw new Error("'$host' cannot be null");t||(t={});const a="azsdk-js-middleware/1.0.0-beta.1",i=t.userAgentOptions&&t.userAgentOptions.userAgentPrefix?`${t.userAgentOptions.userAgentPrefix} ${a}`:`${a}`;super({requestContentType:"application/json; charset=utf-8",...t,userAgentOptions:{userAgentPrefix:i},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({accountId:e,options:t},lA)}getAex141OwnedTokens(e,t){return this.sendOperationRequest({accountId:e,options:t},mA)}getAex9AccountBalances(e,t){return this.sendOperationRequest({accountId:e,options:t},pA)}getAccountDexSwaps(e,t){return this.sendOperationRequest({accountId:e,options:t},dA)}getAccountNameClaims(e,t){return this.sendOperationRequest({accountId:e,options:t},hA)}getAccountPointees(e,t){return this.sendOperationRequest({accountId:e,options:t},fA)}getAccountTransactionsCount(e,t){return this.sendOperationRequest({accountId:e,options:t},yA)}getSortedAex141Contracts(e){return this.sendOperationRequest({options:e},gA)}getAex141ContractTemplates(e,t){return this.sendOperationRequest({contractId:e,options:t},NA)}getAex141TemplateTokens(e,t,n){return this.sendOperationRequest({contractId:e,templateId:t,options:n},wA)}getAex141ContractTokens(e,t){return this.sendOperationRequest({contractId:e,options:t},vA)}getAex141TokenOwner(e,t,n){return this.sendOperationRequest({contractId:e,tokenId:t,options:n},bA)}getAex141ContractTransfers(e,t){return this.sendOperationRequest({contractId:e,options:t},xA)}getAex141ByContract(e,t){return this.sendOperationRequest({id:e,options:t},_A)}getSortedAex9Tokens(e){return this.sendOperationRequest({options:e},PA)}getAex9TokensCount(e){return this.sendOperationRequest({options:e},CA)}getAex9ContractBalances(e,t){return this.sendOperationRequest({contractId:e,options:t},AA)}getAex9ContractAccountBalance(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},SA)}getAex9ContractAccountBalanceHistory(e,t,n){return this.sendOperationRequest({contractId:e,accountId:t,options:n},TA)}getAex9ByContract(e,t){return this.sendOperationRequest({id:e,options:t},zA)}getChannels(e){return this.sendOperationRequest({options:e},EA)}getChannel(e,t){return this.sendOperationRequest({id:e,options:t},IA)}getContractCalls(e){return this.sendOperationRequest({options:e},MA)}getContractLogs(e){return this.sendOperationRequest({options:e},qA)}getContract(e,t){return this.sendOperationRequest({id:e,options:t},RA)}getDexSwaps(e){return this.sendOperationRequest({options:e},OA)}getDexSwapsByContractId(e,t){return this.sendOperationRequest({contractId:e,options:t},kA)}getEpochs(e){return this.sendOperationRequest({options:e},BA)}getEpochTop(e){return this.sendOperationRequest({options:e},GA)}getSchedules(e){return this.sendOperationRequest({options:e},$A)}getSchedule(e,t){return this.sendOperationRequest({height:e,options:t},UA)}getValidators(e){return this.sendOperationRequest({options:e},VA)}getValidator(e,t){return this.sendOperationRequest({validator:e,options:t},DA)}getValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},LA)}getTopValidatorDelegates(e,t){return this.sendOperationRequest({validator:e,options:t},jA)}getKeyBlocks(e){return this.sendOperationRequest({options:e},HA)}getKeyBlock(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},FA)}getKeyBlockMicroBlocks(e,t){return this.sendOperationRequest({hashOrKbi:e,options:t},JA)}getMicroBlock(e,t){return this.sendOperationRequest({hash:e,options:t},WA)}getMicroBlockTransactions(e,t){return this.sendOperationRequest({hash:e,options:t},KA)}getNames(e){return this.sendOperationRequest({options:e},YA)}getNamesAuctions(e){return this.sendOperationRequest({options:e},QA)}getNameAuction(e,t){return this.sendOperationRequest({id:e,options:t},ZA)}getNameAuctionClaims(e,t){return this.sendOperationRequest({id:e,options:t},XA)}getNamesCount(e){return this.sendOperationRequest({options:e},eS)}getName(e,t){return this.sendOperationRequest({id:e,options:t},tS)}getNameClaims(e,t){return this.sendOperationRequest({id:e,options:t},nS)}getNameTransfers(e,t){return this.sendOperationRequest({id:e,options:t},rS)}getNameUpdates(e,t){return this.sendOperationRequest({id:e,options:t},aS)}getOracles(e){return this.sendOperationRequest({options:e},iS)}getOracle(e,t){return this.sendOperationRequest({id:e,options:t},sS)}getOracleExtends(e,t){return this.sendOperationRequest({id:e,options:t},oS)}getOracleQueries(e,t){return this.sendOperationRequest({id:e,options:t},cS)}getOracleResponses(e,t){return this.sendOperationRequest({id:e,options:t},uS)}getStats(e){return this.sendOperationRequest({options:e},lS)}getActiveAccountsStats(e){return this.sendOperationRequest({options:e},mS)}getAex9TransfersStats(e){return this.sendOperationRequest({options:e},pS)}getBlocksStats(e){return this.sendOperationRequest({options:e},dS)}getContractsStats(e){return this.sendOperationRequest({options:e},hS)}getDeltaStats(e){return this.sendOperationRequest({options:e},fS)}getDifficultyStats(e){return this.sendOperationRequest({options:e},yS)}getHashrateStats(e){return this.sendOperationRequest({options:e},gS)}getMinerStats(e){return this.sendOperationRequest({options:e},NS)}getNamesStats(e){return this.sendOperationRequest({options:e},wS)}getTotalStats(e){return this.sendOperationRequest({options:e},vS)}getTotalAccountsStats(e){return this.sendOperationRequest({options:e},bS)}getTransactionsStats(e){return this.sendOperationRequest({options:e},xS)}getStatus(e){return this.sendOperationRequest({options:e},_S)}getTransactions(e){return this.sendOperationRequest({options:e},PS)}getTransactionsCount(e){return this.sendOperationRequest({options:e},CS)}getPendingTransactions(e){return this.sendOperationRequest({options:e},AS)}getPendingTransactionsCount(e){return this.sendOperationRequest({options:e},SS)}getTransaction(e,t){return this.sendOperationRequest({hash:e,options:t},TS)}getTransfers(e){return this.sendOperationRequest({options:e},zS)}}const uA=Jo(m,!1),lA={path:"/v3/accounts/{accountId}/activities",httpMethod:"GET",responses:{200:{bodyMapper:iC},400:{bodyMapper:ax,isError:!0}},queryParameters:[{parameterPath:["options","ownedOnly"],mapper:{serializedName:"owned_only",type:{name:"Boolean"}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["transactions","aexn","aex9","aex141","contract","transfers","claims","swaps"]}}},db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},mA={path:"/v3/accounts/{accountId}/aex141/tokens",httpMethod:"GET",responses:{200:{bodyMapper:sC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},fb],urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},pA={path:"/v3/accounts/{accountId}/aex9/balances",httpMethod:"GET",responses:{200:{bodyMapper:oC},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},dA={path:"/v3/accounts/{accountId}/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:cC},400:{bodyMapper:ax,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},hA={path:"/v3/accounts/{accountId}/names/claims",httpMethod:"GET",responses:{200:{bodyMapper:uC},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},fA={path:"/v3/accounts/{accountId}/names/pointees",httpMethod:"GET",responses:{200:{bodyMapper:lC},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},yA={path:"/v3/accounts/{accountId}/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:wx},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,pb],headerParameters:[lb],serializer:uA},gA={path:"/v3/aex141",httpMethod:"GET",responses:{200:{bodyMapper:mC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}},yb,gb],urlParameters:[mb],headerParameters:[lb],serializer:uA},NA={path:"/v3/aex141/{contractId}/templates",httpMethod:"GET",responses:{200:{bodyMapper:pC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Nb],headerParameters:[lb],serializer:uA},wA={path:"/v3/aex141/{contractId}/templates/{templateId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:dC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Nb,{parameterPath:"templateId",mapper:{serializedName:"templateId",required:!0,type:{name:"Number"}}}],headerParameters:[lb],serializer:uA},vA={path:"/v3/aex141/{contractId}/tokens",httpMethod:"GET",responses:{200:{bodyMapper:hC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Nb],headerParameters:[lb],serializer:uA},bA={path:"/v3/aex141/{contractId}/tokens/{tokenId}",httpMethod:"GET",responses:{200:{bodyMapper:Xx},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,Nb,{parameterPath:"tokenId",mapper:{serializedName:"tokenId",required:!0,type:{name:"Number"}}}],headerParameters:[lb],serializer:uA},xA={path:"/v3/aex141/{contractId}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:fC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},wb,vb],urlParameters:[mb,Nb],headerParameters:[lb],serializer:uA},_A={path:"/v3/aex141/{id}",httpMethod:"GET",responses:{200:{bodyMapper:Jx},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,bb],headerParameters:[lb],serializer:uA},PA={path:"/v3/aex9",httpMethod:"GET",responses:{200:{bodyMapper:yC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,yb,gb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","by"],mapper:{serializedName:"by",type:{name:"Enum",allowedValues:["creation","name","symbol"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},CA={path:"/v3/aex9/count",httpMethod:"GET",responses:{200:{bodyMapper:a_}},urlParameters:[mb],headerParameters:[lb],serializer:uA},AA={path:"/v3/aex9/{contractId}/balances",httpMethod:"GET",responses:{200:{bodyMapper:gC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},xb,_b],urlParameters:[mb,Nb],headerParameters:[lb],serializer:uA},SA={path:"/v3/aex9/{contractId}/balances/{accountId}",httpMethod:"GET",responses:{200:{bodyMapper:o_},400:{bodyMapper:ax,isError:!0}},queryParameters:[Pb],urlParameters:[mb,pb,Nb],headerParameters:[lb],serializer:uA},TA={path:"/v3/aex9/{contractId}/balances/{accountId}/history",httpMethod:"GET",responses:{200:{bodyMapper:NC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,pb,Nb],headerParameters:[lb],serializer:uA},zA={path:"/v3/aex9/{id}",httpMethod:"GET",responses:{200:{bodyMapper:r_},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,bb],headerParameters:[lb],serializer:uA},EA={path:"/v3/channels",httpMethod:"GET",responses:{200:{bodyMapper:wC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},{parameterPath:["options","state"],mapper:{serializedName:"state",type:{name:"Enum",allowedValues:["active","inactive"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},IA={path:"/v3/channels/{id}",httpMethod:"GET",responses:{200:{bodyMapper:m_},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Cb],headerParameters:[lb],serializer:uA},MA={path:"/v3/contracts/calls",httpMethod:"GET",responses:{200:{bodyMapper:vC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},qA={path:"/v3/contracts/logs",httpMethod:"GET",responses:{200:{bodyMapper:bC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,Ab,{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"}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},RA={path:"/v3/contracts/{id}",httpMethod:"GET",responses:{200:{bodyMapper:y_},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,bb],headerParameters:[lb],serializer:uA},OA={path:"/v3/dex/swaps",httpMethod:"GET",responses:{200:{bodyMapper:xC},400:{bodyMapper:ax,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},kA={path:"/v3/dex/{contract_id}/swaps",httpMethod:"GET",responses:{200:{bodyMapper:_C},400:{bodyMapper:ax,isError:!0}},queryParameters:[{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Sb],headerParameters:[lb],serializer:uA},BA={path:"/v3/hyperchain/epochs",httpMethod:"GET",responses:{200:{bodyMapper:PC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}},Tb],urlParameters:[mb],headerParameters:[lb],serializer:uA},GA={path:"/v3/hyperchain/epochs/top",httpMethod:"GET",responses:{200:{bodyMapper:b_},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb],headerParameters:[lb],serializer:uA},$A={path:"/v3/hyperchain/schedule",httpMethod:"GET",responses:{200:{bodyMapper:CC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,Tb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},UA={path:"/v3/hyperchain/schedule/height/{height}",httpMethod:"GET",responses:{200:{bodyMapper:P_},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,{parameterPath:"height",mapper:{serializedName:"height",required:!0,type:{name:"Number"}}}],headerParameters:[lb],serializer:uA},VA={path:"/v3/hyperchain/validators",httpMethod:"GET",responses:{200:{bodyMapper:AC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,Tb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},DA={path:"/v3/hyperchain/validators/{validator}",httpMethod:"GET",responses:{200:{bodyMapper:A_},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,zb],headerParameters:[lb],serializer:uA},LA={path:"/v3/hyperchain/validators/{validator}/delegates",httpMethod:"GET",responses:{200:{bodyMapper:SC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,Tb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,zb],headerParameters:[lb],serializer:uA},jA={path:"/v3/hyperchain/validators/{validator}/delegates/top",httpMethod:"GET",responses:{200:{bodyMapper:TC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,Tb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,zb],headerParameters:[lb],serializer:uA},HA={path:"/v3/key-blocks",httpMethod:"GET",responses:{200:{bodyMapper:zC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},FA={path:"/v3/key-blocks/{hash_or_kbi}",httpMethod:"GET",responses:{200:{bodyMapper:rA},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Eb],headerParameters:[lb],serializer:uA},JA={path:"/v3/key-blocks/{hash_or_kbi}/micro-blocks",httpMethod:"GET",responses:{200:{bodyMapper:EC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Eb],headerParameters:[lb],serializer:uA},WA={path:"/v3/micro-blocks/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:aA},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Ib],headerParameters:[lb],serializer:uA},KA={path:"/v3/micro-blocks/{hash}/transactions",httpMethod:"GET",responses:{200:{bodyMapper:IC},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb,Ib],headerParameters:[lb],serializer:uA},YA={path:"/v3/names",httpMethod:"GET",responses:{200:{bodyMapper:MC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,yb,xb,Mb,qb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},QA={path:"/v3/names/auctions",httpMethod:"GET",responses:{200:{bodyMapper:qC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},ZA={path:"/v3/names/auctions/{id}",httpMethod:"GET",responses:{200:{bodyMapper:G_},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},XA={path:"/v3/names/auctions/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:F_},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},eS={path:"/v3/names/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ax,isError:!0}},queryParameters:[Mb],urlParameters:[mb],headerParameters:[lb],serializer:uA},tS={path:"/v3/names/{id}",httpMethod:"GET",responses:{200:{bodyMapper:B_},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},nS={path:"/v3/names/{id}/claims",httpMethod:"GET",responses:{200:{bodyMapper:RC},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},rS={path:"/v3/names/{id}/transfers",httpMethod:"GET",responses:{200:{bodyMapper:OC},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},aS={path:"/v3/names/{id}/updates",httpMethod:"GET",responses:{200:{bodyMapper:kC},404:{bodyMapper:fx,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb,Rb],headerParameters:[lb],serializer:uA},iS={path:"/v3/oracles",httpMethod:"GET",responses:{200:{bodyMapper:BC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,qb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},sS={path:"/v3/oracles/{id}",httpMethod:"GET",responses:{200:{bodyMapper:eP},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Ob],headerParameters:[lb],serializer:uA},oS={path:"/v3/oracles/{id}/extends",httpMethod:"GET",responses:{200:{bodyMapper:GC},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Ob],headerParameters:[lb],serializer:uA},cS={path:"/v3/oracles/{id}/queries",httpMethod:"GET",responses:{200:{bodyMapper:$C},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Ob],headerParameters:[lb],serializer:uA},uS={path:"/v3/oracles/{id}/responses",httpMethod:"GET",responses:{200:{bodyMapper:UC},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Ob],headerParameters:[lb],serializer:uA},lS={path:"/v3/stats",httpMethod:"GET",responses:{200:{bodyMapper:pP},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb],headerParameters:[lb],serializer:uA},mS={path:"/v3/stats/active-accounts",httpMethod:"GET",responses:{200:{bodyMapper:VC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},pS={path:"/v3/stats/aex9-transfers",httpMethod:"GET",responses:{200:{bodyMapper:DC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},kb,Bb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},dS={path:"/v3/stats/blocks",httpMethod:"GET",responses:{200:{bodyMapper:LC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Enum",allowedValues:["key","micro"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},hS={path:"/v3/stats/contracts",httpMethod:"GET",responses:{200:{bodyMapper:jC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},fS={path:"/v3/stats/delta",httpMethod:"GET",responses:{200:{bodyMapper:HC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},yS={path:"/v3/stats/difficulty",httpMethod:"GET",responses:{200:{bodyMapper:FC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},gS={path:"/v3/stats/hashrate",httpMethod:"GET",responses:{200:{bodyMapper:JC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},NS={path:"/v3/stats/miners",httpMethod:"GET",responses:{200:{bodyMapper:WC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},wS={path:"/v3/stats/names",httpMethod:"GET",responses:{200:{bodyMapper:KC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},vS={path:"/v3/stats/total",httpMethod:"GET",responses:{200:{bodyMapper:YC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},bS={path:"/v3/stats/total-accounts",httpMethod:"GET",responses:{200:{bodyMapper:QC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},xS={path:"/v3/stats/transactions",httpMethod:"GET",responses:{200:{bodyMapper:ZC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,kb,Bb,{parameterPath:["options","intervalBy"],mapper:{serializedName:"interval_by",type:{name:"Enum",allowedValues:["day","week","month"]}}},Gb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},_S={path:"/v3/status",httpMethod:"GET",responses:{200:{bodyMapper:zP}},urlParameters:[mb],headerParameters:[lb],serializer:uA},PS={path:"/v3/transactions",httpMethod:"GET",responses:{200:{bodyMapper:XC},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,fb,{parameterPath:["options","type"],mapper:{serializedName:"type",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel_close_mutual","channel_close_solo","channel_create","channel_deposit","channel_force_progress","channel_offchain","channel_settle","channel_slash","channel_snapshot_solo","channel_withdraw","contract_call","contract_create","ga_attach","ga_meta","name_claim","name_preclaim","name_revoke","name_transfer","name_update","oracle_extend","oracle_query","oracle_register","oracle_response","paying_for","spend"]}}}},collectionFormat:"Multi"},{parameterPath:["options","typeGroup"],mapper:{serializedName:"type_group",type:{name:"Sequence",element:{type:{name:"Enum",allowedValues:["channel","contract","ga","name","oracle","paying_for","spend"]}}}},collectionFormat:"Multi"},$b,Ub,Vb,Db,Lb,{parameterPath:["options","entrypoint"],mapper:{serializedName:"entrypoint",type:{name:"String"}}},jb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},CS={path:"/v3/transactions/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}}},queryParameters:[hb,Gb,Hb],urlParameters:[mb],headerParameters:[lb],serializer:uA},AS={path:"/v3/transactions/pending",httpMethod:"GET",responses:{200:{bodyMapper:eA},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},SS={path:"/v3/transactions/pending/count",httpMethod:"GET",responses:{200:{bodyMapper:{type:{name:"Number"}}},400:{bodyMapper:ax,isError:!0}},urlParameters:[mb],headerParameters:[lb],serializer:uA},TS={path:"/v3/transactions/{hash}",httpMethod:"GET",responses:{200:{bodyMapper:O_},400:{bodyMapper:ax,isError:!0},404:{bodyMapper:fx,isError:!0}},urlParameters:[mb,Fb],headerParameters:[lb],serializer:uA},zS={path:"/v3/transfers",httpMethod:"GET",responses:{200:{bodyMapper:tA},400:{bodyMapper:ax,isError:!0}},queryParameters:[db,hb,{parameterPath:["options","direction"],mapper:{serializedName:"direction",type:{name:"Enum",allowedValues:["forward","backward"]}}}],urlParameters:[mb],headerParameters:[lb],serializer:uA},ES=[lA,mA,pA,dA,hA,fA,yA,gA,NA,wA,vA,bA,xA,_A,PA,CA,AA,SA,zA,EA,IA,MA,qA,RA,OA,kA,BA,GA,$A,UA,VA,DA,LA,jA,HA,FA,JA,WA,KA,YA,QA,ZA,XA,eS,tS,nS,rS,aS,iS,sS,oS,cS,uS,lS,mS,pS,dS,hS,fS,yS,gS,NS,wS,vS,bS,xS,_S,PS,CS,AS,SS,TS,zS];function IS(e,t){return e.get(MS(e,t))}function MS(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")}class qS extends q{constructor(e){super(`There is no ${e?"next":"previous"} page`),this.name="MiddlewarePageMissed"}}var RS=new WeakMap;class OS{constructor(e,t){var n,r;(function(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)})(this,RS,void 0),this.data=e.data,this.nextPath=e.next,this.prevPath=e.prev,r=t,(n=RS).set(MS(n,this),r)}async next(){if(null==this.nextPath)throw new qS(!0);return IS(RS,this).requestByPath(this.nextPath)}async prev(){if(null==this.prevPath)throw new qS(!1);return IS(RS,this).requestByPath(this.prevPath)}}class kS extends cA{constructor(e,{ignoreVersion:t=!1,retryCount:n=3,retryOverallDelay:r=800,...a}={}){let i;super(e,{allowInsecureConnection:!0,additionalPolicies:[nc("middleware",(async e=>(null!=i||(i=(await this.getStatus(e)).mdwVersion),i)),"1.81.0","2.0.0",t),Zo(),Xo(),rc(n,r),tc((e=>` ${e.error}`))],...a}),this.pipeline.addPolicy(Qo,{phase:"Deserialize"}),this.pipeline.removePolicy({name:cn}),this.pipeline.removePolicy({name:En}),this.pipeline.removePolicy({name:"defaultRetryPolicy"})}async requestByPath(e){const t=e.indexOf("?"),n=e.slice(0,-1===t?e.length:t),r=e.slice(-1===t?e.length:t+1),a=ES.find((e=>{let t=n;if(null==e.path)return!1;const r=e.path.replace(/{\w+}/g,"{param}").split("{param}");for(;r.length>0;){const n=r.shift();if(null==n)throw new ae(`Unexpected operation spec path: ${e.path}`);if(!t.startsWith(n))return!1;t=t.replace(n,""),r.length>0&&(t=t.replace(/^[\w.]+/,""))}return""===t}));if(null==a)throw new H(`Can't find operation spec corresponding to ${n}`);return this.sendOperationRequest({},{...a,path:n,urlParameters:a.urlParameters?.filter((({parameterPath:e})=>"$host"===e)),queryParameters:Array.from(new URLSearchParams(r)).map((([e,t])=>({parameterPath:["options",e],mapper:{defaultValue:t.toString(),serializedName:e,type:{name:"String"}}})))})}async sendOperationRequest(e,t){const n=await super.sendOperationRequest(e,t);return function(e){const t=e;return null!=t?.data&&Array.isArray(t.data)&&"next"in t&&"prev"in t}(n)?new OS(n,this):n}}var BS=(e,t)=>(e.connect((e=>t.sendMessage(e)),(()=>t.disconnect())),t.connect((t=>e.sendMessage(t)),(()=>e.disconnect())),()=>{e.disconnect(),t.disconnect()});class GS{constructor({debug:e=!1}){this.debug=e}connect(e,t){if(this.isConnected())throw new Ye("You already connected")}disconnect(){if(!this.isConnected())throw new Qe("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 $S(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)}function US(e,t){return e.get(DS(e,t))}function VS(e,t,n){return e.set(DS(e,t),n),n}function DS(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 LS=new WeakMap,jS=new WeakMap,HS=new WeakMap;class FS extends GS{constructor({target:e,self:t=window,origin:n,sendDirection:r,receiveDirection:a=hy.to_aepp,...i}={}){super(i),$S(this,LS,void 0),$S(this,jS,void 0),$S(this,HS,void 0),VS(jS,this,e),VS(HS,this,t),this.origin=n,this.sendDirection=r,this.receiveDirection=a}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!=US(jS,this)&&US(jS,this)!==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)},US(HS,this).addEventListener("message",this.listener),VS(LS,this,t)}disconnect(){if(super.disconnect(),null==this.listener||null==US(LS,this))throw new ae("Expected to not happen, required for TS");US(HS,this).removeEventListener("message",this.listener),delete this.listener,US(LS,this).call(this),VS(LS,this,void 0)}sendMessage(e){var t;if(null==US(jS,this))throw new Ze("Can't send messages without target");const n=null!=this.sendDirection?{type:this.sendDirection,data:e}:e;super.sendMessage(n),US(jS,this).postMessage(n,null!==(t=this.origin)&&void 0!==t?t:"*")}}var JS=(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},a,i)=>{if(e!==gy.readyToConnect||null!=n[r.id])return;const s={info:r,getConnection(){return new FS({target:i,..."extension"===r.type?{sendDirection:hy.to_waellet,receiveDirection:hy.to_aepp,..."null"!==window.origin&&{origin:window.origin}}:{origin:r.origin}})}};n[s.info.id]=s,t({wallets:n,newWallet:s})}),(()=>{})),()=>e.disconnect()};function WS(e,t,n){return e.set(YS(e,t),n),n}function KS(e,t){return e.get(YS(e,t))}function YS(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 QS=new WeakMap;class ZS extends GS{constructor({port:e,...t}){var n,r,a;super(t),a=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=QS),r.set(n,a),this.port=e}disconnect(){if(super.disconnect(),this.port.disconnect(),null==KS(QS,this))throw new ie;this.port.onMessage.removeListener(KS(QS,this)[0]),this.port.onDisconnect.removeListener(KS(QS,this)[1]),WS(QS,this,void 0)}connect(e,t){super.connect(e,t),WS(QS,this,[(t,n)=>{var r;this.receiveMessage(t),e(t,null!==(r=n.sender?.url)&&void 0!==r?r:"",n)},t]),this.port.onMessage.addListener(KS(QS,this)[0]),this.port.onDisconnect.addListener(KS(QS,this)[1])}sendMessage(e){super.sendMessage(e),this.port.postMessage(e)}isConnected(){return null!=KS(QS,this)}}}(),r}()}));
|
|
3
3
|
//# sourceMappingURL=aepp-sdk.browser-script.cjs.map
|