@zama-fhe/relayer-sdk 0.1.1 → 0.1.2
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/bundle/kms_lib_bg.wasm +0 -0
- package/bundle/relayer-sdk-js.js +14760 -23292
- package/bundle/relayer-sdk-js.umd.cjs +15 -15
- package/bundle/tfhe_bg.wasm +0 -0
- package/bundle/workerHelpers.js +2 -2
- package/lib/kms_lib_bg.wasm +0 -0
- package/lib/node.js +1 -1
- package/lib/tfhe_bg.wasm +0 -0
- package/lib/web.js +4231 -14330
- package/lib/workerHelpers.js +658 -23976
- package/package.json +42 -41
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
(function(
|
|
1
|
+
(function(Te,Ce){typeof exports=="object"&&typeof module<"u"?Ce(exports):typeof define=="function"&&define.amd?define(["exports"],Ce):(Te=typeof globalThis<"u"?globalThis:Te||self,Ce(Te.relayerSDK={}))})(this,function(Te){"use strict";var Ce=typeof document<"u"?document.currentScript:null;const Hi=globalThis||void 0||self;var b_={},so={};so.byteLength=Wg,so.toByteArray=$g,so.fromByteArray=Xg;for(var ir=[],De=[],Qg=typeof Uint8Array<"u"?Uint8Array:Array,aa="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Vi=0,Kg=aa.length;Vi<Kg;++Vi)ir[Vi]=aa[Vi],De[aa.charCodeAt(Vi)]=Vi;De[45]=62,De[95]=63;function m_(n){var t=n.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var e=n.indexOf("=");e===-1&&(e=t);var r=e===t?0:4-e%4;return[e,r]}function Wg(n){var t=m_(n),e=t[0],r=t[1];return(e+r)*3/4-r}function Jg(n,t,e){return(t+e)*3/4-e}function $g(n){var t,e=m_(n),r=e[0],i=e[1],o=new Qg(Jg(n,r,i)),a=0,u=i>0?r-4:r,_;for(_=0;_<u;_+=4)t=De[n.charCodeAt(_)]<<18|De[n.charCodeAt(_+1)]<<12|De[n.charCodeAt(_+2)]<<6|De[n.charCodeAt(_+3)],o[a++]=t>>16&255,o[a++]=t>>8&255,o[a++]=t&255;return i===2&&(t=De[n.charCodeAt(_)]<<2|De[n.charCodeAt(_+1)]>>4,o[a++]=t&255),i===1&&(t=De[n.charCodeAt(_)]<<10|De[n.charCodeAt(_+1)]<<4|De[n.charCodeAt(_+2)]>>2,o[a++]=t>>8&255,o[a++]=t&255),o}function Yg(n){return ir[n>>18&63]+ir[n>>12&63]+ir[n>>6&63]+ir[n&63]}function Zg(n,t,e){for(var r,i=[],o=t;o<e;o+=3)r=(n[o]<<16&16711680)+(n[o+1]<<8&65280)+(n[o+2]&255),i.push(Yg(r));return i.join("")}function Xg(n){for(var t,e=n.length,r=e%3,i=[],o=16383,a=0,u=e-r;a<u;a+=o)i.push(Zg(n,a,a+o>u?u:a+o));return r===1?(t=n[e-1],i.push(ir[t>>2]+ir[t<<4&63]+"==")):r===2&&(t=(n[e-2]<<8)+n[e-1],i.push(ir[t>>10]+ir[t>>4&63]+ir[t<<2&63]+"=")),i.join("")}var ca={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ca.read=function(n,t,e,r,i){var o,a,u=i*8-r-1,_=(1<<u)-1,l=_>>1,f=-7,g=e?i-1:0,y=e?-1:1,B=n[t+g];for(g+=y,o=B&(1<<-f)-1,B>>=-f,f+=u;f>0;o=o*256+n[t+g],g+=y,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=r;f>0;a=a*256+n[t+g],g+=y,f-=8);if(o===0)o=1-l;else{if(o===_)return a?NaN:(B?-1:1)*(1/0);a=a+Math.pow(2,r),o=o-l}return(B?-1:1)*a*Math.pow(2,o-r)},ca.write=function(n,t,e,r,i,o){var a,u,_,l=o*8-i-1,f=(1<<l)-1,g=f>>1,y=i===23?Math.pow(2,-24)-Math.pow(2,-77):0,B=r?0:o-1,I=r?1:-1,S=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(u=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(_=Math.pow(2,-a))<1&&(a--,_*=2),a+g>=1?t+=y/_:t+=y*Math.pow(2,1-g),t*_>=2&&(a++,_/=2),a+g>=f?(u=0,a=f):a+g>=1?(u=(t*_-1)*Math.pow(2,i),a=a+g):(u=t*Math.pow(2,g-1)*Math.pow(2,i),a=0));i>=8;n[e+B]=u&255,B+=I,u/=256,i-=8);for(a=a<<i|u,l+=i;l>0;n[e+B]=a&255,B+=I,a/=256,l-=8);n[e+B-I]|=S*128};/*!
|
|
2
2
|
* The buffer module from node.js, for the browser.
|
|
3
3
|
*
|
|
4
4
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
5
5
|
* @license MIT
|
|
6
|
-
*/(function(n){const t=F_,e=il,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=f,n.SlowBuffer=k,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i;const{Uint8Array:_,ArrayBuffer:a,SharedArrayBuffer:c}=globalThis;f.TYPED_ARRAY_SUPPORT=u(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function u(){try{const E=new _(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,_.prototype),Object.setPrototypeOf(E,p),E.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function l(E){if(E>i)throw new RangeError('The value "'+E+'" is invalid for option "size"');const p=new _(E);return Object.setPrototypeOf(p,f.prototype),p}function f(E,p,w){if(typeof E=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return N(E)}return d(E,p,w)}f.poolSize=8192;function d(E,p,w){if(typeof E=="string")return I(E,p);if(a.isView(E))return z(E);if(E==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E);if(be(E,a)||E&&be(E.buffer,a)||typeof c<"u"&&(be(E,c)||E&&be(E.buffer,c)))return B(E,p,w);if(typeof E=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const T=E.valueOf&&E.valueOf();if(T!=null&&T!==E)return f.from(T,p,w);const Y=O(E);if(Y)return Y;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof E[Symbol.toPrimitive]=="function")return f.from(E[Symbol.toPrimitive]("string"),p,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof E)}f.from=function(E,p,w){return d(E,p,w)},Object.setPrototypeOf(f.prototype,_.prototype),Object.setPrototypeOf(f,_);function y(E){if(typeof E!="number")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 v(E,p,w){return y(E),E<=0?l(E):p!==void 0?typeof w=="string"?l(E).fill(p,w):l(E).fill(p):l(E)}f.alloc=function(E,p,w){return v(E,p,w)};function N(E){return y(E),l(E<0?0:C(E)|0)}f.allocUnsafe=function(E){return N(E)},f.allocUnsafeSlow=function(E){return N(E)};function I(E,p){if((typeof p!="string"||p==="")&&(p="utf8"),!f.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const w=D(E,p)|0;let T=l(w);const Y=T.write(E,p);return Y!==w&&(T=T.slice(0,Y)),T}function U(E){const p=E.length<0?0:C(E.length)|0,w=l(p);for(let T=0;T<p;T+=1)w[T]=E[T]&255;return w}function z(E){if(be(E,_)){const p=new _(E);return B(p.buffer,p.byteOffset,p.byteLength)}return U(E)}function B(E,p,w){if(p<0||E.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(E.byteLength<p+(w||0))throw new RangeError('"length" is outside of buffer bounds');let T;return p===void 0&&w===void 0?T=new _(E):w===void 0?T=new _(E,p):T=new _(E,p,w),Object.setPrototypeOf(T,f.prototype),T}function O(E){if(f.isBuffer(E)){const p=C(E.length)|0,w=l(p);return w.length===0||E.copy(w,0,0,p),w}if(E.length!==void 0)return typeof E.length!="number"||De(E.length)?l(0):U(E);if(E.type==="Buffer"&&Array.isArray(E.data))return U(E.data)}function C(E){if(E>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return E|0}function k(E){return+E!=E&&(E=0),f.alloc(+E)}f.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==f.prototype},f.compare=function(p,w){if(be(p,_)&&(p=f.from(p,p.offset,p.byteLength)),be(w,_)&&(w=f.from(w,w.offset,w.byteLength)),!f.isBuffer(p)||!f.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===w)return 0;let T=p.length,Y=w.length;for(let Z=0,ct=Math.min(T,Y);Z<ct;++Z)if(p[Z]!==w[Z]){T=p[Z],Y=w[Z];break}return T<Y?-1:Y<T?1:0},f.isEncoding=function(p){switch(String(p).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}},f.concat=function(p,w){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return f.alloc(0);let T;if(w===void 0)for(w=0,T=0;T<p.length;++T)w+=p[T].length;const Y=f.allocUnsafe(w);let Z=0;for(T=0;T<p.length;++T){let ct=p[T];if(be(ct,_))Z+ct.length>Y.length?(f.isBuffer(ct)||(ct=f.from(ct)),ct.copy(Y,Z)):_.prototype.set.call(Y,ct,Z);else if(f.isBuffer(ct))ct.copy(Y,Z);else throw new TypeError('"list" argument must be an Array of Buffers');Z+=ct.length}return Y};function D(E,p){if(f.isBuffer(E))return E.length;if(a.isView(E)||be(E,a))return E.byteLength;if(typeof E!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof E);const w=E.length,T=arguments.length>2&&arguments[2]===!0;if(!T&&w===0)return 0;let Y=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return Ae(E).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Xt(E).length;default:if(Y)return T?-1:Ae(E).length;p=(""+p).toLowerCase(),Y=!0}}f.byteLength=D;function L(E,p,w){let T=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,p>>>=0,w<=p))return"";for(E||(E="utf8");;)switch(E){case"hex":return J(this,p,w);case"utf8":case"utf-8":return zt(this,p,w);case"ascii":return It(this,p,w);case"latin1":case"binary":return Qt(this,p,w);case"base64":return yt(this,p,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return nt(this,p,w);default:if(T)throw new TypeError("Unknown encoding: "+E);E=(E+"").toLowerCase(),T=!0}}f.prototype._isBuffer=!0;function V(E,p,w){const T=E[p];E[p]=E[w],E[w]=T}f.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<p;w+=2)V(this,w,w+1);return this},f.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<p;w+=4)V(this,w,w+3),V(this,w+1,w+2);return this},f.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<p;w+=8)V(this,w,w+7),V(this,w+1,w+6),V(this,w+2,w+5),V(this,w+3,w+4);return this},f.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?zt(this,0,p):L.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(p){if(!f.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:f.compare(this,p)===0},f.prototype.inspect=function(){let p="";const w=n.INSPECT_MAX_BYTES;return p=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(p+=" ... "),"<Buffer "+p+">"},r&&(f.prototype[r]=f.prototype.inspect),f.prototype.compare=function(p,w,T,Y,Z){if(be(p,_)&&(p=f.from(p,p.offset,p.byteLength)),!f.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(w===void 0&&(w=0),T===void 0&&(T=p?p.length:0),Y===void 0&&(Y=0),Z===void 0&&(Z=this.length),w<0||T>p.length||Y<0||Z>this.length)throw new RangeError("out of range index");if(Y>=Z&&w>=T)return 0;if(Y>=Z)return-1;if(w>=T)return 1;if(w>>>=0,T>>>=0,Y>>>=0,Z>>>=0,this===p)return 0;let ct=Z-Y,kt=T-w;const $t=Math.min(ct,kt),Zt=this.slice(Y,Z),te=p.slice(w,T);for(let Vt=0;Vt<$t;++Vt)if(Zt[Vt]!==te[Vt]){ct=Zt[Vt],kt=te[Vt];break}return ct<kt?-1:kt<ct?1:0};function tt(E,p,w,T,Y){if(E.length===0)return-1;if(typeof w=="string"?(T=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,De(w)&&(w=Y?0:E.length-1),w<0&&(w=E.length+w),w>=E.length){if(Y)return-1;w=E.length-1}else if(w<0)if(Y)w=0;else return-1;if(typeof p=="string"&&(p=f.from(p,T)),f.isBuffer(p))return p.length===0?-1:rt(E,p,w,T,Y);if(typeof p=="number")return p=p&255,typeof _.prototype.indexOf=="function"?Y?_.prototype.indexOf.call(E,p,w):_.prototype.lastIndexOf.call(E,p,w):rt(E,[p],w,T,Y);throw new TypeError("val must be string, number or Buffer")}function rt(E,p,w,T,Y){let Z=1,ct=E.length,kt=p.length;if(T!==void 0&&(T=String(T).toLowerCase(),T==="ucs2"||T==="ucs-2"||T==="utf16le"||T==="utf-16le")){if(E.length<2||p.length<2)return-1;Z=2,ct/=2,kt/=2,w/=2}function $t(te,Vt){return Z===1?te[Vt]:te.readUInt16BE(Vt*Z)}let Zt;if(Y){let te=-1;for(Zt=w;Zt<ct;Zt++)if($t(E,Zt)===$t(p,te===-1?0:Zt-te)){if(te===-1&&(te=Zt),Zt-te+1===kt)return te*Z}else te!==-1&&(Zt-=Zt-te),te=-1}else for(w+kt>ct&&(w=ct-kt),Zt=w;Zt>=0;Zt--){let te=!0;for(let Vt=0;Vt<kt;Vt++)if($t(E,Zt+Vt)!==$t(p,Vt)){te=!1;break}if(te)return Zt}return-1}f.prototype.includes=function(p,w,T){return this.indexOf(p,w,T)!==-1},f.prototype.indexOf=function(p,w,T){return tt(this,p,w,T,!0)},f.prototype.lastIndexOf=function(p,w,T){return tt(this,p,w,T,!1)};function wt(E,p,w,T){w=Number(w)||0;const Y=E.length-w;T?(T=Number(T),T>Y&&(T=Y)):T=Y;const Z=p.length;T>Z/2&&(T=Z/2);let ct;for(ct=0;ct<T;++ct){const kt=parseInt(p.substr(ct*2,2),16);if(De(kt))return ct;E[w+ct]=kt}return ct}function j(E,p,w,T){return Se(Ae(p,E.length-w),E,w,T)}function Pt(E,p,w,T){return Se(me(p),E,w,T)}function xt(E,p,w,T){return Se(Xt(p),E,w,T)}function ft(E,p,w,T){return Se(Wt(p,E.length-w),E,w,T)}f.prototype.write=function(p,w,T,Y){if(w===void 0)Y="utf8",T=this.length,w=0;else if(T===void 0&&typeof w=="string")Y=w,T=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(T)?(T=T>>>0,Y===void 0&&(Y="utf8")):(Y=T,T=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const Z=this.length-w;if((T===void 0||T>Z)&&(T=Z),p.length>0&&(T<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");Y||(Y="utf8");let ct=!1;for(;;)switch(Y){case"hex":return wt(this,p,w,T);case"utf8":case"utf-8":return j(this,p,w,T);case"ascii":case"latin1":case"binary":return Pt(this,p,w,T);case"base64":return xt(this,p,w,T);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ft(this,p,w,T);default:if(ct)throw new TypeError("Unknown encoding: "+Y);Y=(""+Y).toLowerCase(),ct=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function yt(E,p,w){return p===0&&w===E.length?t.fromByteArray(E):t.fromByteArray(E.slice(p,w))}function zt(E,p,w){w=Math.min(E.length,w);const T=[];let Y=p;for(;Y<w;){const Z=E[Y];let ct=null,kt=Z>239?4:Z>223?3:Z>191?2:1;if(Y+kt<=w){let $t,Zt,te,Vt;switch(kt){case 1:Z<128&&(ct=Z);break;case 2:$t=E[Y+1],($t&192)===128&&(Vt=(Z&31)<<6|$t&63,Vt>127&&(ct=Vt));break;case 3:$t=E[Y+1],Zt=E[Y+2],($t&192)===128&&(Zt&192)===128&&(Vt=(Z&15)<<12|($t&63)<<6|Zt&63,Vt>2047&&(Vt<55296||Vt>57343)&&(ct=Vt));break;case 4:$t=E[Y+1],Zt=E[Y+2],te=E[Y+3],($t&192)===128&&(Zt&192)===128&&(te&192)===128&&(Vt=(Z&15)<<18|($t&63)<<12|(Zt&63)<<6|te&63,Vt>65535&&Vt<1114112&&(ct=Vt))}}ct===null?(ct=65533,kt=1):ct>65535&&(ct-=65536,T.push(ct>>>10&1023|55296),ct=56320|ct&1023),T.push(ct),Y+=kt}return Mt(T)}const Bt=4096;function Mt(E){const p=E.length;if(p<=Bt)return String.fromCharCode.apply(String,E);let w="",T=0;for(;T<p;)w+=String.fromCharCode.apply(String,E.slice(T,T+=Bt));return w}function It(E,p,w){let T="";w=Math.min(E.length,w);for(let Y=p;Y<w;++Y)T+=String.fromCharCode(E[Y]&127);return T}function Qt(E,p,w){let T="";w=Math.min(E.length,w);for(let Y=p;Y<w;++Y)T+=String.fromCharCode(E[Y]);return T}function J(E,p,w){const T=E.length;(!p||p<0)&&(p=0),(!w||w<0||w>T)&&(w=T);let Y="";for(let Z=p;Z<w;++Z)Y+=qe[E[Z]];return Y}function nt(E,p,w){const T=E.slice(p,w);let Y="";for(let Z=0;Z<T.length-1;Z+=2)Y+=String.fromCharCode(T[Z]+T[Z+1]*256);return Y}f.prototype.slice=function(p,w){const T=this.length;p=~~p,w=w===void 0?T:~~w,p<0?(p+=T,p<0&&(p=0)):p>T&&(p=T),w<0?(w+=T,w<0&&(w=0)):w>T&&(w=T),w<p&&(w=p);const Y=this.subarray(p,w);return Object.setPrototypeOf(Y,f.prototype),Y};function ot(E,p,w){if(E%1!==0||E<0)throw new RangeError("offset is not uint");if(E+p>w)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(p,w,T){p=p>>>0,w=w>>>0,T||ot(p,w,this.length);let Y=this[p],Z=1,ct=0;for(;++ct<w&&(Z*=256);)Y+=this[p+ct]*Z;return Y},f.prototype.readUintBE=f.prototype.readUIntBE=function(p,w,T){p=p>>>0,w=w>>>0,T||ot(p,w,this.length);let Y=this[p+--w],Z=1;for(;w>0&&(Z*=256);)Y+=this[p+--w]*Z;return Y},f.prototype.readUint8=f.prototype.readUInt8=function(p,w){return p=p>>>0,w||ot(p,1,this.length),this[p]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(p,w){return p=p>>>0,w||ot(p,2,this.length),this[p]|this[p+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(p,w){return p=p>>>0,w||ot(p,2,this.length),this[p]<<8|this[p+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},f.prototype.readBigUInt64LE=de(function(p){p=p>>>0,St(p,"offset");const w=this[p],T=this[p+7];(w===void 0||T===void 0)&&Ot(p,this.length-8);const Y=w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,Z=this[++p]+this[++p]*2**8+this[++p]*2**16+T*2**24;return BigInt(Y)+(BigInt(Z)<<BigInt(32))}),f.prototype.readBigUInt64BE=de(function(p){p=p>>>0,St(p,"offset");const w=this[p],T=this[p+7];(w===void 0||T===void 0)&&Ot(p,this.length-8);const Y=w*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],Z=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T;return(BigInt(Y)<<BigInt(32))+BigInt(Z)}),f.prototype.readIntLE=function(p,w,T){p=p>>>0,w=w>>>0,T||ot(p,w,this.length);let Y=this[p],Z=1,ct=0;for(;++ct<w&&(Z*=256);)Y+=this[p+ct]*Z;return Z*=128,Y>=Z&&(Y-=Math.pow(2,8*w)),Y},f.prototype.readIntBE=function(p,w,T){p=p>>>0,w=w>>>0,T||ot(p,w,this.length);let Y=w,Z=1,ct=this[p+--Y];for(;Y>0&&(Z*=256);)ct+=this[p+--Y]*Z;return Z*=128,ct>=Z&&(ct-=Math.pow(2,8*w)),ct},f.prototype.readInt8=function(p,w){return p=p>>>0,w||ot(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},f.prototype.readInt16LE=function(p,w){p=p>>>0,w||ot(p,2,this.length);const T=this[p]|this[p+1]<<8;return T&32768?T|4294901760:T},f.prototype.readInt16BE=function(p,w){p=p>>>0,w||ot(p,2,this.length);const T=this[p+1]|this[p]<<8;return T&32768?T|4294901760:T},f.prototype.readInt32LE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},f.prototype.readInt32BE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},f.prototype.readBigInt64LE=de(function(p){p=p>>>0,St(p,"offset");const w=this[p],T=this[p+7];(w===void 0||T===void 0)&&Ot(p,this.length-8);const Y=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(T<<24);return(BigInt(Y)<<BigInt(32))+BigInt(w+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),f.prototype.readBigInt64BE=de(function(p){p=p>>>0,St(p,"offset");const w=this[p],T=this[p+7];(w===void 0||T===void 0)&&Ot(p,this.length-8);const Y=(w<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(Y)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+T)}),f.prototype.readFloatLE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),e.read(this,p,!0,23,4)},f.prototype.readFloatBE=function(p,w){return p=p>>>0,w||ot(p,4,this.length),e.read(this,p,!1,23,4)},f.prototype.readDoubleLE=function(p,w){return p=p>>>0,w||ot(p,8,this.length),e.read(this,p,!0,52,8)},f.prototype.readDoubleBE=function(p,w){return p=p>>>0,w||ot(p,8,this.length),e.read(this,p,!1,52,8)};function mt(E,p,w,T,Y,Z){if(!f.isBuffer(E))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>Y||p<Z)throw new RangeError('"value" argument is out of bounds');if(w+T>E.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(p,w,T,Y){if(p=+p,w=w>>>0,T=T>>>0,!Y){const kt=Math.pow(2,8*T)-1;mt(this,p,w,T,kt,0)}let Z=1,ct=0;for(this[w]=p&255;++ct<T&&(Z*=256);)this[w+ct]=p/Z&255;return w+T},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(p,w,T,Y){if(p=+p,w=w>>>0,T=T>>>0,!Y){const kt=Math.pow(2,8*T)-1;mt(this,p,w,T,kt,0)}let Z=T-1,ct=1;for(this[w+Z]=p&255;--Z>=0&&(ct*=256);)this[w+Z]=p/ct&255;return w+T},f.prototype.writeUint8=f.prototype.writeUInt8=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,1,255,0),this[w]=p&255,w+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,2,65535,0),this[w]=p&255,this[w+1]=p>>>8,w+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,2,65535,0),this[w]=p>>>8,this[w+1]=p&255,w+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,4,4294967295,0),this[w+3]=p>>>24,this[w+2]=p>>>16,this[w+1]=p>>>8,this[w]=p&255,w+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,4,4294967295,0),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4};function q(E,p,w,T,Y){Nt(p,T,Y,E,w,7);let Z=Number(p&BigInt(4294967295));E[w++]=Z,Z=Z>>8,E[w++]=Z,Z=Z>>8,E[w++]=Z,Z=Z>>8,E[w++]=Z;let ct=Number(p>>BigInt(32)&BigInt(4294967295));return E[w++]=ct,ct=ct>>8,E[w++]=ct,ct=ct>>8,E[w++]=ct,ct=ct>>8,E[w++]=ct,w}function H(E,p,w,T,Y){Nt(p,T,Y,E,w,7);let Z=Number(p&BigInt(4294967295));E[w+7]=Z,Z=Z>>8,E[w+6]=Z,Z=Z>>8,E[w+5]=Z,Z=Z>>8,E[w+4]=Z;let ct=Number(p>>BigInt(32)&BigInt(4294967295));return E[w+3]=ct,ct=ct>>8,E[w+2]=ct,ct=ct>>8,E[w+1]=ct,ct=ct>>8,E[w]=ct,w+8}f.prototype.writeBigUInt64LE=de(function(p,w=0){return q(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=de(function(p,w=0){return H(this,p,w,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(p,w,T,Y){if(p=+p,w=w>>>0,!Y){const $t=Math.pow(2,8*T-1);mt(this,p,w,T,$t-1,-$t)}let Z=0,ct=1,kt=0;for(this[w]=p&255;++Z<T&&(ct*=256);)p<0&&kt===0&&this[w+Z-1]!==0&&(kt=1),this[w+Z]=(p/ct>>0)-kt&255;return w+T},f.prototype.writeIntBE=function(p,w,T,Y){if(p=+p,w=w>>>0,!Y){const $t=Math.pow(2,8*T-1);mt(this,p,w,T,$t-1,-$t)}let Z=T-1,ct=1,kt=0;for(this[w+Z]=p&255;--Z>=0&&(ct*=256);)p<0&&kt===0&&this[w+Z+1]!==0&&(kt=1),this[w+Z]=(p/ct>>0)-kt&255;return w+T},f.prototype.writeInt8=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,1,127,-128),p<0&&(p=255+p+1),this[w]=p&255,w+1},f.prototype.writeInt16LE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,2,32767,-32768),this[w]=p&255,this[w+1]=p>>>8,w+2},f.prototype.writeInt16BE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,2,32767,-32768),this[w]=p>>>8,this[w+1]=p&255,w+2},f.prototype.writeInt32LE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,4,2147483647,-2147483648),this[w]=p&255,this[w+1]=p>>>8,this[w+2]=p>>>16,this[w+3]=p>>>24,w+4},f.prototype.writeInt32BE=function(p,w,T){return p=+p,w=w>>>0,T||mt(this,p,w,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[w]=p>>>24,this[w+1]=p>>>16,this[w+2]=p>>>8,this[w+3]=p&255,w+4},f.prototype.writeBigInt64LE=de(function(p,w=0){return q(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=de(function(p,w=0){return H(this,p,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function it(E,p,w,T,Y,Z){if(w+T>E.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function lt(E,p,w,T,Y){return p=+p,w=w>>>0,Y||it(E,p,w,4),e.write(E,p,w,T,23,4),w+4}f.prototype.writeFloatLE=function(p,w,T){return lt(this,p,w,!0,T)},f.prototype.writeFloatBE=function(p,w,T){return lt(this,p,w,!1,T)};function pt(E,p,w,T,Y){return p=+p,w=w>>>0,Y||it(E,p,w,8),e.write(E,p,w,T,52,8),w+8}f.prototype.writeDoubleLE=function(p,w,T){return pt(this,p,w,!0,T)},f.prototype.writeDoubleBE=function(p,w,T){return pt(this,p,w,!1,T)},f.prototype.copy=function(p,w,T,Y){if(!f.isBuffer(p))throw new TypeError("argument should be a Buffer");if(T||(T=0),!Y&&Y!==0&&(Y=this.length),w>=p.length&&(w=p.length),w||(w=0),Y>0&&Y<T&&(Y=T),Y===T||p.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(T<0||T>=this.length)throw new RangeError("Index out of range");if(Y<0)throw new RangeError("sourceEnd out of bounds");Y>this.length&&(Y=this.length),p.length-w<Y-T&&(Y=p.length-w+T);const Z=Y-T;return this===p&&typeof _.prototype.copyWithin=="function"?this.copyWithin(w,T,Y):_.prototype.set.call(p,this.subarray(T,Y),w),Z},f.prototype.fill=function(p,w,T,Y){if(typeof p=="string"){if(typeof w=="string"?(Y=w,w=0,T=this.length):typeof T=="string"&&(Y=T,T=this.length),Y!==void 0&&typeof Y!="string")throw new TypeError("encoding must be a string");if(typeof Y=="string"&&!f.isEncoding(Y))throw new TypeError("Unknown encoding: "+Y);if(p.length===1){const ct=p.charCodeAt(0);(Y==="utf8"&&ct<128||Y==="latin1")&&(p=ct)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(w<0||this.length<w||this.length<T)throw new RangeError("Out of range index");if(T<=w)return this;w=w>>>0,T=T===void 0?this.length:T>>>0,p||(p=0);let Z;if(typeof p=="number")for(Z=w;Z<T;++Z)this[Z]=p;else{const ct=f.isBuffer(p)?p:f.from(p,Y),kt=ct.length;if(kt===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for(Z=0;Z<T-w;++Z)this[Z+w]=ct[Z%kt]}return this};const M={};function x(E,p,w){M[E]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${E}]`,this.stack,delete this.name}get code(){return E}set code(Y){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Y,writable:!0})}toString(){return`${this.name} [${E}]: ${this.message}`}}}x("ERR_BUFFER_OUT_OF_BOUNDS",function(E){return E?`${E} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),x("ERR_INVALID_ARG_TYPE",function(E,p){return`The "${E}" argument must be of type number. Received type ${typeof p}`},TypeError),x("ERR_OUT_OF_RANGE",function(E,p,w){let T=`The value of "${E}" is out of range.`,Y=w;return Number.isInteger(w)&&Math.abs(w)>2**32?Y=st(String(w)):typeof w=="bigint"&&(Y=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(Y=st(Y)),Y+="n"),T+=` It must be ${p}. Received ${Y}`,T},RangeError);function st(E){let p="",w=E.length;const T=E[0]==="-"?1:0;for(;w>=T+4;w-=3)p=`_${E.slice(w-3,w)}${p}`;return`${E.slice(0,w)}${p}`}function dt(E,p,w){St(p,"offset"),(E[p]===void 0||E[p+w]===void 0)&&Ot(p,E.length-(w+1))}function Nt(E,p,w,T,Y,Z){if(E>w||E<p){const ct=typeof p=="bigint"?"n":"";let kt;throw p===0||p===BigInt(0)?kt=`>= 0${ct} and < 2${ct} ** ${(Z+1)*8}${ct}`:kt=`>= -(2${ct} ** ${(Z+1)*8-1}${ct}) and < 2 ** ${(Z+1)*8-1}${ct}`,new M.ERR_OUT_OF_RANGE("value",kt,E)}dt(T,Y,Z)}function St(E,p){if(typeof E!="number")throw new M.ERR_INVALID_ARG_TYPE(p,"number",E)}function Ot(E,p,w){throw Math.floor(E)!==E?(St(E,w),new M.ERR_OUT_OF_RANGE("offset","an integer",E)):p<0?new M.ERR_BUFFER_OUT_OF_BOUNDS:new M.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,E)}const ye=/[^+/0-9A-Za-z-_]/g;function at(E){if(E=E.split("=")[0],E=E.trim().replace(ye,""),E.length<2)return"";for(;E.length%4!==0;)E=E+"=";return E}function Ae(E,p){p=p||1/0;let w;const T=E.length;let Y=null;const Z=[];for(let ct=0;ct<T;++ct){if(w=E.charCodeAt(ct),w>55295&&w<57344){if(!Y){if(w>56319){(p-=3)>-1&&Z.push(239,191,189);continue}else if(ct+1===T){(p-=3)>-1&&Z.push(239,191,189);continue}Y=w;continue}if(w<56320){(p-=3)>-1&&Z.push(239,191,189),Y=w;continue}w=(Y-55296<<10|w-56320)+65536}else Y&&(p-=3)>-1&&Z.push(239,191,189);if(Y=null,w<128){if((p-=1)<0)break;Z.push(w)}else if(w<2048){if((p-=2)<0)break;Z.push(w>>6|192,w&63|128)}else if(w<65536){if((p-=3)<0)break;Z.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((p-=4)<0)break;Z.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return Z}function me(E){const p=[];for(let w=0;w<E.length;++w)p.push(E.charCodeAt(w)&255);return p}function Wt(E,p){let w,T,Y;const Z=[];for(let ct=0;ct<E.length&&!((p-=2)<0);++ct)w=E.charCodeAt(ct),T=w>>8,Y=w%256,Z.push(Y),Z.push(T);return Z}function Xt(E){return t.toByteArray(at(E))}function Se(E,p,w,T){let Y;for(Y=0;Y<T&&!(Y+w>=p.length||Y>=E.length);++Y)p[Y+w]=E[Y];return Y}function be(E,p){return E instanceof p||E!=null&&E.constructor!=null&&E.constructor.name!=null&&E.constructor.name===p.name}function De(E){return E!==E}const qe=function(){const E="0123456789abcdef",p=new Array(256);for(let w=0;w<16;++w){const T=w*16;for(let Y=0;Y<16;++Y)p[T+Y]=E[w]+E[Y]}return p}();function de(E){return typeof BigInt>"u"?gr:E}function gr(){throw new Error("BigInt not supported")}})(Ns);const yr=Ns.Buffer,pS="6.13.4";function hS(n,t,e){const r=t.split("|").map(_=>_.trim());for(let _=0;_<r.length;_++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${e}`,i.value=n,i}async function Oe(n){const t=Object.keys(n);return(await Promise.all(t.map(r=>Promise.resolve(n[r])))).reduce((r,i,_)=>(r[t[_]]=i,r),{})}function Ct(n,t,e){for(let r in t){let i=t[r];const _=e?e[r]:null;_&&hS(i,_,r),Object.defineProperty(n,r,{enumerable:!0,value:i,writable:!1})}}function D_(n){if(n==null)return"null";if(Array.isArray(n))return"[ "+n.map(D_).join(", ")+" ]";if(n instanceof Uint8Array){const t="0123456789abcdef";let e="0x";for(let r=0;r<n.length;r++)e+=t[n[r]>>4],e+=t[n[r]&15];return e}if(typeof n=="object"&&typeof n.toJSON=="function")return D_(n.toJSON());switch(typeof n){case"boolean":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"number":return n.toString();case"string":return JSON.stringify(n);case"object":{const t=Object.keys(n);return t.sort(),"{ "+t.map(e=>`${D_(e)}: ${D_(n[e])}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function ze(n,t){return n&&n.code===t}function sl(n){return ze(n,"CALL_EXCEPTION")}function ce(n,t,e){let r=n;{const _=[];if(e){if("message"in e||"code"in e||"name"in e)throw new Error(`value will overwrite populated values: ${D_(e)}`);for(const a in e){if(a==="shortMessage")continue;const c=e[a];_.push(a+"="+D_(c))}}_.push(`code=${t}`),_.push(`version=${pS}`),_.length&&(n+=" ("+_.join(", ")+")")}let i;switch(t){case"INVALID_ARGUMENT":i=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(n);break;default:i=new Error(n)}return Ct(i,{code:t}),e&&Object.assign(i,e),i.shortMessage==null&&Ct(i,{shortMessage:r}),i}function ht(n,t,e,r){if(!n)throw ce(t,e,r)}function W(n,t,e,r){ht(n,t,"INVALID_ARGUMENT",{argument:e,value:r})}function kw(n,t,e){e==null&&(e=""),e&&(e=": "+e),ht(n>=t,"missing arguemnt"+e,"MISSING_ARGUMENT",{count:n,expectedCount:t}),ht(n<=t,"too many arguments"+e,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:t})}["NFD","NFC","NFKD","NFKC"].reduce((n,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(t)}catch{}return n},[]);function Du(n,t,e){if(e==null&&(e=""),n!==t){let r=e,i="new";e&&(r+=".",i+=" "+e),ht(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function Tw(n,t,e){if(n instanceof Uint8Array)return e?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let i=2;for(let _=0;_<r.length;_++)r[_]=parseInt(n.substring(i,i+2),16),i+=2;return r}W(!1,"invalid BytesLike value",t||"value",n)}function Yt(n,t){return Tw(n,t,!1)}function ke(n,t){return Tw(n,t,!0)}function ne(n,t){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof t=="number"&&n.length!==2+2*t||t===!0&&n.length%2!==0)}function _l(n){return ne(n,!0)||n instanceof Uint8Array}const Gw="0123456789abcdef";function Et(n){const t=Yt(n);let e="0x";for(let r=0;r<t.length;r++){const i=t[r];e+=Gw[(i&240)>>4]+Gw[i&15]}return e}function fe(n){return"0x"+n.map(t=>Et(t).substring(2)).join("")}function L_(n){return ne(n,!0)?(n.length-2)/2:Yt(n).length}function ue(n,t,e){const r=Yt(n);return e!=null&&e>r.length&&ht(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:e}),Et(r.slice(t??0,e??r.length))}function Uw(n,t,e){const r=Yt(n);ht(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),e?i.set(r,t-r.length):i.set(r,0),Et(i)}function Os(n,t){return Uw(n,t,!0)}function wS(n,t){return Uw(n,t,!1)}const Lu=BigInt(0),Ar=BigInt(1),ol=9007199254740991;function dS(n,t){const e=ju(n,"value"),r=BigInt(Kt(t,"width"));if(ht(e>>r===Lu,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:n}),e>>r-Ar){const i=(Ar<<r)-Ar;return-((~e&i)+Ar)}return e}function Fw(n,t){let e=vt(n,"value");const r=BigInt(Kt(t,"width")),i=Ar<<r-Ar;if(e<Lu){e=-e,ht(e<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});const _=(Ar<<r)-Ar;return(~e&_)+Ar}else ht(e<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});return e}function Lc(n,t){const e=ju(n,"value"),r=BigInt(Kt(t,"bits"));return e&(Ar<<r)-Ar}function vt(n,t){switch(typeof n){case"bigint":return n;case"number":return W(Number.isInteger(n),"underflow",t||"value",n),W(n>=-9007199254740991&&n<=ol,"overflow",t||"value",n),BigInt(n);case"string":try{if(n==="")throw new Error("empty string");return n[0]==="-"&&n[1]!=="-"?-BigInt(n.substring(1)):BigInt(n)}catch(e){W(!1,`invalid BigNumberish string: ${e.message}`,t||"value",n)}}W(!1,"invalid BigNumberish value",t||"value",n)}function ju(n,t){const e=vt(n,t);return ht(e>=Lu,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:n}),e}const Kw="0123456789abcdef";function al(n){if(n instanceof Uint8Array){let t="0x0";for(const e of n)t+=Kw[e>>4],t+=Kw[e&15];return BigInt(t)}return vt(n)}function Kt(n,t){switch(typeof n){case"bigint":return W(n>=-9007199254740991&&n<=ol,"overflow",t||"value",n),Number(n);case"number":return W(Number.isInteger(n),"underflow",t||"value",n),W(n>=-9007199254740991&&n<=ol,"overflow",t||"value",n),n;case"string":try{if(n==="")throw new Error("empty string");return Kt(BigInt(n),t)}catch(e){W(!1,`invalid numeric string: ${e.message}`,t||"value",n)}}W(!1,"invalid numeric value",t||"value",n)}function gS(n){return Kt(al(n))}function rs(n,t){let r=ju(n,"value").toString(16);if(t==null)r.length%2&&(r="0"+r);else{const i=Kt(t,"width");for(ht(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:n});r.length<i*2;)r="0"+r}return"0x"+r}function Te(n){const t=ju(n,"value");if(t===Lu)return new Uint8Array([]);let e=t.toString(16);e.length%2&&(e="0"+e);const r=new Uint8Array(e.length/2);for(let i=0;i<r.length;i++){const _=i*2;r[i]=parseInt(e.substring(_,_+2),16)}return r}function j_(n){let t=Et(_l(n)?n:Te(n)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return t===""&&(t="0"),"0x"+t}const Dw="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const Lw=BigInt(58);function bS(n){const t=Yt(n);let e=al(t),r="";for(;e;)r=Dw[Number(e%Lw)]+r,e/=Lw;for(let i=0;i<t.length&&!t[i];i++)r=Dw[0]+r;return r}function yS(n){n=atob(n);const t=new Uint8Array(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return Yt(t)}function AS(n){const t=Yt(n);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}class jw{constructor(t,e,r){$(this,"filter");$(this,"emitter");et(this,$a);K(this,$a,e),Ct(this,{emitter:t,filter:r})}async removeListener(){m(this,$a)!=null&&await this.emitter.off(this.filter,m(this,$a))}}$a=new WeakMap;function mS(n,t,e,r,i){W(!1,`invalid codepoint at offset ${t}; ${n}`,"bytes",e)}function Vw(n,t,e,r,i){if(n==="BAD_PREFIX"||n==="UNEXPECTED_CONTINUE"){let _=0;for(let a=t+1;a<e.length&&e[a]>>6===2;a++)_++;return _}return n==="OVERRUN"?e.length-t-1:0}function SS(n,t,e,r,i){return n==="OVERLONG"?(W(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),Vw(n,t,e))}const RS=Object.freeze({error:mS,ignore:Vw,replace:SS});function ES(n,t){t==null&&(t=RS.error);const e=Yt(n,"bytes"),r=[];let i=0;for(;i<e.length;){const _=e[i++];if(_>>7===0){r.push(_);continue}let a=null,c=null;if((_&224)===192)a=1,c=127;else if((_&240)===224)a=2,c=2047;else if((_&248)===240)a=3,c=65535;else{(_&192)===128?i+=t("UNEXPECTED_CONTINUE",i-1,e,r):i+=t("BAD_PREFIX",i-1,e,r);continue}if(i-1+a>=e.length){i+=t("OVERRUN",i-1,e,r);continue}let u=_&(1<<8-a-1)-1;for(let l=0;l<a;l++){let f=e[i];if((f&192)!=128){i+=t("MISSING_CONTINUE",i,e,r),u=null;break}u=u<<6|f&63,i++}if(u!==null){if(u>1114111){i+=t("OUT_OF_RANGE",i-1-a,e,r,u);continue}if(u>=55296&&u<=57343){i+=t("UTF16_SURROGATE",i-1-a,e,r,u);continue}if(u<=c){i+=t("OVERLONG",i-1-a,e,r,u);continue}r.push(u)}}return r}function Ci(n,t){W(typeof n=="string","invalid string value","str",n);let e=[];for(let r=0;r<n.length;r++){const i=n.charCodeAt(r);if(i<128)e.push(i);else if(i<2048)e.push(i>>6|192),e.push(i&63|128);else if((i&64512)==55296){r++;const _=n.charCodeAt(r);W(r<n.length&&(_&64512)===56320,"invalid surrogate pair","str",n);const a=65536+((i&1023)<<10)+(_&1023);e.push(a>>18|240),e.push(a>>12&63|128),e.push(a>>6&63|128),e.push(a&63|128)}else e.push(i>>12|224),e.push(i>>6&63|128),e.push(i&63|128)}return new Uint8Array(e)}function PS(n){return n.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function Vu(n,t){return PS(ES(n,t))}function Yw(n){async function t(e,r){ht(r==null||!r.cancelled,"request cancelled before sending","CANCELLED");const i=e.url.split(":")[0].toLowerCase();ht(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ht(i==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let _=null;const a=new AbortController,c=setTimeout(()=>{_=ce("request timeout","TIMEOUT"),a.abort()},e.timeout);r&&r.addListener(()=>{_=ce("request cancelled","CANCELLED"),a.abort()});const u={method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:a.signal};let l;try{l=await fetch(e.url,u)}catch(v){throw clearTimeout(c),_||v}clearTimeout(c);const f={};l.headers.forEach((v,N)=>{f[N.toLowerCase()]=v});const d=await l.arrayBuffer(),y=d==null?null:new Uint8Array(d);return{statusCode:l.status,statusMessage:l.statusText,headers:f,body:y}}return t}const zS=12,vS=250;let Hw=Yw();const MS=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),BS=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let cl=!1;async function qw(n,t){try{const e=n.match(MS);if(!e)throw new Error("invalid data");return new ns(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?yS(e[3]):CS(e[3]))}catch{return new ns(599,"BAD REQUEST (invalid data: URI)",{},null,new Ii(n))}}function Qw(n){async function t(e,r){try{const i=e.match(BS);if(!i)throw new Error("invalid link");return new Ii(`${n}${i[2]}`)}catch{return new ns(599,"BAD REQUEST (invalid IPFS URI)",{},null,new Ii(e))}}return t}const Yu={data:qw,ipfs:Qw("https://gateway.ipfs.io/ipfs/")},Ww=new WeakMap;class xS{constructor(t){et(this,w_);et(this,hs);K(this,w_,[]),K(this,hs,!1),Ww.set(t,()=>{if(!m(this,hs)){K(this,hs,!0);for(const e of m(this,w_))setTimeout(()=>{e()},0);K(this,w_,[])}})}addListener(t){ht(!m(this,hs),"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),m(this,w_).push(t)}get cancelled(){return m(this,hs)}checkSignal(){ht(!this.cancelled,"cancelled","CANCELLED",{})}}w_=new WeakMap,hs=new WeakMap;function Hu(n){if(n==null)throw new Error("missing signal; should not happen");return n.checkSignal(),n}const jf=class jf{constructor(t){et(this,y_);et(this,Za);et(this,Xa);et(this,Br);et(this,Li);et(this,tc);et(this,ec);et(this,Pe);et(this,$e);et(this,ji);et(this,d_);et(this,g_);et(this,b_);et(this,Si);et(this,xr);et(this,ws);K(this,ec,String(t)),K(this,Za,!1),K(this,Xa,!0),K(this,Br,{}),K(this,Li,""),K(this,tc,3e5),K(this,xr,{slotInterval:vS,maxAttempts:zS}),K(this,ws,null)}get url(){return m(this,ec)}set url(t){K(this,ec,String(t))}get body(){return m(this,Pe)==null?null:new Uint8Array(m(this,Pe))}set body(t){if(t==null)K(this,Pe,void 0),K(this,$e,void 0);else if(typeof t=="string")K(this,Pe,Ci(t)),K(this,$e,"text/plain");else if(t instanceof Uint8Array)K(this,Pe,t),K(this,$e,"application/octet-stream");else if(typeof t=="object")K(this,Pe,Ci(JSON.stringify(t))),K(this,$e,"application/json");else throw new Error("invalid body")}hasBody(){return m(this,Pe)!=null}get method(){return m(this,Li)?m(this,Li):this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),K(this,Li,String(t).toUpperCase())}get headers(){const t=Object.assign({},m(this,Br));return m(this,ji)&&(t.authorization=`Basic ${AS(Ci(m(this,ji)))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&m(this,$e)&&(t["content-type"]=m(this,$e)),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){m(this,Br)[String(t).toLowerCase()]=String(e)}clearHeaders(){K(this,Br,{})}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return m(this,ji)||null}setCredentials(t,e){W(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),K(this,ji,`${t}:${e}`)}get allowGzip(){return m(this,Xa)}set allowGzip(t){K(this,Xa,!!t)}get allowInsecureAuthentication(){return!!m(this,Za)}set allowInsecureAuthentication(t){K(this,Za,!!t)}get timeout(){return m(this,tc)}set timeout(t){W(t>=0,"timeout must be non-zero","timeout",t),K(this,tc,t)}get preflightFunc(){return m(this,d_)||null}set preflightFunc(t){K(this,d_,t)}get processFunc(){return m(this,g_)||null}set processFunc(t){K(this,g_,t)}get retryFunc(){return m(this,b_)||null}set retryFunc(t){K(this,b_,t)}get getUrlFunc(){return m(this,ws)||Hw}set getUrlFunc(t){K(this,ws,t)}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${m(this,Pe)?Et(m(this,Pe)):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(m(this,xr).slotInterval=t.slotInterval),t.maxAttempts!=null&&(m(this,xr).maxAttempts=t.maxAttempts)}send(){return ht(m(this,Si)==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),K(this,Si,new xS(this)),At(this,y_,Uu).call(this,0,Jw()+this.timeout,0,this,new ns(0,"",{},null,this))}cancel(){ht(m(this,Si)!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=Ww.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),r=t.split(":")[0].toLowerCase();ht(this.method==="GET"&&(e!=="https"||r!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const i=new jf(t);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,K(i,Br,Object.assign({},m(this,Br))),m(this,Pe)&&K(i,Pe,new Uint8Array(m(this,Pe))),K(i,$e,m(this,$e)),i}clone(){const t=new jf(this.url);return K(t,Li,m(this,Li)),m(this,Pe)&&K(t,Pe,m(this,Pe)),K(t,$e,m(this,$e)),K(t,Br,Object.assign({},m(this,Br))),K(t,ji,m(this,ji)),this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),K(t,d_,m(this,d_)),K(t,g_,m(this,g_)),K(t,b_,m(this,b_)),K(t,xr,Object.assign({},m(this,xr))),K(t,ws,m(this,ws)),t}static lockConfig(){cl=!0}static getGateway(t){return Yu[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(cl)throw new Error("gateways locked");Yu[t]=e}static registerGetUrl(t){if(cl)throw new Error("gateways locked");Hw=t}static createGetUrlFunc(t){return Yw()}static createDataGateway(){return qw}static createIpfsGatewayFunc(t){return Qw(t)}};Za=new WeakMap,Xa=new WeakMap,Br=new WeakMap,Li=new WeakMap,tc=new WeakMap,ec=new WeakMap,Pe=new WeakMap,$e=new WeakMap,ji=new WeakMap,d_=new WeakMap,g_=new WeakMap,b_=new WeakMap,Si=new WeakMap,xr=new WeakMap,ws=new WeakMap,y_=new WeakSet,Uu=async function(t,e,r,i,_){var f,d,y;if(t>=m(this,xr).maxAttempts)return _.makeServerError("exceeded maximum retry limit");ht(Jw()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await IS(r);let a=this.clone();const c=(a.url.split(":")[0]||"").toLowerCase();if(c in Yu){const v=await Yu[c](a.url,Hu(m(i,Si)));if(v instanceof ns){let N=v;if(this.processFunc){Hu(m(i,Si));try{N=await this.processFunc(a,N)}catch(I){(I.throttle==null||typeof I.stall!="number")&&N.makeServerError("error in post-processing function",I).assertOk()}}return N}a=v}this.preflightFunc&&(a=await this.preflightFunc(a));const u=await this.getUrlFunc(a,Hu(m(i,Si)));let l=new ns(u.statusCode,u.statusMessage,u.headers,u.body,i);if(l.statusCode===301||l.statusCode===302){try{const v=l.headers.location||"";return At(f=a.redirect(v),y_,Uu).call(f,t+1,e,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,l,t))){const v=l.headers["retry-after"];let N=m(this,xr).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof v=="string"&&v.match(/^[1-9][0-9]*$/)&&(N=parseInt(v)),At(d=a.clone(),y_,Uu).call(d,t+1,e,N,i,l)}if(this.processFunc){Hu(m(i,Si));try{l=await this.processFunc(a,l)}catch(v){(v.throttle==null||typeof v.stall!="number")&&l.makeServerError("error in post-processing function",v).assertOk();let N=m(this,xr).slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return v.stall>=0&&(N=v.stall),At(y=a.clone(),y_,Uu).call(y,t+1,e,N,i,l)}}return l};let Ii=jf;const nw=class nw{constructor(t,e,r,i,_){et(this,Su);et(this,Ru);et(this,Eu);et(this,Ze);et(this,rc);et(this,A_);K(this,Su,t),K(this,Ru,e),K(this,Eu,Object.keys(r).reduce((a,c)=>(a[c.toLowerCase()]=String(r[c]),a),{})),K(this,Ze,i==null?null:new Uint8Array(i)),K(this,rc,_||null),K(this,A_,{message:""})}toString(){return`<FetchResponse status=${this.statusCode} body=${m(this,Ze)?Et(m(this,Ze)):"null"}>`}get statusCode(){return m(this,Su)}get statusMessage(){return m(this,Ru)}get headers(){return Object.assign({},m(this,Eu))}get body(){return m(this,Ze)==null?null:new Uint8Array(m(this,Ze))}get bodyText(){try{return m(this,Ze)==null?"":Vu(m(this,Ze))}catch{ht(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ht(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}makeServerError(t,e){let r;t?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${t})`);const i=new nw(599,r,this.headers,this.body,m(this,rc)||void 0);return K(i,A_,{message:t,error:e}),i}throwThrottleError(t,e){e==null?e=-1:W(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const r=new Error(t||"throttling requests");throw Ct(r,{stall:e,throttle:!0}),r}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return m(this,Ze)!=null}get request(){return m(this,rc)}ok(){return m(this,A_).message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=m(this,A_);t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{m(this,Ze)&&(i=Vu(m(this,Ze)))}catch{}ht(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}};Su=new WeakMap,Ru=new WeakMap,Eu=new WeakMap,Ze=new WeakMap,rc=new WeakMap,A_=new WeakMap;let ns=nw;function Jw(){return new Date().getTime()}function CS(n){return Ci(n.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function IS(n){return new Promise(t=>setTimeout(t,n))}function NS(n){let t=n.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function $w(n,t,e){let r=0;for(let i=0;i<e;i++)r=r*256+n[t+i];return r}function Zw(n,t,e,r){const i=[];for(;e<t+1+r;){const _=Xw(n,e);i.push(_.result),e+=_.consumed,ht(e<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:n,length:r,offset:t})}return{consumed:1+r,result:i}}function Xw(n,t){ht(n.length!==0,"data too short","BUFFER_OVERRUN",{buffer:n,length:0,offset:1});const e=r=>{ht(r<=n.length,"data short segment too short","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r})};if(n[t]>=248){const r=n[t]-247;e(t+1+r);const i=$w(n,t+1,r);return e(t+1+r+i),Zw(n,t,t+1+r,r+i)}else if(n[t]>=192){const r=n[t]-192;return e(t+1+r),Zw(n,t,t+1,r)}else if(n[t]>=184){const r=n[t]-183;e(t+1+r);const i=$w(n,t+1,r);e(t+1+r+i);const _=Et(n.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:_}}else if(n[t]>=128){const r=n[t]-128;e(t+1+r);const i=Et(n.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:NS(n[t])}}function qu(n){const t=Yt(n,"data"),e=Xw(t,0);return W(e.consumed===t.length,"unexpected junk after rlp payload","data",n),e.result}function td(n){const t=[];for(;n;)t.unshift(n&255),n>>=8;return t}function ed(n){if(Array.isArray(n)){let r=[];if(n.forEach(function(_){r=r.concat(ed(_))}),r.length<=55)return r.unshift(192+r.length),r;const i=td(r.length);return i.unshift(247+i.length),i.concat(r)}const t=Array.prototype.slice.call(Yt(n,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=td(t.length);return e.unshift(183+e.length),e.concat(t)}const rd="0123456789abcdef";function ks(n){let t="0x";for(const e of ed(n))t+=rd[e>>4],t+=rd[e&15];return t}const Ge=32,ul=new Uint8Array(Ge),OS=["then"],Qu={},nd=new WeakMap;function Ts(n){return nd.get(n)}function id(n,t){nd.set(n,t)}function jc(n,t){const e=new Error(`deferred error during ABI decoding triggered accessing ${n}`);throw e.error=t,e}function fl(n,t,e){return n.indexOf(null)>=0?t.map((r,i)=>r instanceof V_?fl(Ts(r),r,e):r):n.reduce((r,i,_)=>{let a=t.getValue(i);return i in r||(e&&a instanceof V_&&(a=fl(Ts(a),a,e)),r[i]=a),r},{})}const ic=class ic extends Array{constructor(...e){const r=e[0];let i=e[1],_=(e[2]||[]).slice(),a=!0;r!==Qu&&(i=e,_=[],a=!1);super(i.length);et(this,nc);i.forEach((l,f)=>{this[f]=l});const c=_.reduce((l,f)=>(typeof f=="string"&&l.set(f,(l.get(f)||0)+1),l),new Map);if(id(this,Object.freeze(i.map((l,f)=>{const d=_[f];return d!=null&&c.get(d)===1?d:null}))),K(this,nc,[]),m(this,nc)==null&&m(this,nc),!a)return;Object.freeze(this);const u=new Proxy(this,{get:(l,f,d)=>{if(typeof f=="string"){if(f.match(/^[0-9]+$/)){const v=Kt(f,"%index");if(v<0||v>=this.length)throw new RangeError("out of result range");const N=l[v];return N instanceof Error&&jc(`index ${v}`,N),N}if(OS.indexOf(f)>=0)return Reflect.get(l,f,d);const y=l[f];if(y instanceof Function)return function(...v){return y.apply(this===d?l:this,v)};if(!(f in l))return l.getValue.apply(this===d?l:this,[f])}return Reflect.get(l,f,d)}});return id(u,Ts(this)),u}toArray(e){const r=[];return this.forEach((i,_)=>{i instanceof Error&&jc(`index ${_}`,i),e&&i instanceof ic&&(i=i.toArray(e)),r.push(i)}),r}toObject(e){const r=Ts(this);return r.reduce((i,_,a)=>(ht(_!=null,`value at index ${a} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),fl(r,this,e)),{})}slice(e,r){e==null&&(e=0),e<0&&(e+=this.length,e<0&&(e=0)),r==null&&(r=this.length),r<0&&(r+=this.length,r<0&&(r=0)),r>this.length&&(r=this.length);const i=Ts(this),_=[],a=[];for(let c=e;c<r;c++)_.push(this[c]),a.push(i[c]);return new ic(Qu,_,a)}filter(e,r){const i=Ts(this),_=[],a=[];for(let c=0;c<this.length;c++){const u=this[c];u instanceof Error&&jc(`index ${c}`,u),e.call(r,u,c,this)&&(_.push(u),a.push(i[c]))}return new ic(Qu,_,a)}map(e,r){const i=[];for(let _=0;_<this.length;_++){const a=this[_];a instanceof Error&&jc(`index ${_}`,a),i.push(e.call(r,a,_,this))}return i}getValue(e){const r=Ts(this).indexOf(e);if(r===-1)return;const i=this[r];return i instanceof Error&&jc(`property ${JSON.stringify(e)}`,i.error),i}static fromItems(e,r){return new ic(Qu,e,r)}};nc=new WeakMap;let V_=ic;function sd(n){let t=Te(n);return ht(t.length<=Ge,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:Ge,offset:t.length}),t.length!==Ge&&(t=ke(fe([ul.slice(t.length%Ge),t]))),t}class Ni{constructor(t,e,r,i){$(this,"name");$(this,"type");$(this,"localName");$(this,"dynamic");Ct(this,{name:t,type:e,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(t,e){W(!1,t,this.localName,e)}}class ll{constructor(){et(this,sc);et(this,Vi);et(this,m_);K(this,Vi,[]),K(this,m_,0)}get data(){return fe(m(this,Vi))}get length(){return m(this,m_)}appendWriter(t){return At(this,sc,Jf).call(this,ke(t.data))}writeBytes(t){let e=ke(t);const r=e.length%Ge;return r&&(e=ke(fe([e,ul.slice(r)]))),At(this,sc,Jf).call(this,e)}writeValue(t){return At(this,sc,Jf).call(this,sd(t))}writeUpdatableValue(){const t=m(this,Vi).length;return m(this,Vi).push(ul),K(this,m_,m(this,m_)+Ge),e=>{m(this,Vi)[t]=sd(e)}}}Vi=new WeakMap,m_=new WeakMap,sc=new WeakSet,Jf=function(t){return m(this,Vi).push(t),K(this,m_,m(this,m_)+t.length),t.length};const iw=class iw{constructor(t,e,r){et(this,E_);$(this,"allowLoose");et(this,Ye);et(this,Xe);et(this,S_);et(this,R_);et(this,ds);Ct(this,{allowLoose:!!e}),K(this,Ye,ke(t)),K(this,S_,0),K(this,R_,null),K(this,ds,r??1024),K(this,Xe,0)}get data(){return Et(m(this,Ye))}get dataLength(){return m(this,Ye).length}get consumed(){return m(this,Xe)}get bytes(){return new Uint8Array(m(this,Ye))}subReader(t){const e=new iw(m(this,Ye).slice(m(this,Xe)+t),this.allowLoose,m(this,ds));return K(e,R_,this),e}readBytes(t,e){let r=At(this,E_,Xm).call(this,0,t,!!e);return At(this,E_,zw).call(this,t),K(this,Xe,m(this,Xe)+r.length),r.slice(0,t)}readValue(){return al(this.readBytes(Ge))}readIndex(){return gS(this.readBytes(Ge))}};Ye=new WeakMap,Xe=new WeakMap,S_=new WeakMap,R_=new WeakMap,ds=new WeakMap,E_=new WeakSet,zw=function(t){var e;if(m(this,R_))return At(e=m(this,R_),E_,zw).call(e,t);K(this,S_,m(this,S_)+t),ht(m(this,ds)<1||m(this,S_)<=m(this,ds)*this.dataLength,`compressed ABI data exceeds inflation ratio of ${m(this,ds)} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ke(m(this,Ye)),offset:m(this,Xe),length:t,info:{bytesRead:m(this,S_),dataLength:this.dataLength}})},Xm=function(t,e,r){let i=Math.ceil(e/Ge)*Ge;return m(this,Xe)+i>m(this,Ye).length&&(this.allowLoose&&r&&m(this,Xe)+e<=m(this,Ye).length?i=e:ht(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ke(m(this,Ye)),length:m(this,Ye).length,offset:m(this,Xe)+i})),m(this,Ye).slice(m(this,Xe),m(this,Xe)+i)};let pl=iw;function Wu(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function hl(n,...t){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(n.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${n.length}`)}function kS(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");Wu(n.outputLen),Wu(n.blockLen)}function Y_(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function _d(n,t){hl(n);const e=t.outputLen;if(n.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const wl=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const od=n=>n instanceof Uint8Array,TS=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),dl=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),kr=(n,t)=>n<<32-t|n>>>t;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function GS(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function Ju(n){if(typeof n=="string"&&(n=GS(n)),!od(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function US(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!od(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}class gl{clone(){return this._cloneInto()}}function bl(n){const t=r=>n().update(Ju(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function FS(n=32){if(wl&&typeof wl.getRandomValues=="function")return wl.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}class ad extends gl{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,kS(t);const r=Ju(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,_=new Uint8Array(i);_.set(r.length>i?t.create().update(r).digest():r);for(let a=0;a<_.length;a++)_[a]^=54;this.iHash.update(_),this.oHash=t.create();for(let a=0;a<_.length;a++)_[a]^=106;this.oHash.update(_),_.fill(0)}update(t){return Y_(this),this.iHash.update(t),this}digestInto(t){Y_(this),hl(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:_,blockLen:a,outputLen:c}=this;return t=t,t.finished=i,t.destroyed=_,t.blockLen=a,t.outputLen=c,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const cd=(n,t,e)=>new ad(n,t).update(e).digest();cd.create=(n,t)=>new ad(n,t);function KS(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),_=BigInt(4294967295),a=Number(e>>i&_),c=Number(e&_),u=r?4:0,l=r?0:4;n.setUint32(t+u,a,r),n.setUint32(t+l,c,r)}class ud extends gl{constructor(t,e,r,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=dl(this.buffer)}update(t){Y_(this);const{view:e,buffer:r,blockLen:i}=this;t=Ju(t);const _=t.length;for(let a=0;a<_;){const c=Math.min(i-this.pos,_-a);if(c===i){const u=dl(t);for(;i<=_-a;a+=i)this.process(u,a);continue}r.set(t.subarray(a,a+c),this.pos),this.pos+=c,a+=c,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Y_(this),_d(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:_}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let d=a;d<i;d++)e[d]=0;KS(r,i-8,BigInt(this.length*8),_),this.process(r,0);const c=dl(t),u=this.outputLen;if(u%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=u/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let d=0;d<l;d++)c.setUint32(4*d,f[d],_)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:_,destroyed:a,pos:c}=this;return t.length=i,t.pos=c,t.finished=_,t.destroyed=a,i%e&&t.buffer.set(r),t}}const DS=(n,t,e)=>n&t^~n&e,LS=(n,t,e)=>n&t^n&e^t&e,jS=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),is=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ss=new Uint32Array(64);class VS extends ud{constructor(){super(64,32,8,!1),this.A=is[0]|0,this.B=is[1]|0,this.C=is[2]|0,this.D=is[3]|0,this.E=is[4]|0,this.F=is[5]|0,this.G=is[6]|0,this.H=is[7]|0}get(){const{A:t,B:e,C:r,D:i,E:_,F:a,G:c,H:u}=this;return[t,e,r,i,_,a,c,u]}set(t,e,r,i,_,a,c,u){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=_|0,this.F=a|0,this.G=c|0,this.H=u|0}process(t,e){for(let d=0;d<16;d++,e+=4)ss[d]=t.getUint32(e,!1);for(let d=16;d<64;d++){const y=ss[d-15],v=ss[d-2],N=kr(y,7)^kr(y,18)^y>>>3,I=kr(v,17)^kr(v,19)^v>>>10;ss[d]=I+ss[d-7]+N+ss[d-16]|0}let{A:r,B:i,C:_,D:a,E:c,F:u,G:l,H:f}=this;for(let d=0;d<64;d++){const y=kr(c,6)^kr(c,11)^kr(c,25),v=f+y+DS(c,u,l)+jS[d]+ss[d]|0,I=(kr(r,2)^kr(r,13)^kr(r,22))+LS(r,i,_)|0;f=l,l=u,u=c,c=a+v|0,a=_,_=i,i=r,r=v+I|0}r=r+this.A|0,i=i+this.B|0,_=_+this.C|0,a=a+this.D|0,c=c+this.E|0,u=u+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,i,_,a,c,u,l,f)}roundClean(){ss.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const fd=bl(()=>new VS),$u=BigInt(2**32-1),yl=BigInt(32);function ld(n,t=!1){return t?{h:Number(n&$u),l:Number(n>>yl&$u)}:{h:Number(n>>yl&$u)|0,l:Number(n&$u)|0}}function pd(n,t=!1){let e=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let i=0;i<n.length;i++){const{h:_,l:a}=ld(n[i],t);[e[i],r[i]]=[_,a]}return[e,r]}const YS=(n,t)=>BigInt(n>>>0)<<yl|BigInt(t>>>0),HS=(n,t,e)=>n>>>e,qS=(n,t,e)=>n<<32-e|t>>>e,QS=(n,t,e)=>n>>>e|t<<32-e,WS=(n,t,e)=>n<<32-e|t>>>e,JS=(n,t,e)=>n<<64-e|t>>>e-32,$S=(n,t,e)=>n>>>e-32|t<<64-e,ZS=(n,t)=>t,XS=(n,t)=>n,hd=(n,t,e)=>n<<e|t>>>32-e,wd=(n,t,e)=>t<<e|n>>>32-e,dd=(n,t,e)=>t<<e-32|n>>>64-e,gd=(n,t,e)=>n<<e-32|t>>>64-e;function tR(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const Ut={fromBig:ld,split:pd,toBig:YS,shrSH:HS,shrSL:qS,rotrSH:QS,rotrSL:WS,rotrBH:JS,rotrBL:$S,rotr32H:ZS,rotr32L:XS,rotlSH:hd,rotlSL:wd,rotlBH:dd,rotlBL:gd,add:tR,add3L:(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),add3H:(n,t,e,r)=>t+e+r+(n/2**32|0)|0,add4L:(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),add4H:(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,add5H:(n,t,e,r,i,_)=>t+e+r+i+_+(n/2**32|0)|0,add5L:(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0)},[eR,rR]=Ut.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),_s=new Uint32Array(80),os=new Uint32Array(80);class nR extends ud{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:_,Cl:a,Dh:c,Dl:u,Eh:l,El:f,Fh:d,Fl:y,Gh:v,Gl:N,Hh:I,Hl:U}=this;return[t,e,r,i,_,a,c,u,l,f,d,y,v,N,I,U]}set(t,e,r,i,_,a,c,u,l,f,d,y,v,N,I,U){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=_|0,this.Cl=a|0,this.Dh=c|0,this.Dl=u|0,this.Eh=l|0,this.El=f|0,this.Fh=d|0,this.Fl=y|0,this.Gh=v|0,this.Gl=N|0,this.Hh=I|0,this.Hl=U|0}process(t,e){for(let O=0;O<16;O++,e+=4)_s[O]=t.getUint32(e),os[O]=t.getUint32(e+=4);for(let O=16;O<80;O++){const C=_s[O-15]|0,k=os[O-15]|0,D=Ut.rotrSH(C,k,1)^Ut.rotrSH(C,k,8)^Ut.shrSH(C,k,7),L=Ut.rotrSL(C,k,1)^Ut.rotrSL(C,k,8)^Ut.shrSL(C,k,7),V=_s[O-2]|0,tt=os[O-2]|0,rt=Ut.rotrSH(V,tt,19)^Ut.rotrBH(V,tt,61)^Ut.shrSH(V,tt,6),wt=Ut.rotrSL(V,tt,19)^Ut.rotrBL(V,tt,61)^Ut.shrSL(V,tt,6),j=Ut.add4L(L,wt,os[O-7],os[O-16]),Pt=Ut.add4H(j,D,rt,_s[O-7],_s[O-16]);_s[O]=Pt|0,os[O]=j|0}let{Ah:r,Al:i,Bh:_,Bl:a,Ch:c,Cl:u,Dh:l,Dl:f,Eh:d,El:y,Fh:v,Fl:N,Gh:I,Gl:U,Hh:z,Hl:B}=this;for(let O=0;O<80;O++){const C=Ut.rotrSH(d,y,14)^Ut.rotrSH(d,y,18)^Ut.rotrBH(d,y,41),k=Ut.rotrSL(d,y,14)^Ut.rotrSL(d,y,18)^Ut.rotrBL(d,y,41),D=d&v^~d&I,L=y&N^~y&U,V=Ut.add5L(B,k,L,rR[O],os[O]),tt=Ut.add5H(V,z,C,D,eR[O],_s[O]),rt=V|0,wt=Ut.rotrSH(r,i,28)^Ut.rotrBH(r,i,34)^Ut.rotrBH(r,i,39),j=Ut.rotrSL(r,i,28)^Ut.rotrBL(r,i,34)^Ut.rotrBL(r,i,39),Pt=r&_^r&c^_&c,xt=i&a^i&u^a&u;z=I|0,B=U|0,I=v|0,U=N|0,v=d|0,N=y|0,{h:d,l:y}=Ut.add(l|0,f|0,tt|0,rt|0),l=c|0,f=u|0,c=_|0,u=a|0,_=r|0,a=i|0;const ft=Ut.add3L(rt,j,xt);r=Ut.add3H(ft,tt,wt,Pt),i=ft|0}({h:r,l:i}=Ut.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:_,l:a}=Ut.add(this.Bh|0,this.Bl|0,_|0,a|0),{h:c,l:u}=Ut.add(this.Ch|0,this.Cl|0,c|0,u|0),{h:l,l:f}=Ut.add(this.Dh|0,this.Dl|0,l|0,f|0),{h:d,l:y}=Ut.add(this.Eh|0,this.El|0,d|0,y|0),{h:v,l:N}=Ut.add(this.Fh|0,this.Fl|0,v|0,N|0),{h:I,l:U}=Ut.add(this.Gh|0,this.Gl|0,I|0,U|0),{h:z,l:B}=Ut.add(this.Hh|0,this.Hl|0,z|0,B|0),this.set(r,i,_,a,c,u,l,f,d,y,v,N,I,U,z,B)}roundClean(){_s.fill(0),os.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const iR=bl(()=>new nR);function sR(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof re<"u")return re;throw new Error("unable to locate global object")}const bd=sR();bd.crypto||bd.msCrypto;function _R(n){switch(n){case"sha256":return fd.create();case"sha512":return iR.create()}W(!1,"invalid hashing algorithm name","algorithm",n)}const[yd,Ad,md]=[[],[],[]],oR=BigInt(0),Vc=BigInt(1),aR=BigInt(2),cR=BigInt(7),uR=BigInt(256),fR=BigInt(113);for(let n=0,t=Vc,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],yd.push(2*(5*r+e)),Ad.push((n+1)*(n+2)/2%64);let i=oR;for(let _=0;_<7;_++)t=(t<<Vc^(t>>cR)*fR)%uR,t&aR&&(i^=Vc<<(Vc<<BigInt(_))-Vc);md.push(i)}const[lR,pR]=pd(md,!0),Sd=(n,t,e)=>e>32?dd(n,t,e):hd(n,t,e),Rd=(n,t,e)=>e>32?gd(n,t,e):wd(n,t,e);function hR(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)e[a]=n[a]^n[a+10]^n[a+20]^n[a+30]^n[a+40];for(let a=0;a<10;a+=2){const c=(a+8)%10,u=(a+2)%10,l=e[u],f=e[u+1],d=Sd(l,f,1)^e[c],y=Rd(l,f,1)^e[c+1];for(let v=0;v<50;v+=10)n[a+v]^=d,n[a+v+1]^=y}let i=n[2],_=n[3];for(let a=0;a<24;a++){const c=Ad[a],u=Sd(i,_,c),l=Rd(i,_,c),f=yd[a];i=n[f],_=n[f+1],n[f]=u,n[f+1]=l}for(let a=0;a<50;a+=10){for(let c=0;c<10;c++)e[c]=n[a+c];for(let c=0;c<10;c++)n[a+c]^=~e[(c+2)%10]&e[(c+4)%10]}n[0]^=lR[r],n[1]^=pR[r]}e.fill(0)}class Al extends gl{constructor(t,e,r,i=!1,_=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=_,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,Wu(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=TS(this.state)}keccak(){hR(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Y_(this);const{blockLen:e,state:r}=this;t=Ju(t);const i=t.length;for(let _=0;_<i;){const a=Math.min(e-this.pos,i-_);for(let c=0;c<a;c++)r[this.pos++]^=t[_++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,(e&128)!==0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){Y_(this,!1),hl(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,_=t.length;i<_;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,_-i);t.set(e.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return Wu(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(_d(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:_,enableXOF:a}=this;return t||(t=new Al(e,r,i,a,_)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=_,t.suffix=r,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}}const wR=((n,t,e)=>bl(()=>new Al(t,n,e)))(1,136,256/8);let Ed=!1;const Pd=function(n){return wR(n)};let zd=Pd;function ge(n){const t=Yt(n,"data");return Et(zd(t))}ge._=Pd,ge.lock=function(){Ed=!0},ge.register=function(n){if(Ed)throw new TypeError("keccak256 is locked");zd=n},Object.freeze(ge);const vd=function(n){return _R("sha256").update(n).digest()};let Md=vd,Bd=!1;function H_(n){const t=Yt(n,"data");return Et(Md(t))}H_._=vd,H_.lock=function(){Bd=!0},H_.register=function(n){if(Bd)throw new Error("sha256 is locked");Md=n},Object.freeze(H_),Object.freeze(H_);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const xd=BigInt(0),Zu=BigInt(1),dR=BigInt(2),Xu=n=>n instanceof Uint8Array,gR=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function q_(n){if(!Xu(n))throw new Error("Uint8Array expected");let t="";for(let e=0;e<n.length;e++)t+=gR[n[e]];return t}function Cd(n){const t=n.toString(16);return t.length&1?`0${t}`:t}function ml(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return BigInt(n===""?"0":`0x${n}`)}function Q_(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);const t=n.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let r=0;r<e.length;r++){const i=r*2,_=n.slice(i,i+2),a=Number.parseInt(_,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");e[r]=a}return e}function Gs(n){return ml(q_(n))}function Sl(n){if(!Xu(n))throw new Error("Uint8Array expected");return ml(q_(Uint8Array.from(n).reverse()))}function W_(n,t){return Q_(n.toString(16).padStart(t*2,"0"))}function Rl(n,t){return W_(n,t).reverse()}function bR(n){return Q_(Cd(n))}function mr(n,t,e){let r;if(typeof t=="string")try{r=Q_(t)}catch(_){throw new Error(`${n} must be valid hex string, got "${t}". Cause: ${_}`)}else if(Xu(t))r=Uint8Array.from(t);else throw new Error(`${n} must be hex string or Uint8Array`);const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(`${n} expected ${e} bytes, got ${i}`);return r}function Yc(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!Xu(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}function yR(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function AR(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function mR(n){let t;for(t=0;n>xd;n>>=Zu,t+=1);return t}function SR(n,t){return n>>BigInt(t)&Zu}const RR=(n,t,e)=>n|(e?Zu:xd)<<BigInt(t),El=n=>(dR<<BigInt(n-1))-Zu,Pl=n=>new Uint8Array(n),Id=n=>Uint8Array.from(n);function Nd(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Pl(n),i=Pl(n),_=0;const a=()=>{r.fill(1),i.fill(0),_=0},c=(...d)=>e(i,r,...d),u=(d=Pl())=>{i=c(Id([0]),d),r=c(),d.length!==0&&(i=c(Id([1]),d),r=c())},l=()=>{if(_++>=1e3)throw new Error("drbg: tried 1000 values");let d=0;const y=[];for(;d<t;){r=c();const v=r.slice();y.push(v),d+=r.length}return Yc(...y)};return(d,y)=>{a(),u(d);let v;for(;!(v=y(l()));)u();return a(),v}}const ER={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||n instanceof Uint8Array,isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,t)=>t.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function Hc(n,t,e={}){const r=(i,_,a)=>{const c=ER[_];if(typeof c!="function")throw new Error(`Invalid validator "${_}", expected function`);const u=n[i];if(!(a&&u===void 0)&&!c(u,n))throw new Error(`Invalid param ${String(i)}=${u} (${typeof u}), expected ${_}`)};for(const[i,_]of Object.entries(t))r(i,_,!1);for(const[i,_]of Object.entries(e))r(i,_,!0);return n}const PR=Object.freeze(Object.defineProperty({__proto__:null,bitGet:SR,bitLen:mR,bitMask:El,bitSet:RR,bytesToHex:q_,bytesToNumberBE:Gs,bytesToNumberLE:Sl,concatBytes:Yc,createHmacDrbg:Nd,ensureBytes:mr,equalBytes:yR,hexToBytes:Q_,hexToNumber:ml,numberToBytesBE:W_,numberToBytesLE:Rl,numberToHexUnpadded:Cd,numberToVarBytesBE:bR,utf8ToBytes:AR,validateObject:Hc},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Re=BigInt(0),le=BigInt(1),Us=BigInt(2),zR=BigInt(3),zl=BigInt(4),Od=BigInt(5),kd=BigInt(8);BigInt(9),BigInt(16);function Le(n,t){const e=n%t;return e>=Re?e:t+e}function vR(n,t,e){if(e<=Re||t<Re)throw new Error("Expected power/modulo > 0");if(e===le)return Re;let r=le;for(;t>Re;)t&le&&(r=r*n%e),n=n*n%e,t>>=le;return r}function nr(n,t,e){let r=n;for(;t-- >Re;)r*=r,r%=e;return r}function vl(n,t){if(n===Re||t<=Re)throw new Error(`invert: expected positive integers, got n=${n} mod=${t}`);let e=Le(n,t),r=t,i=Re,_=le;for(;e!==Re;){const c=r/e,u=r%e,l=i-_*c;r=e,e=u,i=_,_=l}if(r!==le)throw new Error("invert: does not exist");return Le(i,t)}function MR(n){const t=(n-le)/Us;let e,r,i;for(e=n-le,r=0;e%Us===Re;e/=Us,r++);for(i=Us;i<n&&vR(i,t,n)!==n-le;i++);if(r===1){const a=(n+le)/zl;return function(u,l){const f=u.pow(l,a);if(!u.eql(u.sqr(f),l))throw new Error("Cannot find square root");return f}}const _=(e+le)/Us;return function(c,u){if(c.pow(u,t)===c.neg(c.ONE))throw new Error("Cannot find square root");let l=r,f=c.pow(c.mul(c.ONE,i),e),d=c.pow(u,_),y=c.pow(u,e);for(;!c.eql(y,c.ONE);){if(c.eql(y,c.ZERO))return c.ZERO;let v=1;for(let I=c.sqr(y);v<l&&!c.eql(I,c.ONE);v++)I=c.sqr(I);const N=c.pow(f,le<<BigInt(l-v-1));f=c.sqr(N),d=c.mul(d,N),y=c.mul(y,f),l=v}return d}}function BR(n){if(n%zl===zR){const t=(n+le)/zl;return function(r,i){const _=r.pow(i,t);if(!r.eql(r.sqr(_),i))throw new Error("Cannot find square root");return _}}if(n%kd===Od){const t=(n-Od)/kd;return function(r,i){const _=r.mul(i,Us),a=r.pow(_,t),c=r.mul(i,a),u=r.mul(r.mul(c,Us),a),l=r.mul(c,r.sub(u,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return MR(n)}const xR=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function CR(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=xR.reduce((r,i)=>(r[i]="function",r),t);return Hc(n,e)}function IR(n,t,e){if(e<Re)throw new Error("Expected power > 0");if(e===Re)return n.ONE;if(e===le)return t;let r=n.ONE,i=t;for(;e>Re;)e&le&&(r=n.mul(r,i)),i=n.sqr(i),e>>=le;return r}function NR(n,t){const e=new Array(t.length),r=t.reduce((_,a,c)=>n.is0(a)?_:(e[c]=_,n.mul(_,a)),n.ONE),i=n.inv(r);return t.reduceRight((_,a,c)=>n.is0(a)?_:(e[c]=n.mul(_,e[c]),n.mul(_,a)),i),e}function Td(n,t){const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function OR(n,t,e=!1,r={}){if(n<=Re)throw new Error(`Expected Field ORDER > 0, got ${n}`);const{nBitLength:i,nByteLength:_}=Td(n,t);if(_>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=BR(n),c=Object.freeze({ORDER:n,BITS:i,BYTES:_,MASK:El(i),ZERO:Re,ONE:le,create:u=>Le(u,n),isValid:u=>{if(typeof u!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof u}`);return Re<=u&&u<n},is0:u=>u===Re,isOdd:u=>(u&le)===le,neg:u=>Le(-u,n),eql:(u,l)=>u===l,sqr:u=>Le(u*u,n),add:(u,l)=>Le(u+l,n),sub:(u,l)=>Le(u-l,n),mul:(u,l)=>Le(u*l,n),pow:(u,l)=>IR(c,u,l),div:(u,l)=>Le(u*vl(l,n),n),sqrN:u=>u*u,addN:(u,l)=>u+l,subN:(u,l)=>u-l,mulN:(u,l)=>u*l,inv:u=>vl(u,n),sqrt:r.sqrt||(u=>a(c,u)),invertBatch:u=>NR(c,u),cmov:(u,l,f)=>f?l:u,toBytes:u=>e?Rl(u,_):W_(u,_),fromBytes:u=>{if(u.length!==_)throw new Error(`Fp.fromBytes: expected ${_}, got ${u.length}`);return e?Sl(u):Gs(u)}});return Object.freeze(c)}function Gd(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function Ud(n){const t=Gd(n);return t+Math.ceil(t/2)}function kR(n,t,e=!1){const r=n.length,i=Gd(t),_=Ud(t);if(r<16||r<_||r>1024)throw new Error(`expected ${_}-1024 bytes of input, got ${r}`);const a=e?Gs(n):Sl(n),c=Le(a,t-le)+le;return e?Rl(c,i):W_(c,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const TR=BigInt(0),Ml=BigInt(1);function GR(n,t){const e=(i,_)=>{const a=_.negate();return i?a:_},r=i=>{const _=Math.ceil(t/i)+1,a=2**(i-1);return{windows:_,windowSize:a}};return{constTimeNegate:e,unsafeLadder(i,_){let a=n.ZERO,c=i;for(;_>TR;)_&Ml&&(a=a.add(c)),c=c.double(),_>>=Ml;return a},precomputeWindow(i,_){const{windows:a,windowSize:c}=r(_),u=[];let l=i,f=l;for(let d=0;d<a;d++){f=l,u.push(f);for(let y=1;y<c;y++)f=f.add(l),u.push(f);l=f.double()}return u},wNAF(i,_,a){const{windows:c,windowSize:u}=r(i);let l=n.ZERO,f=n.BASE;const d=BigInt(2**i-1),y=2**i,v=BigInt(i);for(let N=0;N<c;N++){const I=N*u;let U=Number(a&d);a>>=v,U>u&&(U-=y,a+=Ml);const z=I,B=I+Math.abs(U)-1,O=N%2!==0,C=U<0;U===0?f=f.add(e(O,_[z])):l=l.add(e(C,_[B]))}return{p:l,f}},wNAFCached(i,_,a,c){const u=i._WINDOW_SIZE||1;let l=_.get(i);return l||(l=this.precomputeWindow(i,u),u!==1&&_.set(i,c(l))),this.wNAF(u,l,a)}}}function Fd(n){return CR(n.Fp),Hc(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...Td(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function UR(n){const t=Fd(n);Hc(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:i}=t;if(e){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:FR,hexToBytes:KR}=PR,Fs={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(n){const{Err:t}=Fs;if(n.length<2||n[0]!==2)throw new t("Invalid signature integer tag");const e=n[1],r=n.subarray(2,e+2);if(!e||r.length!==e)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:FR(r),l:n.subarray(e+2)}},toSig(n){const{Err:t}=Fs,e=typeof n=="string"?KR(n):n;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:_}=Fs._parseInt(e.subarray(2)),{d:a,l:c}=Fs._parseInt(_);if(c.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(n){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,e=l=>{const f=l.toString(16);return f.length&1?`0${f}`:f},r=t(e(n.s)),i=t(e(n.r)),_=r.length/2,a=i.length/2,c=e(_),u=e(a);return`30${e(a+_+4)}02${u}${i}02${c}${r}`}},Oi=BigInt(0),ir=BigInt(1);BigInt(2);const Kd=BigInt(3);BigInt(4);function DR(n){const t=UR(n),{Fp:e}=t,r=t.toBytes||((N,I,U)=>{const z=I.toAffine();return Yc(Uint8Array.from([4]),e.toBytes(z.x),e.toBytes(z.y))}),i=t.fromBytes||(N=>{const I=N.subarray(1),U=e.fromBytes(I.subarray(0,e.BYTES)),z=e.fromBytes(I.subarray(e.BYTES,2*e.BYTES));return{x:U,y:z}});function _(N){const{a:I,b:U}=t,z=e.sqr(N),B=e.mul(z,N);return e.add(e.add(B,e.mul(N,I)),U)}if(!e.eql(e.sqr(t.Gy),_(t.Gx)))throw new Error("bad generator point: equation left != right");function a(N){return typeof N=="bigint"&&Oi<N&&N<t.n}function c(N){if(!a(N))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function u(N){const{allowedPrivateKeyLengths:I,nByteLength:U,wrapPrivateKey:z,n:B}=t;if(I&&typeof N!="bigint"){if(N instanceof Uint8Array&&(N=q_(N)),typeof N!="string"||!I.includes(N.length))throw new Error("Invalid key");N=N.padStart(U*2,"0")}let O;try{O=typeof N=="bigint"?N:Gs(mr("private key",N,U))}catch{throw new Error(`private key must be ${U} bytes, hex or bigint, not ${typeof N}`)}return z&&(O=Le(O,B)),c(O),O}const l=new Map;function f(N){if(!(N instanceof d))throw new Error("ProjectivePoint expected")}class d{constructor(I,U,z){if(this.px=I,this.py=U,this.pz=z,I==null||!e.isValid(I))throw new Error("x required");if(U==null||!e.isValid(U))throw new Error("y required");if(z==null||!e.isValid(z))throw new Error("z required")}static fromAffine(I){const{x:U,y:z}=I||{};if(!I||!e.isValid(U)||!e.isValid(z))throw new Error("invalid affine point");if(I instanceof d)throw new Error("projective point not allowed");const B=O=>e.eql(O,e.ZERO);return B(U)&&B(z)?d.ZERO:new d(U,z,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(I){const U=e.invertBatch(I.map(z=>z.pz));return I.map((z,B)=>z.toAffine(U[B])).map(d.fromAffine)}static fromHex(I){const U=d.fromAffine(i(mr("pointHex",I)));return U.assertValidity(),U}static fromPrivateKey(I){return d.BASE.multiply(u(I))}_setWindowSize(I){this._WINDOW_SIZE=I,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:I,y:U}=this.toAffine();if(!e.isValid(I)||!e.isValid(U))throw new Error("bad point: x or y not FE");const z=e.sqr(U),B=_(I);if(!e.eql(z,B))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:I}=this.toAffine();if(e.isOdd)return!e.isOdd(I);throw new Error("Field doesn't support isOdd")}equals(I){f(I);const{px:U,py:z,pz:B}=this,{px:O,py:C,pz:k}=I,D=e.eql(e.mul(U,k),e.mul(O,B)),L=e.eql(e.mul(z,k),e.mul(C,B));return D&&L}negate(){return new d(this.px,e.neg(this.py),this.pz)}double(){const{a:I,b:U}=t,z=e.mul(U,Kd),{px:B,py:O,pz:C}=this;let k=e.ZERO,D=e.ZERO,L=e.ZERO,V=e.mul(B,B),tt=e.mul(O,O),rt=e.mul(C,C),wt=e.mul(B,O);return wt=e.add(wt,wt),L=e.mul(B,C),L=e.add(L,L),k=e.mul(I,L),D=e.mul(z,rt),D=e.add(k,D),k=e.sub(tt,D),D=e.add(tt,D),D=e.mul(k,D),k=e.mul(wt,k),L=e.mul(z,L),rt=e.mul(I,rt),wt=e.sub(V,rt),wt=e.mul(I,wt),wt=e.add(wt,L),L=e.add(V,V),V=e.add(L,V),V=e.add(V,rt),V=e.mul(V,wt),D=e.add(D,V),rt=e.mul(O,C),rt=e.add(rt,rt),V=e.mul(rt,wt),k=e.sub(k,V),L=e.mul(rt,tt),L=e.add(L,L),L=e.add(L,L),new d(k,D,L)}add(I){f(I);const{px:U,py:z,pz:B}=this,{px:O,py:C,pz:k}=I;let D=e.ZERO,L=e.ZERO,V=e.ZERO;const tt=t.a,rt=e.mul(t.b,Kd);let wt=e.mul(U,O),j=e.mul(z,C),Pt=e.mul(B,k),xt=e.add(U,z),ft=e.add(O,C);xt=e.mul(xt,ft),ft=e.add(wt,j),xt=e.sub(xt,ft),ft=e.add(U,B);let yt=e.add(O,k);return ft=e.mul(ft,yt),yt=e.add(wt,Pt),ft=e.sub(ft,yt),yt=e.add(z,B),D=e.add(C,k),yt=e.mul(yt,D),D=e.add(j,Pt),yt=e.sub(yt,D),V=e.mul(tt,ft),D=e.mul(rt,Pt),V=e.add(D,V),D=e.sub(j,V),V=e.add(j,V),L=e.mul(D,V),j=e.add(wt,wt),j=e.add(j,wt),Pt=e.mul(tt,Pt),ft=e.mul(rt,ft),j=e.add(j,Pt),Pt=e.sub(wt,Pt),Pt=e.mul(tt,Pt),ft=e.add(ft,Pt),wt=e.mul(j,ft),L=e.add(L,wt),wt=e.mul(yt,ft),D=e.mul(xt,D),D=e.sub(D,wt),wt=e.mul(xt,j),V=e.mul(yt,V),V=e.add(V,wt),new d(D,L,V)}subtract(I){return this.add(I.negate())}is0(){return this.equals(d.ZERO)}wNAF(I){return v.wNAFCached(this,l,I,U=>{const z=e.invertBatch(U.map(B=>B.pz));return U.map((B,O)=>B.toAffine(z[O])).map(d.fromAffine)})}multiplyUnsafe(I){const U=d.ZERO;if(I===Oi)return U;if(c(I),I===ir)return this;const{endo:z}=t;if(!z)return v.unsafeLadder(this,I);let{k1neg:B,k1:O,k2neg:C,k2:k}=z.splitScalar(I),D=U,L=U,V=this;for(;O>Oi||k>Oi;)O&ir&&(D=D.add(V)),k&ir&&(L=L.add(V)),V=V.double(),O>>=ir,k>>=ir;return B&&(D=D.negate()),C&&(L=L.negate()),L=new d(e.mul(L.px,z.beta),L.py,L.pz),D.add(L)}multiply(I){c(I);let U=I,z,B;const{endo:O}=t;if(O){const{k1neg:C,k1:k,k2neg:D,k2:L}=O.splitScalar(U);let{p:V,f:tt}=this.wNAF(k),{p:rt,f:wt}=this.wNAF(L);V=v.constTimeNegate(C,V),rt=v.constTimeNegate(D,rt),rt=new d(e.mul(rt.px,O.beta),rt.py,rt.pz),z=V.add(rt),B=tt.add(wt)}else{const{p:C,f:k}=this.wNAF(U);z=C,B=k}return d.normalizeZ([z,B])[0]}multiplyAndAddUnsafe(I,U,z){const B=d.BASE,O=(k,D)=>D===Oi||D===ir||!k.equals(B)?k.multiplyUnsafe(D):k.multiply(D),C=O(this,U).add(O(I,z));return C.is0()?void 0:C}toAffine(I){const{px:U,py:z,pz:B}=this,O=this.is0();I==null&&(I=O?e.ONE:e.inv(B));const C=e.mul(U,I),k=e.mul(z,I),D=e.mul(B,I);if(O)return{x:e.ZERO,y:e.ZERO};if(!e.eql(D,e.ONE))throw new Error("invZ was invalid");return{x:C,y:k}}isTorsionFree(){const{h:I,isTorsionFree:U}=t;if(I===ir)return!0;if(U)return U(d,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:I,clearCofactor:U}=t;return I===ir?this:U?U(d,this):this.multiplyUnsafe(t.h)}toRawBytes(I=!0){return this.assertValidity(),r(d,this,I)}toHex(I=!0){return q_(this.toRawBytes(I))}}d.BASE=new d(t.Gx,t.Gy,e.ONE),d.ZERO=new d(e.ZERO,e.ONE,e.ZERO);const y=t.nBitLength,v=GR(d,t.endo?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:d,normPrivateKeyToScalar:u,weierstrassEquation:_,isWithinCurveOrder:a}}function LR(n){const t=Fd(n);return Hc(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function jR(n){const t=LR(n),{Fp:e,n:r}=t,i=e.BYTES+1,_=2*e.BYTES+1;function a(ft){return Oi<ft&&ft<e.ORDER}function c(ft){return Le(ft,r)}function u(ft){return vl(ft,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:d,isWithinCurveOrder:y}=DR({...t,toBytes(ft,yt,zt){const Bt=yt.toAffine(),Mt=e.toBytes(Bt.x),It=Yc;return zt?It(Uint8Array.from([yt.hasEvenY()?2:3]),Mt):It(Uint8Array.from([4]),Mt,e.toBytes(Bt.y))},fromBytes(ft){const yt=ft.length,zt=ft[0],Bt=ft.subarray(1);if(yt===i&&(zt===2||zt===3)){const Mt=Gs(Bt);if(!a(Mt))throw new Error("Point is not on curve");const It=d(Mt);let Qt=e.sqrt(It);const J=(Qt&ir)===ir;return(zt&1)===1!==J&&(Qt=e.neg(Qt)),{x:Mt,y:Qt}}else if(yt===_&&zt===4){const Mt=e.fromBytes(Bt.subarray(0,e.BYTES)),It=e.fromBytes(Bt.subarray(e.BYTES,2*e.BYTES));return{x:Mt,y:It}}else throw new Error(`Point of length ${yt} was invalid. Expected ${i} compressed bytes or ${_} uncompressed bytes`)}}),v=ft=>q_(W_(ft,t.nByteLength));function N(ft){const yt=r>>ir;return ft>yt}function I(ft){return N(ft)?c(-ft):ft}const U=(ft,yt,zt)=>Gs(ft.slice(yt,zt));class z{constructor(yt,zt,Bt){this.r=yt,this.s=zt,this.recovery=Bt,this.assertValidity()}static fromCompact(yt){const zt=t.nByteLength;return yt=mr("compactSignature",yt,zt*2),new z(U(yt,0,zt),U(yt,zt,2*zt))}static fromDER(yt){const{r:zt,s:Bt}=Fs.toSig(mr("DER",yt));return new z(zt,Bt)}assertValidity(){if(!y(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!y(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(yt){return new z(this.r,this.s,yt)}recoverPublicKey(yt){const{r:zt,s:Bt,recovery:Mt}=this,It=L(mr("msgHash",yt));if(Mt==null||![0,1,2,3].includes(Mt))throw new Error("recovery id invalid");const Qt=Mt===2||Mt===3?zt+t.n:zt;if(Qt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const J=(Mt&1)===0?"02":"03",nt=l.fromHex(J+v(Qt)),ot=u(Qt),mt=c(-It*ot),q=c(Bt*ot),H=l.BASE.multiplyAndAddUnsafe(nt,mt,q);if(!H)throw new Error("point at infinify");return H.assertValidity(),H}hasHighS(){return N(this.s)}normalizeS(){return this.hasHighS()?new z(this.r,c(-this.s),this.recovery):this}toDERRawBytes(){return Q_(this.toDERHex())}toDERHex(){return Fs.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Q_(this.toCompactHex())}toCompactHex(){return v(this.r)+v(this.s)}}const B={isValidPrivateKey(ft){try{return f(ft),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const ft=Ud(t.n);return kR(t.randomBytes(ft),t.n)},precompute(ft=8,yt=l.BASE){return yt._setWindowSize(ft),yt.multiply(BigInt(3)),yt}};function O(ft,yt=!0){return l.fromPrivateKey(ft).toRawBytes(yt)}function C(ft){const yt=ft instanceof Uint8Array,zt=typeof ft=="string",Bt=(yt||zt)&&ft.length;return yt?Bt===i||Bt===_:zt?Bt===2*i||Bt===2*_:ft instanceof l}function k(ft,yt,zt=!0){if(C(ft))throw new Error("first arg must be private key");if(!C(yt))throw new Error("second arg must be public key");return l.fromHex(yt).multiply(f(ft)).toRawBytes(zt)}const D=t.bits2int||function(ft){const yt=Gs(ft),zt=ft.length*8-t.nBitLength;return zt>0?yt>>BigInt(zt):yt},L=t.bits2int_modN||function(ft){return c(D(ft))},V=El(t.nBitLength);function tt(ft){if(typeof ft!="bigint")throw new Error("bigint expected");if(!(Oi<=ft&&ft<V))throw new Error(`bigint expected < 2^${t.nBitLength}`);return W_(ft,t.nByteLength)}function rt(ft,yt,zt=wt){if(["recovered","canonical"].some(lt=>lt in zt))throw new Error("sign() legacy options not supported");const{hash:Bt,randomBytes:Mt}=t;let{lowS:It,prehash:Qt,extraEntropy:J}=zt;It==null&&(It=!0),ft=mr("msgHash",ft),Qt&&(ft=mr("prehashed msgHash",Bt(ft)));const nt=L(ft),ot=f(yt),mt=[tt(ot),tt(nt)];if(J!=null){const lt=J===!0?Mt(e.BYTES):J;mt.push(mr("extraEntropy",lt))}const q=Yc(...mt),H=nt;function it(lt){const pt=D(lt);if(!y(pt))return;const M=u(pt),x=l.BASE.multiply(pt).toAffine(),st=c(x.x);if(st===Oi)return;const dt=c(M*c(H+st*ot));if(dt===Oi)return;let Nt=(x.x===st?0:2)|Number(x.y&ir),St=dt;return It&&N(dt)&&(St=I(dt),Nt^=1),new z(st,St,Nt)}return{seed:q,k2sig:it}}const wt={lowS:t.lowS,prehash:!1},j={lowS:t.lowS,prehash:!1};function Pt(ft,yt,zt=wt){const{seed:Bt,k2sig:Mt}=rt(ft,yt,zt),It=t;return Nd(It.hash.outputLen,It.nByteLength,It.hmac)(Bt,Mt)}l.BASE._setWindowSize(8);function xt(ft,yt,zt,Bt=j){var x;const Mt=ft;if(yt=mr("msgHash",yt),zt=mr("publicKey",zt),"strict"in Bt)throw new Error("options.strict was renamed to lowS");const{lowS:It,prehash:Qt}=Bt;let J,nt;try{if(typeof Mt=="string"||Mt instanceof Uint8Array)try{J=z.fromDER(Mt)}catch(st){if(!(st instanceof Fs.Err))throw st;J=z.fromCompact(Mt)}else if(typeof Mt=="object"&&typeof Mt.r=="bigint"&&typeof Mt.s=="bigint"){const{r:st,s:dt}=Mt;J=new z(st,dt)}else throw new Error("PARSE");nt=l.fromHex(zt)}catch(st){if(st.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(It&&J.hasHighS())return!1;Qt&&(yt=t.hash(yt));const{r:ot,s:mt}=J,q=L(yt),H=u(mt),it=c(q*H),lt=c(ot*H),pt=(x=l.BASE.multiplyAndAddUnsafe(nt,it,lt))==null?void 0:x.toAffine();return pt?c(pt.x)===ot:!1}return{CURVE:t,getPublicKey:O,getSharedSecret:k,sign:Pt,verify:xt,ProjectivePoint:l,Signature:z,utils:B}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function VR(n){return{hash:n,hmac:(t,...e)=>cd(n,t,US(...e)),randomBytes:FS}}function YR(n,t){const e=r=>jR({...n,...VR(r)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Dd=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Ld=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),HR=BigInt(1),Bl=BigInt(2),jd=(n,t)=>(n+t/Bl)/t;function qR(n){const t=Dd,e=BigInt(3),r=BigInt(6),i=BigInt(11),_=BigInt(22),a=BigInt(23),c=BigInt(44),u=BigInt(88),l=n*n*n%t,f=l*l*n%t,d=nr(f,e,t)*f%t,y=nr(d,e,t)*f%t,v=nr(y,Bl,t)*l%t,N=nr(v,i,t)*v%t,I=nr(N,_,t)*N%t,U=nr(I,c,t)*I%t,z=nr(U,u,t)*U%t,B=nr(z,c,t)*I%t,O=nr(B,e,t)*f%t,C=nr(O,a,t)*N%t,k=nr(C,r,t)*l%t,D=nr(k,Bl,t);if(!xl.eql(xl.sqr(D),n))throw new Error("Cannot find square root");return D}const xl=OR(Dd,void 0,void 0,{sqrt:qR}),as=YR({a:BigInt(0),b:BigInt(7),Fp:xl,n:Ld,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const t=Ld,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-HR*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),_=e,a=BigInt("0x100000000000000000000000000000000"),c=jd(_*n,t),u=jd(-r*n,t);let l=Le(n-c*e-u*i,t),f=Le(-c*r-u*_,t);const d=l>a,y=f>a;if(d&&(l=t-l),y&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:d,k1:l,k2neg:y,k2:f}}}},fd);BigInt(0),as.ProjectivePoint;const qc="0x0000000000000000000000000000000000000000",Vd="0x0000000000000000000000000000000000000000000000000000000000000000",Yd=BigInt(0),Hd=BigInt(1),qd=BigInt(2),Qd=BigInt(27),Wd=BigInt(28),tf=BigInt(35),J_={};function Jd(n){return Os(Te(n),32)}const Cr=class Cr{constructor(t,e,r,i){et(this,_c);et(this,oc);et(this,ac);et(this,P_);Du(t,J_,"Signature"),K(this,_c,e),K(this,oc,r),K(this,ac,i),K(this,P_,null)}get r(){return m(this,_c)}set r(t){W(L_(t)===32,"invalid r","value",t),K(this,_c,Et(t))}get s(){return m(this,oc)}set s(t){W(L_(t)===32,"invalid s","value",t);const e=Et(t);W(parseInt(e.substring(0,3))<8,"non-canonical s","value",e),K(this,oc,e)}get v(){return m(this,ac)}set v(t){const e=Kt(t,"value");W(e===27||e===28,"invalid v","v",t),K(this,ac,e)}get networkV(){return m(this,P_)}get legacyChainId(){const t=this.networkV;return t==null?null:Cr.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=Yt(this.s);return this.yParity&&(t[0]|=128),Et(t)}get compactSerialized(){return fe([this.r,this.yParityAndS])}get serialized(){return fe([this.r,this.s,this.yParity?"0x1c":"0x1b"])}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new Cr(J_,this.r,this.s,this.v);return this.networkV&&K(t,P_,this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(t){const e=vt(t,"v");return e==Qd||e==Wd?Yd:(W(e>=tf,"invalid EIP-155 v","v",t),(e-tf)/qd)}static getChainIdV(t,e){return vt(t)*qd+BigInt(35+e-27)}static getNormalizedV(t){const e=vt(t);return e===Yd||e===Qd?27:e===Hd||e===Wd?28:(W(e>=tf,"invalid v","v",t),e&Hd?27:28)}static from(t){function e(l,f){W(l,f,"signature",t)}if(t==null)return new Cr(J_,Vd,Vd,27);if(typeof t=="string"){const l=Yt(t,"signature");if(l.length===64){const f=Et(l.slice(0,32)),d=l.slice(32,64),y=d[0]&128?28:27;return d[0]&=127,new Cr(J_,f,Et(d),y)}if(l.length===65){const f=Et(l.slice(0,32)),d=l.slice(32,64);e((d[0]&128)===0,"non-canonical s");const y=Cr.getNormalizedV(l[64]);return new Cr(J_,f,Et(d),y)}e(!1,"invalid raw signature length")}if(t instanceof Cr)return t.clone();const r=t.r;e(r!=null,"missing r");const i=Jd(r),_=function(l,f){if(l!=null)return Jd(l);if(f!=null){e(ne(f,32),"invalid yParityAndS");const d=Yt(f);return d[0]&=127,Et(d)}e(!1,"missing s")}(t.s,t.yParityAndS);e((Yt(_)[0]&128)==0,"non-canonical s");const{networkV:a,v:c}=function(l,f,d){if(l!=null){const y=vt(l);return{networkV:y>=tf?y:void 0,v:Cr.getNormalizedV(y)}}if(f!=null)return e(ne(f,32),"invalid yParityAndS"),{v:Yt(f)[0]&128?28:27};if(d!=null){switch(Kt(d,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),u=new Cr(J_,i,_,c);return a&&K(u,P_,a),e(t.yParity==null||Kt(t.yParity,"sig.yParity")===u.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===u.yParityAndS,"yParityAndS mismatch"),u}};_c=new WeakMap,oc=new WeakMap,ac=new WeakMap,P_=new WeakMap;let Sr=Cr;const z_=class z_{constructor(t){et(this,Yi);W(L_(t)===32,"invalid private key","privateKey","[REDACTED]"),K(this,Yi,Et(t))}get privateKey(){return m(this,Yi)}get publicKey(){return z_.computePublicKey(m(this,Yi))}get compressedPublicKey(){return z_.computePublicKey(m(this,Yi),!0)}sign(t){W(L_(t)===32,"invalid digest length","digest",t);const e=as.sign(ke(t),ke(m(this,Yi)),{lowS:!0});return Sr.from({r:rs(e.r,32),s:rs(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=z_.computePublicKey(t);return Et(as.getSharedSecret(ke(m(this,Yi)),Yt(e),!1))}static computePublicKey(t,e){let r=Yt(t,"key");if(r.length===32){const _=as.getPublicKey(r,!!e);return Et(_)}if(r.length===64){const _=new Uint8Array(65);_[0]=4,_.set(r,1),r=_}const i=as.ProjectivePoint.fromHex(r);return Et(i.toRawBytes(e))}static recoverPublicKey(t,e){W(L_(t)===32,"invalid digest length","digest",t);const r=Sr.from(e);let i=as.Signature.fromCompact(ke(fe([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const _=i.recoverPublicKey(ke(t));return W(_!=null,"invalid signautre for digest","signature",e),"0x"+_.toHex(!1)}static addPoints(t,e,r){const i=as.ProjectivePoint.fromHex(z_.computePublicKey(t).substring(2)),_=as.ProjectivePoint.fromHex(z_.computePublicKey(e).substring(2));return"0x"+i.add(_).toHex(!!r)}};Yi=new WeakMap;let Qc=z_;const QR=BigInt(0),WR=BigInt(36);function $d(n){n=n.toLowerCase();const t=n.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const r=Yt(ge(e));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(r[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Cl={};for(let n=0;n<10;n++)Cl[String(n)]=String(n);for(let n=0;n<26;n++)Cl[String.fromCharCode(65+n)]=String(10+n);const Zd=15;function JR(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let t=n.split("").map(r=>Cl[r]).join("");for(;t.length>=Zd;){let r=t.substring(0,Zd);t=parseInt(r,10)%97+t.substring(r.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}const $R=function(){const n={};for(let t=0;t<36;t++){const e="0123456789abcdefghijklmnopqrstuvwxyz"[t];n[e]=BigInt(t)}return n}();function ZR(n){n=n.toLowerCase();let t=QR;for(let e=0;e<n.length;e++)t=t*WR+$R[n[e]];return t}function qt(n){if(W(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const t=$d(n);return W(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===n,"bad address checksum","address",n),t}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){W(n.substring(2,4)===JR(n),"bad icap checksum","address",n);let t=ZR(n.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return $d("0x"+t)}W(!1,"invalid address","address",n)}function XR(n){const t=qt(n.from);let r=vt(n.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,qt(ue(ge(ks([t,r])),12))}function Xd(n){return n&&typeof n.getAddress=="function"}function sr(n){try{return qt(n),!0}catch{}return!1}async function Il(n,t){const e=await t;return(e==null||e==="0x0000000000000000000000000000000000000000")&&(ht(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),W(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),qt(e)}function Ue(n,t){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?qt(n):(ht(t!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Il(n,t.resolveName(n)));if(Xd(n))return Il(n,n.getAddress());if(n&&typeof n.then=="function")return Il(n,n);W(!1,"unsupported addressable value","target",n)}const ki={};function Rt(n,t){let e=!1;return t<0&&(e=!0,t*=-1),new xe(ki,`${e?"":"u"}int${t}`,n,{signed:e,width:t})}function Ht(n,t){return new xe(ki,`bytes${t||""}`,n,{size:t})}const tg=Symbol.for("_ethers_typed"),Hi=class Hi{constructor(t,e,r,i){$(this,"type");$(this,"value");et(this,v_);$(this,"_typedSymbol");i==null&&(i=null),Du(ki,t,"Typed"),Ct(this,{_typedSymbol:tg,type:e,value:r}),K(this,v_,i),this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return m(this,v_)}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return m(this,v_)===!0?-1:m(this,v_)===!1?this.value.length:null}static from(t,e){return new Hi(ki,t,e)}static uint8(t){return Rt(t,8)}static uint16(t){return Rt(t,16)}static uint24(t){return Rt(t,24)}static uint32(t){return Rt(t,32)}static uint40(t){return Rt(t,40)}static uint48(t){return Rt(t,48)}static uint56(t){return Rt(t,56)}static uint64(t){return Rt(t,64)}static uint72(t){return Rt(t,72)}static uint80(t){return Rt(t,80)}static uint88(t){return Rt(t,88)}static uint96(t){return Rt(t,96)}static uint104(t){return Rt(t,104)}static uint112(t){return Rt(t,112)}static uint120(t){return Rt(t,120)}static uint128(t){return Rt(t,128)}static uint136(t){return Rt(t,136)}static uint144(t){return Rt(t,144)}static uint152(t){return Rt(t,152)}static uint160(t){return Rt(t,160)}static uint168(t){return Rt(t,168)}static uint176(t){return Rt(t,176)}static uint184(t){return Rt(t,184)}static uint192(t){return Rt(t,192)}static uint200(t){return Rt(t,200)}static uint208(t){return Rt(t,208)}static uint216(t){return Rt(t,216)}static uint224(t){return Rt(t,224)}static uint232(t){return Rt(t,232)}static uint240(t){return Rt(t,240)}static uint248(t){return Rt(t,248)}static uint256(t){return Rt(t,256)}static uint(t){return Rt(t,256)}static int8(t){return Rt(t,-8)}static int16(t){return Rt(t,-16)}static int24(t){return Rt(t,-24)}static int32(t){return Rt(t,-32)}static int40(t){return Rt(t,-40)}static int48(t){return Rt(t,-48)}static int56(t){return Rt(t,-56)}static int64(t){return Rt(t,-64)}static int72(t){return Rt(t,-72)}static int80(t){return Rt(t,-80)}static int88(t){return Rt(t,-88)}static int96(t){return Rt(t,-96)}static int104(t){return Rt(t,-104)}static int112(t){return Rt(t,-112)}static int120(t){return Rt(t,-120)}static int128(t){return Rt(t,-128)}static int136(t){return Rt(t,-136)}static int144(t){return Rt(t,-144)}static int152(t){return Rt(t,-152)}static int160(t){return Rt(t,-160)}static int168(t){return Rt(t,-168)}static int176(t){return Rt(t,-176)}static int184(t){return Rt(t,-184)}static int192(t){return Rt(t,-192)}static int200(t){return Rt(t,-200)}static int208(t){return Rt(t,-208)}static int216(t){return Rt(t,-216)}static int224(t){return Rt(t,-224)}static int232(t){return Rt(t,-232)}static int240(t){return Rt(t,-240)}static int248(t){return Rt(t,-248)}static int256(t){return Rt(t,-256)}static int(t){return Rt(t,-256)}static bytes1(t){return Ht(t,1)}static bytes2(t){return Ht(t,2)}static bytes3(t){return Ht(t,3)}static bytes4(t){return Ht(t,4)}static bytes5(t){return Ht(t,5)}static bytes6(t){return Ht(t,6)}static bytes7(t){return Ht(t,7)}static bytes8(t){return Ht(t,8)}static bytes9(t){return Ht(t,9)}static bytes10(t){return Ht(t,10)}static bytes11(t){return Ht(t,11)}static bytes12(t){return Ht(t,12)}static bytes13(t){return Ht(t,13)}static bytes14(t){return Ht(t,14)}static bytes15(t){return Ht(t,15)}static bytes16(t){return Ht(t,16)}static bytes17(t){return Ht(t,17)}static bytes18(t){return Ht(t,18)}static bytes19(t){return Ht(t,19)}static bytes20(t){return Ht(t,20)}static bytes21(t){return Ht(t,21)}static bytes22(t){return Ht(t,22)}static bytes23(t){return Ht(t,23)}static bytes24(t){return Ht(t,24)}static bytes25(t){return Ht(t,25)}static bytes26(t){return Ht(t,26)}static bytes27(t){return Ht(t,27)}static bytes28(t){return Ht(t,28)}static bytes29(t){return Ht(t,29)}static bytes30(t){return Ht(t,30)}static bytes31(t){return Ht(t,31)}static bytes32(t){return Ht(t,32)}static address(t){return new Hi(ki,"address",t)}static bool(t){return new Hi(ki,"bool",!!t)}static bytes(t){return new Hi(ki,"bytes",t)}static string(t){return new Hi(ki,"string",t)}static array(t,e){throw new Error("not implemented yet")}static tuple(t,e){throw new Error("not implemented yet")}static overrides(t){return new Hi(ki,"overrides",Object.assign({},t))}static isTyped(t){return t&&typeof t=="object"&&"_typedSymbol"in t&&t._typedSymbol===tg}static dereference(t,e){if(Hi.isTyped(t)){if(t.type!==e)throw new Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}};v_=new WeakMap;let xe=Hi;class tE extends Ni{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){let r=xe.dereference(e,"string");try{r=qt(r)}catch(i){return this._throwError(i.message,e)}return t.writeValue(r)}decode(t){return qt(rs(t.readValue(),20))}}class eE extends Ni{constructor(e){super(e.name,e.type,"_",e.dynamic);$(this,"coder");this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,r){return this.coder.encode(e,r)}decode(e){return this.coder.decode(e)}}function eg(n,t,e){let r=[];if(Array.isArray(e))r=e;else if(e&&typeof e=="object"){let u={};r=t.map(l=>{const f=l.localName;return ht(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),ht(!u[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),u[f]=!0,e[f]})}else W(!1,"invalid tuple value","tuple",e);W(t.length===r.length,"types/value length mismatch","tuple",e);let i=new ll,_=new ll,a=[];t.forEach((u,l)=>{let f=r[l];if(u.dynamic){let d=_.length;u.encode(_,f);let y=i.writeUpdatableValue();a.push(v=>{y(v+d)})}else u.encode(i,f)}),a.forEach(u=>{u(i.length)});let c=n.appendWriter(i);return c+=n.appendWriter(_),c}function rg(n,t){let e=[],r=[],i=n.subReader(0);return t.forEach(_=>{let a=null;if(_.dynamic){let c=n.readIndex(),u=i.subReader(c);try{a=_.decode(u)}catch(l){if(ze(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=_.name,a.name=_.localName,a.type=_.type}}else try{a=_.decode(n)}catch(c){if(ze(c,"BUFFER_OVERRUN"))throw c;a=c,a.baseType=_.name,a.name=_.localName,a.type=_.type}if(a==null)throw new Error("investigate");e.push(a),r.push(_.localName||null)}),V_.fromItems(e,r)}class rE extends Ni{constructor(e,r,i){const _=e.type+"["+(r>=0?r:"")+"]",a=r===-1||e.dynamic;super("array",_,i,a);$(this,"coder");$(this,"length");Ct(this,{coder:e,length:r})}defaultValue(){const e=this.coder.defaultValue(),r=[];for(let i=0;i<this.length;i++)r.push(e);return r}encode(e,r){const i=xe.dereference(r,"array");Array.isArray(i)||this._throwError("expected array value",i);let _=this.length;_===-1&&(_=i.length,e.writeValue(i.length)),kw(i.length,_,"coder array"+(this.localName?" "+this.localName:""));let a=[];for(let c=0;c<i.length;c++)a.push(this.coder);return eg(e,a,i)}decode(e){let r=this.length;r===-1&&(r=e.readIndex(),ht(r*Ge<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:r*Ge,length:e.dataLength}));let i=[];for(let _=0;_<r;_++)i.push(new eE(this.coder));return rg(e,i)}}class nE extends Ni{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){const r=xe.dereference(e,"bool");return t.writeValue(r?1:0)}decode(t){return!!t.readValue()}}class ng extends Ni{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=ke(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readIndex(),!0)}}class iE extends ng{constructor(t){super("bytes",t)}decode(t){return Et(super.decode(t))}}class sE extends Ni{constructor(e,r){let i="bytes"+String(e);super(i,i,r,!1);$(this,"size");Ct(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(e,r){let i=ke(xe.dereference(r,this.type));return i.length!==this.size&&this._throwError("incorrect data length",r),e.writeBytes(i)}decode(e){return Et(e.readBytes(this.size))}}const _E=new Uint8Array([]);class oE extends Ni{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return e!=null&&this._throwError("not null",e),t.writeBytes(_E)}decode(t){return t.readBytes(0),null}}const aE=BigInt(0),cE=BigInt(1),uE=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class fE extends Ni{constructor(e,r,i){const _=(r?"int":"uint")+e*8;super(_,_,i,!1);$(this,"size");$(this,"signed");Ct(this,{size:e,signed:r},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,r){let i=vt(xe.dereference(r,this.type)),_=Lc(uE,Ge*8);if(this.signed){let a=Lc(_,this.size*8-1);(i>a||i<-(a+cE))&&this._throwError("value out-of-bounds",r),i=Fw(i,8*Ge)}else(i<aE||i>Lc(_,this.size*8))&&this._throwError("value out-of-bounds",r);return e.writeValue(i)}decode(e){let r=Lc(e.readValue(),this.size*8);return this.signed&&(r=dS(r,this.size*8)),r}}class lE extends ng{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,Ci(xe.dereference(e,"string")))}decode(t){return Vu(super.decode(t))}}class ef extends Ni{constructor(e,r){let i=!1;const _=[];e.forEach(c=>{c.dynamic&&(i=!0),_.push(c.type)});const a="tuple("+_.join(",")+")";super("tuple",a,r,i);$(this,"coders");Ct(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach(i=>{e.push(i.defaultValue())});const r=this.coders.reduce((i,_)=>{const a=_.localName;return a&&(i[a]||(i[a]=0),i[a]++),i},{});return this.coders.forEach((i,_)=>{let a=i.localName;!a||r[a]!==1||(a==="length"&&(a="_length"),e[a]==null&&(e[a]=e[_]))}),Object.freeze(e)}encode(e,r){const i=xe.dereference(r,"tuple");return eg(e,this.coders,i)}decode(e){return rg(e,this.coders)}}function Ks(n){return ge(Ci(n))}var pE="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const ig=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),sg=4;function hE(n){let t=0;function e(){return n[t++]<<8|n[t++]}let r=e(),i=1,_=[0,1];for(let k=1;k<r;k++)_.push(i+=e());let a=e(),c=t;t+=a;let u=0,l=0;function f(){return u==0&&(l=l<<8|n[t++],u=8),l>>--u&1}const d=31,y=2**d,v=y>>>1,N=v>>1,I=y-1;let U=0;for(let k=0;k<d;k++)U=U<<1|f();let z=[],B=0,O=y;for(;;){let k=Math.floor(((U-B+1)*i-1)/O),D=0,L=r;for(;L-D>1;){let rt=D+L>>>1;k<_[rt]?L=rt:D=rt}if(D==0)break;z.push(D);let V=B+Math.floor(O*_[D]/i),tt=B+Math.floor(O*_[D+1]/i)-1;for(;((V^tt)&v)==0;)U=U<<1&I|f(),V=V<<1&I,tt=tt<<1&I|1;for(;V&~tt&N;)U=U&v|U<<1&I>>>1|f(),V=V<<1^v,tt=(tt^v)<<1|v|1;B=V,O=1+tt-V}let C=r-4;return z.map(k=>{switch(k-C){case 3:return C+65792+(n[c++]<<16|n[c++]<<8|n[c++]);case 2:return C+256+(n[c++]<<8|n[c++]);case 1:return C+n[c++];default:return k-1}})}function wE(n){let t=0;return()=>n[t++]}function _g(n){return wE(hE(dE(n)))}function dE(n){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,_)=>t[i.charCodeAt(0)]=_);let e=n.length,r=new Uint8Array(6*e>>3);for(let i=0,_=0,a=0,c=0;i<e;i++)c=c<<6|t[n.charCodeAt(i)],a+=6,a>=8&&(r[_++]=c>>(a-=8));return r}function gE(n){return n&1?~n>>1:n>>1}function bE(n,t){let e=Array(n);for(let r=0,i=0;r<n;r++)e[r]=i+=gE(t());return e}function Wc(n,t=0){let e=[];for(;;){let r=n(),i=n();if(!i)break;t+=r;for(let _=0;_<i;_++)e.push(t+_);t+=i+1}return e}function og(n){return Jc(()=>{let t=Wc(n);if(t.length)return t})}function ag(n){let t=[];for(;;){let e=n();if(e==0)break;t.push(yE(e,n))}for(;;){let e=n()-1;if(e<0)break;t.push(AE(e,n))}return t.flat()}function Jc(n){let t=[];for(;;){let e=n(t.length);if(!e)break;t.push(e)}return t}function cg(n,t,e){let r=Array(n).fill().map(()=>[]);for(let i=0;i<t;i++)bE(n,e).forEach((_,a)=>r[a].push(_));return r}function yE(n,t){let e=1+t(),r=t(),i=Jc(t);return cg(i.length,1+n,t).flatMap((a,c)=>{let[u,...l]=a;return Array(i[c]).fill().map((f,d)=>{let y=d*r;return[u+d*e,l.map(v=>v+y)]})})}function AE(n,t){let e=1+t();return cg(e,1+n,t).map(i=>[i[0],i.slice(1)])}function mE(n){let t=[],e=Wc(n);return i(r([]),[]),t;function r(_){let a=n(),c=Jc(()=>{let u=Wc(n).map(l=>e[l]);if(u.length)return r(u)});return{S:a,B:c,Q:_}}function i({S:_,B:a},c,u){if(!(_&4&&u===c[c.length-1])){_&2&&(u=c[c.length-1]),_&1&&t.push(c);for(let l of a)for(let f of l.Q)i(l,[...c,f],u)}}}function SE(n){return n.toString(16).toUpperCase().padStart(2,"0")}function ug(n){return`{${SE(n)}}`}function RE(n){let t=[];for(let e=0,r=n.length;e<r;){let i=n.codePointAt(e);e+=i<65536?1:2,t.push(i)}return t}function $_(n){let e=n.length;if(e<4096)return String.fromCodePoint(...n);let r=[];for(let i=0;i<e;)r.push(String.fromCodePoint(...n.slice(i,i+=4096)));return r.join("")}function EE(n,t){let e=n.length,r=e-t.length;for(let i=0;r==0&&i<e;i++)r=n[i]-t[i];return r}var PE="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const $c=44032,rf=4352,nf=4449,sf=4519,fg=19,lg=21,Z_=28,_f=lg*Z_,zE=fg*_f,vE=$c+zE,ME=rf+fg,BE=nf+lg,xE=sf+Z_;function Zc(n){return n>>24&255}function pg(n){return n&16777215}let Nl,hg,Ol,of;function CE(){let n=_g(PE);Nl=new Map(og(n).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),hg=new Set(Wc(n)),Ol=new Map,of=new Map;for(let[t,e]of ag(n)){if(!hg.has(t)&&e.length==2){let[r,i]=e,_=of.get(r);_||(_=new Map,of.set(r,_)),_.set(i,t)}Ol.set(t,e.reverse())}}function wg(n){return n>=$c&&n<vE}function IE(n,t){if(n>=rf&&n<ME&&t>=nf&&t<BE)return $c+(n-rf)*_f+(t-nf)*Z_;if(wg(n)&&t>sf&&t<xE&&(n-$c)%Z_==0)return n+(t-sf);{let e=of.get(n);return e&&(e=e.get(t),e)?e:-1}}function dg(n){Nl||CE();let t=[],e=[],r=!1;function i(_){let a=Nl.get(_);a&&(r=!0,_|=a),t.push(_)}for(let _ of n)for(;;){if(_<128)t.push(_);else if(wg(_)){let a=_-$c,c=a/_f|0,u=a%_f/Z_|0,l=a%Z_;i(rf+c),i(nf+u),l>0&&i(sf+l)}else{let a=Ol.get(_);a?e.push(...a):i(_)}if(!e.length)break;_=e.pop()}if(r&&t.length>1){let _=Zc(t[0]);for(let a=1;a<t.length;a++){let c=Zc(t[a]);if(c==0||_<=c){_=c;continue}let u=a-1;for(;;){let l=t[u+1];if(t[u+1]=t[u],t[u]=l,!u||(_=Zc(t[--u]),_<=c))break}_=Zc(t[a])}}return t}function NE(n){let t=[],e=[],r=-1,i=0;for(let _ of n){let a=Zc(_),c=pg(_);if(r==-1)a==0?r=c:t.push(c);else if(i>0&&i>=a)a==0?(t.push(r,...e),e.length=0,r=c):e.push(c),i=a;else{let u=IE(r,c);u>=0?r=u:i==0&&a==0?(t.push(r),r=c):(e.push(c),i=a)}}return r>=0&&t.push(r,...e),t}function gg(n){return dg(n).map(pg)}function OE(n){return NE(dg(n))}const bg=45,yg=".",Ag=65039,mg=1,af=n=>Array.from(n);function Xc(n,t){return n.P.has(t)||n.Q.has(t)}class kE extends Array{get is_emoji(){return!0}}let kl,Sg,Ds,Tl,Rg,X_,Gl,to,Ls,Eg,Ul;function Fl(){if(kl)return;let n=_g(pE);const t=()=>Wc(n),e=()=>new Set(t()),r=(f,d)=>d.forEach(y=>f.add(y));kl=new Map(ag(n)),Sg=e(),Ds=t(),Tl=new Set(t().map(f=>Ds[f])),Ds=new Set(Ds),Rg=e(),e();let i=og(n),_=n();const a=()=>{let f=new Set;return t().forEach(d=>r(f,i[d])),r(f,t()),f};X_=Jc(f=>{let d=Jc(n).map(y=>y+96);if(d.length){let y=f>=_;d[0]-=32,d=$_(d),y&&(d=`Restricted[${d}]`);let v=a(),N=a(),I=!n();return{N:d,P:v,Q:N,M:I,R:y}}}),Gl=e(),to=new Map;let c=t().concat(af(Gl)).sort((f,d)=>f-d);c.forEach((f,d)=>{let y=n(),v=c[d]=y?c[d-y]:{V:[],M:new Map};v.V.push(f),Gl.has(f)||to.set(f,v)});for(let{V:f,M:d}of new Set(to.values())){let y=[];for(let N of f){let I=X_.filter(z=>Xc(z,N)),U=y.find(({G:z})=>I.some(B=>z.has(B)));U||(U={G:new Set,V:[]},y.push(U)),U.V.push(N),r(U.G,I)}let v=y.flatMap(N=>af(N.G));for(let{G:N,V:I}of y){let U=new Set(v.filter(z=>!N.has(z)));for(let z of I)d.set(z,U)}}Ls=new Set;let u=new Set;const l=f=>Ls.has(f)?u.add(f):Ls.add(f);for(let f of X_){for(let d of f.P)l(d);for(let d of f.Q)l(d)}for(let f of Ls)!to.has(f)&&!u.has(f)&&to.set(f,mg);r(Ls,gg(Ls)),Eg=mE(n).map(f=>kE.from(f)).sort(EE),Ul=new Map;for(let f of Eg){let d=[Ul];for(let y of f){let v=d.map(N=>{let I=N.get(y);return I||(I=new Map,N.set(y,I)),I});y===Ag?d.push(...v):d=v}for(let y of d)y.V=f}}function Kl(n){return(Pg(n)?"":`${Dl(cf([n]))} `)+ug(n)}function Dl(n){return`"${n}"`}function TE(n){if(n.length>=4&&n[2]==bg&&n[3]==bg)throw new Error(`invalid label extension: "${$_(n.slice(0,4))}"`)}function GE(n){for(let e=n.lastIndexOf(95);e>0;)if(n[--e]!==95)throw new Error("underscore allowed only at start")}function UE(n){let t=n[0],e=ig.get(t);if(e)throw tu(`leading ${e}`);let r=n.length,i=-1;for(let _=1;_<r;_++){t=n[_];let a=ig.get(t);if(a){if(i==_)throw tu(`${e} + ${a}`);i=_+1,e=a}}if(i==r)throw tu(`trailing ${e}`)}function cf(n,t=1/0,e=ug){let r=[];FE(n[0])&&r.push("◌"),n.length>t&&(t>>=1,n=[...n.slice(0,t),8230,...n.slice(-t)]);let i=0,_=n.length;for(let a=0;a<_;a++){let c=n[a];Pg(c)&&(r.push($_(n.slice(i,a))),r.push(e(c)),i=a+1)}return r.push($_(n.slice(i,_))),r.join("")}function FE(n){return Fl(),Ds.has(n)}function Pg(n){return Fl(),Rg.has(n)}function KE(n){return VE(DE(n,OE,qE))}function DE(n,t,e){if(!n)return[];Fl();let r=0;return n.split(yg).map(i=>{let _=RE(i),a={input:_,offset:r};r+=_.length+1;try{let c=a.tokens=HE(_,t,e),u=c.length,l;if(!u)throw new Error("empty label");let f=a.output=c.flat();if(GE(f),!(a.emoji=u>1||c[0].is_emoji)&&f.every(y=>y<128))TE(f),l="ASCII";else{let y=c.flatMap(v=>v.is_emoji?[]:v);if(!y.length)l="Emoji";else{if(Ds.has(f[0]))throw tu("leading combining mark");for(let I=1;I<u;I++){let U=c[I];if(!U.is_emoji&&Ds.has(U[0]))throw tu(`emoji + combining mark: "${$_(c[I-1])} + ${cf([U[0]])}"`)}UE(f);let v=af(new Set(y)),[N]=jE(v);YE(N,y),LE(N,v),l=N.N}}a.type=l}catch(c){a.error=c}return a})}function LE(n,t){let e,r=[];for(let i of t){let _=to.get(i);if(_===mg)return;if(_){let a=_.M.get(i);if(e=e?e.filter(c=>a.has(c)):af(a),!e.length)return}else r.push(i)}if(e){for(let i of e)if(r.every(_=>Xc(i,_)))throw new Error(`whole-script confusable: ${n.N}/${i.N}`)}}function jE(n){let t=X_;for(let e of n){let r=t.filter(i=>Xc(i,e));if(!r.length)throw X_.some(i=>Xc(i,e))?vg(t[0],e):zg(e);if(t=r,r.length==1)break}return t}function VE(n){return n.map(({input:t,error:e,output:r})=>{if(e){let i=e.message;throw new Error(n.length==1?i:`Invalid label ${Dl(cf(t,63))}: ${i}`)}return $_(r)}).join(yg)}function zg(n){return new Error(`disallowed character: ${Kl(n)}`)}function vg(n,t){let e=Kl(t),r=X_.find(i=>i.P.has(t));return r&&(e=`${r.N} ${e}`),new Error(`illegal mixture: ${n.N} + ${e}`)}function tu(n){return new Error(`illegal placement: ${n}`)}function YE(n,t){for(let e of t)if(!Xc(n,e))throw vg(n,e);if(n.M){let e=gg(t);for(let r=1,i=e.length;r<i;r++)if(Tl.has(e[r])){let _=r+1;for(let a;_<i&&Tl.has(a=e[_]);_++)for(let c=r;c<_;c++)if(e[c]==a)throw new Error(`duplicate non-spacing marks: ${Kl(a)}`);if(_-r>sg)throw new Error(`excessive non-spacing marks: ${Dl(cf(e.slice(r-1,_)))} (${_-r}/${sg})`);r=_}}}function HE(n,t,e){let r=[],i=[];for(n=n.slice().reverse();n.length;){let _=QE(n);if(_)i.length&&(r.push(t(i)),i=[]),r.push(e(_));else{let a=n.pop();if(Ls.has(a))i.push(a);else{let c=kl.get(a);if(c)i.push(...c);else if(!Sg.has(a))throw zg(a)}}}return i.length&&r.push(t(i)),r}function qE(n){return n.filter(t=>t!=Ag)}function QE(n,t){let e=Ul,r,i=n.length;for(;i&&(e=e.get(n[--i]),!!e);){let{V:_}=e;_&&(r=_,n.length=i)}return r}const Mg=new Uint8Array(32);Mg.fill(0);function Bg(n){return W(n.length!==0,"invalid ENS name; empty component","comp",n),n}function xg(n){const t=Ci(WE(n)),e=[];if(n.length===0)return e;let r=0;for(let i=0;i<t.length;i++)t[i]===46&&(e.push(Bg(t.slice(r,i))),r=i+1);return W(r<t.length,"invalid ENS name; empty component","name",n),e.push(Bg(t.slice(r))),e}function WE(n){try{if(n.length===0)throw new Error("empty label");return KE(n)}catch(t){W(!1,`invalid ENS name (${t.message})`,"name",n)}}function Ll(n){W(typeof n=="string","invalid ENS name; not a string","name",n),W(n.length,"invalid ENS name (empty label)","name",n);let t=Mg;const e=xg(n);for(;e.length;)t=ge(fe([t,ge(e.pop())]));return Et(t)}function JE(n,t){const e=t;return W(e<=255,"DNS encoded label cannot exceed 255","length",e),Et(fe(xg(n).map(r=>{W(r.length<=e,`label ${JSON.stringify(n)} exceeds ${e} bytes`,"name",n);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}function jl(n,t){return{address:qt(n),storageKeys:t.map((e,r)=>(W(ne(e,32),"invalid slot",`storageKeys[${r}]`,e),e.toLowerCase()))}}function js(n){if(Array.isArray(n))return n.map((e,r)=>Array.isArray(e)?(W(e.length===2,"invalid slot set",`value[${r}]`,e),jl(e[0],e[1])):(W(e!=null&&typeof e=="object","invalid address-slot set","value",n),jl(e.address,e.storageKeys)));W(n!=null&&typeof n=="object","invalid access list","value",n);const t=Object.keys(n).map(e=>{const r=n[e].reduce((i,_)=>(i[_]=!0,i),{});return jl(e,Object.keys(r).sort())});return t.sort((e,r)=>e.address.localeCompare(r.address)),t}function $E(n){let t;return typeof n=="string"?t=Qc.computePublicKey(n,!1):t=n.publicKey,qt(ge("0x"+t.substring(4)).substring(26))}function Cg(n,t){return $E(Qc.recoverPublicKey(n,t))}const Ee=BigInt(0),ZE=BigInt(2),XE=BigInt(27),tP=BigInt(28),eP=BigInt(35),rP=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),Vl=4096*32;function Ig(n,t){let e=n.toString(16);for(;e.length<2;)e="0"+e;return e+=H_(t).substring(4),"0x"+e}function uf(n){return n==="0x"?null:qt(n)}function Yl(n,t){try{return js(n)}catch(e){W(!1,e.message,t,n)}}function eu(n,t){return n==="0x"?0:Kt(n,t)}function pe(n,t){if(n==="0x")return Ee;const e=vt(n,t);return W(e<=rP,"value exceeds uint size",t,e),e}function _e(n,t){const e=vt(n,"value"),r=Te(e);return W(r.length<=32,"value too large",`tx.${t}`,e),r}function Hl(n){return js(n).map(t=>[t.address,t.storageKeys])}function nP(n,t){W(Array.isArray(n),`invalid ${t}`,"value",n);for(let e=0;e<n.length;e++)W(ne(n[e],32),"invalid ${ param } hash",`value[${e}]`,n[e]);return n}function iP(n){const t=qu(n);W(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",n);const e={type:0,nonce:eu(t[0],"nonce"),gasPrice:pe(t[1],"gasPrice"),gasLimit:pe(t[2],"gasLimit"),to:uf(t[3]),value:pe(t[4],"value"),data:Et(t[5]),chainId:Ee};if(t.length===6)return e;const r=pe(t[6],"v"),i=pe(t[7],"r"),_=pe(t[8],"s");if(i===Ee&&_===Ee)e.chainId=r;else{let a=(r-eP)/ZE;a<Ee&&(a=Ee),e.chainId=a,W(a!==Ee||r===XE||r===tP,"non-canonical legacy v","v",t[6]),e.signature=Sr.from({r:Os(t[7],32),s:Os(t[8],32),v:r})}return e}function sP(n,t){const e=[_e(n.nonce,"nonce"),_e(n.gasPrice||0,"gasPrice"),_e(n.gasLimit,"gasLimit"),n.to||"0x",_e(n.value,"value"),n.data];let r=Ee;if(n.chainId!=Ee)r=vt(n.chainId,"tx.chainId"),W(!t||t.networkV==null||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(n.signature){const _=n.signature.legacyChainId;_!=null&&(r=_)}if(!t)return r!==Ee&&(e.push(Te(r)),e.push("0x"),e.push("0x")),ks(e);let i=BigInt(27+t.yParity);return r!==Ee?i=Sr.getChainIdV(r,t.v):BigInt(t.v)!==i&&W(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(Te(i)),e.push(Te(t.r)),e.push(Te(t.s)),ks(e)}function ql(n,t){let e;try{if(e=eu(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{W(!1,"invalid yParity","yParity",t[0])}const r=Os(t[1],32),i=Os(t[2],32),_=Sr.from({r,s:i,yParity:e});n.signature=_}function _P(n){const t=qu(Yt(n).slice(1));W(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",Et(n));const e={type:2,chainId:pe(t[0],"chainId"),nonce:eu(t[1],"nonce"),maxPriorityFeePerGas:pe(t[2],"maxPriorityFeePerGas"),maxFeePerGas:pe(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:pe(t[4],"gasLimit"),to:uf(t[5]),value:pe(t[6],"value"),data:Et(t[7]),accessList:Yl(t[8],"accessList")};return t.length===9||ql(e,t.slice(9)),e}function oP(n,t){const e=[_e(n.chainId,"chainId"),_e(n.nonce,"nonce"),_e(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_e(n.maxFeePerGas||0,"maxFeePerGas"),_e(n.gasLimit,"gasLimit"),n.to||"0x",_e(n.value,"value"),n.data,Hl(n.accessList||[])];return t&&(e.push(_e(t.yParity,"yParity")),e.push(Te(t.r)),e.push(Te(t.s))),fe(["0x02",ks(e)])}function aP(n){const t=qu(Yt(n).slice(1));W(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",Et(n));const e={type:1,chainId:pe(t[0],"chainId"),nonce:eu(t[1],"nonce"),gasPrice:pe(t[2],"gasPrice"),gasLimit:pe(t[3],"gasLimit"),to:uf(t[4]),value:pe(t[5],"value"),data:Et(t[6]),accessList:Yl(t[7],"accessList")};return t.length===8||ql(e,t.slice(8)),e}function cP(n,t){const e=[_e(n.chainId,"chainId"),_e(n.nonce,"nonce"),_e(n.gasPrice||0,"gasPrice"),_e(n.gasLimit,"gasLimit"),n.to||"0x",_e(n.value,"value"),n.data,Hl(n.accessList||[])];return t&&(e.push(_e(t.yParity,"recoveryParam")),e.push(Te(t.r)),e.push(Te(t.s))),fe(["0x01",ks(e)])}function uP(n){let t=qu(Yt(n).slice(1)),e="3",r=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const _=t[1],a=t[2],c=t[3];W(Array.isArray(_),"invalid network format: blobs not an array","fields[1]",_),W(Array.isArray(a),"invalid network format: commitments not an array","fields[2]",a),W(Array.isArray(c),"invalid network format: proofs not an array","fields[3]",c),W(_.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",t),W(_.length===c.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let u=0;u<t[1].length;u++)r.push({data:_[u],commitment:a[u],proof:c[u]});t=t[0]}W(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",Et(n));const i={type:3,chainId:pe(t[0],"chainId"),nonce:eu(t[1],"nonce"),maxPriorityFeePerGas:pe(t[2],"maxPriorityFeePerGas"),maxFeePerGas:pe(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:pe(t[4],"gasLimit"),to:uf(t[5]),value:pe(t[6],"value"),data:Et(t[7]),accessList:Yl(t[8],"accessList"),maxFeePerBlobGas:pe(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),W(i.to!=null,`invalid address for transaction type: ${e}`,"data",n),W(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",n);for(let _=0;_<i.blobVersionedHashes.length;_++)W(ne(i.blobVersionedHashes[_],32),`invalid blobVersionedHash at index ${_}: must be length 32`,"data",n);return t.length===11||ql(i,t.slice(11)),i}function fP(n,t,e){const r=[_e(n.chainId,"chainId"),_e(n.nonce,"nonce"),_e(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_e(n.maxFeePerGas||0,"maxFeePerGas"),_e(n.gasLimit,"gasLimit"),n.to||qc,_e(n.value,"value"),n.data,Hl(n.accessList||[]),_e(n.maxFeePerBlobGas||0,"maxFeePerBlobGas"),nP(n.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(_e(t.yParity,"yParity")),r.push(Te(t.r)),r.push(Te(t.s)),e)?fe(["0x03",ks([r,e.map(i=>i.data),e.map(i=>i.commitment),e.map(i=>i.proof)])]):fe(["0x03",ks(r)])}const Qi=class Qi{constructor(){et(this,Ac);et(this,Ri);et(this,cc);et(this,uc);et(this,fc);et(this,lc);et(this,pc);et(this,hc);et(this,wc);et(this,dc);et(this,gc);et(this,bc);et(this,yc);et(this,M_);et(this,gs);et(this,qi);et(this,bs);K(this,Ri,null),K(this,cc,null),K(this,fc,0),K(this,lc,Ee),K(this,pc,null),K(this,hc,null),K(this,wc,null),K(this,uc,"0x"),K(this,dc,Ee),K(this,gc,Ee),K(this,bc,null),K(this,yc,null),K(this,M_,null),K(this,gs,null),K(this,bs,null),K(this,qi,null)}get type(){return m(this,Ri)}set type(t){switch(t){case null:K(this,Ri,null);break;case 0:case"legacy":K(this,Ri,0);break;case 1:case"berlin":case"eip-2930":K(this,Ri,1);break;case 2:case"london":case"eip-1559":K(this,Ri,2);break;case 3:case"cancun":case"eip-4844":K(this,Ri,3);break;default:W(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844"}return null}get to(){const t=m(this,cc);return t==null&&this.type===3?qc:t}set to(t){K(this,cc,t==null?null:qt(t))}get nonce(){return m(this,fc)}set nonce(t){K(this,fc,Kt(t,"value"))}get gasLimit(){return m(this,lc)}set gasLimit(t){K(this,lc,vt(t))}get gasPrice(){const t=m(this,pc);return t==null&&(this.type===0||this.type===1)?Ee:t}set gasPrice(t){K(this,pc,t==null?null:vt(t,"gasPrice"))}get maxPriorityFeePerGas(){const t=m(this,hc);return t??(this.type===2||this.type===3?Ee:null)}set maxPriorityFeePerGas(t){K(this,hc,t==null?null:vt(t,"maxPriorityFeePerGas"))}get maxFeePerGas(){const t=m(this,wc);return t??(this.type===2||this.type===3?Ee:null)}set maxFeePerGas(t){K(this,wc,t==null?null:vt(t,"maxFeePerGas"))}get data(){return m(this,uc)}set data(t){K(this,uc,Et(t))}get value(){return m(this,dc)}set value(t){K(this,dc,vt(t,"value"))}get chainId(){return m(this,gc)}set chainId(t){K(this,gc,vt(t))}get signature(){return m(this,bc)||null}set signature(t){K(this,bc,t==null?null:Sr.from(t))}get accessList(){const t=m(this,yc)||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){K(this,yc,t==null?null:js(t))}get maxFeePerBlobGas(){const t=m(this,M_);return t==null&&this.type===3?Ee:t}set maxFeePerBlobGas(t){K(this,M_,t==null?null:vt(t,"maxFeePerBlobGas"))}get blobVersionedHashes(){let t=m(this,gs);return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){W(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)W(ne(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}K(this,gs,t)}get blobs(){return m(this,bs)==null?null:m(this,bs).map(t=>Object.assign({},t))}set blobs(t){if(t==null){K(this,bs,null);return}const e=[],r=[];for(let i=0;i<t.length;i++){const _=t[i];if(_l(_)){ht(m(this,qi),"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let a=Yt(_);if(W(a.length<=Vl,"blob is too large",`blobs[${i}]`,_),a.length!==Vl){const l=new Uint8Array(Vl);l.set(a),a=l}const c=m(this,qi).blobToKzgCommitment(a),u=Et(m(this,qi).computeBlobKzgProof(a,c));e.push({data:Et(a),commitment:Et(c),proof:u}),r.push(Ig(1,c))}else{const a=Et(_.commitment);e.push({data:Et(_.data),commitment:a,proof:Et(_.proof)}),r.push(Ig(1,a))}}K(this,bs,e),K(this,gs,r)}get kzg(){return m(this,qi)}set kzg(t){K(this,qi,t)}get hash(){return this.signature==null?null:ge(At(this,Ac,$f).call(this,!0,!1))}get unsignedHash(){return ge(this.unsignedSerialized)}get from(){return this.signature==null?null:Cg(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:Qc.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}get serialized(){return At(this,Ac,$f).call(this,!0,!0)}get unsignedSerialized(){return At(this,Ac,$f).call(this,!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=m(this,M_)!=null||m(this,gs);this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ht(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ht(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ht(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const _=[];return this.type!=null?_.push(this.type):e?_.push(2):t?(_.push(1),r||_.push(0)):r?(_.push(1),_.push(2)):(i&&this.to||(_.push(0),_.push(1),_.push(2)),_.push(3)),_.sort(),_}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Qi.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new Qi;if(typeof t=="string"){const r=Yt(t);if(r[0]>=127)return Qi.from(iP(r));switch(r[0]){case 1:return Qi.from(aP(r));case 2:return Qi.from(_P(r));case 3:return Qi.from(uP(r))}ht(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new Qi;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=Sr.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(W(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),W(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(W(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),W(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}};Ri=new WeakMap,cc=new WeakMap,uc=new WeakMap,fc=new WeakMap,lc=new WeakMap,pc=new WeakMap,hc=new WeakMap,wc=new WeakMap,dc=new WeakMap,gc=new WeakMap,bc=new WeakMap,yc=new WeakMap,M_=new WeakMap,gs=new WeakMap,qi=new WeakMap,bs=new WeakMap,Ac=new WeakSet,$f=function(t,e){ht(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return sP(this,r);case 1:return cP(this,r);case 2:return oP(this,r);case 3:return fP(this,r,e?this.blobs:null)}ht(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})};let ff=Qi;const Ng=new Uint8Array(32);Ng.fill(0);const lP=BigInt(-1),Og=BigInt(0),kg=BigInt(1),pP=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hP(n){const t=Yt(n),e=t.length%32;return e?fe([t,Ng.slice(e)]):Et(t)}const wP=rs(kg,32),dP=rs(Og,32),Tg={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Ql=["name","version","chainId","verifyingContract","salt"];function Gg(n){return function(t){return W(typeof t=="string",`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,t),t}}const gP={name:Gg("name"),version:Gg("version"),chainId:function(n){const t=vt(n,"domain.chainId");return W(t>=0,"invalid chain ID","domain.chainId",n),Number.isSafeInteger(t)?Number(t):j_(t)},verifyingContract:function(n){try{return qt(n).toLowerCase()}catch{}W(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){const t=Yt(n,"domain.salt");return W(t.length===32,'invalid domain value "salt"',"domain.salt",n),Et(t)}};function Wl(n){{const t=n.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",r=parseInt(t[2]);W(r%8===0&&r!==0&&r<=256&&t[2]===String(r),"invalid numeric width","type",n);const i=Lc(pP,e?r-1:r),_=e?(i+kg)*lP:Og;return function(a){const c=vt(a,"value");return W(c>=_&&c<=i,`value out-of-bounds for ${n}`,"value",c),rs(e?Fw(c,256):c,32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return W(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",n),function(r){const i=Yt(r);return W(i.length===e,`invalid length for ${n}`,"value",r),hP(r)}}}switch(n){case"address":return function(t){return Os(qt(t),32)};case"bool":return function(t){return t?wP:dP};case"bytes":return function(t){return ge(t)};case"string":return function(t){return Ks(t)}}return null}function Ug(n,t){return`${n}(${t.map(({name:e,type:r})=>r+" "+e).join(",")})`}function lf(n){const t=n.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:n}}const fr=class fr{constructor(t){et(this,Vf);$(this,"primaryType");et(this,Pu);et(this,Wi);et(this,mc);K(this,Wi,new Map),K(this,mc,new Map);const e=new Map,r=new Map,i=new Map,_={};Object.keys(t).forEach(u=>{_[u]=t[u].map(({name:l,type:f})=>{let{base:d,index:y}=lf(f);return d==="int"&&!t.int&&(d="int256"),d==="uint"&&!t.uint&&(d="uint256"),{name:l,type:d+(y||"")}}),e.set(u,new Set),r.set(u,[]),i.set(u,new Set)}),K(this,Pu,JSON.stringify(_));for(const u in _){const l=new Set;for(const f of _[u]){W(!l.has(f.name),`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(u)}`,"types",t),l.add(f.name);const d=lf(f.type).base;W(d!==u,`circular type reference to ${JSON.stringify(d)}`,"types",t),!Wl(d)&&(W(r.has(d),`unknown type ${JSON.stringify(d)}`,"types",t),r.get(d).push(u),e.get(u).add(d))}}const a=Array.from(r.keys()).filter(u=>r.get(u).length===0);W(a.length!==0,"missing primary type","types",t),W(a.length===1,`ambiguous primary types or unused types: ${a.map(u=>JSON.stringify(u)).join(", ")}`,"types",t),Ct(this,{primaryType:a[0]});function c(u,l){W(!l.has(u),`circular type reference to ${JSON.stringify(u)}`,"types",t),l.add(u);for(const f of e.get(u))if(r.has(f)){c(f,l);for(const d of l)i.get(d).add(f)}l.delete(u)}c(this.primaryType,new Set);for(const[u,l]of i){const f=Array.from(l);f.sort(),m(this,Wi).set(u,Ug(u,_[u])+f.map(d=>Ug(d,_[d])).join(""))}}get types(){return JSON.parse(m(this,Pu))}getEncoder(t){let e=m(this,mc).get(t);return e||(e=At(this,Vf,tS).call(this,t),m(this,mc).set(t,e)),e}encodeType(t){const e=m(this,Wi).get(t);return W(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return ge(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(Wl(t))return r(t,e);const i=lf(t).array;if(i)return W(i.count===-1||i.count===e.length,`array length mismatch; expected length ${i.count}`,"value",e),e.map(a=>this._visit(i.prefix,a,r));const _=this.types[t];if(_)return _.reduce((a,{name:c,type:u})=>(a[c]=this._visit(u,e[c],r),a),{});W(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new fr(t)}static getPrimaryType(t){return fr.from(t).primaryType}static hashStruct(t,e,r){return fr.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){if(t[r]==null)continue;const i=Tg[r];W(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:i})}return e.sort((r,i)=>Ql.indexOf(r.name)-Ql.indexOf(i.name)),fr.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return fe(["0x1901",fr.hashDomain(t),fr.from(e).hash(r)])}static hash(t,e,r){return ge(fr.encode(t,e,r))}static async resolveNames(t,e,r,i){t=Object.assign({},t);for(const c in t)t[c]==null&&delete t[c];const _={};t.verifyingContract&&!ne(t.verifyingContract,20)&&(_[t.verifyingContract]="0x");const a=fr.from(e);a.visit(r,(c,u)=>(c==="address"&&!ne(u,20)&&(_[u]="0x"),u));for(const c in _)_[c]=await i(c);return t.verifyingContract&&_[t.verifyingContract]&&(t.verifyingContract=_[t.verifyingContract]),r=a.visit(r,(c,u)=>c==="address"&&_[u]?_[u]:u),{domain:t,value:r}}static getPayload(t,e,r){fr.hashDomain(t);const i={},_=[];Ql.forEach(u=>{const l=t[u];l!=null&&(i[u]=gP[u](l),_.push({name:u,type:Tg[u]}))});const a=fr.from(e);e=a.types;const c=Object.assign({},e);return W(c.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),c.EIP712Domain=_,a.encode(r),{types:c,domain:i,primaryType:a.primaryType,message:a.visit(r,(u,l)=>{if(u.match(/^bytes(\d*)/))return Et(Yt(l));if(u.match(/^u?int/))return vt(l).toString();switch(u){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return W(typeof l=="string","invalid string","value",l),l}W(!1,"unsupported type","type",u)})}}};Pu=new WeakMap,Wi=new WeakMap,mc=new WeakMap,Vf=new WeakSet,tS=function(t){{const i=Wl(t);if(i)return i}const e=lf(t).array;if(e){const i=e.prefix,_=this.getEncoder(i);return a=>{W(e.count===-1||e.count===a.length,`array length mismatch; expected length ${e.count}`,"value",a);let c=a.map(_);return m(this,Wi).has(i)&&(c=c.map(ge)),ge(fe(c))}}const r=this.types[t];if(r){const i=Ks(m(this,Wi).get(t));return _=>{const a=r.map(({name:c,type:u})=>{const l=this.getEncoder(u)(_[c]);return m(this,Wi).has(u)?ge(l):l});return a.unshift(i),fe(a)}}W(!1,`unknown type: ${t}`,"type",t)};let ru=fr;function Fg(n,t,e,r){return Cg(ru.hash(n,t,e),r)}function Fe(n){const t=new Set;return n.forEach(e=>t.add(e)),Object.freeze(t)}const bP=Fe("external public payable override".split(" ")),Kg="constant external internal payable private public pure view override",yP=Fe(Kg.split(" ")),Dg="constructor error event fallback function receive struct",Lg=Fe(Dg.split(" ")),jg="calldata memory storage payable indexed",AP=Fe(jg.split(" ")),mP=[Dg,jg,"tuple returns",Kg].join(" "),SP=Fe(mP.split(" ")),RP={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},EP=new RegExp("^(\\s*)"),PP=new RegExp("^([0-9]+)"),zP=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Vg=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Yg=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$"),Yf=class Yf{constructor(t){et(this,zu);et(this,Be);et(this,Ir);K(this,Be,0),K(this,Ir,t.slice())}get offset(){return m(this,Be)}get length(){return m(this,Ir).length-m(this,Be)}clone(){return new Yf(m(this,Ir))}reset(){K(this,Be,0)}popKeyword(t){const e=this.peek();if(e.type!=="KEYWORD"||!t.has(e.text))throw new Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){const e=this.peek();throw new Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=At(this,zu,vw).call(this,m(this,Be)+1,t.match+1);return K(this,Be,t.match+1),e}popParams(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=[];for(;m(this,Be)<t.match-1;){const r=this.peek().linkNext;e.push(At(this,zu,vw).call(this,m(this,Be)+1,r)),K(this,Be,r)}return K(this,Be,t.match+1),e}peek(){if(m(this,Be)>=m(this,Ir).length)throw new Error("out-of-bounds");return m(this,Ir)[m(this,Be)]}peekKeyword(t){const e=this.peekType("KEYWORD");return e!=null&&t.has(e)?e:null}peekType(t){if(this.length===0)return null;const e=this.peek();return e.type===t?e.text:null}pop(){const t=this.peek();return Gu(this,Be)._++,t}toString(){const t=[];for(let e=m(this,Be);e<m(this,Ir).length;e++){const r=m(this,Ir)[e];t.push(`${r.type}:${r.text}`)}return`<TokenString ${t.join(" ")}>`}};Be=new WeakMap,Ir=new WeakMap,zu=new WeakSet,vw=function(t=0,e=0){return new Yf(m(this,Ir).slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))};let Rr=Yf;function cs(n){const t=[],e=a=>{const c=_<n.length?JSON.stringify(n[_]):"$EOI";throw new Error(`invalid token ${c} at ${_}: ${a}`)};let r=[],i=[],_=0;for(;_<n.length;){let a=n.substring(_),c=a.match(EP);c&&(_+=c[1].length,a=n.substring(_));const u={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:_,value:-1};t.push(u);let l=RP[a[0]]||"";if(l){if(u.type=l,u.text=a[0],_++,l==="OPEN_PAREN")r.push(t.length-1),i.push(t.length-1);else if(l=="CLOSE_PAREN")r.length===0&&e("no matching open bracket"),u.match=r.pop(),t[u.match].match=t.length-1,u.depth--,u.linkBack=i.pop(),t[u.linkBack].linkNext=t.length-1;else if(l==="COMMA")u.linkBack=i.pop(),t[u.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l==="OPEN_BRACKET")u.type="BRACKET";else if(l==="CLOSE_BRACKET"){let f=t.pop().text;if(t.length>0&&t[t.length-1].type==="NUMBER"){const d=t.pop().text;f=d+f,t[t.length-1].value=Kt(d)}if(t.length===0||t[t.length-1].type!=="BRACKET")throw new Error("missing opening bracket");t[t.length-1].text+=f}continue}if(c=a.match(zP),c){if(u.text=c[1],_+=u.text.length,SP.has(u.text)){u.type="KEYWORD";continue}if(u.text.match(Yg)){u.type="TYPE";continue}u.type="ID";continue}if(c=a.match(PP),c){u.text=c[1],u.type="NUMBER",_+=u.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${_}`)}return new Rr(t.map(a=>Object.freeze(a)))}function Hg(n,t){let e=[];for(const r in t.keys())n.has(r)&&e.push(r);if(e.length>1)throw new Error(`conflicting types: ${e.join(", ")}`)}function pf(n,t){if(t.peekKeyword(Lg)){const e=t.pop().text;if(e!==n)throw new Error(`expected ${n}, got ${e}`)}return t.popType("ID")}function Ti(n,t){const e=new Set;for(;;){const r=n.peekType("KEYWORD");if(r==null||t&&!t.has(r))break;if(n.pop(),e.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);e.add(r)}return Object.freeze(e)}function qg(n){let t=Ti(n,yP);return Hg(t,Fe("constant payable nonpayable".split(" "))),Hg(t,Fe("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Gi(n,t){return n.popParams().map(e=>ve.from(e,t))}function Qg(n){if(n.peekType("AT")){if(n.pop(),n.peekType("NUMBER"))return vt(n.pop().text);throw new Error("invalid gas")}return null}function Vs(n){if(n.length)throw new Error(`unexpected tokens at offset ${n.offset}: ${n.toString()}`)}const vP=new RegExp(/^(.*)\[([0-9]*)\]$/);function Wg(n){const t=n.match(Yg);if(W(t,"invalid type","type",n),n==="uint")return"uint256";if(n==="int")return"int256";if(t[2]){const e=parseInt(t[2]);W(e!==0&&e<=32,"invalid bytes length","type",n)}else if(t[3]){const e=parseInt(t[3]);W(e!==0&&e<=256&&e%8===0,"invalid numeric width","type",n)}return n}const ae={},je=Symbol.for("_ethers_internal"),Jg="_ParamTypeInternal",$g="_ErrorInternal",Zg="_EventInternal",Xg="_ConstructorInternal",t0="_FallbackInternal",e0="_FunctionInternal",r0="_StructInternal",lr=class lr{constructor(t,e,r,i,_,a,c,u){et(this,Sc);$(this,"name");$(this,"type");$(this,"baseType");$(this,"indexed");$(this,"components");$(this,"arrayLength");$(this,"arrayChildren");if(Du(t,ae,"ParamType"),Object.defineProperty(this,je,{value:Jg}),a&&(a=Object.freeze(a.slice())),i==="array"){if(c==null||u==null)throw new Error("")}else if(c!=null||u!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");Ct(this,{name:e,type:r,baseType:i,indexed:_,components:a,arrayLength:c,arrayChildren:u})}format(t){if(t==null&&(t="sighash"),t==="json"){const r=this.name||"";if(this.isArray()){const _=JSON.parse(this.arrayChildren.format("json"));return _.name=r,_.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(_)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(_=>JSON.parse(_.format(t)))),JSON.stringify(i)}let e="";return this.isArray()?(e+=this.arrayChildren.format(t),e+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?e+="("+this.components.map(r=>r.format(t)).join(t==="full"?", ":",")+")":e+=this.type,t!=="sighash"&&(this.indexed===!0&&(e+=" indexed"),t==="full"&&this.name&&(e+=" "+this.name)),e}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return t.map(i=>r.arrayChildren.walk(i,e))}if(this.isTuple()){if(!Array.isArray(t))throw new Error("invalid tuple value");if(t.length!==this.components.length)throw new Error("array is wrong length");const r=this;return t.map((i,_)=>r.components[_].walk(i,e))}return e(this.type,t)}async walkAsync(t,e){const r=[],i=[t];return At(this,Sc,Zf).call(this,r,t,e,_=>{i[0]=_}),r.length&&await Promise.all(r),i[0]}static from(t,e){if(lr.isParamType(t))return t;if(typeof t=="string")try{return lr.from(cs(t),e)}catch{W(!1,"invalid param type","obj",t)}else if(t instanceof Rr){let c="",u="",l=null;Ti(t,Fe(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(u="tuple",l=t.popParams().map(I=>lr.from(I)),c=`tuple(${l.map(I=>I.format()).join(",")})`):(c=Wg(t.popType("TYPE")),u=c);let f=null,d=null;for(;t.length&&t.peekType("BRACKET");){const I=t.pop();f=new lr(ae,"",c,u,null,l,d,f),d=I.value,c+=I.text,u="array",l=null}let y=null;if(Ti(t,AP).has("indexed")){if(!e)throw new Error("");y=!0}const N=t.peekType("ID")?t.pop().text:"";if(t.length)throw new Error("leftover tokens");return new lr(ae,N,c,u,y,l,d,f)}const r=t.name;W(!r||typeof r=="string"&&r.match(Vg),"invalid name","obj.name",r);let i=t.indexed;i!=null&&(W(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let _=t.type,a=_.match(vP);if(a){const c=parseInt(a[2]||"-1"),u=lr.from({type:a[1],components:t.components});return new lr(ae,r||"",_,"array",i,null,c,u)}if(_==="tuple"||_.startsWith("tuple(")||_.startsWith("(")){const c=t.components!=null?t.components.map(l=>lr.from(l)):null;return new lr(ae,r||"",_,"tuple",i,c,null,null)}return _=Wg(t.type),new lr(ae,r||"",_,_,i,null,null,null)}static isParamType(t){return t&&t[je]===Jg}};Sc=new WeakSet,Zf=function(t,e,r,i){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,c=e.slice();c.forEach((u,l)=>{var f;At(f=a,Sc,Zf).call(f,t,u,r,d=>{c[l]=d})}),i(c);return}if(this.isTuple()){const a=this.components;let c;if(Array.isArray(e))c=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");c=a.map(u=>{if(!u.name)throw new Error("cannot use object value with unnamed components");if(!(u.name in e))throw new Error(`missing value for component ${u.name}`);return e[u.name]})}if(c.length!==this.components.length)throw new Error("array is wrong length");c.forEach((u,l)=>{var f;At(f=a[l],Sc,Zf).call(f,t,u,r,d=>{c[l]=d})}),i(c);return}const _=r(this.type,e);_.then?t.push(async function(){i(await _)}()):i(_)};let ve=lr;class Ys{constructor(t,e,r){$(this,"type");$(this,"inputs");Du(t,ae,"Fragment"),r=Object.freeze(r.slice()),Ct(this,{type:e,inputs:r})}static from(t){if(typeof t=="string"){try{Ys.from(JSON.parse(t))}catch{}return Ys.from(cs(t))}if(t instanceof Rr)switch(t.peekKeyword(Lg)){case"constructor":return Ui.from(t);case"error":return Ve.from(t);case"event":return Tr.from(t);case"fallback":case"receive":return Fi.from(t);case"function":return Gr.from(t);case"struct":return Hs.from(t)}else if(typeof t=="object"){switch(t.type){case"constructor":return Ui.from(t);case"error":return Ve.from(t);case"event":return Tr.from(t);case"fallback":case"receive":return Fi.from(t);case"function":return Gr.from(t);case"struct":return Hs.from(t)}ht(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}W(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return Ui.isFragment(t)}static isError(t){return Ve.isFragment(t)}static isEvent(t){return Tr.isFragment(t)}static isFunction(t){return Gr.isFragment(t)}static isStruct(t){return Hs.isFragment(t)}}class hf extends Ys{constructor(e,r,i,_){super(e,r,_);$(this,"name");W(typeof i=="string"&&i.match(Vg),"invalid identifier","name",i),_=Object.freeze(_.slice()),Ct(this,{name:i})}}function nu(n,t){return"("+t.map(e=>e.format(n)).join(n==="full"?", ":",")+")"}class Ve extends hf{constructor(t,e,r){super(t,"error",e,r),Object.defineProperty(this,je,{value:$g})}get selector(){return Ks(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("error"),e.push(this.name+nu(t,this.inputs)),e.join(" ")}static from(t){if(Ve.isFragment(t))return t;if(typeof t=="string")return Ve.from(cs(t));if(t instanceof Rr){const e=pf("error",t),r=Gi(t);return Vs(t),new Ve(ae,e,r)}return new Ve(ae,t.name,t.inputs?t.inputs.map(ve.from):[])}static isFragment(t){return t&&t[je]===$g}}class Tr extends hf{constructor(e,r,i,_){super(e,"event",r,i);$(this,"anonymous");Object.defineProperty(this,je,{value:Zg}),Ct(this,{anonymous:_})}get topicHash(){return Ks(this.format("sighash"))}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});const r=[];return e!=="sighash"&&r.push("event"),r.push(this.name+nu(e,this.inputs)),e!=="sighash"&&this.anonymous&&r.push("anonymous"),r.join(" ")}static getTopicHash(e,r){return r=(r||[]).map(_=>ve.from(_)),new Tr(ae,e,r,!1).topicHash}static from(e){if(Tr.isFragment(e))return e;if(typeof e=="string")try{return Tr.from(cs(e))}catch{W(!1,"invalid event fragment","obj",e)}else if(e instanceof Rr){const r=pf("event",e),i=Gi(e,!0),_=!!Ti(e,Fe(["anonymous"])).has("anonymous");return Vs(e),new Tr(ae,r,i,_)}return new Tr(ae,e.name,e.inputs?e.inputs.map(r=>ve.from(r,!0)):[],!!e.anonymous)}static isFragment(e){return e&&e[je]===Zg}}class Ui extends Ys{constructor(e,r,i,_,a){super(e,r,i);$(this,"payable");$(this,"gas");Object.defineProperty(this,je,{value:Xg}),Ct(this,{payable:_,gas:a})}format(e){if(ht(e!=null&&e!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),e==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e)))});const r=[`constructor${nu(e,this.inputs)}`];return this.payable&&r.push("payable"),this.gas!=null&&r.push(`@${this.gas.toString()}`),r.join(" ")}static from(e){if(Ui.isFragment(e))return e;if(typeof e=="string")try{return Ui.from(cs(e))}catch{W(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof Rr){Ti(e,Fe(["constructor"]));const r=Gi(e),i=!!Ti(e,bP).has("payable"),_=Qg(e);return Vs(e),new Ui(ae,"constructor",r,i,_)}return new Ui(ae,"constructor",e.inputs?e.inputs.map(ve.from):[],!!e.payable,e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[je]===Xg}}class Fi extends Ys{constructor(e,r,i){super(e,"fallback",r);$(this,"payable");Object.defineProperty(this,je,{value:t0}),Ct(this,{payable:i})}format(e){const r=this.inputs.length===0?"receive":"fallback";if(e==="json"){const i=this.payable?"payable":"nonpayable";return JSON.stringify({type:r,stateMutability:i})}return`${r}()${this.payable?" payable":""}`}static from(e){if(Fi.isFragment(e))return e;if(typeof e=="string")try{return Fi.from(cs(e))}catch{W(!1,"invalid fallback fragment","obj",e)}else if(e instanceof Rr){const r=e.toString(),i=e.peekKeyword(Fe(["fallback","receive"]));if(W(i,"type must be fallback or receive","obj",r),e.popKeyword(Fe(["fallback","receive"]))==="receive"){const u=Gi(e);return W(u.length===0,"receive cannot have arguments","obj.inputs",u),Ti(e,Fe(["payable"])),Vs(e),new Fi(ae,[],!0)}let a=Gi(e);a.length?W(a.length===1&&a[0].type==="bytes","invalid fallback inputs","obj.inputs",a.map(u=>u.format("minimal")).join(", ")):a=[ve.from("bytes")];const c=qg(e);if(W(c==="nonpayable"||c==="payable","fallback cannot be constants","obj.stateMutability",c),Ti(e,Fe(["returns"])).has("returns")){const u=Gi(e);W(u.length===1&&u[0].type==="bytes","invalid fallback outputs","obj.outputs",u.map(l=>l.format("minimal")).join(", "))}return Vs(e),new Fi(ae,a,c==="payable")}if(e.type==="receive")return new Fi(ae,[],!0);if(e.type==="fallback"){const r=[ve.from("bytes")],i=e.stateMutability==="payable";return new Fi(ae,r,i)}W(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[je]===t0}}class Gr extends hf{constructor(e,r,i,_,a,c){super(e,"function",r,_);$(this,"constant");$(this,"outputs");$(this,"stateMutability");$(this,"payable");$(this,"gas");Object.defineProperty(this,je,{value:e0}),a=Object.freeze(a.slice()),Ct(this,{constant:i==="view"||i==="pure",gas:c,outputs:a,payable:i==="payable",stateMutability:i})}get selector(){return Ks(this.format("sighash")).substring(0,10)}format(e){if(e==null&&(e="sighash"),e==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(i=>JSON.parse(i.format(e))),outputs:this.outputs.map(i=>JSON.parse(i.format(e)))});const r=[];return e!=="sighash"&&r.push("function"),r.push(this.name+nu(e,this.inputs)),e!=="sighash"&&(this.stateMutability!=="nonpayable"&&r.push(this.stateMutability),this.outputs&&this.outputs.length&&(r.push("returns"),r.push(nu(e,this.outputs))),this.gas!=null&&r.push(`@${this.gas.toString()}`)),r.join(" ")}static getSelector(e,r){return r=(r||[]).map(_=>ve.from(_)),new Gr(ae,e,"view",r,[],null).selector}static from(e){if(Gr.isFragment(e))return e;if(typeof e=="string")try{return Gr.from(cs(e))}catch{W(!1,"invalid function fragment","obj",e)}else if(e instanceof Rr){const i=pf("function",e),_=Gi(e),a=qg(e);let c=[];Ti(e,Fe(["returns"])).has("returns")&&(c=Gi(e));const u=Qg(e);return Vs(e),new Gr(ae,i,a,_,c,u)}let r=e.stateMutability;return r==null&&(r="payable",typeof e.constant=="boolean"?(r="view",e.constant||(r="payable",typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable"))):typeof e.payable=="boolean"&&!e.payable&&(r="nonpayable")),new Gr(ae,e.name,r,e.inputs?e.inputs.map(ve.from):[],e.outputs?e.outputs.map(ve.from):[],e.gas!=null?e.gas:null)}static isFragment(e){return e&&e[je]===e0}}class Hs extends hf{constructor(t,e,r){super(t,"struct",e,r),Object.defineProperty(this,je,{value:r0})}format(){throw new Error("@TODO")}static from(t){if(typeof t=="string")try{return Hs.from(cs(t))}catch{W(!1,"invalid struct fragment","obj",t)}else if(t instanceof Rr){const e=pf("struct",t),r=Gi(t);return Vs(t),new Hs(ae,e,r)}return new Hs(ae,t.name,t.inputs?t.inputs.map(ve.from):[])}static isFragment(t){return t&&t[je]===r0}}const Er=new Map;Er.set(0,"GENERIC_PANIC"),Er.set(1,"ASSERT_FALSE"),Er.set(17,"OVERFLOW"),Er.set(18,"DIVIDE_BY_ZERO"),Er.set(33,"ENUM_RANGE_ERROR"),Er.set(34,"BAD_STORAGE_DATA"),Er.set(49,"STACK_UNDERFLOW"),Er.set(50,"ARRAY_RANGE_ERROR"),Er.set(65,"OUT_OF_MEMORY"),Er.set(81,"UNINITIALIZED_FUNCTION_CALL");const MP=new RegExp(/^bytes([0-9]*)$/),BP=new RegExp(/^(u?int)([0-9]*)$/);let Jl=null,n0=1024;function xP(n,t,e,r){let i="missing revert data",_=null;const a=null;let c=null;if(e){i="execution reverted";const l=Yt(e);if(e=Et(e),l.length===0)i+=" (no data present; likely require(false) occurred",_="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(Et(l.slice(0,4))==="0x08c379a0")try{_=r.decode(["string"],l.slice(4))[0],c={signature:"Error(string)",name:"Error",args:[_]},i+=`: ${JSON.stringify(_)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(Et(l.slice(0,4))==="0x4e487b71")try{const f=Number(r.decode(["uint256"],l.slice(4))[0]);c={signature:"Panic(uint256)",name:"Panic",args:[f]},_=`Panic due to ${Er.get(f)||"UNKNOWN"}(${f})`,i+=`: ${_}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const u={to:t.to?qt(t.to):null,data:t.data||"0x"};return t.from&&(u.from=qt(t.from)),ce(i,"CALL_EXCEPTION",{action:n,data:e,reason:_,transaction:u,invocation:a,revert:c})}const Hf=class Hf{constructor(){et(this,ys)}getDefaultValue(t){const e=t.map(i=>At(this,ys,Kc).call(this,ve.from(i)));return new ef(e,"_").defaultValue()}encode(t,e){kw(e.length,t.length,"types/values length mismatch");const r=t.map(a=>At(this,ys,Kc).call(this,ve.from(a))),i=new ef(r,"_"),_=new ll;return i.encode(_,e),_.data}decode(t,e,r){const i=t.map(a=>At(this,ys,Kc).call(this,ve.from(a)));return new ef(i,"_").decode(new pl(e,r,n0))}static _setDefaultMaxInflation(t){W(typeof t=="number"&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),n0=t}static defaultAbiCoder(){return Jl==null&&(Jl=new Hf),Jl}static getBuiltinCallException(t,e,r){return xP(t,e,r,Hf.defaultAbiCoder())}};ys=new WeakSet,Kc=function(t){if(t.isArray())return new rE(At(this,ys,Kc).call(this,t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new ef(t.components.map(r=>At(this,ys,Kc).call(this,r)),t.name);switch(t.baseType){case"address":return new tE(t.name);case"bool":return new nE(t.name);case"string":return new lE(t.name);case"bytes":return new iE(t.name);case"":return new oE(t.name)}let e=t.type.match(BP);if(e){let r=parseInt(e[2]||"256");return W(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new fE(r/8,e[1]==="int",t.name)}if(e=t.type.match(MP),e){let r=parseInt(e[1]);return W(r!==0&&r<=32,"invalid bytes length","param",t),new sE(r,t.name)}W(!1,"invalid type","type",t.type)};let eo=Hf;class CP{constructor(t,e,r){$(this,"fragment");$(this,"name");$(this,"signature");$(this,"topic");$(this,"args");const i=t.name,_=t.format();Ct(this,{fragment:t,name:i,signature:_,topic:e,args:r})}}class IP{constructor(t,e,r,i){$(this,"fragment");$(this,"name");$(this,"args");$(this,"signature");$(this,"selector");$(this,"value");const _=t.name,a=t.format();Ct(this,{fragment:t,name:_,args:r,signature:a,selector:e,value:i})}}class NP{constructor(t,e,r){$(this,"fragment");$(this,"name");$(this,"args");$(this,"signature");$(this,"selector");const i=t.name,_=t.format();Ct(this,{fragment:t,name:i,args:r,signature:_,selector:e})}}class i0{constructor(t){$(this,"hash");$(this,"_isIndexed");Ct(this,{hash:t,_isIndexed:!0})}static isIndexed(t){return!!(t&&t._isIndexed)}}const s0={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},_0={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:n=>`reverted with reason string ${JSON.stringify(n)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:n=>{let t="unknown panic code";return n>=0&&n<=255&&s0[n.toString()]&&(t=s0[n.toString()]),`reverted with panic code 0x${n.toString(16)} (${t})`}}},B_=class B_{constructor(t){et(this,vi);$(this,"fragments");$(this,"deploy");$(this,"fallback");$(this,"receive");et(this,Ei);et(this,Pi);et(this,zi);et(this,Ce);let e=[];typeof t=="string"?e=JSON.parse(t):e=t,K(this,zi,new Map),K(this,Ei,new Map),K(this,Pi,new Map);const r=[];for(const a of e)try{r.push(Ys.from(a))}catch(c){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,c.message)}Ct(this,{fragments:Object.freeze(r)});let i=null,_=!1;K(this,Ce,this.getAbiCoder()),this.fragments.forEach((a,c)=>{let u;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}Ct(this,{deploy:a});return;case"fallback":a.inputs.length===0?_=!0:(W(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${c}]`,a),i=a,_=i.payable);return;case"function":u=m(this,zi);break;case"event":u=m(this,Pi);break;case"error":u=m(this,Ei);break;default:return}const l=a.format();u.has(l)||u.set(l,a)}),this.deploy||Ct(this,{deploy:Ui.from("constructor()")}),Ct(this,{fallback:i,receive:_})}format(t){const e=t?"minimal":"full";return this.fragments.map(i=>i.format(e))}formatJson(){const t=this.fragments.map(e=>e.format("json"));return JSON.stringify(t.map(e=>JSON.parse(e)))}getAbiCoder(){return eo.defaultAbiCoder()}getFunctionName(t){const e=At(this,vi,Xf).call(this,t,null,!1);return W(e,"no matching function","key",t),e.name}hasFunction(t){return!!At(this,vi,Xf).call(this,t,null,!1)}getFunction(t,e){return At(this,vi,Xf).call(this,t,e||null,!0)}forEachFunction(t){const e=Array.from(m(this,zi).keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(m(this,zi).get(i),r)}}getEventName(t){const e=At(this,vi,tl).call(this,t,null,!1);return W(e,"no matching event","key",t),e.name}hasEvent(t){return!!At(this,vi,tl).call(this,t,null,!1)}getEvent(t,e){return At(this,vi,tl).call(this,t,e||null,!0)}forEachEvent(t){const e=Array.from(m(this,Pi).keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(m(this,Pi).get(i),r)}}getError(t,e){if(ne(t)){const i=t.toLowerCase();if(_0[i])return Ve.from(_0[i].signature);for(const _ of m(this,Ei).values())if(i===_.selector)return _;return null}if(t.indexOf("(")===-1){const i=[];for(const[_,a]of m(this,Ei))_.split("(")[0]===t&&i.push(a);if(i.length===0)return t==="Error"?Ve.from("error Error(string)"):t==="Panic"?Ve.from("error Panic(uint256)"):null;if(i.length>1){const _=i.map(a=>JSON.stringify(a.format())).join(", ");W(!1,`ambiguous error description (i.e. ${_})`,"name",t)}return i[0]}if(t=Ve.from(t).format(),t==="Error(string)")return Ve.from("error Error(string)");if(t==="Panic(uint256)")return Ve.from("error Panic(uint256)");const r=m(this,Ei).get(t);return r||null}forEachError(t){const e=Array.from(m(this,Ei).keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(m(this,Ei).get(i),r)}}_decodeParams(t,e){return m(this,Ce).decode(t,e)}_encodeParams(t,e){return m(this,Ce).encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);W(r,"unknown error","fragment",t),t=r}return W(ue(e,0,4)===t.selector,`data signature does not match error ${t.name}.`,"data",e),this._decodeParams(t.inputs,ue(e,4))}encodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);W(r,"unknown error","fragment",t),t=r}return fe([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);W(r,"unknown function","fragment",t),t=r}return W(ue(e,0,4)===t.selector,`data signature does not match function ${t.name}.`,"data",e),this._decodeParams(t.inputs,ue(e,4))}encodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);W(r,"unknown function","fragment",t),t=r}return fe([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionResult(t,e){if(typeof t=="string"){const _=this.getFunction(t);W(_,"unknown function","fragment",t),t=_}let r="invalid length for result data";const i=ke(e);if(i.length%32===0)try{return m(this,Ce).decode(t.outputs,i)}catch{r="could not decode result data"}ht(!1,r,"BAD_DATA",{value:Et(i),info:{method:t.name,signature:t.format()}})}makeError(t,e){const r=Yt(t,"data"),i=eo.getBuiltinCallException("call",e,r);if(i.message.startsWith("execution reverted (unknown custom error)")){const c=Et(r.slice(0,4)),u=this.getError(c);if(u)try{const l=m(this,Ce).decode(u.inputs,r.slice(4));i.revert={name:u.name,signature:u.format(),args:l},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const a=this.parseTransaction(e);return a&&(i.invocation={method:a.name,signature:a.signature,args:a.args}),i}encodeFunctionResult(t,e){if(typeof t=="string"){const r=this.getFunction(t);W(r,"unknown function","fragment",t),t=r}return Et(m(this,Ce).encode(t.outputs,e||[]))}encodeFilterTopics(t,e){if(typeof t=="string"){const _=this.getEvent(t);W(_,"unknown event","eventFragment",t),t=_}ht(e.length<=t.inputs.length,`too many arguments for ${t.format()}`,"UNEXPECTED_ARGUMENT",{count:e.length,expectedCount:t.inputs.length});const r=[];t.anonymous||r.push(t.topicHash);const i=(_,a)=>_.type==="string"?Ks(a):_.type==="bytes"?ge(Et(a)):(_.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":_.type.match(/^u?int/)?a=rs(a):_.type.match(/^bytes/)?a=wS(a,32):_.type==="address"&&m(this,Ce).encode(["address"],[a]),Os(Et(a),32));for(e.forEach((_,a)=>{const c=t.inputs[a];if(!c.indexed){W(_==null,"cannot filter non-indexed parameters; must be null","contract."+c.name,_);return}_==null?r.push(null):c.baseType==="array"||c.baseType==="tuple"?W(!1,"filtering with tuples or arrays not supported","contract."+c.name,_):Array.isArray(_)?r.push(_.map(u=>i(c,u))):r.push(i(c,_))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(t,e){if(typeof t=="string"){const a=this.getEvent(t);W(a,"unknown event","eventFragment",t),t=a}const r=[],i=[],_=[];return t.anonymous||r.push(t.topicHash),W(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((a,c)=>{const u=e[c];if(a.indexed)if(a.type==="string")r.push(Ks(u));else if(a.type==="bytes")r.push(ge(u));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");r.push(m(this,Ce).encode([a.type],[u]))}else i.push(a),_.push(u)}),{data:m(this,Ce).encode(i,_),topics:r}}decodeEventLog(t,e,r){if(typeof t=="string"){const v=this.getEvent(t);W(v,"unknown event","eventFragment",t),t=v}if(r!=null&&!t.anonymous){const v=t.topicHash;W(ne(r[0],32)&&r[0].toLowerCase()===v,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],_=[],a=[];t.inputs.forEach((v,N)=>{v.indexed?v.type==="string"||v.type==="bytes"||v.baseType==="tuple"||v.baseType==="array"?(i.push(ve.from({type:"bytes32",name:v.name})),a.push(!0)):(i.push(v),a.push(!1)):(_.push(v),a.push(!1))});const c=r!=null?m(this,Ce).decode(i,fe(r)):null,u=m(this,Ce).decode(_,e,!0),l=[],f=[];let d=0,y=0;return t.inputs.forEach((v,N)=>{let I=null;if(v.indexed)if(c==null)I=new i0(null);else if(a[N])I=new i0(c[y++]);else try{I=c[y++]}catch(U){I=U}else try{I=u[d++]}catch(U){I=U}l.push(I),f.push(v.name||null)}),V_.fromItems(l,f)}parseTransaction(t){const e=Yt(t.data,"tx.data"),r=vt(t.value!=null?t.value:0,"tx.value"),i=this.getFunction(Et(e.slice(0,4)));if(!i)return null;const _=m(this,Ce).decode(i.inputs,e.slice(4));return new IP(i,i.selector,_,r)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new CP(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){const e=Et(t),r=this.getError(ue(e,0,4));if(!r)return null;const i=m(this,Ce).decode(r.inputs,ue(e,4));return new NP(r,r.selector,i)}static from(t){return t instanceof B_?t:typeof t=="string"?new B_(JSON.parse(t)):typeof t.formatJson=="function"?new B_(t.formatJson()):typeof t.format=="function"?new B_(t.format("json")):new B_(t)}};Ei=new WeakMap,Pi=new WeakMap,zi=new WeakMap,Ce=new WeakMap,vi=new WeakSet,Xf=function(t,e,r){if(ne(t)){const _=t.toLowerCase();for(const a of m(this,zi).values())if(_===a.selector)return a;return null}if(t.indexOf("(")===-1){const _=[];for(const[a,c]of m(this,zi))a.split("(")[0]===t&&_.push(c);if(e){const a=e.length>0?e[e.length-1]:null;let c=e.length,u=!0;xe.isTyped(a)&&a.type==="overrides"&&(u=!1,c--);for(let l=_.length-1;l>=0;l--){const f=_[l].inputs.length;f!==c&&(!u||f!==c-1)&&_.splice(l,1)}for(let l=_.length-1;l>=0;l--){const f=_[l].inputs;for(let d=0;d<e.length;d++)if(xe.isTyped(e[d])){if(d>=f.length){if(e[d].type==="overrides")continue;_.splice(l,1);break}if(e[d].type!==f[d].baseType){_.splice(l,1);break}}}}if(_.length===1&&e&&e.length!==_[0].inputs.length){const a=e[e.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&_.splice(0,1)}if(_.length===0)return null;if(_.length>1&&r){const a=_.map(c=>JSON.stringify(c.format())).join(", ");W(!1,`ambiguous function description (i.e. matches ${a})`,"key",t)}return _[0]}const i=m(this,zi).get(Gr.from(t).format());return i||null},tl=function(t,e,r){if(ne(t)){const _=t.toLowerCase();for(const a of m(this,Pi).values())if(_===a.topicHash)return a;return null}if(t.indexOf("(")===-1){const _=[];for(const[a,c]of m(this,Pi))a.split("(")[0]===t&&_.push(c);if(e){for(let a=_.length-1;a>=0;a--)_[a].inputs.length<e.length&&_.splice(a,1);for(let a=_.length-1;a>=0;a--){const c=_[a].inputs;for(let u=0;u<e.length;u++)if(xe.isTyped(e[u])&&e[u].type!==c[u].baseType){_.splice(a,1);break}}}if(_.length===0)return null;if(_.length>1&&r){const a=_.map(c=>JSON.stringify(c.format())).join(", ");W(!1,`ambiguous event description (i.e. matches ${a})`,"key",t)}return _[0]}const i=m(this,Pi).get(Tr.from(t).format());return i||null};let $l=B_;const o0=BigInt(0);function ro(n){return n??null}function he(n){return n==null?null:n.toString()}class a0{constructor(t,e,r){$(this,"gasPrice");$(this,"maxFeePerGas");$(this,"maxPriorityFeePerGas");Ct(this,{gasPrice:ro(t),maxFeePerGas:ro(e),maxPriorityFeePerGas:ro(r)})}toJSON(){const{gasPrice:t,maxFeePerGas:e,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:he(t),maxFeePerGas:he(e),maxPriorityFeePerGas:he(r)}}}function wf(n){const t={};n.to&&(t.to=n.to),n.from&&(t.from=n.from),n.data&&(t.data=Et(n.data));const e="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of e)!(i in n)||n[i]==null||(t[i]=vt(n[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in n)||n[i]==null||(t[i]=Kt(n[i],`request.${i}`));return n.accessList&&(t.accessList=js(n.accessList)),"blockTag"in n&&(t.blockTag=n.blockTag),"enableCcipRead"in n&&(t.enableCcipRead=!!n.enableCcipRead),"customData"in n&&(t.customData=n.customData),"blobVersionedHashes"in n&&n.blobVersionedHashes&&(t.blobVersionedHashes=n.blobVersionedHashes.slice()),"kzg"in n&&(t.kzg=n.kzg),"blobs"in n&&n.blobs&&(t.blobs=n.blobs.map(i=>_l(i)?Et(i):Object.assign({},i))),t}class OP{constructor(t,e){$(this,"provider");$(this,"number");$(this,"hash");$(this,"timestamp");$(this,"parentHash");$(this,"parentBeaconBlockRoot");$(this,"nonce");$(this,"difficulty");$(this,"gasLimit");$(this,"gasUsed");$(this,"stateRoot");$(this,"receiptsRoot");$(this,"blobGasUsed");$(this,"excessBlobGas");$(this,"miner");$(this,"prevRandao");$(this,"extraData");$(this,"baseFeePerGas");et(this,Ji);K(this,Ji,t.transactions.map(r=>typeof r!="string"?new su(r,e):r)),Ct(this,{provider:e,hash:ro(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,parentBeaconBlockRoot:t.parentBeaconBlockRoot,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,blobGasUsed:t.blobGasUsed,excessBlobGas:t.excessBlobGas,miner:t.miner,prevRandao:ro(t.prevRandao),extraData:t.extraData,baseFeePerGas:ro(t.baseFeePerGas),stateRoot:t.stateRoot,receiptsRoot:t.receiptsRoot})}get transactions(){return m(this,Ji).map(t=>typeof t=="string"?t:t.hash)}get prefetchedTransactions(){const t=m(this,Ji).slice();return t.length===0?[]:(ht(typeof t[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:e,extraData:r,gasLimit:i,gasUsed:_,hash:a,miner:c,prevRandao:u,nonce:l,number:f,parentHash:d,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:N,timestamp:I,transactions:U}=this;return{_type:"Block",baseFeePerGas:he(t),difficulty:he(e),extraData:r,gasLimit:he(i),gasUsed:he(_),blobGasUsed:he(this.blobGasUsed),excessBlobGas:he(this.excessBlobGas),hash:a,miner:c,prevRandao:u,nonce:l,number:f,parentHash:d,timestamp:I,parentBeaconBlockRoot:y,stateRoot:v,receiptsRoot:N,transactions:U}}[Symbol.iterator](){let t=0;const e=this.transactions;return{next:()=>t<this.length?{value:e[t++],done:!1}:{value:void 0,done:!0}}}get length(){return m(this,Ji).length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(t){let e;if(typeof t=="number")e=m(this,Ji)[t];else{const r=t.toLowerCase();for(const i of m(this,Ji))if(typeof i=="string"){if(i!==r)continue;e=i;break}else{if(i.hash===r)continue;e=i;break}}if(e==null)throw new Error("no such tx");return typeof e=="string"?await this.provider.getTransaction(e):e}getPrefetchedTransaction(t){const e=this.prefetchedTransactions;if(typeof t=="number")return e[t];t=t.toLowerCase();for(const r of e)if(r.hash===t)return r;W(!1,"no matching transaction","indexOrHash",t)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return kP(this)}}Ji=new WeakMap;class iu{constructor(t,e){$(this,"provider");$(this,"transactionHash");$(this,"blockHash");$(this,"blockNumber");$(this,"removed");$(this,"address");$(this,"data");$(this,"topics");$(this,"index");$(this,"transactionIndex");this.provider=e;const r=Object.freeze(t.topics.slice());Ct(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:r,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){const{address:t,blockHash:e,blockNumber:r,data:i,index:_,removed:a,topics:c,transactionHash:u,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:r,data:i,index:_,removed:a,topics:c,transactionHash:u,transactionIndex:l}}async getBlock(){const t=await this.provider.getBlock(this.blockHash);return ht(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){const t=await this.provider.getTransaction(this.transactionHash);return ht(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){const t=await this.provider.getTransactionReceipt(this.transactionHash);return ht(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return TP(this)}}class c0{constructor(t,e){$(this,"provider");$(this,"to");$(this,"from");$(this,"contractAddress");$(this,"hash");$(this,"index");$(this,"blockHash");$(this,"blockNumber");$(this,"logsBloom");$(this,"gasUsed");$(this,"blobGasUsed");$(this,"cumulativeGasUsed");$(this,"gasPrice");$(this,"blobGasPrice");$(this,"type");$(this,"status");$(this,"root");et(this,vu);K(this,vu,Object.freeze(t.logs.map(i=>new iu(i,e))));let r=o0;t.effectiveGasPrice!=null?r=t.effectiveGasPrice:t.gasPrice!=null&&(r=t.gasPrice),Ct(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:r,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return m(this,vu)}toJSON(){const{to:t,from:e,contractAddress:r,hash:i,index:_,blockHash:a,blockNumber:c,logsBloom:u,logs:l,status:f,root:d}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:c,contractAddress:r,cumulativeGasUsed:he(this.cumulativeGasUsed),from:e,gasPrice:he(this.gasPrice),blobGasUsed:he(this.blobGasUsed),blobGasPrice:he(this.blobGasPrice),gasUsed:he(this.gasUsed),hash:i,index:_,logs:l,logsBloom:u,root:d,status:f,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t<this.length?{value:this.logs[t++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const t=await this.provider.getBlock(this.blockHash);if(t==null)throw new Error("TODO");return t}async getTransaction(){const t=await this.provider.getTransaction(this.hash);if(t==null)throw new Error("TODO");return t}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return f0(this)}reorderedEvent(t){return ht(!t||t.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),u0(this,t)}}vu=new WeakMap;const sw=class sw{constructor(t,e){$(this,"provider");$(this,"blockNumber");$(this,"blockHash");$(this,"index");$(this,"hash");$(this,"type");$(this,"to");$(this,"from");$(this,"nonce");$(this,"gasLimit");$(this,"gasPrice");$(this,"maxPriorityFeePerGas");$(this,"maxFeePerGas");$(this,"maxFeePerBlobGas");$(this,"data");$(this,"value");$(this,"chainId");$(this,"signature");$(this,"accessList");$(this,"blobVersionedHashes");et(this,As);this.provider=e,this.blockNumber=t.blockNumber!=null?t.blockNumber:null,this.blockHash=t.blockHash!=null?t.blockHash:null,this.hash=t.hash,this.index=t.index,this.type=t.type,this.from=t.from,this.to=t.to||null,this.gasLimit=t.gasLimit,this.nonce=t.nonce,this.data=t.data,this.value=t.value,this.gasPrice=t.gasPrice,this.maxPriorityFeePerGas=t.maxPriorityFeePerGas!=null?t.maxPriorityFeePerGas:null,this.maxFeePerGas=t.maxFeePerGas!=null?t.maxFeePerGas:null,this.maxFeePerBlobGas=t.maxFeePerBlobGas!=null?t.maxFeePerBlobGas:null,this.chainId=t.chainId,this.signature=t.signature,this.accessList=t.accessList!=null?t.accessList:null,this.blobVersionedHashes=t.blobVersionedHashes!=null?t.blobVersionedHashes:null,K(this,As,-1)}toJSON(){const{blockNumber:t,blockHash:e,index:r,hash:i,type:_,to:a,from:c,nonce:u,data:l,signature:f,accessList:d,blobVersionedHashes:y}=this;return{_type:"TransactionResponse",accessList:d,blockNumber:t,blockHash:e,blobVersionedHashes:y,chainId:he(this.chainId),data:l,from:c,gasLimit:he(this.gasLimit),gasPrice:he(this.gasPrice),hash:i,maxFeePerGas:he(this.maxFeePerGas),maxPriorityFeePerGas:he(this.maxPriorityFeePerGas),maxFeePerBlobGas:he(this.maxFeePerBlobGas),nonce:u,signature:f,to:a,index:r,type:_,value:he(this.value)}}async getBlock(){let t=this.blockNumber;if(t==null){const r=await this.getTransaction();r&&(t=r.blockNumber)}if(t==null)return null;const e=this.provider.getBlock(t);if(e==null)throw new Error("TODO");return e}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await Oe({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(t,e){const r=t??1,i=e??0;let _=m(this,As),a=-1,c=_===-1;const u=async()=>{if(c)return null;const{blockNumber:y,nonce:v}=await Oe({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(v<this.nonce){_=y;return}if(c)return null;const N=await this.getTransaction();if(!(N&&N.blockNumber!=null))for(a===-1&&(a=_-3,a<m(this,As)&&(a=m(this,As)));a<=y;){if(c)return null;const I=await this.provider.getBlock(a,!0);if(I==null)return;for(const U of I)if(U===this.hash)return;for(let U=0;U<I.length;U++){const z=await I.getTransaction(U);if(z.from===this.from&&z.nonce===this.nonce){if(c)return null;const B=await this.provider.getTransactionReceipt(z.hash);if(B==null||y-B.blockNumber+1<r)return;let O="replaced";z.data===this.data&&z.to===this.to&&z.value===this.value?O="repriced":z.data==="0x"&&z.from===z.to&&z.value===o0&&(O="cancelled"),ht(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:O==="replaced"||O==="cancelled",reason:O,replacement:z.replaceableTransaction(_),hash:z.hash,receipt:B})}}a++}},l=y=>{if(y==null||y.status!==0)return y;ht(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:y.to,from:y.from,data:""},receipt:y})},f=await this.provider.getTransactionReceipt(this.hash);if(r===0)return l(f);if(f){if(await f.confirmations()>=r)return l(f)}else if(await u(),r===0)return null;return await new Promise((y,v)=>{const N=[],I=()=>{N.forEach(z=>z())};if(N.push(()=>{c=!0}),i>0){const z=setTimeout(()=>{I(),v(ce("wait for transaction timeout","TIMEOUT"))},i);N.push(()=>{clearTimeout(z)})}const U=async z=>{if(await z.confirmations()>=r){I();try{y(l(z))}catch(B){v(B)}}};if(N.push(()=>{this.provider.off(this.hash,U)}),this.provider.on(this.hash,U),_>=0){const z=async()=>{try{await u()}catch(B){if(ze(B,"TRANSACTION_REPLACED")){I(),v(B);return}}c||this.provider.once("block",z)};N.push(()=>{this.provider.off("block",z)}),this.provider.once("block",z)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ht(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),f0(this)}reorderedEvent(t){return ht(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ht(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),u0(this,t)}replaceableTransaction(t){W(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);const e=new sw(this,this.provider);return K(e,As,t),e}};As=new WeakMap;let su=sw;function kP(n){return{orphan:"drop-block",hash:n.hash,number:n.number}}function u0(n,t){return{orphan:"reorder-transaction",tx:n,other:t}}function f0(n){return{orphan:"drop-transaction",tx:n}}function TP(n){return{orphan:"drop-log",log:{transactionHash:n.transactionHash,blockHash:n.blockHash,blockNumber:n.blockNumber,address:n.address,data:n.data,topics:Object.freeze(n.topics.slice()),index:n.index}}}class Zl extends iu{constructor(e,r,i){super(e,e.provider);$(this,"interface");$(this,"fragment");$(this,"args");const _=r.decodeEventLog(i,e.data,e.topics);Ct(this,{args:_,fragment:i,interface:r})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class l0 extends iu{constructor(e,r){super(e,e.provider);$(this,"error");Ct(this,{error:r})}}class GP extends c0{constructor(e,r,i){super(i,r);et(this,Rc);K(this,Rc,e)}get logs(){return super.logs.map(e=>{const r=e.topics.length?m(this,Rc).getEvent(e.topics[0]):null;if(r)try{return new Zl(e,m(this,Rc),r)}catch(i){return new l0(e,i)}return e})}}Rc=new WeakMap;class Xl extends su{constructor(e,r,i){super(i,r);et(this,Mu);K(this,Mu,e)}async wait(e,r){const i=await super.wait(e,r);return i==null?null:new GP(m(this,Mu),this.provider,i)}}Mu=new WeakMap;class p0 extends jw{constructor(e,r,i,_){super(e,r,i);$(this,"log");Ct(this,{log:_})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class UP extends p0{constructor(t,e,r,i,_){super(t,e,r,new Zl(_,t.interface,i));const a=t.interface.decodeEventLog(i,this.log.data,this.log.topics);Ct(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const h0=BigInt(0);function w0(n){return n&&typeof n.call=="function"}function d0(n){return n&&typeof n.estimateGas=="function"}function df(n){return n&&typeof n.resolveName=="function"}function g0(n){return n&&typeof n.sendTransaction=="function"}function b0(n){if(n!=null){if(df(n))return n;if(n.provider)return n.provider}}class FP{constructor(t,e,r){et(this,Bu);$(this,"fragment");if(Ct(this,{fragment:e}),e.inputs.length<r.length)throw new Error("too many arguments");const i=qs(t.runner,"resolveName"),_=df(i)?i:null;K(this,Bu,async function(){const a=await Promise.all(e.inputs.map((c,u)=>r[u]==null?null:c.walkAsync(r[u],(f,d)=>f==="address"?Array.isArray(d)?Promise.all(d.map(y=>Ue(y,_))):Ue(d,_):d)));return t.interface.encodeFilterTopics(e,a)}())}getTopicFilter(){return m(this,Bu)}}Bu=new WeakMap;function qs(n,t){return n==null?null:typeof n[t]=="function"?n:n.provider&&typeof n.provider[t]=="function"?n.provider:null}function Qs(n){return n==null?null:n.provider||null}async function y0(n,t){const e=xe.dereference(n,"overrides");W(typeof e=="object","invalid overrides parameter","overrides",n);const r=wf(e);return W(r.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),W(r.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function KP(n,t,e){const r=qs(n,"resolveName"),i=df(r)?r:null;return await Promise.all(t.map((_,a)=>_.walkAsync(e[a],(c,u)=>(u=xe.dereference(u,c),c==="address"?Ue(u,i):u))))}function DP(n){const t=async function(a){const c=await y0(a,["data"]);c.to=await n.getAddress(),c.from&&(c.from=await Ue(c.from,b0(n.runner)));const u=n.interface,l=vt(c.value||h0,"overrides.value")===h0,f=(c.data||"0x")==="0x";u.fallback&&!u.fallback.payable&&u.receive&&!f&&!l&&W(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),W(u.fallback||f,"cannot send data to receive-only contract","overrides.data",c.data);const d=u.receive||u.fallback&&u.fallback.payable;return W(d||l,"cannot send value to non-payable fallback","overrides.value",c.value),W(u.fallback||f,"cannot send data to receive-only contract","overrides.data",c.data),c},e=async function(a){const c=qs(n.runner,"call");ht(w0(c),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const u=await t(a);try{return await c.call(u)}catch(l){throw sl(l)&&l.data?n.interface.makeError(l.data,u):l}},r=async function(a){const c=n.runner;ht(g0(c),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const u=await c.sendTransaction(await t(a)),l=Qs(n.runner);return new Xl(n.interface,l,u)},i=async function(a){const c=qs(n.runner,"estimateGas");return ht(d0(c),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await c.estimateGas(await t(a))},_=async a=>await r(a);return Ct(_,{_contract:n,estimateGas:i,populateTransaction:t,send:r,staticCall:e}),_}function LP(n,t){const e=function(...l){const f=n.interface.getFunction(t,l);return ht(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:l}}),f},r=async function(...l){const f=e(...l);let d={};if(f.inputs.length+1===l.length&&(d=await y0(l.pop()),d.from&&(d.from=await Ue(d.from,b0(n.runner)))),f.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const y=await KP(n.runner,f.inputs,l);return Object.assign({},d,await Oe({to:n.getAddress(),data:n.interface.encodeFunctionData(f,y)}))},i=async function(...l){const f=await c(...l);return f.length===1?f[0]:f},_=async function(...l){const f=n.runner;ht(g0(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const d=await f.sendTransaction(await r(...l)),y=Qs(n.runner);return new Xl(n.interface,y,d)},a=async function(...l){const f=qs(n.runner,"estimateGas");return ht(d0(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await r(...l))},c=async function(...l){const f=qs(n.runner,"call");ht(w0(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const d=await r(...l);let y="0x";try{y=await f.call(d)}catch(N){throw sl(N)&&N.data?n.interface.makeError(N.data,d):N}const v=e(...l);return n.interface.decodeFunctionResult(v,y)},u=async(...l)=>e(...l).constant?await i(...l):await _(...l);return Ct(u,{name:n.interface.getFunctionName(t),_contract:n,_key:t,getFragment:e,estimateGas:a,populateTransaction:r,send:_,staticCall:i,staticCallResult:c}),Object.defineProperty(u,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=n.interface.getFunction(t);return ht(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),l}}),u}function jP(n,t){const e=function(...i){const _=n.interface.getEvent(t,i);return ht(_,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:i}}),_},r=function(...i){return new FP(n,e(...i),i)};return Ct(r,{name:n.interface.getEventName(t),_contract:n,_key:t,getFragment:e}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=n.interface.getEvent(t);return ht(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),i}}),r}const gf=Symbol.for("_ethersInternal_contract"),A0=new WeakMap;function VP(n,t){A0.set(n[gf],t)}function We(n){return A0.get(n[gf])}function YP(n){return n&&typeof n=="object"&&"getTopicFilter"in n&&typeof n.getTopicFilter=="function"&&n.fragment}async function tp(n,t){let e,r=null;if(Array.isArray(t)){const _=function(a){if(ne(a,32))return a;const c=n.interface.getEvent(a);return W(c,"unknown fragment","name",a),c.topicHash};e=t.map(a=>a==null?null:Array.isArray(a)?a.map(_):_(a))}else t==="*"?e=[null]:typeof t=="string"?ne(t,32)?e=[t]:(r=n.interface.getEvent(t),W(r,"unknown fragment","event",t),e=[r.topicHash]):YP(t)?e=await t.getTopicFilter():"fragment"in t?(r=t.fragment,e=[r.topicHash]):W(!1,"unknown event name","event",t);e=e.map(_=>{if(_==null)return null;if(Array.isArray(_)){const a=Array.from(new Set(_.map(c=>c.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return _.toLowerCase()});const i=e.map(_=>_==null?"null":Array.isArray(_)?_.join("|"):_).join("&");return{fragment:r,tag:i,topics:e}}async function _u(n,t){const{subs:e}=We(n);return e.get((await tp(n,t)).tag)||null}async function m0(n,t,e){const r=Qs(n.runner);ht(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:_,topics:a}=await tp(n,e),{addr:c,subs:u}=We(n);let l=u.get(_);if(!l){const d={address:c||n,topics:a},y=U=>{let z=i;if(z==null)try{z=n.interface.getEvent(U.topics[0])}catch{}if(z){const B=z,O=i?n.interface.decodeEventLog(i,U.data,U.topics):[];rp(n,e,O,C=>new UP(n,C,e,B,U))}else rp(n,e,[],B=>new p0(n,B,e,U))};let v=[];l={tag:_,listeners:[],start:()=>{v.length||v.push(r.on(d,y))},stop:async()=>{if(v.length==0)return;let U=v;v=[],await Promise.all(U),r.off(d,y)}},u.set(_,l)}return l}let ep=Promise.resolve();async function HP(n,t,e,r){await ep;const i=await _u(n,t);if(!i)return!1;const _=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:c})=>{const u=Array.from(e);r&&u.push(r(c?null:a));try{a.call(n,...u)}catch{}return!c}),i.listeners.length===0&&(i.stop(),We(n).subs.delete(i.tag)),_>0}async function rp(n,t,e,r){try{await ep}catch{}const i=HP(n,t,e,r);return ep=i,await i}const bf=["then"];$m=gf;const xu=class xu{constructor(t,e,r,i){$(this,"target");$(this,"interface");$(this,"runner");$(this,"filters");$(this,$m);$(this,"fallback");W(typeof t=="string"||Xd(t),"invalid value for Contract target","target",t),r==null&&(r=null);const _=$l.from(e);Ct(this,{target:t,runner:r,interface:_}),Object.defineProperty(this,gf,{value:{}});let a,c=null,u=null;if(i){const d=Qs(r);u=new Xl(this.interface,d,i)}let l=new Map;if(typeof t=="string")if(ne(t))c=t,a=Promise.resolve(t);else{const d=qs(r,"resolveName");if(!df(d))throw ce("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=d.resolveName(t).then(y=>{if(y==null)throw ce("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return We(this).addr=y,y})}else a=t.getAddress().then(d=>{if(d==null)throw new Error("TODO");return We(this).addr=d,d});VP(this,{addrPromise:a,addr:c,deployTx:u,subs:l});const f=new Proxy({},{get:(d,y,v)=>{if(typeof y=="symbol"||bf.indexOf(y)>=0)return Reflect.get(d,y,v);try{return this.getEvent(y)}catch(N){if(!ze(N,"INVALID_ARGUMENT")||N.argument!=="key")throw N}},has:(d,y)=>bf.indexOf(y)>=0?Reflect.has(d,y):Reflect.has(d,y)||this.interface.hasEvent(String(y))});return Ct(this,{filters:f}),Ct(this,{fallback:_.receive||_.fallback?DP(this):null}),new Proxy(this,{get:(d,y,v)=>{if(typeof y=="symbol"||y in d||bf.indexOf(y)>=0)return Reflect.get(d,y,v);try{return d.getFunction(y)}catch(N){if(!ze(N,"INVALID_ARGUMENT")||N.argument!=="key")throw N}},has:(d,y)=>typeof y=="symbol"||y in d||bf.indexOf(y)>=0?Reflect.has(d,y):d.interface.hasFunction(y)})}connect(t){return new xu(this.target,this.interface,t)}attach(t){return new xu(t,this.interface,this.runner)}async getAddress(){return await We(this).addrPromise}async getDeployedCode(){const t=Qs(this.runner);ht(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const e=await t.getCode(await this.getAddress());return e==="0x"?null:e}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=Qs(this.runner);return ht(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,_)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",a)}catch(c){_(c)}};a()})}deploymentTransaction(){return We(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),LP(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),jP(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,e,r){e==null&&(e=0),r==null&&(r="latest");const{addr:i,addrPromise:_}=We(this),a=i||await _,{fragment:c,topics:u}=await tp(this,t),l={address:a,topics:u,fromBlock:e,toBlock:r},f=Qs(this.runner);return ht(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(l)).map(d=>{let y=c;if(y==null)try{y=this.interface.getEvent(d.topics[0])}catch{}if(y)try{return new Zl(d,this.interface,y)}catch(v){return new l0(d,v)}return new iu(d,f)})}async on(t,e){const r=await m0(this,"on",t);return r.listeners.push({listener:e,once:!1}),r.start(),this}async once(t,e){const r=await m0(this,"once",t);return r.listeners.push({listener:e,once:!0}),r.start(),this}async emit(t,...e){return await rp(this,t,e,null)}async listenerCount(t){if(t){const i=await _u(this,t);return i?i.listeners.length:0}const{subs:e}=We(this);let r=0;for(const{listeners:i}of e.values())r+=i.length;return r}async listeners(t){if(t){const i=await _u(this,t);return i?i.listeners.map(({listener:_})=>_):[]}const{subs:e}=We(this);let r=[];for(const{listeners:i}of e.values())r=r.concat(i.map(({listener:_})=>_));return r}async off(t,e){const r=await _u(this,t);if(!r)return this;if(e){const i=r.listeners.map(({listener:_})=>_).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(e==null||r.listeners.length===0)&&(r.stop(),We(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){const e=await _u(this,t);if(!e)return this;e.stop(),We(this).subs.delete(e.tag)}else{const{subs:e}=We(this);for(const{tag:r,stop:i}of e.values())i(),e.delete(r)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends xu{constructor(i,_=null){super(i,t,_)}}return e}static from(t,e,r){return r==null&&(r=null),new this(t,e,r)}};let np=xu;function qP(){return np}class Pr extends qP(){}function ip(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):W(!1,"unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}class QP{constructor(t){$(this,"name");Ct(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const S0=new RegExp("^(ipfs)://(.*)$","i"),R0=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),S0,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")],Ec=class Ec{constructor(t,e,r){et(this,Ss);$(this,"provider");$(this,"address");$(this,"name");et(this,ms);et(this,x_);Ct(this,{provider:t,address:e,name:r}),K(this,ms,null),K(this,x_,new Pr(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t))}async supportsWildcard(){return m(this,ms)==null&&K(this,ms,(async()=>{try{return await m(this,x_).supportsInterface("0x9061b923")}catch(t){if(ze(t,"CALL_EXCEPTION"))return!1;throw K(this,ms,null),t}})()),await m(this,ms)}async getAddress(t){if(t==null&&(t=60),t===60)try{const _=await At(this,Ss,Dc).call(this,"addr(bytes32)");return _==null||_===qc?null:_}catch(_){if(ze(_,"CALL_EXCEPTION"))return null;throw _}if(t>=0&&t<2147483648){let _=t+2147483648;const a=await At(this,Ss,Dc).call(this,"addr(bytes32,uint)",[_]);if(ne(a,20))return qt(a)}let e=null;for(const _ of this.provider.plugins)if(_ instanceof QP&&_.supportsCoinType(t)){e=_;break}if(e==null)return null;const r=await At(this,Ss,Dc).call(this,"addr(bytes32,uint)",[t]);if(r==null||r==="0x")return null;const i=await e.decodeAddress(t,r);if(i!=null)return i;ht(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:r}})}async getText(t){const e=await At(this,Ss,Dc).call(this,"text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await At(this,Ss,Dc).call(this,"contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const i=e[1]==="e3010170"?"ipfs":"ipns",_=parseInt(e[4],16);if(e[5].length===_*2)return`${i}://${bS("0x"+e[2])}`}const r=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ht(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let r=0;r<R0.length;r++){const i=e.match(R0[r]);if(i==null)continue;const _=i[1].toLowerCase();switch(_){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const a=ip(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:a}),{linkage:t,url:a}}case"erc721":case"erc1155":{const a=_==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:_,value:e});const c=await this.getAddress();if(c==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const u=(i[2]||"").split("/");if(u.length!==2)return t.push({type:`!${_}caip`,value:i[2]||""}),{url:null,linkage:t};const l=u[1],f=new Pr(u[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(_==="erc721"){const I=await f.ownerOf(l);if(c!==I)return t.push({type:"!owner",value:I}),{url:null,linkage:t};t.push({type:"owner",value:I})}else if(_==="erc1155"){const I=await f.balanceOf(c,l);if(!I)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:I.toString()})}let d=await f[a](l);if(d==null||d==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:d}),_==="erc1155"&&(d=d.replace("{id}",rs(l,32).substring(2)),t.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=ip(d)),t.push({type:"metadata-url",value:d});let y={};const v=await new Ii(d).send();v.assertOk();try{y=v.bodyJson}catch{try{t.push({type:"!metadata",value:v.bodyText})}catch{const z=v.body;return z&&t.push({type:"!metadata",value:Et(z)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!y)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(y)});let N=y.image;if(typeof N!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!N.match(/^(https:\/\/|data:)/i)){if(N.match(S0)==null)return t.push({type:"!imageUrl-ipfs",value:N}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:N}),N=ip(N)}return t.push({type:"url",value:N}),{linkage:t,url:N}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),r=e.getPlugin("org.ethers.plugins.network.Ens");return ht(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),r.address}static async fromName(t,e){var i;let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const _=await At(i=Ec,qf,eS).call(i,t,r);if(_!=null){const a=new Ec(t,_,e);return r!==e&&!await a.supportsWildcard()?null:a}r=r.split(".").slice(1).join(".")}}};ms=new WeakMap,x_=new WeakMap,Ss=new WeakSet,Dc=async function(t,e){e=(e||[]).slice();const r=m(this,x_).interface;e.unshift(Ll(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(t),ht(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[JE(this.name,255),r.encodeFunctionData(i,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const _=await m(this,x_)[t](...e);return i?r.decodeFunctionResult(i,_)[0]:_}catch(_){if(!ze(_,"CALL_EXCEPTION"))throw _}return null},qf=new WeakSet,eS=async function(t,e){const r=await Ec.getEnsAddress(t);try{const _=await new Pr(r,["function resolver(bytes32) view returns (address)"],t).resolver(Ll(e),{enableCcipRead:!0});return _===qc?null:_}catch(i){throw i}return null},et(Ec,qf);let yf=Ec;const E0=BigInt(0);function jt(n,t){return function(e){return e==null?t:n(e)}}function Af(n,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>n(r))}}function ou(n,t){return e=>{const r={};for(const i in n){let _=i;if(t&&i in t&&!(_ in e)){for(const a of t[i])if(a in e){_=a;break}}try{const a=n[i](e[_]);a!==void 0&&(r[i]=a)}catch(a){const c=a instanceof Error?a.message:"not-an-error";ht(!1,`invalid value for value.${i} (${c})`,"BAD_DATA",{value:e})}}return r}}function WP(n){switch(n){case!0:case"true":return!0;case!1:case"false":return!1}W(!1,`invalid boolean; ${JSON.stringify(n)}`,"value",n)}function no(n){return W(ne(n,!0),"invalid data","value",n),n}function Me(n){return W(ne(n,32),"invalid hash","value",n),n}const JP=ou({address:qt,blockHash:Me,blockNumber:Kt,data:no,index:Kt,removed:jt(WP,!1),topics:Af(Me),transactionHash:Me,transactionIndex:Kt},{index:["logIndex"]});function $P(n){return JP(n)}const ZP=ou({hash:jt(Me),parentHash:Me,parentBeaconBlockRoot:jt(Me,null),number:Kt,timestamp:Kt,nonce:jt(no),difficulty:vt,gasLimit:vt,gasUsed:vt,stateRoot:jt(Me,null),receiptsRoot:jt(Me,null),blobGasUsed:jt(vt,null),excessBlobGas:jt(vt,null),miner:jt(qt),prevRandao:jt(Me,null),extraData:no,baseFeePerGas:jt(vt)},{prevRandao:["mixHash"]});function XP(n){const t=ZP(n);return t.transactions=n.transactions.map(e=>typeof e=="string"?e:P0(e)),t}const tz=ou({transactionIndex:Kt,blockNumber:Kt,transactionHash:Me,address:qt,topics:Af(Me),data:no,index:Kt,blockHash:Me},{index:["logIndex"]});function ez(n){return tz(n)}const rz=ou({to:jt(qt,null),from:jt(qt,null),contractAddress:jt(qt,null),index:Kt,root:jt(Et),gasUsed:vt,blobGasUsed:jt(vt,null),logsBloom:jt(no),blockHash:Me,hash:Me,logs:Af(ez),blockNumber:Kt,cumulativeGasUsed:vt,effectiveGasPrice:jt(vt),blobGasPrice:jt(vt,null),status:jt(Kt),type:jt(Kt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function nz(n){return rz(n)}function P0(n){n.to&&vt(n.to)===E0&&(n.to="0x0000000000000000000000000000000000000000");const t=ou({hash:Me,index:jt(Kt,void 0),type:e=>e==="0x"||e==null?0:Kt(e),accessList:jt(js,null),blobVersionedHashes:jt(Af(Me,!0),null),blockHash:jt(Me,null),blockNumber:jt(Kt,null),transactionIndex:jt(Kt,null),from:qt,gasPrice:jt(vt),maxPriorityFeePerGas:jt(vt),maxFeePerGas:jt(vt),maxFeePerBlobGas:jt(vt,null),gasLimit:vt,to:jt(qt,null),value:vt,nonce:Kt,data:no,creates:jt(qt,null),chainId:jt(vt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(n);if(t.to==null&&t.creates==null&&(t.creates=XR(t)),(n.type===1||n.type===2)&&n.accessList==null&&(t.accessList=[]),n.signature?t.signature=Sr.from(n.signature):t.signature=Sr.from(n),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&vt(t.blockHash)===E0&&(t.blockHash=null),t}const iz="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class au{constructor(t){$(this,"name");Ct(this,{name:t})}clone(){return new au(this.name)}}class mf extends au{constructor(e,r){e==null&&(e=0);super(`org.ethers.network.plugins.GasCost#${e||0}`);$(this,"effectiveBlock");$(this,"txBase");$(this,"txCreate");$(this,"txDataZero");$(this,"txDataNonzero");$(this,"txAccessListStorageKey");$(this,"txAccessListAddress");const i={effectiveBlock:e};function _(a,c){let u=(r||{})[a];u==null&&(u=c),W(typeof u=="number",`invalud value for ${a}`,"costs",r),i[a]=u}_("txBase",21e3),_("txCreate",32e3),_("txDataZero",4),_("txDataNonzero",16),_("txAccessListStorageKey",1900),_("txAccessListAddress",2400),Ct(this,i)}clone(){return new mf(this.effectiveBlock,this)}}class Sf extends au{constructor(e,r){super("org.ethers.plugins.network.Ens");$(this,"address");$(this,"targetNetwork");Ct(this,{address:e||iz,targetNetwork:r??1})}clone(){return new Sf(this.address,this.targetNetwork)}}class sz extends au{constructor(e,r){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin");et(this,Cu);et(this,Iu);K(this,Cu,e),K(this,Iu,r)}get url(){return m(this,Cu)}get processFunc(){return m(this,Iu)}clone(){return this}}Cu=new WeakMap,Iu=new WeakMap;const sp=new Map,vc=class vc{constructor(t,e){et(this,Pc);et(this,zc);et(this,Rs);K(this,Pc,t),K(this,zc,vt(e)),K(this,Rs,new Map)}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return m(this,Pc)}set name(t){K(this,Pc,t)}get chainId(){return m(this,zc)}set chainId(t){K(this,zc,vt(t,"chainId"))}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===vt(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===vt(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===vt(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(m(this,Rs).values())}attachPlugin(t){if(m(this,Rs).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return m(this,Rs).set(t.name,t.clone()),this}getPlugin(t){return m(this,Rs).get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new vc(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new mf;let r=e.txBase;if(t.to==null&&(r+=e.txCreate),t.data)for(let i=2;i<t.data.length;i+=2)t.data.substring(i,i+2)==="00"?r+=e.txDataZero:r+=e.txDataNonzero;if(t.accessList){const i=js(t.accessList);for(const _ in i)r+=e.txAccessListAddress+e.txAccessListStorageKey*i[_].storageKeys.length}return r}static from(t){if(_z(),t==null)return vc.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=sp.get(t);if(e)return e();if(typeof t=="bigint")return new vc("unknown",t);W(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){W(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new vc(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new Sf(t.ensAddress,t.ensNetwork)),e}W(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const r=sp.get(t);r&&W(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",t),sp.set(t,e)}};Pc=new WeakMap,zc=new WeakMap,Rs=new WeakMap;let Ur=vc;function z0(n,t){const e=String(n);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${n}`);const r=e.split(".");if(r.length===1&&r.push(""),r.length!==2)throw new Error(`invalid gwei value: ${n}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function v0(n){return new sz(n,async(t,e,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[_,a]=await Promise.all([r.send(),t()]);i=_;const c=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:z0(c.maxFee,9),maxPriorityFeePerGas:z0(c.maxPriorityFee,9)}}catch(_){ht(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:_})}})}let M0=!1;function _z(){if(M0)return;M0=!0;function n(t,e,r){const i=function(){const _=new Ur(t,e);return r.ensNetwork!=null&&_.attachPlugin(new Sf(null,r.ensNetwork)),_.attachPlugin(new mf),(r.plugins||[]).forEach(a=>{_.attachPlugin(a)}),_};Ur.register(t,i),Ur.register(e,i),r.altNames&&r.altNames.forEach(_=>{Ur.register(_,i)})}n("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),n("ropsten",3,{ensNetwork:3}),n("rinkeby",4,{ensNetwork:4}),n("goerli",5,{ensNetwork:5}),n("kovan",42,{ensNetwork:42}),n("sepolia",11155111,{ensNetwork:11155111}),n("holesky",17e3,{ensNetwork:17e3}),n("classic",61,{}),n("classicKotti",6,{}),n("arbitrum",42161,{ensNetwork:1}),n("arbitrum-goerli",421613,{}),n("arbitrum-sepolia",421614,{}),n("base",8453,{ensNetwork:1}),n("base-goerli",84531,{}),n("base-sepolia",84532,{}),n("bnb",56,{ensNetwork:1}),n("bnbt",97,{}),n("linea",59144,{ensNetwork:1}),n("linea-goerli",59140,{}),n("linea-sepolia",59141,{}),n("matic",137,{ensNetwork:1,plugins:[v0("https://gasstation.polygon.technology/v2")]}),n("matic-amoy",80002,{}),n("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[v0("https://gasstation-testnet.polygon.technology/v2")]}),n("optimism",10,{ensNetwork:1,plugins:[]}),n("optimism-goerli",420,{}),n("optimism-sepolia",11155420,{}),n("xdai",100,{ensNetwork:1})}function _p(n){return JSON.parse(JSON.stringify(n))}class oz{constructor(t){et(this,Mc);et(this,$i);et(this,pr);et(this,Es);et(this,Mi);K(this,$i,t),K(this,pr,null),K(this,Es,4e3),K(this,Mi,-2)}get pollingInterval(){return m(this,Es)}set pollingInterval(t){K(this,Es,t)}start(){m(this,pr)||(K(this,pr,m(this,$i)._setTimeout(At(this,Mc,el).bind(this),m(this,Es))),At(this,Mc,el).call(this))}stop(){m(this,pr)&&(m(this,$i)._clearTimeout(m(this,pr)),K(this,pr,null))}pause(t){this.stop(),t&&K(this,Mi,-2)}resume(){this.start()}}$i=new WeakMap,pr=new WeakMap,Es=new WeakMap,Mi=new WeakMap,Mc=new WeakSet,el=async function(){try{const t=await m(this,$i).getBlockNumber();if(m(this,Mi)===-2){K(this,Mi,t);return}if(t!==m(this,Mi)){for(let e=m(this,Mi)+1;e<=t;e++){if(m(this,pr)==null)return;await m(this,$i).emit("block",e)}K(this,Mi,t)}}catch{}m(this,pr)!=null&&K(this,pr,m(this,$i)._setTimeout(At(this,Mc,el).bind(this),m(this,Es)))};class op{constructor(t){et(this,C_);et(this,I_);et(this,Ps);K(this,C_,t),K(this,Ps,!1),K(this,I_,e=>{this._poll(e,m(this,C_))})}async _poll(t,e){throw new Error("sub-classes must override this")}start(){m(this,Ps)||(K(this,Ps,!0),m(this,I_).call(this,-2),m(this,C_).on("block",m(this,I_)))}stop(){m(this,Ps)&&(K(this,Ps,!1),m(this,C_).off("block",m(this,I_)))}pause(t){this.stop()}resume(){this.start()}}C_=new WeakMap,I_=new WeakMap,Ps=new WeakMap;class az extends op{constructor(e,r){super(e);et(this,Bc);et(this,Zi);K(this,Bc,r),K(this,Zi,-2)}pause(e){e&&K(this,Zi,-2),super.pause(e)}async _poll(e,r){const i=await r.getBlock(m(this,Bc));i!=null&&(m(this,Zi)===-2?K(this,Zi,i.number):i.number>m(this,Zi)&&(r.emit(m(this,Bc),i.number),K(this,Zi,i.number)))}}Bc=new WeakMap,Zi=new WeakMap;class cz extends op{constructor(e,r){super(e);et(this,Qf);K(this,Qf,_p(r))}async _poll(e,r){throw new Error("@TODO")}}Qf=new WeakMap;class uz extends op{constructor(e,r){super(e);et(this,xc);K(this,xc,r)}async _poll(e,r){const i=await r.getTransactionReceipt(m(this,xc));i&&r.emit(m(this,xc),i)}}xc=new WeakMap;class ap{constructor(t,e){et(this,Wf);et(this,Xi);et(this,Cc);et(this,Ic);et(this,zs);et(this,hr);K(this,Xi,t),K(this,Cc,_p(e)),K(this,Ic,At(this,Wf,rS).bind(this)),K(this,zs,!1),K(this,hr,-2)}start(){m(this,zs)||(K(this,zs,!0),m(this,hr)===-2&&m(this,Xi).getBlockNumber().then(t=>{K(this,hr,t)}),m(this,Xi).on("block",m(this,Ic)))}stop(){m(this,zs)&&(K(this,zs,!1),m(this,Xi).off("block",m(this,Ic)))}pause(t){this.stop(),t&&K(this,hr,-2)}resume(){this.start()}}Xi=new WeakMap,Cc=new WeakMap,Ic=new WeakMap,zs=new WeakMap,hr=new WeakMap,Wf=new WeakSet,rS=async function(t){if(m(this,hr)===-2)return;const e=_p(m(this,Cc));e.fromBlock=m(this,hr)+1,e.toBlock=t;const r=await m(this,Xi).getLogs(e);if(r.length===0){m(this,hr)<t-60&&K(this,hr,t-60);return}for(const i of r)m(this,Xi).emit(m(this,Cc),i),K(this,hr,i.blockNumber)};const fz=BigInt(2),lz=10;function Rf(n){return n&&typeof n.then=="function"}function Ef(n,t){return n+":"+JSON.stringify(t,(e,r)=>{if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((_,a)=>(_[a]=r[a],_),{})}return r})}class B0{constructor(t){$(this,"name");Ct(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function pz(n){return JSON.parse(JSON.stringify(n))}function cp(n){return n=Array.from(new Set(n).values()),n.sort(),n}async function up(n,t){if(n==null)throw new Error("invalid event");if(Array.isArray(n)&&(n={topics:n}),typeof n=="string")switch(n){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:n,tag:n}}if(ne(n,32)){const e=n.toLowerCase();return{type:"transaction",tag:Ef("tx",{hash:e}),hash:e}}if(n.orphan){const e=n;return{type:"orphan",tag:Ef("orphan",e),filter:pz(e)}}if(n.address||n.topics){const e=n,r={topics:(e.topics||[]).map(i=>i==null?null:Array.isArray(i)?cp(i.map(_=>_.toLowerCase())):i.toLowerCase())};if(e.address){const i=[],_=[],a=c=>{ne(c)?i.push(c):_.push((async()=>{i.push(await Ue(c,t))})())};Array.isArray(e.address)?e.address.forEach(a):a(e.address),_.length&&await Promise.all(_),r.address=cp(i.map(c=>c.toLowerCase()))}return{filter:r,tag:Ef("event",r),type:"event"}}W(!1,"unknown ProviderEvent","event",n)}function fp(){return new Date().getTime()}const hz={cacheTimeout:250,pollingInterval:4e3};class wz{constructor(t,e){et(this,Dt);et(this,Ie);et(this,vs);et(this,Ne);et(this,Nc);et(this,tr);et(this,N_);et(this,Ms);et(this,ts);et(this,Nu);et(this,wr);et(this,Oc);et(this,kc);if(K(this,kc,Object.assign({},hz,e||{})),t==="any")K(this,N_,!0),K(this,tr,null);else if(t){const r=Ur.from(t);K(this,N_,!1),K(this,tr,Promise.resolve(r)),setTimeout(()=>{this.emit("network",r,null)},0)}else K(this,N_,!1),K(this,tr,null);K(this,ts,-1),K(this,Ms,new Map),K(this,Ie,new Map),K(this,vs,new Map),K(this,Ne,null),K(this,Nc,!1),K(this,Nu,1),K(this,wr,new Map),K(this,Oc,!1)}get pollingInterval(){return m(this,kc).pollingInterval}get provider(){return this}get plugins(){return Array.from(m(this,vs).values())}attachPlugin(t){if(m(this,vs).get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return m(this,vs).set(t.name,t.connect(this)),this}getPlugin(t){return m(this,vs).get(t)||null}get disableCcipRead(){return m(this,Oc)}set disableCcipRead(t){K(this,Oc,!!t)}async ccipReadFetch(t,e,r){if(this.disableCcipRead||r.length===0||t.to==null)return null;const i=t.to.toLowerCase(),_=e.toLowerCase(),a=[];for(let c=0;c<r.length;c++){const u=r[c],l=u.replace("{sender}",i).replace("{data}",_),f=new Ii(l);u.indexOf("{data}")===-1&&(f.body={data:_,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:c,urls:r});let d="unknown error",y;try{y=await f.send()}catch(v){a.push(v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:{error:v}});continue}try{const v=y.bodyJson;if(v.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:v}),v.data;v.message&&(d=v.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:v})}catch{}ht(y.statusCode<400||y.statusCode>=500,`response not found during CCIP fetch: ${d}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:u,errorMessage:d}}),a.push(d)}ht(!1,`error encountered during CCIP fetch: ${a.map(c=>JSON.stringify(c)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:r,errorMessages:a}})}_wrapBlock(t,e){return new OP(XP(t),this)}_wrapLog(t,e){return new iu($P(t),this)}_wrapTransactionReceipt(t,e){return new c0(nz(t),this)}_wrapTransactionResponse(t,e){return new su(P0(t),this)}_detectNetwork(){ht(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){ht(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=Kt(await At(this,Dt,er).call(this,{method:"getBlockNumber"}),"%response");return m(this,ts)>=0&&K(this,ts,t),t}_getAddress(t){return Ue(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if(ne(t))return ne(t,32)?t:j_(t);if(typeof t=="bigint"&&(t=Kt(t,"blockTag")),typeof t=="number")return t>=0?j_(t):m(this,ts)>=0?j_(m(this,ts)+t):this.getBlockNumber().then(e=>j_(e+t));W(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(u=>u==null?null:Array.isArray(u)?cp(u.map(l=>l.toLowerCase())):u.toLowerCase()),r="blockHash"in t?t.blockHash:void 0,i=(u,l,f)=>{let d;switch(u.length){case 0:break;case 1:d=u[0];break;default:u.sort(),d=u}if(r&&(l!=null||f!=null))throw new Error("invalid filter");const y={};return d&&(y.address=d),e.length&&(y.topics=e),l&&(y.fromBlock=l),f&&(y.toBlock=f),r&&(y.blockHash=r),y};let _=[];if(t.address)if(Array.isArray(t.address))for(const u of t.address)_.push(this._getAddress(u));else _.push(this._getAddress(t.address));let a;"fromBlock"in t&&(a=this._getBlockTag(t.fromBlock));let c;return"toBlock"in t&&(c=this._getBlockTag(t.toBlock)),_.filter(u=>typeof u!="string").length||a!=null&&typeof a!="string"||c!=null&&typeof c!="string"?Promise.all([Promise.all(_),a,c]).then(u=>i(u[0],u[1],u[2])):i(_,a,c)}_getTransactionRequest(t){const e=wf(t),r=[];if(["to","from"].forEach(i=>{if(e[i]==null)return;const _=Ue(e[i],this);Rf(_)?r.push(async function(){e[i]=await _}()):e[i]=_}),e.blockTag!=null){const i=this._getBlockTag(e.blockTag);Rf(i)?r.push(async function(){e.blockTag=await i}()):e.blockTag=i}return r.length?async function(){return await Promise.all(r),e}():e}async getNetwork(){if(m(this,tr)==null){const i=(async()=>{try{const _=await this._detectNetwork();return this.emit("network",_,null),_}catch(_){throw m(this,tr)===i&&K(this,tr,null),_}})();return K(this,tr,i),(await i).clone()}const t=m(this,tr),[e,r]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==r.chainId&&(m(this,N_)?(this.emit("network",r,e),m(this,tr)===t&&K(this,tr,Promise.resolve(r))):ht(!1,`network changed: ${e.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:i,gasPrice:_,priorityFee:a}=await Oe({_block:At(this,Dt,xw).call(this,"latest",!1),gasPrice:(async()=>{try{const f=await At(this,Dt,er).call(this,{method:"getGasPrice"});return vt(f,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const f=await At(this,Dt,er).call(this,{method:"getPriorityFee"});return vt(f,"%response")}catch{}return null})()});let c=null,u=null;const l=this._wrapBlock(i,t);return l&&l.baseFeePerGas&&(u=a??BigInt("1000000000"),c=l.baseFeePerGas*fz+u),new a0(_,c,u)},r=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new Ii(r.url),_=await r.processFunc(e,this,i);return new a0(_.gasPrice,_.maxFeePerGas,_.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Rf(e)&&(e=await e),vt(await At(this,Dt,er).call(this,{method:"estimateGas",transaction:e}),"%response")}async call(t){const{tx:e,blockTag:r}=await Oe({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await At(this,Dt,Bw).call(this,At(this,Dt,Mw).call(this,e,r,t.enableCcipRead?0:-1))}async getBalance(t,e){return vt(await At(this,Dt,Fu).call(this,{method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return Kt(await At(this,Dt,Fu).call(this,{method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return Et(await At(this,Dt,Fu).call(this,{method:"getCode"},t,e))}async getStorage(t,e,r){const i=vt(e,"position");return Et(await At(this,Dt,Fu).call(this,{method:"getStorage",position:i},t,r))}async broadcastTransaction(t){const{blockNumber:e,hash:r,network:i}=await Oe({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),_=ff.from(t);if(_.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(_,i).replaceableTransaction(e)}async getBlock(t,e){const{network:r,params:i}=await Oe({network:this.getNetwork(),params:At(this,Dt,xw).call(this,t,!!e)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(t){const{network:e,params:r}=await Oe({network:this.getNetwork(),params:At(this,Dt,er).call(this,{method:"getTransaction",hash:t})});return r==null?null:this._wrapTransactionResponse(r,e)}async getTransactionReceipt(t){const{network:e,params:r}=await Oe({network:this.getNetwork(),params:At(this,Dt,er).call(this,{method:"getTransactionReceipt",hash:t})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await At(this,Dt,er).call(this,{method:"getTransaction",hash:t});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,e)}async getTransactionResult(t){const{result:e}=await Oe({network:this.getNetwork(),result:At(this,Dt,er).call(this,{method:"getTransactionResult",hash:t})});return e==null?null:Et(e)}async getLogs(t){let e=this._getFilter(t);Rf(e)&&(e=await e);const{network:r,params:i}=await Oe({network:this.getNetwork(),params:At(this,Dt,er).call(this,{method:"getLogs",filter:e})});return i.map(_=>this._wrapLog(_,r))}_getProvider(t){ht(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await yf.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=qt(t);const e=Ll(t.substring(2).toLowerCase()+".addr.reverse");try{const r=await yf.getEnsAddress(this),_=await new Pr(r,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(_==null||_===qc)return null;const c=await new Pr(_,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(c)!==t?null:c}catch(r){if(ze(r,"BAD_DATA")&&r.value==="0x"||ze(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(t,e,r){const i=e??1;return i===0?this.getTransactionReceipt(t):new Promise(async(_,a)=>{let c=null;const u=async l=>{try{const f=await this.getTransactionReceipt(t);if(f!=null&&l-f.blockNumber+1>=i){_(f),c&&(clearTimeout(c),c=null);return}}catch(f){console.log("EEE",f)}this.once("block",u)};r!=null&&(c=setTimeout(()=>{c!=null&&(c=null,this.off("block",u),a(ce("timeout","TIMEOUT",{reason:"timeout"})))},r)),u(await this.getBlockNumber())})}async waitForBlock(t){ht(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=m(this,wr).get(t);e&&(e.timer&&clearTimeout(e.timer),m(this,wr).delete(t))}_setTimeout(t,e){e==null&&(e=0);const r=Gu(this,Nu)._++,i=()=>{m(this,wr).delete(r),t()};if(this.paused)m(this,wr).set(r,{timer:null,func:i,time:e});else{const _=setTimeout(i,e);m(this,wr).set(r,{timer:_,func:i,time:fp()})}return r}_forEachSubscriber(t){for(const e of m(this,Ie).values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new B0(t.type);case"block":{const e=new oz(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new az(this,t.type);case"event":return new ap(this,t.filter);case"transaction":return new uz(this,t.hash);case"orphan":return new cz(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const r of m(this,Ie).values())if(r.subscriber===t){r.started&&r.subscriber.stop(),r.subscriber=e,r.started&&e.start(),m(this,Ne)!=null&&e.pause(m(this,Ne));break}}async on(t,e){const r=await At(this,Dt,rl).call(this,t);return r.listeners.push({listener:e,once:!1}),r.started||(r.subscriber.start(),r.started=!0,m(this,Ne)!=null&&r.subscriber.pause(m(this,Ne))),this}async once(t,e){const r=await At(this,Dt,rl).call(this,t);return r.listeners.push({listener:e,once:!0}),r.started||(r.subscriber.start(),r.started=!0,m(this,Ne)!=null&&r.subscriber.pause(m(this,Ne))),this}async emit(t,...e){const r=await At(this,Dt,Ku).call(this,t,e);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:_,once:a})=>{const c=new jw(this,a?null:_,t);try{_.call(this,...e,c)}catch{}return!a}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),m(this,Ie).delete(r.tag)),i>0}async listenerCount(t){if(t){const r=await At(this,Dt,Ku).call(this,t);return r?r.listeners.length:0}let e=0;for(const{listeners:r}of m(this,Ie).values())e+=r.length;return e}async listeners(t){if(t){const r=await At(this,Dt,Ku).call(this,t);return r?r.listeners.map(({listener:i})=>i):[]}let e=[];for(const{listeners:r}of m(this,Ie).values())e=e.concat(r.map(({listener:i})=>i));return e}async off(t,e){const r=await At(this,Dt,Ku).call(this,t);if(!r)return this;if(e){const i=r.listeners.map(({listener:_})=>_).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(!e||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),m(this,Ie).delete(r.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:r,subscriber:i}=await At(this,Dt,rl).call(this,t);r&&i.stop(),m(this,Ie).delete(e)}else for(const[e,{started:r,subscriber:i}]of m(this,Ie))r&&i.stop(),m(this,Ie).delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return m(this,Nc)}destroy(){this.removeAllListeners();for(const t of m(this,wr).keys())this._clearTimeout(t);K(this,Nc,!0)}get paused(){return m(this,Ne)!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(K(this,ts,-1),m(this,Ne)!=null){if(m(this,Ne)==!!t)return;ht(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),K(this,Ne,!!t);for(const e of m(this,wr).values())e.timer&&clearTimeout(e.timer),e.time=fp()-e.time}resume(){if(m(this,Ne)!=null){this._forEachSubscriber(t=>t.resume()),K(this,Ne,null);for(const t of m(this,wr).values()){let e=t.time;e<0&&(e=0),t.time=fp(),setTimeout(t.func,e)}}}}Ie=new WeakMap,vs=new WeakMap,Ne=new WeakMap,Nc=new WeakMap,tr=new WeakMap,N_=new WeakMap,Ms=new WeakMap,ts=new WeakMap,Nu=new WeakMap,wr=new WeakMap,Oc=new WeakMap,kc=new WeakMap,Dt=new WeakSet,er=async function(t){const e=m(this,kc).cacheTimeout;if(e<0)return await this._perform(t);const r=Ef(t.method,t);let i=m(this,Ms).get(r);return i||(i=this._perform(t),m(this,Ms).set(r,i),setTimeout(()=>{m(this,Ms).get(r)===i&&m(this,Ms).delete(r)},e)),await i},Mw=async function(t,e,r){ht(r<lz,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const i=wf(t);try{return Et(await this._perform({method:"call",transaction:i,blockTag:e}))}catch(_){if(!this.disableCcipRead&&sl(_)&&_.data&&r>=0&&e==="latest"&&i.to!=null&&ue(_.data,0,4)==="0x556f1830"){const a=_.data,c=await Ue(i.to,this);let u;try{u=Az(ue(_.data,4))}catch(d){ht(!1,d.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}ht(u.sender.toLowerCase()===c.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:u.errorArgs}});const l=await this.ccipReadFetch(i,u.calldata,u.urls);ht(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:_.data,errorArgs:u.errorArgs}});const f={to:c,data:fe([u.selector,yz([l,u.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const d=await At(this,Dt,Mw).call(this,f,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:d}),d}catch(d){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:d}),d}}throw _}},Bw=async function(t){const{value:e}=await Oe({network:this.getNetwork(),value:t});return e},Fu=async function(t,e,r){let i=this._getAddress(e),_=this._getBlockTag(r);return(typeof i!="string"||typeof _!="string")&&([i,_]=await Promise.all([i,_])),await At(this,Dt,Bw).call(this,At(this,Dt,er).call(this,Object.assign(t,{address:i,blockTag:_})))},xw=async function(t,e){if(ne(t,32))return await At(this,Dt,er).call(this,{method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await At(this,Dt,er).call(this,{method:"getBlock",blockTag:r,includeTransactions:e})},Ku=async function(t,e){let r=await up(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await up({orphan:"drop-log",log:e[0]},this)),m(this,Ie).get(r.tag)||null},rl=async function(t){const e=await up(t,this),r=e.tag;let i=m(this,Ie).get(r);return i||(i={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},m(this,Ie).set(r,i)),i};function dz(n,t){try{const e=lp(n,t);if(e)return Vu(e)}catch{}return null}function lp(n,t){if(n==="0x")return null;try{const e=Kt(ue(n,t,t+32)),r=Kt(ue(n,e,e+32));return ue(n,e+32,e+32+r)}catch{}return null}function x0(n){const t=Te(n);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function gz(n){if(n.length%32===0)return n;const t=new Uint8Array(Math.ceil(n.length/32)*32);return t.set(n),t}const bz=new Uint8Array([]);function yz(n){const t=[];let e=0;for(let r=0;r<n.length;r++)t.push(bz),e+=32;for(let r=0;r<n.length;r++){const i=Yt(n[r]);t[r]=x0(e),t.push(x0(i.length)),t.push(gz(i)),e+=32+Math.ceil(i.length/32)*32}return fe(t)}const C0="0x0000000000000000000000000000000000000000000000000000000000000000";function Az(n){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ht(L_(n)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=ue(n,0,32);ht(ue(e,0,12)===ue(C0,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=ue(e,12);try{const r=[],i=Kt(ue(n,32,64)),_=Kt(ue(n,i,i+32)),a=ue(n,i+32);for(let c=0;c<_;c++){const u=dz(a,c*32);if(u==null)throw new Error("abort");r.push(u)}t.urls=r}catch{ht(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=lp(n,64);if(r==null)throw new Error("abort");t.calldata=r}catch{ht(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ht(ue(n,100,128)===ue(C0,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=ue(n,96,100);try{const r=lp(n,128);if(r==null)throw new Error("abort");t.extraData=r}catch{ht(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(r=>t[r]),t}function io(n,t){if(n.provider)return n.provider;ht(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function I0(n,t){let e=wf(t);if(e.to!=null&&(e.to=Ue(e.to,n)),e.from!=null){const r=e.from;e.from=Promise.all([n.getAddress(),Ue(r,n)]).then(([i,_])=>(W(i.toLowerCase()===_.toLowerCase(),"transaction from mismatch","tx.from",_),i))}else e.from=n.getAddress();return await Oe(e)}class mz{constructor(t){$(this,"provider");Ct(this,{provider:t||null})}async getNonce(t){return io(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await I0(this,t)}async populateTransaction(t){const e=io(this,"populateTransaction"),r=await I0(this,t);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const a=vt(r.chainId);W(a===i.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else r.chainId=i.chainId;const _=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||_)?W(!1,"eip-1559 transaction do not support gasPrice","tx",t):(r.type===0||r.type===1)&&_&&W(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const a=await e.getFeeData();ht(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice)}else{const a=await e.getFeeData();if(r.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(r.type=2,r.gasPrice!=null){const c=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=c,r.maxPriorityFeePerGas=c}else r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(ht(!_,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):ht(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(r.type===2||r.type===3)&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Oe(r)}async estimateGas(t){return io(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return io(this,"call").call(await this.populateCall(t))}async resolveName(t){return await io(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=io(this,"sendTransaction"),r=await this.populateTransaction(t);delete r.from;const i=ff.from(r);return await e.broadcastTransaction(await this.signTransaction(i))}}function Sz(n){return JSON.parse(JSON.stringify(n))}class N0{constructor(t){et(this,xs);et(this,Ke);et(this,Bi);et(this,O_);et(this,Bs);et(this,k_);et(this,Tc);K(this,Ke,t),K(this,Bi,null),K(this,O_,At(this,xs,Cw).bind(this)),K(this,Bs,!1),K(this,k_,null),K(this,Tc,!1)}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}start(){m(this,Bs)||(K(this,Bs,!0),At(this,xs,Cw).call(this,-2))}stop(){m(this,Bs)&&(K(this,Bs,!1),K(this,Tc,!0),At(this,xs,Iw).call(this),m(this,Ke).off("block",m(this,O_)))}pause(t){t&&At(this,xs,Iw).call(this),m(this,Ke).off("block",m(this,O_))}resume(){this.start()}}Ke=new WeakMap,Bi=new WeakMap,O_=new WeakMap,Bs=new WeakMap,k_=new WeakMap,Tc=new WeakMap,xs=new WeakSet,Cw=async function(t){try{m(this,Bi)==null&&K(this,Bi,this._subscribe(m(this,Ke)));let e=null;try{e=await m(this,Bi)}catch(_){if(!ze(_,"UNSUPPORTED_OPERATION")||_.operation!=="eth_newFilter")throw _}if(e==null){K(this,Bi,null),m(this,Ke)._recoverSubscriber(this,this._recover(m(this,Ke)));return}const r=await m(this,Ke).getNetwork();if(m(this,k_)||K(this,k_,r),m(this,k_).chainId!==r.chainId)throw new Error("chaid changed");if(m(this,Tc))return;const i=await m(this,Ke).send("eth_getFilterChanges",[e]);await this._emitResults(m(this,Ke),i)}catch(e){console.log("@TODO",e)}m(this,Ke).once("block",m(this,O_))},Iw=function(){const t=m(this,Bi);t&&(K(this,Bi,null),t.then(e=>{m(this,Ke).destroyed||m(this,Ke).send("eth_uninstallFilter",[e])}))};class Rz extends N0{constructor(e,r){super(e);et(this,T_);K(this,T_,Sz(r))}_recover(e){return new ap(e,m(this,T_))}async _subscribe(e){return await e.send("eth_newFilter",[m(this,T_)])}async _emitResults(e,r){for(const i of r)e.emit(m(this,T_),e._wrapLog(i,e._network))}}T_=new WeakMap;class Ez extends N0{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const r of e)t.emit("pending",r)}}const Pz="bigint,boolean,function,number,string,symbol".split(/,/g);function Pf(n){if(n==null||Pz.indexOf(typeof n)>=0||typeof n.getAddress=="function")return n;if(Array.isArray(n))return n.map(Pf);if(typeof n=="object")return Object.keys(n).reduce((t,e)=>(t[e]=n[e],t),{});throw new Error(`should not happen: ${n} (${typeof n})`)}function zz(n){return new Promise(t=>{setTimeout(t,n)})}function so(n){return n&&n.toLowerCase()}function O0(n){return n&&typeof n.pollingInterval=="number"}const k0={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class pp extends mz{constructor(e,r){super(e);$(this,"address");r=qt(r),Ct(this,{address:r})}connect(e){ht(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const r=Pf(e),i=[];if(r.from){const a=r.from;i.push((async()=>{const c=await Ue(a,this.provider);W(c!=null&&c.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=c})())}else r.from=this.address;if(r.gasLimit==null&&i.push((async()=>{r.gasLimit=await this.provider.estimateGas({...r,from:this.address})})()),r.to!=null){const a=r.to;i.push((async()=>{r.to=await Ue(a,this.provider)})())}i.length&&await Promise.all(i);const _=this.provider.getRpcTransaction(r);return this.provider.send("eth_sendTransaction",[_])}async sendTransaction(e){const r=await this.provider.getBlockNumber(),i=await this.sendUncheckedTransaction(e);return await new Promise((_,a)=>{const c=[1e3,100];let u=0;const l=async()=>{try{const f=await this.provider.getTransaction(i);if(f!=null){_(f.replaceableTransaction(r));return}}catch(f){if(ze(f,"CANCELLED")||ze(f,"BAD_DATA")||ze(f,"NETWORK_ERROR")||ze(f,"UNSUPPORTED_OPERATION")){f.info==null&&(f.info={}),f.info.sendTransactionHash=i,a(f);return}if(ze(f,"INVALID_ARGUMENT")&&(u++,f.info==null&&(f.info={}),f.info.sendTransactionHash=i,u>10)){a(f);return}this.provider.emit("error",ce("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:f}))}this.provider._setTimeout(()=>{l()},c.pop()||4e3)};l()})}async signTransaction(e){const r=Pf(e);if(r.from){const _=await Ue(r.from,this.provider);W(_!=null&&_.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),r.from=_}else r.from=this.address;const i=this.provider.getRpcTransaction(r);return await this.provider.send("eth_signTransaction",[i])}async signMessage(e){const r=typeof e=="string"?Ci(e):e;return await this.provider.send("personal_sign",[Et(r),this.address.toLowerCase()])}async signTypedData(e,r,i){const _=Pf(i),a=await ru.resolveNames(e,r,_,async c=>{const u=await Ue(c);return W(u!=null,"TypedData does not support null address","value",c),u});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(ru.getPayload(a.domain,r,a.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const r=typeof e=="string"?Ci(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),Et(r)])}}class vz extends wz{constructor(e,r){super(e,r);et(this,Ou);et(this,G_);et(this,Gc);et(this,es);et(this,xi);et(this,Nr);et(this,dr);et(this,He);K(this,Gc,1),K(this,G_,Object.assign({},k0,r||{})),K(this,es,[]),K(this,xi,null),K(this,dr,null),K(this,He,null);{let _=null;const a=new Promise(c=>{_=c});K(this,Nr,{promise:a,resolve:_})}const i=this._getOption("staticNetwork");typeof i=="boolean"?(W(!i||e!=="any","staticNetwork cannot be used on special network 'any'","options",r),i&&e!=null&&K(this,dr,Ur.from(e))):i&&(W(e==null||i.matches(e),"staticNetwork MUST match network object","options",r),K(this,dr,i))}_getOption(e){return m(this,G_)[e]}get _network(){return ht(m(this,dr),"network is not available yet","NETWORK_ERROR"),m(this,dr)}async _perform(e){if(e.method==="call"||e.method==="estimateGas"){let i=e.transaction;if(i&&i.type!=null&&vt(i.type)&&i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null){const _=await this.getFeeData();_.maxFeePerGas==null&&_.maxPriorityFeePerGas==null&&(e=Object.assign({},e,{transaction:Object.assign({},i,{type:void 0})}))}}const r=this.getRpcRequest(e);return r!=null?await this.send(r.method,r.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e)if(e===!0){if(m(this,dr))return m(this,dr)}else return e;return m(this,He)?await m(this,He):this.ready?(K(this,He,(async()=>{try{const r=Ur.from(vt(await this.send("eth_chainId",[])));return K(this,He,null),r}catch(r){throw K(this,He,null),r}})()),await m(this,He)):(K(this,He,(async()=>{const r={id:Gu(this,Gc)._++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:r});let i;try{i=(await this._send(r))[0],K(this,He,null)}catch(_){throw K(this,He,null),this.emit("debug",{action:"receiveRpcError",error:_}),_}if(this.emit("debug",{action:"receiveRpcResult",result:i}),"result"in i)return Ur.from(vt(i.result));throw this.getRpcError(r,i)})()),await m(this,He))}_start(){m(this,Nr)==null||m(this,Nr).resolve==null||(m(this,Nr).resolve(),K(this,Nr,null),(async()=>{for(;m(this,dr)==null&&!this.destroyed;)try{K(this,dr,await this._detectNetwork())}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",ce("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await zz(1e3)}At(this,Ou,Nw).call(this)})())}async _waitUntilReady(){if(m(this,Nr)!=null)return await m(this,Nr).promise}_getSubscriber(e){return e.type==="pending"?new Ez(this):e.type==="event"?this._getOption("polling")?new ap(this,e.filter):new Rz(this,e.filter):e.type==="orphan"&&e.filter.orphan==="drop-log"?new B0("orphan"):super._getSubscriber(e)}get ready(){return m(this,Nr)==null}getRpcTransaction(e){const r={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(i=>{if(e[i]==null)return;let _=i;i==="gasLimit"&&(_="gas"),r[_]=j_(vt(e[i],`tx.${i}`))}),["from","to","data"].forEach(i=>{e[i]!=null&&(r[i]=Et(e[i]))}),e.accessList&&(r.accessList=js(e.accessList)),e.blobVersionedHashes&&(r.blobVersionedHashes=e.blobVersionedHashes.map(i=>i.toLowerCase())),r}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[so(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[so(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[so(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[so(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&e.filter.address!=null&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(so):e.filter.address=so(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,r){const{method:i}=e,{error:_}=r;if(i==="eth_estimateGas"&&_.message){const u=_.message;if(!u.match(/revert/i)&&u.match(/insufficient funds/i))return ce("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:_}})}if(i==="eth_call"||i==="eth_estimateGas"){const u=hp(_),l=eo.getBuiltinCallException(i==="eth_call"?"call":"estimateGas",e.params[0],u?u.data:null);return l.info={error:_,payload:e},l}const a=JSON.stringify(Bz(_));if(typeof _.message=="string"&&_.message.match(/user denied|ethers-user-denied/i))return ce("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[i]||"unknown",reason:"rejected",info:{payload:e,error:_}});if(i==="eth_sendRawTransaction"||i==="eth_sendTransaction"){const u=e.params[0];if(a.match(/insufficient funds|base fee exceeds gas limit/i))return ce("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:u,info:{error:_}});if(a.match(/nonce/i)&&a.match(/too low/i))return ce("nonce has already been used","NONCE_EXPIRED",{transaction:u,info:{error:_}});if(a.match(/replacement transaction/i)&&a.match(/underpriced/i))return ce("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:u,info:{error:_}});if(a.match(/only replay-protected/i))return ce("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:i,info:{transaction:u,info:{error:_}}})}let c=!!a.match(/the method .* does not exist/i);return c||_&&_.details&&_.details.startsWith("Unauthorized method:")&&(c=!0),c?ce("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:_,payload:e}}):ce("could not coalesce error","UNKNOWN_ERROR",{error:_,payload:e})}send(e,r){if(this.destroyed)return Promise.reject(ce("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const i=Gu(this,Gc)._++,_=new Promise((a,c)=>{m(this,es).push({resolve:a,reject:c,payload:{method:e,params:r,id:i,jsonrpc:"2.0"}})});return At(this,Ou,Nw).call(this),_}async getSigner(e){e==null&&(e=0);const r=this.send("eth_accounts",[]);if(typeof e=="number"){const _=await r;if(e>=_.length)throw new Error("no such account");return new pp(this,_[e])}const{accounts:i}=await Oe({network:this.getNetwork(),accounts:r});e=qt(e);for(const _ of i)if(qt(_)===e)return new pp(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(r=>new pp(this,r))}destroy(){m(this,xi)&&(clearTimeout(m(this,xi)),K(this,xi,null));for(const{payload:e,reject:r}of m(this,es))r(ce("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));K(this,es,[]),super.destroy()}}G_=new WeakMap,Gc=new WeakMap,es=new WeakMap,xi=new WeakMap,Nr=new WeakMap,dr=new WeakMap,He=new WeakMap,Ou=new WeakSet,Nw=function(){if(m(this,xi))return;const e=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");K(this,xi,setTimeout(()=>{K(this,xi,null);const r=m(this,es);for(K(this,es,[]);r.length;){const i=[r.shift()];for(;r.length&&i.length!==m(this,G_).batchMaxCount;)if(i.push(r.shift()),JSON.stringify(i.map(a=>a.payload)).length>m(this,G_).batchMaxSize){r.unshift(i.pop());break}(async()=>{const _=i.length===1?i[0].payload:i.map(a=>a.payload);this.emit("debug",{action:"sendRpcPayload",payload:_});try{const a=await this._send(_);this.emit("debug",{action:"receiveRpcResult",result:a});for(const{resolve:c,reject:u,payload:l}of i){if(this.destroyed){u(ce("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:l.method}));continue}const f=a.filter(d=>d.id===l.id)[0];if(f==null){const d=ce("missing response for request","BAD_DATA",{value:a,info:{payload:l}});this.emit("error",d),u(d);continue}if("error"in f){u(this.getRpcError(l,f));continue}c(f.result)}}catch(a){this.emit("debug",{action:"receiveRpcError",error:a});for(const{reject:c}of i)c(a)}})()}},e))};class T0 extends vz{constructor(e,r){super(e,r);et(this,Cs);let i=this._getOption("pollingInterval");i==null&&(i=k0.pollingInterval),K(this,Cs,i)}_getSubscriber(e){const r=super._getSubscriber(e);return O0(r)&&(r.pollingInterval=m(this,Cs)),r}get pollingInterval(){return m(this,Cs)}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");K(this,Cs,e),this._forEachSubscriber(r=>{O0(r)&&(r.pollingInterval=m(this,Cs))})}}Cs=new WeakMap;class Mz extends T0{constructor(e,r,i){e==null&&(e="http://localhost:8545");super(r,i);et(this,Uc);typeof e=="string"?K(this,Uc,new Ii(e)):K(this,Uc,e.clone())}_getConnection(){return m(this,Uc).clone()}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){const r=this._getConnection();r.body=JSON.stringify(e),r.setHeader("content-type","application/json");const i=await r.send();i.assertOk();let _=i.bodyJson;return Array.isArray(_)||(_=[_]),_}}Uc=new WeakMap;function hp(n){if(n==null)return null;if(typeof n.message=="string"&&n.message.match(/revert/i)&&ne(n.data))return{message:n.message,data:n.data};if(typeof n=="object"){for(const t in n){const e=hp(n[t]);if(e)return e}return null}if(typeof n=="string")try{return hp(JSON.parse(n))}catch{}return null}function wp(n,t){if(n!=null){if(typeof n.message=="string"&&t.push(n.message),typeof n=="object")for(const e in n)wp(n[e],t);if(typeof n=="string")try{return wp(JSON.parse(n),t)}catch{}}}function Bz(n){const t=[];return wp(n,t),t}class xz extends T0{constructor(e,r,i){const _=Object.assign({},i??{},{batchMaxCount:1});W(e&&e.request,"invalid EIP-1193 provider","ethereum",e);super(r,_);et(this,Fc);K(this,Fc,async(a,c)=>{const u={method:a,params:c};this.emit("debug",{action:"sendEip1193Request",payload:u});try{const l=await e.request(u);return this.emit("debug",{action:"receiveEip1193Result",result:l}),l}catch(l){const f=new Error(l.message);throw f.code=l.code,f.data=l.data,f.payload=u,this.emit("debug",{action:"receiveEip1193Error",error:f}),f}})}async send(e,r){return await this._start(),await super.send(e,r)}async _send(e){W(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const r=await m(this,Fc).call(this,e.method,e.params||[]);return[{id:e.id,result:r}]}catch(r){return[{id:e.id,error:{code:r.code,data:r.data,message:r.message}}]}}getRpcError(e,r){switch(r=JSON.parse(JSON.stringify(r)),r.error.code||-1){case 4001:r.error.message=`ethers-user-denied: ${r.error.message}`;break;case 4200:r.error.message=`ethers-unsupported: ${r.error.message}`;break}return super.getRpcError(e,r)}async hasSigner(e){e==null&&(e=0);const r=await this.send("eth_accounts",[]);return typeof e=="number"?r.length>e:(e=e.toLowerCase(),r.filter(i=>i.toLowerCase()===e).length!==0)}async getSigner(e){if(e==null&&(e=0),!await this.hasSigner(e))try{await m(this,Fc).call(this,"eth_requestAccounts",[])}catch(r){const i=r.payload;throw this.getRpcError(i,{id:i.id,error:r})}return await super.getSigner(e)}}Fc=new WeakMap;var us=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function G0(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zf={exports:{}};function Cz(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var U0={exports:{}},we=U0.exports={},Fr,Kr;function dp(){throw new Error("setTimeout has not been defined")}function gp(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?Fr=setTimeout:Fr=dp}catch{Fr=dp}try{typeof clearTimeout=="function"?Kr=clearTimeout:Kr=gp}catch{Kr=gp}})();function F0(n){if(Fr===setTimeout)return setTimeout(n,0);if((Fr===dp||!Fr)&&setTimeout)return Fr=setTimeout,setTimeout(n,0);try{return Fr(n,0)}catch{try{return Fr.call(null,n,0)}catch{return Fr.call(this,n,0)}}}function Iz(n){if(Kr===clearTimeout)return clearTimeout(n);if((Kr===gp||!Kr)&&clearTimeout)return Kr=clearTimeout,clearTimeout(n);try{return Kr(n)}catch{try{return Kr.call(null,n)}catch{return Kr.call(this,n)}}}var Ki=[],_o=!1,Ws,vf=-1;function Nz(){!_o||!Ws||(_o=!1,Ws.length?Ki=Ws.concat(Ki):vf=-1,Ki.length&&K0())}function K0(){if(!_o){var n=F0(Nz);_o=!0;for(var t=Ki.length;t;){for(Ws=Ki,Ki=[];++vf<t;)Ws&&Ws[vf].run();vf=-1,t=Ki.length}Ws=null,_o=!1,Iz(n)}}we.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Ki.push(new D0(n,t)),Ki.length===1&&!_o&&F0(K0)};function D0(n,t){this.fun=n,this.array=t}D0.prototype.run=function(){this.fun.apply(null,this.array)},we.title="browser",we.browser=!0,we.env={},we.argv=[],we.version="",we.versions={};function Di(){}we.on=Di,we.addListener=Di,we.once=Di,we.off=Di,we.removeListener=Di,we.removeAllListeners=Di,we.emit=Di,we.prependListener=Di,we.prependOnceListener=Di,we.listeners=function(n){return[]},we.binding=function(n){throw new Error("process.binding is not supported")},we.cwd=function(){return"/"},we.chdir=function(n){throw new Error("process.chdir is not supported")},we.umask=function(){return 0};var Oz=U0.exports;const Lt=Cz(Oz);var Mf={exports:{}},L0;function j0(){if(L0)return Mf.exports;L0=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(k,D,L){return Function.prototype.apply.call(k,D,L)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:e=function(k){return Object.getOwnPropertyNames(k)};function r(C){console&&console.warn&&console.warn(C)}var i=Number.isNaN||function(k){return k!==k};function _(){_.init.call(this)}Mf.exports=_,Mf.exports.once=z,_.EventEmitter=_,_.prototype._events=void 0,_.prototype._eventsCount=0,_.prototype._maxListeners=void 0;var a=10;function c(C){if(typeof C!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof C)}Object.defineProperty(_,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(C){if(typeof C!="number"||C<0||i(C))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+C+".");a=C}}),_.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},_.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||i(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function u(C){return C._maxListeners===void 0?_.defaultMaxListeners:C._maxListeners}_.prototype.getMaxListeners=function(){return u(this)},_.prototype.emit=function(k){for(var D=[],L=1;L<arguments.length;L++)D.push(arguments[L]);var V=k==="error",tt=this._events;if(tt!==void 0)V=V&&tt.error===void 0;else if(!V)return!1;if(V){var rt;if(D.length>0&&(rt=D[0]),rt instanceof Error)throw rt;var wt=new Error("Unhandled error."+(rt?" ("+rt.message+")":""));throw wt.context=rt,wt}var j=tt[k];if(j===void 0)return!1;if(typeof j=="function")t(j,this,D);else for(var Pt=j.length,xt=N(j,Pt),L=0;L<Pt;++L)t(xt[L],this,D);return!0};function l(C,k,D,L){var V,tt,rt;if(c(D),tt=C._events,tt===void 0?(tt=C._events=Object.create(null),C._eventsCount=0):(tt.newListener!==void 0&&(C.emit("newListener",k,D.listener?D.listener:D),tt=C._events),rt=tt[k]),rt===void 0)rt=tt[k]=D,++C._eventsCount;else if(typeof rt=="function"?rt=tt[k]=L?[D,rt]:[rt,D]:L?rt.unshift(D):rt.push(D),V=u(C),V>0&&rt.length>V&&!rt.warned){rt.warned=!0;var wt=new Error("Possible EventEmitter memory leak detected. "+rt.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");wt.name="MaxListenersExceededWarning",wt.emitter=C,wt.type=k,wt.count=rt.length,r(wt)}return C}_.prototype.addListener=function(k,D){return l(this,k,D,!1)},_.prototype.on=_.prototype.addListener,_.prototype.prependListener=function(k,D){return l(this,k,D,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function d(C,k,D){var L={fired:!1,wrapFn:void 0,target:C,type:k,listener:D},V=f.bind(L);return V.listener=D,L.wrapFn=V,V}_.prototype.once=function(k,D){return c(D),this.on(k,d(this,k,D)),this},_.prototype.prependOnceListener=function(k,D){return c(D),this.prependListener(k,d(this,k,D)),this},_.prototype.removeListener=function(k,D){var L,V,tt,rt,wt;if(c(D),V=this._events,V===void 0)return this;if(L=V[k],L===void 0)return this;if(L===D||L.listener===D)--this._eventsCount===0?this._events=Object.create(null):(delete V[k],V.removeListener&&this.emit("removeListener",k,L.listener||D));else if(typeof L!="function"){for(tt=-1,rt=L.length-1;rt>=0;rt--)if(L[rt]===D||L[rt].listener===D){wt=L[rt].listener,tt=rt;break}if(tt<0)return this;tt===0?L.shift():I(L,tt),L.length===1&&(V[k]=L[0]),V.removeListener!==void 0&&this.emit("removeListener",k,wt||D)}return this},_.prototype.off=_.prototype.removeListener,_.prototype.removeAllListeners=function(k){var D,L,V;if(L=this._events,L===void 0)return this;if(L.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):L[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete L[k]),this;if(arguments.length===0){var tt=Object.keys(L),rt;for(V=0;V<tt.length;++V)rt=tt[V],rt!=="removeListener"&&this.removeAllListeners(rt);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(D=L[k],typeof D=="function")this.removeListener(k,D);else if(D!==void 0)for(V=D.length-1;V>=0;V--)this.removeListener(k,D[V]);return this};function y(C,k,D){var L=C._events;if(L===void 0)return[];var V=L[k];return V===void 0?[]:typeof V=="function"?D?[V.listener||V]:[V]:D?U(V):N(V,V.length)}_.prototype.listeners=function(k){return y(this,k,!0)},_.prototype.rawListeners=function(k){return y(this,k,!1)},_.listenerCount=function(C,k){return typeof C.listenerCount=="function"?C.listenerCount(k):v.call(C,k)},_.prototype.listenerCount=v;function v(C){var k=this._events;if(k!==void 0){var D=k[C];if(typeof D=="function")return 1;if(D!==void 0)return D.length}return 0}_.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function N(C,k){for(var D=new Array(k),L=0;L<k;++L)D[L]=C[L];return D}function I(C,k){for(;k+1<C.length;k++)C[k]=C[k+1];C.pop()}function U(C){for(var k=new Array(C.length),D=0;D<k.length;++D)k[D]=C[D].listener||C[D];return k}function z(C,k){return new Promise(function(D,L){function V(rt){C.removeListener(k,tt),L(rt)}function tt(){typeof C.removeListener=="function"&&C.removeListener("error",V),D([].slice.call(arguments))}O(C,k,tt,{once:!0}),k!=="error"&&B(C,V,{once:!0})})}function B(C,k,D){typeof C.on=="function"&&O(C,"error",k,D)}function O(C,k,D,L){if(typeof C.on=="function")L.once?C.once(k,D):C.on(k,D);else if(typeof C.addEventListener=="function")C.addEventListener(k,function V(tt){L.once&&C.removeEventListener(k,V),D(tt)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof C)}return Mf.exports}var bp,V0;function Y0(){return V0||(V0=1,bp=j0().EventEmitter),bp}var yp={},H0;function Bf(){return H0||(H0=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},e={};e.byteLength=f,e.toByteArray=y,e.fromByteArray=I;for(var r=[],i=[],_=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=a.length;c<u;++c)r[c]=a[c],i[a.charCodeAt(c)]=c;i[45]=62,i[95]=63;function l(B){var O=B.length;if(O%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var C=B.indexOf("=");C===-1&&(C=O);var k=C===O?0:4-C%4;return[C,k]}function f(B){var O=l(B),C=O[0],k=O[1];return(C+k)*3/4-k}function d(B,O,C){return(O+C)*3/4-C}function y(B){var O,C=l(B),k=C[0],D=C[1],L=new _(d(B,k,D)),V=0,tt=D>0?k-4:k,rt;for(rt=0;rt<tt;rt+=4)O=i[B.charCodeAt(rt)]<<18|i[B.charCodeAt(rt+1)]<<12|i[B.charCodeAt(rt+2)]<<6|i[B.charCodeAt(rt+3)],L[V++]=O>>16&255,L[V++]=O>>8&255,L[V++]=O&255;return D===2&&(O=i[B.charCodeAt(rt)]<<2|i[B.charCodeAt(rt+1)]>>4,L[V++]=O&255),D===1&&(O=i[B.charCodeAt(rt)]<<10|i[B.charCodeAt(rt+1)]<<4|i[B.charCodeAt(rt+2)]>>2,L[V++]=O>>8&255,L[V++]=O&255),L}function v(B){return r[B>>18&63]+r[B>>12&63]+r[B>>6&63]+r[B&63]}function N(B,O,C){for(var k,D=[],L=O;L<C;L+=3)k=(B[L]<<16&16711680)+(B[L+1]<<8&65280)+(B[L+2]&255),D.push(v(k));return D.join("")}function I(B){for(var O,C=B.length,k=C%3,D=[],L=16383,V=0,tt=C-k;V<tt;V+=L)D.push(N(B,V,V+L>tt?tt:V+L));return k===1?(O=B[C-1],D.push(r[O>>2]+r[O<<4&63]+"==")):k===2&&(O=(B[C-2]<<8)+B[C-1],D.push(r[O>>10]+r[O>>4&63]+r[O<<2&63]+"=")),D.join("")}var U={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */U.read=function(B,O,C,k,D){var L,V,tt=D*8-k-1,rt=(1<<tt)-1,wt=rt>>1,j=-7,Pt=C?D-1:0,xt=C?-1:1,ft=B[O+Pt];for(Pt+=xt,L=ft&(1<<-j)-1,ft>>=-j,j+=tt;j>0;L=L*256+B[O+Pt],Pt+=xt,j-=8);for(V=L&(1<<-j)-1,L>>=-j,j+=k;j>0;V=V*256+B[O+Pt],Pt+=xt,j-=8);if(L===0)L=1-wt;else{if(L===rt)return V?NaN:(ft?-1:1)*(1/0);V=V+Math.pow(2,k),L=L-wt}return(ft?-1:1)*V*Math.pow(2,L-k)},U.write=function(B,O,C,k,D,L){var V,tt,rt,wt=L*8-D-1,j=(1<<wt)-1,Pt=j>>1,xt=D===23?Math.pow(2,-24)-Math.pow(2,-77):0,ft=k?0:L-1,yt=k?1:-1,zt=O<0||O===0&&1/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(tt=isNaN(O)?1:0,V=j):(V=Math.floor(Math.log(O)/Math.LN2),O*(rt=Math.pow(2,-V))<1&&(V--,rt*=2),V+Pt>=1?O+=xt/rt:O+=xt*Math.pow(2,1-Pt),O*rt>=2&&(V++,rt/=2),V+Pt>=j?(tt=0,V=j):V+Pt>=1?(tt=(O*rt-1)*Math.pow(2,D),V=V+Pt):(tt=O*Math.pow(2,Pt-1)*Math.pow(2,D),V=0));D>=8;B[C+ft]=tt&255,ft+=yt,tt/=256,D-=8);for(V=V<<D|tt,wt+=D;wt>0;B[C+ft]=V&255,ft+=yt,V/=256,wt-=8);B[C+ft-yt]|=zt*128};/*!
|
|
6
|
+
*/(function(n){const t=so,e=ca,r=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=f,n.SlowBuffer=k,n.INSPECT_MAX_BYTES=50;const i=2147483647;n.kMaxLength=i;const{Uint8Array:o,ArrayBuffer:a,SharedArrayBuffer:u}=globalThis;f.TYPED_ARRAY_SUPPORT=_(),!f.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function _(){try{const b=new o(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,o.prototype),Object.setPrototypeOf(b,h),b.foo()===42}catch{return!1}}Object.defineProperty(f.prototype,"parent",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.buffer}}),Object.defineProperty(f.prototype,"offset",{enumerable:!0,get:function(){if(f.isBuffer(this))return this.byteOffset}});function l(b){if(b>i)throw new RangeError('The value "'+b+'" is invalid for option "size"');const h=new o(b);return Object.setPrototypeOf(h,f.prototype),h}function f(b,h,w){if(typeof b=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return I(b)}return g(b,h,w)}f.poolSize=8192;function g(b,h,w){if(typeof b=="string")return S(b,h);if(a.isView(b))return A(b);if(b==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b);if(le(b,a)||b&&le(b.buffer,a)||typeof u<"u"&&(le(b,u)||b&&le(b.buffer,u)))return R(b,h,w);if(typeof b=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const F=b.valueOf&&b.valueOf();if(F!=null&&F!==b)return f.from(F,h,w);const U=P(b);if(U)return U;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof b[Symbol.toPrimitive]=="function")return f.from(b[Symbol.toPrimitive]("string"),h,w);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof b)}f.from=function(b,h,w){return g(b,h,w)},Object.setPrototypeOf(f.prototype,o.prototype),Object.setPrototypeOf(f,o);function y(b){if(typeof b!="number")throw new TypeError('"size" argument must be of type number');if(b<0)throw new RangeError('The value "'+b+'" is invalid for option "size"')}function B(b,h,w){return y(b),b<=0?l(b):h!==void 0?typeof w=="string"?l(b).fill(h,w):l(b).fill(h):l(b)}f.alloc=function(b,h,w){return B(b,h,w)};function I(b){return y(b),l(b<0?0:z(b)|0)}f.allocUnsafe=function(b){return I(b)},f.allocUnsafeSlow=function(b){return I(b)};function S(b,h){if((typeof h!="string"||h==="")&&(h="utf8"),!f.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const w=C(b,h)|0;let F=l(w);const U=F.write(b,h);return U!==w&&(F=F.slice(0,U)),F}function T(b){const h=b.length<0?0:z(b.length)|0,w=l(h);for(let F=0;F<h;F+=1)w[F]=b[F]&255;return w}function A(b){if(le(b,o)){const h=new o(b);return R(h.buffer,h.byteOffset,h.byteLength)}return T(b)}function R(b,h,w){if(h<0||b.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(b.byteLength<h+(w||0))throw new RangeError('"length" is outside of buffer bounds');let F;return h===void 0&&w===void 0?F=new o(b):w===void 0?F=new o(b,h):F=new o(b,h,w),Object.setPrototypeOf(F,f.prototype),F}function P(b){if(f.isBuffer(b)){const h=z(b.length)|0,w=l(h);return w.length===0||b.copy(w,0,0,h),w}if(b.length!==void 0)return typeof b.length!="number"||Be(b.length)?l(0):T(b);if(b.type==="Buffer"&&Array.isArray(b.data))return T(b.data)}function z(b){if(b>=i)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+i.toString(16)+" bytes");return b|0}function k(b){return+b!=b&&(b=0),f.alloc(+b)}f.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==f.prototype},f.compare=function(h,w){if(le(h,o)&&(h=f.from(h,h.offset,h.byteLength)),le(w,o)&&(w=f.from(w,w.offset,w.byteLength)),!f.isBuffer(h)||!f.isBuffer(w))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===w)return 0;let F=h.length,U=w.length;for(let J=0,st=Math.min(F,U);J<st;++J)if(h[J]!==w[J]){F=h[J],U=w[J];break}return F<U?-1:U<F?1:0},f.isEncoding=function(h){switch(String(h).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}},f.concat=function(h,w){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return f.alloc(0);let F;if(w===void 0)for(w=0,F=0;F<h.length;++F)w+=h[F].length;const U=f.allocUnsafe(w);let J=0;for(F=0;F<h.length;++F){let st=h[F];if(le(st,o))J+st.length>U.length?(f.isBuffer(st)||(st=f.from(st)),st.copy(U,J)):o.prototype.set.call(U,st,J);else if(f.isBuffer(st))st.copy(U,J);else throw new TypeError('"list" argument must be an Array of Buffers');J+=st.length}return U};function C(b,h){if(f.isBuffer(b))return b.length;if(a.isView(b)||le(b,a))return b.byteLength;if(typeof b!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof b);const w=b.length,F=arguments.length>2&&arguments[2]===!0;if(!F&&w===0)return 0;let U=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return w;case"utf8":case"utf-8":return we(b).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return w*2;case"hex":return w>>>1;case"base64":return Qt(b).length;default:if(U)return F?-1:we(b).length;h=(""+h).toLowerCase(),U=!0}}f.byteLength=C;function N(b,h,w){let F=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((w===void 0||w>this.length)&&(w=this.length),w<=0)||(w>>>=0,h>>>=0,w<=h))return"";for(b||(b="utf8");;)switch(b){case"hex":return W(this,h,w);case"utf8":case"utf-8":return Et(this,h,w);case"ascii":return Bt(this,h,w);case"latin1":case"binary":return jt(this,h,w);case"base64":return wt(this,h,w);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return X(this,h,w);default:if(F)throw new TypeError("Unknown encoding: "+b);b=(b+"").toLowerCase(),F=!0}}f.prototype._isBuffer=!0;function D(b,h,w){const F=b[h];b[h]=b[w],b[w]=F}f.prototype.swap16=function(){const h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let w=0;w<h;w+=2)D(this,w,w+1);return this},f.prototype.swap32=function(){const h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let w=0;w<h;w+=4)D(this,w,w+3),D(this,w+1,w+2);return this},f.prototype.swap64=function(){const h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let w=0;w<h;w+=8)D(this,w,w+7),D(this,w+1,w+6),D(this,w+2,w+5),D(this,w+3,w+4);return this},f.prototype.toString=function(){const h=this.length;return h===0?"":arguments.length===0?Et(this,0,h):N.apply(this,arguments)},f.prototype.toLocaleString=f.prototype.toString,f.prototype.equals=function(h){if(!f.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:f.compare(this,h)===0},f.prototype.inspect=function(){let h="";const w=n.INSPECT_MAX_BYTES;return h=this.toString("hex",0,w).replace(/(.{2})/g,"$1 ").trim(),this.length>w&&(h+=" ... "),"<Buffer "+h+">"},r&&(f.prototype[r]=f.prototype.inspect),f.prototype.compare=function(h,w,F,U,J){if(le(h,o)&&(h=f.from(h,h.offset,h.byteLength)),!f.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(w===void 0&&(w=0),F===void 0&&(F=h?h.length:0),U===void 0&&(U=0),J===void 0&&(J=this.length),w<0||F>h.length||U<0||J>this.length)throw new RangeError("out of range index");if(U>=J&&w>=F)return 0;if(U>=J)return-1;if(w>=F)return 1;if(w>>>=0,F>>>=0,U>>>=0,J>>>=0,this===h)return 0;let st=J-U,kt=F-w;const Vt=Math.min(st,kt),qt=this.slice(U,J),Wt=h.slice(w,F);for(let Dt=0;Dt<Vt;++Dt)if(qt[Dt]!==Wt[Dt]){st=qt[Dt],kt=Wt[Dt];break}return st<kt?-1:kt<st?1:0};function Y(b,h,w,F,U){if(b.length===0)return-1;if(typeof w=="string"?(F=w,w=0):w>2147483647?w=2147483647:w<-2147483648&&(w=-2147483648),w=+w,Be(w)&&(w=U?0:b.length-1),w<0&&(w=b.length+w),w>=b.length){if(U)return-1;w=b.length-1}else if(w<0)if(U)w=0;else return-1;if(typeof h=="string"&&(h=f.from(h,F)),f.isBuffer(h))return h.length===0?-1:Z(b,h,w,F,U);if(typeof h=="number")return h=h&255,typeof o.prototype.indexOf=="function"?U?o.prototype.indexOf.call(b,h,w):o.prototype.lastIndexOf.call(b,h,w):Z(b,[h],w,F,U);throw new TypeError("val must be string, number or Buffer")}function Z(b,h,w,F,U){let J=1,st=b.length,kt=h.length;if(F!==void 0&&(F=String(F).toLowerCase(),F==="ucs2"||F==="ucs-2"||F==="utf16le"||F==="utf-16le")){if(b.length<2||h.length<2)return-1;J=2,st/=2,kt/=2,w/=2}function Vt(Wt,Dt){return J===1?Wt[Dt]:Wt.readUInt16BE(Dt*J)}let qt;if(U){let Wt=-1;for(qt=w;qt<st;qt++)if(Vt(b,qt)===Vt(h,Wt===-1?0:qt-Wt)){if(Wt===-1&&(Wt=qt),qt-Wt+1===kt)return Wt*J}else Wt!==-1&&(qt-=qt-Wt),Wt=-1}else for(w+kt>st&&(w=st-kt),qt=w;qt>=0;qt--){let Wt=!0;for(let Dt=0;Dt<kt;Dt++)if(Vt(b,qt+Dt)!==Vt(h,Dt)){Wt=!1;break}if(Wt)return qt}return-1}f.prototype.includes=function(h,w,F){return this.indexOf(h,w,F)!==-1},f.prototype.indexOf=function(h,w,F){return Y(this,h,w,F,!0)},f.prototype.lastIndexOf=function(h,w,F){return Y(this,h,w,F,!1)};function ft(b,h,w,F){w=Number(w)||0;const U=b.length-w;F?(F=Number(F),F>U&&(F=U)):F=U;const J=h.length;F>J/2&&(F=J/2);let st;for(st=0;st<F;++st){const kt=parseInt(h.substr(st*2,2),16);if(Be(kt))return st;b[w+st]=kt}return st}function L(b,h,w,F){return ge(we(h,b.length-w),b,w,F)}function At(b,h,w,F){return ge(de(h),b,w,F)}function Rt(b,h,w,F){return ge(Qt(h),b,w,F)}function at(b,h,w,F){return ge(Gt(h,b.length-w),b,w,F)}f.prototype.write=function(h,w,F,U){if(w===void 0)U="utf8",F=this.length,w=0;else if(F===void 0&&typeof w=="string")U=w,F=this.length,w=0;else if(isFinite(w))w=w>>>0,isFinite(F)?(F=F>>>0,U===void 0&&(U="utf8")):(U=F,F=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const J=this.length-w;if((F===void 0||F>J)&&(F=J),h.length>0&&(F<0||w<0)||w>this.length)throw new RangeError("Attempt to write outside buffer bounds");U||(U="utf8");let st=!1;for(;;)switch(U){case"hex":return ft(this,h,w,F);case"utf8":case"utf-8":return L(this,h,w,F);case"ascii":case"latin1":case"binary":return At(this,h,w,F);case"base64":return Rt(this,h,w,F);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return at(this,h,w,F);default:if(st)throw new TypeError("Unknown encoding: "+U);U=(""+U).toLowerCase(),st=!0}},f.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function wt(b,h,w){return h===0&&w===b.length?t.fromByteArray(b):t.fromByteArray(b.slice(h,w))}function Et(b,h,w){w=Math.min(b.length,w);const F=[];let U=h;for(;U<w;){const J=b[U];let st=null,kt=J>239?4:J>223?3:J>191?2:1;if(U+kt<=w){let Vt,qt,Wt,Dt;switch(kt){case 1:J<128&&(st=J);break;case 2:Vt=b[U+1],(Vt&192)===128&&(Dt=(J&31)<<6|Vt&63,Dt>127&&(st=Dt));break;case 3:Vt=b[U+1],qt=b[U+2],(Vt&192)===128&&(qt&192)===128&&(Dt=(J&15)<<12|(Vt&63)<<6|qt&63,Dt>2047&&(Dt<55296||Dt>57343)&&(st=Dt));break;case 4:Vt=b[U+1],qt=b[U+2],Wt=b[U+3],(Vt&192)===128&&(qt&192)===128&&(Wt&192)===128&&(Dt=(J&15)<<18|(Vt&63)<<12|(qt&63)<<6|Wt&63,Dt>65535&&Dt<1114112&&(st=Dt))}}st===null?(st=65533,kt=1):st>65535&&(st-=65536,F.push(st>>>10&1023|55296),st=56320|st&1023),F.push(st),U+=kt}return vt(F)}const xt=4096;function vt(b){const h=b.length;if(h<=xt)return String.fromCharCode.apply(String,b);let w="",F=0;for(;F<h;)w+=String.fromCharCode.apply(String,b.slice(F,F+=xt));return w}function Bt(b,h,w){let F="";w=Math.min(b.length,w);for(let U=h;U<w;++U)F+=String.fromCharCode(b[U]&127);return F}function jt(b,h,w){let F="";w=Math.min(b.length,w);for(let U=h;U<w;++U)F+=String.fromCharCode(b[U]);return F}function W(b,h,w){const F=b.length;(!h||h<0)&&(h=0),(!w||w<0||w>F)&&(w=F);let U="";for(let J=h;J<w;++J)U+=Ie[b[J]];return U}function X(b,h,w){const F=b.slice(h,w);let U="";for(let J=0;J<F.length-1;J+=2)U+=String.fromCharCode(F[J]+F[J+1]*256);return U}f.prototype.slice=function(h,w){const F=this.length;h=~~h,w=w===void 0?F:~~w,h<0?(h+=F,h<0&&(h=0)):h>F&&(h=F),w<0?(w+=F,w<0&&(w=0)):w>F&&(w=F),w<h&&(w=h);const U=this.subarray(h,w);return Object.setPrototypeOf(U,f.prototype),U};function nt(b,h,w){if(b%1!==0||b<0)throw new RangeError("offset is not uint");if(b+h>w)throw new RangeError("Trying to access beyond buffer length")}f.prototype.readUintLE=f.prototype.readUIntLE=function(h,w,F){h=h>>>0,w=w>>>0,F||nt(h,w,this.length);let U=this[h],J=1,st=0;for(;++st<w&&(J*=256);)U+=this[h+st]*J;return U},f.prototype.readUintBE=f.prototype.readUIntBE=function(h,w,F){h=h>>>0,w=w>>>0,F||nt(h,w,this.length);let U=this[h+--w],J=1;for(;w>0&&(J*=256);)U+=this[h+--w]*J;return U},f.prototype.readUint8=f.prototype.readUInt8=function(h,w){return h=h>>>0,w||nt(h,1,this.length),this[h]},f.prototype.readUint16LE=f.prototype.readUInt16LE=function(h,w){return h=h>>>0,w||nt(h,2,this.length),this[h]|this[h+1]<<8},f.prototype.readUint16BE=f.prototype.readUInt16BE=function(h,w){return h=h>>>0,w||nt(h,2,this.length),this[h]<<8|this[h+1]},f.prototype.readUint32LE=f.prototype.readUInt32LE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},f.prototype.readUint32BE=f.prototype.readUInt32BE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},f.prototype.readBigUInt64LE=_e(function(h){h=h>>>0,yt(h,"offset");const w=this[h],F=this[h+7];(w===void 0||F===void 0)&&Pt(h,this.length-8);const U=w+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,J=this[++h]+this[++h]*2**8+this[++h]*2**16+F*2**24;return BigInt(U)+(BigInt(J)<<BigInt(32))}),f.prototype.readBigUInt64BE=_e(function(h){h=h>>>0,yt(h,"offset");const w=this[h],F=this[h+7];(w===void 0||F===void 0)&&Pt(h,this.length-8);const U=w*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],J=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+F;return(BigInt(U)<<BigInt(32))+BigInt(J)}),f.prototype.readIntLE=function(h,w,F){h=h>>>0,w=w>>>0,F||nt(h,w,this.length);let U=this[h],J=1,st=0;for(;++st<w&&(J*=256);)U+=this[h+st]*J;return J*=128,U>=J&&(U-=Math.pow(2,8*w)),U},f.prototype.readIntBE=function(h,w,F){h=h>>>0,w=w>>>0,F||nt(h,w,this.length);let U=w,J=1,st=this[h+--U];for(;U>0&&(J*=256);)st+=this[h+--U]*J;return J*=128,st>=J&&(st-=Math.pow(2,8*w)),st},f.prototype.readInt8=function(h,w){return h=h>>>0,w||nt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},f.prototype.readInt16LE=function(h,w){h=h>>>0,w||nt(h,2,this.length);const F=this[h]|this[h+1]<<8;return F&32768?F|4294901760:F},f.prototype.readInt16BE=function(h,w){h=h>>>0,w||nt(h,2,this.length);const F=this[h+1]|this[h]<<8;return F&32768?F|4294901760:F},f.prototype.readInt32LE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},f.prototype.readInt32BE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},f.prototype.readBigInt64LE=_e(function(h){h=h>>>0,yt(h,"offset");const w=this[h],F=this[h+7];(w===void 0||F===void 0)&&Pt(h,this.length-8);const U=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(F<<24);return(BigInt(U)<<BigInt(32))+BigInt(w+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),f.prototype.readBigInt64BE=_e(function(h){h=h>>>0,yt(h,"offset");const w=this[h],F=this[h+7];(w===void 0||F===void 0)&&Pt(h,this.length-8);const U=(w<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(U)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+F)}),f.prototype.readFloatLE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),e.read(this,h,!0,23,4)},f.prototype.readFloatBE=function(h,w){return h=h>>>0,w||nt(h,4,this.length),e.read(this,h,!1,23,4)},f.prototype.readDoubleLE=function(h,w){return h=h>>>0,w||nt(h,8,this.length),e.read(this,h,!0,52,8)},f.prototype.readDoubleBE=function(h,w){return h=h>>>0,w||nt(h,8,this.length),e.read(this,h,!1,52,8)};function dt(b,h,w,F,U,J){if(!f.isBuffer(b))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>U||h<J)throw new RangeError('"value" argument is out of bounds');if(w+F>b.length)throw new RangeError("Index out of range")}f.prototype.writeUintLE=f.prototype.writeUIntLE=function(h,w,F,U){if(h=+h,w=w>>>0,F=F>>>0,!U){const kt=Math.pow(2,8*F)-1;dt(this,h,w,F,kt,0)}let J=1,st=0;for(this[w]=h&255;++st<F&&(J*=256);)this[w+st]=h/J&255;return w+F},f.prototype.writeUintBE=f.prototype.writeUIntBE=function(h,w,F,U){if(h=+h,w=w>>>0,F=F>>>0,!U){const kt=Math.pow(2,8*F)-1;dt(this,h,w,F,kt,0)}let J=F-1,st=1;for(this[w+J]=h&255;--J>=0&&(st*=256);)this[w+J]=h/st&255;return w+F},f.prototype.writeUint8=f.prototype.writeUInt8=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,1,255,0),this[w]=h&255,w+1},f.prototype.writeUint16LE=f.prototype.writeUInt16LE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,2,65535,0),this[w]=h&255,this[w+1]=h>>>8,w+2},f.prototype.writeUint16BE=f.prototype.writeUInt16BE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,2,65535,0),this[w]=h>>>8,this[w+1]=h&255,w+2},f.prototype.writeUint32LE=f.prototype.writeUInt32LE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,4,4294967295,0),this[w+3]=h>>>24,this[w+2]=h>>>16,this[w+1]=h>>>8,this[w]=h&255,w+4},f.prototype.writeUint32BE=f.prototype.writeUInt32BE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,4,4294967295,0),this[w]=h>>>24,this[w+1]=h>>>16,this[w+2]=h>>>8,this[w+3]=h&255,w+4};function G(b,h,w,F,U){St(h,F,U,b,w,7);let J=Number(h&BigInt(4294967295));b[w++]=J,J=J>>8,b[w++]=J,J=J>>8,b[w++]=J,J=J>>8,b[w++]=J;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[w++]=st,st=st>>8,b[w++]=st,st=st>>8,b[w++]=st,st=st>>8,b[w++]=st,w}function M(b,h,w,F,U){St(h,F,U,b,w,7);let J=Number(h&BigInt(4294967295));b[w+7]=J,J=J>>8,b[w+6]=J,J=J>>8,b[w+5]=J,J=J>>8,b[w+4]=J;let st=Number(h>>BigInt(32)&BigInt(4294967295));return b[w+3]=st,st=st>>8,b[w+2]=st,st=st>>8,b[w+1]=st,st=st>>8,b[w]=st,w+8}f.prototype.writeBigUInt64LE=_e(function(h,w=0){return G(this,h,w,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeBigUInt64BE=_e(function(h,w=0){return M(this,h,w,BigInt(0),BigInt("0xffffffffffffffff"))}),f.prototype.writeIntLE=function(h,w,F,U){if(h=+h,w=w>>>0,!U){const Vt=Math.pow(2,8*F-1);dt(this,h,w,F,Vt-1,-Vt)}let J=0,st=1,kt=0;for(this[w]=h&255;++J<F&&(st*=256);)h<0&&kt===0&&this[w+J-1]!==0&&(kt=1),this[w+J]=(h/st>>0)-kt&255;return w+F},f.prototype.writeIntBE=function(h,w,F,U){if(h=+h,w=w>>>0,!U){const Vt=Math.pow(2,8*F-1);dt(this,h,w,F,Vt-1,-Vt)}let J=F-1,st=1,kt=0;for(this[w+J]=h&255;--J>=0&&(st*=256);)h<0&&kt===0&&this[w+J+1]!==0&&(kt=1),this[w+J]=(h/st>>0)-kt&255;return w+F},f.prototype.writeInt8=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,1,127,-128),h<0&&(h=255+h+1),this[w]=h&255,w+1},f.prototype.writeInt16LE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,2,32767,-32768),this[w]=h&255,this[w+1]=h>>>8,w+2},f.prototype.writeInt16BE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,2,32767,-32768),this[w]=h>>>8,this[w+1]=h&255,w+2},f.prototype.writeInt32LE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,4,2147483647,-2147483648),this[w]=h&255,this[w+1]=h>>>8,this[w+2]=h>>>16,this[w+3]=h>>>24,w+4},f.prototype.writeInt32BE=function(h,w,F){return h=+h,w=w>>>0,F||dt(this,h,w,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[w]=h>>>24,this[w+1]=h>>>16,this[w+2]=h>>>8,this[w+3]=h&255,w+4},f.prototype.writeBigInt64LE=_e(function(h,w=0){return G(this,h,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),f.prototype.writeBigInt64BE=_e(function(h,w=0){return M(this,h,w,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function tt(b,h,w,F,U,J){if(w+F>b.length)throw new RangeError("Index out of range");if(w<0)throw new RangeError("Index out of range")}function ct(b,h,w,F,U){return h=+h,w=w>>>0,U||tt(b,h,w,4),e.write(b,h,w,F,23,4),w+4}f.prototype.writeFloatLE=function(h,w,F){return ct(this,h,w,!0,F)},f.prototype.writeFloatBE=function(h,w,F){return ct(this,h,w,!1,F)};function _t(b,h,w,F,U){return h=+h,w=w>>>0,U||tt(b,h,w,8),e.write(b,h,w,F,52,8),w+8}f.prototype.writeDoubleLE=function(h,w,F){return _t(this,h,w,!0,F)},f.prototype.writeDoubleBE=function(h,w,F){return _t(this,h,w,!1,F)},f.prototype.copy=function(h,w,F,U){if(!f.isBuffer(h))throw new TypeError("argument should be a Buffer");if(F||(F=0),!U&&U!==0&&(U=this.length),w>=h.length&&(w=h.length),w||(w=0),U>0&&U<F&&(U=F),U===F||h.length===0||this.length===0)return 0;if(w<0)throw new RangeError("targetStart out of bounds");if(F<0||F>=this.length)throw new RangeError("Index out of range");if(U<0)throw new RangeError("sourceEnd out of bounds");U>this.length&&(U=this.length),h.length-w<U-F&&(U=h.length-w+F);const J=U-F;return this===h&&typeof o.prototype.copyWithin=="function"?this.copyWithin(w,F,U):o.prototype.set.call(h,this.subarray(F,U),w),J},f.prototype.fill=function(h,w,F,U){if(typeof h=="string"){if(typeof w=="string"?(U=w,w=0,F=this.length):typeof F=="string"&&(U=F,F=this.length),U!==void 0&&typeof U!="string")throw new TypeError("encoding must be a string");if(typeof U=="string"&&!f.isEncoding(U))throw new TypeError("Unknown encoding: "+U);if(h.length===1){const st=h.charCodeAt(0);(U==="utf8"&&st<128||U==="latin1")&&(h=st)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(w<0||this.length<w||this.length<F)throw new RangeError("Out of range index");if(F<=w)return this;w=w>>>0,F=F===void 0?this.length:F>>>0,h||(h=0);let J;if(typeof h=="number")for(J=w;J<F;++J)this[J]=h;else{const st=f.isBuffer(h)?h:f.from(h,U),kt=st.length;if(kt===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(J=0;J<F-w;++J)this[J+w]=st[J%kt]}return this};const v={};function x(b,h,w){v[b]=class extends w{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${b}]`,this.stack,delete this.name}get code(){return b}set code(U){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:U,writable:!0})}toString(){return`${this.name} [${b}]: ${this.message}`}}}x("ERR_BUFFER_OUT_OF_BOUNDS",function(b){return b?`${b} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),x("ERR_INVALID_ARG_TYPE",function(b,h){return`The "${b}" argument must be of type number. Received type ${typeof h}`},TypeError),x("ERR_OUT_OF_RANGE",function(b,h,w){let F=`The value of "${b}" is out of range.`,U=w;return Number.isInteger(w)&&Math.abs(w)>2**32?U=et(String(w)):typeof w=="bigint"&&(U=String(w),(w>BigInt(2)**BigInt(32)||w<-(BigInt(2)**BigInt(32)))&&(U=et(U)),U+="n"),F+=` It must be ${h}. Received ${U}`,F},RangeError);function et(b){let h="",w=b.length;const F=b[0]==="-"?1:0;for(;w>=F+4;w-=3)h=`_${b.slice(w-3,w)}${h}`;return`${b.slice(0,w)}${h}`}function lt(b,h,w){yt(h,"offset"),(b[h]===void 0||b[h+w]===void 0)&&Pt(h,b.length-(w+1))}function St(b,h,w,F,U,J){if(b>w||b<h){const st=typeof h=="bigint"?"n":"";let kt;throw h===0||h===BigInt(0)?kt=`>= 0${st} and < 2${st} ** ${(J+1)*8}${st}`:kt=`>= -(2${st} ** ${(J+1)*8-1}${st}) and < 2 ** ${(J+1)*8-1}${st}`,new v.ERR_OUT_OF_RANGE("value",kt,b)}lt(F,U,J)}function yt(b,h){if(typeof b!="number")throw new v.ERR_INVALID_ARG_TYPE(h,"number",b)}function Pt(b,h,w){throw Math.floor(b)!==b?(yt(b,w),new v.ERR_OUT_OF_RANGE("offset","an integer",b)):h<0?new v.ERR_BUFFER_OUT_OF_BOUNDS:new v.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,b)}const pe=/[^+/0-9A-Za-z-_]/g;function it(b){if(b=b.split("=")[0],b=b.trim().replace(pe,""),b.length<2)return"";for(;b.length%4!==0;)b=b+"=";return b}function we(b,h){h=h||1/0;let w;const F=b.length;let U=null;const J=[];for(let st=0;st<F;++st){if(w=b.charCodeAt(st),w>55295&&w<57344){if(!U){if(w>56319){(h-=3)>-1&&J.push(239,191,189);continue}else if(st+1===F){(h-=3)>-1&&J.push(239,191,189);continue}U=w;continue}if(w<56320){(h-=3)>-1&&J.push(239,191,189),U=w;continue}w=(U-55296<<10|w-56320)+65536}else U&&(h-=3)>-1&&J.push(239,191,189);if(U=null,w<128){if((h-=1)<0)break;J.push(w)}else if(w<2048){if((h-=2)<0)break;J.push(w>>6|192,w&63|128)}else if(w<65536){if((h-=3)<0)break;J.push(w>>12|224,w>>6&63|128,w&63|128)}else if(w<1114112){if((h-=4)<0)break;J.push(w>>18|240,w>>12&63|128,w>>6&63|128,w&63|128)}else throw new Error("Invalid code point")}return J}function de(b){const h=[];for(let w=0;w<b.length;++w)h.push(b.charCodeAt(w)&255);return h}function Gt(b,h){let w,F,U;const J=[];for(let st=0;st<b.length&&!((h-=2)<0);++st)w=b.charCodeAt(st),F=w>>8,U=w%256,J.push(U),J.push(F);return J}function Qt(b){return t.toByteArray(it(b))}function ge(b,h,w,F){let U;for(U=0;U<F&&!(U+w>=h.length||U>=b.length);++U)h[U+w]=b[U];return U}function le(b,h){return b instanceof h||b!=null&&b.constructor!=null&&b.constructor.name!=null&&b.constructor.name===h.name}function Be(b){return b!==b}const Ie=function(){const b="0123456789abcdef",h=new Array(256);for(let w=0;w<16;++w){const F=w*16;for(let U=0;U<16;++U)h[F+U]=b[w]+b[U]}return h}();function _e(b){return typeof BigInt>"u"?qe:b}function qe(){throw new Error("BigInt not supported")}})(b_);const Ke=b_.Buffer,t0="6.15.0";function e0(n,t,e){const r=t.split("|").map(o=>o.trim());for(let o=0;o<r.length;o++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof n===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${e}`,i.value=n,i}async function Ee(n){const t=Object.keys(n);return(await Promise.all(t.map(r=>Promise.resolve(n[r])))).reduce((r,i,o)=>(r[t[o]]=i,r),{})}function zt(n,t,e){for(let r in t){let i=t[r];const o=e?e[r]:null;o&&e0(i,o,r),Object.defineProperty(n,r,{enumerable:!0,value:i,writable:!1})}}function qi(n,t){if(n==null)return"null";if(t==null&&(t=new Set),typeof n=="object"){if(t.has(n))return"[Circular]";t.add(n)}if(Array.isArray(n))return"[ "+n.map(e=>qi(e,t)).join(", ")+" ]";if(n instanceof Uint8Array){const e="0123456789abcdef";let r="0x";for(let i=0;i<n.length;i++)r+=e[n[i]>>4],r+=e[n[i]&15];return r}if(typeof n=="object"&&typeof n.toJSON=="function")return qi(n.toJSON(),t);switch(typeof n){case"boolean":case"number":case"symbol":return n.toString();case"bigint":return BigInt(n).toString();case"string":return JSON.stringify(n);case"object":{const e=Object.keys(n);return e.sort(),"{ "+e.map(r=>`${qi(r,t)}: ${qi(n[r],t)}`).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function me(n,t){return n&&n.code===t}function ua(n){return me(n,"CALL_EXCEPTION")}function te(n,t,e){let r=n;{const o=[];if(e){if("message"in e||"code"in e||"name"in e)throw new Error(`value will overwrite populated values: ${qi(e)}`);for(const a in e){if(a==="shortMessage")continue;const u=e[a];o.push(a+"="+qi(u))}}o.push(`code=${t}`),o.push(`version=${t0}`),o.length&&(n+=" ("+o.join(", ")+")")}let i;switch(t){case"INVALID_ARGUMENT":i=new TypeError(n);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":i=new RangeError(n);break;default:i=new Error(n)}return zt(i,{code:t}),e&&Object.assign(i,e),i.shortMessage==null&&zt(i,{shortMessage:r}),i}function ut(n,t,e,r){if(!n)throw te(t,e,r)}function V(n,t,e,r){ut(n,t,"INVALID_ARGUMENT",{argument:e,value:r})}function A_(n,t,e){e==null&&(e=""),e&&(e=": "+e),ut(n>=t,"missing argument"+e,"MISSING_ARGUMENT",{count:n,expectedCount:t}),ut(n<=t,"too many arguments"+e,"UNEXPECTED_ARGUMENT",{count:n,expectedCount:t})}["NFD","NFC","NFKD","NFKC"].reduce((n,t)=>{try{if("test".normalize(t)!=="test")throw new Error("bad");if(t==="NFD"&&"é".normalize("NFD")!=="é")throw new Error("broken");n.push(t)}catch{}return n},[]);function oo(n,t,e){if(e==null&&(e=""),n!==t){let r=e,i="new";e&&(r+=".",i+=" "+e),ut(!1,`private constructor; use ${r}from* methods`,"UNSUPPORTED_OPERATION",{operation:i})}}function E_(n,t,e){if(n instanceof Uint8Array)return e?new Uint8Array(n):n;if(typeof n=="string"&&n.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const r=new Uint8Array((n.length-2)/2);let i=2;for(let o=0;o<r.length;o++)r[o]=parseInt(n.substring(i,i+2),16),i+=2;return r}V(!1,"invalid BytesLike value",t||"value",n)}function Ot(n,t){return E_(n,t,!1)}function ve(n,t){return E_(n,t,!0)}function $t(n,t){return!(typeof n!="string"||!n.match(/^0x[0-9A-Fa-f]*$/)||typeof t=="number"&&n.length!==2+2*t||t===!0&&n.length%2!==0)}function _a(n){return $t(n,!0)||n instanceof Uint8Array}const v_="0123456789abcdef";function gt(n){const t=Ot(n);let e="0x";for(let r=0;r<t.length;r++){const i=t[r];e+=v_[(i&240)>>4]+v_[i&15]}return e}function ne(n){return"0x"+n.map(t=>gt(t).substring(2)).join("")}function Qi(n){return $t(n,!0)?(n.length-2)/2:Ot(n).length}function ie(n,t,e){const r=Ot(n);return e!=null&&e>r.length&&ut(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:r,length:r.length,offset:e}),gt(r.slice(t??0,e??r.length))}function x_(n,t,e){const r=Ot(n);ut(t>=r.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(r),length:t,offset:t+1});const i=new Uint8Array(t);return i.fill(0),e?i.set(r,t-r.length):i.set(r,0),gt(i)}function pr(n,t){return x_(n,t,!0)}function r0(n,t){return x_(n,t,!1)}const ao=BigInt(0),We=BigInt(1),Ki=9007199254740991;function n0(n,t){const e=co(n,"value"),r=BigInt(Tt(t,"width"));if(ut(e>>r===ao,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:n}),e>>r-We){const i=(We<<r)-We;return-((~e&i)+We)}return e}function R_(n,t){let e=mt(n,"value");const r=BigInt(Tt(t,"width")),i=We<<r-We;if(e<ao){e=-e,ut(e<=i,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});const o=(We<<r)-We;return(~e&o)+We}else ut(e<i,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:n});return e}function Es(n,t){const e=co(n,"value"),r=BigInt(Tt(t,"bits"));return e&(We<<r)-We}function mt(n,t){switch(typeof n){case"bigint":return n;case"number":return V(Number.isInteger(n),"underflow",t||"value",n),V(n>=-Ki&&n<=Ki,"overflow",t||"value",n),BigInt(n);case"string":try{if(n==="")throw new Error("empty string");return n[0]==="-"&&n[1]!=="-"?-BigInt(n.substring(1)):BigInt(n)}catch(e){V(!1,`invalid BigNumberish string: ${e.message}`,t||"value",n)}}V(!1,"invalid BigNumberish value",t||"value",n)}function co(n,t){const e=mt(n,t);return ut(e>=ao,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:n}),e}const z_="0123456789abcdef";function fa(n){if(n instanceof Uint8Array){let t="0x0";for(const e of n)t+=z_[e>>4],t+=z_[e&15];return BigInt(t)}return mt(n)}function Tt(n,t){switch(typeof n){case"bigint":return V(n>=-Ki&&n<=Ki,"overflow",t||"value",n),Number(n);case"number":return V(Number.isInteger(n),"underflow",t||"value",n),V(n>=-Ki&&n<=Ki,"overflow",t||"value",n),n;case"string":try{if(n==="")throw new Error("empty string");return Tt(BigInt(n),t)}catch(e){V(!1,`invalid numeric string: ${e.message}`,t||"value",n)}}V(!1,"invalid numeric value",t||"value",n)}function i0(n){return Tt(fa(n))}function ni(n,t){let r=co(n,"value").toString(16);if(t==null)r.length%2&&(r="0"+r);else{const i=Tt(t,"width");for(ut(i*2>=r.length,`value exceeds width (${i} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:n});r.length<i*2;)r="0"+r}return"0x"+r}function he(n){const t=co(n,"value");if(t===ao)return new Uint8Array([]);let e=t.toString(16);e.length%2&&(e="0"+e);const r=new Uint8Array(e.length/2);for(let i=0;i<r.length;i++){const o=i*2;r[i]=parseInt(e.substring(o,o+2),16)}return r}function Je(n){let t=gt(_a(n)?n:he(n)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return t===""&&(t="0"),"0x"+t}const B_="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";BigInt(0);const S_=BigInt(58);function s0(n){const t=Ot(n);let e=fa(t),r="";for(;e;)r=B_[Number(e%S_)]+r,e/=S_;for(let i=0;i<t.length&&!t[i];i++)r=B_[0]+r;return r}function o0(n){n=atob(n);const t=new Uint8Array(n.length);for(let e=0;e<n.length;e++)t[e]=n.charCodeAt(e);return Ot(t)}function a0(n){const t=Ot(n);let e="";for(let r=0;r<t.length;r++)e+=String.fromCharCode(t[r]);return btoa(e)}class P_{filter;emitter;#t;constructor(t,e,r){this.#t=e,zt(this,{emitter:t,filter:r})}async removeListener(){this.#t!=null&&await this.emitter.off(this.filter,this.#t)}}function c0(n,t,e,r,i){V(!1,`invalid codepoint at offset ${t}; ${n}`,"bytes",e)}function k_(n,t,e,r,i){if(n==="BAD_PREFIX"||n==="UNEXPECTED_CONTINUE"){let o=0;for(let a=t+1;a<e.length&&e[a]>>6===2;a++)o++;return o}return n==="OVERRUN"?e.length-t-1:0}function u0(n,t,e,r,i){return n==="OVERLONG"?(V(typeof i=="number","invalid bad code point for replacement","badCodepoint",i),r.push(i),0):(r.push(65533),k_(n,t,e))}const _0=Object.freeze({error:c0,ignore:k_,replace:u0});function f0(n,t){t==null&&(t=_0.error);const e=Ot(n,"bytes"),r=[];let i=0;for(;i<e.length;){const o=e[i++];if(o>>7===0){r.push(o);continue}let a=null,u=null;if((o&224)===192)a=1,u=127;else if((o&240)===224)a=2,u=2047;else if((o&248)===240)a=3,u=65535;else{(o&192)===128?i+=t("UNEXPECTED_CONTINUE",i-1,e,r):i+=t("BAD_PREFIX",i-1,e,r);continue}if(i-1+a>=e.length){i+=t("OVERRUN",i-1,e,r);continue}let _=o&(1<<8-a-1)-1;for(let l=0;l<a;l++){let f=e[i];if((f&192)!=128){i+=t("MISSING_CONTINUE",i,e,r),_=null;break}_=_<<6|f&63,i++}if(_!==null){if(_>1114111){i+=t("OUT_OF_RANGE",i-1-a,e,r,_);continue}if(_>=55296&&_<=57343){i+=t("UTF16_SURROGATE",i-1-a,e,r,_);continue}if(_<=u){i+=t("OVERLONG",i-1-a,e,r,_);continue}r.push(_)}}return r}function wr(n,t){V(typeof n=="string","invalid string value","str",n);let e=[];for(let r=0;r<n.length;r++){const i=n.charCodeAt(r);if(i<128)e.push(i);else if(i<2048)e.push(i>>6|192),e.push(i&63|128);else if((i&64512)==55296){r++;const o=n.charCodeAt(r);V(r<n.length&&(o&64512)===56320,"invalid surrogate pair","str",n);const a=65536+((i&1023)<<10)+(o&1023);e.push(a>>18|240),e.push(a>>12&63|128),e.push(a>>6&63|128),e.push(a&63|128)}else e.push(i>>12|224),e.push(i>>6&63|128),e.push(i&63|128)}return new Uint8Array(e)}function l0(n){return n.map(t=>t<=65535?String.fromCharCode(t):(t-=65536,String.fromCharCode((t>>10&1023)+55296,(t&1023)+56320))).join("")}function uo(n,t){return l0(f0(n,t))}function F_(n){async function t(e,r){ut(r==null||!r.cancelled,"request cancelled before sending","CANCELLED");const i=e.url.split(":")[0].toLowerCase();ut(i==="http"||i==="https",`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),ut(i==="https"||!e.credentials||e.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const a=new AbortController,u=setTimeout(()=>{o=te("request timeout","TIMEOUT"),a.abort()},e.timeout);r&&r.addListener(()=>{o=te("request cancelled","CANCELLED"),a.abort()});const _=Object.assign({},n,{method:e.method,headers:new Headers(Array.from(e)),body:e.body||void 0,signal:a.signal});let l;try{l=await fetch(e.url,_)}catch(B){throw clearTimeout(u),o||B}clearTimeout(u);const f={};l.headers.forEach((B,I)=>{f[I.toLowerCase()]=B});const g=await l.arrayBuffer(),y=g==null?null:new Uint8Array(g);return{statusCode:l.status,statusMessage:l.statusText,headers:f,body:y}}return t}const h0=12,p0=250;let I_=F_();const w0=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),d0=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let la=!1;async function O_(n,t){try{const e=n.match(w0);if(!e)throw new Error("invalid data");return new ii(200,"OK",{"content-type":e[1]||"text/plain"},e[2]?o0(e[3]):y0(e[3]))}catch{return new ii(599,"BAD REQUEST (invalid data: URI)",{},null,new sr(n))}}function T_(n){async function t(e,r){try{const i=e.match(d0);if(!i)throw new Error("invalid link");return new sr(`${n}${i[2]}`)}catch{return new ii(599,"BAD REQUEST (invalid IPFS URI)",{},null,new sr(e))}}return t}const _o={data:O_,ipfs:T_("https://gateway.ipfs.io/ipfs/")},C_=new WeakMap;class g0{#t;#e;constructor(t){this.#t=[],this.#e=!1,C_.set(t,()=>{if(!this.#e){this.#e=!0;for(const e of this.#t)setTimeout(()=>{e()},0);this.#t=[]}})}addListener(t){ut(!this.#e,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#t.push(t)}get cancelled(){return this.#e}checkSignal(){ut(!this.cancelled,"cancelled","CANCELLED",{})}}function fo(n){if(n==null)throw new Error("missing signal; should not happen");return n.checkSignal(),n}class sr{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#w;#c;#_;#f;get url(){return this.#o}set url(t){this.#o=String(t)}get body(){return this.#s==null?null:new Uint8Array(this.#s)}set body(t){if(t==null)this.#s=void 0,this.#a=void 0;else if(typeof t=="string")this.#s=wr(t),this.#a="text/plain";else if(t instanceof Uint8Array)this.#s=t,this.#a="application/octet-stream";else if(typeof t=="object")this.#s=wr(JSON.stringify(t)),this.#a="application/json";else throw new Error("invalid body")}hasBody(){return this.#s!=null}get method(){return this.#n?this.#n:this.hasBody()?"POST":"GET"}set method(t){t==null&&(t=""),this.#n=String(t).toUpperCase()}get headers(){const t=Object.assign({},this.#r);return this.#h&&(t.authorization=`Basic ${a0(wr(this.#h))}`),this.allowGzip&&(t["accept-encoding"]="gzip"),t["content-type"]==null&&this.#a&&(t["content-type"]=this.#a),this.body&&(t["content-length"]=String(this.body.length)),t}getHeader(t){return this.headers[t.toLowerCase()]}setHeader(t,e){this.#r[String(t).toLowerCase()]=String(e)}clearHeaders(){this.#r={}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#h||null}setCredentials(t,e){V(!t.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#h=`${t}:${e}`}get allowGzip(){return this.#e}set allowGzip(t){this.#e=!!t}get allowInsecureAuthentication(){return!!this.#t}set allowInsecureAuthentication(t){this.#t=!!t}get timeout(){return this.#i}set timeout(t){V(t>=0,"timeout must be non-zero","timeout",t),this.#i=t}get preflightFunc(){return this.#u||null}set preflightFunc(t){this.#u=t}get processFunc(){return this.#p||null}set processFunc(t){this.#p=t}get retryFunc(){return this.#w||null}set retryFunc(t){this.#w=t}get getUrlFunc(){return this.#f||I_}set getUrlFunc(t){this.#f=t}constructor(t){this.#o=String(t),this.#t=!1,this.#e=!0,this.#r={},this.#n="",this.#i=3e5,this.#_={slotInterval:p0,maxAttempts:h0},this.#f=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#s?gt(this.#s):"null"}>`}setThrottleParams(t){t.slotInterval!=null&&(this.#_.slotInterval=t.slotInterval),t.maxAttempts!=null&&(this.#_.maxAttempts=t.maxAttempts)}async#l(t,e,r,i,o){if(t>=this.#_.maxAttempts)return o.makeServerError("exceeded maximum retry limit");ut(N_()<=e,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:i}),r>0&&await b0(r);let a=this.clone();const u=(a.url.split(":")[0]||"").toLowerCase();if(u in _o){const f=await _o[u](a.url,fo(i.#c));if(f instanceof ii){let g=f;if(this.processFunc){fo(i.#c);try{g=await this.processFunc(a,g)}catch(y){(y.throttle==null||typeof y.stall!="number")&&g.makeServerError("error in post-processing function",y).assertOk()}}return g}a=f}this.preflightFunc&&(a=await this.preflightFunc(a));const _=await this.getUrlFunc(a,fo(i.#c));let l=new ii(_.statusCode,_.statusMessage,_.headers,_.body,i);if(l.statusCode===301||l.statusCode===302){try{const f=l.headers.location||"";return a.redirect(f).#l(t+1,e,0,i,l)}catch{}return l}else if(l.statusCode===429&&(this.retryFunc==null||await this.retryFunc(a,l,t))){const f=l.headers["retry-after"];let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return typeof f=="string"&&f.match(/^[1-9][0-9]*$/)&&(g=parseInt(f)),a.clone().#l(t+1,e,g,i,l)}if(this.processFunc){fo(i.#c);try{l=await this.processFunc(a,l)}catch(f){(f.throttle==null||typeof f.stall!="number")&&l.makeServerError("error in post-processing function",f).assertOk();let g=this.#_.slotInterval*Math.trunc(Math.random()*Math.pow(2,t));return f.stall>=0&&(g=f.stall),a.clone().#l(t+1,e,g,i,l)}}return l}send(){return ut(this.#c==null,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#c=new g0(this),this.#l(0,N_()+this.timeout,0,this,new ii(0,"",{},null,this))}cancel(){ut(this.#c!=null,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const t=C_.get(this);if(!t)throw new Error("missing signal; should not happen");t()}redirect(t){const e=this.url.split(":")[0].toLowerCase(),r=t.split(":")[0].toLowerCase();ut(this.method==="GET"&&(e!=="https"||r!=="http")&&t.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(t)})`});const i=new sr(t);return i.method="GET",i.allowGzip=this.allowGzip,i.timeout=this.timeout,i.#r=Object.assign({},this.#r),this.#s&&(i.#s=new Uint8Array(this.#s)),i.#a=this.#a,i}clone(){const t=new sr(this.url);return t.#n=this.#n,this.#s&&(t.#s=this.#s),t.#a=this.#a,t.#r=Object.assign({},this.#r),t.#h=this.#h,this.allowGzip&&(t.allowGzip=!0),t.timeout=this.timeout,this.allowInsecureAuthentication&&(t.allowInsecureAuthentication=!0),t.#u=this.#u,t.#p=this.#p,t.#w=this.#w,t.#_=Object.assign({},this.#_),t.#f=this.#f,t}static lockConfig(){la=!0}static getGateway(t){return _o[t.toLowerCase()]||null}static registerGateway(t,e){if(t=t.toLowerCase(),t==="http"||t==="https")throw new Error(`cannot intercept ${t}; use registerGetUrl`);if(la)throw new Error("gateways locked");_o[t]=e}static registerGetUrl(t){if(la)throw new Error("gateways locked");I_=t}static createGetUrlFunc(t){return F_(t)}static createDataGateway(){return O_}static createIpfsGatewayFunc(t){return T_(t)}}class ii{#t;#e;#r;#n;#i;#o;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#n?gt(this.#n):"null"}>`}get statusCode(){return this.#t}get statusMessage(){return this.#e}get headers(){return Object.assign({},this.#r)}get body(){return this.#n==null?null:new Uint8Array(this.#n)}get bodyText(){try{return this.#n==null?"":uo(this.#n)}catch{ut(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch{ut(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const t=this.headers,e=Object.keys(t);let r=0;return{next:()=>{if(r<e.length){const i=e[r++];return{value:[i,t[i]],done:!1}}return{value:void 0,done:!0}}}}constructor(t,e,r,i,o){this.#t=t,this.#e=e,this.#r=Object.keys(r).reduce((a,u)=>(a[u.toLowerCase()]=String(r[u]),a),{}),this.#n=i==null?null:new Uint8Array(i),this.#i=o||null,this.#o={message:""}}makeServerError(t,e){let r;t?r=`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${t})`:(t=`${this.statusCode} ${this.statusMessage}`,r=`CLIENT ESCALATED SERVER ERROR (${t})`);const i=new ii(599,r,this.headers,this.body,this.#i||void 0);return i.#o={message:t,error:e},i}throwThrottleError(t,e){e==null?e=-1:V(Number.isInteger(e)&&e>=0,"invalid stall timeout","stall",e);const r=new Error(t||"throttling requests");throw zt(r,{stall:e,throttle:!0}),r}getHeader(t){return this.headers[t.toLowerCase()]}hasBody(){return this.#n!=null}get request(){return this.#i}ok(){return this.#o.message===""&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:t,error:e}=this.#o;t===""&&(t=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let i=null;try{this.#n&&(i=uo(this.#n))}catch{}ut(!1,t,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:e,info:{requestUrl:r,responseBody:i,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function N_(){return new Date().getTime()}function y0(n){return wr(n.replace(/%([0-9a-f][0-9a-f])/gi,(t,e)=>String.fromCharCode(parseInt(e,16))))}function b0(n){return new Promise(t=>setTimeout(t,n))}function m0(n){let t=n.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function L_(n,t,e){let r=0;for(let i=0;i<e;i++)r=r*256+n[t+i];return r}function D_(n,t,e,r){const i=[];for(;e<t+1+r;){const o=U_(n,e);i.push(o.result),e+=o.consumed,ut(e<=t+1+r,"child data too short","BUFFER_OVERRUN",{buffer:n,length:r,offset:t})}return{consumed:1+r,result:i}}function U_(n,t){ut(n.length!==0,"data too short","BUFFER_OVERRUN",{buffer:n,length:0,offset:1});const e=r=>{ut(r<=n.length,"data short segment too short","BUFFER_OVERRUN",{buffer:n,length:n.length,offset:r})};if(n[t]>=248){const r=n[t]-247;e(t+1+r);const i=L_(n,t+1,r);return e(t+1+r+i),D_(n,t,t+1+r,r+i)}else if(n[t]>=192){const r=n[t]-192;return e(t+1+r),D_(n,t,t+1,r)}else if(n[t]>=184){const r=n[t]-183;e(t+1+r);const i=L_(n,t+1,r);e(t+1+r+i);const o=gt(n.slice(t+1+r,t+1+r+i));return{consumed:1+r+i,result:o}}else if(n[t]>=128){const r=n[t]-128;e(t+1+r);const i=gt(n.slice(t+1,t+1+r));return{consumed:1+r,result:i}}return{consumed:1,result:m0(n[t])}}function vs(n){const t=Ot(n,"data"),e=U_(t,0);return V(e.consumed===t.length,"unexpected junk after rlp payload","data",n),e.result}function M_(n){const t=[];for(;n;)t.unshift(n&255),n>>=8;return t}function j_(n){if(Array.isArray(n)){let r=[];if(n.forEach(function(o){r=r.concat(j_(o))}),r.length<=55)return r.unshift(192+r.length),r;const i=M_(r.length);return i.unshift(247+i.length),i.concat(r)}const t=Array.prototype.slice.call(Ot(n,"object"));if(t.length===1&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const e=M_(t.length);return e.unshift(183+e.length),e.concat(t)}const G_="0123456789abcdef";function si(n){let t="0x";for(const e of j_(n))t+=G_[e>>4],t+=G_[e&15];return t}const xe=32,ha=new Uint8Array(xe),A0=["then"],lo={},H_=new WeakMap;function di(n){return H_.get(n)}function V_(n,t){H_.set(n,t)}function xs(n,t){const e=new Error(`deferred error during ABI decoding triggered accessing ${n}`);throw e.error=t,e}function pa(n,t,e){return n.indexOf(null)>=0?t.map((r,i)=>r instanceof dr?pa(di(r),r,e):r):n.reduce((r,i,o)=>{let a=t.getValue(i);return i in r||(e&&a instanceof dr&&(a=pa(di(a),a,e)),r[i]=a),r},{})}class dr extends Array{#t;constructor(...t){const e=t[0];let r=t[1],i=(t[2]||[]).slice(),o=!0;e!==lo&&(r=t,i=[],o=!1),super(r.length),r.forEach((_,l)=>{this[l]=_});const a=i.reduce((_,l)=>(typeof l=="string"&&_.set(l,(_.get(l)||0)+1),_),new Map);if(V_(this,Object.freeze(r.map((_,l)=>{const f=i[l];return f!=null&&a.get(f)===1?f:null}))),this.#t=[],this.#t==null&&this.#t,!o)return;Object.freeze(this);const u=new Proxy(this,{get:(_,l,f)=>{if(typeof l=="string"){if(l.match(/^[0-9]+$/)){const y=Tt(l,"%index");if(y<0||y>=this.length)throw new RangeError("out of result range");const B=_[y];return B instanceof Error&&xs(`index ${y}`,B),B}if(A0.indexOf(l)>=0)return Reflect.get(_,l,f);const g=_[l];if(g instanceof Function)return function(...y){return g.apply(this===f?_:this,y)};if(!(l in _))return _.getValue.apply(this===f?_:this,[l])}return Reflect.get(_,l,f)}});return V_(u,di(this)),u}toArray(t){const e=[];return this.forEach((r,i)=>{r instanceof Error&&xs(`index ${i}`,r),t&&r instanceof dr&&(r=r.toArray(t)),e.push(r)}),e}toObject(t){const e=di(this);return e.reduce((r,i,o)=>(ut(i!=null,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),pa(e,this,t)),{})}slice(t,e){t==null&&(t=0),t<0&&(t+=this.length,t<0&&(t=0)),e==null&&(e=this.length),e<0&&(e+=this.length,e<0&&(e=0)),e>this.length&&(e=this.length);const r=di(this),i=[],o=[];for(let a=t;a<e;a++)i.push(this[a]),o.push(r[a]);return new dr(lo,i,o)}filter(t,e){const r=di(this),i=[],o=[];for(let a=0;a<this.length;a++){const u=this[a];u instanceof Error&&xs(`index ${a}`,u),t.call(e,u,a,this)&&(i.push(u),o.push(r[a]))}return new dr(lo,i,o)}map(t,e){const r=[];for(let i=0;i<this.length;i++){const o=this[i];o instanceof Error&&xs(`index ${i}`,o),r.push(t.call(e,o,i,this))}return r}getValue(t){const e=di(this).indexOf(t);if(e===-1)return;const r=this[e];return r instanceof Error&&xs(`property ${JSON.stringify(t)}`,r.error),r}static fromItems(t,e){return new dr(lo,t,e)}}function q_(n){let t=he(n);return ut(t.length<=xe,"value out-of-bounds","BUFFER_OVERRUN",{buffer:t,length:xe,offset:t.length}),t.length!==xe&&(t=ve(ne([ha.slice(t.length%xe),t]))),t}class gr{name;type;localName;dynamic;constructor(t,e,r,i){zt(this,{name:t,type:e,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(t,e){V(!1,t,this.localName,e)}}class wa{#t;#e;constructor(){this.#t=[],this.#e=0}get data(){return ne(this.#t)}get length(){return this.#e}#r(t){return this.#t.push(t),this.#e+=t.length,t.length}appendWriter(t){return this.#r(ve(t.data))}writeBytes(t){let e=ve(t);const r=e.length%xe;return r&&(e=ve(ne([e,ha.slice(r)]))),this.#r(e)}writeValue(t){return this.#r(q_(t))}writeUpdatableValue(){const t=this.#t.length;return this.#t.push(ha),this.#e+=xe,e=>{this.#t[t]=q_(e)}}}class da{allowLoose;#t;#e;#r;#n;#i;constructor(t,e,r){zt(this,{allowLoose:!!e}),this.#t=ve(t),this.#r=0,this.#n=null,this.#i=r??1024,this.#e=0}get data(){return gt(this.#t)}get dataLength(){return this.#t.length}get consumed(){return this.#e}get bytes(){return new Uint8Array(this.#t)}#o(t){if(this.#n)return this.#n.#o(t);this.#r+=t,ut(this.#i<1||this.#r<=this.#i*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#i} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:ve(this.#t),offset:this.#e,length:t,info:{bytesRead:this.#r,dataLength:this.dataLength}})}#s(t,e,r){let i=Math.ceil(e/xe)*xe;return this.#e+i>this.#t.length&&(this.allowLoose&&r&&this.#e+e<=this.#t.length?i=e:ut(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:ve(this.#t),length:this.#t.length,offset:this.#e+i})),this.#t.slice(this.#e,this.#e+i)}subReader(t){const e=new da(this.#t.slice(this.#e+t),this.allowLoose,this.#i);return e.#n=this,e}readBytes(t,e){let r=this.#s(0,t,!!e);return this.#o(t),this.#e+=r.length,r.slice(0,t)}readValue(){return fa(this.readBytes(xe))}readIndex(){return i0(this.readBytes(xe))}}function ho(n){if(!Number.isSafeInteger(n)||n<0)throw new Error(`Wrong positive integer: ${n}`)}function ga(n,...t){if(!(n instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(n.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${n.length}`)}function E0(n){if(typeof n!="function"||typeof n.create!="function")throw new Error("Hash should be wrapped by utils.wrapConstructor");ho(n.outputLen),ho(n.blockLen)}function Wi(n,t=!0){if(n.destroyed)throw new Error("Hash instance has been destroyed");if(t&&n.finished)throw new Error("Hash#digest() has already been called")}function Q_(n,t){ga(n);const e=t.outputLen;if(n.length<e)throw new Error(`digestInto() expects output buffer of length at least ${e}`)}const ya=typeof globalThis=="object"&&"crypto"in globalThis?globalThis.crypto:void 0;/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */const K_=n=>n instanceof Uint8Array,v0=n=>new Uint32Array(n.buffer,n.byteOffset,Math.floor(n.byteLength/4)),ba=n=>new DataView(n.buffer,n.byteOffset,n.byteLength),or=(n,t)=>n<<32-t|n>>>t;if(!(new Uint8Array(new Uint32Array([287454020]).buffer)[0]===68))throw new Error("Non little-endian hardware is not supported");function x0(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function po(n){if(typeof n=="string"&&(n=x0(n)),!K_(n))throw new Error(`expected Uint8Array, got ${typeof n}`);return n}function R0(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!K_(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}class ma{clone(){return this._cloneInto()}}function Aa(n){const t=r=>n().update(po(r)).digest(),e=n();return t.outputLen=e.outputLen,t.blockLen=e.blockLen,t.create=()=>n(),t}function z0(n=32){if(ya&&typeof ya.getRandomValues=="function")return ya.getRandomValues(new Uint8Array(n));throw new Error("crypto.getRandomValues must be defined")}class W_ extends ma{constructor(t,e){super(),this.finished=!1,this.destroyed=!1,E0(t);const r=po(e);if(this.iHash=t.create(),typeof this.iHash.update!="function")throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?t.create().update(r).digest():r);for(let a=0;a<o.length;a++)o[a]^=54;this.iHash.update(o),this.oHash=t.create();for(let a=0;a<o.length;a++)o[a]^=106;this.oHash.update(o),o.fill(0)}update(t){return Wi(this),this.iHash.update(t),this}digestInto(t){Wi(this),ga(t,this.outputLen),this.finished=!0,this.iHash.digestInto(t),this.oHash.update(t),this.oHash.digestInto(t),this.destroy()}digest(){const t=new Uint8Array(this.oHash.outputLen);return this.digestInto(t),t}_cloneInto(t){t||(t=Object.create(Object.getPrototypeOf(this),{}));const{oHash:e,iHash:r,finished:i,destroyed:o,blockLen:a,outputLen:u}=this;return t=t,t.finished=i,t.destroyed=o,t.blockLen=a,t.outputLen=u,t.oHash=e._cloneInto(t.oHash),t.iHash=r._cloneInto(t.iHash),t}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}const J_=(n,t,e)=>new W_(n,t).update(e).digest();J_.create=(n,t)=>new W_(n,t);function B0(n,t,e,r){if(typeof n.setBigUint64=="function")return n.setBigUint64(t,e,r);const i=BigInt(32),o=BigInt(4294967295),a=Number(e>>i&o),u=Number(e&o),_=r?4:0,l=r?0:4;n.setUint32(t+_,a,r),n.setUint32(t+l,u,r)}class $_ extends ma{constructor(t,e,r,i){super(),this.blockLen=t,this.outputLen=e,this.padOffset=r,this.isLE=i,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(t),this.view=ba(this.buffer)}update(t){Wi(this);const{view:e,buffer:r,blockLen:i}=this;t=po(t);const o=t.length;for(let a=0;a<o;){const u=Math.min(i-this.pos,o-a);if(u===i){const _=ba(t);for(;i<=o-a;a+=i)this.process(_,a);continue}r.set(t.subarray(a,a+u),this.pos),this.pos+=u,a+=u,this.pos===i&&(this.process(e,0),this.pos=0)}return this.length+=t.length,this.roundClean(),this}digestInto(t){Wi(this),Q_(t,this),this.finished=!0;const{buffer:e,view:r,blockLen:i,isLE:o}=this;let{pos:a}=this;e[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>i-a&&(this.process(r,0),a=0);for(let g=a;g<i;g++)e[g]=0;B0(r,i-8,BigInt(this.length*8),o),this.process(r,0);const u=ba(t),_=this.outputLen;if(_%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=_/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let g=0;g<l;g++)u.setUint32(4*g,f[g],o)}digest(){const{buffer:t,outputLen:e}=this;this.digestInto(t);const r=t.slice(0,e);return this.destroy(),r}_cloneInto(t){t||(t=new this.constructor),t.set(...this.get());const{blockLen:e,buffer:r,length:i,finished:o,destroyed:a,pos:u}=this;return t.length=i,t.pos=u,t.finished=o,t.destroyed=a,i%e&&t.buffer.set(r),t}}const S0=(n,t,e)=>n&t^~n&e,P0=(n,t,e)=>n&t^n&e^t&e,k0=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),oi=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ai=new Uint32Array(64);class F0 extends $_{constructor(){super(64,32,8,!1),this.A=oi[0]|0,this.B=oi[1]|0,this.C=oi[2]|0,this.D=oi[3]|0,this.E=oi[4]|0,this.F=oi[5]|0,this.G=oi[6]|0,this.H=oi[7]|0}get(){const{A:t,B:e,C:r,D:i,E:o,F:a,G:u,H:_}=this;return[t,e,r,i,o,a,u,_]}set(t,e,r,i,o,a,u,_){this.A=t|0,this.B=e|0,this.C=r|0,this.D=i|0,this.E=o|0,this.F=a|0,this.G=u|0,this.H=_|0}process(t,e){for(let g=0;g<16;g++,e+=4)ai[g]=t.getUint32(e,!1);for(let g=16;g<64;g++){const y=ai[g-15],B=ai[g-2],I=or(y,7)^or(y,18)^y>>>3,S=or(B,17)^or(B,19)^B>>>10;ai[g]=S+ai[g-7]+I+ai[g-16]|0}let{A:r,B:i,C:o,D:a,E:u,F:_,G:l,H:f}=this;for(let g=0;g<64;g++){const y=or(u,6)^or(u,11)^or(u,25),B=f+y+S0(u,_,l)+k0[g]+ai[g]|0,S=(or(r,2)^or(r,13)^or(r,22))+P0(r,i,o)|0;f=l,l=_,_=u,u=a+B|0,a=o,o=i,i=r,r=B+S|0}r=r+this.A|0,i=i+this.B|0,o=o+this.C|0,a=a+this.D|0,u=u+this.E|0,_=_+this.F|0,l=l+this.G|0,f=f+this.H|0,this.set(r,i,o,a,u,_,l,f)}roundClean(){ai.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}const Y_=Aa(()=>new F0),wo=BigInt(2**32-1),Ea=BigInt(32);function Z_(n,t=!1){return t?{h:Number(n&wo),l:Number(n>>Ea&wo)}:{h:Number(n>>Ea&wo)|0,l:Number(n&wo)|0}}function X_(n,t=!1){let e=new Uint32Array(n.length),r=new Uint32Array(n.length);for(let i=0;i<n.length;i++){const{h:o,l:a}=Z_(n[i],t);[e[i],r[i]]=[o,a]}return[e,r]}const I0=(n,t)=>BigInt(n>>>0)<<Ea|BigInt(t>>>0),O0=(n,t,e)=>n>>>e,T0=(n,t,e)=>n<<32-e|t>>>e,C0=(n,t,e)=>n>>>e|t<<32-e,N0=(n,t,e)=>n<<32-e|t>>>e,L0=(n,t,e)=>n<<64-e|t>>>e-32,D0=(n,t,e)=>n>>>e-32|t<<64-e,U0=(n,t)=>t,M0=(n,t)=>n,tf=(n,t,e)=>n<<e|t>>>32-e,ef=(n,t,e)=>t<<e|n>>>32-e,rf=(n,t,e)=>t<<e-32|n>>>64-e,nf=(n,t,e)=>n<<e-32|t>>>64-e;function j0(n,t,e,r){const i=(t>>>0)+(r>>>0);return{h:n+e+(i/2**32|0)|0,l:i|0}}const It={fromBig:Z_,split:X_,toBig:I0,shrSH:O0,shrSL:T0,rotrSH:C0,rotrSL:N0,rotrBH:L0,rotrBL:D0,rotr32H:U0,rotr32L:M0,rotlSH:tf,rotlSL:ef,rotlBH:rf,rotlBL:nf,add:j0,add3L:(n,t,e)=>(n>>>0)+(t>>>0)+(e>>>0),add3H:(n,t,e,r)=>t+e+r+(n/2**32|0)|0,add4L:(n,t,e,r)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0),add4H:(n,t,e,r,i)=>t+e+r+i+(n/2**32|0)|0,add5H:(n,t,e,r,i,o)=>t+e+r+i+o+(n/2**32|0)|0,add5L:(n,t,e,r,i)=>(n>>>0)+(t>>>0)+(e>>>0)+(r>>>0)+(i>>>0)},[G0,H0]=It.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map(n=>BigInt(n))),ci=new Uint32Array(80),ui=new Uint32Array(80);class V0 extends $_{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:t,Al:e,Bh:r,Bl:i,Ch:o,Cl:a,Dh:u,Dl:_,Eh:l,El:f,Fh:g,Fl:y,Gh:B,Gl:I,Hh:S,Hl:T}=this;return[t,e,r,i,o,a,u,_,l,f,g,y,B,I,S,T]}set(t,e,r,i,o,a,u,_,l,f,g,y,B,I,S,T){this.Ah=t|0,this.Al=e|0,this.Bh=r|0,this.Bl=i|0,this.Ch=o|0,this.Cl=a|0,this.Dh=u|0,this.Dl=_|0,this.Eh=l|0,this.El=f|0,this.Fh=g|0,this.Fl=y|0,this.Gh=B|0,this.Gl=I|0,this.Hh=S|0,this.Hl=T|0}process(t,e){for(let P=0;P<16;P++,e+=4)ci[P]=t.getUint32(e),ui[P]=t.getUint32(e+=4);for(let P=16;P<80;P++){const z=ci[P-15]|0,k=ui[P-15]|0,C=It.rotrSH(z,k,1)^It.rotrSH(z,k,8)^It.shrSH(z,k,7),N=It.rotrSL(z,k,1)^It.rotrSL(z,k,8)^It.shrSL(z,k,7),D=ci[P-2]|0,Y=ui[P-2]|0,Z=It.rotrSH(D,Y,19)^It.rotrBH(D,Y,61)^It.shrSH(D,Y,6),ft=It.rotrSL(D,Y,19)^It.rotrBL(D,Y,61)^It.shrSL(D,Y,6),L=It.add4L(N,ft,ui[P-7],ui[P-16]),At=It.add4H(L,C,Z,ci[P-7],ci[P-16]);ci[P]=At|0,ui[P]=L|0}let{Ah:r,Al:i,Bh:o,Bl:a,Ch:u,Cl:_,Dh:l,Dl:f,Eh:g,El:y,Fh:B,Fl:I,Gh:S,Gl:T,Hh:A,Hl:R}=this;for(let P=0;P<80;P++){const z=It.rotrSH(g,y,14)^It.rotrSH(g,y,18)^It.rotrBH(g,y,41),k=It.rotrSL(g,y,14)^It.rotrSL(g,y,18)^It.rotrBL(g,y,41),C=g&B^~g&S,N=y&I^~y&T,D=It.add5L(R,k,N,H0[P],ui[P]),Y=It.add5H(D,A,z,C,G0[P],ci[P]),Z=D|0,ft=It.rotrSH(r,i,28)^It.rotrBH(r,i,34)^It.rotrBH(r,i,39),L=It.rotrSL(r,i,28)^It.rotrBL(r,i,34)^It.rotrBL(r,i,39),At=r&o^r&u^o&u,Rt=i&a^i&_^a&_;A=S|0,R=T|0,S=B|0,T=I|0,B=g|0,I=y|0,{h:g,l:y}=It.add(l|0,f|0,Y|0,Z|0),l=u|0,f=_|0,u=o|0,_=a|0,o=r|0,a=i|0;const at=It.add3L(Z,L,Rt);r=It.add3H(at,Y,ft,At),i=at|0}({h:r,l:i}=It.add(this.Ah|0,this.Al|0,r|0,i|0)),{h:o,l:a}=It.add(this.Bh|0,this.Bl|0,o|0,a|0),{h:u,l:_}=It.add(this.Ch|0,this.Cl|0,u|0,_|0),{h:l,l:f}=It.add(this.Dh|0,this.Dl|0,l|0,f|0),{h:g,l:y}=It.add(this.Eh|0,this.El|0,g|0,y|0),{h:B,l:I}=It.add(this.Fh|0,this.Fl|0,B|0,I|0),{h:S,l:T}=It.add(this.Gh|0,this.Gl|0,S|0,T|0),{h:A,l:R}=It.add(this.Hh|0,this.Hl|0,A|0,R|0),this.set(r,i,o,a,u,_,l,f,g,y,B,I,S,T,A,R)}roundClean(){ci.fill(0),ui.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}const q0=Aa(()=>new V0);function Q0(){if(typeof self<"u")return self;if(typeof window<"u")return window;if(typeof Hi<"u")return Hi;throw new Error("unable to locate global object")}const sf=Q0();sf.crypto||sf.msCrypto;function K0(n){switch(n){case"sha256":return Y_.create();case"sha512":return q0.create()}V(!1,"invalid hashing algorithm name","algorithm",n)}const[of,af,cf]=[[],[],[]],W0=BigInt(0),Rs=BigInt(1),J0=BigInt(2),$0=BigInt(7),Y0=BigInt(256),Z0=BigInt(113);for(let n=0,t=Rs,e=1,r=0;n<24;n++){[e,r]=[r,(2*e+3*r)%5],of.push(2*(5*r+e)),af.push((n+1)*(n+2)/2%64);let i=W0;for(let o=0;o<7;o++)t=(t<<Rs^(t>>$0)*Z0)%Y0,t&J0&&(i^=Rs<<(Rs<<BigInt(o))-Rs);cf.push(i)}const[X0,ty]=X_(cf,!0),uf=(n,t,e)=>e>32?rf(n,t,e):tf(n,t,e),_f=(n,t,e)=>e>32?nf(n,t,e):ef(n,t,e);function ey(n,t=24){const e=new Uint32Array(10);for(let r=24-t;r<24;r++){for(let a=0;a<10;a++)e[a]=n[a]^n[a+10]^n[a+20]^n[a+30]^n[a+40];for(let a=0;a<10;a+=2){const u=(a+8)%10,_=(a+2)%10,l=e[_],f=e[_+1],g=uf(l,f,1)^e[u],y=_f(l,f,1)^e[u+1];for(let B=0;B<50;B+=10)n[a+B]^=g,n[a+B+1]^=y}let i=n[2],o=n[3];for(let a=0;a<24;a++){const u=af[a],_=uf(i,o,u),l=_f(i,o,u),f=of[a];i=n[f],o=n[f+1],n[f]=_,n[f+1]=l}for(let a=0;a<50;a+=10){for(let u=0;u<10;u++)e[u]=n[a+u];for(let u=0;u<10;u++)n[a+u]^=~e[(u+2)%10]&e[(u+4)%10]}n[0]^=X0[r],n[1]^=ty[r]}e.fill(0)}class va extends ma{constructor(t,e,r,i=!1,o=24){if(super(),this.blockLen=t,this.suffix=e,this.outputLen=r,this.enableXOF=i,this.rounds=o,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,ho(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=v0(this.state)}keccak(){ey(this.state32,this.rounds),this.posOut=0,this.pos=0}update(t){Wi(this);const{blockLen:e,state:r}=this;t=po(t);const i=t.length;for(let o=0;o<i;){const a=Math.min(e-this.pos,i-o);for(let u=0;u<a;u++)r[this.pos++]^=t[o++];this.pos===e&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:t,suffix:e,pos:r,blockLen:i}=this;t[r]^=e,(e&128)!==0&&r===i-1&&this.keccak(),t[i-1]^=128,this.keccak()}writeInto(t){Wi(this,!1),ga(t),this.finish();const e=this.state,{blockLen:r}=this;for(let i=0,o=t.length;i<o;){this.posOut>=r&&this.keccak();const a=Math.min(r-this.posOut,o-i);t.set(e.subarray(this.posOut,this.posOut+a),i),this.posOut+=a,i+=a}return t}xofInto(t){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(t)}xof(t){return ho(t),this.xofInto(new Uint8Array(t))}digestInto(t){if(Q_(t,this),this.finished)throw new Error("digest() was already called");return this.writeInto(t),this.destroy(),t}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(t){const{blockLen:e,suffix:r,outputLen:i,rounds:o,enableXOF:a}=this;return t||(t=new va(e,r,i,a,o)),t.state32.set(this.state32),t.pos=this.pos,t.posOut=this.posOut,t.finished=this.finished,t.rounds=o,t.suffix=r,t.outputLen=i,t.enableXOF=a,t.destroyed=this.destroyed,t}}const ry=((n,t,e)=>Aa(()=>new va(t,n,e)))(1,136,256/8);let ff=!1;const lf=function(n){return ry(n)};let hf=lf;function fe(n){const t=Ot(n,"data");return gt(hf(t))}fe._=lf,fe.lock=function(){ff=!0},fe.register=function(n){if(ff)throw new TypeError("keccak256 is locked");hf=n},Object.freeze(fe);const pf=function(n){return K0("sha256").update(n).digest()};let wf=pf,df=!1;function Ji(n){const t=Ot(n,"data");return gt(wf(t))}Ji._=pf,Ji.lock=function(){df=!0},Ji.register=function(n){if(df)throw new Error("sha256 is locked");wf=n},Object.freeze(Ji),Object.freeze(Ji);/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const gf=BigInt(0),go=BigInt(1),ny=BigInt(2),yo=n=>n instanceof Uint8Array,iy=Array.from({length:256},(n,t)=>t.toString(16).padStart(2,"0"));function $i(n){if(!yo(n))throw new Error("Uint8Array expected");let t="";for(let e=0;e<n.length;e++)t+=iy[n[e]];return t}function yf(n){const t=n.toString(16);return t.length&1?`0${t}`:t}function xa(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);return BigInt(n===""?"0":`0x${n}`)}function Yi(n){if(typeof n!="string")throw new Error("hex string expected, got "+typeof n);const t=n.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const e=new Uint8Array(t/2);for(let r=0;r<e.length;r++){const i=r*2,o=n.slice(i,i+2),a=Number.parseInt(o,16);if(Number.isNaN(a)||a<0)throw new Error("Invalid byte sequence");e[r]=a}return e}function gi(n){return xa($i(n))}function Ra(n){if(!yo(n))throw new Error("Uint8Array expected");return xa($i(Uint8Array.from(n).reverse()))}function Zi(n,t){return Yi(n.toString(16).padStart(t*2,"0"))}function za(n,t){return Zi(n,t).reverse()}function sy(n){return Yi(yf(n))}function $e(n,t,e){let r;if(typeof t=="string")try{r=Yi(t)}catch(o){throw new Error(`${n} must be valid hex string, got "${t}". Cause: ${o}`)}else if(yo(t))r=Uint8Array.from(t);else throw new Error(`${n} must be hex string or Uint8Array`);const i=r.length;if(typeof e=="number"&&i!==e)throw new Error(`${n} expected ${e} bytes, got ${i}`);return r}function zs(...n){const t=new Uint8Array(n.reduce((r,i)=>r+i.length,0));let e=0;return n.forEach(r=>{if(!yo(r))throw new Error("Uint8Array expected");t.set(r,e),e+=r.length}),t}function oy(n,t){if(n.length!==t.length)return!1;for(let e=0;e<n.length;e++)if(n[e]!==t[e])return!1;return!0}function ay(n){if(typeof n!="string")throw new Error(`utf8ToBytes expected string, got ${typeof n}`);return new Uint8Array(new TextEncoder().encode(n))}function cy(n){let t;for(t=0;n>gf;n>>=go,t+=1);return t}function uy(n,t){return n>>BigInt(t)&go}const _y=(n,t,e)=>n|(e?go:gf)<<BigInt(t),Ba=n=>(ny<<BigInt(n-1))-go,Sa=n=>new Uint8Array(n),bf=n=>Uint8Array.from(n);function mf(n,t,e){if(typeof n!="number"||n<2)throw new Error("hashLen must be a number");if(typeof t!="number"||t<2)throw new Error("qByteLen must be a number");if(typeof e!="function")throw new Error("hmacFn must be a function");let r=Sa(n),i=Sa(n),o=0;const a=()=>{r.fill(1),i.fill(0),o=0},u=(...g)=>e(i,r,...g),_=(g=Sa())=>{i=u(bf([0]),g),r=u(),g.length!==0&&(i=u(bf([1]),g),r=u())},l=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let g=0;const y=[];for(;g<t;){r=u();const B=r.slice();y.push(B),g+=r.length}return zs(...y)};return(g,y)=>{a(),_(g);let B;for(;!(B=y(l()));)_();return a(),B}}const fy={bigint:n=>typeof n=="bigint",function:n=>typeof n=="function",boolean:n=>typeof n=="boolean",string:n=>typeof n=="string",stringOrUint8Array:n=>typeof n=="string"||n instanceof Uint8Array,isSafeInteger:n=>Number.isSafeInteger(n),array:n=>Array.isArray(n),field:(n,t)=>t.Fp.isValid(n),hash:n=>typeof n=="function"&&Number.isSafeInteger(n.outputLen)};function Bs(n,t,e={}){const r=(i,o,a)=>{const u=fy[o];if(typeof u!="function")throw new Error(`Invalid validator "${o}", expected function`);const _=n[i];if(!(a&&_===void 0)&&!u(_,n))throw new Error(`Invalid param ${String(i)}=${_} (${typeof _}), expected ${o}`)};for(const[i,o]of Object.entries(t))r(i,o,!1);for(const[i,o]of Object.entries(e))r(i,o,!0);return n}const ly=Object.freeze(Object.defineProperty({__proto__:null,bitGet:uy,bitLen:cy,bitMask:Ba,bitSet:_y,bytesToHex:$i,bytesToNumberBE:gi,bytesToNumberLE:Ra,concatBytes:zs,createHmacDrbg:mf,ensureBytes:$e,equalBytes:oy,hexToBytes:Yi,hexToNumber:xa,numberToBytesBE:Zi,numberToBytesLE:za,numberToHexUnpadded:yf,numberToVarBytesBE:sy,utf8ToBytes:ay,validateObject:Bs},Symbol.toStringTag,{value:"Module"}));/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const ye=BigInt(0),ae=BigInt(1),yi=BigInt(2),hy=BigInt(3),Pa=BigInt(4),Af=BigInt(5),Ef=BigInt(8);BigInt(9),BigInt(16);function Se(n,t){const e=n%t;return e>=ye?e:t+e}function py(n,t,e){if(e<=ye||t<ye)throw new Error("Expected power/modulo > 0");if(e===ae)return ye;let r=ae;for(;t>ye;)t&ae&&(r=r*n%e),n=n*n%e,t>>=ae;return r}function Ue(n,t,e){let r=n;for(;t-- >ye;)r*=r,r%=e;return r}function ka(n,t){if(n===ye||t<=ye)throw new Error(`invert: expected positive integers, got n=${n} mod=${t}`);let e=Se(n,t),r=t,i=ye,o=ae;for(;e!==ye;){const u=r/e,_=r%e,l=i-o*u;r=e,e=_,i=o,o=l}if(r!==ae)throw new Error("invert: does not exist");return Se(i,t)}function wy(n){const t=(n-ae)/yi;let e,r,i;for(e=n-ae,r=0;e%yi===ye;e/=yi,r++);for(i=yi;i<n&&py(i,t,n)!==n-ae;i++);if(r===1){const a=(n+ae)/Pa;return function(_,l){const f=_.pow(l,a);if(!_.eql(_.sqr(f),l))throw new Error("Cannot find square root");return f}}const o=(e+ae)/yi;return function(u,_){if(u.pow(_,t)===u.neg(u.ONE))throw new Error("Cannot find square root");let l=r,f=u.pow(u.mul(u.ONE,i),e),g=u.pow(_,o),y=u.pow(_,e);for(;!u.eql(y,u.ONE);){if(u.eql(y,u.ZERO))return u.ZERO;let B=1;for(let S=u.sqr(y);B<l&&!u.eql(S,u.ONE);B++)S=u.sqr(S);const I=u.pow(f,ae<<BigInt(l-B-1));f=u.sqr(I),g=u.mul(g,I),y=u.mul(y,f),l=B}return g}}function dy(n){if(n%Pa===hy){const t=(n+ae)/Pa;return function(r,i){const o=r.pow(i,t);if(!r.eql(r.sqr(o),i))throw new Error("Cannot find square root");return o}}if(n%Ef===Af){const t=(n-Af)/Ef;return function(r,i){const o=r.mul(i,yi),a=r.pow(o,t),u=r.mul(i,a),_=r.mul(r.mul(u,yi),a),l=r.mul(u,r.sub(_,r.ONE));if(!r.eql(r.sqr(l),i))throw new Error("Cannot find square root");return l}}return wy(n)}const gy=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function yy(n){const t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},e=gy.reduce((r,i)=>(r[i]="function",r),t);return Bs(n,e)}function by(n,t,e){if(e<ye)throw new Error("Expected power > 0");if(e===ye)return n.ONE;if(e===ae)return t;let r=n.ONE,i=t;for(;e>ye;)e&ae&&(r=n.mul(r,i)),i=n.sqr(i),e>>=ae;return r}function my(n,t){const e=new Array(t.length),r=t.reduce((o,a,u)=>n.is0(a)?o:(e[u]=o,n.mul(o,a)),n.ONE),i=n.inv(r);return t.reduceRight((o,a,u)=>n.is0(a)?o:(e[u]=n.mul(o,e[u]),n.mul(o,a)),i),e}function vf(n,t){const e=t!==void 0?t:n.toString(2).length,r=Math.ceil(e/8);return{nBitLength:e,nByteLength:r}}function Ay(n,t,e=!1,r={}){if(n<=ye)throw new Error(`Expected Field ORDER > 0, got ${n}`);const{nBitLength:i,nByteLength:o}=vf(n,t);if(o>2048)throw new Error("Field lengths over 2048 bytes are not supported");const a=dy(n),u=Object.freeze({ORDER:n,BITS:i,BYTES:o,MASK:Ba(i),ZERO:ye,ONE:ae,create:_=>Se(_,n),isValid:_=>{if(typeof _!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof _}`);return ye<=_&&_<n},is0:_=>_===ye,isOdd:_=>(_&ae)===ae,neg:_=>Se(-_,n),eql:(_,l)=>_===l,sqr:_=>Se(_*_,n),add:(_,l)=>Se(_+l,n),sub:(_,l)=>Se(_-l,n),mul:(_,l)=>Se(_*l,n),pow:(_,l)=>by(u,_,l),div:(_,l)=>Se(_*ka(l,n),n),sqrN:_=>_*_,addN:(_,l)=>_+l,subN:(_,l)=>_-l,mulN:(_,l)=>_*l,inv:_=>ka(_,n),sqrt:r.sqrt||(_=>a(u,_)),invertBatch:_=>my(u,_),cmov:(_,l,f)=>f?l:_,toBytes:_=>e?za(_,o):Zi(_,o),fromBytes:_=>{if(_.length!==o)throw new Error(`Fp.fromBytes: expected ${o}, got ${_.length}`);return e?Ra(_):gi(_)}});return Object.freeze(u)}function xf(n){if(typeof n!="bigint")throw new Error("field order must be bigint");const t=n.toString(2).length;return Math.ceil(t/8)}function Rf(n){const t=xf(n);return t+Math.ceil(t/2)}function Ey(n,t,e=!1){const r=n.length,i=xf(t),o=Rf(t);if(r<16||r<o||r>1024)throw new Error(`expected ${o}-1024 bytes of input, got ${r}`);const a=e?gi(n):Ra(n),u=Se(a,t-ae)+ae;return e?za(u,i):Zi(u,i)}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const vy=BigInt(0),Fa=BigInt(1);function xy(n,t){const e=(i,o)=>{const a=o.negate();return i?a:o},r=i=>{const o=Math.ceil(t/i)+1,a=2**(i-1);return{windows:o,windowSize:a}};return{constTimeNegate:e,unsafeLadder(i,o){let a=n.ZERO,u=i;for(;o>vy;)o&Fa&&(a=a.add(u)),u=u.double(),o>>=Fa;return a},precomputeWindow(i,o){const{windows:a,windowSize:u}=r(o),_=[];let l=i,f=l;for(let g=0;g<a;g++){f=l,_.push(f);for(let y=1;y<u;y++)f=f.add(l),_.push(f);l=f.double()}return _},wNAF(i,o,a){const{windows:u,windowSize:_}=r(i);let l=n.ZERO,f=n.BASE;const g=BigInt(2**i-1),y=2**i,B=BigInt(i);for(let I=0;I<u;I++){const S=I*_;let T=Number(a&g);a>>=B,T>_&&(T-=y,a+=Fa);const A=S,R=S+Math.abs(T)-1,P=I%2!==0,z=T<0;T===0?f=f.add(e(P,o[A])):l=l.add(e(z,o[R]))}return{p:l,f}},wNAFCached(i,o,a,u){const _=i._WINDOW_SIZE||1;let l=o.get(i);return l||(l=this.precomputeWindow(i,_),_!==1&&o.set(i,u(l))),this.wNAF(_,l,a)}}}function zf(n){return yy(n.Fp),Bs(n,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...vf(n.n,n.nBitLength),...n,p:n.Fp.ORDER})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Ry(n){const t=zf(n);Bs(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:e,Fp:r,a:i}=t;if(e){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof e!="object"||typeof e.beta!="bigint"||typeof e.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}const{bytesToNumberBE:zy,hexToBytes:By}=ly,bi={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(n){const{Err:t}=bi;if(n.length<2||n[0]!==2)throw new t("Invalid signature integer tag");const e=n[1],r=n.subarray(2,e+2);if(!e||r.length!==e)throw new t("Invalid signature integer: wrong length");if(r[0]&128)throw new t("Invalid signature integer: negative");if(r[0]===0&&!(r[1]&128))throw new t("Invalid signature integer: unnecessary leading zero");return{d:zy(r),l:n.subarray(e+2)}},toSig(n){const{Err:t}=bi,e=typeof n=="string"?By(n):n;if(!(e instanceof Uint8Array))throw new Error("ui8a expected");let r=e.length;if(r<2||e[0]!=48)throw new t("Invalid signature tag");if(e[1]!==r-2)throw new t("Invalid signature: incorrect length");const{d:i,l:o}=bi._parseInt(e.subarray(2)),{d:a,l:u}=bi._parseInt(o);if(u.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s:a}},hexFromSig(n){const t=l=>Number.parseInt(l[0],16)&8?"00"+l:l,e=l=>{const f=l.toString(16);return f.length&1?`0${f}`:f},r=t(e(n.s)),i=t(e(n.r)),o=r.length/2,a=i.length/2,u=e(o),_=e(a);return`30${e(a+o+4)}02${_}${i}02${u}${r}`}},yr=BigInt(0),Me=BigInt(1);BigInt(2);const Bf=BigInt(3);BigInt(4);function Sy(n){const t=Ry(n),{Fp:e}=t,r=t.toBytes||((I,S,T)=>{const A=S.toAffine();return zs(Uint8Array.from([4]),e.toBytes(A.x),e.toBytes(A.y))}),i=t.fromBytes||(I=>{const S=I.subarray(1),T=e.fromBytes(S.subarray(0,e.BYTES)),A=e.fromBytes(S.subarray(e.BYTES,2*e.BYTES));return{x:T,y:A}});function o(I){const{a:S,b:T}=t,A=e.sqr(I),R=e.mul(A,I);return e.add(e.add(R,e.mul(I,S)),T)}if(!e.eql(e.sqr(t.Gy),o(t.Gx)))throw new Error("bad generator point: equation left != right");function a(I){return typeof I=="bigint"&&yr<I&&I<t.n}function u(I){if(!a(I))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function _(I){const{allowedPrivateKeyLengths:S,nByteLength:T,wrapPrivateKey:A,n:R}=t;if(S&&typeof I!="bigint"){if(I instanceof Uint8Array&&(I=$i(I)),typeof I!="string"||!S.includes(I.length))throw new Error("Invalid key");I=I.padStart(T*2,"0")}let P;try{P=typeof I=="bigint"?I:gi($e("private key",I,T))}catch{throw new Error(`private key must be ${T} bytes, hex or bigint, not ${typeof I}`)}return A&&(P=Se(P,R)),u(P),P}const l=new Map;function f(I){if(!(I instanceof g))throw new Error("ProjectivePoint expected")}class g{constructor(S,T,A){if(this.px=S,this.py=T,this.pz=A,S==null||!e.isValid(S))throw new Error("x required");if(T==null||!e.isValid(T))throw new Error("y required");if(A==null||!e.isValid(A))throw new Error("z required")}static fromAffine(S){const{x:T,y:A}=S||{};if(!S||!e.isValid(T)||!e.isValid(A))throw new Error("invalid affine point");if(S instanceof g)throw new Error("projective point not allowed");const R=P=>e.eql(P,e.ZERO);return R(T)&&R(A)?g.ZERO:new g(T,A,e.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(S){const T=e.invertBatch(S.map(A=>A.pz));return S.map((A,R)=>A.toAffine(T[R])).map(g.fromAffine)}static fromHex(S){const T=g.fromAffine(i($e("pointHex",S)));return T.assertValidity(),T}static fromPrivateKey(S){return g.BASE.multiply(_(S))}_setWindowSize(S){this._WINDOW_SIZE=S,l.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!e.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:S,y:T}=this.toAffine();if(!e.isValid(S)||!e.isValid(T))throw new Error("bad point: x or y not FE");const A=e.sqr(T),R=o(S);if(!e.eql(A,R))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:S}=this.toAffine();if(e.isOdd)return!e.isOdd(S);throw new Error("Field doesn't support isOdd")}equals(S){f(S);const{px:T,py:A,pz:R}=this,{px:P,py:z,pz:k}=S,C=e.eql(e.mul(T,k),e.mul(P,R)),N=e.eql(e.mul(A,k),e.mul(z,R));return C&&N}negate(){return new g(this.px,e.neg(this.py),this.pz)}double(){const{a:S,b:T}=t,A=e.mul(T,Bf),{px:R,py:P,pz:z}=this;let k=e.ZERO,C=e.ZERO,N=e.ZERO,D=e.mul(R,R),Y=e.mul(P,P),Z=e.mul(z,z),ft=e.mul(R,P);return ft=e.add(ft,ft),N=e.mul(R,z),N=e.add(N,N),k=e.mul(S,N),C=e.mul(A,Z),C=e.add(k,C),k=e.sub(Y,C),C=e.add(Y,C),C=e.mul(k,C),k=e.mul(ft,k),N=e.mul(A,N),Z=e.mul(S,Z),ft=e.sub(D,Z),ft=e.mul(S,ft),ft=e.add(ft,N),N=e.add(D,D),D=e.add(N,D),D=e.add(D,Z),D=e.mul(D,ft),C=e.add(C,D),Z=e.mul(P,z),Z=e.add(Z,Z),D=e.mul(Z,ft),k=e.sub(k,D),N=e.mul(Z,Y),N=e.add(N,N),N=e.add(N,N),new g(k,C,N)}add(S){f(S);const{px:T,py:A,pz:R}=this,{px:P,py:z,pz:k}=S;let C=e.ZERO,N=e.ZERO,D=e.ZERO;const Y=t.a,Z=e.mul(t.b,Bf);let ft=e.mul(T,P),L=e.mul(A,z),At=e.mul(R,k),Rt=e.add(T,A),at=e.add(P,z);Rt=e.mul(Rt,at),at=e.add(ft,L),Rt=e.sub(Rt,at),at=e.add(T,R);let wt=e.add(P,k);return at=e.mul(at,wt),wt=e.add(ft,At),at=e.sub(at,wt),wt=e.add(A,R),C=e.add(z,k),wt=e.mul(wt,C),C=e.add(L,At),wt=e.sub(wt,C),D=e.mul(Y,at),C=e.mul(Z,At),D=e.add(C,D),C=e.sub(L,D),D=e.add(L,D),N=e.mul(C,D),L=e.add(ft,ft),L=e.add(L,ft),At=e.mul(Y,At),at=e.mul(Z,at),L=e.add(L,At),At=e.sub(ft,At),At=e.mul(Y,At),at=e.add(at,At),ft=e.mul(L,at),N=e.add(N,ft),ft=e.mul(wt,at),C=e.mul(Rt,C),C=e.sub(C,ft),ft=e.mul(Rt,L),D=e.mul(wt,D),D=e.add(D,ft),new g(C,N,D)}subtract(S){return this.add(S.negate())}is0(){return this.equals(g.ZERO)}wNAF(S){return B.wNAFCached(this,l,S,T=>{const A=e.invertBatch(T.map(R=>R.pz));return T.map((R,P)=>R.toAffine(A[P])).map(g.fromAffine)})}multiplyUnsafe(S){const T=g.ZERO;if(S===yr)return T;if(u(S),S===Me)return this;const{endo:A}=t;if(!A)return B.unsafeLadder(this,S);let{k1neg:R,k1:P,k2neg:z,k2:k}=A.splitScalar(S),C=T,N=T,D=this;for(;P>yr||k>yr;)P&Me&&(C=C.add(D)),k&Me&&(N=N.add(D)),D=D.double(),P>>=Me,k>>=Me;return R&&(C=C.negate()),z&&(N=N.negate()),N=new g(e.mul(N.px,A.beta),N.py,N.pz),C.add(N)}multiply(S){u(S);let T=S,A,R;const{endo:P}=t;if(P){const{k1neg:z,k1:k,k2neg:C,k2:N}=P.splitScalar(T);let{p:D,f:Y}=this.wNAF(k),{p:Z,f:ft}=this.wNAF(N);D=B.constTimeNegate(z,D),Z=B.constTimeNegate(C,Z),Z=new g(e.mul(Z.px,P.beta),Z.py,Z.pz),A=D.add(Z),R=Y.add(ft)}else{const{p:z,f:k}=this.wNAF(T);A=z,R=k}return g.normalizeZ([A,R])[0]}multiplyAndAddUnsafe(S,T,A){const R=g.BASE,P=(k,C)=>C===yr||C===Me||!k.equals(R)?k.multiplyUnsafe(C):k.multiply(C),z=P(this,T).add(P(S,A));return z.is0()?void 0:z}toAffine(S){const{px:T,py:A,pz:R}=this,P=this.is0();S==null&&(S=P?e.ONE:e.inv(R));const z=e.mul(T,S),k=e.mul(A,S),C=e.mul(R,S);if(P)return{x:e.ZERO,y:e.ZERO};if(!e.eql(C,e.ONE))throw new Error("invZ was invalid");return{x:z,y:k}}isTorsionFree(){const{h:S,isTorsionFree:T}=t;if(S===Me)return!0;if(T)return T(g,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:S,clearCofactor:T}=t;return S===Me?this:T?T(g,this):this.multiplyUnsafe(t.h)}toRawBytes(S=!0){return this.assertValidity(),r(g,this,S)}toHex(S=!0){return $i(this.toRawBytes(S))}}g.BASE=new g(t.Gx,t.Gy,e.ONE),g.ZERO=new g(e.ZERO,e.ONE,e.ZERO);const y=t.nBitLength,B=xy(g,t.endo?Math.ceil(y/2):y);return{CURVE:t,ProjectivePoint:g,normPrivateKeyToScalar:_,weierstrassEquation:o,isWithinCurveOrder:a}}function Py(n){const t=zf(n);return Bs(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function ky(n){const t=Py(n),{Fp:e,n:r}=t,i=e.BYTES+1,o=2*e.BYTES+1;function a(at){return yr<at&&at<e.ORDER}function u(at){return Se(at,r)}function _(at){return ka(at,r)}const{ProjectivePoint:l,normPrivateKeyToScalar:f,weierstrassEquation:g,isWithinCurveOrder:y}=Sy({...t,toBytes(at,wt,Et){const xt=wt.toAffine(),vt=e.toBytes(xt.x),Bt=zs;return Et?Bt(Uint8Array.from([wt.hasEvenY()?2:3]),vt):Bt(Uint8Array.from([4]),vt,e.toBytes(xt.y))},fromBytes(at){const wt=at.length,Et=at[0],xt=at.subarray(1);if(wt===i&&(Et===2||Et===3)){const vt=gi(xt);if(!a(vt))throw new Error("Point is not on curve");const Bt=g(vt);let jt=e.sqrt(Bt);const W=(jt&Me)===Me;return(Et&1)===1!==W&&(jt=e.neg(jt)),{x:vt,y:jt}}else if(wt===o&&Et===4){const vt=e.fromBytes(xt.subarray(0,e.BYTES)),Bt=e.fromBytes(xt.subarray(e.BYTES,2*e.BYTES));return{x:vt,y:Bt}}else throw new Error(`Point of length ${wt} was invalid. Expected ${i} compressed bytes or ${o} uncompressed bytes`)}}),B=at=>$i(Zi(at,t.nByteLength));function I(at){const wt=r>>Me;return at>wt}function S(at){return I(at)?u(-at):at}const T=(at,wt,Et)=>gi(at.slice(wt,Et));class A{constructor(wt,Et,xt){this.r=wt,this.s=Et,this.recovery=xt,this.assertValidity()}static fromCompact(wt){const Et=t.nByteLength;return wt=$e("compactSignature",wt,Et*2),new A(T(wt,0,Et),T(wt,Et,2*Et))}static fromDER(wt){const{r:Et,s:xt}=bi.toSig($e("DER",wt));return new A(Et,xt)}assertValidity(){if(!y(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!y(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(wt){return new A(this.r,this.s,wt)}recoverPublicKey(wt){const{r:Et,s:xt,recovery:vt}=this,Bt=N($e("msgHash",wt));if(vt==null||![0,1,2,3].includes(vt))throw new Error("recovery id invalid");const jt=vt===2||vt===3?Et+t.n:Et;if(jt>=e.ORDER)throw new Error("recovery id 2 or 3 invalid");const W=(vt&1)===0?"02":"03",X=l.fromHex(W+B(jt)),nt=_(jt),dt=u(-Bt*nt),G=u(xt*nt),M=l.BASE.multiplyAndAddUnsafe(X,dt,G);if(!M)throw new Error("point at infinify");return M.assertValidity(),M}hasHighS(){return I(this.s)}normalizeS(){return this.hasHighS()?new A(this.r,u(-this.s),this.recovery):this}toDERRawBytes(){return Yi(this.toDERHex())}toDERHex(){return bi.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Yi(this.toCompactHex())}toCompactHex(){return B(this.r)+B(this.s)}}const R={isValidPrivateKey(at){try{return f(at),!0}catch{return!1}},normPrivateKeyToScalar:f,randomPrivateKey:()=>{const at=Rf(t.n);return Ey(t.randomBytes(at),t.n)},precompute(at=8,wt=l.BASE){return wt._setWindowSize(at),wt.multiply(BigInt(3)),wt}};function P(at,wt=!0){return l.fromPrivateKey(at).toRawBytes(wt)}function z(at){const wt=at instanceof Uint8Array,Et=typeof at=="string",xt=(wt||Et)&&at.length;return wt?xt===i||xt===o:Et?xt===2*i||xt===2*o:at instanceof l}function k(at,wt,Et=!0){if(z(at))throw new Error("first arg must be private key");if(!z(wt))throw new Error("second arg must be public key");return l.fromHex(wt).multiply(f(at)).toRawBytes(Et)}const C=t.bits2int||function(at){const wt=gi(at),Et=at.length*8-t.nBitLength;return Et>0?wt>>BigInt(Et):wt},N=t.bits2int_modN||function(at){return u(C(at))},D=Ba(t.nBitLength);function Y(at){if(typeof at!="bigint")throw new Error("bigint expected");if(!(yr<=at&&at<D))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Zi(at,t.nByteLength)}function Z(at,wt,Et=ft){if(["recovered","canonical"].some(ct=>ct in Et))throw new Error("sign() legacy options not supported");const{hash:xt,randomBytes:vt}=t;let{lowS:Bt,prehash:jt,extraEntropy:W}=Et;Bt==null&&(Bt=!0),at=$e("msgHash",at),jt&&(at=$e("prehashed msgHash",xt(at)));const X=N(at),nt=f(wt),dt=[Y(nt),Y(X)];if(W!=null){const ct=W===!0?vt(e.BYTES):W;dt.push($e("extraEntropy",ct))}const G=zs(...dt),M=X;function tt(ct){const _t=C(ct);if(!y(_t))return;const v=_(_t),x=l.BASE.multiply(_t).toAffine(),et=u(x.x);if(et===yr)return;const lt=u(v*u(M+et*nt));if(lt===yr)return;let St=(x.x===et?0:2)|Number(x.y&Me),yt=lt;return Bt&&I(lt)&&(yt=S(lt),St^=1),new A(et,yt,St)}return{seed:G,k2sig:tt}}const ft={lowS:t.lowS,prehash:!1},L={lowS:t.lowS,prehash:!1};function At(at,wt,Et=ft){const{seed:xt,k2sig:vt}=Z(at,wt,Et),Bt=t;return mf(Bt.hash.outputLen,Bt.nByteLength,Bt.hmac)(xt,vt)}l.BASE._setWindowSize(8);function Rt(at,wt,Et,xt=L){const vt=at;if(wt=$e("msgHash",wt),Et=$e("publicKey",Et),"strict"in xt)throw new Error("options.strict was renamed to lowS");const{lowS:Bt,prehash:jt}=xt;let W,X;try{if(typeof vt=="string"||vt instanceof Uint8Array)try{W=A.fromDER(vt)}catch(x){if(!(x instanceof bi.Err))throw x;W=A.fromCompact(vt)}else if(typeof vt=="object"&&typeof vt.r=="bigint"&&typeof vt.s=="bigint"){const{r:x,s:et}=vt;W=new A(x,et)}else throw new Error("PARSE");X=l.fromHex(Et)}catch(x){if(x.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(Bt&&W.hasHighS())return!1;jt&&(wt=t.hash(wt));const{r:nt,s:dt}=W,G=N(wt),M=_(dt),tt=u(G*M),ct=u(nt*M),_t=l.BASE.multiplyAndAddUnsafe(X,tt,ct)?.toAffine();return _t?u(_t.x)===nt:!1}return{CURVE:t,getPublicKey:P,getSharedSecret:k,sign:At,verify:Rt,ProjectivePoint:l,Signature:A,utils:R}}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */function Fy(n){return{hash:n,hmac:(t,...e)=>J_(n,t,R0(...e)),randomBytes:z0}}function Iy(n,t){const e=r=>ky({...n,...Fy(r)});return Object.freeze({...e(t),create:e})}/*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) */const Sf=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Pf=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),Oy=BigInt(1),Ia=BigInt(2),kf=(n,t)=>(n+t/Ia)/t;function Ty(n){const t=Sf,e=BigInt(3),r=BigInt(6),i=BigInt(11),o=BigInt(22),a=BigInt(23),u=BigInt(44),_=BigInt(88),l=n*n*n%t,f=l*l*n%t,g=Ue(f,e,t)*f%t,y=Ue(g,e,t)*f%t,B=Ue(y,Ia,t)*l%t,I=Ue(B,i,t)*B%t,S=Ue(I,o,t)*I%t,T=Ue(S,u,t)*S%t,A=Ue(T,_,t)*T%t,R=Ue(A,u,t)*S%t,P=Ue(R,e,t)*f%t,z=Ue(P,a,t)*I%t,k=Ue(z,r,t)*l%t,C=Ue(k,Ia,t);if(!Oa.eql(Oa.sqr(C),n))throw new Error("Cannot find square root");return C}const Oa=Ay(Sf,void 0,void 0,{sqrt:Ty}),_i=Iy({a:BigInt(0),b:BigInt(7),Fp:Oa,n:Pf,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:n=>{const t=Pf,e=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-Oy*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=e,a=BigInt("0x100000000000000000000000000000000"),u=kf(o*n,t),_=kf(-r*n,t);let l=Se(n-u*e-_*i,t),f=Se(-u*r-_*o,t);const g=l>a,y=f>a;if(g&&(l=t-l),y&&(f=t-f),l>a||f>a)throw new Error("splitScalar: Endomorphism failed, k="+n);return{k1neg:g,k1:l,k2neg:y,k2:f}}}},Y_);BigInt(0),_i.ProjectivePoint;const Ss="0x0000000000000000000000000000000000000000",Ff="0x0000000000000000000000000000000000000000000000000000000000000000",If=BigInt(0),Of=BigInt(1),Tf=BigInt(2),Cf=BigInt(27),Nf=BigInt(28),bo=BigInt(35),Xi={};function Lf(n){return pr(he(n),32)}class se{#t;#e;#r;#n;get r(){return this.#t}set r(t){V(Qi(t)===32,"invalid r","value",t),this.#t=gt(t)}get s(){return V(parseInt(this.#e.substring(0,3))<8,"non-canonical s; use ._s","s",this.#e),this.#e}set s(t){V(Qi(t)===32,"invalid s","value",t),this.#e=gt(t)}get _s(){return this.#e}isValid(){return parseInt(this.#e.substring(0,3))<8}get v(){return this.#r}set v(t){const e=Tt(t,"value");V(e===27||e===28,"invalid v","v",t),this.#r=e}get networkV(){return this.#n}get legacyChainId(){const t=this.networkV;return t==null?null:se.getChainId(t)}get yParity(){return this.v===27?0:1}get yParityAndS(){const t=Ot(this.s);return this.yParity&&(t[0]|=128),gt(t)}get compactSerialized(){return ne([this.r,this.yParityAndS])}get serialized(){return ne([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(t,e,r,i){oo(t,Xi,"Signature"),this.#t=e,this.#e=r,this.#r=i,this.#n=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this._s}"${this.isValid()?"":', valid: "false"'}, yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const t=new se(Xi,this.r,this._s,this.v);return this.networkV&&(t.#n=this.networkV),t}toJSON(){const t=this.networkV;return{_type:"signature",networkV:t!=null?t.toString():null,r:this.r,s:this._s,v:this.v}}static getChainId(t){const e=mt(t,"v");return e==Cf||e==Nf?If:(V(e>=bo,"invalid EIP-155 v","v",t),(e-bo)/Tf)}static getChainIdV(t,e){return mt(t)*Tf+BigInt(35+e-27)}static getNormalizedV(t){const e=mt(t);return e===If||e===Cf?27:e===Of||e===Nf?28:(V(e>=bo,"invalid v","v",t),e&Of?27:28)}static from(t){function e(l,f){V(l,f,"signature",t)}if(t==null)return new se(Xi,Ff,Ff,27);if(typeof t=="string"){const l=Ot(t,"signature");if(l.length===64){const f=gt(l.slice(0,32)),g=l.slice(32,64),y=g[0]&128?28:27;return g[0]&=127,new se(Xi,f,gt(g),y)}if(l.length===65){const f=gt(l.slice(0,32)),g=gt(l.slice(32,64)),y=se.getNormalizedV(l[64]);return new se(Xi,f,g,y)}e(!1,"invalid raw signature length")}if(t instanceof se)return t.clone();const r=t.r;e(r!=null,"missing r");const i=Lf(r),o=function(l,f){if(l!=null)return Lf(l);if(f!=null){e($t(f,32),"invalid yParityAndS");const g=Ot(f);return g[0]&=127,gt(g)}e(!1,"missing s")}(t.s,t.yParityAndS),{networkV:a,v:u}=function(l,f,g){if(l!=null){const y=mt(l);return{networkV:y>=bo?y:void 0,v:se.getNormalizedV(y)}}if(f!=null)return e($t(f,32),"invalid yParityAndS"),{v:Ot(f)[0]&128?28:27};if(g!=null){switch(Tt(g,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}e(!1,"invalid yParity")}e(!1,"missing v")}(t.v,t.yParityAndS,t.yParity),_=new se(Xi,i,o,u);return a&&(_.#n=a),e(t.yParity==null||Tt(t.yParity,"sig.yParity")===_.yParity,"yParity mismatch"),e(t.yParityAndS==null||t.yParityAndS===_.yParityAndS,"yParityAndS mismatch"),_}}class br{#t;constructor(t){V(Qi(t)===32,"invalid private key","privateKey","[REDACTED]"),this.#t=gt(t)}get privateKey(){return this.#t}get publicKey(){return br.computePublicKey(this.#t)}get compressedPublicKey(){return br.computePublicKey(this.#t,!0)}sign(t){V(Qi(t)===32,"invalid digest length","digest",t);const e=_i.sign(ve(t),ve(this.#t),{lowS:!0});return se.from({r:ni(e.r,32),s:ni(e.s,32),v:e.recovery?28:27})}computeSharedSecret(t){const e=br.computePublicKey(t);return gt(_i.getSharedSecret(ve(this.#t),Ot(e),!1))}static computePublicKey(t,e){let r=Ot(t,"key");if(r.length===32){const o=_i.getPublicKey(r,!!e);return gt(o)}if(r.length===64){const o=new Uint8Array(65);o[0]=4,o.set(r,1),r=o}const i=_i.ProjectivePoint.fromHex(r);return gt(i.toRawBytes(e))}static recoverPublicKey(t,e){V(Qi(t)===32,"invalid digest length","digest",t);const r=se.from(e);let i=_i.Signature.fromCompact(ve(ne([r.r,r.s])));i=i.addRecoveryBit(r.yParity);const o=i.recoverPublicKey(ve(t));return V(o!=null,"invalid signature for digest","signature",e),"0x"+o.toHex(!1)}static addPoints(t,e,r){const i=_i.ProjectivePoint.fromHex(br.computePublicKey(t).substring(2)),o=_i.ProjectivePoint.fromHex(br.computePublicKey(e).substring(2));return"0x"+i.add(o).toHex(!!r)}}const Cy=BigInt(0),Ny=BigInt(36);function Df(n){n=n.toLowerCase();const t=n.substring(2).split(""),e=new Uint8Array(40);for(let i=0;i<40;i++)e[i]=t[i].charCodeAt(0);const r=Ot(fe(e));for(let i=0;i<40;i+=2)r[i>>1]>>4>=8&&(t[i]=t[i].toUpperCase()),(r[i>>1]&15)>=8&&(t[i+1]=t[i+1].toUpperCase());return"0x"+t.join("")}const Ta={};for(let n=0;n<10;n++)Ta[String(n)]=String(n);for(let n=0;n<26;n++)Ta[String.fromCharCode(65+n)]=String(10+n);const Uf=15;function Ly(n){n=n.toUpperCase(),n=n.substring(4)+n.substring(0,2)+"00";let t=n.split("").map(r=>Ta[r]).join("");for(;t.length>=Uf;){let r=t.substring(0,Uf);t=parseInt(r,10)%97+t.substring(r.length)}let e=String(98-parseInt(t,10)%97);for(;e.length<2;)e="0"+e;return e}const Dy=function(){const n={};for(let t=0;t<36;t++){const e="0123456789abcdefghijklmnopqrstuvwxyz"[t];n[e]=BigInt(t)}return n}();function Uy(n){n=n.toLowerCase();let t=Cy;for(let e=0;e<n.length;e++)t=t*Ny+Dy[n[e]];return t}function Ut(n){if(V(typeof n=="string","invalid address","address",n),n.match(/^(0x)?[0-9a-fA-F]{40}$/)){n.startsWith("0x")||(n="0x"+n);const t=Df(n);return V(!n.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===n,"bad address checksum","address",n),t}if(n.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){V(n.substring(2,4)===Ly(n),"bad icap checksum","address",n);let t=Uy(n.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return Df("0x"+t)}V(!1,"invalid address","address",n)}function My(n){const t=Ut(n.from);let r=mt(n.nonce,"tx.nonce").toString(16);return r==="0"?r="0x":r.length%2?r="0x0"+r:r="0x"+r,Ut(ie(fe(si([t,r])),12))}function Mf(n){return n&&typeof n.getAddress=="function"}function je(n){try{return Ut(n),!0}catch{}return!1}async function Ca(n,t){const e=await t;return(e==null||e==="0x0000000000000000000000000000000000000000")&&(ut(typeof n!="string","unconfigured name","UNCONFIGURED_NAME",{value:n}),V(!1,"invalid AddressLike value; did not resolve to a value address","target",n)),Ut(e)}function Re(n,t){if(typeof n=="string")return n.match(/^0x[0-9a-f]{40}$/i)?Ut(n):(ut(t!=null,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),Ca(n,t.resolveName(n)));if(Mf(n))return Ca(n,n.getAddress());if(n&&typeof n.then=="function")return Ca(n,n);V(!1,"unsupported addressable value","target",n)}const mr={};function bt(n,t){let e=!1;return t<0&&(e=!0,t*=-1),new oe(mr,`${e?"":"u"}int${t}`,n,{signed:e,width:t})}function Mt(n,t){return new oe(mr,`bytes${t||""}`,n,{size:t})}const jf=Symbol.for("_ethers_typed");class oe{type;value;#t;_typedSymbol;constructor(t,e,r,i){i==null&&(i=null),oo(mr,t,"Typed"),zt(this,{_typedSymbol:jf,type:e,value:r}),this.#t=i,this.format()}format(){if(this.type==="array")throw new Error("");if(this.type==="dynamicArray")throw new Error("");return this.type==="tuple"?`tuple(${this.value.map(t=>t.format()).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return this.type==="string"}get tupleName(){if(this.type!=="tuple")throw TypeError("not a tuple");return this.#t}get arrayLength(){if(this.type!=="array")throw TypeError("not an array");return this.#t===!0?-1:this.#t===!1?this.value.length:null}static from(t,e){return new oe(mr,t,e)}static uint8(t){return bt(t,8)}static uint16(t){return bt(t,16)}static uint24(t){return bt(t,24)}static uint32(t){return bt(t,32)}static uint40(t){return bt(t,40)}static uint48(t){return bt(t,48)}static uint56(t){return bt(t,56)}static uint64(t){return bt(t,64)}static uint72(t){return bt(t,72)}static uint80(t){return bt(t,80)}static uint88(t){return bt(t,88)}static uint96(t){return bt(t,96)}static uint104(t){return bt(t,104)}static uint112(t){return bt(t,112)}static uint120(t){return bt(t,120)}static uint128(t){return bt(t,128)}static uint136(t){return bt(t,136)}static uint144(t){return bt(t,144)}static uint152(t){return bt(t,152)}static uint160(t){return bt(t,160)}static uint168(t){return bt(t,168)}static uint176(t){return bt(t,176)}static uint184(t){return bt(t,184)}static uint192(t){return bt(t,192)}static uint200(t){return bt(t,200)}static uint208(t){return bt(t,208)}static uint216(t){return bt(t,216)}static uint224(t){return bt(t,224)}static uint232(t){return bt(t,232)}static uint240(t){return bt(t,240)}static uint248(t){return bt(t,248)}static uint256(t){return bt(t,256)}static uint(t){return bt(t,256)}static int8(t){return bt(t,-8)}static int16(t){return bt(t,-16)}static int24(t){return bt(t,-24)}static int32(t){return bt(t,-32)}static int40(t){return bt(t,-40)}static int48(t){return bt(t,-48)}static int56(t){return bt(t,-56)}static int64(t){return bt(t,-64)}static int72(t){return bt(t,-72)}static int80(t){return bt(t,-80)}static int88(t){return bt(t,-88)}static int96(t){return bt(t,-96)}static int104(t){return bt(t,-104)}static int112(t){return bt(t,-112)}static int120(t){return bt(t,-120)}static int128(t){return bt(t,-128)}static int136(t){return bt(t,-136)}static int144(t){return bt(t,-144)}static int152(t){return bt(t,-152)}static int160(t){return bt(t,-160)}static int168(t){return bt(t,-168)}static int176(t){return bt(t,-176)}static int184(t){return bt(t,-184)}static int192(t){return bt(t,-192)}static int200(t){return bt(t,-200)}static int208(t){return bt(t,-208)}static int216(t){return bt(t,-216)}static int224(t){return bt(t,-224)}static int232(t){return bt(t,-232)}static int240(t){return bt(t,-240)}static int248(t){return bt(t,-248)}static int256(t){return bt(t,-256)}static int(t){return bt(t,-256)}static bytes1(t){return Mt(t,1)}static bytes2(t){return Mt(t,2)}static bytes3(t){return Mt(t,3)}static bytes4(t){return Mt(t,4)}static bytes5(t){return Mt(t,5)}static bytes6(t){return Mt(t,6)}static bytes7(t){return Mt(t,7)}static bytes8(t){return Mt(t,8)}static bytes9(t){return Mt(t,9)}static bytes10(t){return Mt(t,10)}static bytes11(t){return Mt(t,11)}static bytes12(t){return Mt(t,12)}static bytes13(t){return Mt(t,13)}static bytes14(t){return Mt(t,14)}static bytes15(t){return Mt(t,15)}static bytes16(t){return Mt(t,16)}static bytes17(t){return Mt(t,17)}static bytes18(t){return Mt(t,18)}static bytes19(t){return Mt(t,19)}static bytes20(t){return Mt(t,20)}static bytes21(t){return Mt(t,21)}static bytes22(t){return Mt(t,22)}static bytes23(t){return Mt(t,23)}static bytes24(t){return Mt(t,24)}static bytes25(t){return Mt(t,25)}static bytes26(t){return Mt(t,26)}static bytes27(t){return Mt(t,27)}static bytes28(t){return Mt(t,28)}static bytes29(t){return Mt(t,29)}static bytes30(t){return Mt(t,30)}static bytes31(t){return Mt(t,31)}static bytes32(t){return Mt(t,32)}static address(t){return new oe(mr,"address",t)}static bool(t){return new oe(mr,"bool",!!t)}static bytes(t){return new oe(mr,"bytes",t)}static string(t){return new oe(mr,"string",t)}static array(t,e){throw new Error("not implemented yet")}static tuple(t,e){throw new Error("not implemented yet")}static overrides(t){return new oe(mr,"overrides",Object.assign({},t))}static isTyped(t){return t&&typeof t=="object"&&"_typedSymbol"in t&&t._typedSymbol===jf}static dereference(t,e){if(oe.isTyped(t)){if(t.type!==e)throw new Error(`invalid type: expecetd ${e}, got ${t.type}`);return t.value}return t}}class jy extends gr{constructor(t){super("address","address",t,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(t,e){let r=oe.dereference(e,"string");try{r=Ut(r)}catch(i){return this._throwError(i.message,e)}return t.writeValue(r)}decode(t){return Ut(ni(t.readValue(),20))}}class Gy extends gr{coder;constructor(t){super(t.name,t.type,"_",t.dynamic),this.coder=t}defaultValue(){return this.coder.defaultValue()}encode(t,e){return this.coder.encode(t,e)}decode(t){return this.coder.decode(t)}}function Gf(n,t,e){let r=[];if(Array.isArray(e))r=e;else if(e&&typeof e=="object"){let _={};r=t.map(l=>{const f=l.localName;return ut(f,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),ut(!_[f],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:l},value:e}),_[f]=!0,e[f]})}else V(!1,"invalid tuple value","tuple",e);V(t.length===r.length,"types/value length mismatch","tuple",e);let i=new wa,o=new wa,a=[];t.forEach((_,l)=>{let f=r[l];if(_.dynamic){let g=o.length;_.encode(o,f);let y=i.writeUpdatableValue();a.push(B=>{y(B+g)})}else _.encode(i,f)}),a.forEach(_=>{_(i.length)});let u=n.appendWriter(i);return u+=n.appendWriter(o),u}function Hf(n,t){let e=[],r=[],i=n.subReader(0);return t.forEach(o=>{let a=null;if(o.dynamic){let u=n.readIndex(),_=i.subReader(u);try{a=o.decode(_)}catch(l){if(me(l,"BUFFER_OVERRUN"))throw l;a=l,a.baseType=o.name,a.name=o.localName,a.type=o.type}}else try{a=o.decode(n)}catch(u){if(me(u,"BUFFER_OVERRUN"))throw u;a=u,a.baseType=o.name,a.name=o.localName,a.type=o.type}if(a==null)throw new Error("investigate");e.push(a),r.push(o.localName||null)}),dr.fromItems(e,r)}class Hy extends gr{coder;length;constructor(t,e,r){const i=t.type+"["+(e>=0?e:"")+"]",o=e===-1||t.dynamic;super("array",i,r,o),zt(this,{coder:t,length:e})}defaultValue(){const t=this.coder.defaultValue(),e=[];for(let r=0;r<this.length;r++)e.push(t);return e}encode(t,e){const r=oe.dereference(e,"array");Array.isArray(r)||this._throwError("expected array value",r);let i=this.length;i===-1&&(i=r.length,t.writeValue(r.length)),A_(r.length,i,"coder array"+(this.localName?" "+this.localName:""));let o=[];for(let a=0;a<r.length;a++)o.push(this.coder);return Gf(t,o,r)}decode(t){let e=this.length;e===-1&&(e=t.readIndex(),ut(e*xe<=t.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:t.bytes,offset:e*xe,length:t.dataLength}));let r=[];for(let i=0;i<e;i++)r.push(new Gy(this.coder));return Hf(t,r)}}class Vy extends gr{constructor(t){super("bool","bool",t,!1)}defaultValue(){return!1}encode(t,e){const r=oe.dereference(e,"bool");return t.writeValue(r?1:0)}decode(t){return!!t.readValue()}}class Vf extends gr{constructor(t,e){super(t,t,e,!0)}defaultValue(){return"0x"}encode(t,e){e=ve(e);let r=t.writeValue(e.length);return r+=t.writeBytes(e),r}decode(t){return t.readBytes(t.readIndex(),!0)}}class qy extends Vf{constructor(t){super("bytes",t)}decode(t){return gt(super.decode(t))}}class Qy extends gr{size;constructor(t,e){let r="bytes"+String(t);super(r,r,e,!1),zt(this,{size:t},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+this.size*2)}encode(t,e){let r=ve(oe.dereference(e,this.type));return r.length!==this.size&&this._throwError("incorrect data length",e),t.writeBytes(r)}decode(t){return gt(t.readBytes(this.size))}}const Ky=new Uint8Array([]);class Wy extends gr{constructor(t){super("null","",t,!1)}defaultValue(){return null}encode(t,e){return e!=null&&this._throwError("not null",e),t.writeBytes(Ky)}decode(t){return t.readBytes(0),null}}const Jy=BigInt(0),$y=BigInt(1),Yy=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class Zy extends gr{size;signed;constructor(t,e,r){const i=(e?"int":"uint")+t*8;super(i,i,r,!1),zt(this,{size:t,signed:e},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(t,e){let r=mt(oe.dereference(e,this.type)),i=Es(Yy,xe*8);if(this.signed){let o=Es(i,this.size*8-1);(r>o||r<-(o+$y))&&this._throwError("value out-of-bounds",e),r=R_(r,8*xe)}else(r<Jy||r>Es(i,this.size*8))&&this._throwError("value out-of-bounds",e);return t.writeValue(r)}decode(t){let e=Es(t.readValue(),this.size*8);return this.signed&&(e=n0(e,this.size*8)),e}}class Xy extends Vf{constructor(t){super("string",t)}defaultValue(){return""}encode(t,e){return super.encode(t,wr(oe.dereference(e,"string")))}decode(t){return uo(super.decode(t))}}class mo extends gr{coders;constructor(t,e){let r=!1;const i=[];t.forEach(a=>{a.dynamic&&(r=!0),i.push(a.type)});const o="tuple("+i.join(",")+")";super("tuple",o,e,r),zt(this,{coders:Object.freeze(t.slice())})}defaultValue(){const t=[];this.coders.forEach(r=>{t.push(r.defaultValue())});const e=this.coders.reduce((r,i)=>{const o=i.localName;return o&&(r[o]||(r[o]=0),r[o]++),r},{});return this.coders.forEach((r,i)=>{let o=r.localName;!o||e[o]!==1||(o==="length"&&(o="_length"),t[o]==null&&(t[o]=t[i]))}),Object.freeze(t)}encode(t,e){const r=oe.dereference(e,"tuple");return Gf(t,this.coders,r)}decode(t){return Hf(t,this.coders)}}function Na(n,t){return{address:Ut(n),storageKeys:t.map((e,r)=>(V($t(e,32),"invalid slot",`storageKeys[${r}]`,e),e.toLowerCase()))}}function mi(n){if(Array.isArray(n))return n.map((e,r)=>Array.isArray(e)?(V(e.length===2,"invalid slot set",`value[${r}]`,e),Na(e[0],e[1])):(V(e!=null&&typeof e=="object","invalid address-slot set","value",n),Na(e.address,e.storageKeys)));V(n!=null&&typeof n=="object","invalid access list","value",n);const t=Object.keys(n).map(e=>{const r=n[e].reduce((i,o)=>(i[o]=!0,i),{});return Na(e,Object.keys(r).sort())});return t.sort((e,r)=>e.address.localeCompare(r.address)),t}function qf(n){return{address:Ut(n.address),nonce:mt(n.nonce!=null?n.nonce:0),chainId:mt(n.chainId!=null?n.chainId:0),signature:se.from(n.signature)}}function tb(n){let t;return typeof n=="string"?t=br.computePublicKey(n,!1):t=n.publicKey,Ut(fe("0x"+t.substring(4)).substring(26))}function Qf(n,t){return tb(br.recoverPublicKey(n,t))}const be=BigInt(0),eb=BigInt(2),rb=BigInt(27),nb=BigInt(28),ib=BigInt(35),sb=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),La=4096*32;function ob(n){return{blobToKzgCommitment:r=>{if("computeBlobProof"in n){if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return Ot(n.blobToKzgCommitment(gt(r)))}else if("blobToKzgCommitment"in n&&typeof n.blobToKzgCommitment=="function")return Ot(n.blobToKzgCommitment(r));if("blobToKZGCommitment"in n&&typeof n.blobToKZGCommitment=="function")return Ot(n.blobToKZGCommitment(gt(r)));V(!1,"unsupported KZG library","kzg",n)},computeBlobKzgProof:(r,i)=>{if("computeBlobProof"in n&&typeof n.computeBlobProof=="function")return Ot(n.computeBlobProof(gt(r),gt(i)));if("computeBlobKzgProof"in n&&typeof n.computeBlobKzgProof=="function")return n.computeBlobKzgProof(r,i);if("computeBlobKZGProof"in n&&typeof n.computeBlobKZGProof=="function")return Ot(n.computeBlobKZGProof(gt(r),gt(i)));V(!1,"unsupported KZG library","kzg",n)}}}function Kf(n,t){let e=n.toString(16);for(;e.length<2;)e="0"+e;return e+=Ji(t).substring(4),"0x"+e}function ts(n){return n==="0x"?null:Ut(n)}function Ao(n,t){try{return mi(n)}catch(e){V(!1,e.message,t,n)}}function ab(n,t){try{if(!Array.isArray(n))throw new Error("authorizationList: invalid array");const e=[];for(let r=0;r<n.length;r++){const i=n[r];if(!Array.isArray(i))throw new Error(`authorization[${r}]: invalid array`);if(i.length!==6)throw new Error(`authorization[${r}]: wrong length`);if(!i[1])throw new Error(`authorization[${r}]: null address`);e.push({address:ts(i[1]),nonce:Kt(i[2],"nonce"),chainId:Kt(i[0],"chainId"),signature:se.from({yParity:Ai(i[3],"yParity"),r:pr(i[4],32),s:pr(i[5],32)})})}return e}catch(e){V(!1,e.message,t,n)}}function Ai(n,t){return n==="0x"?0:Tt(n,t)}function Kt(n,t){if(n==="0x")return be;const e=mt(n,t);return V(e<=sb,"value exceeds uint size",t,e),e}function Nt(n,t){const e=mt(n,"value"),r=he(e);return V(r.length<=32,"value too large",`tx.${t}`,e),r}function Eo(n){return mi(n).map(t=>[t.address,t.storageKeys])}function cb(n){return n.map(t=>[Nt(t.chainId,"chainId"),t.address,Nt(t.nonce,"nonce"),Nt(t.signature.yParity,"yParity"),he(t.signature.r),he(t.signature.s)])}function ub(n,t){V(Array.isArray(n),`invalid ${t}`,"value",n);for(let e=0;e<n.length;e++)V($t(n[e],32),"invalid ${ param } hash",`value[${e}]`,n[e]);return n}function _b(n){const t=vs(n);V(Array.isArray(t)&&(t.length===9||t.length===6),"invalid field count for legacy transaction","data",n);const e={type:0,nonce:Ai(t[0],"nonce"),gasPrice:Kt(t[1],"gasPrice"),gasLimit:Kt(t[2],"gasLimit"),to:ts(t[3]),value:Kt(t[4],"value"),data:gt(t[5]),chainId:be};if(t.length===6)return e;const r=Kt(t[6],"v"),i=Kt(t[7],"r"),o=Kt(t[8],"s");if(i===be&&o===be)e.chainId=r;else{let a=(r-ib)/eb;a<be&&(a=be),e.chainId=a,V(a!==be||r===rb||r===nb,"non-canonical legacy v","v",t[6]),e.signature=se.from({r:pr(t[7],32),s:pr(t[8],32),v:r})}return e}function fb(n,t){const e=[Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data];let r=be;if(n.chainId!=be)r=mt(n.chainId,"tx.chainId"),V(!t||t.networkV==null||t.legacyChainId===r,"tx.chainId/sig.v mismatch","sig",t);else if(n.signature){const o=n.signature.legacyChainId;o!=null&&(r=o)}if(!t)return r!==be&&(e.push(he(r)),e.push("0x"),e.push("0x")),si(e);let i=BigInt(27+t.yParity);return r!==be?i=se.getChainIdV(r,t.v):BigInt(t.v)!==i&&V(!1,"tx.chainId/sig.v mismatch","sig",t),e.push(he(i)),e.push(he(t.r)),e.push(he(t.s)),si(e)}function vo(n,t){let e;try{if(e=Ai(t[0],"yParity"),e!==0&&e!==1)throw new Error("bad yParity")}catch{V(!1,"invalid yParity","yParity",t[0])}const r=pr(t[1],32),i=pr(t[2],32),o=se.from({r,s:i,yParity:e});n.signature=o}function lb(n){const t=vs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===9||t.length===12),"invalid field count for transaction type: 2","data",gt(n));const e={type:2,chainId:Kt(t[0],"chainId"),nonce:Ai(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ts(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:Ao(t[8],"accessList")};return t.length===9||vo(e,t.slice(9)),e}function hb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,Eo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x02",si(e)])}function pb(n){const t=vs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===8||t.length===11),"invalid field count for transaction type: 1","data",gt(n));const e={type:1,chainId:Kt(t[0],"chainId"),nonce:Ai(t[1],"nonce"),gasPrice:Kt(t[2],"gasPrice"),gasLimit:Kt(t[3],"gasLimit"),to:ts(t[4]),value:Kt(t[5],"value"),data:gt(t[6]),accessList:Ao(t[7],"accessList")};return t.length===8||vo(e,t.slice(8)),e}function wb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.gasPrice||0,"gasPrice"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,Eo(n.accessList||[])];return t&&(e.push(Nt(t.yParity,"recoveryParam")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x01",si(e)])}function db(n){let t=vs(Ot(n).slice(1)),e="3",r=null;if(t.length===4&&Array.isArray(t[0])){e="3 (network format)";const o=t[1],a=t[2],u=t[3];V(Array.isArray(o),"invalid network format: blobs not an array","fields[1]",o),V(Array.isArray(a),"invalid network format: commitments not an array","fields[2]",a),V(Array.isArray(u),"invalid network format: proofs not an array","fields[3]",u),V(o.length===a.length,"invalid network format: blobs/commitments length mismatch","fields",t),V(o.length===u.length,"invalid network format: blobs/proofs length mismatch","fields",t),r=[];for(let _=0;_<t[1].length;_++)r.push({data:o[_],commitment:a[_],proof:u[_]});t=t[0]}V(Array.isArray(t)&&(t.length===11||t.length===14),`invalid field count for transaction type: ${e}`,"data",gt(n));const i={type:3,chainId:Kt(t[0],"chainId"),nonce:Ai(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ts(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:Ao(t[8],"accessList"),maxFeePerBlobGas:Kt(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};r&&(i.blobs=r),V(i.to!=null,`invalid address for transaction type: ${e}`,"data",n),V(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",n);for(let o=0;o<i.blobVersionedHashes.length;o++)V($t(i.blobVersionedHashes[o],32),`invalid blobVersionedHash at index ${o}: must be length 32`,"data",n);return t.length===11||vo(i,t.slice(11)),i}function gb(n,t,e){const r=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||Ss,Nt(n.value,"value"),n.data,Eo(n.accessList||[]),Nt(n.maxFeePerBlobGas||0,"maxFeePerBlobGas"),ub(n.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(r.push(Nt(t.yParity,"yParity")),r.push(he(t.r)),r.push(he(t.s)),e)?ne(["0x03",si([r,e.map(i=>i.data),e.map(i=>i.commitment),e.map(i=>i.proof)])]):ne(["0x03",si(r)])}function yb(n){const t=vs(Ot(n).slice(1));V(Array.isArray(t)&&(t.length===10||t.length===13),"invalid field count for transaction type: 4","data",gt(n));const e={type:4,chainId:Kt(t[0],"chainId"),nonce:Ai(t[1],"nonce"),maxPriorityFeePerGas:Kt(t[2],"maxPriorityFeePerGas"),maxFeePerGas:Kt(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:Kt(t[4],"gasLimit"),to:ts(t[5]),value:Kt(t[6],"value"),data:gt(t[7]),accessList:Ao(t[8],"accessList"),authorizationList:ab(t[9],"authorizationList")};return t.length===10||vo(e,t.slice(10)),e}function bb(n,t){const e=[Nt(n.chainId,"chainId"),Nt(n.nonce,"nonce"),Nt(n.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),Nt(n.maxFeePerGas||0,"maxFeePerGas"),Nt(n.gasLimit,"gasLimit"),n.to||"0x",Nt(n.value,"value"),n.data,Eo(n.accessList||[]),cb(n.authorizationList||[])];return t&&(e.push(Nt(t.yParity,"yParity")),e.push(he(t.r)),e.push(he(t.s))),ne(["0x04",si(e)])}class Ye{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#w;#c;#_;#f;#l;#g;get type(){return this.#t}set type(t){switch(t){case null:this.#t=null;break;case 0:case"legacy":this.#t=0;break;case 1:case"berlin":case"eip-2930":this.#t=1;break;case 2:case"london":case"eip-1559":this.#t=2;break;case 3:case"cancun":case"eip-4844":this.#t=3;break;case 4:case"pectra":case"eip-7702":this.#t=4;break;default:V(!1,"unsupported transaction type","type",t)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const t=this.#e;return t==null&&this.type===3?Ss:t}set to(t){this.#e=t==null?null:Ut(t)}get nonce(){return this.#n}set nonce(t){this.#n=Tt(t,"value")}get gasLimit(){return this.#i}set gasLimit(t){this.#i=mt(t)}get gasPrice(){const t=this.#o;return t==null&&(this.type===0||this.type===1)?be:t}set gasPrice(t){this.#o=t==null?null:mt(t,"gasPrice")}get maxPriorityFeePerGas(){const t=this.#s;return t??(this.type===2||this.type===3?be:null)}set maxPriorityFeePerGas(t){this.#s=t==null?null:mt(t,"maxPriorityFeePerGas")}get maxFeePerGas(){const t=this.#a;return t??(this.type===2||this.type===3?be:null)}set maxFeePerGas(t){this.#a=t==null?null:mt(t,"maxFeePerGas")}get data(){return this.#r}set data(t){this.#r=gt(t)}get value(){return this.#h}set value(t){this.#h=mt(t,"value")}get chainId(){return this.#u}set chainId(t){this.#u=mt(t)}get signature(){return this.#p||null}set signature(t){this.#p=t==null?null:se.from(t)}get accessList(){const t=this.#w||null;return t??(this.type===1||this.type===2||this.type===3?[]:null)}set accessList(t){this.#w=t==null?null:mi(t)}get authorizationList(){const t=this.#g||null;return t==null&&this.type===4?[]:t}set authorizationList(t){this.#g=t==null?null:t.map(e=>qf(e))}get maxFeePerBlobGas(){const t=this.#c;return t==null&&this.type===3?be:t}set maxFeePerBlobGas(t){this.#c=t==null?null:mt(t,"maxFeePerBlobGas")}get blobVersionedHashes(){let t=this.#_;return t==null&&this.type===3?[]:t}set blobVersionedHashes(t){if(t!=null){V(Array.isArray(t),"blobVersionedHashes must be an Array","value",t),t=t.slice();for(let e=0;e<t.length;e++)V($t(t[e],32),"invalid blobVersionedHash",`value[${e}]`,t[e])}this.#_=t}get blobs(){return this.#l==null?null:this.#l.map(t=>Object.assign({},t))}set blobs(t){if(t==null){this.#l=null;return}const e=[],r=[];for(let i=0;i<t.length;i++){const o=t[i];if(_a(o)){ut(this.#f,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let a=Ot(o);if(V(a.length<=La,"blob is too large",`blobs[${i}]`,o),a.length!==La){const l=new Uint8Array(La);l.set(a),a=l}const u=this.#f.blobToKzgCommitment(a),_=gt(this.#f.computeBlobKzgProof(a,u));e.push({data:gt(a),commitment:gt(u),proof:_}),r.push(Kf(1,u))}else{const a=gt(o.commitment);e.push({data:gt(o.data),commitment:a,proof:gt(o.proof)}),r.push(Kf(1,a))}}this.#l=e,this.#_=r}get kzg(){return this.#f}set kzg(t){t==null?this.#f=null:this.#f=ob(t)}constructor(){this.#t=null,this.#e=null,this.#n=0,this.#i=be,this.#o=null,this.#s=null,this.#a=null,this.#r="0x",this.#h=be,this.#u=be,this.#p=null,this.#w=null,this.#c=null,this.#_=null,this.#f=null,this.#l=null,this.#g=null}get hash(){return this.signature==null?null:fe(this.#d(!0,!1))}get unsignedHash(){return fe(this.unsignedSerialized)}get from(){return this.signature==null?null:Qf(this.unsignedHash,this.signature)}get fromPublicKey(){return this.signature==null?null:br.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return this.signature!=null}#d(t,e){ut(!t||this.signature!=null,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=t?this.signature:null;switch(this.inferType()){case 0:return fb(this,r);case 1:return wb(this,r);case 2:return hb(this,r);case 3:return gb(this,r,e?this.blobs:null);case 4:return bb(this,r)}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#d(!0,!0)}get unsignedSerialized(){return this.#d(!1,!1)}inferType(){const t=this.inferTypes();return t.indexOf(2)>=0?2:t.pop()}inferTypes(){const t=this.gasPrice!=null,e=this.maxFeePerGas!=null||this.maxPriorityFeePerGas!=null,r=this.accessList!=null,i=this.#c!=null||this.#_;this.maxFeePerGas!=null&&this.maxPriorityFeePerGas!=null&&ut(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),ut(!e||this.type!==0&&this.type!==1,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),ut(this.type!==0||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const o=[];return this.type!=null?o.push(this.type):this.authorizationList&&this.authorizationList.length?o.push(4):e?o.push(2):t?(o.push(1),r||o.push(0)):r?(o.push(1),o.push(2)):(i&&this.to||(o.push(0),o.push(1),o.push(2)),o.push(3)),o.sort(),o}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}clone(){return Ye.from(this)}toJSON(){const t=e=>e==null?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:t(this.gasLimit),gasPrice:t(this.gasPrice),maxPriorityFeePerGas:t(this.maxPriorityFeePerGas),maxFeePerGas:t(this.maxFeePerGas),value:t(this.value),chainId:t(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(t){if(t==null)return new Ye;if(typeof t=="string"){const r=Ot(t);if(r[0]>=127)return Ye.from(_b(r));switch(r[0]){case 1:return Ye.from(pb(r));case 2:return Ye.from(lb(r));case 3:return Ye.from(db(r));case 4:return Ye.from(yb(r))}ut(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const e=new Ye;return t.type!=null&&(e.type=t.type),t.to!=null&&(e.to=t.to),t.nonce!=null&&(e.nonce=t.nonce),t.gasLimit!=null&&(e.gasLimit=t.gasLimit),t.gasPrice!=null&&(e.gasPrice=t.gasPrice),t.maxPriorityFeePerGas!=null&&(e.maxPriorityFeePerGas=t.maxPriorityFeePerGas),t.maxFeePerGas!=null&&(e.maxFeePerGas=t.maxFeePerGas),t.maxFeePerBlobGas!=null&&(e.maxFeePerBlobGas=t.maxFeePerBlobGas),t.data!=null&&(e.data=t.data),t.value!=null&&(e.value=t.value),t.chainId!=null&&(e.chainId=t.chainId),t.signature!=null&&(e.signature=se.from(t.signature)),t.accessList!=null&&(e.accessList=t.accessList),t.authorizationList!=null&&(e.authorizationList=t.authorizationList),t.blobVersionedHashes!=null&&(e.blobVersionedHashes=t.blobVersionedHashes),t.kzg!=null&&(e.kzg=t.kzg),t.blobs!=null&&(e.blobs=t.blobs),t.hash!=null&&(V(e.isSigned(),"unsigned transaction cannot define '.hash'","tx",t),V(e.hash===t.hash,"hash mismatch","tx",t)),t.from!=null&&(V(e.isSigned(),"unsigned transaction cannot define '.from'","tx",t),V(e.from.toLowerCase()===(t.from||"").toLowerCase(),"from mismatch","tx",t)),e}}function Ei(n){return fe(wr(n))}var mb="AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI";const Wf=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]),Jf=4;function Ab(n){let t=0;function e(){return n[t++]<<8|n[t++]}let r=e(),i=1,o=[0,1];for(let k=1;k<r;k++)o.push(i+=e());let a=e(),u=t;t+=a;let _=0,l=0;function f(){return _==0&&(l=l<<8|n[t++],_=8),l>>--_&1}const g=31,y=2**g,B=y>>>1,I=B>>1,S=y-1;let T=0;for(let k=0;k<g;k++)T=T<<1|f();let A=[],R=0,P=y;for(;;){let k=Math.floor(((T-R+1)*i-1)/P),C=0,N=r;for(;N-C>1;){let Z=C+N>>>1;k<o[Z]?N=Z:C=Z}if(C==0)break;A.push(C);let D=R+Math.floor(P*o[C]/i),Y=R+Math.floor(P*o[C+1]/i)-1;for(;((D^Y)&B)==0;)T=T<<1&S|f(),D=D<<1&S,Y=Y<<1&S|1;for(;D&~Y&I;)T=T&B|T<<1&S>>>1|f(),D=D<<1^B,Y=(Y^B)<<1|B|1;R=D,P=1+Y-D}let z=r-4;return A.map(k=>{switch(k-z){case 3:return z+65792+(n[u++]<<16|n[u++]<<8|n[u++]);case 2:return z+256+(n[u++]<<8|n[u++]);case 1:return z+n[u++];default:return k-1}})}function Eb(n){let t=0;return()=>n[t++]}function $f(n){return Eb(Ab(vb(n)))}function vb(n){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach((i,o)=>t[i.charCodeAt(0)]=o);let e=n.length,r=new Uint8Array(6*e>>3);for(let i=0,o=0,a=0,u=0;i<e;i++)u=u<<6|t[n.charCodeAt(i)],a+=6,a>=8&&(r[o++]=u>>(a-=8));return r}function xb(n){return n&1?~n>>1:n>>1}function Rb(n,t){let e=Array(n);for(let r=0,i=0;r<n;r++)e[r]=i+=xb(t());return e}function Ps(n,t=0){let e=[];for(;;){let r=n(),i=n();if(!i)break;t+=r;for(let o=0;o<i;o++)e.push(t+o);t+=i+1}return e}function Yf(n){return ks(()=>{let t=Ps(n);if(t.length)return t})}function Zf(n){let t=[];for(;;){let e=n();if(e==0)break;t.push(zb(e,n))}for(;;){let e=n()-1;if(e<0)break;t.push(Bb(e,n))}return t.flat()}function ks(n){let t=[];for(;;){let e=n(t.length);if(!e)break;t.push(e)}return t}function Xf(n,t,e){let r=Array(n).fill().map(()=>[]);for(let i=0;i<t;i++)Rb(n,e).forEach((o,a)=>r[a].push(o));return r}function zb(n,t){let e=1+t(),r=t(),i=ks(t);return Xf(i.length,1+n,t).flatMap((a,u)=>{let[_,...l]=a;return Array(i[u]).fill().map((f,g)=>{let y=g*r;return[_+g*e,l.map(B=>B+y)]})})}function Bb(n,t){let e=1+t();return Xf(e,1+n,t).map(i=>[i[0],i.slice(1)])}function Sb(n){let t=[],e=Ps(n);return i(r([]),[]),t;function r(o){let a=n(),u=ks(()=>{let _=Ps(n).map(l=>e[l]);if(_.length)return r(_)});return{S:a,B:u,Q:o}}function i({S:o,B:a},u,_){if(!(o&4&&_===u[u.length-1])){o&2&&(_=u[u.length-1]),o&1&&t.push(u);for(let l of a)for(let f of l.Q)i(l,[...u,f],_)}}}function Pb(n){return n.toString(16).toUpperCase().padStart(2,"0")}function tl(n){return`{${Pb(n)}}`}function kb(n){let t=[];for(let e=0,r=n.length;e<r;){let i=n.codePointAt(e);e+=i<65536?1:2,t.push(i)}return t}function es(n){let e=n.length;if(e<4096)return String.fromCodePoint(...n);let r=[];for(let i=0;i<e;)r.push(String.fromCodePoint(...n.slice(i,i+=4096)));return r.join("")}function Fb(n,t){let e=n.length,r=e-t.length;for(let i=0;r==0&&i<e;i++)r=n[i]-t[i];return r}var Ib="AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g";const Fs=44032,xo=4352,Ro=4449,zo=4519,el=19,rl=21,rs=28,Bo=rl*rs,Ob=el*Bo,Tb=Fs+Ob,Cb=xo+el,Nb=Ro+rl,Lb=zo+rs;function Is(n){return n>>24&255}function nl(n){return n&16777215}let Da,il,Ua,So;function Db(){let n=$f(Ib);Da=new Map(Yf(n).flatMap((t,e)=>t.map(r=>[r,e+1<<24]))),il=new Set(Ps(n)),Ua=new Map,So=new Map;for(let[t,e]of Zf(n)){if(!il.has(t)&&e.length==2){let[r,i]=e,o=So.get(r);o||(o=new Map,So.set(r,o)),o.set(i,t)}Ua.set(t,e.reverse())}}function sl(n){return n>=Fs&&n<Tb}function Ub(n,t){if(n>=xo&&n<Cb&&t>=Ro&&t<Nb)return Fs+(n-xo)*Bo+(t-Ro)*rs;if(sl(n)&&t>zo&&t<Lb&&(n-Fs)%rs==0)return n+(t-zo);{let e=So.get(n);return e&&(e=e.get(t),e)?e:-1}}function ol(n){Da||Db();let t=[],e=[],r=!1;function i(o){let a=Da.get(o);a&&(r=!0,o|=a),t.push(o)}for(let o of n)for(;;){if(o<128)t.push(o);else if(sl(o)){let a=o-Fs,u=a/Bo|0,_=a%Bo/rs|0,l=a%rs;i(xo+u),i(Ro+_),l>0&&i(zo+l)}else{let a=Ua.get(o);a?e.push(...a):i(o)}if(!e.length)break;o=e.pop()}if(r&&t.length>1){let o=Is(t[0]);for(let a=1;a<t.length;a++){let u=Is(t[a]);if(u==0||o<=u){o=u;continue}let _=a-1;for(;;){let l=t[_+1];if(t[_+1]=t[_],t[_]=l,!_||(o=Is(t[--_]),o<=u))break}o=Is(t[a])}}return t}function Mb(n){let t=[],e=[],r=-1,i=0;for(let o of n){let a=Is(o),u=nl(o);if(r==-1)a==0?r=u:t.push(u);else if(i>0&&i>=a)a==0?(t.push(r,...e),e.length=0,r=u):e.push(u),i=a;else{let _=Ub(r,u);_>=0?r=_:i==0&&a==0?(t.push(r),r=u):(e.push(u),i=a)}}return r>=0&&t.push(r,...e),t}function al(n){return ol(n).map(nl)}function jb(n){return Mb(ol(n))}const cl=45,ul=".",_l=65039,fl=1,Po=n=>Array.from(n);function Os(n,t){return n.P.has(t)||n.Q.has(t)}class Gb extends Array{get is_emoji(){return!0}}let Ma,ll,vi,ja,hl,ns,Ga,is,xi,pl,Ha;function Va(){if(Ma)return;let n=$f(mb);const t=()=>Ps(n),e=()=>new Set(t()),r=(f,g)=>g.forEach(y=>f.add(y));Ma=new Map(Zf(n)),ll=e(),vi=t(),ja=new Set(t().map(f=>vi[f])),vi=new Set(vi),hl=e(),e();let i=Yf(n),o=n();const a=()=>{let f=new Set;return t().forEach(g=>r(f,i[g])),r(f,t()),f};ns=ks(f=>{let g=ks(n).map(y=>y+96);if(g.length){let y=f>=o;g[0]-=32,g=es(g),y&&(g=`Restricted[${g}]`);let B=a(),I=a(),S=!n();return{N:g,P:B,Q:I,M:S,R:y}}}),Ga=e(),is=new Map;let u=t().concat(Po(Ga)).sort((f,g)=>f-g);u.forEach((f,g)=>{let y=n(),B=u[g]=y?u[g-y]:{V:[],M:new Map};B.V.push(f),Ga.has(f)||is.set(f,B)});for(let{V:f,M:g}of new Set(is.values())){let y=[];for(let I of f){let S=ns.filter(A=>Os(A,I)),T=y.find(({G:A})=>S.some(R=>A.has(R)));T||(T={G:new Set,V:[]},y.push(T)),T.V.push(I),r(T.G,S)}let B=y.flatMap(I=>Po(I.G));for(let{G:I,V:S}of y){let T=new Set(B.filter(A=>!I.has(A)));for(let A of S)g.set(A,T)}}xi=new Set;let _=new Set;const l=f=>xi.has(f)?_.add(f):xi.add(f);for(let f of ns){for(let g of f.P)l(g);for(let g of f.Q)l(g)}for(let f of xi)!is.has(f)&&!_.has(f)&&is.set(f,fl);r(xi,al(xi)),pl=Sb(n).map(f=>Gb.from(f)).sort(Fb),Ha=new Map;for(let f of pl){let g=[Ha];for(let y of f){let B=g.map(I=>{let S=I.get(y);return S||(S=new Map,I.set(y,S)),S});y===_l?g.push(...B):g=B}for(let y of g)y.V=f}}function qa(n){return(wl(n)?"":`${Qa(ko([n]))} `)+tl(n)}function Qa(n){return`"${n}"`}function Hb(n){if(n.length>=4&&n[2]==cl&&n[3]==cl)throw new Error(`invalid label extension: "${es(n.slice(0,4))}"`)}function Vb(n){for(let e=n.lastIndexOf(95);e>0;)if(n[--e]!==95)throw new Error("underscore allowed only at start")}function qb(n){let t=n[0],e=Wf.get(t);if(e)throw Ts(`leading ${e}`);let r=n.length,i=-1;for(let o=1;o<r;o++){t=n[o];let a=Wf.get(t);if(a){if(i==o)throw Ts(`${e} + ${a}`);i=o+1,e=a}}if(i==r)throw Ts(`trailing ${e}`)}function ko(n,t=1/0,e=tl){let r=[];Qb(n[0])&&r.push("◌"),n.length>t&&(t>>=1,n=[...n.slice(0,t),8230,...n.slice(-t)]);let i=0,o=n.length;for(let a=0;a<o;a++){let u=n[a];wl(u)&&(r.push(es(n.slice(i,a))),r.push(e(u)),i=a+1)}return r.push(es(n.slice(i,o))),r.join("")}function Qb(n){return Va(),vi.has(n)}function wl(n){return Va(),hl.has(n)}function Kb(n){return Yb(Wb(n,jb,t1))}function Wb(n,t,e){if(!n)return[];Va();let r=0;return n.split(ul).map(i=>{let o=kb(i),a={input:o,offset:r};r+=o.length+1;try{let u=a.tokens=Xb(o,t,e),_=u.length,l;if(!_)throw new Error("empty label");let f=a.output=u.flat();if(Vb(f),!(a.emoji=_>1||u[0].is_emoji)&&f.every(y=>y<128))Hb(f),l="ASCII";else{let y=u.flatMap(B=>B.is_emoji?[]:B);if(!y.length)l="Emoji";else{if(vi.has(f[0]))throw Ts("leading combining mark");for(let S=1;S<_;S++){let T=u[S];if(!T.is_emoji&&vi.has(T[0]))throw Ts(`emoji + combining mark: "${es(u[S-1])} + ${ko([T[0]])}"`)}qb(f);let B=Po(new Set(y)),[I]=$b(B);Zb(I,y),Jb(I,B),l=I.N}}a.type=l}catch(u){a.error=u}return a})}function Jb(n,t){let e,r=[];for(let i of t){let o=is.get(i);if(o===fl)return;if(o){let a=o.M.get(i);if(e=e?e.filter(u=>a.has(u)):Po(a),!e.length)return}else r.push(i)}if(e){for(let i of e)if(r.every(o=>Os(i,o)))throw new Error(`whole-script confusable: ${n.N}/${i.N}`)}}function $b(n){let t=ns;for(let e of n){let r=t.filter(i=>Os(i,e));if(!r.length)throw ns.some(i=>Os(i,e))?gl(t[0],e):dl(e);if(t=r,r.length==1)break}return t}function Yb(n){return n.map(({input:t,error:e,output:r})=>{if(e){let i=e.message;throw new Error(n.length==1?i:`Invalid label ${Qa(ko(t,63))}: ${i}`)}return es(r)}).join(ul)}function dl(n){return new Error(`disallowed character: ${qa(n)}`)}function gl(n,t){let e=qa(t),r=ns.find(i=>i.P.has(t));return r&&(e=`${r.N} ${e}`),new Error(`illegal mixture: ${n.N} + ${e}`)}function Ts(n){return new Error(`illegal placement: ${n}`)}function Zb(n,t){for(let e of t)if(!Os(n,e))throw gl(n,e);if(n.M){let e=al(t);for(let r=1,i=e.length;r<i;r++)if(ja.has(e[r])){let o=r+1;for(let a;o<i&&ja.has(a=e[o]);o++)for(let u=r;u<o;u++)if(e[u]==a)throw new Error(`duplicate non-spacing marks: ${qa(a)}`);if(o-r>Jf)throw new Error(`excessive non-spacing marks: ${Qa(ko(e.slice(r-1,o)))} (${o-r}/${Jf})`);r=o}}}function Xb(n,t,e){let r=[],i=[];for(n=n.slice().reverse();n.length;){let o=e1(n);if(o)i.length&&(r.push(t(i)),i=[]),r.push(e(o));else{let a=n.pop();if(xi.has(a))i.push(a);else{let u=Ma.get(a);if(u)i.push(...u);else if(!ll.has(a))throw dl(a)}}}return i.length&&r.push(t(i)),r}function t1(n){return n.filter(t=>t!=_l)}function e1(n,t){let e=Ha,r,i=n.length;for(;i&&(e=e.get(n[--i]),!!e);){let{V:o}=e;o&&(r=o,n.length=i)}return r}const yl=new Uint8Array(32);yl.fill(0);function bl(n){return V(n.length!==0,"invalid ENS name; empty component","comp",n),n}function ml(n){const t=wr(r1(n)),e=[];if(n.length===0)return e;let r=0;for(let i=0;i<t.length;i++)t[i]===46&&(e.push(bl(t.slice(r,i))),r=i+1);return V(r<t.length,"invalid ENS name; empty component","name",n),e.push(bl(t.slice(r))),e}function r1(n){try{if(n.length===0)throw new Error("empty label");return Kb(n)}catch(t){V(!1,`invalid ENS name (${t.message})`,"name",n)}}function Ka(n){V(typeof n=="string","invalid ENS name; not a string","name",n),V(n.length,"invalid ENS name (empty label)","name",n);let t=yl;const e=ml(n);for(;e.length;)t=fe(ne([t,fe(e.pop())]));return gt(t)}function n1(n,t){const e=t;return V(e<=255,"DNS encoded label cannot exceed 255","length",e),gt(ne(ml(n).map(r=>{V(r.length<=e,`label ${JSON.stringify(n)} exceeds ${e} bytes`,"name",n);const i=new Uint8Array(r.length+1);return i.set(r,1),i[0]=i.length-1,i})))+"00"}const Al=new Uint8Array(32);Al.fill(0);const i1=BigInt(-1),El=BigInt(0),vl=BigInt(1),s1=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function o1(n){const t=Ot(n),e=t.length%32;return e?ne([t,Al.slice(e)]):gt(t)}const a1=ni(vl,32),c1=ni(El,32),xl={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},Wa=["name","version","chainId","verifyingContract","salt"];function Rl(n){return function(t){return V(typeof t=="string",`invalid domain value for ${JSON.stringify(n)}`,`domain.${n}`,t),t}}const u1={name:Rl("name"),version:Rl("version"),chainId:function(n){const t=mt(n,"domain.chainId");return V(t>=0,"invalid chain ID","domain.chainId",n),Number.isSafeInteger(t)?Number(t):Je(t)},verifyingContract:function(n){try{return Ut(n).toLowerCase()}catch{}V(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",n)},salt:function(n){const t=Ot(n,"domain.salt");return V(t.length===32,'invalid domain value "salt"',"domain.salt",n),gt(t)}};function Ja(n){{const t=n.match(/^(u?)int(\d+)$/);if(t){const e=t[1]==="",r=parseInt(t[2]);V(r%8===0&&r!==0&&r<=256&&t[2]===String(r),"invalid numeric width","type",n);const i=Es(s1,e?r-1:r),o=e?(i+vl)*i1:El;return function(a){const u=mt(a,"value");return V(u>=o&&u<=i,`value out-of-bounds for ${n}`,"value",u),ni(e?R_(u,256):u,32)}}}{const t=n.match(/^bytes(\d+)$/);if(t){const e=parseInt(t[1]);return V(e!==0&&e<=32&&t[1]===String(e),"invalid bytes width","type",n),function(r){const i=Ot(r);return V(i.length===e,`invalid length for ${n}`,"value",r),o1(r)}}}switch(n){case"address":return function(t){return pr(Ut(t),32)};case"bool":return function(t){return t?a1:c1};case"bytes":return function(t){return fe(t)};case"string":return function(t){return Ei(t)}}return null}function zl(n,t){return`${n}(${t.map(({name:e,type:r})=>r+" "+e).join(",")})`}function Fo(n){const t=n.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:n}}class Pe{primaryType;#t;get types(){return JSON.parse(this.#t)}#e;#r;constructor(t){this.#e=new Map,this.#r=new Map;const e=new Map,r=new Map,i=new Map,o={};Object.keys(t).forEach(_=>{o[_]=t[_].map(({name:l,type:f})=>{let{base:g,index:y}=Fo(f);return g==="int"&&!t.int&&(g="int256"),g==="uint"&&!t.uint&&(g="uint256"),{name:l,type:g+(y||"")}}),e.set(_,new Set),r.set(_,[]),i.set(_,new Set)}),this.#t=JSON.stringify(o);for(const _ in o){const l=new Set;for(const f of o[_]){V(!l.has(f.name),`duplicate variable name ${JSON.stringify(f.name)} in ${JSON.stringify(_)}`,"types",t),l.add(f.name);const g=Fo(f.type).base;V(g!==_,`circular type reference to ${JSON.stringify(g)}`,"types",t),!Ja(g)&&(V(r.has(g),`unknown type ${JSON.stringify(g)}`,"types",t),r.get(g).push(_),e.get(_).add(g))}}const a=Array.from(r.keys()).filter(_=>r.get(_).length===0);V(a.length!==0,"missing primary type","types",t),V(a.length===1,`ambiguous primary types or unused types: ${a.map(_=>JSON.stringify(_)).join(", ")}`,"types",t),zt(this,{primaryType:a[0]});function u(_,l){V(!l.has(_),`circular type reference to ${JSON.stringify(_)}`,"types",t),l.add(_);for(const f of e.get(_))if(r.has(f)){u(f,l);for(const g of l)i.get(g).add(f)}l.delete(_)}u(this.primaryType,new Set);for(const[_,l]of i){const f=Array.from(l);f.sort(),this.#e.set(_,zl(_,o[_])+f.map(g=>zl(g,o[g])).join(""))}}getEncoder(t){let e=this.#r.get(t);return e||(e=this.#n(t),this.#r.set(t,e)),e}#n(t){{const i=Ja(t);if(i)return i}const e=Fo(t).array;if(e){const i=e.prefix,o=this.getEncoder(i);return a=>{V(e.count===-1||e.count===a.length,`array length mismatch; expected length ${e.count}`,"value",a);let u=a.map(o);return this.#e.has(i)&&(u=u.map(fe)),fe(ne(u))}}const r=this.types[t];if(r){const i=Ei(this.#e.get(t));return o=>{const a=r.map(({name:u,type:_})=>{const l=this.getEncoder(_)(o[u]);return this.#e.has(_)?fe(l):l});return a.unshift(i),ne(a)}}V(!1,`unknown type: ${t}`,"type",t)}encodeType(t){const e=this.#e.get(t);return V(e,`unknown type: ${JSON.stringify(t)}`,"name",t),e}encodeData(t,e){return this.getEncoder(t)(e)}hashStruct(t,e){return fe(this.encodeData(t,e))}encode(t){return this.encodeData(this.primaryType,t)}hash(t){return this.hashStruct(this.primaryType,t)}_visit(t,e,r){if(Ja(t))return r(t,e);const i=Fo(t).array;if(i)return V(i.count===-1||i.count===e.length,`array length mismatch; expected length ${i.count}`,"value",e),e.map(a=>this._visit(i.prefix,a,r));const o=this.types[t];if(o)return o.reduce((a,{name:u,type:_})=>(a[u]=this._visit(_,e[u],r),a),{});V(!1,`unknown type: ${t}`,"type",t)}visit(t,e){return this._visit(this.primaryType,t,e)}static from(t){return new Pe(t)}static getPrimaryType(t){return Pe.from(t).primaryType}static hashStruct(t,e,r){return Pe.from(e).hashStruct(t,r)}static hashDomain(t){const e=[];for(const r in t){if(t[r]==null)continue;const i=xl[r];V(i,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",t),e.push({name:r,type:i})}return e.sort((r,i)=>Wa.indexOf(r.name)-Wa.indexOf(i.name)),Pe.hashStruct("EIP712Domain",{EIP712Domain:e},t)}static encode(t,e,r){return ne(["0x1901",Pe.hashDomain(t),Pe.from(e).hash(r)])}static hash(t,e,r){return fe(Pe.encode(t,e,r))}static async resolveNames(t,e,r,i){t=Object.assign({},t);for(const u in t)t[u]==null&&delete t[u];const o={};t.verifyingContract&&!$t(t.verifyingContract,20)&&(o[t.verifyingContract]="0x");const a=Pe.from(e);a.visit(r,(u,_)=>(u==="address"&&!$t(_,20)&&(o[_]="0x"),_));for(const u in o)o[u]=await i(u);return t.verifyingContract&&o[t.verifyingContract]&&(t.verifyingContract=o[t.verifyingContract]),r=a.visit(r,(u,_)=>u==="address"&&o[_]?o[_]:_),{domain:t,value:r}}static getPayload(t,e,r){Pe.hashDomain(t);const i={},o=[];Wa.forEach(_=>{const l=t[_];l!=null&&(i[_]=u1[_](l),o.push({name:_,type:xl[_]}))});const a=Pe.from(e);e=a.types;const u=Object.assign({},e);return V(u.EIP712Domain==null,"types must not contain EIP712Domain type","types.EIP712Domain",e),u.EIP712Domain=o,a.encode(r),{types:u,domain:i,primaryType:a.primaryType,message:a.visit(r,(_,l)=>{if(_.match(/^bytes(\d*)/))return gt(Ot(l));if(_.match(/^u?int/))return mt(l).toString();switch(_){case"address":return l.toLowerCase();case"bool":return!!l;case"string":return V(typeof l=="string","invalid string","value",l),l}V(!1,"unsupported type","type",_)})}}}function Bl(n,t,e,r){return Qf(Pe.hash(n,t,e),r)}function ze(n){const t=new Set;return n.forEach(e=>t.add(e)),Object.freeze(t)}const _1=ze("external public payable override".split(" ")),Sl="constant external internal payable private public pure view override",f1=ze(Sl.split(" ")),Pl="constructor error event fallback function receive struct",kl=ze(Pl.split(" ")),Fl="calldata memory storage payable indexed",l1=ze(Fl.split(" ")),h1=[Pl,Fl,"tuple returns",Sl].join(" "),p1=ze(h1.split(" ")),w1={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},d1=new RegExp("^(\\s*)"),g1=new RegExp("^([0-9]+)"),y1=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),Il=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),Ol=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class Ge{#t;#e;get offset(){return this.#t}get length(){return this.#e.length-this.#t}constructor(t){this.#t=0,this.#e=t.slice()}clone(){return new Ge(this.#e)}reset(){this.#t=0}#r(t=0,e=0){return new Ge(this.#e.slice(t,e).map(r=>Object.freeze(Object.assign({},r,{match:r.match-t,linkBack:r.linkBack-t,linkNext:r.linkNext-t}))))}popKeyword(t){const e=this.peek();if(e.type!=="KEYWORD"||!t.has(e.text))throw new Error(`expected keyword ${e.text}`);return this.pop().text}popType(t){if(this.peek().type!==t){const e=this.peek();throw new Error(`expected ${t}; got ${e.type} ${JSON.stringify(e.text)}`)}return this.pop().text}popParen(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=this.#r(this.#t+1,t.match+1);return this.#t=t.match+1,e}popParams(){const t=this.peek();if(t.type!=="OPEN_PAREN")throw new Error("bad start");const e=[];for(;this.#t<t.match-1;){const r=this.peek().linkNext;e.push(this.#r(this.#t+1,r)),this.#t=r}return this.#t=t.match+1,e}peek(){if(this.#t>=this.#e.length)throw new Error("out-of-bounds");return this.#e[this.#t]}peekKeyword(t){const e=this.peekType("KEYWORD");return e!=null&&t.has(e)?e:null}peekType(t){if(this.length===0)return null;const e=this.peek();return e.type===t?e.text:null}pop(){const t=this.peek();return this.#t++,t}toString(){const t=[];for(let e=this.#t;e<this.#e.length;e++){const r=this.#e[e];t.push(`${r.type}:${r.text}`)}return`<TokenString ${t.join(" ")}>`}}function fi(n){const t=[],e=a=>{const u=o<n.length?JSON.stringify(n[o]):"$EOI";throw new Error(`invalid token ${u} at ${o}: ${a}`)};let r=[],i=[],o=0;for(;o<n.length;){let a=n.substring(o),u=a.match(d1);u&&(o+=u[1].length,a=n.substring(o));const _={depth:r.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:o,value:-1};t.push(_);let l=w1[a[0]]||"";if(l){if(_.type=l,_.text=a[0],o++,l==="OPEN_PAREN")r.push(t.length-1),i.push(t.length-1);else if(l=="CLOSE_PAREN")r.length===0&&e("no matching open bracket"),_.match=r.pop(),t[_.match].match=t.length-1,_.depth--,_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1;else if(l==="COMMA")_.linkBack=i.pop(),t[_.linkBack].linkNext=t.length-1,i.push(t.length-1);else if(l==="OPEN_BRACKET")_.type="BRACKET";else if(l==="CLOSE_BRACKET"){let f=t.pop().text;if(t.length>0&&t[t.length-1].type==="NUMBER"){const g=t.pop().text;f=g+f,t[t.length-1].value=Tt(g)}if(t.length===0||t[t.length-1].type!=="BRACKET")throw new Error("missing opening bracket");t[t.length-1].text+=f}continue}if(u=a.match(y1),u){if(_.text=u[1],o+=_.text.length,p1.has(_.text)){_.type="KEYWORD";continue}if(_.text.match(Ol)){_.type="TYPE";continue}_.type="ID";continue}if(u=a.match(g1),u){_.text=u[1],_.type="NUMBER",o+=_.text.length;continue}throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${o}`)}return new Ge(t.map(a=>Object.freeze(a)))}function Tl(n,t){let e=[];for(const r in t.keys())n.has(r)&&e.push(r);if(e.length>1)throw new Error(`conflicting types: ${e.join(", ")}`)}function Io(n,t){if(t.peekKeyword(kl)){const e=t.pop().text;if(e!==n)throw new Error(`expected ${n}, got ${e}`)}return t.popType("ID")}function Ar(n,t){const e=new Set;for(;;){const r=n.peekType("KEYWORD");if(r==null||t&&!t.has(r))break;if(n.pop(),e.has(r))throw new Error(`duplicate keywords: ${JSON.stringify(r)}`);e.add(r)}return Object.freeze(e)}function Cl(n){let t=Ar(n,f1);return Tl(t,ze("constant payable nonpayable".split(" "))),Tl(t,ze("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function Er(n,t){return n.popParams().map(e=>Yt.from(e,t))}function Nl(n){if(n.peekType("AT")){if(n.pop(),n.peekType("NUMBER"))return mt(n.pop().text);throw new Error("invalid gas")}return null}function Ri(n){if(n.length)throw new Error(`unexpected tokens at offset ${n.offset}: ${n.toString()}`)}const b1=new RegExp(/^(.*)\[([0-9]*)\]$/);function Ll(n){const t=n.match(Ol);if(V(t,"invalid type","type",n),n==="uint")return"uint256";if(n==="int")return"int256";if(t[2]){const e=parseInt(t[2]);V(e!==0&&e<=32,"invalid bytes length","type",n)}else if(t[3]){const e=parseInt(t[3]);V(e!==0&&e<=256&&e%8===0,"invalid numeric width","type",n)}return n}const re={},ke=Symbol.for("_ethers_internal"),Dl="_ParamTypeInternal",Ul="_ErrorInternal",Ml="_EventInternal",jl="_ConstructorInternal",Gl="_FallbackInternal",Hl="_FunctionInternal",Vl="_StructInternal";class Yt{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(t,e,r,i,o,a,u,_){if(oo(t,re,"ParamType"),Object.defineProperty(this,ke,{value:Dl}),a&&(a=Object.freeze(a.slice())),i==="array"){if(u==null||_==null)throw new Error("")}else if(u!=null||_!=null)throw new Error("");if(i==="tuple"){if(a==null)throw new Error("")}else if(a!=null)throw new Error("");zt(this,{name:e,type:r,baseType:i,indexed:o,components:a,arrayLength:u,arrayChildren:_})}format(t){if(t==null&&(t="sighash"),t==="json"){const r=this.name||"";if(this.isArray()){const o=JSON.parse(this.arrayChildren.format("json"));return o.name=r,o.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(o)}const i={type:this.baseType==="tuple"?"tuple":this.type,name:r};return typeof this.indexed=="boolean"&&(i.indexed=this.indexed),this.isTuple()&&(i.components=this.components.map(o=>JSON.parse(o.format(t)))),JSON.stringify(i)}let e="";return this.isArray()?(e+=this.arrayChildren.format(t),e+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?e+="("+this.components.map(r=>r.format(t)).join(t==="full"?", ":",")+")":e+=this.type,t!=="sighash"&&(this.indexed===!0&&(e+=" indexed"),t==="full"&&this.name&&(e+=" "+this.name)),e}isArray(){return this.baseType==="array"}isTuple(){return this.baseType==="tuple"}isIndexable(){return this.indexed!=null}walk(t,e){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(this.arrayLength!==-1&&t.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return t.map(i=>r.arrayChildren.walk(i,e))}if(this.isTuple()){if(!Array.isArray(t))throw new Error("invalid tuple value");if(t.length!==this.components.length)throw new Error("array is wrong length");const r=this;return t.map((i,o)=>r.components[o].walk(i,e))}return e(this.type,t)}#t(t,e,r,i){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(this.arrayLength!==-1&&e.length!==this.arrayLength)throw new Error("array is wrong length");const a=this.arrayChildren,u=e.slice();u.forEach((_,l)=>{a.#t(t,_,r,f=>{u[l]=f})}),i(u);return}if(this.isTuple()){const a=this.components;let u;if(Array.isArray(e))u=e.slice();else{if(e==null||typeof e!="object")throw new Error("invalid tuple value");u=a.map(_=>{if(!_.name)throw new Error("cannot use object value with unnamed components");if(!(_.name in e))throw new Error(`missing value for component ${_.name}`);return e[_.name]})}if(u.length!==this.components.length)throw new Error("array is wrong length");u.forEach((_,l)=>{a[l].#t(t,_,r,f=>{u[l]=f})}),i(u);return}const o=r(this.type,e);o.then?t.push(async function(){i(await o)}()):i(o)}async walkAsync(t,e){const r=[],i=[t];return this.#t(r,t,e,o=>{i[0]=o}),r.length&&await Promise.all(r),i[0]}static from(t,e){if(Yt.isParamType(t))return t;if(typeof t=="string")try{return Yt.from(fi(t),e)}catch{V(!1,"invalid param type","obj",t)}else if(t instanceof Ge){let u="",_="",l=null;Ar(t,ze(["tuple"])).has("tuple")||t.peekType("OPEN_PAREN")?(_="tuple",l=t.popParams().map(S=>Yt.from(S)),u=`tuple(${l.map(S=>S.format()).join(",")})`):(u=Ll(t.popType("TYPE")),_=u);let f=null,g=null;for(;t.length&&t.peekType("BRACKET");){const S=t.pop();f=new Yt(re,"",u,_,null,l,g,f),g=S.value,u+=S.text,_="array",l=null}let y=null;if(Ar(t,l1).has("indexed")){if(!e)throw new Error("");y=!0}const I=t.peekType("ID")?t.pop().text:"";if(t.length)throw new Error("leftover tokens");return new Yt(re,I,u,_,y,l,g,f)}const r=t.name;V(!r||typeof r=="string"&&r.match(Il),"invalid name","obj.name",r);let i=t.indexed;i!=null&&(V(e,"parameter cannot be indexed","obj.indexed",t.indexed),i=!!i);let o=t.type,a=o.match(b1);if(a){const u=parseInt(a[2]||"-1"),_=Yt.from({type:a[1],components:t.components});return new Yt(re,r||"",o,"array",i,null,u,_)}if(o==="tuple"||o.startsWith("tuple(")||o.startsWith("(")){const u=t.components!=null?t.components.map(l=>Yt.from(l)):null;return new Yt(re,r||"",o,"tuple",i,u,null,null)}return o=Ll(t.type),new Yt(re,r||"",o,o,i,null,null,null)}static isParamType(t){return t&&t[ke]===Dl}}class zi{type;inputs;constructor(t,e,r){oo(t,re,"Fragment"),r=Object.freeze(r.slice()),zt(this,{type:e,inputs:r})}static from(t){if(typeof t=="string"){try{zi.from(JSON.parse(t))}catch{}return zi.from(fi(t))}if(t instanceof Ge)switch(t.peekKeyword(kl)){case"constructor":return vr.from(t);case"error":return Fe.from(t);case"event":return ar.from(t);case"fallback":case"receive":return xr.from(t);case"function":return cr.from(t);case"struct":return Bi.from(t)}else if(typeof t=="object"){switch(t.type){case"constructor":return vr.from(t);case"error":return Fe.from(t);case"event":return ar.from(t);case"fallback":case"receive":return xr.from(t);case"function":return cr.from(t);case"struct":return Bi.from(t)}ut(!1,`unsupported type: ${t.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}V(!1,"unsupported frgament object","obj",t)}static isConstructor(t){return vr.isFragment(t)}static isError(t){return Fe.isFragment(t)}static isEvent(t){return ar.isFragment(t)}static isFunction(t){return cr.isFragment(t)}static isStruct(t){return Bi.isFragment(t)}}class Oo extends zi{name;constructor(t,e,r,i){super(t,e,i),V(typeof r=="string"&&r.match(Il),"invalid identifier","name",r),i=Object.freeze(i.slice()),zt(this,{name:r})}}function Cs(n,t){return"("+t.map(e=>e.format(n)).join(n==="full"?", ":",")+")"}class Fe extends Oo{constructor(t,e,r){super(t,"error",e,r),Object.defineProperty(this,ke,{value:Ul})}get selector(){return Ei(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("error"),e.push(this.name+Cs(t,this.inputs)),e.join(" ")}static from(t){if(Fe.isFragment(t))return t;if(typeof t=="string")return Fe.from(fi(t));if(t instanceof Ge){const e=Io("error",t),r=Er(t);return Ri(t),new Fe(re,e,r)}return new Fe(re,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[ke]===Ul}}class ar extends Oo{anonymous;constructor(t,e,r,i){super(t,"event",e,r),Object.defineProperty(this,ke,{value:Ml}),zt(this,{anonymous:i})}get topicHash(){return Ei(this.format("sighash"))}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("event"),e.push(this.name+Cs(t,this.inputs)),t!=="sighash"&&this.anonymous&&e.push("anonymous"),e.join(" ")}static getTopicHash(t,e){return e=(e||[]).map(i=>Yt.from(i)),new ar(re,t,e,!1).topicHash}static from(t){if(ar.isFragment(t))return t;if(typeof t=="string")try{return ar.from(fi(t))}catch{V(!1,"invalid event fragment","obj",t)}else if(t instanceof Ge){const e=Io("event",t),r=Er(t,!0),i=!!Ar(t,ze(["anonymous"])).has("anonymous");return Ri(t),new ar(re,e,r,i)}return new ar(re,t.name,t.inputs?t.inputs.map(e=>Yt.from(e,!0)):[],!!t.anonymous)}static isFragment(t){return t&&t[ke]===Ml}}class vr extends zi{payable;gas;constructor(t,e,r,i,o){super(t,e,r),Object.defineProperty(this,ke,{value:jl}),zt(this,{payable:i,gas:o})}format(t){if(ut(t!=null&&t!=="sighash","cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),t==="json")return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t)))});const e=[`constructor${Cs(t,this.inputs)}`];return this.payable&&e.push("payable"),this.gas!=null&&e.push(`@${this.gas.toString()}`),e.join(" ")}static from(t){if(vr.isFragment(t))return t;if(typeof t=="string")try{return vr.from(fi(t))}catch{V(!1,"invalid constuctor fragment","obj",t)}else if(t instanceof Ge){Ar(t,ze(["constructor"]));const e=Er(t),r=!!Ar(t,_1).has("payable"),i=Nl(t);return Ri(t),new vr(re,"constructor",e,r,i)}return new vr(re,"constructor",t.inputs?t.inputs.map(Yt.from):[],!!t.payable,t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[ke]===jl}}class xr extends zi{payable;constructor(t,e,r){super(t,"fallback",e),Object.defineProperty(this,ke,{value:Gl}),zt(this,{payable:r})}format(t){const e=this.inputs.length===0?"receive":"fallback";if(t==="json"){const r=this.payable?"payable":"nonpayable";return JSON.stringify({type:e,stateMutability:r})}return`${e}()${this.payable?" payable":""}`}static from(t){if(xr.isFragment(t))return t;if(typeof t=="string")try{return xr.from(fi(t))}catch{V(!1,"invalid fallback fragment","obj",t)}else if(t instanceof Ge){const e=t.toString(),r=t.peekKeyword(ze(["fallback","receive"]));if(V(r,"type must be fallback or receive","obj",e),t.popKeyword(ze(["fallback","receive"]))==="receive"){const u=Er(t);return V(u.length===0,"receive cannot have arguments","obj.inputs",u),Ar(t,ze(["payable"])),Ri(t),new xr(re,[],!0)}let o=Er(t);o.length?V(o.length===1&&o[0].type==="bytes","invalid fallback inputs","obj.inputs",o.map(u=>u.format("minimal")).join(", ")):o=[Yt.from("bytes")];const a=Cl(t);if(V(a==="nonpayable"||a==="payable","fallback cannot be constants","obj.stateMutability",a),Ar(t,ze(["returns"])).has("returns")){const u=Er(t);V(u.length===1&&u[0].type==="bytes","invalid fallback outputs","obj.outputs",u.map(_=>_.format("minimal")).join(", "))}return Ri(t),new xr(re,o,a==="payable")}if(t.type==="receive")return new xr(re,[],!0);if(t.type==="fallback"){const e=[Yt.from("bytes")],r=t.stateMutability==="payable";return new xr(re,e,r)}V(!1,"invalid fallback description","obj",t)}static isFragment(t){return t&&t[ke]===Gl}}class cr extends Oo{constant;outputs;stateMutability;payable;gas;constructor(t,e,r,i,o,a){super(t,"function",e,i),Object.defineProperty(this,ke,{value:Hl}),o=Object.freeze(o.slice()),zt(this,{constant:r==="view"||r==="pure",gas:a,outputs:o,payable:r==="payable",stateMutability:r})}get selector(){return Ei(this.format("sighash")).substring(0,10)}format(t){if(t==null&&(t="sighash"),t==="json")return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:this.stateMutability!=="nonpayable"?this.stateMutability:void 0,payable:this.payable,gas:this.gas!=null?this.gas:void 0,inputs:this.inputs.map(r=>JSON.parse(r.format(t))),outputs:this.outputs.map(r=>JSON.parse(r.format(t)))});const e=[];return t!=="sighash"&&e.push("function"),e.push(this.name+Cs(t,this.inputs)),t!=="sighash"&&(this.stateMutability!=="nonpayable"&&e.push(this.stateMutability),this.outputs&&this.outputs.length&&(e.push("returns"),e.push(Cs(t,this.outputs))),this.gas!=null&&e.push(`@${this.gas.toString()}`)),e.join(" ")}static getSelector(t,e){return e=(e||[]).map(i=>Yt.from(i)),new cr(re,t,"view",e,[],null).selector}static from(t){if(cr.isFragment(t))return t;if(typeof t=="string")try{return cr.from(fi(t))}catch{V(!1,"invalid function fragment","obj",t)}else if(t instanceof Ge){const r=Io("function",t),i=Er(t),o=Cl(t);let a=[];Ar(t,ze(["returns"])).has("returns")&&(a=Er(t));const u=Nl(t);return Ri(t),new cr(re,r,o,i,a,u)}let e=t.stateMutability;return e==null&&(e="payable",typeof t.constant=="boolean"?(e="view",t.constant||(e="payable",typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable"))):typeof t.payable=="boolean"&&!t.payable&&(e="nonpayable")),new cr(re,t.name,e,t.inputs?t.inputs.map(Yt.from):[],t.outputs?t.outputs.map(Yt.from):[],t.gas!=null?t.gas:null)}static isFragment(t){return t&&t[ke]===Hl}}class Bi extends Oo{constructor(t,e,r){super(t,"struct",e,r),Object.defineProperty(this,ke,{value:Vl})}format(){throw new Error("@TODO")}static from(t){if(typeof t=="string")try{return Bi.from(fi(t))}catch{V(!1,"invalid struct fragment","obj",t)}else if(t instanceof Ge){const e=Io("struct",t),r=Er(t);return Ri(t),new Bi(re,e,r)}return new Bi(re,t.name,t.inputs?t.inputs.map(Yt.from):[])}static isFragment(t){return t&&t[ke]===Vl}}const Ze=new Map;Ze.set(0,"GENERIC_PANIC"),Ze.set(1,"ASSERT_FALSE"),Ze.set(17,"OVERFLOW"),Ze.set(18,"DIVIDE_BY_ZERO"),Ze.set(33,"ENUM_RANGE_ERROR"),Ze.set(34,"BAD_STORAGE_DATA"),Ze.set(49,"STACK_UNDERFLOW"),Ze.set(50,"ARRAY_RANGE_ERROR"),Ze.set(65,"OUT_OF_MEMORY"),Ze.set(81,"UNINITIALIZED_FUNCTION_CALL");const m1=new RegExp(/^bytes([0-9]*)$/),A1=new RegExp(/^(u?int)([0-9]*)$/);let $a=null,ql=1024;function E1(n,t,e,r){let i="missing revert data",o=null;const a=null;let u=null;if(e){i="execution reverted";const l=Ot(e);if(e=gt(e),l.length===0)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(l.length%32!==4)i+=" (could not decode reason; invalid data length)";else if(gt(l.slice(0,4))==="0x08c379a0")try{o=r.decode(["string"],l.slice(4))[0],u={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch{i+=" (could not decode reason; invalid string data)"}else if(gt(l.slice(0,4))==="0x4e487b71")try{const f=Number(r.decode(["uint256"],l.slice(4))[0]);u={signature:"Panic(uint256)",name:"Panic",args:[f]},o=`Panic due to ${Ze.get(f)||"UNKNOWN"}(${f})`,i+=`: ${o}`}catch{i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const _={to:t.to?Ut(t.to):null,data:t.data||"0x"};return t.from&&(_.from=Ut(t.from)),te(i,"CALL_EXCEPTION",{action:n,data:e,reason:o,transaction:_,invocation:a,revert:u})}class Si{#t(t){if(t.isArray())return new Hy(this.#t(t.arrayChildren),t.arrayLength,t.name);if(t.isTuple())return new mo(t.components.map(r=>this.#t(r)),t.name);switch(t.baseType){case"address":return new jy(t.name);case"bool":return new Vy(t.name);case"string":return new Xy(t.name);case"bytes":return new qy(t.name);case"":return new Wy(t.name)}let e=t.type.match(A1);if(e){let r=parseInt(e[2]||"256");return V(r!==0&&r<=256&&r%8===0,"invalid "+e[1]+" bit length","param",t),new Zy(r/8,e[1]==="int",t.name)}if(e=t.type.match(m1),e){let r=parseInt(e[1]);return V(r!==0&&r<=32,"invalid bytes length","param",t),new Qy(r,t.name)}V(!1,"invalid type","type",t.type)}getDefaultValue(t){const e=t.map(i=>this.#t(Yt.from(i)));return new mo(e,"_").defaultValue()}encode(t,e){A_(e.length,t.length,"types/values length mismatch");const r=t.map(a=>this.#t(Yt.from(a))),i=new mo(r,"_"),o=new wa;return i.encode(o,e),o.data}decode(t,e,r){const i=t.map(a=>this.#t(Yt.from(a)));return new mo(i,"_").decode(new da(e,r,ql))}static _setDefaultMaxInflation(t){V(typeof t=="number"&&Number.isInteger(t),"invalid defaultMaxInflation factor","value",t),ql=t}static defaultAbiCoder(){return $a==null&&($a=new Si),$a}static getBuiltinCallException(t,e,r){return E1(t,e,r,Si.defaultAbiCoder())}}class v1{fragment;name;signature;topic;args;constructor(t,e,r){const i=t.name,o=t.format();zt(this,{fragment:t,name:i,signature:o,topic:e,args:r})}}class x1{fragment;name;args;signature;selector;value;constructor(t,e,r,i){const o=t.name,a=t.format();zt(this,{fragment:t,name:o,args:r,signature:a,selector:e,value:i})}}class R1{fragment;name;args;signature;selector;constructor(t,e,r){const i=t.name,o=t.format();zt(this,{fragment:t,name:i,args:r,signature:o,selector:e})}}class Ql{hash;_isIndexed;static isIndexed(t){return!!(t&&t._isIndexed)}constructor(t){zt(this,{hash:t,_isIndexed:!0})}}const Kl={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},Wl={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:n=>`reverted with reason string ${JSON.stringify(n)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:n=>{let t="unknown panic code";return n>=0&&n<=255&&Kl[n.toString()]&&(t=Kl[n.toString()]),`reverted with panic code 0x${n.toString(16)} (${t})`}}};class Pi{fragments;deploy;fallback;receive;#t;#e;#r;#n;constructor(t){let e=[];typeof t=="string"?e=JSON.parse(t):e=t,this.#r=new Map,this.#t=new Map,this.#e=new Map;const r=[];for(const a of e)try{r.push(zi.from(a))}catch(u){console.log(`[Warning] Invalid Fragment ${JSON.stringify(a)}:`,u.message)}zt(this,{fragments:Object.freeze(r)});let i=null,o=!1;this.#n=this.getAbiCoder(),this.fragments.forEach((a,u)=>{let _;switch(a.type){case"constructor":if(this.deploy){console.log("duplicate definition - constructor");return}zt(this,{deploy:a});return;case"fallback":a.inputs.length===0?o=!0:(V(!i||a.payable!==i.payable,"conflicting fallback fragments",`fragments[${u}]`,a),i=a,o=i.payable);return;case"function":_=this.#r;break;case"event":_=this.#e;break;case"error":_=this.#t;break;default:return}const l=a.format();_.has(l)||_.set(l,a)}),this.deploy||zt(this,{deploy:vr.from("constructor()")}),zt(this,{fallback:i,receive:o})}format(t){const e=t?"minimal":"full";return this.fragments.map(i=>i.format(e))}formatJson(){const t=this.fragments.map(e=>e.format("json"));return JSON.stringify(t.map(e=>JSON.parse(e)))}getAbiCoder(){return Si.defaultAbiCoder()}#i(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#r.values())if(o===a.selector)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#r)a.split("(")[0]===t&&o.push(u);if(e){const a=e.length>0?e[e.length-1]:null;let u=e.length,_=!0;oe.isTyped(a)&&a.type==="overrides"&&(_=!1,u--);for(let l=o.length-1;l>=0;l--){const f=o[l].inputs.length;f!==u&&(!_||f!==u-1)&&o.splice(l,1)}for(let l=o.length-1;l>=0;l--){const f=o[l].inputs;for(let g=0;g<e.length;g++)if(oe.isTyped(e[g])){if(g>=f.length){if(e[g].type==="overrides")continue;o.splice(l,1);break}if(e[g].type!==f[g].baseType){o.splice(l,1);break}}}}if(o.length===1&&e&&e.length!==o[0].inputs.length){const a=e[e.length-1];(a==null||Array.isArray(a)||typeof a!="object")&&o.splice(0,1)}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");V(!1,`ambiguous function description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#r.get(cr.from(t).format());return i||null}getFunctionName(t){const e=this.#i(t,null,!1);return V(e,"no matching function","key",t),e.name}hasFunction(t){return!!this.#i(t,null,!1)}getFunction(t,e){return this.#i(t,e||null,!0)}forEachFunction(t){const e=Array.from(this.#r.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#r.get(i),r)}}#o(t,e,r){if($t(t)){const o=t.toLowerCase();for(const a of this.#e.values())if(o===a.topicHash)return a;return null}if(t.indexOf("(")===-1){const o=[];for(const[a,u]of this.#e)a.split("(")[0]===t&&o.push(u);if(e){for(let a=o.length-1;a>=0;a--)o[a].inputs.length<e.length&&o.splice(a,1);for(let a=o.length-1;a>=0;a--){const u=o[a].inputs;for(let _=0;_<e.length;_++)if(oe.isTyped(e[_])&&e[_].type!==u[_].baseType){o.splice(a,1);break}}}if(o.length===0)return null;if(o.length>1&&r){const a=o.map(u=>JSON.stringify(u.format())).join(", ");V(!1,`ambiguous event description (i.e. matches ${a})`,"key",t)}return o[0]}const i=this.#e.get(ar.from(t).format());return i||null}getEventName(t){const e=this.#o(t,null,!1);return V(e,"no matching event","key",t),e.name}hasEvent(t){return!!this.#o(t,null,!1)}getEvent(t,e){return this.#o(t,e||null,!0)}forEachEvent(t){const e=Array.from(this.#e.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#e.get(i),r)}}getError(t,e){if($t(t)){const i=t.toLowerCase();if(Wl[i])return Fe.from(Wl[i].signature);for(const o of this.#t.values())if(i===o.selector)return o;return null}if(t.indexOf("(")===-1){const i=[];for(const[o,a]of this.#t)o.split("(")[0]===t&&i.push(a);if(i.length===0)return t==="Error"?Fe.from("error Error(string)"):t==="Panic"?Fe.from("error Panic(uint256)"):null;if(i.length>1){const o=i.map(a=>JSON.stringify(a.format())).join(", ");V(!1,`ambiguous error description (i.e. ${o})`,"name",t)}return i[0]}if(t=Fe.from(t).format(),t==="Error(string)")return Fe.from("error Error(string)");if(t==="Panic(uint256)")return Fe.from("error Panic(uint256)");const r=this.#t.get(t);return r||null}forEachError(t){const e=Array.from(this.#t.keys());e.sort((r,i)=>r.localeCompare(i));for(let r=0;r<e.length;r++){const i=e[r];t(this.#t.get(i),r)}}_decodeParams(t,e){return this.#n.decode(t,e)}_encodeParams(t,e){return this.#n.encode(t,e)}encodeDeploy(t){return this._encodeParams(this.deploy.inputs,t||[])}decodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);V(r,"unknown error","fragment",t),t=r}return V(ie(e,0,4)===t.selector,`data signature does not match error ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeErrorResult(t,e){if(typeof t=="string"){const r=this.getError(t);V(r,"unknown error","fragment",t),t=r}return ne([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return V(ie(e,0,4)===t.selector,`data signature does not match function ${t.name}.`,"data",e),this._decodeParams(t.inputs,ie(e,4))}encodeFunctionData(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return ne([t.selector,this._encodeParams(t.inputs,e||[])])}decodeFunctionResult(t,e){if(typeof t=="string"){const o=this.getFunction(t);V(o,"unknown function","fragment",t),t=o}let r="invalid length for result data";const i=ve(e);if(i.length%32===0)try{return this.#n.decode(t.outputs,i)}catch{r="could not decode result data"}ut(!1,r,"BAD_DATA",{value:gt(i),info:{method:t.name,signature:t.format()}})}makeError(t,e){const r=Ot(t,"data"),i=Si.getBuiltinCallException("call",e,r);if(i.message.startsWith("execution reverted (unknown custom error)")){const u=gt(r.slice(0,4)),_=this.getError(u);if(_)try{const l=this.#n.decode(_.inputs,r.slice(4));i.revert={name:_.name,signature:_.format(),args:l},i.reason=i.revert.signature,i.message=`execution reverted: ${i.reason}`}catch{i.message="execution reverted (coult not decode custom error)"}}const a=this.parseTransaction(e);return a&&(i.invocation={method:a.name,signature:a.signature,args:a.args}),i}encodeFunctionResult(t,e){if(typeof t=="string"){const r=this.getFunction(t);V(r,"unknown function","fragment",t),t=r}return gt(this.#n.encode(t.outputs,e||[]))}encodeFilterTopics(t,e){if(typeof t=="string"){const o=this.getEvent(t);V(o,"unknown event","eventFragment",t),t=o}ut(e.length<=t.inputs.length,`too many arguments for ${t.format()}`,"UNEXPECTED_ARGUMENT",{count:e.length,expectedCount:t.inputs.length});const r=[];t.anonymous||r.push(t.topicHash);const i=(o,a)=>o.type==="string"?Ei(a):o.type==="bytes"?fe(gt(a)):(o.type==="bool"&&typeof a=="boolean"?a=a?"0x01":"0x00":o.type.match(/^u?int/)?a=ni(a):o.type.match(/^bytes/)?a=r0(a,32):o.type==="address"&&this.#n.encode(["address"],[a]),pr(gt(a),32));for(e.forEach((o,a)=>{const u=t.inputs[a];if(!u.indexed){V(o==null,"cannot filter non-indexed parameters; must be null","contract."+u.name,o);return}o==null?r.push(null):u.baseType==="array"||u.baseType==="tuple"?V(!1,"filtering with tuples or arrays not supported","contract."+u.name,o):Array.isArray(o)?r.push(o.map(_=>i(u,_))):r.push(i(u,o))});r.length&&r[r.length-1]===null;)r.pop();return r}encodeEventLog(t,e){if(typeof t=="string"){const a=this.getEvent(t);V(a,"unknown event","eventFragment",t),t=a}const r=[],i=[],o=[];return t.anonymous||r.push(t.topicHash),V(e.length===t.inputs.length,"event arguments/values mismatch","values",e),t.inputs.forEach((a,u)=>{const _=e[u];if(a.indexed)if(a.type==="string")r.push(Ei(_));else if(a.type==="bytes")r.push(fe(_));else{if(a.baseType==="tuple"||a.baseType==="array")throw new Error("not implemented");r.push(this.#n.encode([a.type],[_]))}else i.push(a),o.push(_)}),{data:this.#n.encode(i,o),topics:r}}decodeEventLog(t,e,r){if(typeof t=="string"){const B=this.getEvent(t);V(B,"unknown event","eventFragment",t),t=B}if(r!=null&&!t.anonymous){const B=t.topicHash;V($t(r[0],32)&&r[0].toLowerCase()===B,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const i=[],o=[],a=[];t.inputs.forEach((B,I)=>{B.indexed?B.type==="string"||B.type==="bytes"||B.baseType==="tuple"||B.baseType==="array"?(i.push(Yt.from({type:"bytes32",name:B.name})),a.push(!0)):(i.push(B),a.push(!1)):(o.push(B),a.push(!1))});const u=r!=null?this.#n.decode(i,ne(r)):null,_=this.#n.decode(o,e,!0),l=[],f=[];let g=0,y=0;return t.inputs.forEach((B,I)=>{let S=null;if(B.indexed)if(u==null)S=new Ql(null);else if(a[I])S=new Ql(u[y++]);else try{S=u[y++]}catch(T){S=T}else try{S=_[g++]}catch(T){S=T}l.push(S),f.push(B.name||null)}),dr.fromItems(l,f)}parseTransaction(t){const e=Ot(t.data,"tx.data"),r=mt(t.value!=null?t.value:0,"tx.value"),i=this.getFunction(gt(e.slice(0,4)));if(!i)return null;const o=this.#n.decode(i.inputs,e.slice(4));return new x1(i,i.selector,o,r)}parseCallResult(t){throw new Error("@TODO")}parseLog(t){const e=this.getEvent(t.topics[0]);return!e||e.anonymous?null:new v1(e,e.topicHash,this.decodeEventLog(e,t.data,t.topics))}parseError(t){const e=gt(t),r=this.getError(ie(e,0,4));if(!r)return null;const i=this.#n.decode(r.inputs,ie(e,4));return new R1(r,r.selector,i)}static from(t){return t instanceof Pi?t:typeof t=="string"?new Pi(JSON.parse(t)):typeof t.formatJson=="function"?new Pi(t.formatJson()):typeof t.format=="function"?new Pi(t.format("json")):new Pi(t)}}const Jl=BigInt(0);function ss(n){return n??null}function ce(n){return n==null?null:n.toString()}class $l{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(t,e,r){zt(this,{gasPrice:ss(t),maxFeePerGas:ss(e),maxPriorityFeePerGas:ss(r)})}toJSON(){const{gasPrice:t,maxFeePerGas:e,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:ce(t),maxFeePerGas:ce(e),maxPriorityFeePerGas:ce(r)}}}function To(n){const t={};n.to&&(t.to=n.to),n.from&&(t.from=n.from),n.data&&(t.data=gt(n.data));const e="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of e)!(i in n)||n[i]==null||(t[i]=mt(n[i],`request.${i}`));const r="type,nonce".split(/,/);for(const i of r)!(i in n)||n[i]==null||(t[i]=Tt(n[i],`request.${i}`));return n.accessList&&(t.accessList=mi(n.accessList)),n.authorizationList&&(t.authorizationList=n.authorizationList.slice()),"blockTag"in n&&(t.blockTag=n.blockTag),"enableCcipRead"in n&&(t.enableCcipRead=!!n.enableCcipRead),"customData"in n&&(t.customData=n.customData),"blobVersionedHashes"in n&&n.blobVersionedHashes&&(t.blobVersionedHashes=n.blobVersionedHashes.slice()),"kzg"in n&&(t.kzg=n.kzg),"blobs"in n&&n.blobs&&(t.blobs=n.blobs.map(i=>_a(i)?gt(i):Object.assign({},i))),t}class z1{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#t;constructor(t,e){this.#t=t.transactions.map(r=>typeof r!="string"?new Ls(r,e):r),zt(this,{provider:e,hash:ss(t.hash),number:t.number,timestamp:t.timestamp,parentHash:t.parentHash,parentBeaconBlockRoot:t.parentBeaconBlockRoot,nonce:t.nonce,difficulty:t.difficulty,gasLimit:t.gasLimit,gasUsed:t.gasUsed,blobGasUsed:t.blobGasUsed,excessBlobGas:t.excessBlobGas,miner:t.miner,prevRandao:ss(t.prevRandao),extraData:t.extraData,baseFeePerGas:ss(t.baseFeePerGas),stateRoot:t.stateRoot,receiptsRoot:t.receiptsRoot})}get transactions(){return this.#t.map(t=>typeof t=="string"?t:t.hash)}get prefetchedTransactions(){const t=this.#t.slice();return t.length===0?[]:(ut(typeof t[0]=="object","transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),t)}toJSON(){const{baseFeePerGas:t,difficulty:e,extraData:r,gasLimit:i,gasUsed:o,hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,parentBeaconBlockRoot:y,stateRoot:B,receiptsRoot:I,timestamp:S,transactions:T}=this;return{_type:"Block",baseFeePerGas:ce(t),difficulty:ce(e),extraData:r,gasLimit:ce(i),gasUsed:ce(o),blobGasUsed:ce(this.blobGasUsed),excessBlobGas:ce(this.excessBlobGas),hash:a,miner:u,prevRandao:_,nonce:l,number:f,parentHash:g,timestamp:S,parentBeaconBlockRoot:y,stateRoot:B,receiptsRoot:I,transactions:T}}[Symbol.iterator](){let t=0;const e=this.transactions;return{next:()=>t<this.length?{value:e[t++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#t.length}get date(){return this.timestamp==null?null:new Date(this.timestamp*1e3)}async getTransaction(t){let e;if(typeof t=="number")e=this.#t[t];else{const r=t.toLowerCase();for(const i of this.#t)if(typeof i=="string"){if(i!==r)continue;e=i;break}else{if(i.hash!==r)continue;e=i;break}}if(e==null)throw new Error("no such tx");return typeof e=="string"?await this.provider.getTransaction(e):e}getPrefetchedTransaction(t){const e=this.prefetchedTransactions;if(typeof t=="number")return e[t];t=t.toLowerCase();for(const r of e)if(r.hash===t)return r;V(!1,"no matching transaction","indexOrHash",t)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return B1(this)}}class Ns{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(t,e){this.provider=e;const r=Object.freeze(t.topics.slice());zt(this,{transactionHash:t.transactionHash,blockHash:t.blockHash,blockNumber:t.blockNumber,removed:t.removed,address:t.address,data:t.data,topics:r,index:t.index,transactionIndex:t.transactionIndex})}toJSON(){const{address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}=this;return{_type:"log",address:t,blockHash:e,blockNumber:r,data:i,index:o,removed:a,topics:u,transactionHash:_,transactionIndex:l}}async getBlock(){const t=await this.provider.getBlock(this.blockHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransaction(){const t=await this.provider.getTransaction(this.transactionHash);return ut(!!t,"failed to find transaction","UNKNOWN_ERROR",{}),t}async getTransactionReceipt(){const t=await this.provider.getTransactionReceipt(this.transactionHash);return ut(!!t,"failed to find transaction receipt","UNKNOWN_ERROR",{}),t}removedEvent(){return S1(this)}}class Yl{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#t;constructor(t,e){this.#t=Object.freeze(t.logs.map(i=>new Ns(i,e)));let r=Jl;t.effectiveGasPrice!=null?r=t.effectiveGasPrice:t.gasPrice!=null&&(r=t.gasPrice),zt(this,{provider:e,to:t.to,from:t.from,contractAddress:t.contractAddress,hash:t.hash,index:t.index,blockHash:t.blockHash,blockNumber:t.blockNumber,logsBloom:t.logsBloom,gasUsed:t.gasUsed,cumulativeGasUsed:t.cumulativeGasUsed,blobGasUsed:t.blobGasUsed,gasPrice:r,blobGasPrice:t.blobGasPrice,type:t.type,status:t.status,root:t.root})}get logs(){return this.#t}toJSON(){const{to:t,from:e,contractAddress:r,hash:i,index:o,blockHash:a,blockNumber:u,logsBloom:_,logs:l,status:f,root:g}=this;return{_type:"TransactionReceipt",blockHash:a,blockNumber:u,contractAddress:r,cumulativeGasUsed:ce(this.cumulativeGasUsed),from:e,gasPrice:ce(this.gasPrice),blobGasUsed:ce(this.blobGasUsed),blobGasPrice:ce(this.blobGasPrice),gasUsed:ce(this.gasUsed),hash:i,index:o,logs:l,logsBloom:_,root:g,status:f,to:t}}get length(){return this.logs.length}[Symbol.iterator](){let t=0;return{next:()=>t<this.length?{value:this.logs[t++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const t=await this.provider.getBlock(this.blockHash);if(t==null)throw new Error("TODO");return t}async getTransaction(){const t=await this.provider.getTransaction(this.hash);if(t==null)throw new Error("TODO");return t}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return Xl(this)}reorderedEvent(t){return ut(!t||t.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),Zl(this,t)}}class Ls{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#t;constructor(t,e){this.provider=e,this.blockNumber=t.blockNumber!=null?t.blockNumber:null,this.blockHash=t.blockHash!=null?t.blockHash:null,this.hash=t.hash,this.index=t.index,this.type=t.type,this.from=t.from,this.to=t.to||null,this.gasLimit=t.gasLimit,this.nonce=t.nonce,this.data=t.data,this.value=t.value,this.gasPrice=t.gasPrice,this.maxPriorityFeePerGas=t.maxPriorityFeePerGas!=null?t.maxPriorityFeePerGas:null,this.maxFeePerGas=t.maxFeePerGas!=null?t.maxFeePerGas:null,this.maxFeePerBlobGas=t.maxFeePerBlobGas!=null?t.maxFeePerBlobGas:null,this.chainId=t.chainId,this.signature=t.signature,this.accessList=t.accessList!=null?t.accessList:null,this.blobVersionedHashes=t.blobVersionedHashes!=null?t.blobVersionedHashes:null,this.authorizationList=t.authorizationList!=null?t.authorizationList:null,this.#t=-1}toJSON(){const{blockNumber:t,blockHash:e,index:r,hash:i,type:o,to:a,from:u,nonce:_,data:l,signature:f,accessList:g,blobVersionedHashes:y}=this;return{_type:"TransactionResponse",accessList:g,blockNumber:t,blockHash:e,blobVersionedHashes:y,chainId:ce(this.chainId),data:l,from:u,gasLimit:ce(this.gasLimit),gasPrice:ce(this.gasPrice),hash:i,maxFeePerGas:ce(this.maxFeePerGas),maxPriorityFeePerGas:ce(this.maxPriorityFeePerGas),maxFeePerBlobGas:ce(this.maxFeePerBlobGas),nonce:_,signature:f,to:a,index:r,type:o,value:ce(this.value)}}async getBlock(){let t=this.blockNumber;if(t==null){const r=await this.getTransaction();r&&(t=r.blockNumber)}if(t==null)return null;const e=this.provider.getBlock(t);if(e==null)throw new Error("TODO");return e}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(this.blockNumber==null){const{tx:e,blockNumber:r}=await Ee({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return e==null||e.blockNumber==null?0:r-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(t,e){const r=t??1,i=e??0;let o=this.#t,a=-1,u=o===-1;const _=async()=>{if(u)return null;const{blockNumber:y,nonce:B}=await Ee({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(B<this.nonce){o=y;return}if(u)return null;const I=await this.getTransaction();if(!(I&&I.blockNumber!=null))for(a===-1&&(a=o-3,a<this.#t&&(a=this.#t));a<=y;){if(u)return null;const S=await this.provider.getBlock(a,!0);if(S==null)return;for(const T of S)if(T===this.hash)return;for(let T=0;T<S.length;T++){const A=await S.getTransaction(T);if(A.from===this.from&&A.nonce===this.nonce){if(u)return null;const R=await this.provider.getTransactionReceipt(A.hash);if(R==null||y-R.blockNumber+1<r)return;let P="replaced";A.data===this.data&&A.to===this.to&&A.value===this.value?P="repriced":A.data==="0x"&&A.from===A.to&&A.value===Jl&&(P="cancelled"),ut(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:P==="replaced"||P==="cancelled",reason:P,replacement:A.replaceableTransaction(o),hash:A.hash,receipt:R})}}a++}},l=y=>{if(y==null||y.status!==0)return y;ut(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:y.to,from:y.from,data:""},receipt:y})},f=await this.provider.getTransactionReceipt(this.hash);if(r===0)return l(f);if(f){if(r===1||await f.confirmations()>=r)return l(f)}else if(await _(),r===0)return null;return await new Promise((y,B)=>{const I=[],S=()=>{I.forEach(A=>A())};if(I.push(()=>{u=!0}),i>0){const A=setTimeout(()=>{S(),B(te("wait for transaction timeout","TIMEOUT"))},i);I.push(()=>{clearTimeout(A)})}const T=async A=>{if(await A.confirmations()>=r){S();try{y(l(A))}catch(R){B(R)}}};if(I.push(()=>{this.provider.off(this.hash,T)}),this.provider.on(this.hash,T),o>=0){const A=async()=>{try{await _()}catch(R){if(me(R,"TRANSACTION_REPLACED")){S(),B(R);return}}u||this.provider.once("block",A)};I.push(()=>{this.provider.off("block",A)}),this.provider.once("block",A)}})}isMined(){return this.blockHash!=null}isLegacy(){return this.type===0}isBerlin(){return this.type===1}isLondon(){return this.type===2}isCancun(){return this.type===3}removedEvent(){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Xl(this)}reorderedEvent(t){return ut(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),ut(!t||t.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),Zl(this,t)}replaceableTransaction(t){V(Number.isInteger(t)&&t>=0,"invalid startBlock","startBlock",t);const e=new Ls(this,this.provider);return e.#t=t,e}}function B1(n){return{orphan:"drop-block",hash:n.hash,number:n.number}}function Zl(n,t){return{orphan:"reorder-transaction",tx:n,other:t}}function Xl(n){return{orphan:"drop-transaction",tx:n}}function S1(n){return{orphan:"drop-log",log:{transactionHash:n.transactionHash,blockHash:n.blockHash,blockNumber:n.blockNumber,address:n.address,data:n.data,topics:Object.freeze(n.topics.slice()),index:n.index}}}class Ya extends Ns{interface;fragment;args;constructor(t,e,r){super(t,t.provider);const i=e.decodeEventLog(r,t.data,t.topics);zt(this,{args:i,fragment:r,interface:e})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}class th extends Ns{error;constructor(t,e){super(t,t.provider),zt(this,{error:e})}}class P1 extends Yl{#t;constructor(t,e,r){super(r,e),this.#t=t}get logs(){return super.logs.map(t=>{const e=t.topics.length?this.#t.getEvent(t.topics[0]):null;if(e)try{return new Ya(t,this.#t,e)}catch(r){return new th(t,r)}return t})}}class Za extends Ls{#t;constructor(t,e,r){super(r,e),this.#t=t}async wait(t,e){const r=await super.wait(t,e);return r==null?null:new P1(this.#t,this.provider,r)}}class eh extends P_{log;constructor(t,e,r,i){super(t,e,r),zt(this,{log:i})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}class k1 extends eh{constructor(t,e,r,i,o){super(t,e,r,new Ya(o,t.interface,i));const a=t.interface.decodeEventLog(i,this.log.data,this.log.topics);zt(this,{args:a,fragment:i})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}const rh=BigInt(0);function nh(n){return n&&typeof n.call=="function"}function ih(n){return n&&typeof n.estimateGas=="function"}function Co(n){return n&&typeof n.resolveName=="function"}function sh(n){return n&&typeof n.sendTransaction=="function"}function oh(n){if(n!=null){if(Co(n))return n;if(n.provider)return n.provider}}class F1{#t;fragment;constructor(t,e,r){if(zt(this,{fragment:e}),e.inputs.length<r.length)throw new Error("too many arguments");const i=ki(t.runner,"resolveName"),o=Co(i)?i:null;this.#t=async function(){const a=await Promise.all(e.inputs.map((u,_)=>r[_]==null?null:u.walkAsync(r[_],(f,g)=>f==="address"?Array.isArray(g)?Promise.all(g.map(y=>Re(y,o))):Re(g,o):g)));return t.interface.encodeFilterTopics(e,a)}()}getTopicFilter(){return this.#t}}function ki(n,t){return n==null?null:typeof n[t]=="function"?n:n.provider&&typeof n.provider[t]=="function"?n.provider:null}function Fi(n){return n==null?null:n.provider||null}async function ah(n,t){const e=oe.dereference(n,"overrides");V(typeof e=="object","invalid overrides parameter","overrides",n);const r=To(e);return V(r.to==null||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",r.to),V(r.data==null||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",r.data),r.from&&(r.from=r.from),r}async function I1(n,t,e){const r=ki(n,"resolveName"),i=Co(r)?r:null;return await Promise.all(t.map((o,a)=>o.walkAsync(e[a],(u,_)=>(_=oe.dereference(_,u),u==="address"?Re(_,i):_))))}function O1(n){const t=async function(a){const u=await ah(a,["data"]);u.to=await n.getAddress(),u.from&&(u.from=await Re(u.from,oh(n.runner)));const _=n.interface,l=mt(u.value||rh,"overrides.value")===rh,f=(u.data||"0x")==="0x";_.fallback&&!_.fallback.payable&&_.receive&&!f&&!l&&V(!1,"cannot send data to receive or send value to non-payable fallback","overrides",a),V(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data);const g=_.receive||_.fallback&&_.fallback.payable;return V(g||l,"cannot send value to non-payable fallback","overrides.value",u.value),V(_.fallback||f,"cannot send data to receive-only contract","overrides.data",u.data),u},e=async function(a){const u=ki(n.runner,"call");ut(nh(u),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const _=await t(a);try{return await u.call(_)}catch(l){throw ua(l)&&l.data?n.interface.makeError(l.data,_):l}},r=async function(a){const u=n.runner;ut(sh(u),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const _=await u.sendTransaction(await t(a)),l=Fi(n.runner);return new Za(n.interface,l,_)},i=async function(a){const u=ki(n.runner,"estimateGas");return ut(ih(u),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await u.estimateGas(await t(a))},o=async a=>await r(a);return zt(o,{_contract:n,estimateGas:i,populateTransaction:t,send:r,staticCall:e}),o}function T1(n,t){const e=function(...l){const f=n.interface.getFunction(t,l);return ut(f,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:l}}),f},r=async function(...l){const f=e(...l);let g={};if(f.inputs.length+1===l.length&&(g=await ah(l.pop()),g.from&&(g.from=await Re(g.from,oh(n.runner)))),f.inputs.length!==l.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const y=await I1(n.runner,f.inputs,l);return Object.assign({},g,await Ee({to:n.getAddress(),data:n.interface.encodeFunctionData(f,y)}))},i=async function(...l){const f=await u(...l);return f.length===1?f[0]:f},o=async function(...l){const f=n.runner;ut(sh(f),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const g=await f.sendTransaction(await r(...l)),y=Fi(n.runner);return new Za(n.interface,y,g)},a=async function(...l){const f=ki(n.runner,"estimateGas");return ut(ih(f),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await f.estimateGas(await r(...l))},u=async function(...l){const f=ki(n.runner,"call");ut(nh(f),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const g=await r(...l);let y="0x";try{y=await f.call(g)}catch(I){throw ua(I)&&I.data?n.interface.makeError(I.data,g):I}const B=e(...l);return n.interface.decodeFunctionResult(B,y)},_=async(...l)=>e(...l).constant?await i(...l):await o(...l);return zt(_,{name:n.interface.getFunctionName(t),_contract:n,_key:t,getFragment:e,estimateGas:a,populateTransaction:r,send:o,staticCall:i,staticCallResult:u}),Object.defineProperty(_,"fragment",{configurable:!1,enumerable:!0,get:()=>{const l=n.interface.getFunction(t);return ut(l,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),l}}),_}function C1(n,t){const e=function(...i){const o=n.interface.getEvent(t,i);return ut(o,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:i}}),o},r=function(...i){return new F1(n,e(...i),i)};return zt(r,{name:n.interface.getEventName(t),_contract:n,_key:t,getFragment:e}),Object.defineProperty(r,"fragment",{configurable:!1,enumerable:!0,get:()=>{const i=n.interface.getEvent(t);return ut(i,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),i}}),r}const No=Symbol.for("_ethersInternal_contract"),ch=new WeakMap;function N1(n,t){ch.set(n[No],t)}function Ne(n){return ch.get(n[No])}function L1(n){return n&&typeof n=="object"&&"getTopicFilter"in n&&typeof n.getTopicFilter=="function"&&n.fragment}async function Xa(n,t){let e,r=null;if(Array.isArray(t)){const o=function(a){if($t(a,32))return a;const u=n.interface.getEvent(a);return V(u,"unknown fragment","name",a),u.topicHash};e=t.map(a=>a==null?null:Array.isArray(a)?a.map(o):o(a))}else t==="*"?e=[null]:typeof t=="string"?$t(t,32)?e=[t]:(r=n.interface.getEvent(t),V(r,"unknown fragment","event",t),e=[r.topicHash]):L1(t)?e=await t.getTopicFilter():"fragment"in t?(r=t.fragment,e=[r.topicHash]):V(!1,"unknown event name","event",t);e=e.map(o=>{if(o==null)return null;if(Array.isArray(o)){const a=Array.from(new Set(o.map(u=>u.toLowerCase())).values());return a.length===1?a[0]:(a.sort(),a)}return o.toLowerCase()});const i=e.map(o=>o==null?"null":Array.isArray(o)?o.join("|"):o).join("&");return{fragment:r,tag:i,topics:e}}async function Ds(n,t){const{subs:e}=Ne(n);return e.get((await Xa(n,t)).tag)||null}async function uh(n,t,e){const r=Fi(n.runner);ut(r,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:a}=await Xa(n,e),{addr:u,subs:_}=Ne(n);let l=_.get(o);if(!l){const g={address:u||n,topics:a},y=T=>{let A=i;if(A==null)try{A=n.interface.getEvent(T.topics[0])}catch{}if(A){const R=A,P=i?n.interface.decodeEventLog(i,T.data,T.topics):[];ec(n,e,P,z=>new k1(n,z,e,R,T))}else ec(n,e,[],R=>new eh(n,R,e,T))};let B=[];l={tag:o,listeners:[],start:()=>{B.length||B.push(r.on(g,y))},stop:async()=>{if(B.length==0)return;let T=B;B=[],await Promise.all(T),r.off(g,y)}},_.set(o,l)}return l}let tc=Promise.resolve();async function D1(n,t,e,r){await tc;const i=await Ds(n,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter(({listener:a,once:u})=>{const _=Array.from(e);r&&_.push(r(u?null:a));try{a.call(n,..._)}catch{}return!u}),i.listeners.length===0&&(i.stop(),Ne(n).subs.delete(i.tag)),o>0}async function ec(n,t,e,r){try{await tc}catch{}const i=D1(n,t,e,r);return tc=i,await i}const Lo=["then"];class Us{target;interface;runner;filters;[No];fallback;constructor(t,e,r,i){V(typeof t=="string"||Mf(t),"invalid value for Contract target","target",t),r==null&&(r=null);const o=Pi.from(e);zt(this,{target:t,runner:r,interface:o}),Object.defineProperty(this,No,{value:{}});let a,u=null,_=null;if(i){const g=Fi(r);_=new Za(this.interface,g,i)}let l=new Map;if(typeof t=="string")if($t(t))u=t,a=Promise.resolve(t);else{const g=ki(r,"resolveName");if(!Co(g))throw te("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});a=g.resolveName(t).then(y=>{if(y==null)throw te("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:t});return Ne(this).addr=y,y})}else a=t.getAddress().then(g=>{if(g==null)throw new Error("TODO");return Ne(this).addr=g,g});N1(this,{addrPromise:a,addr:u,deployTx:_,subs:l});const f=new Proxy({},{get:(g,y,B)=>{if(typeof y=="symbol"||Lo.indexOf(y)>=0)return Reflect.get(g,y,B);try{return this.getEvent(y)}catch(I){if(!me(I,"INVALID_ARGUMENT")||I.argument!=="key")throw I}},has:(g,y)=>Lo.indexOf(y)>=0?Reflect.has(g,y):Reflect.has(g,y)||this.interface.hasEvent(String(y))});return zt(this,{filters:f}),zt(this,{fallback:o.receive||o.fallback?O1(this):null}),new Proxy(this,{get:(g,y,B)=>{if(typeof y=="symbol"||y in g||Lo.indexOf(y)>=0)return Reflect.get(g,y,B);try{return g.getFunction(y)}catch(I){if(!me(I,"INVALID_ARGUMENT")||I.argument!=="key")throw I}},has:(g,y)=>typeof y=="symbol"||y in g||Lo.indexOf(y)>=0?Reflect.has(g,y):g.interface.hasFunction(y)})}connect(t){return new Us(this.target,this.interface,t)}attach(t){return new Us(t,this.interface,this.runner)}async getAddress(){return await Ne(this).addrPromise}async getDeployedCode(){const t=Fi(this.runner);ut(t,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const e=await t.getCode(await this.getAddress());return e==="0x"?null:e}async waitForDeployment(){const t=this.deploymentTransaction();if(t)return await t.wait(),this;if(await this.getDeployedCode()!=null)return this;const r=Fi(this.runner);return ut(r!=null,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise((i,o)=>{const a=async()=>{try{if(await this.getDeployedCode()!=null)return i(this);r.once("block",a)}catch(u){o(u)}};a()})}deploymentTransaction(){return Ne(this).deployTx}getFunction(t){return typeof t!="string"&&(t=t.format()),T1(this,t)}getEvent(t){return typeof t!="string"&&(t=t.format()),C1(this,t)}async queryTransaction(t){throw new Error("@TODO")}async queryFilter(t,e,r){e==null&&(e=0),r==null&&(r="latest");const{addr:i,addrPromise:o}=Ne(this),a=i||await o,{fragment:u,topics:_}=await Xa(this,t),l={address:a,topics:_,fromBlock:e,toBlock:r},f=Fi(this.runner);return ut(f,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await f.getLogs(l)).map(g=>{let y=u;if(y==null)try{y=this.interface.getEvent(g.topics[0])}catch{}if(y)try{return new Ya(g,this.interface,y)}catch(B){return new th(g,B)}return new Ns(g,f)})}async on(t,e){const r=await uh(this,"on",t);return r.listeners.push({listener:e,once:!1}),r.start(),this}async once(t,e){const r=await uh(this,"once",t);return r.listeners.push({listener:e,once:!0}),r.start(),this}async emit(t,...e){return await ec(this,t,e,null)}async listenerCount(t){if(t){const i=await Ds(this,t);return i?i.listeners.length:0}const{subs:e}=Ne(this);let r=0;for(const{listeners:i}of e.values())r+=i.length;return r}async listeners(t){if(t){const i=await Ds(this,t);return i?i.listeners.map(({listener:o})=>o):[]}const{subs:e}=Ne(this);let r=[];for(const{listeners:i}of e.values())r=r.concat(i.map(({listener:o})=>o));return r}async off(t,e){const r=await Ds(this,t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(e==null||r.listeners.length===0)&&(r.stop(),Ne(this).subs.delete(r.tag)),this}async removeAllListeners(t){if(t){const e=await Ds(this,t);if(!e)return this;e.stop(),Ne(this).subs.delete(e.tag)}else{const{subs:e}=Ne(this);for(const{tag:r,stop:i}of e.values())i(),e.delete(r)}return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return await this.off(t,e)}static buildClass(t){class e extends Us{constructor(i,o=null){super(i,t,o)}}return e}static from(t,e,r){return r==null&&(r=null),new this(t,e,r)}}function U1(){return Us}class Xe extends U1(){}function rc(n){return n.match(/^ipfs:\/\/ipfs\//i)?n=n.substring(12):n.match(/^ipfs:\/\//i)?n=n.substring(7):V(!1,"unsupported IPFS format","link",n),`https://gateway.ipfs.io/ipfs/${n}`}class M1{name;constructor(t){zt(this,{name:t})}connect(t){return this}supportsCoinType(t){return!1}async encodeAddress(t,e){throw new Error("unsupported coin")}async decodeAddress(t,e){throw new Error("unsupported coin")}}const _h=new RegExp("^(ipfs)://(.*)$","i"),fh=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),_h,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class os{provider;address;name;#t;#e;constructor(t,e,r){zt(this,{provider:t,address:e,name:r}),this.#t=null,this.#e=new Xe(e,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],t)}async supportsWildcard(){return this.#t==null&&(this.#t=(async()=>{try{return await this.#e.supportsInterface("0x9061b923")}catch(t){if(me(t,"CALL_EXCEPTION"))return!1;throw this.#t=null,t}})()),await this.#t}async#r(t,e){e=(e||[]).slice();const r=this.#e.interface;e.unshift(Ka(this.name));let i=null;await this.supportsWildcard()&&(i=r.getFunction(t),ut(i,"missing fragment","UNKNOWN_ERROR",{info:{funcName:t}}),e=[n1(this.name,255),r.encodeFunctionData(i,e)],t="resolve(bytes,bytes)"),e.push({enableCcipRead:!0});try{const o=await this.#e[t](...e);return i?r.decodeFunctionResult(i,o)[0]:o}catch(o){if(!me(o,"CALL_EXCEPTION"))throw o}return null}async getAddress(t){if(t==null&&(t=60),t===60)try{const o=await this.#r("addr(bytes32)");return o==null||o===Ss?null:o}catch(o){if(me(o,"CALL_EXCEPTION"))return null;throw o}if(t>=0&&t<2147483648){let o=t+2147483648;const a=await this.#r("addr(bytes32,uint)",[o]);if($t(a,20))return Ut(a)}let e=null;for(const o of this.provider.plugins)if(o instanceof M1&&o.supportsCoinType(t)){e=o;break}if(e==null)return null;const r=await this.#r("addr(bytes32,uint)",[t]);if(r==null||r==="0x")return null;const i=await e.decodeAddress(t,r);if(i!=null)return i;ut(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${t})`,info:{coinType:t,data:r}})}async getText(t){const e=await this.#r("text(bytes32,string)",[t]);return e==null||e==="0x"?null:e}async getContentHash(){const t=await this.#r("contenthash(bytes32)");if(t==null||t==="0x")return null;const e=t.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(e){const i=e[1]==="e3010170"?"ipfs":"ipns",o=parseInt(e[4],16);if(e[5].length===o*2)return`${i}://${s0("0x"+e[2])}`}const r=t.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&r[1].length===64)return`bzz://${r[1]}`;ut(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:t}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const t=[{type:"name",value:this.name}];try{const e=await this.getText("avatar");if(e==null)return t.push({type:"!avatar",value:""}),{url:null,linkage:t};t.push({type:"avatar",value:e});for(let r=0;r<fh.length;r++){const i=e.match(fh[r]);if(i==null)continue;const o=i[1].toLowerCase();switch(o){case"https":case"data":return t.push({type:"url",value:e}),{linkage:t,url:e};case"ipfs":{const a=rc(e);return t.push({type:"ipfs",value:e}),t.push({type:"url",value:a}),{linkage:t,url:a}}case"erc721":case"erc1155":{const a=o==="erc721"?"tokenURI(uint256)":"uri(uint256)";t.push({type:o,value:e});const u=await this.getAddress();if(u==null)return t.push({type:"!owner",value:""}),{url:null,linkage:t};const _=(i[2]||"").split("/");if(_.length!==2)return t.push({type:`!${o}caip`,value:i[2]||""}),{url:null,linkage:t};const l=_[1],f=new Xe(_[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if(o==="erc721"){const S=await f.ownerOf(l);if(u!==S)return t.push({type:"!owner",value:S}),{url:null,linkage:t};t.push({type:"owner",value:S})}else if(o==="erc1155"){const S=await f.balanceOf(u,l);if(!S)return t.push({type:"!balance",value:"0"}),{url:null,linkage:t};t.push({type:"balance",value:S.toString()})}let g=await f[a](l);if(g==null||g==="0x")return t.push({type:"!metadata-url",value:""}),{url:null,linkage:t};t.push({type:"metadata-url-base",value:g}),o==="erc1155"&&(g=g.replace("{id}",ni(l,32).substring(2)),t.push({type:"metadata-url-expanded",value:g})),g.match(/^ipfs:/i)&&(g=rc(g)),t.push({type:"metadata-url",value:g});let y={};const B=await new sr(g).send();B.assertOk();try{y=B.bodyJson}catch{try{t.push({type:"!metadata",value:B.bodyText})}catch{const A=B.body;return A&&t.push({type:"!metadata",value:gt(A)}),{url:null,linkage:t}}return{url:null,linkage:t}}if(!y)return t.push({type:"!metadata",value:""}),{url:null,linkage:t};t.push({type:"metadata",value:JSON.stringify(y)});let I=y.image;if(typeof I!="string")return t.push({type:"!imageUrl",value:""}),{url:null,linkage:t};if(!I.match(/^(https:\/\/|data:)/i)){if(I.match(_h)==null)return t.push({type:"!imageUrl-ipfs",value:I}),{url:null,linkage:t};t.push({type:"imageUrl-ipfs",value:I}),I=rc(I)}return t.push({type:"url",value:I}),{linkage:t,url:I}}}}}catch{}return{linkage:t,url:null}}static async getEnsAddress(t){const e=await t.getNetwork(),r=e.getPlugin("org.ethers.plugins.network.Ens");return ut(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:e}}),r.address}static async#n(t,e){const r=await os.getEnsAddress(t);try{const o=await new Xe(r,["function resolver(bytes32) view returns (address)"],t).resolver(Ka(e),{enableCcipRead:!0});return o===Ss?null:o}catch(i){throw i}return null}static async fromName(t,e){let r=e;for(;;){if(r===""||r==="."||e!=="eth"&&r==="eth")return null;const i=await os.#n(t,r);if(i!=null){const o=new os(t,i,e);return r!==e&&!await o.supportsWildcard()?null:o}r=r.split(".").slice(1).join(".")}}}const lh=BigInt(0);function Lt(n,t){return function(e){return e==null?t:n(e)}}function Ms(n,t){return e=>{if(t&&e==null)return null;if(!Array.isArray(e))throw new Error("not an array");return e.map(r=>n(r))}}function js(n,t){return e=>{const r={};for(const i in n){let o=i;if(t&&i in t&&!(o in e)){for(const a of t[i])if(a in e){o=a;break}}try{const a=n[i](e[o]);a!==void 0&&(r[i]=a)}catch(a){const u=a instanceof Error?a.message:"not-an-error";ut(!1,`invalid value for value.${i} (${u})`,"BAD_DATA",{value:e})}}return r}}function j1(n){switch(n){case!0:case"true":return!0;case!1:case"false":return!1}V(!1,`invalid boolean; ${JSON.stringify(n)}`,"value",n)}function as(n){return V($t(n,!0),"invalid data","value",n),n}function Ae(n){return V($t(n,32),"invalid hash","value",n),n}const G1=js({address:Ut,blockHash:Ae,blockNumber:Tt,data:as,index:Tt,removed:Lt(j1,!1),topics:Ms(Ae),transactionHash:Ae,transactionIndex:Tt},{index:["logIndex"]});function H1(n){return G1(n)}const V1=js({hash:Lt(Ae),parentHash:Ae,parentBeaconBlockRoot:Lt(Ae,null),number:Tt,timestamp:Tt,nonce:Lt(as),difficulty:mt,gasLimit:mt,gasUsed:mt,stateRoot:Lt(Ae,null),receiptsRoot:Lt(Ae,null),blobGasUsed:Lt(mt,null),excessBlobGas:Lt(mt,null),miner:Lt(Ut),prevRandao:Lt(Ae,null),extraData:as,baseFeePerGas:Lt(mt)},{prevRandao:["mixHash"]});function q1(n){const t=V1(n);return t.transactions=n.transactions.map(e=>typeof e=="string"?e:hh(e)),t}const Q1=js({transactionIndex:Tt,blockNumber:Tt,transactionHash:Ae,address:Ut,topics:Ms(Ae),data:as,index:Tt,blockHash:Ae},{index:["logIndex"]});function K1(n){return Q1(n)}const W1=js({to:Lt(Ut,null),from:Lt(Ut,null),contractAddress:Lt(Ut,null),index:Tt,root:Lt(gt),gasUsed:mt,blobGasUsed:Lt(mt,null),logsBloom:Lt(as),blockHash:Ae,hash:Ae,logs:Ms(K1),blockNumber:Tt,cumulativeGasUsed:mt,effectiveGasPrice:Lt(mt),blobGasPrice:Lt(mt,null),status:Lt(Tt),type:Lt(Tt,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function J1(n){return W1(n)}function hh(n){n.to&&mt(n.to)===lh&&(n.to="0x0000000000000000000000000000000000000000");const t=js({hash:Ae,index:Lt(Tt,void 0),type:e=>e==="0x"||e==null?0:Tt(e),accessList:Lt(mi,null),blobVersionedHashes:Lt(Ms(Ae,!0),null),authorizationList:Lt(Ms(e=>{let r;if(e.signature)r=e.signature;else{let i=e.yParity;i==="0x1b"?i=0:i==="0x1c"&&(i=1),r=Object.assign({},e,{yParity:i})}return{address:Ut(e.address),chainId:mt(e.chainId),nonce:mt(e.nonce),signature:se.from(r)}},!1),null),blockHash:Lt(Ae,null),blockNumber:Lt(Tt,null),transactionIndex:Lt(Tt,null),from:Ut,gasPrice:Lt(mt),maxPriorityFeePerGas:Lt(mt),maxFeePerGas:Lt(mt),maxFeePerBlobGas:Lt(mt,null),gasLimit:mt,to:Lt(Ut,null),value:mt,nonce:Tt,data:as,creates:Lt(Ut,null),chainId:Lt(mt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(n);if(t.to==null&&t.creates==null&&(t.creates=My(t)),(n.type===1||n.type===2)&&n.accessList==null&&(t.accessList=[]),n.signature?t.signature=se.from(n.signature):t.signature=se.from(n),t.chainId==null){const e=t.signature.legacyChainId;e!=null&&(t.chainId=e)}return t.blockHash&&mt(t.blockHash)===lh&&(t.blockHash=null),t}const $1="0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e";class Gs{name;constructor(t){zt(this,{name:t})}clone(){return new Gs(this.name)}}class Do extends Gs{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(t,e){t==null&&(t=0),super(`org.ethers.network.plugins.GasCost#${t||0}`);const r={effectiveBlock:t};function i(o,a){let u=(e||{})[o];u==null&&(u=a),V(typeof u=="number",`invalud value for ${o}`,"costs",e),r[o]=u}i("txBase",21e3),i("txCreate",32e3),i("txDataZero",4),i("txDataNonzero",16),i("txAccessListStorageKey",1900),i("txAccessListAddress",2400),zt(this,r)}clone(){return new Do(this.effectiveBlock,this)}}class Uo extends Gs{address;targetNetwork;constructor(t,e){super("org.ethers.plugins.network.Ens"),zt(this,{address:t||$1,targetNetwork:e??1})}clone(){return new Uo(this.address,this.targetNetwork)}}class Y1 extends Gs{#t;#e;get url(){return this.#t}get processFunc(){return this.#e}constructor(t,e){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#t=t,this.#e=e}clone(){return this}}const nc=new Map;class Le{#t;#e;#r;constructor(t,e){this.#t=t,this.#e=mt(e),this.#r=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#t}set name(t){this.#t=t}get chainId(){return this.#e}set chainId(t){this.#e=mt(t,"chainId")}matches(t){if(t==null)return!1;if(typeof t=="string"){try{return this.chainId===mt(t)}catch{}return this.name===t}if(typeof t=="number"||typeof t=="bigint"){try{return this.chainId===mt(t)}catch{}return!1}if(typeof t=="object"){if(t.chainId!=null){try{return this.chainId===mt(t.chainId)}catch{}return!1}return t.name!=null?this.name===t.name:!1}return!1}get plugins(){return Array.from(this.#r.values())}attachPlugin(t){if(this.#r.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#r.set(t.name,t.clone()),this}getPlugin(t){return this.#r.get(t)||null}getPlugins(t){return this.plugins.filter(e=>e.name.split("#")[0]===t)}clone(){const t=new Le(this.name,this.chainId);return this.plugins.forEach(e=>{t.attachPlugin(e.clone())}),t}computeIntrinsicGas(t){const e=this.getPlugin("org.ethers.plugins.network.GasCost")||new Do;let r=e.txBase;if(t.to==null&&(r+=e.txCreate),t.data)for(let i=2;i<t.data.length;i+=2)t.data.substring(i,i+2)==="00"?r+=e.txDataZero:r+=e.txDataNonzero;if(t.accessList){const i=mi(t.accessList);for(const o in i)r+=e.txAccessListAddress+e.txAccessListStorageKey*i[o].storageKeys.length}return r}static from(t){if(Z1(),t==null)return Le.from("mainnet");if(typeof t=="number"&&(t=BigInt(t)),typeof t=="string"||typeof t=="bigint"){const e=nc.get(t);if(e)return e();if(typeof t=="bigint")return new Le("unknown",t);V(!1,"unknown network","network",t)}if(typeof t.clone=="function")return t.clone();if(typeof t=="object"){V(typeof t.name=="string"&&typeof t.chainId=="number","invalid network object name or chainId","network",t);const e=new Le(t.name,t.chainId);return(t.ensAddress||t.ensNetwork!=null)&&e.attachPlugin(new Uo(t.ensAddress,t.ensNetwork)),e}V(!1,"invalid network","network",t)}static register(t,e){typeof t=="number"&&(t=BigInt(t));const r=nc.get(t);r&&V(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",t),nc.set(t,e)}}function ph(n,t){const e=String(n);if(!e.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${n}`);const r=e.split(".");if(r.length===1&&r.push(""),r.length!==2)throw new Error(`invalid gwei value: ${n}`);for(;r[1].length<t;)r[1]+="0";if(r[1].length>9){let i=BigInt(r[1].substring(0,9));r[1].substring(9).match(/^0+$/)||i++,r[1]=i.toString()}return BigInt(r[0]+r[1])}function wh(n){return new Y1(n,async(t,e,r)=>{r.setHeader("User-Agent","ethers");let i;try{const[o,a]=await Promise.all([r.send(),t()]);i=o;const u=i.bodyJson.standard;return{gasPrice:a.gasPrice,maxFeePerGas:ph(u.maxFee,9),maxPriorityFeePerGas:ph(u.maxPriorityFee,9)}}catch(o){ut(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:i,error:o})}})}let dh=!1;function Z1(){if(dh)return;dh=!0;function n(t,e,r){const i=function(){const o=new Le(t,e);return r.ensNetwork!=null&&o.attachPlugin(new Uo(null,r.ensNetwork)),o.attachPlugin(new Do),(r.plugins||[]).forEach(a=>{o.attachPlugin(a)}),o};Le.register(t,i),Le.register(e,i),r.altNames&&r.altNames.forEach(o=>{Le.register(o,i)})}n("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),n("ropsten",3,{ensNetwork:3}),n("rinkeby",4,{ensNetwork:4}),n("goerli",5,{ensNetwork:5}),n("kovan",42,{ensNetwork:42}),n("sepolia",11155111,{ensNetwork:11155111}),n("holesky",17e3,{ensNetwork:17e3}),n("classic",61,{}),n("classicKotti",6,{}),n("arbitrum",42161,{ensNetwork:1}),n("arbitrum-goerli",421613,{}),n("arbitrum-sepolia",421614,{}),n("base",8453,{ensNetwork:1}),n("base-goerli",84531,{}),n("base-sepolia",84532,{}),n("bnb",56,{ensNetwork:1}),n("bnbt",97,{}),n("linea",59144,{ensNetwork:1}),n("linea-goerli",59140,{}),n("linea-sepolia",59141,{}),n("matic",137,{ensNetwork:1,plugins:[wh("https://gasstation.polygon.technology/v2")]}),n("matic-amoy",80002,{}),n("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[wh("https://gasstation-testnet.polygon.technology/v2")]}),n("optimism",10,{ensNetwork:1,plugins:[]}),n("optimism-goerli",420,{}),n("optimism-sepolia",11155420,{}),n("xdai",100,{ensNetwork:1})}function ic(n){return JSON.parse(JSON.stringify(n))}class X1{#t;#e;#r;#n;constructor(t){this.#t=t,this.#e=null,this.#r=4e3,this.#n=-2}get pollingInterval(){return this.#r}set pollingInterval(t){this.#r=t}async#i(){try{const t=await this.#t.getBlockNumber();if(this.#n===-2){this.#n=t;return}if(t!==this.#n){for(let e=this.#n+1;e<=t;e++){if(this.#e==null)return;await this.#t.emit("block",e)}this.#n=t}}catch{}this.#e!=null&&(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r))}start(){this.#e||(this.#e=this.#t._setTimeout(this.#i.bind(this),this.#r),this.#i())}stop(){this.#e&&(this.#t._clearTimeout(this.#e),this.#e=null)}pause(t){this.stop(),t&&(this.#n=-2)}resume(){this.start()}}class sc{#t;#e;#r;constructor(t){this.#t=t,this.#r=!1,this.#e=e=>{this._poll(e,this.#t)}}async _poll(t,e){throw new Error("sub-classes must override this")}start(){this.#r||(this.#r=!0,this.#e(-2),this.#t.on("block",this.#e))}stop(){this.#r&&(this.#r=!1,this.#t.off("block",this.#e))}pause(t){this.stop()}resume(){this.start()}}class tm extends sc{#t;#e;constructor(t,e){super(t),this.#t=e,this.#e=-2}pause(t){t&&(this.#e=-2),super.pause(t)}async _poll(t,e){const r=await e.getBlock(this.#t);r!=null&&(this.#e===-2?this.#e=r.number:r.number>this.#e&&(e.emit(this.#t,r.number),this.#e=r.number))}}class em extends sc{#t;constructor(t,e){super(t),this.#t=ic(e)}async _poll(t,e){throw new Error("@TODO")}}class rm extends sc{#t;constructor(t,e){super(t),this.#t=e}async _poll(t,e){const r=await e.getTransactionReceipt(this.#t);r&&e.emit(this.#t,r)}}class oc{#t;#e;#r;#n;#i;constructor(t,e){this.#t=t,this.#e=ic(e),this.#r=this.#o.bind(this),this.#n=!1,this.#i=-2}async#o(t){if(this.#i===-2)return;const e=ic(this.#e);e.fromBlock=this.#i+1,e.toBlock=t;const r=await this.#t.getLogs(e);if(r.length===0){this.#i<t-60&&(this.#i=t-60);return}for(const i of r)this.#t.emit(this.#e,i),this.#i=i.blockNumber}start(){this.#n||(this.#n=!0,this.#i===-2&&this.#t.getBlockNumber().then(t=>{this.#i=t}),this.#t.on("block",this.#r))}stop(){this.#n&&(this.#n=!1,this.#t.off("block",this.#r))}pause(t){this.stop(),t&&(this.#i=-2)}resume(){this.start()}}const nm=BigInt(2),im=10;function Mo(n){return n&&typeof n.then=="function"}function jo(n,t){return n+":"+JSON.stringify(t,(e,r)=>{if(r==null)return"null";if(typeof r=="bigint")return`bigint:${r.toString()}`;if(typeof r=="string")return r.toLowerCase();if(typeof r=="object"&&!Array.isArray(r)){const i=Object.keys(r);return i.sort(),i.reduce((o,a)=>(o[a]=r[a],o),{})}return r})}class gh{name;constructor(t){zt(this,{name:t})}start(){}stop(){}pause(t){}resume(){}}function sm(n){return JSON.parse(JSON.stringify(n))}function ac(n){return n=Array.from(new Set(n).values()),n.sort(),n}async function cc(n,t){if(n==null)throw new Error("invalid event");if(Array.isArray(n)&&(n={topics:n}),typeof n=="string")switch(n){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:n,tag:n}}if($t(n,32)){const e=n.toLowerCase();return{type:"transaction",tag:jo("tx",{hash:e}),hash:e}}if(n.orphan){const e=n;return{type:"orphan",tag:jo("orphan",e),filter:sm(e)}}if(n.address||n.topics){const e=n,r={topics:(e.topics||[]).map(i=>i==null?null:Array.isArray(i)?ac(i.map(o=>o.toLowerCase())):i.toLowerCase())};if(e.address){const i=[],o=[],a=u=>{$t(u)?i.push(u):o.push((async()=>{i.push(await Re(u,t))})())};Array.isArray(e.address)?e.address.forEach(a):a(e.address),o.length&&await Promise.all(o),r.address=ac(i.map(u=>u.toLowerCase()))}return{filter:r,tag:jo("event",r),type:"event"}}V(!1,"unknown ProviderEvent","event",n)}function uc(){return new Date().getTime()}const om={cacheTimeout:250,pollingInterval:4e3};class am{#t;#e;#r;#n;#i;#o;#s;#a;#h;#u;#p;#w;constructor(t,e){if(this.#w=Object.assign({},om,e||{}),t==="any")this.#o=!0,this.#i=null;else if(t){const r=Le.from(t);this.#o=!1,this.#i=Promise.resolve(r),setTimeout(()=>{this.emit("network",r,null)},0)}else this.#o=!1,this.#i=null;this.#a=-1,this.#s=new Map,this.#t=new Map,this.#e=new Map,this.#r=null,this.#n=!1,this.#h=1,this.#u=new Map,this.#p=!1}get pollingInterval(){return this.#w.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#e.values())}attachPlugin(t){if(this.#e.get(t.name))throw new Error(`cannot replace existing plugin: ${t.name} `);return this.#e.set(t.name,t.connect(this)),this}getPlugin(t){return this.#e.get(t)||null}get disableCcipRead(){return this.#p}set disableCcipRead(t){this.#p=!!t}async#c(t){const e=this.#w.cacheTimeout;if(e<0)return await this._perform(t);const r=jo(t.method,t);let i=this.#s.get(r);return i||(i=this._perform(t),this.#s.set(r,i),setTimeout(()=>{this.#s.get(r)===i&&this.#s.delete(r)},e)),await i}async ccipReadFetch(t,e,r){if(this.disableCcipRead||r.length===0||t.to==null)return null;const i=t.to.toLowerCase(),o=e.toLowerCase(),a=[];for(let u=0;u<r.length;u++){const _=r[u],l=_.replace("{sender}",i).replace("{data}",o),f=new sr(l);_.indexOf("{data}")===-1&&(f.body={data:o,sender:i}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:f,index:u,urls:r});let g="unknown error",y;try{y=await f.send()}catch(B){a.push(B.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:{error:B}});continue}try{const B=y.bodyJson;if(B.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:f,result:B}),B.data;B.message&&(g=B.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:f,result:B})}catch{}ut(y.statusCode<400||y.statusCode>=500,`response not found during CCIP fetch: ${g}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:t,info:{url:_,errorMessage:g}}),a.push(g)}ut(!1,`error encountered during CCIP fetch: ${a.map(u=>JSON.stringify(u)).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:t,info:{urls:r,errorMessages:a}})}_wrapBlock(t,e){return new z1(q1(t),this)}_wrapLog(t,e){return new Ns(H1(t),this)}_wrapTransactionReceipt(t,e){return new Yl(J1(t),this)}_wrapTransactionResponse(t,e){return new Ls(hh(t),this)}_detectNetwork(){ut(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(t){ut(!1,`unsupported method: ${t.method}`,"UNSUPPORTED_OPERATION",{operation:t.method,info:t})}async getBlockNumber(){const t=Tt(await this.#c({method:"getBlockNumber"}),"%response");return this.#a>=0&&(this.#a=t),t}_getAddress(t){return Re(t,this)}_getBlockTag(t){if(t==null)return"latest";switch(t){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return t}if($t(t))return $t(t,32)?t:Je(t);if(typeof t=="bigint"&&(t=Tt(t,"blockTag")),typeof t=="number")return t>=0?Je(t):this.#a>=0?Je(this.#a+t):this.getBlockNumber().then(e=>Je(e+t));V(!1,"invalid blockTag","blockTag",t)}_getFilter(t){const e=(t.topics||[]).map(_=>_==null?null:Array.isArray(_)?ac(_.map(l=>l.toLowerCase())):_.toLowerCase()),r="blockHash"in t?t.blockHash:void 0,i=(_,l,f)=>{let g;switch(_.length){case 0:break;case 1:g=_[0];break;default:_.sort(),g=_}if(r&&(l!=null||f!=null))throw new Error("invalid filter");const y={};return g&&(y.address=g),e.length&&(y.topics=e),l&&(y.fromBlock=l),f&&(y.toBlock=f),r&&(y.blockHash=r),y};let o=[];if(t.address)if(Array.isArray(t.address))for(const _ of t.address)o.push(this._getAddress(_));else o.push(this._getAddress(t.address));let a;"fromBlock"in t&&(a=this._getBlockTag(t.fromBlock));let u;return"toBlock"in t&&(u=this._getBlockTag(t.toBlock)),o.filter(_=>typeof _!="string").length||a!=null&&typeof a!="string"||u!=null&&typeof u!="string"?Promise.all([Promise.all(o),a,u]).then(_=>i(_[0],_[1],_[2])):i(o,a,u)}_getTransactionRequest(t){const e=To(t),r=[];if(["to","from"].forEach(i=>{if(e[i]==null)return;const o=Re(e[i],this);Mo(o)?r.push(async function(){e[i]=await o}()):e[i]=o}),e.blockTag!=null){const i=this._getBlockTag(e.blockTag);Mo(i)?r.push(async function(){e.blockTag=await i}()):e.blockTag=i}return r.length?async function(){return await Promise.all(r),e}():e}async getNetwork(){if(this.#i==null){const i=(async()=>{try{const o=await this._detectNetwork();return this.emit("network",o,null),o}catch(o){throw this.#i===i&&(this.#i=null),o}})();return this.#i=i,(await i).clone()}const t=this.#i,[e,r]=await Promise.all([t,this._detectNetwork()]);return e.chainId!==r.chainId&&(this.#o?(this.emit("network",r,e),this.#i===t&&(this.#i=Promise.resolve(r))):ut(!1,`network changed: ${e.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),e.clone()}async getFeeData(){const t=await this.getNetwork(),e=async()=>{const{_block:i,gasPrice:o,priorityFee:a}=await Ee({_block:this.#g("latest",!1),gasPrice:(async()=>{try{const f=await this.#c({method:"getGasPrice"});return mt(f,"%response")}catch{}return null})(),priorityFee:(async()=>{try{const f=await this.#c({method:"getPriorityFee"});return mt(f,"%response")}catch{}return null})()});let u=null,_=null;const l=this._wrapBlock(i,t);return l&&l.baseFeePerGas&&(_=a??BigInt("1000000000"),u=l.baseFeePerGas*nm+_),new $l(o,u,_)},r=t.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const i=new sr(r.url),o=await r.processFunc(e,this,i);return new $l(o.gasPrice,o.maxFeePerGas,o.maxPriorityFeePerGas)}return await e()}async estimateGas(t){let e=this._getTransactionRequest(t);return Mo(e)&&(e=await e),mt(await this.#c({method:"estimateGas",transaction:e}),"%response")}async#_(t,e,r){ut(r<im,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},t,{blockTag:e,enableCcipRead:!0})});const i=To(t);try{return gt(await this._perform({method:"call",transaction:i,blockTag:e}))}catch(o){if(!this.disableCcipRead&&ua(o)&&o.data&&r>=0&&e==="latest"&&i.to!=null&&ie(o.data,0,4)==="0x556f1830"){const a=o.data,u=await Re(i.to,this);let _;try{_=lm(ie(o.data,4))}catch(g){ut(!1,g.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:a}})}ut(_.sender.toLowerCase()===u.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:a,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:_.errorArgs}});const l=await this.ccipReadFetch(i,_.calldata,_.urls);ut(l!=null,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:o.data,errorArgs:_.errorArgs}});const f={to:u,data:ne([_.selector,fm([l,_.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:f});try{const g=await this.#_(f,e,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},f),result:g}),g}catch(g){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},f),error:g}),g}}throw o}}async#f(t){const{value:e}=await Ee({network:this.getNetwork(),value:t});return e}async call(t){const{tx:e,blockTag:r}=await Ee({tx:this._getTransactionRequest(t),blockTag:this._getBlockTag(t.blockTag)});return await this.#f(this.#_(e,r,t.enableCcipRead?0:-1))}async#l(t,e,r){let i=this._getAddress(e),o=this._getBlockTag(r);return(typeof i!="string"||typeof o!="string")&&([i,o]=await Promise.all([i,o])),await this.#f(this.#c(Object.assign(t,{address:i,blockTag:o})))}async getBalance(t,e){return mt(await this.#l({method:"getBalance"},t,e),"%response")}async getTransactionCount(t,e){return Tt(await this.#l({method:"getTransactionCount"},t,e),"%response")}async getCode(t,e){return gt(await this.#l({method:"getCode"},t,e))}async getStorage(t,e,r){const i=mt(e,"position");return gt(await this.#l({method:"getStorage",position:i},t,r))}async broadcastTransaction(t){const{blockNumber:e,hash:r,network:i}=await Ee({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:t}),network:this.getNetwork()}),o=Ye.from(t);if(o.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(o,i).replaceableTransaction(e)}async#g(t,e){if($t(t,32))return await this.#c({method:"getBlock",blockHash:t,includeTransactions:e});let r=this._getBlockTag(t);return typeof r!="string"&&(r=await r),await this.#c({method:"getBlock",blockTag:r,includeTransactions:e})}async getBlock(t,e){const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#g(t,!!e)});return i==null?null:this._wrapBlock(i,r)}async getTransaction(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransaction",hash:t})});return r==null?null:this._wrapTransactionResponse(r,e)}async getTransactionReceipt(t){const{network:e,params:r}=await Ee({network:this.getNetwork(),params:this.#c({method:"getTransactionReceipt",hash:t})});if(r==null)return null;if(r.gasPrice==null&&r.effectiveGasPrice==null){const i=await this.#c({method:"getTransaction",hash:t});if(i==null)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=i.gasPrice}return this._wrapTransactionReceipt(r,e)}async getTransactionResult(t){const{result:e}=await Ee({network:this.getNetwork(),result:this.#c({method:"getTransactionResult",hash:t})});return e==null?null:gt(e)}async getLogs(t){let e=this._getFilter(t);Mo(e)&&(e=await e);const{network:r,params:i}=await Ee({network:this.getNetwork(),params:this.#c({method:"getLogs",filter:e})});return i.map(o=>this._wrapLog(o,r))}_getProvider(t){ut(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(t){return await os.fromName(this,t)}async getAvatar(t){const e=await this.getResolver(t);return e?await e.getAvatar():null}async resolveName(t){const e=await this.getResolver(t);return e?await e.getAddress():null}async lookupAddress(t){t=Ut(t);const e=Ka(t.substring(2).toLowerCase()+".addr.reverse");try{const r=await os.getEnsAddress(this),o=await new Xe(r,["function resolver(bytes32) view returns (address)"],this).resolver(e);if(o==null||o===Ss)return null;const u=await new Xe(o,["function name(bytes32) view returns (string)"],this).name(e);return await this.resolveName(u)!==t?null:u}catch(r){if(me(r,"BAD_DATA")&&r.value==="0x"||me(r,"CALL_EXCEPTION"))return null;throw r}return null}async waitForTransaction(t,e,r){const i=e??1;return i===0?this.getTransactionReceipt(t):new Promise(async(o,a)=>{let u=null;const _=async l=>{try{const f=await this.getTransactionReceipt(t);if(f!=null&&l-f.blockNumber+1>=i){o(f),u&&(clearTimeout(u),u=null);return}}catch(f){console.log("EEE",f)}this.once("block",_)};r!=null&&(u=setTimeout(()=>{u!=null&&(u=null,this.off("block",_),a(te("timeout","TIMEOUT",{reason:"timeout"})))},r)),_(await this.getBlockNumber())})}async waitForBlock(t){ut(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(t){const e=this.#u.get(t);e&&(e.timer&&clearTimeout(e.timer),this.#u.delete(t))}_setTimeout(t,e){e==null&&(e=0);const r=this.#h++,i=()=>{this.#u.delete(r),t()};if(this.paused)this.#u.set(r,{timer:null,func:i,time:e});else{const o=setTimeout(i,e);this.#u.set(r,{timer:o,func:i,time:uc()})}return r}_forEachSubscriber(t){for(const e of this.#t.values())t(e.subscriber)}_getSubscriber(t){switch(t.type){case"debug":case"error":case"network":return new gh(t.type);case"block":{const e=new X1(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new tm(this,t.type);case"event":return new oc(this,t.filter);case"transaction":return new rm(this,t.hash);case"orphan":return new em(this,t.filter)}throw new Error(`unsupported event: ${t.type}`)}_recoverSubscriber(t,e){for(const r of this.#t.values())if(r.subscriber===t){r.started&&r.subscriber.stop(),r.subscriber=e,r.started&&e.start(),this.#r!=null&&e.pause(this.#r);break}}async#d(t,e){let r=await cc(t,this);return r.type==="event"&&e&&e.length>0&&e[0].removed===!0&&(r=await cc({orphan:"drop-log",log:e[0]},this)),this.#t.get(r.tag)||null}async#y(t){const e=await cc(t,this),r=e.tag;let i=this.#t.get(r);return i||(i={subscriber:this._getSubscriber(e),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#t.set(r,i)),i}async on(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!1}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async once(t,e){const r=await this.#y(t);return r.listeners.push({listener:e,once:!0}),r.started||(r.subscriber.start(),r.started=!0,this.#r!=null&&r.subscriber.pause(this.#r)),this}async emit(t,...e){const r=await this.#d(t,e);if(!r||r.listeners.length===0)return!1;const i=r.listeners.length;return r.listeners=r.listeners.filter(({listener:o,once:a})=>{const u=new P_(this,a?null:o,t);try{o.call(this,...e,u)}catch{}return!a}),r.listeners.length===0&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),i>0}async listenerCount(t){if(t){const r=await this.#d(t);return r?r.listeners.length:0}let e=0;for(const{listeners:r}of this.#t.values())e+=r.length;return e}async listeners(t){if(t){const r=await this.#d(t);return r?r.listeners.map(({listener:i})=>i):[]}let e=[];for(const{listeners:r}of this.#t.values())e=e.concat(r.map(({listener:i})=>i));return e}async off(t,e){const r=await this.#d(t);if(!r)return this;if(e){const i=r.listeners.map(({listener:o})=>o).indexOf(e);i>=0&&r.listeners.splice(i,1)}return(!e||r.listeners.length===0)&&(r.started&&r.subscriber.stop(),this.#t.delete(r.tag)),this}async removeAllListeners(t){if(t){const{tag:e,started:r,subscriber:i}=await this.#y(t);r&&i.stop(),this.#t.delete(e)}else for(const[e,{started:r,subscriber:i}]of this.#t)r&&i.stop(),this.#t.delete(e);return this}async addListener(t,e){return await this.on(t,e)}async removeListener(t,e){return this.off(t,e)}get destroyed(){return this.#n}destroy(){this.removeAllListeners();for(const t of this.#u.keys())this._clearTimeout(t);this.#n=!0}get paused(){return this.#r!=null}set paused(t){!!t!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(t){if(this.#a=-1,this.#r!=null){if(this.#r==!!t)return;ut(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber(e=>e.pause(t)),this.#r=!!t;for(const e of this.#u.values())e.timer&&clearTimeout(e.timer),e.time=uc()-e.time}resume(){if(this.#r!=null){this._forEachSubscriber(t=>t.resume()),this.#r=null;for(const t of this.#u.values()){let e=t.time;e<0&&(e=0),t.time=uc(),setTimeout(t.func,e)}}}}function cm(n,t){try{const e=_c(n,t);if(e)return uo(e)}catch{}return null}function _c(n,t){if(n==="0x")return null;try{const e=Tt(ie(n,t,t+32)),r=Tt(ie(n,e,e+32));return ie(n,e+32,e+32+r)}catch{}return null}function yh(n){const t=he(n);if(t.length>32)throw new Error("internal; should not happen");const e=new Uint8Array(32);return e.set(t,32-t.length),e}function um(n){if(n.length%32===0)return n;const t=new Uint8Array(Math.ceil(n.length/32)*32);return t.set(n),t}const _m=new Uint8Array([]);function fm(n){const t=[];let e=0;for(let r=0;r<n.length;r++)t.push(_m),e+=32;for(let r=0;r<n.length;r++){const i=Ot(n[r]);t[r]=yh(e),t.push(yh(i.length)),t.push(um(i)),e+=32+Math.ceil(i.length/32)*32}return ne(t)}const bh="0x0000000000000000000000000000000000000000000000000000000000000000";function lm(n){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};ut(Qi(n)>=5*32,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const e=ie(n,0,32);ut(ie(e,0,12)===ie(bh,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=ie(e,12);try{const r=[],i=Tt(ie(n,32,64)),o=Tt(ie(n,i,i+32)),a=ie(n,i+32);for(let u=0;u<o;u++){const _=cm(a,u*32);if(_==null)throw new Error("abort");r.push(_)}t.urls=r}catch{ut(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=_c(n,64);if(r==null)throw new Error("abort");t.calldata=r}catch{ut(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}ut(ie(n,100,128)===ie(bh,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=ie(n,96,100);try{const r=_c(n,128);if(r==null)throw new Error("abort");t.extraData=r}catch{ut(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map(r=>t[r]),t}function Ii(n,t){if(n.provider)return n.provider;ut(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function mh(n,t){let e=To(t);if(e.to!=null&&(e.to=Re(e.to,n)),e.from!=null){const r=e.from;e.from=Promise.all([n.getAddress(),Re(r,n)]).then(([i,o])=>(V(i.toLowerCase()===o.toLowerCase(),"transaction from mismatch","tx.from",o),i))}else e.from=n.getAddress();return await Ee(e)}class hm{provider;constructor(t){zt(this,{provider:t||null})}async getNonce(t){return Ii(this,"getTransactionCount").getTransactionCount(await this.getAddress(),t)}async populateCall(t){return await mh(this,t)}async populateTransaction(t){const e=Ii(this,"populateTransaction"),r=await mh(this,t);r.nonce==null&&(r.nonce=await this.getNonce("pending")),r.gasLimit==null&&(r.gasLimit=await this.estimateGas(r));const i=await this.provider.getNetwork();if(r.chainId!=null){const a=mt(r.chainId);V(a===i.chainId,"transaction chainId mismatch","tx.chainId",t.chainId)}else r.chainId=i.chainId;const o=r.maxFeePerGas!=null||r.maxPriorityFeePerGas!=null;if(r.gasPrice!=null&&(r.type===2||o)?V(!1,"eip-1559 transaction do not support gasPrice","tx",t):(r.type===0||r.type===1)&&o&&V(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",t),(r.type===2||r.type==null)&&r.maxFeePerGas!=null&&r.maxPriorityFeePerGas!=null)r.type=2;else if(r.type===0||r.type===1){const a=await e.getFeeData();ut(a.gasPrice!=null,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice)}else{const a=await e.getFeeData();if(r.type==null)if(a.maxFeePerGas!=null&&a.maxPriorityFeePerGas!=null)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,r.gasPrice!=null){const u=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=u,r.maxPriorityFeePerGas=u}else r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas);else a.gasPrice!=null?(ut(!o,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),r.gasPrice==null&&(r.gasPrice=a.gasPrice),r.type=0):ut(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else(r.type===2||r.type===3||r.type===4)&&(r.maxFeePerGas==null&&(r.maxFeePerGas=a.maxFeePerGas),r.maxPriorityFeePerGas==null&&(r.maxPriorityFeePerGas=a.maxPriorityFeePerGas))}return await Ee(r)}async populateAuthorization(t){const e=Object.assign({},t);return e.chainId==null&&(e.chainId=(await Ii(this,"getNetwork").getNetwork()).chainId),e.nonce==null&&(e.nonce=await this.getNonce()),e}async estimateGas(t){return Ii(this,"estimateGas").estimateGas(await this.populateCall(t))}async call(t){return Ii(this,"call").call(await this.populateCall(t))}async resolveName(t){return await Ii(this,"resolveName").resolveName(t)}async sendTransaction(t){const e=Ii(this,"sendTransaction"),r=await this.populateTransaction(t);delete r.from;const i=Ye.from(r);return await e.broadcastTransaction(await this.signTransaction(i))}authorize(t){ut(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}function pm(n){return JSON.parse(JSON.stringify(n))}class Ah{#t;#e;#r;#n;#i;#o;constructor(t){this.#t=t,this.#e=null,this.#r=this.#s.bind(this),this.#n=!1,this.#i=null,this.#o=!1}_subscribe(t){throw new Error("subclasses must override this")}_emitResults(t,e){throw new Error("subclasses must override this")}_recover(t){throw new Error("subclasses must override this")}async#s(t){try{this.#e==null&&(this.#e=this._subscribe(this.#t));let e=null;try{e=await this.#e}catch(o){if(!me(o,"UNSUPPORTED_OPERATION")||o.operation!=="eth_newFilter")throw o}if(e==null){this.#e=null,this.#t._recoverSubscriber(this,this._recover(this.#t));return}const r=await this.#t.getNetwork();if(this.#i||(this.#i=r),this.#i.chainId!==r.chainId)throw new Error("chaid changed");if(this.#o)return;const i=await this.#t.send("eth_getFilterChanges",[e]);await this._emitResults(this.#t,i)}catch(e){console.log("@TODO",e)}this.#t.once("block",this.#r)}#a(){const t=this.#e;t&&(this.#e=null,t.then(e=>{this.#t.destroyed||this.#t.send("eth_uninstallFilter",[e])}))}start(){this.#n||(this.#n=!0,this.#s(-2))}stop(){this.#n&&(this.#n=!1,this.#o=!0,this.#a(),this.#t.off("block",this.#r))}pause(t){t&&this.#a(),this.#t.off("block",this.#r)}resume(){this.start()}}class wm extends Ah{#t;constructor(t,e){super(t),this.#t=pm(e)}_recover(t){return new oc(t,this.#t)}async _subscribe(t){return await t.send("eth_newFilter",[this.#t])}async _emitResults(t,e){for(const r of e)t.emit(this.#t,t._wrapLog(r,t._network))}}class dm extends Ah{async _subscribe(t){return await t.send("eth_newPendingTransactionFilter",[])}async _emitResults(t,e){for(const r of e)t.emit("pending",r)}}const gm="bigint,boolean,function,number,string,symbol".split(/,/g);function Go(n){if(n==null||gm.indexOf(typeof n)>=0||typeof n.getAddress=="function")return n;if(Array.isArray(n))return n.map(Go);if(typeof n=="object")return Object.keys(n).reduce((t,e)=>(t[e]=n[e],t),{});throw new Error(`should not happen: ${n} (${typeof n})`)}function ym(n){return new Promise(t=>{setTimeout(t,n)})}function cs(n){return n&&n.toLowerCase()}function Eh(n){return n&&typeof n.pollingInterval=="number"}const vh={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class fc extends hm{address;constructor(t,e){super(t),e=Ut(e),zt(this,{address:e})}connect(t){ut(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(t){return await this.populateCall(t)}async sendUncheckedTransaction(t){const e=Go(t),r=[];if(e.from){const o=e.from;r.push((async()=>{const a=await Re(o,this.provider);V(a!=null&&a.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=a})())}else e.from=this.address;if(e.gasLimit==null&&r.push((async()=>{e.gasLimit=await this.provider.estimateGas({...e,from:this.address})})()),e.to!=null){const o=e.to;r.push((async()=>{e.to=await Re(o,this.provider)})())}r.length&&await Promise.all(r);const i=this.provider.getRpcTransaction(e);return this.provider.send("eth_sendTransaction",[i])}async sendTransaction(t){const e=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(t);return await new Promise((i,o)=>{const a=[1e3,100];let u=0;const _=async()=>{try{const l=await this.provider.getTransaction(r);if(l!=null){i(l.replaceableTransaction(e));return}}catch(l){if(me(l,"CANCELLED")||me(l,"BAD_DATA")||me(l,"NETWORK_ERROR")||me(l,"UNSUPPORTED_OPERATION")){l.info==null&&(l.info={}),l.info.sendTransactionHash=r,o(l);return}if(me(l,"INVALID_ARGUMENT")&&(u++,l.info==null&&(l.info={}),l.info.sendTransactionHash=r,u>10)){o(l);return}this.provider.emit("error",te("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:l}))}this.provider._setTimeout(()=>{_()},a.pop()||4e3)};_()})}async signTransaction(t){const e=Go(t);if(e.from){const i=await Re(e.from,this.provider);V(i!=null&&i.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",t),e.from=i}else e.from=this.address;const r=this.provider.getRpcTransaction(e);return await this.provider.send("eth_signTransaction",[r])}async signMessage(t){const e=typeof t=="string"?wr(t):t;return await this.provider.send("personal_sign",[gt(e),this.address.toLowerCase()])}async signTypedData(t,e,r){const i=Go(r),o=await Pe.resolveNames(t,e,i,async a=>{const u=await Re(a);return V(u!=null,"TypedData does not support null address","value",a),u});return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(Pe.getPayload(o.domain,e,o.value))])}async unlock(t){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),t,null])}async _legacySignMessage(t){const e=typeof t=="string"?wr(t):t;return await this.provider.send("eth_sign",[this.address.toLowerCase(),gt(e)])}}class bm extends am{#t;#e;#r;#n;#i;#o;#s;#a(){if(this.#n)return;const t=this._getOption("batchMaxCount")===1?0:this._getOption("batchStallTime");this.#n=setTimeout(()=>{this.#n=null;const e=this.#r;for(this.#r=[];e.length;){const r=[e.shift()];for(;e.length&&r.length!==this.#t.batchMaxCount;)if(r.push(e.shift()),JSON.stringify(r.map(o=>o.payload)).length>this.#t.batchMaxSize){e.unshift(r.pop());break}(async()=>{const i=r.length===1?r[0].payload:r.map(o=>o.payload);this.emit("debug",{action:"sendRpcPayload",payload:i});try{const o=await this._send(i);this.emit("debug",{action:"receiveRpcResult",result:o});for(const{resolve:a,reject:u,payload:_}of r){if(this.destroyed){u(te("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:_.method}));continue}const l=o.filter(f=>f.id===_.id)[0];if(l==null){const f=te("missing response for request","BAD_DATA",{value:o,info:{payload:_}});this.emit("error",f),u(f);continue}if("error"in l){u(this.getRpcError(_,l));continue}a(l.result)}}catch(o){this.emit("debug",{action:"receiveRpcError",error:o});for(const{reject:a}of r)a(o)}})()}},t)}constructor(t,e){super(t,e),this.#e=1,this.#t=Object.assign({},vh,e||{}),this.#r=[],this.#n=null,this.#o=null,this.#s=null;{let i=null;const o=new Promise(a=>{i=a});this.#i={promise:o,resolve:i}}const r=this._getOption("staticNetwork");typeof r=="boolean"?(V(!r||t!=="any","staticNetwork cannot be used on special network 'any'","options",e),r&&t!=null&&(this.#o=Le.from(t))):r&&(V(t==null||r.matches(t),"staticNetwork MUST match network object","options",e),this.#o=r)}_getOption(t){return this.#t[t]}get _network(){return ut(this.#o,"network is not available yet","NETWORK_ERROR"),this.#o}async _perform(t){if(t.method==="call"||t.method==="estimateGas"){let r=t.transaction;if(r&&r.type!=null&&mt(r.type)&&r.maxFeePerGas==null&&r.maxPriorityFeePerGas==null){const i=await this.getFeeData();i.maxFeePerGas==null&&i.maxPriorityFeePerGas==null&&(t=Object.assign({},t,{transaction:Object.assign({},r,{type:void 0})}))}}const e=this.getRpcRequest(t);return e!=null?await this.send(e.method,e.args):super._perform(t)}async _detectNetwork(){const t=this._getOption("staticNetwork");if(t)if(t===!0){if(this.#o)return this.#o}else return t;return this.#s?await this.#s:this.ready?(this.#s=(async()=>{try{const e=Le.from(mt(await this.send("eth_chainId",[])));return this.#s=null,e}catch(e){throw this.#s=null,e}})(),await this.#s):(this.#s=(async()=>{const e={id:this.#e++,method:"eth_chainId",params:[],jsonrpc:"2.0"};this.emit("debug",{action:"sendRpcPayload",payload:e});let r;try{r=(await this._send(e))[0],this.#s=null}catch(i){throw this.#s=null,this.emit("debug",{action:"receiveRpcError",error:i}),i}if(this.emit("debug",{action:"receiveRpcResult",result:r}),"result"in r)return Le.from(mt(r.result));throw this.getRpcError(e,r)})(),await this.#s)}_start(){this.#i==null||this.#i.resolve==null||(this.#i.resolve(),this.#i=null,(async()=>{for(;this.#o==null&&!this.destroyed;)try{this.#o=await this._detectNetwork()}catch(t){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",te("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:t}})),await ym(1e3)}this.#a()})())}async _waitUntilReady(){if(this.#i!=null)return await this.#i.promise}_getSubscriber(t){return t.type==="pending"?new dm(this):t.type==="event"?this._getOption("polling")?new oc(this,t.filter):new wm(this,t.filter):t.type==="orphan"&&t.filter.orphan==="drop-log"?new gh("orphan"):super._getSubscriber(t)}get ready(){return this.#i==null}getRpcTransaction(t){const e={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(r=>{if(t[r]==null)return;let i=r;r==="gasLimit"&&(i="gas"),e[i]=Je(mt(t[r],`tx.${r}`))}),["from","to","data"].forEach(r=>{t[r]!=null&&(e[r]=gt(t[r]))}),t.accessList&&(e.accessList=mi(t.accessList)),t.blobVersionedHashes&&(e.blobVersionedHashes=t.blobVersionedHashes.map(r=>r.toLowerCase())),t.authorizationList&&(e.authorizationList=t.authorizationList.map(r=>{const i=qf(r);return{address:i.address,nonce:Je(i.nonce),chainId:Je(i.chainId),yParity:Je(i.signature.yParity),r:Je(i.signature.r),s:Je(i.signature.s)}})),e}getRpcRequest(t){switch(t.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[cs(t.address),t.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[cs(t.address),t.blockTag]};case"getCode":return{method:"eth_getCode",args:[cs(t.address),t.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[cs(t.address),"0x"+t.position.toString(16),t.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[t.signedTransaction]};case"getBlock":if("blockTag"in t)return{method:"eth_getBlockByNumber",args:[t.blockTag,!!t.includeTransactions]};if("blockHash"in t)return{method:"eth_getBlockByHash",args:[t.blockHash,!!t.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[t.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[t.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(t.transaction),t.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(t.transaction)]};case"getLogs":return t.filter&&t.filter.address!=null&&(Array.isArray(t.filter.address)?t.filter.address=t.filter.address.map(cs):t.filter.address=cs(t.filter.address)),{method:"eth_getLogs",args:[t.filter]}}return null}getRpcError(t,e){const{method:r}=t,{error:i}=e;if(r==="eth_estimateGas"&&i.message){const u=i.message;if(!u.match(/revert/i)&&u.match(/insufficient funds/i))return te("insufficient funds","INSUFFICIENT_FUNDS",{transaction:t.params[0],info:{payload:t,error:i}});if(u.match(/nonce/i)&&u.match(/too low/i))return te("nonce has already been used","NONCE_EXPIRED",{transaction:t.params[0],info:{payload:t,error:i}})}if(r==="eth_call"||r==="eth_estimateGas"){const u=lc(i),_=Si.getBuiltinCallException(r==="eth_call"?"call":"estimateGas",t.params[0],u?u.data:null);return _.info={error:i,payload:t},_}const o=JSON.stringify(Am(i));if(typeof i.message=="string"&&i.message.match(/user denied|ethers-user-denied/i))return te("user rejected action","ACTION_REJECTED",{action:{eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"}[r]||"unknown",reason:"rejected",info:{payload:t,error:i}});if(r==="eth_sendRawTransaction"||r==="eth_sendTransaction"){const u=t.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return te("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:u,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return te("nonce has already been used","NONCE_EXPIRED",{transaction:u,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return te("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:u,info:{error:i}});if(o.match(/only replay-protected/i))return te("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:u,info:{error:i}}})}let a=!!o.match(/the method .* does not exist/i);return a||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(a=!0),a?te("unsupported operation","UNSUPPORTED_OPERATION",{operation:t.method,info:{error:i,payload:t}}):te("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:t})}send(t,e){if(this.destroyed)return Promise.reject(te("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t}));const r=this.#e++,i=new Promise((o,a)=>{this.#r.push({resolve:o,reject:a,payload:{method:t,params:e,id:r,jsonrpc:"2.0"}})});return this.#a(),i}async getSigner(t){t==null&&(t=0);const e=this.send("eth_accounts",[]);if(typeof t=="number"){const i=await e;if(t>=i.length)throw new Error("no such account");return new fc(this,i[t])}const{accounts:r}=await Ee({network:this.getNetwork(),accounts:e});t=Ut(t);for(const i of r)if(Ut(i)===t)return new fc(this,t);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map(e=>new fc(this,e))}destroy(){this.#n&&(clearTimeout(this.#n),this.#n=null);for(const{payload:t,reject:e}of this.#r)e(te("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:t.method}));this.#r=[],super.destroy()}}class xh extends bm{#t;constructor(t,e){super(t,e);let r=this._getOption("pollingInterval");r==null&&(r=vh.pollingInterval),this.#t=r}_getSubscriber(t){const e=super._getSubscriber(t);return Eh(e)&&(e.pollingInterval=this.#t),e}get pollingInterval(){return this.#t}set pollingInterval(t){if(!Number.isInteger(t)||t<0)throw new Error("invalid interval");this.#t=t,this._forEachSubscriber(e=>{Eh(e)&&(e.pollingInterval=this.#t)})}}class mm extends xh{#t;constructor(t,e,r){t==null&&(t="http://localhost:8545"),super(e,r),typeof t=="string"?this.#t=new sr(t):this.#t=t.clone()}_getConnection(){return this.#t.clone()}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){const e=this._getConnection();e.body=JSON.stringify(t),e.setHeader("content-type","application/json");const r=await e.send();r.assertOk();let i=r.bodyJson;return Array.isArray(i)||(i=[i]),i}}function lc(n){if(n==null)return null;if(typeof n.message=="string"&&n.message.match(/revert/i)&&$t(n.data))return{message:n.message,data:n.data};if(typeof n=="object"){for(const t in n){const e=lc(n[t]);if(e)return e}return null}if(typeof n=="string")try{return lc(JSON.parse(n))}catch{}return null}function hc(n,t){if(n!=null){if(typeof n.message=="string"&&t.push(n.message),typeof n=="object")for(const e in n)hc(n[e],t);if(typeof n=="string")try{return hc(JSON.parse(n),t)}catch{}}}function Am(n){const t=[];return hc(n,t),t}class Oi extends xh{#t;#e;constructor(t,e,r){const i=Object.assign({},r??{},{batchMaxCount:1});V(t&&t.request,"invalid EIP-1193 provider","ethereum",t),super(e,i),this.#e=null,r&&r.providerInfo&&(this.#e=r.providerInfo),this.#t=async(o,a)=>{const u={method:o,params:a};this.emit("debug",{action:"sendEip1193Request",payload:u});try{const _=await t.request(u);return this.emit("debug",{action:"receiveEip1193Result",result:_}),_}catch(_){const l=new Error(_.message);throw l.code=_.code,l.data=_.data,l.payload=u,this.emit("debug",{action:"receiveEip1193Error",error:l}),l}}}get providerInfo(){return this.#e}async send(t,e){return await this._start(),await super.send(t,e)}async _send(t){V(!Array.isArray(t),"EIP-1193 does not support batch request","payload",t);try{const e=await this.#t(t.method,t.params||[]);return[{id:t.id,result:e}]}catch(e){return[{id:t.id,error:{code:e.code,data:e.data,message:e.message}}]}}getRpcError(t,e){switch(e=JSON.parse(JSON.stringify(e)),e.error.code||-1){case 4001:e.error.message=`ethers-user-denied: ${e.error.message}`;break;case 4200:e.error.message=`ethers-unsupported: ${e.error.message}`;break}return super.getRpcError(t,e)}async hasSigner(t){t==null&&(t=0);const e=await this.send("eth_accounts",[]);return typeof t=="number"?e.length>t:(t=t.toLowerCase(),e.filter(r=>r.toLowerCase()===t).length!==0)}async getSigner(t){if(t==null&&(t=0),!await this.hasSigner(t))try{await this.#t("eth_requestAccounts",[])}catch(e){const r=e.payload;throw this.getRpcError(r,{id:r.id,error:e})}return await super.getSigner(t)}static async discover(t){if(t==null&&(t={}),t.provider)return new Oi(t.provider);const e=t.window?t.window:typeof window<"u"?window:null;if(e==null)return null;const r=t.anyProvider;if(r&&e.ethereum)return new Oi(e.ethereum);if(!("addEventListener"in e&&"dispatchEvent"in e&&"removeEventListener"in e))return null;const i=t.timeout?t.timeout:300;return i===0?null:await new Promise((o,a)=>{let u=[];const _=g=>{u.push(g.detail),r&&l()},l=()=>{if(clearTimeout(f),u.length)if(t&&t.filter){const g=t.filter(u.map(y=>Object.assign({},y.info)));if(g==null)o(null);else if(g instanceof Oi)o(g);else{let y=null;if(g.uuid&&(y=u.filter(I=>g.uuid===I.info.uuid)[0]),y){const{provider:B,info:I}=y;o(new Oi(B,void 0,{providerInfo:I}))}else a(te("filter returned unknown info","UNSUPPORTED_OPERATION",{value:g}))}}else{const{provider:g,info:y}=u[0];o(new Oi(g,void 0,{providerInfo:y}))}else o(null);e.removeEventListener("eip6963:announceProvider",_)},f=setTimeout(()=>{l()},i);e.addEventListener("eip6963:announceProvider",_),e.dispatchEvent(new Event("eip6963:requestProvider"))})}}var li=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Rh(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ho={exports:{}};function Em(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var zh={exports:{}},ue=zh.exports={},ur,_r;function pc(){throw new Error("setTimeout has not been defined")}function wc(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?ur=setTimeout:ur=pc}catch{ur=pc}try{typeof clearTimeout=="function"?_r=clearTimeout:_r=wc}catch{_r=wc}})();function Bh(n){if(ur===setTimeout)return setTimeout(n,0);if((ur===pc||!ur)&&setTimeout)return ur=setTimeout,setTimeout(n,0);try{return ur(n,0)}catch{try{return ur.call(null,n,0)}catch{return ur.call(this,n,0)}}}function vm(n){if(_r===clearTimeout)return clearTimeout(n);if((_r===wc||!_r)&&clearTimeout)return _r=clearTimeout,clearTimeout(n);try{return _r(n)}catch{try{return _r.call(null,n)}catch{return _r.call(this,n)}}}var Rr=[],us=!1,Ti,Vo=-1;function xm(){!us||!Ti||(us=!1,Ti.length?Rr=Ti.concat(Rr):Vo=-1,Rr.length&&Sh())}function Sh(){if(!us){var n=Bh(xm);us=!0;for(var t=Rr.length;t;){for(Ti=Rr,Rr=[];++Vo<t;)Ti&&Ti[Vo].run();Vo=-1,t=Rr.length}Ti=null,us=!1,vm(n)}}ue.nextTick=function(n){var t=new Array(arguments.length-1);if(arguments.length>1)for(var e=1;e<arguments.length;e++)t[e-1]=arguments[e];Rr.push(new Ph(n,t)),Rr.length===1&&!us&&Bh(Sh)};function Ph(n,t){this.fun=n,this.array=t}Ph.prototype.run=function(){this.fun.apply(null,this.array)},ue.title="browser",ue.browser=!0,ue.env={},ue.argv=[],ue.version="",ue.versions={};function zr(){}ue.on=zr,ue.addListener=zr,ue.once=zr,ue.off=zr,ue.removeListener=zr,ue.removeAllListeners=zr,ue.emit=zr,ue.prependListener=zr,ue.prependOnceListener=zr,ue.listeners=function(n){return[]},ue.binding=function(n){throw new Error("process.binding is not supported")},ue.cwd=function(){return"/"},ue.chdir=function(n){throw new Error("process.chdir is not supported")},ue.umask=function(){return 0};var Rm=zh.exports;const Ct=Em(Rm);var qo={exports:{}},kh;function Fh(){if(kh)return qo.exports;kh=1;var n=typeof Reflect=="object"?Reflect:null,t=n&&typeof n.apply=="function"?n.apply:function(k,C,N){return Function.prototype.apply.call(k,C,N)},e;n&&typeof n.ownKeys=="function"?e=n.ownKeys:Object.getOwnPropertySymbols?e=function(k){return Object.getOwnPropertyNames(k).concat(Object.getOwnPropertySymbols(k))}:e=function(k){return Object.getOwnPropertyNames(k)};function r(z){console&&console.warn&&console.warn(z)}var i=Number.isNaN||function(k){return k!==k};function o(){o.init.call(this)}qo.exports=o,qo.exports.once=A,o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function u(z){if(typeof z!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof z)}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(z){if(typeof z!="number"||z<0||i(z))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+z+".");a=z}}),o.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(k){if(typeof k!="number"||k<0||i(k))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+k+".");return this._maxListeners=k,this};function _(z){return z._maxListeners===void 0?o.defaultMaxListeners:z._maxListeners}o.prototype.getMaxListeners=function(){return _(this)},o.prototype.emit=function(k){for(var C=[],N=1;N<arguments.length;N++)C.push(arguments[N]);var D=k==="error",Y=this._events;if(Y!==void 0)D=D&&Y.error===void 0;else if(!D)return!1;if(D){var Z;if(C.length>0&&(Z=C[0]),Z instanceof Error)throw Z;var ft=new Error("Unhandled error."+(Z?" ("+Z.message+")":""));throw ft.context=Z,ft}var L=Y[k];if(L===void 0)return!1;if(typeof L=="function")t(L,this,C);else for(var At=L.length,Rt=I(L,At),N=0;N<At;++N)t(Rt[N],this,C);return!0};function l(z,k,C,N){var D,Y,Z;if(u(C),Y=z._events,Y===void 0?(Y=z._events=Object.create(null),z._eventsCount=0):(Y.newListener!==void 0&&(z.emit("newListener",k,C.listener?C.listener:C),Y=z._events),Z=Y[k]),Z===void 0)Z=Y[k]=C,++z._eventsCount;else if(typeof Z=="function"?Z=Y[k]=N?[C,Z]:[Z,C]:N?Z.unshift(C):Z.push(C),D=_(z),D>0&&Z.length>D&&!Z.warned){Z.warned=!0;var ft=new Error("Possible EventEmitter memory leak detected. "+Z.length+" "+String(k)+" listeners added. Use emitter.setMaxListeners() to increase limit");ft.name="MaxListenersExceededWarning",ft.emitter=z,ft.type=k,ft.count=Z.length,r(ft)}return z}o.prototype.addListener=function(k,C){return l(this,k,C,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(k,C){return l(this,k,C,!0)};function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function g(z,k,C){var N={fired:!1,wrapFn:void 0,target:z,type:k,listener:C},D=f.bind(N);return D.listener=C,N.wrapFn=D,D}o.prototype.once=function(k,C){return u(C),this.on(k,g(this,k,C)),this},o.prototype.prependOnceListener=function(k,C){return u(C),this.prependListener(k,g(this,k,C)),this},o.prototype.removeListener=function(k,C){var N,D,Y,Z,ft;if(u(C),D=this._events,D===void 0)return this;if(N=D[k],N===void 0)return this;if(N===C||N.listener===C)--this._eventsCount===0?this._events=Object.create(null):(delete D[k],D.removeListener&&this.emit("removeListener",k,N.listener||C));else if(typeof N!="function"){for(Y=-1,Z=N.length-1;Z>=0;Z--)if(N[Z]===C||N[Z].listener===C){ft=N[Z].listener,Y=Z;break}if(Y<0)return this;Y===0?N.shift():S(N,Y),N.length===1&&(D[k]=N[0]),D.removeListener!==void 0&&this.emit("removeListener",k,ft||C)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(k){var C,N,D;if(N=this._events,N===void 0)return this;if(N.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):N[k]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete N[k]),this;if(arguments.length===0){var Y=Object.keys(N),Z;for(D=0;D<Y.length;++D)Z=Y[D],Z!=="removeListener"&&this.removeAllListeners(Z);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(C=N[k],typeof C=="function")this.removeListener(k,C);else if(C!==void 0)for(D=C.length-1;D>=0;D--)this.removeListener(k,C[D]);return this};function y(z,k,C){var N=z._events;if(N===void 0)return[];var D=N[k];return D===void 0?[]:typeof D=="function"?C?[D.listener||D]:[D]:C?T(D):I(D,D.length)}o.prototype.listeners=function(k){return y(this,k,!0)},o.prototype.rawListeners=function(k){return y(this,k,!1)},o.listenerCount=function(z,k){return typeof z.listenerCount=="function"?z.listenerCount(k):B.call(z,k)},o.prototype.listenerCount=B;function B(z){var k=this._events;if(k!==void 0){var C=k[z];if(typeof C=="function")return 1;if(C!==void 0)return C.length}return 0}o.prototype.eventNames=function(){return this._eventsCount>0?e(this._events):[]};function I(z,k){for(var C=new Array(k),N=0;N<k;++N)C[N]=z[N];return C}function S(z,k){for(;k+1<z.length;k++)z[k]=z[k+1];z.pop()}function T(z){for(var k=new Array(z.length),C=0;C<k.length;++C)k[C]=z[C].listener||z[C];return k}function A(z,k){return new Promise(function(C,N){function D(Z){z.removeListener(k,Y),N(Z)}function Y(){typeof z.removeListener=="function"&&z.removeListener("error",D),C([].slice.call(arguments))}P(z,k,Y,{once:!0}),k!=="error"&&R(z,D,{once:!0})})}function R(z,k,C){typeof z.on=="function"&&P(z,"error",k,C)}function P(z,k,C,N){if(typeof z.on=="function")N.once?z.once(k,C):z.on(k,C);else if(typeof z.addEventListener=="function")z.addEventListener(k,function D(Y){N.once&&z.removeEventListener(k,D),C(Y)});else throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof z)}return qo.exports}var dc,Ih;function Oh(){return Ih||(Ih=1,dc=Fh().EventEmitter),dc}var gc={},Th;function Qo(){return Th||(Th=1,function(n){Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});var t={},e={};e.byteLength=f,e.toByteArray=y,e.fromByteArray=S;for(var r=[],i=[],o=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",u=0,_=a.length;u<_;++u)r[u]=a[u],i[a.charCodeAt(u)]=u;i[45]=62,i[95]=63;function l(R){var P=R.length;if(P%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var z=R.indexOf("=");z===-1&&(z=P);var k=z===P?0:4-z%4;return[z,k]}function f(R){var P=l(R),z=P[0],k=P[1];return(z+k)*3/4-k}function g(R,P,z){return(P+z)*3/4-z}function y(R){var P,z=l(R),k=z[0],C=z[1],N=new o(g(R,k,C)),D=0,Y=C>0?k-4:k,Z;for(Z=0;Z<Y;Z+=4)P=i[R.charCodeAt(Z)]<<18|i[R.charCodeAt(Z+1)]<<12|i[R.charCodeAt(Z+2)]<<6|i[R.charCodeAt(Z+3)],N[D++]=P>>16&255,N[D++]=P>>8&255,N[D++]=P&255;return C===2&&(P=i[R.charCodeAt(Z)]<<2|i[R.charCodeAt(Z+1)]>>4,N[D++]=P&255),C===1&&(P=i[R.charCodeAt(Z)]<<10|i[R.charCodeAt(Z+1)]<<4|i[R.charCodeAt(Z+2)]>>2,N[D++]=P>>8&255,N[D++]=P&255),N}function B(R){return r[R>>18&63]+r[R>>12&63]+r[R>>6&63]+r[R&63]}function I(R,P,z){for(var k,C=[],N=P;N<z;N+=3)k=(R[N]<<16&16711680)+(R[N+1]<<8&65280)+(R[N+2]&255),C.push(B(k));return C.join("")}function S(R){for(var P,z=R.length,k=z%3,C=[],N=16383,D=0,Y=z-k;D<Y;D+=N)C.push(I(R,D,D+N>Y?Y:D+N));return k===1?(P=R[z-1],C.push(r[P>>2]+r[P<<4&63]+"==")):k===2&&(P=(R[z-2]<<8)+R[z-1],C.push(r[P>>10]+r[P>>4&63]+r[P<<2&63]+"=")),C.join("")}var T={};/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */T.read=function(R,P,z,k,C){var N,D,Y=C*8-k-1,Z=(1<<Y)-1,ft=Z>>1,L=-7,At=z?C-1:0,Rt=z?-1:1,at=R[P+At];for(At+=Rt,N=at&(1<<-L)-1,at>>=-L,L+=Y;L>0;N=N*256+R[P+At],At+=Rt,L-=8);for(D=N&(1<<-L)-1,N>>=-L,L+=k;L>0;D=D*256+R[P+At],At+=Rt,L-=8);if(N===0)N=1-ft;else{if(N===Z)return D?NaN:(at?-1:1)*(1/0);D=D+Math.pow(2,k),N=N-ft}return(at?-1:1)*D*Math.pow(2,N-k)},T.write=function(R,P,z,k,C,N){var D,Y,Z,ft=N*8-C-1,L=(1<<ft)-1,At=L>>1,Rt=C===23?Math.pow(2,-24)-Math.pow(2,-77):0,at=k?0:N-1,wt=k?1:-1,Et=P<0||P===0&&1/P<0?1:0;for(P=Math.abs(P),isNaN(P)||P===1/0?(Y=isNaN(P)?1:0,D=L):(D=Math.floor(Math.log(P)/Math.LN2),P*(Z=Math.pow(2,-D))<1&&(D--,Z*=2),D+At>=1?P+=Rt/Z:P+=Rt*Math.pow(2,1-At),P*Z>=2&&(D++,Z/=2),D+At>=L?(Y=0,D=L):D+At>=1?(Y=(P*Z-1)*Math.pow(2,C),D=D+At):(Y=P*Math.pow(2,At-1)*Math.pow(2,C),D=0));C>=8;R[z+at]=Y&255,at+=wt,Y/=256,C-=8);for(D=D<<C|Y,ft+=C;ft>0;R[z+at]=D&255,at+=wt,D/=256,ft-=8);R[z+at-wt]|=Et*128};/*!
|
|
7
7
|
* The buffer module from node.js, for the browser.
|
|
8
8
|
*
|
|
9
9
|
* @author Feross Aboukhadijeh <https://feross.org>
|
|
10
10
|
* @license MIT
|
|
11
|
-
*/(function(B){const O=e,C=U,k=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;B.Buffer=j,B.SlowBuffer=nt,B.INSPECT_MAX_BYTES=50;const D=2147483647;B.kMaxLength=D;const{Uint8Array:L,ArrayBuffer:V,SharedArrayBuffer:tt}=globalThis;j.TYPED_ARRAY_SUPPORT=rt(),!j.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function rt(){try{const P=new L(1),h={foo:function(){return 42}};return Object.setPrototypeOf(h,L.prototype),Object.setPrototypeOf(P,h),P.foo()===42}catch{return!1}}Object.defineProperty(j.prototype,"parent",{enumerable:!0,get:function(){if(j.isBuffer(this))return this.buffer}}),Object.defineProperty(j.prototype,"offset",{enumerable:!0,get:function(){if(j.isBuffer(this))return this.byteOffset}});function wt(P){if(P>D)throw new RangeError('The value "'+P+'" is invalid for option "size"');const h=new L(P);return Object.setPrototypeOf(h,j.prototype),h}function j(P,h,g){if(typeof P=="number"){if(typeof h=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return yt(P)}return Pt(P,h,g)}j.poolSize=8192;function Pt(P,h,g){if(typeof P=="string")return zt(P,h);if(V.isView(P))return Mt(P);if(P==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P);if(Qe(P,V)||P&&Qe(P.buffer,V)||typeof tt<"u"&&(Qe(P,tt)||P&&Qe(P.buffer,tt)))return It(P,h,g);if(typeof P=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const G=P.valueOf&&P.valueOf();if(G!=null&&G!==P)return j.from(G,h,g);const Q=Qt(P);if(Q)return Q;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof P[Symbol.toPrimitive]=="function")return j.from(P[Symbol.toPrimitive]("string"),h,g);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof P)}j.from=function(P,h,g){return Pt(P,h,g)},Object.setPrototypeOf(j.prototype,L.prototype),Object.setPrototypeOf(j,L);function xt(P){if(typeof P!="number")throw new TypeError('"size" argument must be of type number');if(P<0)throw new RangeError('The value "'+P+'" is invalid for option "size"')}function ft(P,h,g){return xt(P),P<=0?wt(P):h!==void 0?typeof g=="string"?wt(P).fill(h,g):wt(P).fill(h):wt(P)}j.alloc=function(P,h,g){return ft(P,h,g)};function yt(P){return xt(P),wt(P<0?0:J(P)|0)}j.allocUnsafe=function(P){return yt(P)},j.allocUnsafeSlow=function(P){return yt(P)};function zt(P,h){if((typeof h!="string"||h==="")&&(h="utf8"),!j.isEncoding(h))throw new TypeError("Unknown encoding: "+h);const g=ot(P,h)|0;let G=wt(g);const Q=G.write(P,h);return Q!==g&&(G=G.slice(0,Q)),G}function Bt(P){const h=P.length<0?0:J(P.length)|0,g=wt(h);for(let G=0;G<h;G+=1)g[G]=P[G]&255;return g}function Mt(P){if(Qe(P,L)){const h=new L(P);return It(h.buffer,h.byteOffset,h.byteLength)}return Bt(P)}function It(P,h,g){if(h<0||P.byteLength<h)throw new RangeError('"offset" is outside of buffer bounds');if(P.byteLength<h+(g||0))throw new RangeError('"length" is outside of buffer bounds');let G;return h===void 0&&g===void 0?G=new L(P):g===void 0?G=new L(P,h):G=new L(P,h,g),Object.setPrototypeOf(G,j.prototype),G}function Qt(P){if(j.isBuffer(P)){const h=J(P.length)|0,g=wt(h);return g.length===0||P.copy(g,0,0,h),g}if(P.length!==void 0)return typeof P.length!="number"||U_(P.length)?wt(0):Bt(P);if(P.type==="Buffer"&&Array.isArray(P.data))return Bt(P.data)}function J(P){if(P>=D)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+D.toString(16)+" bytes");return P|0}function nt(P){return+P!=P&&(P=0),j.alloc(+P)}j.isBuffer=function(h){return h!=null&&h._isBuffer===!0&&h!==j.prototype},j.compare=function(h,g){if(Qe(h,L)&&(h=j.from(h,h.offset,h.byteLength)),Qe(g,L)&&(g=j.from(g,g.offset,g.byteLength)),!j.isBuffer(h)||!j.isBuffer(g))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(h===g)return 0;let G=h.length,Q=g.length;for(let X=0,ut=Math.min(G,Q);X<ut;++X)if(h[X]!==g[X]){G=h[X],Q=g[X];break}return G<Q?-1:Q<G?1:0},j.isEncoding=function(h){switch(String(h).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}},j.concat=function(h,g){if(!Array.isArray(h))throw new TypeError('"list" argument must be an Array of Buffers');if(h.length===0)return j.alloc(0);let G;if(g===void 0)for(g=0,G=0;G<h.length;++G)g+=h[G].length;const Q=j.allocUnsafe(g);let X=0;for(G=0;G<h.length;++G){let ut=h[G];if(Qe(ut,L))X+ut.length>Q.length?(j.isBuffer(ut)||(ut=j.from(ut)),ut.copy(Q,X)):L.prototype.set.call(Q,ut,X);else if(j.isBuffer(ut))ut.copy(Q,X);else throw new TypeError('"list" argument must be an Array of Buffers');X+=ut.length}return Q};function ot(P,h){if(j.isBuffer(P))return P.length;if(V.isView(P)||Qe(P,V))return P.byteLength;if(typeof P!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof P);const g=P.length,G=arguments.length>2&&arguments[2]===!0;if(!G&&g===0)return 0;let Q=!1;for(;;)switch(h){case"ascii":case"latin1":case"binary":return g;case"utf8":case"utf-8":return $t(P).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return g*2;case"hex":return g>>>1;case"base64":return Vt(P).length;default:if(Q)return G?-1:$t(P).length;h=(""+h).toLowerCase(),Q=!0}}j.byteLength=ot;function mt(P,h,g){let G=!1;if((h===void 0||h<0)&&(h=0),h>this.length||((g===void 0||g>this.length)&&(g=this.length),g<=0)||(g>>>=0,h>>>=0,g<=h))return"";for(P||(P="utf8");;)switch(P){case"hex":return Ae(this,h,g);case"utf8":case"utf-8":return Nt(this,h,g);case"ascii":return ye(this,h,g);case"latin1":case"binary":return at(this,h,g);case"base64":return dt(this,h,g);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return me(this,h,g);default:if(G)throw new TypeError("Unknown encoding: "+P);P=(P+"").toLowerCase(),G=!0}}j.prototype._isBuffer=!0;function q(P,h,g){const G=P[h];P[h]=P[g],P[g]=G}j.prototype.swap16=function(){const h=this.length;if(h%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let g=0;g<h;g+=2)q(this,g,g+1);return this},j.prototype.swap32=function(){const h=this.length;if(h%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let g=0;g<h;g+=4)q(this,g,g+3),q(this,g+1,g+2);return this},j.prototype.swap64=function(){const h=this.length;if(h%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let g=0;g<h;g+=8)q(this,g,g+7),q(this,g+1,g+6),q(this,g+2,g+5),q(this,g+3,g+4);return this},j.prototype.toString=function(){const h=this.length;return h===0?"":arguments.length===0?Nt(this,0,h):mt.apply(this,arguments)},j.prototype.toLocaleString=j.prototype.toString,j.prototype.equals=function(h){if(!j.isBuffer(h))throw new TypeError("Argument must be a Buffer");return this===h?!0:j.compare(this,h)===0},j.prototype.inspect=function(){let h="";const g=B.INSPECT_MAX_BYTES;return h=this.toString("hex",0,g).replace(/(.{2})/g,"$1 ").trim(),this.length>g&&(h+=" ... "),"<Buffer "+h+">"},k&&(j.prototype[k]=j.prototype.inspect),j.prototype.compare=function(h,g,G,Q,X){if(Qe(h,L)&&(h=j.from(h,h.offset,h.byteLength)),!j.isBuffer(h))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof h);if(g===void 0&&(g=0),G===void 0&&(G=h?h.length:0),Q===void 0&&(Q=0),X===void 0&&(X=this.length),g<0||G>h.length||Q<0||X>this.length)throw new RangeError("out of range index");if(Q>=X&&g>=G)return 0;if(Q>=X)return-1;if(g>=G)return 1;if(g>>>=0,G>>>=0,Q>>>=0,X>>>=0,this===h)return 0;let ut=X-Q,Tt=G-g;const ie=Math.min(ut,Tt),ee=this.slice(Q,X),se=h.slice(g,G);for(let Jt=0;Jt<ie;++Jt)if(ee[Jt]!==se[Jt]){ut=ee[Jt],Tt=se[Jt];break}return ut<Tt?-1:Tt<ut?1:0};function H(P,h,g,G,Q){if(P.length===0)return-1;if(typeof g=="string"?(G=g,g=0):g>2147483647?g=2147483647:g<-2147483648&&(g=-2147483648),g=+g,U_(g)&&(g=Q?0:P.length-1),g<0&&(g=P.length+g),g>=P.length){if(Q)return-1;g=P.length-1}else if(g<0)if(Q)g=0;else return-1;if(typeof h=="string"&&(h=j.from(h,G)),j.isBuffer(h))return h.length===0?-1:it(P,h,g,G,Q);if(typeof h=="number")return h=h&255,typeof L.prototype.indexOf=="function"?Q?L.prototype.indexOf.call(P,h,g):L.prototype.lastIndexOf.call(P,h,g):it(P,[h],g,G,Q);throw new TypeError("val must be string, number or Buffer")}function it(P,h,g,G,Q){let X=1,ut=P.length,Tt=h.length;if(G!==void 0&&(G=String(G).toLowerCase(),G==="ucs2"||G==="ucs-2"||G==="utf16le"||G==="utf-16le")){if(P.length<2||h.length<2)return-1;X=2,ut/=2,Tt/=2,g/=2}function ie(se,Jt){return X===1?se[Jt]:se.readUInt16BE(Jt*X)}let ee;if(Q){let se=-1;for(ee=g;ee<ut;ee++)if(ie(P,ee)===ie(h,se===-1?0:ee-se)){if(se===-1&&(se=ee),ee-se+1===Tt)return se*X}else se!==-1&&(ee-=ee-se),se=-1}else for(g+Tt>ut&&(g=ut-Tt),ee=g;ee>=0;ee--){let se=!0;for(let Jt=0;Jt<Tt;Jt++)if(ie(P,ee+Jt)!==ie(h,Jt)){se=!1;break}if(se)return ee}return-1}j.prototype.includes=function(h,g,G){return this.indexOf(h,g,G)!==-1},j.prototype.indexOf=function(h,g,G){return H(this,h,g,G,!0)},j.prototype.lastIndexOf=function(h,g,G){return H(this,h,g,G,!1)};function lt(P,h,g,G){g=Number(g)||0;const Q=P.length-g;G?(G=Number(G),G>Q&&(G=Q)):G=Q;const X=h.length;G>X/2&&(G=X/2);let ut;for(ut=0;ut<G;++ut){const Tt=parseInt(h.substr(ut*2,2),16);if(U_(Tt))return ut;P[g+ut]=Tt}return ut}function pt(P,h,g,G){return Is($t(h,P.length-g),P,g,G)}function M(P,h,g,G){return Is(Zt(h),P,g,G)}function x(P,h,g,G){return Is(Vt(h),P,g,G)}function st(P,h,g,G){return Is(te(h,P.length-g),P,g,G)}j.prototype.write=function(h,g,G,Q){if(g===void 0)Q="utf8",G=this.length,g=0;else if(G===void 0&&typeof g=="string")Q=g,G=this.length,g=0;else if(isFinite(g))g=g>>>0,isFinite(G)?(G=G>>>0,Q===void 0&&(Q="utf8")):(Q=G,G=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const X=this.length-g;if((G===void 0||G>X)&&(G=X),h.length>0&&(G<0||g<0)||g>this.length)throw new RangeError("Attempt to write outside buffer bounds");Q||(Q="utf8");let ut=!1;for(;;)switch(Q){case"hex":return lt(this,h,g,G);case"utf8":case"utf-8":return pt(this,h,g,G);case"ascii":case"latin1":case"binary":return M(this,h,g,G);case"base64":return x(this,h,g,G);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return st(this,h,g,G);default:if(ut)throw new TypeError("Unknown encoding: "+Q);Q=(""+Q).toLowerCase(),ut=!0}},j.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function dt(P,h,g){return h===0&&g===P.length?O.fromByteArray(P):O.fromByteArray(P.slice(h,g))}function Nt(P,h,g){g=Math.min(P.length,g);const G=[];let Q=h;for(;Q<g;){const X=P[Q];let ut=null,Tt=X>239?4:X>223?3:X>191?2:1;if(Q+Tt<=g){let ie,ee,se,Jt;switch(Tt){case 1:X<128&&(ut=X);break;case 2:ie=P[Q+1],(ie&192)===128&&(Jt=(X&31)<<6|ie&63,Jt>127&&(ut=Jt));break;case 3:ie=P[Q+1],ee=P[Q+2],(ie&192)===128&&(ee&192)===128&&(Jt=(X&15)<<12|(ie&63)<<6|ee&63,Jt>2047&&(Jt<55296||Jt>57343)&&(ut=Jt));break;case 4:ie=P[Q+1],ee=P[Q+2],se=P[Q+3],(ie&192)===128&&(ee&192)===128&&(se&192)===128&&(Jt=(X&15)<<18|(ie&63)<<12|(ee&63)<<6|se&63,Jt>65535&&Jt<1114112&&(ut=Jt))}}ut===null?(ut=65533,Tt=1):ut>65535&&(ut-=65536,G.push(ut>>>10&1023|55296),ut=56320|ut&1023),G.push(ut),Q+=Tt}return Ot(G)}const St=4096;function Ot(P){const h=P.length;if(h<=St)return String.fromCharCode.apply(String,P);let g="",G=0;for(;G<h;)g+=String.fromCharCode.apply(String,P.slice(G,G+=St));return g}function ye(P,h,g){let G="";g=Math.min(P.length,g);for(let Q=h;Q<g;++Q)G+=String.fromCharCode(P[Q]&127);return G}function at(P,h,g){let G="";g=Math.min(P.length,g);for(let Q=h;Q<g;++Q)G+=String.fromCharCode(P[Q]);return G}function Ae(P,h,g){const G=P.length;(!h||h<0)&&(h=0),(!g||g<0||g>G)&&(g=G);let Q="";for(let X=h;X<g;++X)Q+=ku[P[X]];return Q}function me(P,h,g){const G=P.slice(h,g);let Q="";for(let X=0;X<G.length-1;X+=2)Q+=String.fromCharCode(G[X]+G[X+1]*256);return Q}j.prototype.slice=function(h,g){const G=this.length;h=~~h,g=g===void 0?G:~~g,h<0?(h+=G,h<0&&(h=0)):h>G&&(h=G),g<0?(g+=G,g<0&&(g=0)):g>G&&(g=G),g<h&&(g=h);const Q=this.subarray(h,g);return Object.setPrototypeOf(Q,j.prototype),Q};function Wt(P,h,g){if(P%1!==0||P<0)throw new RangeError("offset is not uint");if(P+h>g)throw new RangeError("Trying to access beyond buffer length")}j.prototype.readUintLE=j.prototype.readUIntLE=function(h,g,G){h=h>>>0,g=g>>>0,G||Wt(h,g,this.length);let Q=this[h],X=1,ut=0;for(;++ut<g&&(X*=256);)Q+=this[h+ut]*X;return Q},j.prototype.readUintBE=j.prototype.readUIntBE=function(h,g,G){h=h>>>0,g=g>>>0,G||Wt(h,g,this.length);let Q=this[h+--g],X=1;for(;g>0&&(X*=256);)Q+=this[h+--g]*X;return Q},j.prototype.readUint8=j.prototype.readUInt8=function(h,g){return h=h>>>0,g||Wt(h,1,this.length),this[h]},j.prototype.readUint16LE=j.prototype.readUInt16LE=function(h,g){return h=h>>>0,g||Wt(h,2,this.length),this[h]|this[h+1]<<8},j.prototype.readUint16BE=j.prototype.readUInt16BE=function(h,g){return h=h>>>0,g||Wt(h,2,this.length),this[h]<<8|this[h+1]},j.prototype.readUint32LE=j.prototype.readUInt32LE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),(this[h]|this[h+1]<<8|this[h+2]<<16)+this[h+3]*16777216},j.prototype.readUint32BE=j.prototype.readUInt32BE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),this[h]*16777216+(this[h+1]<<16|this[h+2]<<8|this[h+3])},j.prototype.readBigUInt64LE=br(function(h){h=h>>>0,Y(h,"offset");const g=this[h],G=this[h+7];(g===void 0||G===void 0)&&Z(h,this.length-8);const Q=g+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24,X=this[++h]+this[++h]*2**8+this[++h]*2**16+G*2**24;return BigInt(Q)+(BigInt(X)<<BigInt(32))}),j.prototype.readBigUInt64BE=br(function(h){h=h>>>0,Y(h,"offset");const g=this[h],G=this[h+7];(g===void 0||G===void 0)&&Z(h,this.length-8);const Q=g*2**24+this[++h]*2**16+this[++h]*2**8+this[++h],X=this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+G;return(BigInt(Q)<<BigInt(32))+BigInt(X)}),j.prototype.readIntLE=function(h,g,G){h=h>>>0,g=g>>>0,G||Wt(h,g,this.length);let Q=this[h],X=1,ut=0;for(;++ut<g&&(X*=256);)Q+=this[h+ut]*X;return X*=128,Q>=X&&(Q-=Math.pow(2,8*g)),Q},j.prototype.readIntBE=function(h,g,G){h=h>>>0,g=g>>>0,G||Wt(h,g,this.length);let Q=g,X=1,ut=this[h+--Q];for(;Q>0&&(X*=256);)ut+=this[h+--Q]*X;return X*=128,ut>=X&&(ut-=Math.pow(2,8*g)),ut},j.prototype.readInt8=function(h,g){return h=h>>>0,g||Wt(h,1,this.length),this[h]&128?(255-this[h]+1)*-1:this[h]},j.prototype.readInt16LE=function(h,g){h=h>>>0,g||Wt(h,2,this.length);const G=this[h]|this[h+1]<<8;return G&32768?G|4294901760:G},j.prototype.readInt16BE=function(h,g){h=h>>>0,g||Wt(h,2,this.length);const G=this[h+1]|this[h]<<8;return G&32768?G|4294901760:G},j.prototype.readInt32LE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),this[h]|this[h+1]<<8|this[h+2]<<16|this[h+3]<<24},j.prototype.readInt32BE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),this[h]<<24|this[h+1]<<16|this[h+2]<<8|this[h+3]},j.prototype.readBigInt64LE=br(function(h){h=h>>>0,Y(h,"offset");const g=this[h],G=this[h+7];(g===void 0||G===void 0)&&Z(h,this.length-8);const Q=this[h+4]+this[h+5]*2**8+this[h+6]*2**16+(G<<24);return(BigInt(Q)<<BigInt(32))+BigInt(g+this[++h]*2**8+this[++h]*2**16+this[++h]*2**24)}),j.prototype.readBigInt64BE=br(function(h){h=h>>>0,Y(h,"offset");const g=this[h],G=this[h+7];(g===void 0||G===void 0)&&Z(h,this.length-8);const Q=(g<<24)+this[++h]*2**16+this[++h]*2**8+this[++h];return(BigInt(Q)<<BigInt(32))+BigInt(this[++h]*2**24+this[++h]*2**16+this[++h]*2**8+G)}),j.prototype.readFloatLE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),C.read(this,h,!0,23,4)},j.prototype.readFloatBE=function(h,g){return h=h>>>0,g||Wt(h,4,this.length),C.read(this,h,!1,23,4)},j.prototype.readDoubleLE=function(h,g){return h=h>>>0,g||Wt(h,8,this.length),C.read(this,h,!0,52,8)},j.prototype.readDoubleBE=function(h,g){return h=h>>>0,g||Wt(h,8,this.length),C.read(this,h,!1,52,8)};function Xt(P,h,g,G,Q,X){if(!j.isBuffer(P))throw new TypeError('"buffer" argument must be a Buffer instance');if(h>Q||h<X)throw new RangeError('"value" argument is out of bounds');if(g+G>P.length)throw new RangeError("Index out of range")}j.prototype.writeUintLE=j.prototype.writeUIntLE=function(h,g,G,Q){if(h=+h,g=g>>>0,G=G>>>0,!Q){const Tt=Math.pow(2,8*G)-1;Xt(this,h,g,G,Tt,0)}let X=1,ut=0;for(this[g]=h&255;++ut<G&&(X*=256);)this[g+ut]=h/X&255;return g+G},j.prototype.writeUintBE=j.prototype.writeUIntBE=function(h,g,G,Q){if(h=+h,g=g>>>0,G=G>>>0,!Q){const Tt=Math.pow(2,8*G)-1;Xt(this,h,g,G,Tt,0)}let X=G-1,ut=1;for(this[g+X]=h&255;--X>=0&&(ut*=256);)this[g+X]=h/ut&255;return g+G},j.prototype.writeUint8=j.prototype.writeUInt8=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,1,255,0),this[g]=h&255,g+1},j.prototype.writeUint16LE=j.prototype.writeUInt16LE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,2,65535,0),this[g]=h&255,this[g+1]=h>>>8,g+2},j.prototype.writeUint16BE=j.prototype.writeUInt16BE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,2,65535,0),this[g]=h>>>8,this[g+1]=h&255,g+2},j.prototype.writeUint32LE=j.prototype.writeUInt32LE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,4,4294967295,0),this[g+3]=h>>>24,this[g+2]=h>>>16,this[g+1]=h>>>8,this[g]=h&255,g+4},j.prototype.writeUint32BE=j.prototype.writeUInt32BE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,4,4294967295,0),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4};function Se(P,h,g,G,Q){T(h,G,Q,P,g,7);let X=Number(h&BigInt(4294967295));P[g++]=X,X=X>>8,P[g++]=X,X=X>>8,P[g++]=X,X=X>>8,P[g++]=X;let ut=Number(h>>BigInt(32)&BigInt(4294967295));return P[g++]=ut,ut=ut>>8,P[g++]=ut,ut=ut>>8,P[g++]=ut,ut=ut>>8,P[g++]=ut,g}function be(P,h,g,G,Q){T(h,G,Q,P,g,7);let X=Number(h&BigInt(4294967295));P[g+7]=X,X=X>>8,P[g+6]=X,X=X>>8,P[g+5]=X,X=X>>8,P[g+4]=X;let ut=Number(h>>BigInt(32)&BigInt(4294967295));return P[g+3]=ut,ut=ut>>8,P[g+2]=ut,ut=ut>>8,P[g+1]=ut,ut=ut>>8,P[g]=ut,g+8}j.prototype.writeBigUInt64LE=br(function(h,g=0){return Se(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),j.prototype.writeBigUInt64BE=br(function(h,g=0){return be(this,h,g,BigInt(0),BigInt("0xffffffffffffffff"))}),j.prototype.writeIntLE=function(h,g,G,Q){if(h=+h,g=g>>>0,!Q){const ie=Math.pow(2,8*G-1);Xt(this,h,g,G,ie-1,-ie)}let X=0,ut=1,Tt=0;for(this[g]=h&255;++X<G&&(ut*=256);)h<0&&Tt===0&&this[g+X-1]!==0&&(Tt=1),this[g+X]=(h/ut>>0)-Tt&255;return g+G},j.prototype.writeIntBE=function(h,g,G,Q){if(h=+h,g=g>>>0,!Q){const ie=Math.pow(2,8*G-1);Xt(this,h,g,G,ie-1,-ie)}let X=G-1,ut=1,Tt=0;for(this[g+X]=h&255;--X>=0&&(ut*=256);)h<0&&Tt===0&&this[g+X+1]!==0&&(Tt=1),this[g+X]=(h/ut>>0)-Tt&255;return g+G},j.prototype.writeInt8=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,1,127,-128),h<0&&(h=255+h+1),this[g]=h&255,g+1},j.prototype.writeInt16LE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,2,32767,-32768),this[g]=h&255,this[g+1]=h>>>8,g+2},j.prototype.writeInt16BE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,2,32767,-32768),this[g]=h>>>8,this[g+1]=h&255,g+2},j.prototype.writeInt32LE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,4,2147483647,-2147483648),this[g]=h&255,this[g+1]=h>>>8,this[g+2]=h>>>16,this[g+3]=h>>>24,g+4},j.prototype.writeInt32BE=function(h,g,G){return h=+h,g=g>>>0,G||Xt(this,h,g,4,2147483647,-2147483648),h<0&&(h=4294967295+h+1),this[g]=h>>>24,this[g+1]=h>>>16,this[g+2]=h>>>8,this[g+3]=h&255,g+4},j.prototype.writeBigInt64LE=br(function(h,g=0){return Se(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),j.prototype.writeBigInt64BE=br(function(h,g=0){return be(this,h,g,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function De(P,h,g,G,Q,X){if(g+G>P.length)throw new RangeError("Index out of range");if(g<0)throw new RangeError("Index out of range")}function qe(P,h,g,G,Q){return h=+h,g=g>>>0,Q||De(P,h,g,4),C.write(P,h,g,G,23,4),g+4}j.prototype.writeFloatLE=function(h,g,G){return qe(this,h,g,!0,G)},j.prototype.writeFloatBE=function(h,g,G){return qe(this,h,g,!1,G)};function de(P,h,g,G,Q){return h=+h,g=g>>>0,Q||De(P,h,g,8),C.write(P,h,g,G,52,8),g+8}j.prototype.writeDoubleLE=function(h,g,G){return de(this,h,g,!0,G)},j.prototype.writeDoubleBE=function(h,g,G){return de(this,h,g,!1,G)},j.prototype.copy=function(h,g,G,Q){if(!j.isBuffer(h))throw new TypeError("argument should be a Buffer");if(G||(G=0),!Q&&Q!==0&&(Q=this.length),g>=h.length&&(g=h.length),g||(g=0),Q>0&&Q<G&&(Q=G),Q===G||h.length===0||this.length===0)return 0;if(g<0)throw new RangeError("targetStart out of bounds");if(G<0||G>=this.length)throw new RangeError("Index out of range");if(Q<0)throw new RangeError("sourceEnd out of bounds");Q>this.length&&(Q=this.length),h.length-g<Q-G&&(Q=h.length-g+G);const X=Q-G;return this===h&&typeof L.prototype.copyWithin=="function"?this.copyWithin(g,G,Q):L.prototype.set.call(h,this.subarray(G,Q),g),X},j.prototype.fill=function(h,g,G,Q){if(typeof h=="string"){if(typeof g=="string"?(Q=g,g=0,G=this.length):typeof G=="string"&&(Q=G,G=this.length),Q!==void 0&&typeof Q!="string")throw new TypeError("encoding must be a string");if(typeof Q=="string"&&!j.isEncoding(Q))throw new TypeError("Unknown encoding: "+Q);if(h.length===1){const ut=h.charCodeAt(0);(Q==="utf8"&&ut<128||Q==="latin1")&&(h=ut)}}else typeof h=="number"?h=h&255:typeof h=="boolean"&&(h=Number(h));if(g<0||this.length<g||this.length<G)throw new RangeError("Out of range index");if(G<=g)return this;g=g>>>0,G=G===void 0?this.length:G>>>0,h||(h=0);let X;if(typeof h=="number")for(X=g;X<G;++X)this[X]=h;else{const ut=j.isBuffer(h)?h:j.from(h,Q),Tt=ut.length;if(Tt===0)throw new TypeError('The value "'+h+'" is invalid for argument "value"');for(X=0;X<G-g;++X)this[X+g]=ut[X%Tt]}return this};const gr={};function E(P,h,g){gr[P]=class extends g{constructor(){super(),Object.defineProperty(this,"message",{value:h.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${P}]`,this.stack,delete this.name}get code(){return P}set code(Q){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:Q,writable:!0})}toString(){return`${this.name} [${P}]: ${this.message}`}}}E("ERR_BUFFER_OUT_OF_BOUNDS",function(P){return P?`${P} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),E("ERR_INVALID_ARG_TYPE",function(P,h){return`The "${P}" argument must be of type number. Received type ${typeof h}`},TypeError),E("ERR_OUT_OF_RANGE",function(P,h,g){let G=`The value of "${P}" is out of range.`,Q=g;return Number.isInteger(g)&&Math.abs(g)>2**32?Q=p(String(g)):typeof g=="bigint"&&(Q=String(g),(g>BigInt(2)**BigInt(32)||g<-(BigInt(2)**BigInt(32)))&&(Q=p(Q)),Q+="n"),G+=` It must be ${h}. Received ${Q}`,G},RangeError);function p(P){let h="",g=P.length;const G=P[0]==="-"?1:0;for(;g>=G+4;g-=3)h=`_${P.slice(g-3,g)}${h}`;return`${P.slice(0,g)}${h}`}function w(P,h,g){Y(h,"offset"),(P[h]===void 0||P[h+g]===void 0)&&Z(h,P.length-(g+1))}function T(P,h,g,G,Q,X){if(P>g||P<h){const ut=typeof h=="bigint"?"n":"";let Tt;throw h===0||h===BigInt(0)?Tt=`>= 0${ut} and < 2${ut} ** ${(X+1)*8}${ut}`:Tt=`>= -(2${ut} ** ${(X+1)*8-1}${ut}) and < 2 ** ${(X+1)*8-1}${ut}`,new gr.ERR_OUT_OF_RANGE("value",Tt,P)}w(G,Q,X)}function Y(P,h){if(typeof P!="number")throw new gr.ERR_INVALID_ARG_TYPE(h,"number",P)}function Z(P,h,g){throw Math.floor(P)!==P?(Y(P,g),new gr.ERR_OUT_OF_RANGE("offset","an integer",P)):h<0?new gr.ERR_BUFFER_OUT_OF_BOUNDS:new gr.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${h}`,P)}const ct=/[^+/0-9A-Za-z-_]/g;function kt(P){if(P=P.split("=")[0],P=P.trim().replace(ct,""),P.length<2)return"";for(;P.length%4!==0;)P=P+"=";return P}function $t(P,h){h=h||1/0;let g;const G=P.length;let Q=null;const X=[];for(let ut=0;ut<G;++ut){if(g=P.charCodeAt(ut),g>55295&&g<57344){if(!Q){if(g>56319){(h-=3)>-1&&X.push(239,191,189);continue}else if(ut+1===G){(h-=3)>-1&&X.push(239,191,189);continue}Q=g;continue}if(g<56320){(h-=3)>-1&&X.push(239,191,189),Q=g;continue}g=(Q-55296<<10|g-56320)+65536}else Q&&(h-=3)>-1&&X.push(239,191,189);if(Q=null,g<128){if((h-=1)<0)break;X.push(g)}else if(g<2048){if((h-=2)<0)break;X.push(g>>6|192,g&63|128)}else if(g<65536){if((h-=3)<0)break;X.push(g>>12|224,g>>6&63|128,g&63|128)}else if(g<1114112){if((h-=4)<0)break;X.push(g>>18|240,g>>12&63|128,g>>6&63|128,g&63|128)}else throw new Error("Invalid code point")}return X}function Zt(P){const h=[];for(let g=0;g<P.length;++g)h.push(P.charCodeAt(g)&255);return h}function te(P,h){let g,G,Q;const X=[];for(let ut=0;ut<P.length&&!((h-=2)<0);++ut)g=P.charCodeAt(ut),G=g>>8,Q=g%256,X.push(Q),X.push(G);return X}function Vt(P){return O.toByteArray(kt(P))}function Is(P,h,g,G){let Q;for(Q=0;Q<G&&!(Q+g>=h.length||Q>=P.length);++Q)h[Q+g]=P[Q];return Q}function Qe(P,h){return P instanceof h||P!=null&&P.constructor!=null&&P.constructor.name!=null&&P.constructor.name===h.name}function U_(P){return P!==P}const ku=function(){const P="0123456789abcdef",h=new Array(256);for(let g=0;g<16;++g){const G=g*16;for(let Q=0;Q<16;++Q)h[G+Q]=P[g]+P[Q]}return h}();function br(P){return typeof BigInt>"u"?Tu:P}function Tu(){throw new Error("BigInt not supported")}})(t);const z=t.Buffer;n.Blob=t.Blob,n.BlobOptions=t.BlobOptions,n.Buffer=t.Buffer,n.File=t.File,n.FileOptions=t.FileOptions,n.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,n.SlowBuffer=t.SlowBuffer,n.TranscodeEncoding=t.TranscodeEncoding,n.atob=t.atob,n.btoa=t.btoa,n.constants=t.constants,n.default=z,n.isAscii=t.isAscii,n.isUtf8=t.isUtf8,n.kMaxLength=t.kMaxLength,n.kStringMaxLength=t.kStringMaxLength,n.resolveObjectURL=t.resolveObjectURL,n.transcode=t.transcode}(yp)),yp}var Ap={},mp={},Sp,q0;function Q0(){return q0||(q0=1,Sp=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var _ in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var c=Object.getOwnPropertyDescriptor(t,e);if(c.value!==i||c.enumerable!==!0)return!1}return!0}),Sp}var Rp,W0;function Ep(){if(W0)return Rp;W0=1;var n=Q0();return Rp=function(){return n()&&!!Symbol.toStringTag},Rp}var Pp,J0;function $0(){return J0||(J0=1,Pp=Object),Pp}var zp,Z0;function kz(){return Z0||(Z0=1,zp=Error),zp}var vp,X0;function Tz(){return X0||(X0=1,vp=EvalError),vp}var Mp,t1;function Gz(){return t1||(t1=1,Mp=RangeError),Mp}var Bp,e1;function Uz(){return e1||(e1=1,Bp=ReferenceError),Bp}var xp,r1;function n1(){return r1||(r1=1,xp=SyntaxError),xp}var Cp,i1;function xf(){return i1||(i1=1,Cp=TypeError),Cp}var Ip,s1;function Fz(){return s1||(s1=1,Ip=URIError),Ip}var Np,_1;function Kz(){return _1||(_1=1,Np=Math.abs),Np}var Op,o1;function Dz(){return o1||(o1=1,Op=Math.floor),Op}var kp,a1;function Lz(){return a1||(a1=1,kp=Math.max),kp}var Tp,c1;function jz(){return c1||(c1=1,Tp=Math.min),Tp}var Gp,u1;function Vz(){return u1||(u1=1,Gp=Math.pow),Gp}var Up,f1;function Yz(){return f1||(f1=1,Up=Math.round),Up}var Fp,l1;function Hz(){return l1||(l1=1,Fp=Number.isNaN||function(t){return t!==t}),Fp}var Kp,p1;function qz(){if(p1)return Kp;p1=1;var n=Hz();return Kp=function(e){return n(e)||e===0?e:e<0?-1:1},Kp}var Dp,h1;function Qz(){return h1||(h1=1,Dp=Object.getOwnPropertyDescriptor),Dp}var Lp,w1;function cu(){if(w1)return Lp;w1=1;var n=Qz();if(n)try{n([],"length")}catch{n=null}return Lp=n,Lp}var jp,d1;function Cf(){if(d1)return jp;d1=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return jp=n,jp}var Vp,g1;function Wz(){if(g1)return Vp;g1=1;var n=typeof Symbol<"u"&&Symbol,t=Q0();return Vp=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Vp}var Yp,b1;function y1(){return b1||(b1=1,Yp=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Yp}var Hp,A1;function m1(){if(A1)return Hp;A1=1;var n=$0();return Hp=n.getPrototypeOf||null,Hp}var qp,S1;function Jz(){if(S1)return qp;S1=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(u,l){for(var f=[],d=0;d<u.length;d+=1)f[d]=u[d];for(var y=0;y<l.length;y+=1)f[y+u.length]=l[y];return f},_=function(u,l){for(var f=[],d=l,y=0;d<u.length;d+=1,y+=1)f[y]=u[d];return f},a=function(c,u){for(var l="",f=0;f<c.length;f+=1)l+=c[f],f+1<c.length&&(l+=u);return l};return qp=function(u){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(n+l);for(var f=_(arguments,1),d,y=function(){if(this instanceof d){var z=l.apply(this,i(f,arguments));return Object(z)===z?z:this}return l.apply(u,i(f,arguments))},v=e(0,l.length-f.length),N=[],I=0;I<v;I++)N[I]="$"+I;if(d=Function("binder","return function ("+a(N,",")+"){ return binder.apply(this,arguments); }")(y),l.prototype){var U=function(){};U.prototype=l.prototype,d.prototype=new U,U.prototype=null}return d},qp}var Qp,R1;function uu(){if(R1)return Qp;R1=1;var n=Jz();return Qp=Function.prototype.bind||n,Qp}var Wp,E1;function Jp(){return E1||(E1=1,Wp=Function.prototype.call),Wp}var $p,P1;function Zp(){return P1||(P1=1,$p=Function.prototype.apply),$p}var Xp,z1;function $z(){return z1||(z1=1,Xp=typeof Reflect<"u"&&Reflect&&Reflect.apply),Xp}var th,v1;function M1(){if(v1)return th;v1=1;var n=uu(),t=Zp(),e=Jp(),r=$z();return th=r||n.call(e,t),th}var eh,B1;function rh(){if(B1)return eh;B1=1;var n=uu(),t=xf(),e=Jp(),r=M1();return eh=function(_){if(_.length<1||typeof _[0]!="function")throw new t("a function is required");return r(n,e,_)},eh}var nh,x1;function Zz(){if(x1)return nh;x1=1;var n=rh(),t=cu(),e;try{e=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,_=i.getPrototypeOf;return nh=r&&typeof r.get=="function"?n([r.get]):typeof _=="function"?function(c){return _(c==null?c:i(c))}:!1,nh}var ih,C1;function I1(){if(C1)return ih;C1=1;var n=y1(),t=m1(),e=Zz();return ih=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,ih}var sh,N1;function Xz(){if(N1)return sh;N1=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=uu();return sh=e.call(n,t),sh}var _h,O1;function k1(){if(O1)return _h;O1=1;var n,t=$0(),e=kz(),r=Tz(),i=Gz(),_=Uz(),a=n1(),c=xf(),u=Fz(),l=Kz(),f=Dz(),d=Lz(),y=jz(),v=Vz(),N=Yz(),I=qz(),U=Function,z=function(lt){try{return U('"use strict"; return ('+lt+").constructor;")()}catch{}},B=cu(),O=Cf(),C=function(){throw new c},k=B?function(){try{return arguments.callee,C}catch{try{return B(arguments,"callee").get}catch{return C}}}():C,D=Wz()(),L=I1(),V=m1(),tt=y1(),rt=Zp(),wt=Jp(),j={},Pt=typeof Uint8Array>"u"||!L?n:L(Uint8Array),xt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":D&&L?L([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":j,"%AsyncGenerator%":j,"%AsyncGeneratorFunction%":j,"%AsyncIteratorPrototype%":j,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":U,"%GeneratorFunction%":j,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":D&&L?L(L([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!D||!L?n:L(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":B,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":_,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!D||!L?n:L(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":D&&L?L(""[Symbol.iterator]()):n,"%Symbol%":D?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":Pt,"%TypeError%":c,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":u,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":wt,"%Function.prototype.apply%":rt,"%Object.defineProperty%":O,"%Object.getPrototypeOf%":V,"%Math.abs%":l,"%Math.floor%":f,"%Math.max%":d,"%Math.min%":y,"%Math.pow%":v,"%Math.round%":N,"%Math.sign%":I,"%Reflect.getPrototypeOf%":tt};if(L)try{null.error}catch(lt){var ft=L(L(lt));xt["%Error.prototype%"]=ft}var yt=function lt(pt){var M;if(pt==="%AsyncFunction%")M=z("async function () {}");else if(pt==="%GeneratorFunction%")M=z("function* () {}");else if(pt==="%AsyncGeneratorFunction%")M=z("async function* () {}");else if(pt==="%AsyncGenerator%"){var x=lt("%AsyncGeneratorFunction%");x&&(M=x.prototype)}else if(pt==="%AsyncIteratorPrototype%"){var st=lt("%AsyncGenerator%");st&&L&&(M=L(st.prototype))}return xt[pt]=M,M},zt={__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"]},Bt=uu(),Mt=Xz(),It=Bt.call(wt,Array.prototype.concat),Qt=Bt.call(rt,Array.prototype.splice),J=Bt.call(wt,String.prototype.replace),nt=Bt.call(wt,String.prototype.slice),ot=Bt.call(wt,RegExp.prototype.exec),mt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,q=/\\(\\)?/g,H=function(pt){var M=nt(pt,0,1),x=nt(pt,-1);if(M==="%"&&x!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(x==="%"&&M!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var st=[];return J(pt,mt,function(dt,Nt,St,Ot){st[st.length]=St?J(Ot,q,"$1"):Nt||dt}),st},it=function(pt,M){var x=pt,st;if(Mt(zt,x)&&(st=zt[x],x="%"+st[0]+"%"),Mt(xt,x)){var dt=xt[x];if(dt===j&&(dt=yt(x)),typeof dt>"u"&&!M)throw new c("intrinsic "+pt+" exists, but is not available. Please file an issue!");return{alias:st,name:x,value:dt}}throw new a("intrinsic "+pt+" does not exist!")};return _h=function(pt,M){if(typeof pt!="string"||pt.length===0)throw new c("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof M!="boolean")throw new c('"allowMissing" argument must be a boolean');if(ot(/^%?[^%]*%?$/,pt)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var x=H(pt),st=x.length>0?x[0]:"",dt=it("%"+st+"%",M),Nt=dt.name,St=dt.value,Ot=!1,ye=dt.alias;ye&&(st=ye[0],Qt(x,It([0,1],ye)));for(var at=1,Ae=!0;at<x.length;at+=1){var me=x[at],Wt=nt(me,0,1),Xt=nt(me,-1);if((Wt==='"'||Wt==="'"||Wt==="`"||Xt==='"'||Xt==="'"||Xt==="`")&&Wt!==Xt)throw new a("property names with quotes must have matching quotes");if((me==="constructor"||!Ae)&&(Ot=!0),st+="."+me,Nt="%"+st+"%",Mt(xt,Nt))St=xt[Nt];else if(St!=null){if(!(me in St)){if(!M)throw new c("base intrinsic for "+pt+" exists, but the property is not available.");return}if(B&&at+1>=x.length){var Se=B(St,me);Ae=!!Se,Ae&&"get"in Se&&!("originalValue"in Se.get)?St=Se.get:St=St[me]}else Ae=Mt(St,me),St=St[me];Ae&&!Ot&&(xt[Nt]=St)}}return St},_h}var oh,T1;function G1(){if(T1)return oh;T1=1;var n=k1(),t=rh(),e=t([n("%String.prototype.indexOf%")]);return oh=function(i,_){var a=n(i,!!_);return typeof a=="function"&&e(i,".prototype.")>-1?t([a]):a},oh}var ah,U1;function tv(){if(U1)return ah;U1=1;var n=Ep()(),t=G1(),e=t("Object.prototype.toString"),r=function(c){return n&&c&&typeof c=="object"&&Symbol.toStringTag in c?!1:e(c)==="[object Arguments]"},i=function(c){return r(c)?!0:c!==null&&typeof c=="object"&&"length"in c&&typeof c.length=="number"&&c.length>=0&&e(c)!=="[object Array]"&&"callee"in c&&e(c.callee)==="[object Function]"},_=function(){return r(arguments)}();return r.isLegacyArguments=i,ah=_?r:i,ah}var ch,F1;function ev(){if(F1)return ch;F1=1;var n=Object.prototype.toString,t=Function.prototype.toString,e=/^\s*(?:function)?\*/,r=Ep()(),i=Object.getPrototypeOf,_=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return ch=function(u){if(typeof u!="function")return!1;if(e.test(t.call(u)))return!0;if(!r){var l=n.call(u);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=_();a=f?i(f):!1}return i(u)===a},ch}var uh,K1;function rv(){if(K1)return uh;K1=1;var n=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,e)}catch(B){B!==r&&(t=null)}else t=null;var i=/^\s*class\b/,_=function(O){try{var C=n.call(O);return i.test(C)}catch{return!1}},a=function(O){try{return _(O)?!1:(n.call(O),!0)}catch{return!1}},c=Object.prototype.toString,u="[object Object]",l="[object Function]",f="[object GeneratorFunction]",d="[object HTMLAllCollection]",y="[object HTML document.all class]",v="[object HTMLCollection]",N=typeof Symbol=="function"&&!!Symbol.toStringTag,I=!(0 in[,]),U=function(){return!1};if(typeof document=="object"){var z=document.all;c.call(z)===c.call(document.all)&&(U=function(O){if((I||!O)&&(typeof O>"u"||typeof O=="object"))try{var C=c.call(O);return(C===d||C===y||C===v||C===u)&&O("")==null}catch{}return!1})}return uh=t?function(O){if(U(O))return!0;if(!O||typeof O!="function"&&typeof O!="object")return!1;try{t(O,null,e)}catch(C){if(C!==r)return!1}return!_(O)&&a(O)}:function(O){if(U(O))return!0;if(!O||typeof O!="function"&&typeof O!="object")return!1;if(N)return a(O);if(_(O))return!1;var C=c.call(O);return C!==l&&C!==f&&!/^\[object HTML/.test(C)?!1:a(O)},uh}var fh,D1;function nv(){if(D1)return fh;D1=1;var n=rv(),t=Object.prototype.toString,e=Object.prototype.hasOwnProperty,r=function(u,l,f){for(var d=0,y=u.length;d<y;d++)e.call(u,d)&&(f==null?l(u[d],d,u):l.call(f,u[d],d,u))},i=function(u,l,f){for(var d=0,y=u.length;d<y;d++)f==null?l(u.charAt(d),d,u):l.call(f,u.charAt(d),d,u)},_=function(u,l,f){for(var d in u)e.call(u,d)&&(f==null?l(u[d],d,u):l.call(f,u[d],d,u))};function a(c){return t.call(c)==="[object Array]"}return fh=function(u,l,f){if(!n(l))throw new TypeError("iterator must be a function");var d;arguments.length>=3&&(d=f),a(u)?r(u,l,d):typeof u=="string"?i(u,l,d):_(u,l,d)},fh}var lh,L1;function iv(){return L1||(L1=1,lh=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),lh}var ph,j1;function sv(){if(j1)return ph;j1=1;var n=iv(),t=typeof globalThis>"u"?us:globalThis;return ph=function(){for(var r=[],i=0;i<n.length;i++)typeof t[n[i]]=="function"&&(r[r.length]=n[i]);return r},ph}var hh={exports:{}},wh,V1;function _v(){if(V1)return wh;V1=1;var n=Cf(),t=n1(),e=xf(),r=cu();return wh=function(_,a,c){if(!_||typeof _!="object"&&typeof _!="function")throw new e("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var u=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,d=arguments.length>6?arguments[6]:!1,y=!!r&&r(_,a);if(n)n(_,a,{configurable:f===null&&y?y.configurable:!f,enumerable:u===null&&y?y.enumerable:!u,value:c,writable:l===null&&y?y.writable:!l});else if(d||!u&&!l&&!f)_[a]=c;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},wh}var dh,Y1;function ov(){if(Y1)return dh;Y1=1;var n=Cf(),t=function(){return!!n};return t.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},dh=t,dh}var gh,H1;function av(){if(H1)return gh;H1=1;var n=k1(),t=_v(),e=ov()(),r=cu(),i=xf(),_=n("%Math.floor%");return gh=function(c,u){if(typeof c!="function")throw new i("`fn` is not a function");if(typeof u!="number"||u<0||u>4294967295||_(u)!==u)throw new i("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],f=!0,d=!0;if("length"in c&&r){var y=r(c,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(d=!1)}return(f||d||!l)&&(e?t(c,"length",u,!0,!0):t(c,"length",u)),c},gh}var bh,q1;function cv(){if(q1)return bh;q1=1;var n=uu(),t=Zp(),e=M1();return bh=function(){return e(n,t,arguments)},bh}var Q1;function uv(){return Q1||(Q1=1,function(n){var t=av(),e=Cf(),r=rh(),i=cv();n.exports=function(a){var c=r(arguments),u=a.length-(arguments.length-1);return t(c,1+(u>0?u:0),!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i}(hh)),hh.exports}var yh,W1;function J1(){if(W1)return yh;W1=1;var n=nv(),t=sv(),e=uv(),r=G1(),i=cu(),_=I1(),a=r("Object.prototype.toString"),c=Ep()(),u=typeof globalThis>"u"?us:globalThis,l=t(),f=r("String.prototype.slice"),d=r("Array.prototype.indexOf",!0)||function(U,z){for(var B=0;B<U.length;B+=1)if(U[B]===z)return B;return-1},y={__proto__:null};c&&i&&_?n(l,function(I){var U=new u[I];if(Symbol.toStringTag in U&&_){var z=_(U),B=i(z,Symbol.toStringTag);if(!B&&z){var O=_(z);B=i(O,Symbol.toStringTag)}y["$"+I]=e(B.get)}}):n(l,function(I){var U=new u[I],z=U.slice||U.set;z&&(y["$"+I]=e(z))});var v=function(U){var z=!1;return n(y,function(B,O){if(!z)try{"$"+B(U)===O&&(z=f(O,1))}catch{}}),z},N=function(U){var z=!1;return n(y,function(B,O){if(!z)try{B(U),z=f(O,1)}catch{}}),z};return yh=function(U){if(!U||typeof U!="object")return!1;if(!c){var z=f(a(U),8,-1);return d(l,z)>-1?z:z!=="Object"?!1:N(U)}return i?v(U):null},yh}var Ah,$1;function fv(){if($1)return Ah;$1=1;var n=J1();return Ah=function(e){return!!n(e)},Ah}var Z1;function lv(){return Z1||(Z1=1,function(n){var t=tv(),e=ev(),r=J1(),i=fv();function _(at){return at.call.bind(at)}var a=typeof BigInt<"u",c=typeof Symbol<"u",u=_(Object.prototype.toString),l=_(Number.prototype.valueOf),f=_(String.prototype.valueOf),d=_(Boolean.prototype.valueOf);if(a)var y=_(BigInt.prototype.valueOf);if(c)var v=_(Symbol.prototype.valueOf);function N(at,Ae){if(typeof at!="object")return!1;try{return Ae(at),!0}catch{return!1}}n.isArgumentsObject=t,n.isGeneratorFunction=e,n.isTypedArray=i;function I(at){return typeof Promise<"u"&&at instanceof Promise||at!==null&&typeof at=="object"&&typeof at.then=="function"&&typeof at.catch=="function"}n.isPromise=I;function U(at){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(at):i(at)||nt(at)}n.isArrayBufferView=U;function z(at){return r(at)==="Uint8Array"}n.isUint8Array=z;function B(at){return r(at)==="Uint8ClampedArray"}n.isUint8ClampedArray=B;function O(at){return r(at)==="Uint16Array"}n.isUint16Array=O;function C(at){return r(at)==="Uint32Array"}n.isUint32Array=C;function k(at){return r(at)==="Int8Array"}n.isInt8Array=k;function D(at){return r(at)==="Int16Array"}n.isInt16Array=D;function L(at){return r(at)==="Int32Array"}n.isInt32Array=L;function V(at){return r(at)==="Float32Array"}n.isFloat32Array=V;function tt(at){return r(at)==="Float64Array"}n.isFloat64Array=tt;function rt(at){return r(at)==="BigInt64Array"}n.isBigInt64Array=rt;function wt(at){return r(at)==="BigUint64Array"}n.isBigUint64Array=wt;function j(at){return u(at)==="[object Map]"}j.working=typeof Map<"u"&&j(new Map);function Pt(at){return typeof Map>"u"?!1:j.working?j(at):at instanceof Map}n.isMap=Pt;function xt(at){return u(at)==="[object Set]"}xt.working=typeof Set<"u"&&xt(new Set);function ft(at){return typeof Set>"u"?!1:xt.working?xt(at):at instanceof Set}n.isSet=ft;function yt(at){return u(at)==="[object WeakMap]"}yt.working=typeof WeakMap<"u"&&yt(new WeakMap);function zt(at){return typeof WeakMap>"u"?!1:yt.working?yt(at):at instanceof WeakMap}n.isWeakMap=zt;function Bt(at){return u(at)==="[object WeakSet]"}Bt.working=typeof WeakSet<"u"&&Bt(new WeakSet);function Mt(at){return Bt(at)}n.isWeakSet=Mt;function It(at){return u(at)==="[object ArrayBuffer]"}It.working=typeof ArrayBuffer<"u"&&It(new ArrayBuffer);function Qt(at){return typeof ArrayBuffer>"u"?!1:It.working?It(at):at instanceof ArrayBuffer}n.isArrayBuffer=Qt;function J(at){return u(at)==="[object DataView]"}J.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&J(new DataView(new ArrayBuffer(1),0,1));function nt(at){return typeof DataView>"u"?!1:J.working?J(at):at instanceof DataView}n.isDataView=nt;var ot=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function mt(at){return u(at)==="[object SharedArrayBuffer]"}function q(at){return typeof ot>"u"?!1:(typeof mt.working>"u"&&(mt.working=mt(new ot)),mt.working?mt(at):at instanceof ot)}n.isSharedArrayBuffer=q;function H(at){return u(at)==="[object AsyncFunction]"}n.isAsyncFunction=H;function it(at){return u(at)==="[object Map Iterator]"}n.isMapIterator=it;function lt(at){return u(at)==="[object Set Iterator]"}n.isSetIterator=lt;function pt(at){return u(at)==="[object Generator]"}n.isGeneratorObject=pt;function M(at){return u(at)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=M;function x(at){return N(at,l)}n.isNumberObject=x;function st(at){return N(at,f)}n.isStringObject=st;function dt(at){return N(at,d)}n.isBooleanObject=dt;function Nt(at){return a&&N(at,y)}n.isBigIntObject=Nt;function St(at){return c&&N(at,v)}n.isSymbolObject=St;function Ot(at){return x(at)||st(at)||dt(at)||Nt(at)||St(at)}n.isBoxedPrimitive=Ot;function ye(at){return typeof Uint8Array<"u"&&(Qt(at)||q(at))}n.isAnyArrayBuffer=ye,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(at){Object.defineProperty(n,at,{enumerable:!1,value:function(){throw new Error(at+" is not supported in userland")}})})}(mp)),mp}var mh,X1;function pv(){return X1||(X1=1,mh=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),mh}var If={exports:{}},tb;function oo(){return tb||(tb=1,typeof Object.create=="function"?If.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:If.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),If.exports}var eb;function rb(){return eb||(eb=1,function(n){var t=Object.getOwnPropertyDescriptors||function(nt){for(var ot=Object.keys(nt),mt={},q=0;q<ot.length;q++)mt[ot[q]]=Object.getOwnPropertyDescriptor(nt,ot[q]);return mt},e=/%[sdj%]/g;n.format=function(J){if(!k(J)){for(var nt=[],ot=0;ot<arguments.length;ot++)nt.push(a(arguments[ot]));return nt.join(" ")}for(var ot=1,mt=arguments,q=mt.length,H=String(J).replace(e,function(lt){if(lt==="%%")return"%";if(ot>=q)return lt;switch(lt){case"%s":return String(mt[ot++]);case"%d":return Number(mt[ot++]);case"%j":try{return JSON.stringify(mt[ot++])}catch{return"[Circular]"}default:return lt}}),it=mt[ot];ot<q;it=mt[++ot])B(it)||!tt(it)?H+=" "+it:H+=" "+a(it);return H},n.deprecate=function(J,nt){if(typeof Lt<"u"&&Lt.noDeprecation===!0)return J;if(typeof Lt>"u")return function(){return n.deprecate(J,nt).apply(this,arguments)};var ot=!1;function mt(){if(!ot){if(Lt.throwDeprecation)throw new Error(nt);Lt.traceDeprecation?console.trace(nt):console.error(nt),ot=!0}return J.apply(this,arguments)}return mt};var r={},i=/^$/;if(Lt.env.NODE_DEBUG){var _=Lt.env.NODE_DEBUG;_=_.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+_+"$","i")}n.debuglog=function(J){if(J=J.toUpperCase(),!r[J])if(i.test(J)){var nt=Lt.pid;r[J]=function(){var ot=n.format.apply(n,arguments);console.error("%s %d: %s",J,nt,ot)}}else r[J]=function(){};return r[J]};function a(J,nt){var ot={seen:[],stylize:u};return arguments.length>=3&&(ot.depth=arguments[2]),arguments.length>=4&&(ot.colors=arguments[3]),z(nt)?ot.showHidden=nt:nt&&n._extend(ot,nt),L(ot.showHidden)&&(ot.showHidden=!1),L(ot.depth)&&(ot.depth=2),L(ot.colors)&&(ot.colors=!1),L(ot.customInspect)&&(ot.customInspect=!0),ot.colors&&(ot.stylize=c),f(ot,J,ot.depth)}n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function c(J,nt){var ot=a.styles[nt];return ot?"\x1B["+a.colors[ot][0]+"m"+J+"\x1B["+a.colors[ot][1]+"m":J}function u(J,nt){return J}function l(J){var nt={};return J.forEach(function(ot,mt){nt[ot]=!0}),nt}function f(J,nt,ot){if(J.customInspect&&nt&&j(nt.inspect)&&nt.inspect!==n.inspect&&!(nt.constructor&&nt.constructor.prototype===nt)){var mt=nt.inspect(ot,J);return k(mt)||(mt=f(J,mt,ot)),mt}var q=d(J,nt);if(q)return q;var H=Object.keys(nt),it=l(H);if(J.showHidden&&(H=Object.getOwnPropertyNames(nt)),wt(nt)&&(H.indexOf("message")>=0||H.indexOf("description")>=0))return y(nt);if(H.length===0){if(j(nt)){var lt=nt.name?": "+nt.name:"";return J.stylize("[Function"+lt+"]","special")}if(V(nt))return J.stylize(RegExp.prototype.toString.call(nt),"regexp");if(rt(nt))return J.stylize(Date.prototype.toString.call(nt),"date");if(wt(nt))return y(nt)}var pt="",M=!1,x=["{","}"];if(U(nt)&&(M=!0,x=["[","]"]),j(nt)){var st=nt.name?": "+nt.name:"";pt=" [Function"+st+"]"}if(V(nt)&&(pt=" "+RegExp.prototype.toString.call(nt)),rt(nt)&&(pt=" "+Date.prototype.toUTCString.call(nt)),wt(nt)&&(pt=" "+y(nt)),H.length===0&&(!M||nt.length==0))return x[0]+pt+x[1];if(ot<0)return V(nt)?J.stylize(RegExp.prototype.toString.call(nt),"regexp"):J.stylize("[Object]","special");J.seen.push(nt);var dt;return M?dt=v(J,nt,ot,it,H):dt=H.map(function(Nt){return N(J,nt,ot,it,Nt,M)}),J.seen.pop(),I(dt,pt,x)}function d(J,nt){if(L(nt))return J.stylize("undefined","undefined");if(k(nt)){var ot="'"+JSON.stringify(nt).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return J.stylize(ot,"string")}if(C(nt))return J.stylize(""+nt,"number");if(z(nt))return J.stylize(""+nt,"boolean");if(B(nt))return J.stylize("null","null")}function y(J){return"["+Error.prototype.toString.call(J)+"]"}function v(J,nt,ot,mt,q){for(var H=[],it=0,lt=nt.length;it<lt;++it)Bt(nt,String(it))?H.push(N(J,nt,ot,mt,String(it),!0)):H.push("");return q.forEach(function(pt){pt.match(/^\d+$/)||H.push(N(J,nt,ot,mt,pt,!0))}),H}function N(J,nt,ot,mt,q,H){var it,lt,pt;if(pt=Object.getOwnPropertyDescriptor(nt,q)||{value:nt[q]},pt.get?pt.set?lt=J.stylize("[Getter/Setter]","special"):lt=J.stylize("[Getter]","special"):pt.set&&(lt=J.stylize("[Setter]","special")),Bt(mt,q)||(it="["+q+"]"),lt||(J.seen.indexOf(pt.value)<0?(B(ot)?lt=f(J,pt.value,null):lt=f(J,pt.value,ot-1),lt.indexOf(`
|
|
12
|
-
`)>-1&&(
|
|
13
|
-
`).map(function(
|
|
14
|
-
`).slice(2):
|
|
15
|
-
`+
|
|
16
|
-
`).map(function(
|
|
17
|
-
`))):
|
|
18
|
-
`)>=0,
|
|
19
|
-
`)+" "+
|
|
20
|
-
`)+" "+ot[1]:ot[0]+nt+" "+J.join(", ")+" "+ot[1]}n.types=lv();function U(J){return Array.isArray(J)}n.isArray=U;function z(J){return typeof J=="boolean"}n.isBoolean=z;function B(J){return J===null}n.isNull=B;function O(J){return J==null}n.isNullOrUndefined=O;function C(J){return typeof J=="number"}n.isNumber=C;function k(J){return typeof J=="string"}n.isString=k;function D(J){return typeof J=="symbol"}n.isSymbol=D;function L(J){return J===void 0}n.isUndefined=L;function V(J){return tt(J)&&xt(J)==="[object RegExp]"}n.isRegExp=V,n.types.isRegExp=V;function tt(J){return typeof J=="object"&&J!==null}n.isObject=tt;function rt(J){return tt(J)&&xt(J)==="[object Date]"}n.isDate=rt,n.types.isDate=rt;function wt(J){return tt(J)&&(xt(J)==="[object Error]"||J instanceof Error)}n.isError=wt,n.types.isNativeError=wt;function j(J){return typeof J=="function"}n.isFunction=j;function Pt(J){return J===null||typeof J=="boolean"||typeof J=="number"||typeof J=="string"||typeof J=="symbol"||typeof J>"u"}n.isPrimitive=Pt,n.isBuffer=pv();function xt(J){return Object.prototype.toString.call(J)}function ft(J){return J<10?"0"+J.toString(10):J.toString(10)}var yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function zt(){var J=new Date,nt=[ft(J.getHours()),ft(J.getMinutes()),ft(J.getSeconds())].join(":");return[J.getDate(),yt[J.getMonth()],nt].join(" ")}n.log=function(){console.log("%s - %s",zt(),n.format.apply(n,arguments))},n.inherits=oo(),n._extend=function(J,nt){if(!nt||!tt(nt))return J;for(var ot=Object.keys(nt),mt=ot.length;mt--;)J[ot[mt]]=nt[ot[mt]];return J};function Bt(J,nt){return Object.prototype.hasOwnProperty.call(J,nt)}var Mt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(nt){if(typeof nt!="function")throw new TypeError('The "original" argument must be of type Function');if(Mt&&nt[Mt]){var ot=nt[Mt];if(typeof ot!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(ot,Mt,{value:ot,enumerable:!1,writable:!1,configurable:!0}),ot}function ot(){for(var mt,q,H=new Promise(function(pt,M){mt=pt,q=M}),it=[],lt=0;lt<arguments.length;lt++)it.push(arguments[lt]);it.push(function(pt,M){pt?q(pt):mt(M)});try{nt.apply(this,it)}catch(pt){q(pt)}return H}return Object.setPrototypeOf(ot,Object.getPrototypeOf(nt)),Mt&&Object.defineProperty(ot,Mt,{value:ot,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(ot,t(nt))},n.promisify.custom=Mt;function It(J,nt){if(!J){var ot=new Error("Promise was rejected with a falsy value");ot.reason=J,J=ot}return nt(J)}function Qt(J){if(typeof J!="function")throw new TypeError('The "original" argument must be of type Function');function nt(){for(var ot=[],mt=0;mt<arguments.length;mt++)ot.push(arguments[mt]);var q=ot.pop();if(typeof q!="function")throw new TypeError("The last argument must be of type Function");var H=this,it=function(){return q.apply(H,arguments)};J.apply(this,ot).then(function(lt){Lt.nextTick(it.bind(null,null,lt))},function(lt){Lt.nextTick(It.bind(null,lt,it))})}return Object.setPrototypeOf(nt,Object.getPrototypeOf(J)),Object.defineProperties(nt,t(J)),nt}n.callbackify=Qt}(Ap)),Ap}var Sh,nb;function hv(){if(nb)return Sh;nb=1;function n(N,I){var U=Object.keys(N);if(Object.getOwnPropertySymbols){var z=Object.getOwnPropertySymbols(N);I&&(z=z.filter(function(B){return Object.getOwnPropertyDescriptor(N,B).enumerable})),U.push.apply(U,z)}return U}function t(N){for(var I=1;I<arguments.length;I++){var U=arguments[I]!=null?arguments[I]:{};I%2?n(Object(U),!0).forEach(function(z){e(N,z,U[z])}):Object.getOwnPropertyDescriptors?Object.defineProperties(N,Object.getOwnPropertyDescriptors(U)):n(Object(U)).forEach(function(z){Object.defineProperty(N,z,Object.getOwnPropertyDescriptor(U,z))})}return N}function e(N,I,U){return I=a(I),I in N?Object.defineProperty(N,I,{value:U,enumerable:!0,configurable:!0,writable:!0}):N[I]=U,N}function r(N,I){if(!(N instanceof I))throw new TypeError("Cannot call a class as a function")}function i(N,I){for(var U=0;U<I.length;U++){var z=I[U];z.enumerable=z.enumerable||!1,z.configurable=!0,"value"in z&&(z.writable=!0),Object.defineProperty(N,a(z.key),z)}}function _(N,I,U){return I&&i(N.prototype,I),Object.defineProperty(N,"prototype",{writable:!1}),N}function a(N){var I=c(N,"string");return typeof I=="symbol"?I:String(I)}function c(N,I){if(typeof N!="object"||N===null)return N;var U=N[Symbol.toPrimitive];if(U!==void 0){var z=U.call(N,I);if(typeof z!="object")return z;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(N)}var u=Bf(),l=u.Buffer,f=rb(),d=f.inspect,y=d&&d.custom||"inspect";function v(N,I,U){l.prototype.copy.call(N,I,U)}return Sh=function(){function N(){r(this,N),this.head=null,this.tail=null,this.length=0}return _(N,[{key:"push",value:function(U){var z={data:U,next:null};this.length>0?this.tail.next=z:this.head=z,this.tail=z,++this.length}},{key:"unshift",value:function(U){var z={data:U,next:this.head};this.length===0&&(this.tail=z),this.head=z,++this.length}},{key:"shift",value:function(){if(this.length!==0){var U=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,U}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(U){if(this.length===0)return"";for(var z=this.head,B=""+z.data;z=z.next;)B+=U+z.data;return B}},{key:"concat",value:function(U){if(this.length===0)return l.alloc(0);for(var z=l.allocUnsafe(U>>>0),B=this.head,O=0;B;)v(B.data,z,O),O+=B.data.length,B=B.next;return z}},{key:"consume",value:function(U,z){var B;return U<this.head.data.length?(B=this.head.data.slice(0,U),this.head.data=this.head.data.slice(U)):U===this.head.data.length?B=this.shift():B=z?this._getString(U):this._getBuffer(U),B}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(U){var z=this.head,B=1,O=z.data;for(U-=O.length;z=z.next;){var C=z.data,k=U>C.length?C.length:U;if(k===C.length?O+=C:O+=C.slice(0,U),U-=k,U===0){k===C.length?(++B,z.next?this.head=z.next:this.head=this.tail=null):(this.head=z,z.data=C.slice(k));break}++B}return this.length-=B,O}},{key:"_getBuffer",value:function(U){var z=l.allocUnsafe(U),B=this.head,O=1;for(B.data.copy(z),U-=B.data.length;B=B.next;){var C=B.data,k=U>C.length?C.length:U;if(C.copy(z,z.length-U,0,k),U-=k,U===0){k===C.length?(++O,B.next?this.head=B.next:this.head=this.tail=null):(this.head=B,B.data=C.slice(k));break}++O}return this.length-=O,z}},{key:y,value:function(U,z){return d(this,t(t({},z),{},{depth:0,customInspect:!1}))}}]),N}(),Sh}var Rh,ib;function sb(){if(ib)return Rh;ib=1;function n(a,c){var u=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(c?c(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Lt.nextTick(i,this,a)):Lt.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(d){!c&&d?u._writableState?u._writableState.errorEmitted?Lt.nextTick(e,u):(u._writableState.errorEmitted=!0,Lt.nextTick(t,u,d)):Lt.nextTick(t,u,d):c?(Lt.nextTick(e,u),c(d)):Lt.nextTick(e,u)}),this)}function t(a,c){i(a,c),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,c){a.emit("error",c)}function _(a,c){var u=a._readableState,l=a._writableState;u&&u.autoDestroy||l&&l.autoDestroy?a.destroy(c):a.emit("error",c)}return Rh={destroy:n,undestroy:r,errorOrDestroy:_},Rh}var Eh={},_b;function ao(){if(_b)return Eh;_b=1;function n(c,u){c.prototype=Object.create(u.prototype),c.prototype.constructor=c,c.__proto__=u}var t={};function e(c,u,l){l||(l=Error);function f(y,v,N){return typeof u=="string"?u:u(y,v,N)}var d=function(y){n(v,y);function v(N,I,U){return y.call(this,f(N,I,U))||this}return v}(l);d.prototype.name=l.name,d.prototype.code=c,t[c]=d}function r(c,u){if(Array.isArray(c)){var l=c.length;return c=c.map(function(f){return String(f)}),l>2?"one of ".concat(u," ").concat(c.slice(0,l-1).join(", "),", or ")+c[l-1]:l===2?"one of ".concat(u," ").concat(c[0]," or ").concat(c[1]):"of ".concat(u," ").concat(c[0])}else return"of ".concat(u," ").concat(String(c))}function i(c,u,l){return c.substr(0,u.length)===u}function _(c,u,l){return(l===void 0||l>c.length)&&(l=c.length),c.substring(l-u.length,l)===u}function a(c,u,l){return typeof l!="number"&&(l=0),l+u.length>c.length?!1:c.indexOf(u,l)!==-1}return e("ERR_INVALID_OPT_VALUE",function(c,u){return'The value "'+u+'" is invalid for option "'+c+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(c,u,l){var f;typeof u=="string"&&i(u,"not ")?(f="must not be",u=u.replace(/^not /,"")):f="must be";var d;if(_(c," argument"))d="The ".concat(c," ").concat(f," ").concat(r(u,"type"));else{var y=a(c,".")?"property":"argument";d='The "'.concat(c,'" ').concat(y," ").concat(f," ").concat(r(u,"type"))}return d+=". Received type ".concat(typeof l),d},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(c){return"The "+c+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(c){return"Cannot call "+c+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(c){return"Unknown encoding: "+c},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Eh.codes=t,Eh}var Ph,ob;function ab(){if(ob)return Ph;ob=1;var n=ao().codes.ERR_INVALID_OPT_VALUE;function t(r,i,_){return r.highWaterMark!=null?r.highWaterMark:i?r[_]:null}function e(r,i,_,a){var c=t(i,a,_);if(c!=null){if(!(isFinite(c)&&Math.floor(c)===c)||c<0){var u=a?_:"highWaterMark";throw new n(u,c)}return Math.floor(c)}return r.objectMode?16:16*1024}return Ph={getHighWaterMark:e},Ph}var zh,cb;function wv(){if(cb)return zh;cb=1,zh=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function _(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return _}function t(e){try{if(!us.localStorage)return!1}catch{return!1}var r=us.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return zh}var vh,ub;function fb(){if(ub)return vh;ub=1,vh=V;function n(q){var H=this;this.next=null,this.entry=null,this.finish=function(){mt(H,q)}}var t;V.WritableState=D;var e={deprecate:wv()},r=Y0(),i=Bf().Buffer,_=(typeof us<"u"?us:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(q){return i.from(q)}function c(q){return i.isBuffer(q)||q instanceof _}var u=sb(),l=ab(),f=l.getHighWaterMark,d=ao().codes,y=d.ERR_INVALID_ARG_TYPE,v=d.ERR_METHOD_NOT_IMPLEMENTED,N=d.ERR_MULTIPLE_CALLBACK,I=d.ERR_STREAM_CANNOT_PIPE,U=d.ERR_STREAM_DESTROYED,z=d.ERR_STREAM_NULL_VALUES,B=d.ERR_STREAM_WRITE_AFTER_END,O=d.ERR_UNKNOWN_ENCODING,C=u.errorOrDestroy;oo()(V,r);function k(){}function D(q,H,it){t=t||co(),q=q||{},typeof it!="boolean"&&(it=H instanceof t),this.objectMode=!!q.objectMode,it&&(this.objectMode=this.objectMode||!!q.writableObjectMode),this.highWaterMark=f(this,q,"writableHighWaterMark",it),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var lt=q.decodeStrings===!1;this.decodeStrings=!lt,this.defaultEncoding=q.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(pt){yt(H,pt)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=q.emitClose!==!1,this.autoDestroy=!!q.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}D.prototype.getBuffer=function(){for(var H=this.bufferedRequest,it=[];H;)it.push(H),H=H.next;return it},function(){try{Object.defineProperty(D.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var L;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(L=Function.prototype[Symbol.hasInstance],Object.defineProperty(V,Symbol.hasInstance,{value:function(H){return L.call(this,H)?!0:this!==V?!1:H&&H._writableState instanceof D}})):L=function(H){return H instanceof this};function V(q){t=t||co();var H=this instanceof t;if(!H&&!L.call(V,this))return new V(q);this._writableState=new D(q,this,H),this.writable=!0,q&&(typeof q.write=="function"&&(this._write=q.write),typeof q.writev=="function"&&(this._writev=q.writev),typeof q.destroy=="function"&&(this._destroy=q.destroy),typeof q.final=="function"&&(this._final=q.final)),r.call(this)}V.prototype.pipe=function(){C(this,new I)};function tt(q,H){var it=new B;C(q,it),Lt.nextTick(H,it)}function rt(q,H,it,lt){var pt;return it===null?pt=new z:typeof it!="string"&&!H.objectMode&&(pt=new y("chunk",["string","Buffer"],it)),pt?(C(q,pt),Lt.nextTick(lt,pt),!1):!0}V.prototype.write=function(q,H,it){var lt=this._writableState,pt=!1,M=!lt.objectMode&&c(q);return M&&!i.isBuffer(q)&&(q=a(q)),typeof H=="function"&&(it=H,H=null),M?H="buffer":H||(H=lt.defaultEncoding),typeof it!="function"&&(it=k),lt.ending?tt(this,it):(M||rt(this,lt,q,it))&&(lt.pendingcb++,pt=j(this,lt,M,q,H,it)),pt},V.prototype.cork=function(){this._writableState.corked++},V.prototype.uncork=function(){var q=this._writableState;q.corked&&(q.corked--,!q.writing&&!q.corked&&!q.bufferProcessing&&q.bufferedRequest&&Mt(this,q))},V.prototype.setDefaultEncoding=function(H){if(typeof H=="string"&&(H=H.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((H+"").toLowerCase())>-1))throw new O(H);return this._writableState.defaultEncoding=H,this},Object.defineProperty(V.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function wt(q,H,it){return!q.objectMode&&q.decodeStrings!==!1&&typeof H=="string"&&(H=i.from(H,it)),H}Object.defineProperty(V.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function j(q,H,it,lt,pt,M){if(!it){var x=wt(H,lt,pt);lt!==x&&(it=!0,pt="buffer",lt=x)}var st=H.objectMode?1:lt.length;H.length+=st;var dt=H.length<H.highWaterMark;if(dt||(H.needDrain=!0),H.writing||H.corked){var Nt=H.lastBufferedRequest;H.lastBufferedRequest={chunk:lt,encoding:pt,isBuf:it,callback:M,next:null},Nt?Nt.next=H.lastBufferedRequest:H.bufferedRequest=H.lastBufferedRequest,H.bufferedRequestCount+=1}else Pt(q,H,!1,st,lt,pt,M);return dt}function Pt(q,H,it,lt,pt,M,x){H.writelen=lt,H.writecb=x,H.writing=!0,H.sync=!0,H.destroyed?H.onwrite(new U("write")):it?q._writev(pt,H.onwrite):q._write(pt,M,H.onwrite),H.sync=!1}function xt(q,H,it,lt,pt){--H.pendingcb,it?(Lt.nextTick(pt,lt),Lt.nextTick(nt,q,H),q._writableState.errorEmitted=!0,C(q,lt)):(pt(lt),q._writableState.errorEmitted=!0,C(q,lt),nt(q,H))}function ft(q){q.writing=!1,q.writecb=null,q.length-=q.writelen,q.writelen=0}function yt(q,H){var it=q._writableState,lt=it.sync,pt=it.writecb;if(typeof pt!="function")throw new N;if(ft(it),H)xt(q,it,lt,H,pt);else{var M=It(it)||q.destroyed;!M&&!it.corked&&!it.bufferProcessing&&it.bufferedRequest&&Mt(q,it),lt?Lt.nextTick(zt,q,it,M,pt):zt(q,it,M,pt)}}function zt(q,H,it,lt){it||Bt(q,H),H.pendingcb--,lt(),nt(q,H)}function Bt(q,H){H.length===0&&H.needDrain&&(H.needDrain=!1,q.emit("drain"))}function Mt(q,H){H.bufferProcessing=!0;var it=H.bufferedRequest;if(q._writev&&it&&it.next){var lt=H.bufferedRequestCount,pt=new Array(lt),M=H.corkedRequestsFree;M.entry=it;for(var x=0,st=!0;it;)pt[x]=it,it.isBuf||(st=!1),it=it.next,x+=1;pt.allBuffers=st,Pt(q,H,!0,H.length,pt,"",M.finish),H.pendingcb++,H.lastBufferedRequest=null,M.next?(H.corkedRequestsFree=M.next,M.next=null):H.corkedRequestsFree=new n(H),H.bufferedRequestCount=0}else{for(;it;){var dt=it.chunk,Nt=it.encoding,St=it.callback,Ot=H.objectMode?1:dt.length;if(Pt(q,H,!1,Ot,dt,Nt,St),it=it.next,H.bufferedRequestCount--,H.writing)break}it===null&&(H.lastBufferedRequest=null)}H.bufferedRequest=it,H.bufferProcessing=!1}V.prototype._write=function(q,H,it){it(new v("_write()"))},V.prototype._writev=null,V.prototype.end=function(q,H,it){var lt=this._writableState;return typeof q=="function"?(it=q,q=null,H=null):typeof H=="function"&&(it=H,H=null),q!=null&&this.write(q,H),lt.corked&&(lt.corked=1,this.uncork()),lt.ending||ot(this,lt,it),this},Object.defineProperty(V.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function It(q){return q.ending&&q.length===0&&q.bufferedRequest===null&&!q.finished&&!q.writing}function Qt(q,H){q._final(function(it){H.pendingcb--,it&&C(q,it),H.prefinished=!0,q.emit("prefinish"),nt(q,H)})}function J(q,H){!H.prefinished&&!H.finalCalled&&(typeof q._final=="function"&&!H.destroyed?(H.pendingcb++,H.finalCalled=!0,Lt.nextTick(Qt,q,H)):(H.prefinished=!0,q.emit("prefinish")))}function nt(q,H){var it=It(H);if(it&&(J(q,H),H.pendingcb===0&&(H.finished=!0,q.emit("finish"),H.autoDestroy))){var lt=q._readableState;(!lt||lt.autoDestroy&<.endEmitted)&&q.destroy()}return it}function ot(q,H,it){H.ending=!0,nt(q,H),it&&(H.finished?Lt.nextTick(it):q.once("finish",it)),H.ended=!0,q.writable=!1}function mt(q,H,it){var lt=q.entry;for(q.entry=null;lt;){var pt=lt.callback;H.pendingcb--,pt(it),lt=lt.next}H.corkedRequestsFree.next=q}return Object.defineProperty(V.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(H){this._writableState&&(this._writableState.destroyed=H)}}),V.prototype.destroy=u.destroy,V.prototype._undestroy=u.undestroy,V.prototype._destroy=function(q,H){H(q)},vh}var Mh,lb;function co(){if(lb)return Mh;lb=1;var n=Object.keys||function(l){var f=[];for(var d in l)f.push(d);return f};Mh=a;var t=Ab(),e=fb();oo()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var _=r[i];a.prototype[_]||(a.prototype[_]=e.prototype[_])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),e.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",c)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function c(){this._writableState.ended||Lt.nextTick(u,this)}function u(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),Mh}var Bh={},Nf={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var pb;function dv(){return pb||(pb=1,function(n,t){var e=Bf(),r=e.Buffer;function i(a,c){for(var u in a)c[u]=a[u]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=_);function _(a,c,u){return r(a,c,u)}_.prototype=Object.create(r.prototype),i(r,_),_.from=function(a,c,u){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,c,u)},_.alloc=function(a,c,u){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return c!==void 0?typeof u=="string"?l.fill(c,u):l.fill(c):l.fill(0),l},_.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},_.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}(Nf,Nf.exports)),Nf.exports}var hb;function wb(){if(hb)return Bh;hb=1;var n=dv().Buffer,t=n.isEncoding||function(z){switch(z=""+z,z&&z.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(z){if(!z)return"utf8";for(var B;;)switch(z){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return z;default:if(B)return;z=(""+z).toLowerCase(),B=!0}}function r(z){var B=e(z);if(typeof B!="string"&&(n.isEncoding===t||!t(z)))throw new Error("Unknown encoding: "+z);return B||z}Bh.StringDecoder=i;function i(z){this.encoding=r(z);var B;switch(this.encoding){case"utf16le":this.text=d,this.end=y,B=4;break;case"utf8":this.fillLast=u,B=4;break;case"base64":this.text=v,this.end=N,B=3;break;default:this.write=I,this.end=U;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(B)}i.prototype.write=function(z){if(z.length===0)return"";var B,O;if(this.lastNeed){if(B=this.fillLast(z),B===void 0)return"";O=this.lastNeed,this.lastNeed=0}else O=0;return O<z.length?B?B+this.text(z,O):this.text(z,O):B||""},i.prototype.end=f,i.prototype.text=l,i.prototype.fillLast=function(z){if(this.lastNeed<=z.length)return z.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);z.copy(this.lastChar,this.lastTotal-this.lastNeed,0,z.length),this.lastNeed-=z.length};function _(z){return z<=127?0:z>>5===6?2:z>>4===14?3:z>>3===30?4:z>>6===2?-1:-2}function a(z,B,O){var C=B.length-1;if(C<O)return 0;var k=_(B[C]);return k>=0?(k>0&&(z.lastNeed=k-1),k):--C<O||k===-2?0:(k=_(B[C]),k>=0?(k>0&&(z.lastNeed=k-2),k):--C<O||k===-2?0:(k=_(B[C]),k>=0?(k>0&&(k===2?k=0:z.lastNeed=k-3),k):0))}function c(z,B,O){if((B[0]&192)!==128)return z.lastNeed=0,"�";if(z.lastNeed>1&&B.length>1){if((B[1]&192)!==128)return z.lastNeed=1,"�";if(z.lastNeed>2&&B.length>2&&(B[2]&192)!==128)return z.lastNeed=2,"�"}}function u(z){var B=this.lastTotal-this.lastNeed,O=c(this,z);if(O!==void 0)return O;if(this.lastNeed<=z.length)return z.copy(this.lastChar,B,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);z.copy(this.lastChar,B,0,z.length),this.lastNeed-=z.length}function l(z,B){var O=a(this,z,B);if(!this.lastNeed)return z.toString("utf8",B);this.lastTotal=O;var C=z.length-(O-this.lastNeed);return z.copy(this.lastChar,0,C),z.toString("utf8",B,C)}function f(z){var B=z&&z.length?this.write(z):"";return this.lastNeed?B+"�":B}function d(z,B){if((z.length-B)%2===0){var O=z.toString("utf16le",B);if(O){var C=O.charCodeAt(O.length-1);if(C>=55296&&C<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=z[z.length-2],this.lastChar[1]=z[z.length-1],O.slice(0,-1)}return O}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=z[z.length-1],z.toString("utf16le",B,z.length-1)}function y(z){var B=z&&z.length?this.write(z):"";if(this.lastNeed){var O=this.lastTotal-this.lastNeed;return B+this.lastChar.toString("utf16le",0,O)}return B}function v(z,B){var O=(z.length-B)%3;return O===0?z.toString("base64",B):(this.lastNeed=3-O,this.lastTotal=3,O===1?this.lastChar[0]=z[z.length-1]:(this.lastChar[0]=z[z.length-2],this.lastChar[1]=z[z.length-1]),z.toString("base64",B,z.length-O))}function N(z){var B=z&&z.length?this.write(z):"";return this.lastNeed?B+this.lastChar.toString("base64",0,3-this.lastNeed):B}function I(z){return z.toString(this.encoding)}function U(z){return z&&z.length?this.write(z):""}return Bh}var xh,db;function Ch(){if(db)return xh;db=1;var n=ao().codes.ERR_STREAM_PREMATURE_CLOSE;function t(_){var a=!1;return function(){if(!a){a=!0;for(var c=arguments.length,u=new Array(c),l=0;l<c;l++)u[l]=arguments[l];_.apply(this,u)}}}function e(){}function r(_){return _.setHeader&&typeof _.abort=="function"}function i(_,a,c){if(typeof a=="function")return i(_,null,a);a||(a={}),c=t(c||e);var u=a.readable||a.readable!==!1&&_.readable,l=a.writable||a.writable!==!1&&_.writable,f=function(){_.writable||y()},d=_._writableState&&_._writableState.finished,y=function(){l=!1,d=!0,u||c.call(_)},v=_._readableState&&_._readableState.endEmitted,N=function(){u=!1,v=!0,l||c.call(_)},I=function(O){c.call(_,O)},U=function(){var O;if(u&&!v)return(!_._readableState||!_._readableState.ended)&&(O=new n),c.call(_,O);if(l&&!d)return(!_._writableState||!_._writableState.ended)&&(O=new n),c.call(_,O)},z=function(){_.req.on("finish",y)};return r(_)?(_.on("complete",y),_.on("abort",U),_.req?z():_.on("request",z)):l&&!_._writableState&&(_.on("end",f),_.on("close",f)),_.on("end",N),_.on("finish",y),a.error!==!1&&_.on("error",I),_.on("close",U),function(){_.removeListener("complete",y),_.removeListener("abort",U),_.removeListener("request",z),_.req&&_.req.removeListener("finish",y),_.removeListener("end",f),_.removeListener("close",f),_.removeListener("finish",y),_.removeListener("end",N),_.removeListener("error",I),_.removeListener("close",U)}}return xh=i,xh}var Ih,gb;function gv(){if(gb)return Ih;gb=1;var n;function t(O,C,k){return C=e(C),C in O?Object.defineProperty(O,C,{value:k,enumerable:!0,configurable:!0,writable:!0}):O[C]=k,O}function e(O){var C=r(O,"string");return typeof C=="symbol"?C:String(C)}function r(O,C){if(typeof O!="object"||O===null)return O;var k=O[Symbol.toPrimitive];if(k!==void 0){var D=k.call(O,C);if(typeof D!="object")return D;throw new TypeError("@@toPrimitive must return a primitive value.")}return(C==="string"?String:Number)(O)}var i=Ch(),_=Symbol("lastResolve"),a=Symbol("lastReject"),c=Symbol("error"),u=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),d=Symbol("stream");function y(O,C){return{value:O,done:C}}function v(O){var C=O[_];if(C!==null){var k=O[d].read();k!==null&&(O[l]=null,O[_]=null,O[a]=null,C(y(k,!1)))}}function N(O){Lt.nextTick(v,O)}function I(O,C){return function(k,D){O.then(function(){if(C[u]){k(y(void 0,!0));return}C[f](k,D)},D)}}var U=Object.getPrototypeOf(function(){}),z=Object.setPrototypeOf((n={get stream(){return this[d]},next:function(){var C=this,k=this[c];if(k!==null)return Promise.reject(k);if(this[u])return Promise.resolve(y(void 0,!0));if(this[d].destroyed)return new Promise(function(tt,rt){Lt.nextTick(function(){C[c]?rt(C[c]):tt(y(void 0,!0))})});var D=this[l],L;if(D)L=new Promise(I(D,this));else{var V=this[d].read();if(V!==null)return Promise.resolve(y(V,!1));L=new Promise(this[f])}return this[l]=L,L}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var C=this;return new Promise(function(k,D){C[d].destroy(null,function(L){if(L){D(L);return}k(y(void 0,!0))})})}),n),U),B=function(C){var k,D=Object.create(z,(k={},t(k,d,{value:C,writable:!0}),t(k,_,{value:null,writable:!0}),t(k,a,{value:null,writable:!0}),t(k,c,{value:null,writable:!0}),t(k,u,{value:C._readableState.endEmitted,writable:!0}),t(k,f,{value:function(V,tt){var rt=D[d].read();rt?(D[l]=null,D[_]=null,D[a]=null,V(y(rt,!1))):(D[_]=V,D[a]=tt)},writable:!0}),k));return D[l]=null,i(C,function(L){if(L&&L.code!=="ERR_STREAM_PREMATURE_CLOSE"){var V=D[a];V!==null&&(D[l]=null,D[_]=null,D[a]=null,V(L)),D[c]=L;return}var tt=D[_];tt!==null&&(D[l]=null,D[_]=null,D[a]=null,tt(y(void 0,!0))),D[u]=!0}),C.on("readable",N.bind(null,D)),D};return Ih=B,Ih}var Nh,bb;function bv(){return bb||(bb=1,Nh=function(){throw new Error("Readable.from is not available in the browser")}),Nh}var Oh,yb;function Ab(){if(yb)return Oh;yb=1,Oh=tt;var n;tt.ReadableState=V,j0().EventEmitter;var t=function(x,st){return x.listeners(st).length},e=Y0(),r=Bf().Buffer,i=(typeof us<"u"?us:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function _(M){return r.from(M)}function a(M){return r.isBuffer(M)||M instanceof i}var c=rb(),u;c&&c.debuglog?u=c.debuglog("stream"):u=function(){};var l=hv(),f=sb(),d=ab(),y=d.getHighWaterMark,v=ao().codes,N=v.ERR_INVALID_ARG_TYPE,I=v.ERR_STREAM_PUSH_AFTER_EOF,U=v.ERR_METHOD_NOT_IMPLEMENTED,z=v.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,B,O,C;oo()(tt,e);var k=f.errorOrDestroy,D=["error","close","destroy","pause","resume"];function L(M,x,st){if(typeof M.prependListener=="function")return M.prependListener(x,st);!M._events||!M._events[x]?M.on(x,st):Array.isArray(M._events[x])?M._events[x].unshift(st):M._events[x]=[st,M._events[x]]}function V(M,x,st){n=n||co(),M=M||{},typeof st!="boolean"&&(st=x instanceof n),this.objectMode=!!M.objectMode,st&&(this.objectMode=this.objectMode||!!M.readableObjectMode),this.highWaterMark=y(this,M,"readableHighWaterMark",st),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=M.emitClose!==!1,this.autoDestroy=!!M.autoDestroy,this.destroyed=!1,this.defaultEncoding=M.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,M.encoding&&(B||(B=wb().StringDecoder),this.decoder=new B(M.encoding),this.encoding=M.encoding)}function tt(M){if(n=n||co(),!(this instanceof tt))return new tt(M);var x=this instanceof n;this._readableState=new V(M,this,x),this.readable=!0,M&&(typeof M.read=="function"&&(this._read=M.read),typeof M.destroy=="function"&&(this._destroy=M.destroy)),e.call(this)}Object.defineProperty(tt.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),tt.prototype.destroy=f.destroy,tt.prototype._undestroy=f.undestroy,tt.prototype._destroy=function(M,x){x(M)},tt.prototype.push=function(M,x){var st=this._readableState,dt;return st.objectMode?dt=!0:typeof M=="string"&&(x=x||st.defaultEncoding,x!==st.encoding&&(M=r.from(M,x),x=""),dt=!0),rt(this,M,x,!1,dt)},tt.prototype.unshift=function(M){return rt(this,M,null,!0,!1)};function rt(M,x,st,dt,Nt){u("readableAddChunk",x);var St=M._readableState;if(x===null)St.reading=!1,yt(M,St);else{var Ot;if(Nt||(Ot=j(St,x)),Ot)k(M,Ot);else if(St.objectMode||x&&x.length>0)if(typeof x!="string"&&!St.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=_(x)),dt)St.endEmitted?k(M,new z):wt(M,St,x,!0);else if(St.ended)k(M,new I);else{if(St.destroyed)return!1;St.reading=!1,St.decoder&&!st?(x=St.decoder.write(x),St.objectMode||x.length!==0?wt(M,St,x,!1):Mt(M,St)):wt(M,St,x,!1)}else dt||(St.reading=!1,Mt(M,St))}return!St.ended&&(St.length<St.highWaterMark||St.length===0)}function wt(M,x,st,dt){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,M.emit("data",st)):(x.length+=x.objectMode?1:st.length,dt?x.buffer.unshift(st):x.buffer.push(st),x.needReadable&&zt(M)),Mt(M,x)}function j(M,x){var st;return!a(x)&&typeof x!="string"&&x!==void 0&&!M.objectMode&&(st=new N("chunk",["string","Buffer","Uint8Array"],x)),st}tt.prototype.isPaused=function(){return this._readableState.flowing===!1},tt.prototype.setEncoding=function(M){B||(B=wb().StringDecoder);var x=new B(M);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var st=this._readableState.buffer.head,dt="";st!==null;)dt+=x.write(st.data),st=st.next;return this._readableState.buffer.clear(),dt!==""&&this._readableState.buffer.push(dt),this._readableState.length=dt.length,this};var Pt=1073741824;function xt(M){return M>=Pt?M=Pt:(M--,M|=M>>>1,M|=M>>>2,M|=M>>>4,M|=M>>>8,M|=M>>>16,M++),M}function ft(M,x){return M<=0||x.length===0&&x.ended?0:x.objectMode?1:M!==M?x.flowing&&x.length?x.buffer.head.data.length:x.length:(M>x.highWaterMark&&(x.highWaterMark=xt(M)),M<=x.length?M:x.ended?x.length:(x.needReadable=!0,0))}tt.prototype.read=function(M){u("read",M),M=parseInt(M,10);var x=this._readableState,st=M;if(M!==0&&(x.emittedReadable=!1),M===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return u("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?it(this):zt(this),null;if(M=ft(M,x),M===0&&x.ended)return x.length===0&&it(this),null;var dt=x.needReadable;u("need readable",dt),(x.length===0||x.length-M<x.highWaterMark)&&(dt=!0,u("length less than watermark",dt)),x.ended||x.reading?(dt=!1,u("reading or ended",dt)):dt&&(u("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(M=ft(st,x)));var Nt;return M>0?Nt=H(M,x):Nt=null,Nt===null?(x.needReadable=x.length<=x.highWaterMark,M=0):(x.length-=M,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),st!==M&&x.ended&&it(this)),Nt!==null&&this.emit("data",Nt),Nt};function yt(M,x){if(u("onEofChunk"),!x.ended){if(x.decoder){var st=x.decoder.end();st&&st.length&&(x.buffer.push(st),x.length+=x.objectMode?1:st.length)}x.ended=!0,x.sync?zt(M):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,Bt(M)))}}function zt(M){var x=M._readableState;u("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(u("emitReadable",x.flowing),x.emittedReadable=!0,Lt.nextTick(Bt,M))}function Bt(M){var x=M._readableState;u("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(M.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,q(M)}function Mt(M,x){x.readingMore||(x.readingMore=!0,Lt.nextTick(It,M,x))}function It(M,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var st=x.length;if(u("maybeReadMore read 0"),M.read(0),st===x.length)break}x.readingMore=!1}tt.prototype._read=function(M){k(this,new U("_read()"))},tt.prototype.pipe=function(M,x){var st=this,dt=this._readableState;switch(dt.pipesCount){case 0:dt.pipes=M;break;case 1:dt.pipes=[dt.pipes,M];break;default:dt.pipes.push(M);break}dt.pipesCount+=1,u("pipe count=%d opts=%j",dt.pipesCount,x);var Nt=(!x||x.end!==!1)&&M!==Lt.stdout&&M!==Lt.stderr,St=Nt?ye:De;dt.endEmitted?Lt.nextTick(St):st.once("end",St),M.on("unpipe",Ot);function Ot(qe,de){u("onunpipe"),qe===st&&de&&de.hasUnpiped===!1&&(de.hasUnpiped=!0,me())}function ye(){u("onend"),M.end()}var at=Qt(st);M.on("drain",at);var Ae=!1;function me(){u("cleanup"),M.removeListener("close",Se),M.removeListener("finish",be),M.removeListener("drain",at),M.removeListener("error",Xt),M.removeListener("unpipe",Ot),st.removeListener("end",ye),st.removeListener("end",De),st.removeListener("data",Wt),Ae=!0,dt.awaitDrain&&(!M._writableState||M._writableState.needDrain)&&at()}st.on("data",Wt);function Wt(qe){u("ondata");var de=M.write(qe);u("dest.write",de),de===!1&&((dt.pipesCount===1&&dt.pipes===M||dt.pipesCount>1&&pt(dt.pipes,M)!==-1)&&!Ae&&(u("false write response, pause",dt.awaitDrain),dt.awaitDrain++),st.pause())}function Xt(qe){u("onerror",qe),De(),M.removeListener("error",Xt),t(M,"error")===0&&k(M,qe)}L(M,"error",Xt);function Se(){M.removeListener("finish",be),De()}M.once("close",Se);function be(){u("onfinish"),M.removeListener("close",Se),De()}M.once("finish",be);function De(){u("unpipe"),st.unpipe(M)}return M.emit("pipe",st),dt.flowing||(u("pipe resume"),st.resume()),M};function Qt(M){return function(){var st=M._readableState;u("pipeOnDrain",st.awaitDrain),st.awaitDrain&&st.awaitDrain--,st.awaitDrain===0&&t(M,"data")&&(st.flowing=!0,q(M))}}tt.prototype.unpipe=function(M){var x=this._readableState,st={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return M&&M!==x.pipes?this:(M||(M=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,M&&M.emit("unpipe",this,st),this);if(!M){var dt=x.pipes,Nt=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var St=0;St<Nt;St++)dt[St].emit("unpipe",this,{hasUnpiped:!1});return this}var Ot=pt(x.pipes,M);return Ot===-1?this:(x.pipes.splice(Ot,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),M.emit("unpipe",this,st),this)},tt.prototype.on=function(M,x){var st=e.prototype.on.call(this,M,x),dt=this._readableState;return M==="data"?(dt.readableListening=this.listenerCount("readable")>0,dt.flowing!==!1&&this.resume()):M==="readable"&&!dt.endEmitted&&!dt.readableListening&&(dt.readableListening=dt.needReadable=!0,dt.flowing=!1,dt.emittedReadable=!1,u("on readable",dt.length,dt.reading),dt.length?zt(this):dt.reading||Lt.nextTick(nt,this)),st},tt.prototype.addListener=tt.prototype.on,tt.prototype.removeListener=function(M,x){var st=e.prototype.removeListener.call(this,M,x);return M==="readable"&&Lt.nextTick(J,this),st},tt.prototype.removeAllListeners=function(M){var x=e.prototype.removeAllListeners.apply(this,arguments);return(M==="readable"||M===void 0)&&Lt.nextTick(J,this),x};function J(M){var x=M._readableState;x.readableListening=M.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:M.listenerCount("data")>0&&M.resume()}function nt(M){u("readable nexttick read 0"),M.read(0)}tt.prototype.resume=function(){var M=this._readableState;return M.flowing||(u("resume"),M.flowing=!M.readableListening,ot(this,M)),M.paused=!1,this};function ot(M,x){x.resumeScheduled||(x.resumeScheduled=!0,Lt.nextTick(mt,M,x))}function mt(M,x){u("resume",x.reading),x.reading||M.read(0),x.resumeScheduled=!1,M.emit("resume"),q(M),x.flowing&&!x.reading&&M.read(0)}tt.prototype.pause=function(){return u("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(u("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function q(M){var x=M._readableState;for(u("flow",x.flowing);x.flowing&&M.read()!==null;);}tt.prototype.wrap=function(M){var x=this,st=this._readableState,dt=!1;M.on("end",function(){if(u("wrapped end"),st.decoder&&!st.ended){var Ot=st.decoder.end();Ot&&Ot.length&&x.push(Ot)}x.push(null)}),M.on("data",function(Ot){if(u("wrapped data"),st.decoder&&(Ot=st.decoder.write(Ot)),!(st.objectMode&&Ot==null)&&!(!st.objectMode&&(!Ot||!Ot.length))){var ye=x.push(Ot);ye||(dt=!0,M.pause())}});for(var Nt in M)this[Nt]===void 0&&typeof M[Nt]=="function"&&(this[Nt]=function(ye){return function(){return M[ye].apply(M,arguments)}}(Nt));for(var St=0;St<D.length;St++)M.on(D[St],this.emit.bind(this,D[St]));return this._read=function(Ot){u("wrapped _read",Ot),dt&&(dt=!1,M.resume())},this},typeof Symbol=="function"&&(tt.prototype[Symbol.asyncIterator]=function(){return O===void 0&&(O=gv()),O(this)}),Object.defineProperty(tt.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(tt.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(tt.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),tt._fromList=H,Object.defineProperty(tt.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function H(M,x){if(x.length===0)return null;var st;return x.objectMode?st=x.buffer.shift():!M||M>=x.length?(x.decoder?st=x.buffer.join(""):x.buffer.length===1?st=x.buffer.first():st=x.buffer.concat(x.length),x.buffer.clear()):st=x.buffer.consume(M,x.decoder),st}function it(M){var x=M._readableState;u("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,Lt.nextTick(lt,x,M))}function lt(M,x){if(u("endReadableNT",M.endEmitted,M.length),!M.endEmitted&&M.length===0&&(M.endEmitted=!0,x.readable=!1,x.emit("end"),M.autoDestroy)){var st=x._writableState;(!st||st.autoDestroy&&st.finished)&&x.destroy()}}typeof Symbol=="function"&&(tt.from=function(M,x){return C===void 0&&(C=bv()),C(tt,M,x)});function pt(M,x){for(var st=0,dt=M.length;st<dt;st++)if(M[st]===x)return st;return-1}return Oh}var kh,mb;function Sb(){if(mb)return kh;mb=1,kh=c;var n=ao().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,_=co();oo()(c,_);function a(f,d){var y=this._transformState;y.transforming=!1;var v=y.writecb;if(v===null)return this.emit("error",new e);y.writechunk=null,y.writecb=null,d!=null&&this.push(d),v(f);var N=this._readableState;N.reading=!1,(N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}function c(f){if(!(this instanceof c))return new c(f);_.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",u)}function u(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(d,y){l(f,d,y)}):l(this,null,null)}c.prototype.push=function(f,d){return this._transformState.needTransform=!1,_.prototype.push.call(this,f,d)},c.prototype._transform=function(f,d,y){y(new t("_transform()"))},c.prototype._write=function(f,d,y){var v=this._transformState;if(v.writecb=y,v.writechunk=f,v.writeencoding=d,!v.transforming){var N=this._readableState;(v.needTransform||N.needReadable||N.length<N.highWaterMark)&&this._read(N.highWaterMark)}},c.prototype._read=function(f){var d=this._transformState;d.writechunk!==null&&!d.transforming?(d.transforming=!0,this._transform(d.writechunk,d.writeencoding,d.afterTransform)):d.needTransform=!0},c.prototype._destroy=function(f,d){_.prototype._destroy.call(this,f,function(y){d(y)})};function l(f,d,y){if(d)return f.emit("error",d);if(y!=null&&f.push(y),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return kh}var Th,Rb;function yv(){if(Rb)return Th;Rb=1,Th=t;var n=Sb();oo()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},Th}var Gh,Eb;function Av(){if(Eb)return Gh;Eb=1;var n;function t(y){var v=!1;return function(){v||(v=!0,y.apply(void 0,arguments))}}var e=ao().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function _(y){if(y)throw y}function a(y){return y.setHeader&&typeof y.abort=="function"}function c(y,v,N,I){I=t(I);var U=!1;y.on("close",function(){U=!0}),n===void 0&&(n=Ch()),n(y,{readable:v,writable:N},function(B){if(B)return I(B);U=!0,I()});var z=!1;return function(B){if(!U&&!z){if(z=!0,a(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();I(B||new i("pipe"))}}}function u(y){y()}function l(y,v){return y.pipe(v)}function f(y){return!y.length||typeof y[y.length-1]!="function"?_:y.pop()}function d(){for(var y=arguments.length,v=new Array(y),N=0;N<y;N++)v[N]=arguments[N];var I=f(v);if(Array.isArray(v[0])&&(v=v[0]),v.length<2)throw new r("streams");var U,z=v.map(function(B,O){var C=O<v.length-1,k=O>0;return c(B,C,k,function(D){U||(U=D),D&&z.forEach(u),!C&&(z.forEach(u),I(U))})});return v.reduce(l)}return Gh=d,Gh}var Pb;function zb(){return Pb||(Pb=1,function(n,t){t=n.exports=Ab(),t.Stream=t,t.Readable=t,t.Writable=fb(),t.Duplex=co(),t.Transform=Sb(),t.PassThrough=yv(),t.finished=Ch(),t.pipeline=Av()}(zf,zf.exports)),zf.exports}var Uh,vb;function mv(){if(vb)return Uh;vb=1;const{Transform:n}=zb();return Uh=t=>class nS extends n{constructor(r,i,_,a,c){super(c),this._rate=r,this._capacity=i,this._delimitedSuffix=_,this._hashBitLength=a,this._options=c,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,_){let a=null;try{this.update(r,i)}catch(c){a=c}_(a)}_flush(r){let i=null;try{this.push(this.digest())}catch(_){i=_}r(i)}update(r,i){if(!yr.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return yr.isBuffer(r)||(r=yr.from(r,i)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let i=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(i=i.toString(r)),this._resetState(),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new nS(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Uh}var Fh,Mb;function Sv(){if(Mb)return Fh;Mb=1;const{Transform:n}=zb();return Fh=t=>class iS extends n{constructor(r,i,_,a){super(a),this._rate=r,this._capacity=i,this._delimitedSuffix=_,this._options=a,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,_){let a=null;try{this.update(r,i)}catch(c){a=c}_(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,i){if(!yr.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return yr.isBuffer(r)||(r=yr.from(r,i)),this._state.absorb(r),this}squeeze(r,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let _=this._state.squeeze(r);return i!==void 0&&(_=_.toString(i)),_}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new iS(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Fh}var Kh,Bb;function Rv(){if(Bb)return Kh;Bb=1;const n=mv(),t=Sv();return Kh=function(e){const r=n(e),i=t(e);return function(_,a){switch(typeof _=="string"?_.toLowerCase():_){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new i(1344,256,31,a);case"shake256":return new i(1088,512,31,a);default:throw new Error("Invald algorithm: "+_)}}},Kh}var Dh={},xb;function Ev(){if(xb)return Dh;xb=1;const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Dh.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],_=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],c=t[4]^t[14]^t[24]^t[34]^t[44],u=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],d=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let v=d^(_<<1|a>>>31),N=y^(a<<1|_>>>31);const I=t[0]^v,U=t[1]^N,z=t[10]^v,B=t[11]^N,O=t[20]^v,C=t[21]^N,k=t[30]^v,D=t[31]^N,L=t[40]^v,V=t[41]^N;v=r^(c<<1|u>>>31),N=i^(u<<1|c>>>31);const tt=t[2]^v,rt=t[3]^N,wt=t[12]^v,j=t[13]^N,Pt=t[22]^v,xt=t[23]^N,ft=t[32]^v,yt=t[33]^N,zt=t[42]^v,Bt=t[43]^N;v=_^(l<<1|f>>>31),N=a^(f<<1|l>>>31);const Mt=t[4]^v,It=t[5]^N,Qt=t[14]^v,J=t[15]^N,nt=t[24]^v,ot=t[25]^N,mt=t[34]^v,q=t[35]^N,H=t[44]^v,it=t[45]^N;v=c^(d<<1|y>>>31),N=u^(y<<1|d>>>31);const lt=t[6]^v,pt=t[7]^N,M=t[16]^v,x=t[17]^N,st=t[26]^v,dt=t[27]^N,Nt=t[36]^v,St=t[37]^N,Ot=t[46]^v,ye=t[47]^N;v=l^(r<<1|i>>>31),N=f^(i<<1|r>>>31);const at=t[8]^v,Ae=t[9]^N,me=t[18]^v,Wt=t[19]^N,Xt=t[28]^v,Se=t[29]^N,be=t[38]^v,De=t[39]^N,qe=t[48]^v,de=t[49]^N,gr=I,E=U,p=B<<4|z>>>28,w=z<<4|B>>>28,T=O<<3|C>>>29,Y=C<<3|O>>>29,Z=D<<9|k>>>23,ct=k<<9|D>>>23,kt=L<<18|V>>>14,$t=V<<18|L>>>14,Zt=tt<<1|rt>>>31,te=rt<<1|tt>>>31,Vt=j<<12|wt>>>20,Is=wt<<12|j>>>20,Qe=Pt<<10|xt>>>22,U_=xt<<10|Pt>>>22,ku=yt<<13|ft>>>19,br=ft<<13|yt>>>19,Tu=zt<<2|Bt>>>30,P=Bt<<2|zt>>>30,h=It<<30|Mt>>>2,g=Mt<<30|It>>>2,G=Qt<<6|J>>>26,Q=J<<6|Qt>>>26,X=ot<<11|nt>>>21,ut=nt<<11|ot>>>21,Tt=mt<<15|q>>>17,ie=q<<15|mt>>>17,ee=it<<29|H>>>3,se=H<<29|it>>>3,Jt=lt<<28|pt>>>4,_w=pt<<28|lt>>>4,ow=x<<23|M>>>9,aw=M<<23|x>>>9,cw=st<<25|dt>>>7,uw=dt<<25|st>>>7,fw=Nt<<21|St>>>11,lw=St<<21|Nt>>>11,pw=ye<<24|Ot>>>8,hw=Ot<<24|ye>>>8,ww=at<<27|Ae>>>5,dw=Ae<<27|at>>>5,gw=me<<20|Wt>>>12,bw=Wt<<20|me>>>12,yw=Se<<7|Xt>>>25,Aw=Xt<<7|Se>>>25,mw=be<<8|De>>>24,Sw=De<<8|be>>>24,Rw=qe<<14|de>>>18,Ew=de<<14|qe>>>18;t[0]=gr^~Vt&X,t[1]=E^~Is&ut,t[10]=Jt^~gw&T,t[11]=_w^~bw&Y,t[20]=Zt^~G&cw,t[21]=te^~Q&uw,t[30]=ww^~p&Qe,t[31]=dw^~w&U_,t[40]=h^~ow&yw,t[41]=g^~aw&Aw,t[2]=Vt^~X&fw,t[3]=Is^~ut&lw,t[12]=gw^~T&ku,t[13]=bw^~Y&br,t[22]=G^~cw&mw,t[23]=Q^~uw&Sw,t[32]=p^~Qe&Tt,t[33]=w^~U_&ie,t[42]=ow^~yw&Z,t[43]=aw^~Aw&ct,t[4]=X^~fw&Rw,t[5]=ut^~lw&Ew,t[14]=T^~ku&ee,t[15]=Y^~br&se,t[24]=cw^~mw&kt,t[25]=uw^~Sw&$t,t[34]=Qe^~Tt&pw,t[35]=U_^~ie&hw,t[44]=yw^~Z&Tu,t[45]=Aw^~ct&P,t[6]=fw^~Rw&gr,t[7]=lw^~Ew&E,t[16]=ku^~ee&Jt,t[17]=br^~se&_w,t[26]=mw^~kt&Zt,t[27]=Sw^~$t&te,t[36]=Tt^~pw&ww,t[37]=ie^~hw&dw,t[46]=Z^~Tu&h,t[47]=ct^~P&g,t[8]=Rw^~gr&Vt,t[9]=Ew^~E&Is,t[18]=ee^~Jt&gw,t[19]=se^~_w&bw,t[28]=kt^~Zt&G,t[29]=$t^~te&Q,t[38]=pw^~ww&p,t[39]=hw^~dw&w,t[48]=Tu^~h&ow,t[49]=P^~g&aw,t[0]^=n[e*2],t[1]^=n[e*2+1]}},Dh}var Lh,Cb;function Pv(){if(Cb)return Lh;Cb=1;const n=Ev();function t(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,r){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(e){for(let r=0;r<e.length;++r)this.state[~~(this.count/4)]^=e[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),(e&128)!==0&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),n.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const r=yr.alloc(e);for(let i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},t.prototype.copy=function(e){for(let r=0;r<50;++r)e.state[r]=this.state[r];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Lh=t,Lh}var jh,Ib;function zv(){return Ib||(Ib=1,jh=Rv()(Pv())),jh}var vv=zv();const Nb=G0(vv);var Of={exports:{}},Mv=Of.exports,Ob;function Bv(){return Ob||(Ob=1,function(n,t){(function(e,r){n.exports=r()})(Mv,function(){var e=function(_,a){if(a=a||{},typeof _!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var c={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(c,a),function(l,f){var d=a.retries,y=a.retryDelay,v=a.retryOn;if(f&&f.retries!==void 0)if(r(f.retries))d=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(r(f.retryDelay)||typeof f.retryDelay=="function")y=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")v=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(N,I){var U=function(B){var O=typeof Request<"u"&&l instanceof Request?l.clone():l;_(O,f).then(function(C){if(Array.isArray(v)&&v.indexOf(C.status)===-1)N(C);else if(typeof v=="function")try{return Promise.resolve(v(B,null,C)).then(function(k){k?z(B,null,C):N(C)}).catch(I)}catch(k){I(k)}else B<d?z(B,null,C):N(C)}).catch(function(C){if(typeof v=="function")try{Promise.resolve(v(B,C,null)).then(function(k){k?z(B,C,null):I(C)}).catch(function(k){I(k)})}catch(k){I(k)}else B<d?z(B,C,null):I(C)})};function z(B,O,C){var k=typeof y=="function"?y(B,O,C):y;setTimeout(function(){U(++B)},k)}U(0)})}};function r(_){return Number.isInteger(_)&&_>=0}function i(_){this.name="ArgumentError",this.message=_}return e})}(Of)),Of.exports}var xv=Bv();const Cv=G0(xv),Iv=()=>(async n=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(n)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var kf=typeof re<"u"?re:typeof self<"u"?self:typeof window<"u"?window:{};function kb(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){(i==null?void 0:i.type)===t&&(n.removeEventListener("message",r),e(i))})})}kb(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return tM});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function Nv(n,t,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");const r={type:"wasm_bindgen_worker_init",init:{module_or_path:n,memory:t},receiver:e.receiver()};await Promise.all(Array.from({length:e.numThreads()},async()=>{let i;try{i=new Worker(new URL("/workerHelpers.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ft&&Ft.tagName.toUpperCase()==="SCRIPT"&&Ft.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href),{type:"module"})}catch{const c=await(await fetch("/workerHelpers.js")).blob(),u=URL.createObjectURL(c);i=new Worker(u)}return i.postMessage(r),await kb(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function fu(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function uo(n,t){try{return n.apply(this,t)}catch(e){const r=fu(e);s.__wbindgen_exn_store(r)}}const Tb=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&Tb.decode();let lu=null;function fo(){return(lu===null||lu.buffer!==s.memory.buffer)&&(lu=new Uint8Array(s.memory.buffer)),lu}function Js(n,t){return n=n>>>0,Tb.decode(fo().slice(n,n+t))}let A=0;const Gb=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Ov=function(n,t){const e=Gb.encode(n);return t.set(e),{read:n.length,written:e.length}};function Tf(n,t,e){if(e===void 0){const c=Gb.encode(n),u=t(c.length,1)>>>0;return fo().subarray(u,u+c.length).set(c),A=c.length,u}let r=n.length,i=t(r,1)>>>0;const _=fo();let a=0;for(;a<r;a++){const c=n.charCodeAt(a);if(c>127)break;_[i+a]=c}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const c=fo().subarray(i+a,i+r),u=Ov(n,c);a+=u.written,i=e(i,r,a,1)>>>0}return A=a,i}let pu=null;function Dr(){return(pu===null||pu.buffer!==s.memory.buffer)&&(pu=new DataView(s.memory.buffer)),pu}function $s(n){return n==null}function Vh(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let _="[";i>0&&(_+=Vh(n[0]));for(let a=1;a<i;a++)_+=", "+Vh(n[a]);return _+="]",_}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
21
|
-
${n.stack}`:r}function o(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function b(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function R(n,t){return n=n>>>0,fo().subarray(n/1,n/1+t)}function S(n,t){const e=t(n.length*1,1)>>>0;return fo().set(n,e/1),A=n.length,e}function Yh(){s.init_panic_hook()}function kv(n){b(n,wu);const t=s.set_server_key(n.__wbg_ptr);if(t[1])throw o(t[0])}function Tv(n){let t,e;try{const r=s.shortint_pke_params_name(n);return t=r[0],e=r[1],Js(r[0],r[1])}finally{s.__wbindgen_free(t,e,1)}}function Gv(n){let t,e;try{const r=s.shortint_params_name(n);return t=r[0],e=r[1],Js(r[0],r[1])}finally{s.__wbindgen_free(t,e,1)}}function Hh(n){return s.initThreadPool(n)}function Uv(n){s.wbg_rayon_start_worker(n)}const Fv=Object.freeze({Big:0,0:"Big",Small:1,1:"Small"}),Kv=Object.freeze({Default:0,0:"Default",TfheLib:1,1:"TfheLib",DefaultKsPbs:2,2:"DefaultKsPbs",TfheLibKsPbs:3,3:"TfheLibKsPbs"}),Dv=Object.freeze({Bool:0,0:"Bool",Uint4:1,1:"Uint4",Uint8:2,2:"Uint8",Uint16:3,3:"Uint16",Uint32:4,4:"Uint32",Uint64:5,5:"Uint64",Uint128:6,6:"Uint128",Uint160:7,7:"Uint160",Uint256:8,8:"Uint256",Uint512:9,9:"Uint512",Uint1024:10,10:"Uint1024",Uint2048:11,11:"Uint2048",Uint2:12,12:"Uint2",Uint6:13,13:"Uint6",Uint10:14,14:"Uint10",Uint12:15,15:"Uint12",Uint14:16,16:"Uint14",Int2:17,17:"Int2",Int4:18,18:"Int4",Int6:19,19:"Int6",Int8:20,20:"Int8",Int10:21,21:"Int10",Int12:22,22:"Int12",Int14:23,23:"Int14",Int16:24,24:"Int16",Int32:25,25:"Int32",Int64:26,26:"Int64",Int128:27,27:"Int128",Int160:28,28:"Int160",Int256:29,29:"Int256",AsciiString:30,30:"AsciiString",Int512:31,31:"Int512",Int1024:32,32:"Int1024",Int2048:33,33:"Int2048",Uint24:34,34:"Uint24",Uint40:35,35:"Uint40",Uint48:36,36:"Uint48",Uint56:37,37:"Uint56",Uint72:38,38:"Uint72",Uint80:39,39:"Uint80",Uint88:40,40:"Uint88",Uint96:41,41:"Uint96",Uint104:42,42:"Uint104",Uint112:43,43:"Uint112",Uint120:44,44:"Uint120",Uint136:45,45:"Uint136",Uint144:46,46:"Uint144",Uint152:47,47:"Uint152",Uint168:48,48:"Uint168",Uint176:49,49:"Uint176",Uint184:50,50:"Uint184",Uint192:51,51:"Uint192",Uint200:52,52:"Uint200",Uint208:53,53:"Uint208",Uint216:54,54:"Uint216",Uint224:55,55:"Uint224",Uint232:56,56:"Uint232",Uint240:57,57:"Uint240",Uint248:58,58:"Uint248",Int24:59,59:"Int24",Int40:60,60:"Int40",Int48:61,61:"Int48",Int56:62,62:"Int56",Int72:63,63:"Int72",Int80:64,64:"Int80",Int88:65,65:"Int88",Int96:66,66:"Int96",Int104:67,67:"Int104",Int112:68,68:"Int112",Int120:69,69:"Int120",Int136:70,70:"Int136",Int144:71,71:"Int144",Int152:72,72:"Int152",Int168:73,73:"Int168",Int176:74,74:"Int176",Int184:75,75:"Int184",Int192:76,76:"Int192",Int200:77,77:"Int200",Int208:78,78:"Int208",Int216:79,79:"Int216",Int224:80,80:"Int224",Int232:81,81:"Int232",Int240:82,82:"Int240",Int248:83,83:"Int248"}),Lv=Object.freeze({PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128:0,0:"PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128",V1_1_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128:1,1:"V1_1_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128",V1_1_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128_ZKV1:2,2:"V1_1_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128_ZKV1",V1_0_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128:3,3:"V1_0_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128",V1_0_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128_ZKV1:4,4:"V1_0_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128_ZKV1",V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64:5,5:"V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64",V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1:6,6:"V0_11_PARAM_PKE_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M64_ZKV1"}),jv=Object.freeze({Big:0,0:"Big",Small:1,1:"Small"}),Vv=Object.freeze({KeyswitchBootstrap:0,0:"KeyswitchBootstrap",BootstrapKeyswitch:1,1:"BootstrapKeyswitch"}),Yv=Object.freeze({PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128:0,0:"PARAM_MESSAGE_2_CARRY_2_KS_PBS_TUNIFORM_2M128",V1_1_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M128:1,1:"V1_1_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M128:2,2:"V1_1_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M128:3,3:"V1_1_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M128:4,4:"V1_1_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M128:5,5:"V1_1_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M128:6,6:"V1_1_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M128:7,7:"V1_1_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M128:8,8:"V1_1_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M128:9,9:"V1_1_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M128:10,10:"V1_1_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M128:11,11:"V1_1_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M128:12,12:"V1_1_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M128:13,13:"V1_1_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M128:14,14:"V1_1_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M128:15,15:"V1_1_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M128:16,16:"V1_1_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M128:17,17:"V1_1_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M128:18,18:"V1_1_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M128:19,19:"V1_1_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M128:20,20:"V1_1_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M128:21,21:"V1_1_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M128:22,22:"V1_1_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M128:23,23:"V1_1_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M128:24,24:"V1_1_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M128:25,25:"V1_1_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M128:26,26:"V1_1_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M128:27,27:"V1_1_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M128:28,28:"V1_1_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M128:29,29:"V1_1_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M128:30,30:"V1_1_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M128:31,31:"V1_1_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M128:32,32:"V1_1_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M128:33,33:"V1_1_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M128:34,34:"V1_1_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M128:35,35:"V1_1_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M128:36,36:"V1_1_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128:37,37:"V1_1_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128:38,38:"V1_1_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128:39,39:"V1_1_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M128:40,40:"V1_1_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:41,41:"V1_1_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:42,42:"V1_1_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:43,43:"V1_1_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:44,44:"V1_1_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:45,45:"V1_1_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:46,46:"V1_1_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:47,47:"V1_1_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:48,48:"V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:49,49:"V1_1_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:50,50:"V1_1_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:51,51:"V1_1_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:52,52:"V1_1_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:53,53:"V1_1_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:54,54:"V1_1_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:55,55:"V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:56,56:"V1_1_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:57,57:"V1_1_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:58,58:"V1_1_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:59,59:"V1_1_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:60,60:"V1_1_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:61,61:"V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:62,62:"V1_1_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:63,63:"V1_1_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:64,64:"V1_1_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:65,65:"V1_1_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:66,66:"V1_1_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:67,67:"V1_1_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:68,68:"V1_1_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:69,69:"V1_1_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:70,70:"V1_1_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:71,71:"V1_1_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M128:72,72:"V1_0_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M128:73,73:"V1_0_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M128:74,74:"V1_0_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M128:75,75:"V1_0_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M128:76,76:"V1_0_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M128:77,77:"V1_0_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M128:78,78:"V1_0_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M128:79,79:"V1_0_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M128:80,80:"V1_0_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M128:81,81:"V1_0_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M128:82,82:"V1_0_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M128:83,83:"V1_0_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M128:84,84:"V1_0_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M128:85,85:"V1_0_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M128:86,86:"V1_0_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M128:87,87:"V1_0_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M128:88,88:"V1_0_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M128:89,89:"V1_0_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M128:90,90:"V1_0_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M128:91,91:"V1_0_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M128:92,92:"V1_0_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M128:93,93:"V1_0_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M128:94,94:"V1_0_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M128:95,95:"V1_0_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M128:96,96:"V1_0_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M128:97,97:"V1_0_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M128:98,98:"V1_0_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M128:99,99:"V1_0_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M128:100,100:"V1_0_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M128:101,101:"V1_0_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M128:102,102:"V1_0_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M128:103,103:"V1_0_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M128:104,104:"V1_0_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M128:105,105:"V1_0_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M128:106,106:"V1_0_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M128:107,107:"V1_0_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128:108,108:"V1_0_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128:109,109:"V1_0_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128:110,110:"V1_0_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M128:111,111:"V1_0_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:112,112:"V1_0_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:113,113:"V1_0_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:114,114:"V1_0_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:115,115:"V1_0_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:116,116:"V1_0_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:117,117:"V1_0_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:118,118:"V1_0_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:119,119:"V1_0_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:120,120:"V1_0_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:121,121:"V1_0_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:122,122:"V1_0_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:123,123:"V1_0_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:124,124:"V1_0_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:125,125:"V1_0_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:126,126:"V1_0_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:127,127:"V1_0_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:128,128:"V1_0_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:129,129:"V1_0_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:130,130:"V1_0_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:131,131:"V1_0_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:132,132:"V1_0_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:133,133:"V1_0_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:134,134:"V1_0_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:135,135:"V1_0_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:136,136:"V1_0_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:137,137:"V1_0_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128:138,138:"V1_0_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:139,139:"V1_0_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:140,140:"V1_0_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:141,141:"V1_0_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V1_0_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M128:142,142:"V1_0_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M128",V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64:143,143:"V0_11_PARAM_MESSAGE_1_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64:144,144:"V0_11_PARAM_MESSAGE_1_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64:145,145:"V0_11_PARAM_MESSAGE_2_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64:146,146:"V0_11_PARAM_MESSAGE_1_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64:147,147:"V0_11_PARAM_MESSAGE_2_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64:148,148:"V0_11_PARAM_MESSAGE_3_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64:149,149:"V0_11_PARAM_MESSAGE_1_CARRY_3_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64:150,150:"V0_11_PARAM_MESSAGE_2_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64:151,151:"V0_11_PARAM_MESSAGE_3_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64:152,152:"V0_11_PARAM_MESSAGE_4_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64:153,153:"V0_11_PARAM_MESSAGE_1_CARRY_4_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64:154,154:"V0_11_PARAM_MESSAGE_2_CARRY_3_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64:155,155:"V0_11_PARAM_MESSAGE_3_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64:156,156:"V0_11_PARAM_MESSAGE_4_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64:157,157:"V0_11_PARAM_MESSAGE_5_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64:158,158:"V0_11_PARAM_MESSAGE_1_CARRY_5_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64:159,159:"V0_11_PARAM_MESSAGE_2_CARRY_4_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64:160,160:"V0_11_PARAM_MESSAGE_3_CARRY_3_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64:161,161:"V0_11_PARAM_MESSAGE_4_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64:162,162:"V0_11_PARAM_MESSAGE_5_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64:163,163:"V0_11_PARAM_MESSAGE_6_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64:164,164:"V0_11_PARAM_MESSAGE_1_CARRY_6_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64:165,165:"V0_11_PARAM_MESSAGE_2_CARRY_5_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64:166,166:"V0_11_PARAM_MESSAGE_3_CARRY_4_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64:167,167:"V0_11_PARAM_MESSAGE_4_CARRY_3_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64:168,168:"V0_11_PARAM_MESSAGE_5_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64:169,169:"V0_11_PARAM_MESSAGE_6_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64:170,170:"V0_11_PARAM_MESSAGE_7_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64:171,171:"V0_11_PARAM_MESSAGE_1_CARRY_7_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64:172,172:"V0_11_PARAM_MESSAGE_2_CARRY_6_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64:173,173:"V0_11_PARAM_MESSAGE_3_CARRY_5_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64:174,174:"V0_11_PARAM_MESSAGE_4_CARRY_4_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64:175,175:"V0_11_PARAM_MESSAGE_5_CARRY_3_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64:176,176:"V0_11_PARAM_MESSAGE_6_CARRY_2_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64:177,177:"V0_11_PARAM_MESSAGE_7_CARRY_1_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64:178,178:"V0_11_PARAM_MESSAGE_8_CARRY_0_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64:179,179:"V0_11_PARAM_MESSAGE_1_CARRY_1_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64:180,180:"V0_11_PARAM_MESSAGE_2_CARRY_2_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64:181,181:"V0_11_PARAM_MESSAGE_3_CARRY_3_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64:182,182:"V0_11_PARAM_MESSAGE_4_CARRY_4_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:183,183:"V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:184,184:"V0_11_PARAM_MESSAGE_1_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:185,185:"V0_11_PARAM_MESSAGE_1_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:186,186:"V0_11_PARAM_MESSAGE_1_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:187,187:"V0_11_PARAM_MESSAGE_1_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:188,188:"V0_11_PARAM_MESSAGE_1_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:189,189:"V0_11_PARAM_MESSAGE_1_CARRY_7_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:190,190:"V0_11_PARAM_MESSAGE_2_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:191,191:"V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:192,192:"V0_11_PARAM_MESSAGE_2_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:193,193:"V0_11_PARAM_MESSAGE_2_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:194,194:"V0_11_PARAM_MESSAGE_2_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:195,195:"V0_11_PARAM_MESSAGE_2_CARRY_6_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:196,196:"V0_11_PARAM_MESSAGE_3_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:197,197:"V0_11_PARAM_MESSAGE_3_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:198,198:"V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:199,199:"V0_11_PARAM_MESSAGE_3_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:200,200:"V0_11_PARAM_MESSAGE_3_CARRY_5_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:201,201:"V0_11_PARAM_MESSAGE_4_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:202,202:"V0_11_PARAM_MESSAGE_4_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:203,203:"V0_11_PARAM_MESSAGE_4_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:204,204:"V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:205,205:"V0_11_PARAM_MESSAGE_5_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:206,206:"V0_11_PARAM_MESSAGE_5_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:207,207:"V0_11_PARAM_MESSAGE_5_CARRY_3_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:208,208:"V0_11_PARAM_MESSAGE_6_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:209,209:"V0_11_PARAM_MESSAGE_6_CARRY_2_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64:210,210:"V0_11_PARAM_MESSAGE_7_CARRY_1_COMPACT_PK_KS_PBS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64:211,211:"V0_11_PARAM_MESSAGE_1_CARRY_1_COMPACT_PK_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64:212,212:"V0_11_PARAM_MESSAGE_2_CARRY_2_COMPACT_PK_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64:213,213:"V0_11_PARAM_MESSAGE_3_CARRY_3_COMPACT_PK_PBS_KS_GAUSSIAN_2M64",V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64:214,214:"V0_11_PARAM_MESSAGE_4_CARRY_4_COMPACT_PK_PBS_KS_GAUSSIAN_2M64"}),Ub=Object.freeze({Proof:0,0:"Proof",Verify:1,1:"Verify"}),Hv=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_boolean_free(n>>>0,1));let qv=class{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hv.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_boolean_free(t,0)}static get_parameters(t){const e=s.boolean_get_parameters(t);if(e[2])throw o(e[1]);return t_.__wrap(e[0])}static new_gaussian_from_std_dev(t){const e=s.boolean_new_gaussian_from_std_dev(t);return Xs.__wrap(e)}static try_new_t_uniform(t){const e=s.boolean_try_new_t_uniform(t);if(e[2])throw o(e[1]);return Xs.__wrap(e[0])}static new_parameters(t,e,r,i,_,a,c,u,l,f){b(i,Xs),b(_,Xs);const d=s.boolean_new_parameters(t,e,r,i.__wbg_ptr,_.__wbg_ptr,a,c,u,l,f);return t_.__wrap(d)}static new_client_key_from_seed_and_parameters(t,e,r){b(r,t_);const i=s.boolean_new_client_key_from_seed_and_parameters(t,e,r.__wbg_ptr);return _r.__wrap(i)}static new_client_key(t){b(t,t_);const e=s.boolean_new_client_key(t.__wbg_ptr);return _r.__wrap(e)}static new_public_key(t){b(t,_r);const e=s.boolean_new_public_key(t.__wbg_ptr);return e_.__wrap(e)}static new_compressed_server_key(t){b(t,_r);const e=s.boolean_new_compressed_server_key(t.__wbg_ptr);return lo.__wrap(e)}static encrypt(t,e){b(t,_r);const r=s.boolean_encrypt(t.__wbg_ptr,e);return Lr.__wrap(r)}static encrypt_compressed(t,e){b(t,_r);const r=s.boolean_encrypt_compressed(t.__wbg_ptr,e);return Zs.__wrap(r)}static decompress_ciphertext(t){b(t,Zs);const e=s.boolean_decompress_ciphertext(t.__wbg_ptr);return Lr.__wrap(e)}static encrypt_with_public_key(t,e){b(t,e_);const r=s.boolean_encrypt_with_public_key(t.__wbg_ptr,e);return Lr.__wrap(r)}static trivial_encrypt(t){const e=s.boolean_trivial_encrypt(t);return Lr.__wrap(e)}static decrypt(t,e){return b(t,_r),b(e,Lr),s.boolean_decrypt(t.__wbg_ptr,e.__wbg_ptr)!==0}static serialize_ciphertext(t){b(t,Lr);const e=s.boolean_serialize_ciphertext(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_ciphertext(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.boolean_deserialize_ciphertext(e,r);if(i[2])throw o(i[1]);return Lr.__wrap(i[0])}static serialize_compressed_ciphertext(t){b(t,Zs);const e=s.boolean_serialize_compressed_ciphertext(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_compressed_ciphertext(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.boolean_deserialize_compressed_ciphertext(e,r);if(i[2])throw o(i[1]);return Zs.__wrap(i[0])}static serialize_client_key(t){b(t,_r);const e=s.boolean_serialize_client_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_client_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.boolean_deserialize_client_key(e,r);if(i[2])throw o(i[1]);return _r.__wrap(i[0])}static serialize_public_key(t){b(t,e_);const e=s.boolean_serialize_public_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_public_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.boolean_deserialize_public_key(e,r);if(i[2])throw o(i[1]);return e_.__wrap(i[0])}static serialize_compressed_server_key(t){b(t,lo);const e=s.boolean_serialize_compressed_server_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_compressed_server_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.boolean_deserialize_compressed_server_key(e,r);if(i[2])throw o(i[1]);return lo.__wrap(i[0])}};const Fb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleanciphertext_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.prototype);return e.__wbg_ptr=t,Fb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleanciphertext_free(t,0)}}const Kb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleanclientkey_free(n>>>0,1));class _r{static __wrap(t){t=t>>>0;const e=Object.create(_r.prototype);return e.__wbg_ptr=t,Kb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleanclientkey_free(t,0)}}const Db=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleancompressedciphertext_free(n>>>0,1));class Zs{static __wrap(t){t=t>>>0;const e=Object.create(Zs.prototype);return e.__wbg_ptr=t,Db.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Db.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleancompressedciphertext_free(t,0)}}const Lb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleancompressedserverkey_free(n>>>0,1));class lo{static __wrap(t){t=t>>>0;const e=Object.create(lo.prototype);return e.__wbg_ptr=t,Lb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleancompressedserverkey_free(t,0)}}const jb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleannoisedistribution_free(n>>>0,1));class Xs{static __wrap(t){t=t>>>0;const e=Object.create(Xs.prototype);return e.__wbg_ptr=t,jb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleannoisedistribution_free(t,0)}}const Vb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleanparameters_free(n>>>0,1));class t_{static __wrap(t){t=t>>>0;const e=Object.create(t_.prototype);return e.__wbg_ptr=t,Vb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleanparameters_free(t,0)}}const Yb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_booleanpublickey_free(n>>>0,1));class e_{static __wrap(t){t=t>>>0;const e=Object.create(e_.prototype);return e.__wbg_ptr=t,Yb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_booleanpublickey_free(t,0)}}const Hb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class fs{static __wrap(t){t=t>>>0;const e=Object.create(fs.prototype);return e.__wbg_ptr=t,Hb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlist_free(t,0)}static builder(t){b(t,ar);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw o(e[1]);return hu.__wrap(e[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw o(t[1]);return po.__wrap(t[0])}serialize(){const t=s.compactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compactciphertextlist_deserialize(e,r);if(i[2])throw o(i[1]);return fs.__wrap(i[0])}safe_serialize(t){const e=s.compactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compactciphertextlist_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return fs.__wrap(_[0])}}const qb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class hu{static __wrap(t){t=t>>>0;const e=Object.create(hu.prototype);return e.__wbg_ptr=t,qb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistbuilder_free(t,0)}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u40(t){const e=s.compactciphertextlistbuilder_push_u40(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u48(t){const e=s.compactciphertextlistbuilder_push_u48(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u56(t){const e=s.compactciphertextlistbuilder_push_u56(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u2(t){const e=s.compactciphertextlistbuilder_push_u2(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u4(t){const e=s.compactciphertextlistbuilder_push_u4(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u6(t){const e=s.compactciphertextlistbuilder_push_u6(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u8(t){const e=s.compactciphertextlistbuilder_push_u8(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u10(t){const e=s.compactciphertextlistbuilder_push_u10(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u12(t){const e=s.compactciphertextlistbuilder_push_u12(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u14(t){const e=s.compactciphertextlistbuilder_push_u14(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u16(t){const e=s.compactciphertextlistbuilder_push_u16(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u32(t){const e=s.compactciphertextlistbuilder_push_u32(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u64(t){const e=s.compactciphertextlistbuilder_push_u64(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i24(t){const e=s.compactciphertextlistbuilder_push_i24(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i40(t){const e=s.compactciphertextlistbuilder_push_i40(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i48(t){const e=s.compactciphertextlistbuilder_push_i48(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i56(t){const e=s.compactciphertextlistbuilder_push_i56(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i2(t){const e=s.compactciphertextlistbuilder_push_i2(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i4(t){const e=s.compactciphertextlistbuilder_push_i4(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i6(t){const e=s.compactciphertextlistbuilder_push_i6(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i8(t){const e=s.compactciphertextlistbuilder_push_i8(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i10(t){const e=s.compactciphertextlistbuilder_push_i10(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i12(t){const e=s.compactciphertextlistbuilder_push_i12(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i14(t){const e=s.compactciphertextlistbuilder_push_i14(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i16(t){const e=s.compactciphertextlistbuilder_push_i16(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i32(t){const e=s.compactciphertextlistbuilder_push_i32(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i64(t){const e=s.compactciphertextlistbuilder_push_i64(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u128(t){const e=s.compactciphertextlistbuilder_push_u128(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u160(t){const e=s.compactciphertextlistbuilder_push_u160(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u256(t){const e=s.compactciphertextlistbuilder_push_u256(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u512(t){const e=s.compactciphertextlistbuilder_push_u512(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u1024(t){const e=s.compactciphertextlistbuilder_push_u1024(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u2048(t){const e=s.compactciphertextlistbuilder_push_u2048(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i160(t){const e=s.compactciphertextlistbuilder_push_i160(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i256(t){const e=s.compactciphertextlistbuilder_push_i256(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i512(t){const e=s.compactciphertextlistbuilder_push_i512(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i1024(t){const e=s.compactciphertextlistbuilder_push_i1024(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i2048(t){const e=s.compactciphertextlistbuilder_push_i2048(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw o(e[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw o(t[1]);return fs.__wrap(t[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw o(t[1]);return fs.__wrap(t[0])}build_with_proof_packed(t,e,r){b(t,zr);const i=S(e,s.__wbindgen_malloc),_=A,a=s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr,t.__wbg_ptr,i,_,r);if(a[2])throw o(a[1]);return Va.__wrap(a[0])}push_u72(t){const e=s.compactciphertextlistbuilder_push_u72(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u80(t){const e=s.compactciphertextlistbuilder_push_u80(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u88(t){const e=s.compactciphertextlistbuilder_push_u88(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u96(t){const e=s.compactciphertextlistbuilder_push_u96(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u104(t){const e=s.compactciphertextlistbuilder_push_u104(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u112(t){const e=s.compactciphertextlistbuilder_push_u112(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u120(t){const e=s.compactciphertextlistbuilder_push_u120(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u136(t){const e=s.compactciphertextlistbuilder_push_u136(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u144(t){const e=s.compactciphertextlistbuilder_push_u144(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u152(t){const e=s.compactciphertextlistbuilder_push_u152(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u168(t){const e=s.compactciphertextlistbuilder_push_u168(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u176(t){const e=s.compactciphertextlistbuilder_push_u176(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u184(t){const e=s.compactciphertextlistbuilder_push_u184(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u192(t){const e=s.compactciphertextlistbuilder_push_u192(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u200(t){const e=s.compactciphertextlistbuilder_push_u200(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u208(t){const e=s.compactciphertextlistbuilder_push_u208(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u216(t){const e=s.compactciphertextlistbuilder_push_u216(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u224(t){const e=s.compactciphertextlistbuilder_push_u224(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u232(t){const e=s.compactciphertextlistbuilder_push_u232(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u240(t){const e=s.compactciphertextlistbuilder_push_u240(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_u248(t){const e=s.compactciphertextlistbuilder_push_u248(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i72(t){const e=s.compactciphertextlistbuilder_push_i72(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i80(t){const e=s.compactciphertextlistbuilder_push_i80(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i88(t){const e=s.compactciphertextlistbuilder_push_i88(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i96(t){const e=s.compactciphertextlistbuilder_push_i96(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i104(t){const e=s.compactciphertextlistbuilder_push_i104(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i112(t){const e=s.compactciphertextlistbuilder_push_i112(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i120(t){const e=s.compactciphertextlistbuilder_push_i120(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i136(t){const e=s.compactciphertextlistbuilder_push_i136(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i144(t){const e=s.compactciphertextlistbuilder_push_i144(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i152(t){const e=s.compactciphertextlistbuilder_push_i152(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i168(t){const e=s.compactciphertextlistbuilder_push_i168(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i176(t){const e=s.compactciphertextlistbuilder_push_i176(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i184(t){const e=s.compactciphertextlistbuilder_push_i184(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i192(t){const e=s.compactciphertextlistbuilder_push_i192(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i200(t){const e=s.compactciphertextlistbuilder_push_i200(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i208(t){const e=s.compactciphertextlistbuilder_push_i208(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i216(t){const e=s.compactciphertextlistbuilder_push_i216(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i224(t){const e=s.compactciphertextlistbuilder_push_i224(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i232(t){const e=s.compactciphertextlistbuilder_push_i232(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i240(t){const e=s.compactciphertextlistbuilder_push_i240(this.__wbg_ptr,t);if(e[1])throw o(e[0])}push_i248(t){const e=s.compactciphertextlistbuilder_push_i248(this.__wbg_ptr,t);if(e[1])throw o(e[0])}}const Qb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class po{static __wrap(t){t=t>>>0;const e=Object.create(po.prototype);return e.__wbg_ptr=t,Qb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistexpander_free(t,0)}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ri.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ai.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ci.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return fi.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return hi.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return di.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return gi.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return bi.__wrap(e[0])}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return On.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return kn.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Gn.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Fn.__wrap(e[0])}get_uint144(t){const e=s.compactciphertextlistexpander_get_uint144(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Dn.__wrap(e[0])}get_uint152(t){const e=s.compactciphertextlistexpander_get_uint152(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Ln.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Yn.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Hn.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return qn.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Qn.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Jn.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Zn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Xn.__wrap(e[0])}get_uint224(t){const e=s.compactciphertextlistexpander_get_uint224(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ti.__wrap(e[0])}get_uint232(t){const e=s.compactciphertextlistexpander_get_uint232(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ei.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ni.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ii.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return si.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Wn.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return oi.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return li.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return wi.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return In.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Tn.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Kn.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return jn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return _i.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return pi.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Un.__wrap(e[0])}get_uint160(t){const e=s.compactciphertextlistexpander_get_uint160(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Vn.__wrap(e[0])}get_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ui.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Nn.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return $n.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return wn.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return mn.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Sn.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return En.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return vn.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Bn.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return xn.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Cn.__wrap(e[0])}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Hr.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return qr.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Wr.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return $r.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Xr.__wrap(e[0])}get_int152(t){const e=s.compactciphertextlistexpander_get_int152(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return tn.__wrap(e[0])}get_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return nn.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return sn.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return _n.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return on.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return cn.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return fn.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return ln.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return pn.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return hn.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return dn.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return gn.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return an.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return An.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Pn.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Mn.__wrap(e[0])}get_int10(t){const e=s.compactciphertextlistexpander_get_int10(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Vr.__wrap(e[0])}get_int12(t){const e=s.compactciphertextlistexpander_get_int12(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Qr.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Zr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return en.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return yn.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return zn.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Jr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return rn.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return bn.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Rn.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return Yr.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return un.__wrap(e[0])}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw o(e[1]);return jr.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}}const Wb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class zr{static __wrap(t){t=t>>>0;const e=Object.create(zr.prototype);return e.__wbg_ptr=t,Wb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactpkecrs_free(t,0)}serialize(t){const e=s.compactpkecrs_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compactpkecrs_deserialize(e,r);if(i[2])throw o(i[1]);return zr.__wrap(i[0])}safe_serialize(t){const e=s.compactpkecrs_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compactpkecrs_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return zr.__wrap(_[0])}static from_config(t,e){b(t,o_);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw o(r[1]);return zr.__wrap(r[0])}static deserialize_from_public_params(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compactpkecrs_deserialize_from_public_params(e,r);if(i[2])throw o(i[1]);return zr.__wrap(i[0])}static safe_deserialize_from_public_params(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compactpkecrs_safe_deserialize_from_public_params(r,i,e);if(_[2])throw o(_[1]);return zr.__wrap(_[0])}}const Jb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfhebool_free(n>>>0,1));class ho{static __wrap(t){t=t>>>0;const e=Object.create(ho.prototype);return e.__wbg_ptr=t,Jb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfhebool_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ho.__wrap(r[0])}decompress(){const t=s.compressedfhebool_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return jr.__wrap(t[0])}serialize(){const t=s.compressedfhebool_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfhebool_deserialize(e,r);if(i[2])throw o(i[1]);return ho.__wrap(i[0])}safe_serialize(t){const e=s.compressedfhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfhebool_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ho.__wrap(_[0])}}const $b=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint10_free(n>>>0,1));class wo{static __wrap(t){t=t>>>0;const e=Object.create(wo.prototype);return e.__wbg_ptr=t,$b.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$b.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint10_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wo.__wrap(r[0])}decompress(){const t=s.compressedfheint10_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Vr.__wrap(t[0])}serialize(){const t=s.compressedfheint10_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint10_deserialize(e,r);if(i[2])throw o(i[1]);return wo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint10_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return wo.__wrap(_[0])}}const Zb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint1024_free(n>>>0,1));class go{static __wrap(t){t=t>>>0;const e=Object.create(go.prototype);return e.__wbg_ptr=t,Zb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint1024_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return go.__wrap(r[0])}decompress(){const t=s.compressedfheint1024_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Yr.__wrap(t[0])}serialize(){const t=s.compressedfheint1024_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint1024_deserialize(e,r);if(i[2])throw o(i[1]);return go.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint1024_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return go.__wrap(_[0])}}const Xb=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint104_free(n>>>0,1));class bo{static __wrap(t){t=t>>>0;const e=Object.create(bo.prototype);return e.__wbg_ptr=t,Xb.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xb.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint104_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bo.__wrap(r[0])}decompress(){const t=s.compressedfheint104_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Hr.__wrap(t[0])}serialize(){const t=s.compressedfheint104_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint104_deserialize(e,r);if(i[2])throw o(i[1]);return bo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint104_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return bo.__wrap(_[0])}}const ty=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint112_free(n>>>0,1));class yo{static __wrap(t){t=t>>>0;const e=Object.create(yo.prototype);return e.__wbg_ptr=t,ty.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ty.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint112_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return yo.__wrap(r[0])}decompress(){const t=s.compressedfheint112_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return qr.__wrap(t[0])}serialize(){const t=s.compressedfheint112_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint112_deserialize(e,r);if(i[2])throw o(i[1]);return yo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint112_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return yo.__wrap(_[0])}}const ey=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint12_free(n>>>0,1));class Ao{static __wrap(t){t=t>>>0;const e=Object.create(Ao.prototype);return e.__wbg_ptr=t,ey.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ey.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint12_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ao.__wrap(r[0])}decompress(){const t=s.compressedfheint12_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Qr.__wrap(t[0])}serialize(){const t=s.compressedfheint12_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint12_deserialize(e,r);if(i[2])throw o(i[1]);return Ao.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint12_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ao.__wrap(_[0])}}const ry=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint120_free(n>>>0,1));class mo{static __wrap(t){t=t>>>0;const e=Object.create(mo.prototype);return e.__wbg_ptr=t,ry.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ry.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint120_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return mo.__wrap(r[0])}decompress(){const t=s.compressedfheint120_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Wr.__wrap(t[0])}serialize(){const t=s.compressedfheint120_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint120_deserialize(e,r);if(i[2])throw o(i[1]);return mo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint120_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return mo.__wrap(_[0])}}const ny=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint128_free(n>>>0,1));class So{static __wrap(t){t=t>>>0;const e=Object.create(So.prototype);return e.__wbg_ptr=t,ny.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ny.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint128_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return So.__wrap(r[0])}decompress(){const t=s.compressedfheint128_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Jr.__wrap(t[0])}serialize(){const t=s.compressedfheint128_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint128_deserialize(e,r);if(i[2])throw o(i[1]);return So.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint128_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return So.__wrap(_[0])}}const iy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint136_free(n>>>0,1));class Ro{static __wrap(t){t=t>>>0;const e=Object.create(Ro.prototype);return e.__wbg_ptr=t,iy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,iy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint136_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ro.__wrap(r[0])}decompress(){const t=s.compressedfheint136_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return $r.__wrap(t[0])}serialize(){const t=s.compressedfheint136_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint136_deserialize(e,r);if(i[2])throw o(i[1]);return Ro.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint136_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ro.__wrap(_[0])}}const sy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint14_free(n>>>0,1));class Eo{static __wrap(t){t=t>>>0;const e=Object.create(Eo.prototype);return e.__wbg_ptr=t,sy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint14_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Eo.__wrap(r[0])}decompress(){const t=s.compressedfheint14_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Zr.__wrap(t[0])}serialize(){const t=s.compressedfheint14_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint14_deserialize(e,r);if(i[2])throw o(i[1]);return Eo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint14_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Eo.__wrap(_[0])}}const _y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint144_free(n>>>0,1));class Po{static __wrap(t){t=t>>>0;const e=Object.create(Po.prototype);return e.__wbg_ptr=t,_y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_y.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint144_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Po.__wrap(r[0])}decompress(){const t=s.compressedfheint144_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Xr.__wrap(t[0])}serialize(){const t=s.compressedfheint144_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint144_deserialize(e,r);if(i[2])throw o(i[1]);return Po.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint144_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Po.__wrap(_[0])}}const oy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint152_free(n>>>0,1));class zo{static __wrap(t){t=t>>>0;const e=Object.create(zo.prototype);return e.__wbg_ptr=t,oy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,oy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint152_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return zo.__wrap(r[0])}decompress(){const t=s.compressedfheint152_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return tn.__wrap(t[0])}serialize(){const t=s.compressedfheint152_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint152_deserialize(e,r);if(i[2])throw o(i[1]);return zo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint152_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return zo.__wrap(_[0])}}const ay=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint16_free(n>>>0,1));class vo{static __wrap(t){t=t>>>0;const e=Object.create(vo.prototype);return e.__wbg_ptr=t,ay.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ay.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint16_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return vo.__wrap(r[0])}decompress(){const t=s.compressedfheint16_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return en.__wrap(t[0])}serialize(){const t=s.compressedfheint16_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint16_deserialize(e,r);if(i[2])throw o(i[1]);return vo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint16_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return vo.__wrap(_[0])}}const cy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint160_free(n>>>0,1));class Mo{static __wrap(t){t=t>>>0;const e=Object.create(Mo.prototype);return e.__wbg_ptr=t,cy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint160_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Mo.__wrap(r[0])}decompress(){const t=s.compressedfheint160_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return rn.__wrap(t[0])}serialize(){const t=s.compressedfheint160_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint160_deserialize(e,r);if(i[2])throw o(i[1]);return Mo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint160_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Mo.__wrap(_[0])}}const uy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint168_free(n>>>0,1));class Bo{static __wrap(t){t=t>>>0;const e=Object.create(Bo.prototype);return e.__wbg_ptr=t,uy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,uy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint168_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Bo.__wrap(r[0])}decompress(){const t=s.compressedfheint168_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return nn.__wrap(t[0])}serialize(){const t=s.compressedfheint168_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint168_deserialize(e,r);if(i[2])throw o(i[1]);return Bo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint168_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Bo.__wrap(_[0])}}const fy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint176_free(n>>>0,1));class xo{static __wrap(t){t=t>>>0;const e=Object.create(xo.prototype);return e.__wbg_ptr=t,fy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint176_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return xo.__wrap(r[0])}decompress(){const t=s.compressedfheint176_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return sn.__wrap(t[0])}serialize(){const t=s.compressedfheint176_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint176_deserialize(e,r);if(i[2])throw o(i[1]);return xo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint176_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return xo.__wrap(_[0])}}const ly=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint184_free(n>>>0,1));class Co{static __wrap(t){t=t>>>0;const e=Object.create(Co.prototype);return e.__wbg_ptr=t,ly.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ly.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint184_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Co.__wrap(r[0])}decompress(){const t=s.compressedfheint184_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return _n.__wrap(t[0])}serialize(){const t=s.compressedfheint184_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint184_deserialize(e,r);if(i[2])throw o(i[1]);return Co.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint184_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Co.__wrap(_[0])}}const py=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint192_free(n>>>0,1));class Io{static __wrap(t){t=t>>>0;const e=Object.create(Io.prototype);return e.__wbg_ptr=t,py.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,py.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint192_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Io.__wrap(r[0])}decompress(){const t=s.compressedfheint192_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return on.__wrap(t[0])}serialize(){const t=s.compressedfheint192_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint192_deserialize(e,r);if(i[2])throw o(i[1]);return Io.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint192_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Io.__wrap(_[0])}}const hy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint2_free(n>>>0,1));class No{static __wrap(t){t=t>>>0;const e=Object.create(No.prototype);return e.__wbg_ptr=t,hy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint2_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return No.__wrap(r[0])}decompress(){const t=s.compressedfheint2_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return an.__wrap(t[0])}serialize(){const t=s.compressedfheint2_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint2_deserialize(e,r);if(i[2])throw o(i[1]);return No.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint2_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return No.__wrap(_[0])}}const wy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint200_free(n>>>0,1));class Oo{static __wrap(t){t=t>>>0;const e=Object.create(Oo.prototype);return e.__wbg_ptr=t,wy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint200_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Oo.__wrap(r[0])}decompress(){const t=s.compressedfheint200_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return cn.__wrap(t[0])}serialize(){const t=s.compressedfheint200_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint200_deserialize(e,r);if(i[2])throw o(i[1]);return Oo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint200_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Oo.__wrap(_[0])}}const dy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint2048_free(n>>>0,1));class ko{static __wrap(t){t=t>>>0;const e=Object.create(ko.prototype);return e.__wbg_ptr=t,dy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint2048_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ko.__wrap(r[0])}decompress(){const t=s.compressedfheint2048_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return un.__wrap(t[0])}serialize(){const t=s.compressedfheint2048_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint2048_deserialize(e,r);if(i[2])throw o(i[1]);return ko.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint2048_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ko.__wrap(_[0])}}const gy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint208_free(n>>>0,1));class To{static __wrap(t){t=t>>>0;const e=Object.create(To.prototype);return e.__wbg_ptr=t,gy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint208_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return To.__wrap(r[0])}decompress(){const t=s.compressedfheint208_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return fn.__wrap(t[0])}serialize(){const t=s.compressedfheint208_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint208_deserialize(e,r);if(i[2])throw o(i[1]);return To.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint208_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return To.__wrap(_[0])}}const by=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint216_free(n>>>0,1));class Go{static __wrap(t){t=t>>>0;const e=Object.create(Go.prototype);return e.__wbg_ptr=t,by.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,by.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint216_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Go.__wrap(r[0])}decompress(){const t=s.compressedfheint216_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ln.__wrap(t[0])}serialize(){const t=s.compressedfheint216_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint216_deserialize(e,r);if(i[2])throw o(i[1]);return Go.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint216_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Go.__wrap(_[0])}}const yy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint224_free(n>>>0,1));class Uo{static __wrap(t){t=t>>>0;const e=Object.create(Uo.prototype);return e.__wbg_ptr=t,yy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint224_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Uo.__wrap(r[0])}decompress(){const t=s.compressedfheint224_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return pn.__wrap(t[0])}serialize(){const t=s.compressedfheint224_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint224_deserialize(e,r);if(i[2])throw o(i[1]);return Uo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint224_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Uo.__wrap(_[0])}}const Ay=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint232_free(n>>>0,1));class Fo{static __wrap(t){t=t>>>0;const e=Object.create(Fo.prototype);return e.__wbg_ptr=t,Ay.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ay.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint232_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Fo.__wrap(r[0])}decompress(){const t=s.compressedfheint232_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return hn.__wrap(t[0])}serialize(){const t=s.compressedfheint232_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint232_deserialize(e,r);if(i[2])throw o(i[1]);return Fo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint232_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Fo.__wrap(_[0])}}const my=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint24_free(n>>>0,1));class Ko{static __wrap(t){t=t>>>0;const e=Object.create(Ko.prototype);return e.__wbg_ptr=t,my.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,my.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint24_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ko.__wrap(r[0])}decompress(){const t=s.compressedfheint24_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return wn.__wrap(t[0])}serialize(){const t=s.compressedfheint24_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint24_deserialize(e,r);if(i[2])throw o(i[1]);return Ko.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint24_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ko.__wrap(_[0])}}const Sy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint240_free(n>>>0,1));class Do{static __wrap(t){t=t>>>0;const e=Object.create(Do.prototype);return e.__wbg_ptr=t,Sy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint240_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Do.__wrap(r[0])}decompress(){const t=s.compressedfheint240_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return dn.__wrap(t[0])}serialize(){const t=s.compressedfheint240_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint240_deserialize(e,r);if(i[2])throw o(i[1]);return Do.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint240_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Do.__wrap(_[0])}}const Ry=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint248_free(n>>>0,1));class Lo{static __wrap(t){t=t>>>0;const e=Object.create(Lo.prototype);return e.__wbg_ptr=t,Ry.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ry.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint248_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Lo.__wrap(r[0])}decompress(){const t=s.compressedfheint248_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return gn.__wrap(t[0])}serialize(){const t=s.compressedfheint248_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint248_deserialize(e,r);if(i[2])throw o(i[1]);return Lo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint248_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Lo.__wrap(_[0])}}const Ey=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint256_free(n>>>0,1));class jo{static __wrap(t){t=t>>>0;const e=Object.create(jo.prototype);return e.__wbg_ptr=t,Ey.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ey.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint256_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jo.__wrap(r[0])}decompress(){const t=s.compressedfheint256_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return bn.__wrap(t[0])}serialize(){const t=s.compressedfheint256_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint256_deserialize(e,r);if(i[2])throw o(i[1]);return jo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint256_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return jo.__wrap(_[0])}}const Py=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint32_free(n>>>0,1));class Vo{static __wrap(t){t=t>>>0;const e=Object.create(Vo.prototype);return e.__wbg_ptr=t,Py.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Py.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint32_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vo.__wrap(r[0])}decompress(){const t=s.compressedfheint32_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return yn.__wrap(t[0])}serialize(){const t=s.compressedfheint32_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint32_deserialize(e,r);if(i[2])throw o(i[1]);return Vo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint32_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Vo.__wrap(_[0])}}const zy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint4_free(n>>>0,1));class Yo{static __wrap(t){t=t>>>0;const e=Object.create(Yo.prototype);return e.__wbg_ptr=t,zy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint4_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yo.__wrap(r[0])}decompress(){const t=s.compressedfheint4_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return An.__wrap(t[0])}serialize(){const t=s.compressedfheint4_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint4_deserialize(e,r);if(i[2])throw o(i[1]);return Yo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint4_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Yo.__wrap(_[0])}}const vy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint40_free(n>>>0,1));class Ho{static __wrap(t){t=t>>>0;const e=Object.create(Ho.prototype);return e.__wbg_ptr=t,vy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint40_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ho.__wrap(r[0])}decompress(){const t=s.compressedfheint40_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return mn.__wrap(t[0])}serialize(){const t=s.compressedfheint40_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint40_deserialize(e,r);if(i[2])throw o(i[1]);return Ho.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint40_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ho.__wrap(_[0])}}const My=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint48_free(n>>>0,1));class qo{static __wrap(t){t=t>>>0;const e=Object.create(qo.prototype);return e.__wbg_ptr=t,My.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,My.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint48_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qo.__wrap(r[0])}decompress(){const t=s.compressedfheint48_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Sn.__wrap(t[0])}serialize(){const t=s.compressedfheint48_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint48_deserialize(e,r);if(i[2])throw o(i[1]);return qo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint48_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return qo.__wrap(_[0])}}const By=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint512_free(n>>>0,1));class Qo{static __wrap(t){t=t>>>0;const e=Object.create(Qo.prototype);return e.__wbg_ptr=t,By.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,By.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint512_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qo.__wrap(r[0])}decompress(){const t=s.compressedfheint512_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Rn.__wrap(t[0])}serialize(){const t=s.compressedfheint512_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint512_deserialize(e,r);if(i[2])throw o(i[1]);return Qo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint512_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Qo.__wrap(_[0])}}const xy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint56_free(n>>>0,1));class Wo{static __wrap(t){t=t>>>0;const e=Object.create(Wo.prototype);return e.__wbg_ptr=t,xy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint56_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wo.__wrap(r[0])}decompress(){const t=s.compressedfheint56_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return En.__wrap(t[0])}serialize(){const t=s.compressedfheint56_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint56_deserialize(e,r);if(i[2])throw o(i[1]);return Wo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint56_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Wo.__wrap(_[0])}}const Cy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint6_free(n>>>0,1));class Jo{static __wrap(t){t=t>>>0;const e=Object.create(Jo.prototype);return e.__wbg_ptr=t,Cy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint6_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jo.__wrap(r[0])}decompress(){const t=s.compressedfheint6_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Pn.__wrap(t[0])}serialize(){const t=s.compressedfheint6_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint6_deserialize(e,r);if(i[2])throw o(i[1]);return Jo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint6_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Jo.__wrap(_[0])}}const Iy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint64_free(n>>>0,1));class $o{static __wrap(t){t=t>>>0;const e=Object.create($o.prototype);return e.__wbg_ptr=t,Iy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Iy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint64_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $o.__wrap(r[0])}decompress(){const t=s.compressedfheint64_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return zn.__wrap(t[0])}serialize(){const t=s.compressedfheint64_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint64_deserialize(e,r);if(i[2])throw o(i[1]);return $o.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint64_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return $o.__wrap(_[0])}}const Ny=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint72_free(n>>>0,1));class Zo{static __wrap(t){t=t>>>0;const e=Object.create(Zo.prototype);return e.__wbg_ptr=t,Ny.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ny.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint72_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zo.__wrap(r[0])}decompress(){const t=s.compressedfheint72_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return vn.__wrap(t[0])}serialize(){const t=s.compressedfheint72_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint72_deserialize(e,r);if(i[2])throw o(i[1]);return Zo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint72_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Zo.__wrap(_[0])}}const Oy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint8_free(n>>>0,1));class Xo{static __wrap(t){t=t>>>0;const e=Object.create(Xo.prototype);return e.__wbg_ptr=t,Oy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Oy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint8_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xo.__wrap(r[0])}decompress(){const t=s.compressedfheint8_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Mn.__wrap(t[0])}serialize(){const t=s.compressedfheint8_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint8_deserialize(e,r);if(i[2])throw o(i[1]);return Xo.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint8_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Xo.__wrap(_[0])}}const ky=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint80_free(n>>>0,1));class ta{static __wrap(t){t=t>>>0;const e=Object.create(ta.prototype);return e.__wbg_ptr=t,ky.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ky.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint80_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ta.__wrap(r[0])}decompress(){const t=s.compressedfheint80_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Bn.__wrap(t[0])}serialize(){const t=s.compressedfheint80_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint80_deserialize(e,r);if(i[2])throw o(i[1]);return ta.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint80_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ta.__wrap(_[0])}}const Ty=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint88_free(n>>>0,1));class ea{static __wrap(t){t=t>>>0;const e=Object.create(ea.prototype);return e.__wbg_ptr=t,Ty.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ty.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint88_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ea.__wrap(r[0])}decompress(){const t=s.compressedfheint88_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return xn.__wrap(t[0])}serialize(){const t=s.compressedfheint88_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint88_deserialize(e,r);if(i[2])throw o(i[1]);return ea.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint88_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ea.__wrap(_[0])}}const Gy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheint96_free(n>>>0,1));class ra{static __wrap(t){t=t>>>0;const e=Object.create(ra.prototype);return e.__wbg_ptr=t,Gy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheint96_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ra.__wrap(r[0])}decompress(){const t=s.compressedfheint96_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Cn.__wrap(t[0])}serialize(){const t=s.compressedfheint96_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheint96_deserialize(e,r);if(i[2])throw o(i[1]);return ra.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheint96_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ra.__wrap(_[0])}}const Uy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint10_free(n>>>0,1));class na{static __wrap(t){t=t>>>0;const e=Object.create(na.prototype);return e.__wbg_ptr=t,Uy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Uy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint10_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return na.__wrap(r[0])}decompress(){const t=s.compressedfheuint10_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return In.__wrap(t[0])}serialize(){const t=s.compressedfheuint10_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint10_deserialize(e,r);if(i[2])throw o(i[1]);return na.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint10_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return na.__wrap(_[0])}}const Fy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint1024_free(n>>>0,1));class ia{static __wrap(t){t=t>>>0;const e=Object.create(ia.prototype);return e.__wbg_ptr=t,Fy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint1024_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ia.__wrap(r[0])}decompress(){const t=s.compressedfheuint1024_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Nn.__wrap(t[0])}serialize(){const t=s.compressedfheuint1024_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint1024_deserialize(e,r);if(i[2])throw o(i[1]);return ia.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint1024_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ia.__wrap(_[0])}}const Ky=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint104_free(n>>>0,1));class sa{static __wrap(t){t=t>>>0;const e=Object.create(sa.prototype);return e.__wbg_ptr=t,Ky.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ky.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint104_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return sa.__wrap(r[0])}decompress(){const t=s.compressedfheuint104_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return On.__wrap(t[0])}serialize(){const t=s.compressedfheuint104_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint104_deserialize(e,r);if(i[2])throw o(i[1]);return sa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint104_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return sa.__wrap(_[0])}}const Dy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint112_free(n>>>0,1));class _a{static __wrap(t){t=t>>>0;const e=Object.create(_a.prototype);return e.__wbg_ptr=t,Dy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint112_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _a.__wrap(r[0])}decompress(){const t=s.compressedfheuint112_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return kn.__wrap(t[0])}serialize(){const t=s.compressedfheuint112_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint112_deserialize(e,r);if(i[2])throw o(i[1]);return _a.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint112_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return _a.__wrap(_[0])}}const Ly=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint12_free(n>>>0,1));class oa{static __wrap(t){t=t>>>0;const e=Object.create(oa.prototype);return e.__wbg_ptr=t,Ly.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ly.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint12_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return oa.__wrap(r[0])}decompress(){const t=s.compressedfheuint12_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Tn.__wrap(t[0])}serialize(){const t=s.compressedfheuint12_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint12_deserialize(e,r);if(i[2])throw o(i[1]);return oa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint12_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return oa.__wrap(_[0])}}const jy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint120_free(n>>>0,1));class aa{static __wrap(t){t=t>>>0;const e=Object.create(aa.prototype);return e.__wbg_ptr=t,jy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint120_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return aa.__wrap(r[0])}decompress(){const t=s.compressedfheuint120_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Gn.__wrap(t[0])}serialize(){const t=s.compressedfheuint120_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint120_deserialize(e,r);if(i[2])throw o(i[1]);return aa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint120_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return aa.__wrap(_[0])}}const Vy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint128_free(n>>>0,1));class ca{static __wrap(t){t=t>>>0;const e=Object.create(ca.prototype);return e.__wbg_ptr=t,Vy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint128_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ca.__wrap(r[0])}decompress(){const t=s.compressedfheuint128_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Un.__wrap(t[0])}serialize(){const t=s.compressedfheuint128_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint128_deserialize(e,r);if(i[2])throw o(i[1]);return ca.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint128_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ca.__wrap(_[0])}}const Yy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint136_free(n>>>0,1));class ua{static __wrap(t){t=t>>>0;const e=Object.create(ua.prototype);return e.__wbg_ptr=t,Yy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint136_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ua.__wrap(r[0])}decompress(){const t=s.compressedfheuint136_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Fn.__wrap(t[0])}serialize(){const t=s.compressedfheuint136_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint136_deserialize(e,r);if(i[2])throw o(i[1]);return ua.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint136_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ua.__wrap(_[0])}}const Hy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint14_free(n>>>0,1));class fa{static __wrap(t){t=t>>>0;const e=Object.create(fa.prototype);return e.__wbg_ptr=t,Hy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint14_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fa.__wrap(r[0])}decompress(){const t=s.compressedfheuint14_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Kn.__wrap(t[0])}serialize(){const t=s.compressedfheuint14_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint14_deserialize(e,r);if(i[2])throw o(i[1]);return fa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint14_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return fa.__wrap(_[0])}}const qy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint144_free(n>>>0,1));class la{static __wrap(t){t=t>>>0;const e=Object.create(la.prototype);return e.__wbg_ptr=t,qy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint144_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return la.__wrap(r[0])}decompress(){const t=s.compressedfheuint144_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Dn.__wrap(t[0])}serialize(){const t=s.compressedfheuint144_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint144_deserialize(e,r);if(i[2])throw o(i[1]);return la.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint144_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return la.__wrap(_[0])}}const Qy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint152_free(n>>>0,1));class pa{static __wrap(t){t=t>>>0;const e=Object.create(pa.prototype);return e.__wbg_ptr=t,Qy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint152_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pa.__wrap(r[0])}decompress(){const t=s.compressedfheuint152_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Ln.__wrap(t[0])}serialize(){const t=s.compressedfheuint152_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint152_deserialize(e,r);if(i[2])throw o(i[1]);return pa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint152_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return pa.__wrap(_[0])}}const Wy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint16_free(n>>>0,1));class ha{static __wrap(t){t=t>>>0;const e=Object.create(ha.prototype);return e.__wbg_ptr=t,Wy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint16_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ha.__wrap(r[0])}decompress(){const t=s.compressedfheuint16_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return jn.__wrap(t[0])}serialize(){const t=s.compressedfheuint16_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint16_deserialize(e,r);if(i[2])throw o(i[1]);return ha.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint16_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ha.__wrap(_[0])}}const Jy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint160_free(n>>>0,1));class wa{static __wrap(t){t=t>>>0;const e=Object.create(wa.prototype);return e.__wbg_ptr=t,Jy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint160_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wa.__wrap(r[0])}decompress(){const t=s.compressedfheuint160_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Vn.__wrap(t[0])}serialize(){const t=s.compressedfheuint160_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint160_deserialize(e,r);if(i[2])throw o(i[1]);return wa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint160_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return wa.__wrap(_[0])}}const $y=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint168_free(n>>>0,1));class da{static __wrap(t){t=t>>>0;const e=Object.create(da.prototype);return e.__wbg_ptr=t,$y.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$y.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint168_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return da.__wrap(r[0])}decompress(){const t=s.compressedfheuint168_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Yn.__wrap(t[0])}serialize(){const t=s.compressedfheuint168_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint168_deserialize(e,r);if(i[2])throw o(i[1]);return da.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint168_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return da.__wrap(_[0])}}const Zy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint176_free(n>>>0,1));class ga{static __wrap(t){t=t>>>0;const e=Object.create(ga.prototype);return e.__wbg_ptr=t,Zy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint176_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ga.__wrap(r[0])}decompress(){const t=s.compressedfheuint176_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Hn.__wrap(t[0])}serialize(){const t=s.compressedfheuint176_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint176_deserialize(e,r);if(i[2])throw o(i[1]);return ga.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint176_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ga.__wrap(_[0])}}const Xy=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint184_free(n>>>0,1));class ba{static __wrap(t){t=t>>>0;const e=Object.create(ba.prototype);return e.__wbg_ptr=t,Xy.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xy.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint184_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ba.__wrap(r[0])}decompress(){const t=s.compressedfheuint184_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return qn.__wrap(t[0])}serialize(){const t=s.compressedfheuint184_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint184_deserialize(e,r);if(i[2])throw o(i[1]);return ba.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint184_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ba.__wrap(_[0])}}const tA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint192_free(n>>>0,1));class ya{static __wrap(t){t=t>>>0;const e=Object.create(ya.prototype);return e.__wbg_ptr=t,tA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint192_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ya.__wrap(r[0])}decompress(){const t=s.compressedfheuint192_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Qn.__wrap(t[0])}serialize(){const t=s.compressedfheuint192_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint192_deserialize(e,r);if(i[2])throw o(i[1]);return ya.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint192_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ya.__wrap(_[0])}}const eA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint2_free(n>>>0,1));class Aa{static __wrap(t){t=t>>>0;const e=Object.create(Aa.prototype);return e.__wbg_ptr=t,eA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,eA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint2_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Aa.__wrap(r[0])}decompress(){const t=s.compressedfheuint2_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Wn.__wrap(t[0])}serialize(){const t=s.compressedfheuint2_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint2_deserialize(e,r);if(i[2])throw o(i[1]);return Aa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint2_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Aa.__wrap(_[0])}}const rA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint200_free(n>>>0,1));class ma{static __wrap(t){t=t>>>0;const e=Object.create(ma.prototype);return e.__wbg_ptr=t,rA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint200_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ma.__wrap(r[0])}decompress(){const t=s.compressedfheuint200_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Jn.__wrap(t[0])}serialize(){const t=s.compressedfheuint200_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint200_deserialize(e,r);if(i[2])throw o(i[1]);return ma.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint200_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ma.__wrap(_[0])}}const nA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint2048_free(n>>>0,1));class Sa{static __wrap(t){t=t>>>0;const e=Object.create(Sa.prototype);return e.__wbg_ptr=t,nA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint2048_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Sa.__wrap(r[0])}decompress(){const t=s.compressedfheuint2048_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return $n.__wrap(t[0])}serialize(){const t=s.compressedfheuint2048_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint2048_deserialize(e,r);if(i[2])throw o(i[1]);return Sa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint2048_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Sa.__wrap(_[0])}}const iA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint208_free(n>>>0,1));class Ra{static __wrap(t){t=t>>>0;const e=Object.create(Ra.prototype);return e.__wbg_ptr=t,iA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,iA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint208_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ra.__wrap(r[0])}decompress(){const t=s.compressedfheuint208_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Zn.__wrap(t[0])}serialize(){const t=s.compressedfheuint208_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint208_deserialize(e,r);if(i[2])throw o(i[1]);return Ra.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint208_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ra.__wrap(_[0])}}const sA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint216_free(n>>>0,1));class Ea{static __wrap(t){t=t>>>0;const e=Object.create(Ea.prototype);return e.__wbg_ptr=t,sA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint216_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ea.__wrap(r[0])}decompress(){const t=s.compressedfheuint216_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return Xn.__wrap(t[0])}serialize(){const t=s.compressedfheuint216_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint216_deserialize(e,r);if(i[2])throw o(i[1]);return Ea.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint216_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ea.__wrap(_[0])}}const _A=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint224_free(n>>>0,1));class Pa{static __wrap(t){t=t>>>0;const e=Object.create(Pa.prototype);return e.__wbg_ptr=t,_A.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_A.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint224_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Pa.__wrap(r[0])}decompress(){const t=s.compressedfheuint224_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ti.__wrap(t[0])}serialize(){const t=s.compressedfheuint224_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint224_deserialize(e,r);if(i[2])throw o(i[1]);return Pa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint224_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Pa.__wrap(_[0])}}const oA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint232_free(n>>>0,1));class za{static __wrap(t){t=t>>>0;const e=Object.create(za.prototype);return e.__wbg_ptr=t,oA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,oA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint232_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return za.__wrap(r[0])}decompress(){const t=s.compressedfheuint232_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ei.__wrap(t[0])}serialize(){const t=s.compressedfheuint232_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint232_deserialize(e,r);if(i[2])throw o(i[1]);return za.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint232_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return za.__wrap(_[0])}}const aA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint24_free(n>>>0,1));class va{static __wrap(t){t=t>>>0;const e=Object.create(va.prototype);return e.__wbg_ptr=t,aA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,aA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint24_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return va.__wrap(r[0])}decompress(){const t=s.compressedfheuint24_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ri.__wrap(t[0])}serialize(){const t=s.compressedfheuint24_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint24_deserialize(e,r);if(i[2])throw o(i[1]);return va.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint24_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return va.__wrap(_[0])}}const cA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint240_free(n>>>0,1));class Ma{static __wrap(t){t=t>>>0;const e=Object.create(Ma.prototype);return e.__wbg_ptr=t,cA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint240_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ma.__wrap(r[0])}decompress(){const t=s.compressedfheuint240_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ni.__wrap(t[0])}serialize(){const t=s.compressedfheuint240_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint240_deserialize(e,r);if(i[2])throw o(i[1]);return Ma.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint240_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ma.__wrap(_[0])}}const uA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint248_free(n>>>0,1));class Ba{static __wrap(t){t=t>>>0;const e=Object.create(Ba.prototype);return e.__wbg_ptr=t,uA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,uA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint248_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ba.__wrap(r[0])}decompress(){const t=s.compressedfheuint248_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ii.__wrap(t[0])}serialize(){const t=s.compressedfheuint248_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint248_deserialize(e,r);if(i[2])throw o(i[1]);return Ba.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint248_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ba.__wrap(_[0])}}const fA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint256_free(n>>>0,1));class xa{static __wrap(t){t=t>>>0;const e=Object.create(xa.prototype);return e.__wbg_ptr=t,fA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint256_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return xa.__wrap(r[0])}decompress(){const t=s.compressedfheuint256_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return si.__wrap(t[0])}serialize(){const t=s.compressedfheuint256_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint256_deserialize(e,r);if(i[2])throw o(i[1]);return xa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint256_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return xa.__wrap(_[0])}}const lA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint32_free(n>>>0,1));class Ca{static __wrap(t){t=t>>>0;const e=Object.create(Ca.prototype);return e.__wbg_ptr=t,lA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint32_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ca.__wrap(r[0])}decompress(){const t=s.compressedfheuint32_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return _i.__wrap(t[0])}serialize(){const t=s.compressedfheuint32_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint32_deserialize(e,r);if(i[2])throw o(i[1]);return Ca.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint32_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ca.__wrap(_[0])}}const pA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint4_free(n>>>0,1));class Ia{static __wrap(t){t=t>>>0;const e=Object.create(Ia.prototype);return e.__wbg_ptr=t,pA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint4_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ia.__wrap(r[0])}decompress(){const t=s.compressedfheuint4_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return oi.__wrap(t[0])}serialize(){const t=s.compressedfheuint4_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint4_deserialize(e,r);if(i[2])throw o(i[1]);return Ia.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint4_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ia.__wrap(_[0])}}const hA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint40_free(n>>>0,1));class Na{static __wrap(t){t=t>>>0;const e=Object.create(Na.prototype);return e.__wbg_ptr=t,hA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint40_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Na.__wrap(r[0])}decompress(){const t=s.compressedfheuint40_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ai.__wrap(t[0])}serialize(){const t=s.compressedfheuint40_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint40_deserialize(e,r);if(i[2])throw o(i[1]);return Na.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint40_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Na.__wrap(_[0])}}const wA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint48_free(n>>>0,1));class Oa{static __wrap(t){t=t>>>0;const e=Object.create(Oa.prototype);return e.__wbg_ptr=t,wA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint48_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Oa.__wrap(r[0])}decompress(){const t=s.compressedfheuint48_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ci.__wrap(t[0])}serialize(){const t=s.compressedfheuint48_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint48_deserialize(e,r);if(i[2])throw o(i[1]);return Oa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint48_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Oa.__wrap(_[0])}}const dA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint512_free(n>>>0,1));class ka{static __wrap(t){t=t>>>0;const e=Object.create(ka.prototype);return e.__wbg_ptr=t,dA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint512_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ka.__wrap(r[0])}decompress(){const t=s.compressedfheuint512_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ui.__wrap(t[0])}serialize(){const t=s.compressedfheuint512_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint512_deserialize(e,r);if(i[2])throw o(i[1]);return ka.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint512_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ka.__wrap(_[0])}}const gA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint56_free(n>>>0,1));class Ta{static __wrap(t){t=t>>>0;const e=Object.create(Ta.prototype);return e.__wbg_ptr=t,gA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint56_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ta.__wrap(r[0])}decompress(){const t=s.compressedfheuint56_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return fi.__wrap(t[0])}serialize(){const t=s.compressedfheuint56_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint56_deserialize(e,r);if(i[2])throw o(i[1]);return Ta.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint56_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ta.__wrap(_[0])}}const bA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint6_free(n>>>0,1));class Ga{static __wrap(t){t=t>>>0;const e=Object.create(Ga.prototype);return e.__wbg_ptr=t,bA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint6_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ga.__wrap(r[0])}decompress(){const t=s.compressedfheuint6_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return li.__wrap(t[0])}serialize(){const t=s.compressedfheuint6_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint6_deserialize(e,r);if(i[2])throw o(i[1]);return Ga.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint6_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ga.__wrap(_[0])}}const yA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint64_free(n>>>0,1));class Ua{static __wrap(t){t=t>>>0;const e=Object.create(Ua.prototype);return e.__wbg_ptr=t,yA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint64_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ua.__wrap(r[0])}decompress(){const t=s.compressedfheuint64_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return pi.__wrap(t[0])}serialize(){const t=s.compressedfheuint64_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint64_deserialize(e,r);if(i[2])throw o(i[1]);return Ua.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint64_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ua.__wrap(_[0])}}const AA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint72_free(n>>>0,1));class Fa{static __wrap(t){t=t>>>0;const e=Object.create(Fa.prototype);return e.__wbg_ptr=t,AA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,AA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint72_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Fa.__wrap(r[0])}decompress(){const t=s.compressedfheuint72_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return hi.__wrap(t[0])}serialize(){const t=s.compressedfheuint72_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint72_deserialize(e,r);if(i[2])throw o(i[1]);return Fa.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint72_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Fa.__wrap(_[0])}}const mA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint8_free(n>>>0,1));class Ka{static __wrap(t){t=t>>>0;const e=Object.create(Ka.prototype);return e.__wbg_ptr=t,mA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint8_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ka.__wrap(r[0])}decompress(){const t=s.compressedfheuint8_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return wi.__wrap(t[0])}serialize(){const t=s.compressedfheuint8_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint8_deserialize(e,r);if(i[2])throw o(i[1]);return Ka.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint8_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ka.__wrap(_[0])}}const SA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint80_free(n>>>0,1));class Da{static __wrap(t){t=t>>>0;const e=Object.create(Da.prototype);return e.__wbg_ptr=t,SA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,SA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint80_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Da.__wrap(r[0])}decompress(){const t=s.compressedfheuint80_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return di.__wrap(t[0])}serialize(){const t=s.compressedfheuint80_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint80_deserialize(e,r);if(i[2])throw o(i[1]);return Da.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint80_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Da.__wrap(_[0])}}const RA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint88_free(n>>>0,1));class La{static __wrap(t){t=t>>>0;const e=Object.create(La.prototype);return e.__wbg_ptr=t,RA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,RA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint88_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return La.__wrap(r[0])}decompress(){const t=s.compressedfheuint88_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return gi.__wrap(t[0])}serialize(){const t=s.compressedfheuint88_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint88_deserialize(e,r);if(i[2])throw o(i[1]);return La.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint88_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return La.__wrap(_[0])}}const EA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compressedfheuint96_free(n>>>0,1));class ja{static __wrap(t){t=t>>>0;const e=Object.create(ja.prototype);return e.__wbg_ptr=t,EA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,EA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compressedfheuint96_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.compressedfheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ja.__wrap(r[0])}decompress(){const t=s.compressedfheuint96_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return bi.__wrap(t[0])}serialize(){const t=s.compressedfheuint96_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.compressedfheuint96_deserialize(e,r);if(i[2])throw o(i[1]);return ja.__wrap(i[0])}safe_serialize(t){const e=s.compressedfheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.compressedfheuint96_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ja.__wrap(_[0])}}const PA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=t,PA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,PA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fhebool_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fhebool_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fhebool_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fhebool_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]!==0}serialize(){const t=s.fhebool_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fhebool_deserialize(e,r);if(i[2])throw o(i[1]);return jr.__wrap(i[0])}safe_serialize(t){const e=s.fhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fhebool_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return jr.__wrap(_[0])}}const zA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint10_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.prototype);return e.__wbg_ptr=t,zA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint10_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint10_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint10_deserialize(e,r);if(i[2])throw o(i[1]);return Vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint10_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Vr.__wrap(_[0])}}const vA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,vA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint1024_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint1024_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint1024_deserialize(e,r);if(i[2])throw o(i[1]);return Yr.__wrap(i[0])}safe_serialize(t){const e=s.fheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint1024_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Yr.__wrap(_[0])}}const MA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.prototype);return e.__wbg_ptr=t,MA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,MA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint104_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint104_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint104_deserialize(e,r);if(i[2])throw o(i[1]);return Hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint104_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Hr.__wrap(_[0])}}const BA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.prototype);return e.__wbg_ptr=t,BA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,BA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint112_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint112_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint112_deserialize(e,r);if(i[2])throw o(i[1]);return qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint112_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return qr.__wrap(_[0])}}const xA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=t,xA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint12_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint12_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint12_deserialize(e,r);if(i[2])throw o(i[1]);return Qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint12_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Qr.__wrap(_[0])}}const CA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.prototype);return e.__wbg_ptr=t,CA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,CA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint120_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint120_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint120_deserialize(e,r);if(i[2])throw o(i[1]);return Wr.__wrap(i[0])}safe_serialize(t){const e=s.fheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint120_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Wr.__wrap(_[0])}}const IA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.prototype);return e.__wbg_ptr=t,IA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,IA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint128_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint128_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint128_deserialize(e,r);if(i[2])throw o(i[1]);return Jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint128_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Jr.__wrap(_[0])}}const NA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.prototype);return e.__wbg_ptr=t,NA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,NA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint136_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $r.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $r.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint136_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint136_deserialize(e,r);if(i[2])throw o(i[1]);return $r.__wrap(i[0])}safe_serialize(t){const e=s.fheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint136_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return $r.__wrap(_[0])}}const OA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,OA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,OA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint14_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint14_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint14_deserialize(e,r);if(i[2])throw o(i[1]);return Zr.__wrap(i[0])}safe_serialize(t){const e=s.fheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint14_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Zr.__wrap(_[0])}}const kA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.prototype);return e.__wbg_ptr=t,kA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint144_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xr.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint144_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint144_deserialize(e,r);if(i[2])throw o(i[1]);return Xr.__wrap(i[0])}safe_serialize(t){const e=s.fheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint144_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Xr.__wrap(_[0])}}const TA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint152_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.prototype);return e.__wbg_ptr=t,TA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,TA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint152_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return tn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return tn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint152_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint152_deserialize(e,r);if(i[2])throw o(i[1]);return tn.__wrap(i[0])}safe_serialize(t){const e=s.fheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint152_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return tn.__wrap(_[0])}}const GA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,GA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,GA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint16_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return en.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return en.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return en.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint16_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint16_deserialize(e,r);if(i[2])throw o(i[1]);return en.__wrap(i[0])}safe_serialize(t){const e=s.fheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint16_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return en.__wrap(_[0])}}const UA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.prototype);return e.__wbg_ptr=t,UA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,UA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint160_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return rn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return rn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint160_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint160_deserialize(e,r);if(i[2])throw o(i[1]);return rn.__wrap(i[0])}safe_serialize(t){const e=s.fheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint160_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return rn.__wrap(_[0])}}const FA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,FA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,FA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint168_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return nn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return nn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint168_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint168_deserialize(e,r);if(i[2])throw o(i[1]);return nn.__wrap(i[0])}safe_serialize(t){const e=s.fheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint168_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return nn.__wrap(_[0])}}const KA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.prototype);return e.__wbg_ptr=t,KA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,KA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint176_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return sn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return sn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint176_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint176_deserialize(e,r);if(i[2])throw o(i[1]);return sn.__wrap(i[0])}safe_serialize(t){const e=s.fheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint176_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return sn.__wrap(_[0])}}const DA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.prototype);return e.__wbg_ptr=t,DA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,DA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint184_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _n.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _n.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint184_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint184_deserialize(e,r);if(i[2])throw o(i[1]);return _n.__wrap(i[0])}safe_serialize(t){const e=s.fheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint184_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return _n.__wrap(_[0])}}const LA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.prototype);return e.__wbg_ptr=t,LA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,LA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint192_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return on.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return on.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return on.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint192_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint192_deserialize(e,r);if(i[2])throw o(i[1]);return on.__wrap(i[0])}safe_serialize(t){const e=s.fheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint192_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return on.__wrap(_[0])}}const jA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.prototype);return e.__wbg_ptr=t,jA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return an.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return an.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return an.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint2_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint2_deserialize(e,r);if(i[2])throw o(i[1]);return an.__wrap(i[0])}safe_serialize(t){const e=s.fheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint2_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return an.__wrap(_[0])}}const VA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.prototype);return e.__wbg_ptr=t,VA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,VA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint200_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return cn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return cn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint200_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint200_deserialize(e,r);if(i[2])throw o(i[1]);return cn.__wrap(i[0])}safe_serialize(t){const e=s.fheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint200_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return cn.__wrap(_[0])}}const YA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.prototype);return e.__wbg_ptr=t,YA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,YA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2048_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return un.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return un.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint2048_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint2048_deserialize(e,r);if(i[2])throw o(i[1]);return un.__wrap(i[0])}safe_serialize(t){const e=s.fheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint2048_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return un.__wrap(_[0])}}const HA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.prototype);return e.__wbg_ptr=t,HA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,HA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint208_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint208_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint208_deserialize(e,r);if(i[2])throw o(i[1]);return fn.__wrap(i[0])}safe_serialize(t){const e=s.fheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint208_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return fn.__wrap(_[0])}}const qA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.prototype);return e.__wbg_ptr=t,qA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint216_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ln.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ln.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint216_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint216_deserialize(e,r);if(i[2])throw o(i[1]);return ln.__wrap(i[0])}safe_serialize(t){const e=s.fheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint216_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ln.__wrap(_[0])}}const QA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.prototype);return e.__wbg_ptr=t,QA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,QA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint224_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint224_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint224_deserialize(e,r);if(i[2])throw o(i[1]);return pn.__wrap(i[0])}safe_serialize(t){const e=s.fheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint224_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return pn.__wrap(_[0])}}const WA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.prototype);return e.__wbg_ptr=t,WA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,WA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint232_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint232_deserialize(e,r);if(i[2])throw o(i[1]);return hn.__wrap(i[0])}safe_serialize(t){const e=s.fheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint232_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return hn.__wrap(_[0])}}const JA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.prototype);return e.__wbg_ptr=t,JA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,JA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint24_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint24_deserialize(e,r);if(i[2])throw o(i[1]);return wn.__wrap(i[0])}safe_serialize(t){const e=s.fheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint24_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return wn.__wrap(_[0])}}const $A=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.prototype);return e.__wbg_ptr=t,$A.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$A.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint240_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return dn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return dn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint240_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint240_deserialize(e,r);if(i[2])throw o(i[1]);return dn.__wrap(i[0])}safe_serialize(t){const e=s.fheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint240_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return dn.__wrap(_[0])}}const ZA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.prototype);return e.__wbg_ptr=t,ZA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ZA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint248_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint248_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint248_deserialize(e,r);if(i[2])throw o(i[1]);return gn.__wrap(i[0])}safe_serialize(t){const e=s.fheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint248_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return gn.__wrap(_[0])}}const XA=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,XA.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,XA.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint256_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint256_deserialize(e,r);if(i[2])throw o(i[1]);return bn.__wrap(i[0])}safe_serialize(t){const e=s.fheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint256_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return bn.__wrap(_[0])}}const t2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,t2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,t2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint32_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return yn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return yn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint32_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint32_deserialize(e,r);if(i[2])throw o(i[1]);return yn.__wrap(i[0])}safe_serialize(t){const e=s.fheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint32_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return yn.__wrap(_[0])}}const e2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.prototype);return e.__wbg_ptr=t,e2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,e2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return An.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return An.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return An.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint4_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint4_deserialize(e,r);if(i[2])throw o(i[1]);return An.__wrap(i[0])}safe_serialize(t){const e=s.fheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint4_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return An.__wrap(_[0])}}const r2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.prototype);return e.__wbg_ptr=t,r2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,r2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint40_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return mn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return mn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint40_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint40_deserialize(e,r);if(i[2])throw o(i[1]);return mn.__wrap(i[0])}safe_serialize(t){const e=s.fheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint40_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return mn.__wrap(_[0])}}const n2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class Sn{static __wrap(t){t=t>>>0;const e=Object.create(Sn.prototype);return e.__wbg_ptr=t,n2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,n2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint48_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Sn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Sn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint48_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint48_deserialize(e,r);if(i[2])throw o(i[1]);return Sn.__wrap(i[0])}safe_serialize(t){const e=s.fheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint48_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Sn.__wrap(_[0])}}const i2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class Rn{static __wrap(t){t=t>>>0;const e=Object.create(Rn.prototype);return e.__wbg_ptr=t,i2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,i2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint512_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Rn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Rn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint512_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint512_deserialize(e,r);if(i[2])throw o(i[1]);return Rn.__wrap(i[0])}safe_serialize(t){const e=s.fheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint512_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Rn.__wrap(_[0])}}const s2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,s2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,s2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint56_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return En.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return En.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return En.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint56_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint56_deserialize(e,r);if(i[2])throw o(i[1]);return En.__wrap(i[0])}safe_serialize(t){const e=s.fheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint56_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return En.__wrap(_[0])}}const _2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.prototype);return e.__wbg_ptr=t,_2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint6_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Pn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint6_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint6_deserialize(e,r);if(i[2])throw o(i[1]);return Pn.__wrap(i[0])}safe_serialize(t){const e=s.fheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint6_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Pn.__wrap(_[0])}}const o2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.prototype);return e.__wbg_ptr=t,o2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,o2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint64_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return zn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return zn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint64_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint64_deserialize(e,r);if(i[2])throw o(i[1]);return zn.__wrap(i[0])}safe_serialize(t){const e=s.fheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint64_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return zn.__wrap(_[0])}}const a2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.prototype);return e.__wbg_ptr=t,a2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,a2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint72_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return vn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return vn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint72_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint72_deserialize(e,r);if(i[2])throw o(i[1]);return vn.__wrap(i[0])}safe_serialize(t){const e=s.fheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint72_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return vn.__wrap(_[0])}}const c2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class Mn{static __wrap(t){t=t>>>0;const e=Object.create(Mn.prototype);return e.__wbg_ptr=t,c2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,c2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint8_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Mn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Mn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheint8_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint8_deserialize(e,r);if(i[2])throw o(i[1]);return Mn.__wrap(i[0])}safe_serialize(t){const e=s.fheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint8_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Mn.__wrap(_[0])}}const u2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.prototype);return e.__wbg_ptr=t,u2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,u2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint80_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Bn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint80_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint80_deserialize(e,r);if(i[2])throw o(i[1]);return Bn.__wrap(i[0])}safe_serialize(t){const e=s.fheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint80_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Bn.__wrap(_[0])}}const f2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.prototype);return e.__wbg_ptr=t,f2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,f2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint88_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return xn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return xn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint88_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint88_deserialize(e,r);if(i[2])throw o(i[1]);return xn.__wrap(i[0])}safe_serialize(t){const e=s.fheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint88_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return xn.__wrap(_[0])}}const l2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class Cn{static __wrap(t){t=t>>>0;const e=Object.create(Cn.prototype);return e.__wbg_ptr=t,l2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,l2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint96_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Cn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Cn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheint96_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheint96_deserialize(e,r);if(i[2])throw o(i[1]);return Cn.__wrap(i[0])}safe_serialize(t){const e=s.fheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheint96_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Cn.__wrap(_[0])}}const p2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.prototype);return e.__wbg_ptr=t,p2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,p2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint10_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return In.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return In.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return In.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint10_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint10_deserialize(e,r);if(i[2])throw o(i[1]);return In.__wrap(i[0])}safe_serialize(t){const e=s.fheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint10_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return In.__wrap(_[0])}}const h2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class Nn{static __wrap(t){t=t>>>0;const e=Object.create(Nn.prototype);return e.__wbg_ptr=t,h2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,h2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint1024_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Nn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Nn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint1024_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint1024_deserialize(e,r);if(i[2])throw o(i[1]);return Nn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint1024_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Nn.__wrap(_[0])}}const w2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.prototype);return e.__wbg_ptr=t,w2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,w2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return On.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return On.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return On.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint104_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint104_deserialize(e,r);if(i[2])throw o(i[1]);return On.__wrap(i[0])}safe_serialize(t){const e=s.fheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint104_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return On.__wrap(_[0])}}const d2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.prototype);return e.__wbg_ptr=t,d2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,d2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return kn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return kn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint112_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint112_deserialize(e,r);if(i[2])throw o(i[1]);return kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint112_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return kn.__wrap(_[0])}}const g2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class Tn{static __wrap(t){t=t>>>0;const e=Object.create(Tn.prototype);return e.__wbg_ptr=t,g2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,g2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint12_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Tn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Tn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint12_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint12_deserialize(e,r);if(i[2])throw o(i[1]);return Tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint12_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Tn.__wrap(_[0])}}const b2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class Gn{static __wrap(t){t=t>>>0;const e=Object.create(Gn.prototype);return e.__wbg_ptr=t,b2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,b2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint120_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Gn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Gn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint120_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint120_deserialize(e,r);if(i[2])throw o(i[1]);return Gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint120_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Gn.__wrap(_[0])}}const y2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class Un{static __wrap(t){t=t>>>0;const e=Object.create(Un.prototype);return e.__wbg_ptr=t,y2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,y2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Un.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Un.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint128_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint128_deserialize(e,r);if(i[2])throw o(i[1]);return Un.__wrap(i[0])}safe_serialize(t){const e=s.fheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint128_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Un.__wrap(_[0])}}const A2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.prototype);return e.__wbg_ptr=t,A2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,A2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint136_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Fn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint136_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint136_deserialize(e,r);if(i[2])throw o(i[1]);return Fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint136_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Fn.__wrap(_[0])}}const m2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class Kn{static __wrap(t){t=t>>>0;const e=Object.create(Kn.prototype);return e.__wbg_ptr=t,m2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,m2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint14_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Kn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Kn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint14_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint14_deserialize(e,r);if(i[2])throw o(i[1]);return Kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint14_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Kn.__wrap(_[0])}}const S2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint144_free(n>>>0,1));class Dn{static __wrap(t){t=t>>>0;const e=Object.create(Dn.prototype);return e.__wbg_ptr=t,S2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,S2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Dn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Dn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint144_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint144_deserialize(e,r);if(i[2])throw o(i[1]);return Dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint144_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Dn.__wrap(_[0])}}const R2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class Ln{static __wrap(t){t=t>>>0;const e=Object.create(Ln.prototype);return e.__wbg_ptr=t,R2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,R2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint152_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ln.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Ln.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint152_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint152_deserialize(e,r);if(i[2])throw o(i[1]);return Ln.__wrap(i[0])}safe_serialize(t){const e=s.fheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint152_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ln.__wrap(_[0])}}const E2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class jn{static __wrap(t){t=t>>>0;const e=Object.create(jn.prototype);return e.__wbg_ptr=t,E2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,E2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint16_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return jn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint16_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint16_deserialize(e,r);if(i[2])throw o(i[1]);return jn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint16_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return jn.__wrap(_[0])}}const P2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint160_free(n>>>0,1));class Vn{static __wrap(t){t=t>>>0;const e=Object.create(Vn.prototype);return e.__wbg_ptr=t,P2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,P2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint160_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Vn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint160_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint160_deserialize(e,r);if(i[2])throw o(i[1]);return Vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint160_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Vn.__wrap(_[0])}}const z2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class Yn{static __wrap(t){t=t>>>0;const e=Object.create(Yn.prototype);return e.__wbg_ptr=t,z2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,z2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint168_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Yn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint168_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint168_deserialize(e,r);if(i[2])throw o(i[1]);return Yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint168_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Yn.__wrap(_[0])}}const v2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class Hn{static __wrap(t){t=t>>>0;const e=Object.create(Hn.prototype);return e.__wbg_ptr=t,v2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,v2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint176_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Hn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint176_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint176_deserialize(e,r);if(i[2])throw o(i[1]);return Hn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint176_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Hn.__wrap(_[0])}}const M2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class qn{static __wrap(t){t=t>>>0;const e=Object.create(qn.prototype);return e.__wbg_ptr=t,M2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,M2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint184_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return qn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint184_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint184_deserialize(e,r);if(i[2])throw o(i[1]);return qn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint184_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return qn.__wrap(_[0])}}const B2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class Qn{static __wrap(t){t=t>>>0;const e=Object.create(Qn.prototype);return e.__wbg_ptr=t,B2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,B2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint192_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Qn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint192_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint192_deserialize(e,r);if(i[2])throw o(i[1]);return Qn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint192_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Qn.__wrap(_[0])}}const x2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class Wn{static __wrap(t){t=t>>>0;const e=Object.create(Wn.prototype);return e.__wbg_ptr=t,x2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,x2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Wn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint2_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint2_deserialize(e,r);if(i[2])throw o(i[1]);return Wn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint2_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Wn.__wrap(_[0])}}const C2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class Jn{static __wrap(t){t=t>>>0;const e=Object.create(Jn.prototype);return e.__wbg_ptr=t,C2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,C2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint200_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Jn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint200_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint200_deserialize(e,r);if(i[2])throw o(i[1]);return Jn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint200_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Jn.__wrap(_[0])}}const I2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class $n{static __wrap(t){t=t>>>0;const e=Object.create($n.prototype);return e.__wbg_ptr=t,I2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,I2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2048_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $n.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return $n.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint2048_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint2048_deserialize(e,r);if(i[2])throw o(i[1]);return $n.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint2048_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return $n.__wrap(_[0])}}const N2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class Zn{static __wrap(t){t=t>>>0;const e=Object.create(Zn.prototype);return e.__wbg_ptr=t,N2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,N2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint208_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Zn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint208_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint208_deserialize(e,r);if(i[2])throw o(i[1]);return Zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint208_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Zn.__wrap(_[0])}}const O2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class Xn{static __wrap(t){t=t>>>0;const e=Object.create(Xn.prototype);return e.__wbg_ptr=t,O2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,O2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint216_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xn.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return Xn.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint216_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint216_deserialize(e,r);if(i[2])throw o(i[1]);return Xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint216_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Xn.__wrap(_[0])}}const k2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint224_free(n>>>0,1));class ti{static __wrap(t){t=t>>>0;const e=Object.create(ti.prototype);return e.__wbg_ptr=t,k2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,k2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint224_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ti.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ti.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ti.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint224_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint224_deserialize(e,r);if(i[2])throw o(i[1]);return ti.__wrap(i[0])}safe_serialize(t){const e=s.fheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint224_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ti.__wrap(_[0])}}const T2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class ei{static __wrap(t){t=t>>>0;const e=Object.create(ei.prototype);return e.__wbg_ptr=t,T2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,T2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint232_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ei.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ei.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ei.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint232_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint232_deserialize(e,r);if(i[2])throw o(i[1]);return ei.__wrap(i[0])}safe_serialize(t){const e=s.fheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint232_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ei.__wrap(_[0])}}const G2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class ri{static __wrap(t){t=t>>>0;const e=Object.create(ri.prototype);return e.__wbg_ptr=t,G2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,G2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint24_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ri.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ri.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ri.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint24_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint24_deserialize(e,r);if(i[2])throw o(i[1]);return ri.__wrap(i[0])}safe_serialize(t){const e=s.fheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint24_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ri.__wrap(_[0])}}const U2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class ni{static __wrap(t){t=t>>>0;const e=Object.create(ni.prototype);return e.__wbg_ptr=t,U2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,U2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint240_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ni.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ni.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ni.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint240_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint240_deserialize(e,r);if(i[2])throw o(i[1]);return ni.__wrap(i[0])}safe_serialize(t){const e=s.fheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint240_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ni.__wrap(_[0])}}const F2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class ii{static __wrap(t){t=t>>>0;const e=Object.create(ii.prototype);return e.__wbg_ptr=t,F2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,F2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint248_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ii.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ii.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ii.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint248_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint248_deserialize(e,r);if(i[2])throw o(i[1]);return ii.__wrap(i[0])}safe_serialize(t){const e=s.fheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint248_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ii.__wrap(_[0])}}const K2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class si{static __wrap(t){t=t>>>0;const e=Object.create(si.prototype);return e.__wbg_ptr=t,K2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,K2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint256_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return si.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return si.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return si.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint256_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint256_deserialize(e,r);if(i[2])throw o(i[1]);return si.__wrap(i[0])}safe_serialize(t){const e=s.fheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint256_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return si.__wrap(_[0])}}const D2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class _i{static __wrap(t){t=t>>>0;const e=Object.create(_i.prototype);return e.__wbg_ptr=t,D2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,D2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint32_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _i.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _i.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return _i.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint32_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint32_deserialize(e,r);if(i[2])throw o(i[1]);return _i.__wrap(i[0])}safe_serialize(t){const e=s.fheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint32_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return _i.__wrap(_[0])}}const L2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class oi{static __wrap(t){t=t>>>0;const e=Object.create(oi.prototype);return e.__wbg_ptr=t,L2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,L2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint4_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return oi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return oi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return oi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint4_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint4_deserialize(e,r);if(i[2])throw o(i[1]);return oi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint4_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return oi.__wrap(_[0])}}const j2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class ai{static __wrap(t){t=t>>>0;const e=Object.create(ai.prototype);return e.__wbg_ptr=t,j2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,j2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint40_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ai.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ai.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ai.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint40_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint40_deserialize(e,r);if(i[2])throw o(i[1]);return ai.__wrap(i[0])}safe_serialize(t){const e=s.fheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint40_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ai.__wrap(_[0])}}const V2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class ci{static __wrap(t){t=t>>>0;const e=Object.create(ci.prototype);return e.__wbg_ptr=t,V2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,V2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint48_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ci.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ci.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ci.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint48_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint48_deserialize(e,r);if(i[2])throw o(i[1]);return ci.__wrap(i[0])}safe_serialize(t){const e=s.fheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint48_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ci.__wrap(_[0])}}const Y2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class ui{static __wrap(t){t=t>>>0;const e=Object.create(ui.prototype);return e.__wbg_ptr=t,Y2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Y2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint512_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ui.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ui.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return ui.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint512_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint512_deserialize(e,r);if(i[2])throw o(i[1]);return ui.__wrap(i[0])}safe_serialize(t){const e=s.fheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint512_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ui.__wrap(_[0])}}const H2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class fi{static __wrap(t){t=t>>>0;const e=Object.create(fi.prototype);return e.__wbg_ptr=t,H2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,H2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint56_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return fi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint56_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint56_deserialize(e,r);if(i[2])throw o(i[1]);return fi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint56_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return fi.__wrap(_[0])}}const q2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class li{static __wrap(t){t=t>>>0;const e=Object.create(li.prototype);return e.__wbg_ptr=t,q2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,q2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint6_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return li.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return li.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return li.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint6_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint6_deserialize(e,r);if(i[2])throw o(i[1]);return li.__wrap(i[0])}safe_serialize(t){const e=s.fheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint6_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return li.__wrap(_[0])}}const Q2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class pi{static __wrap(t){t=t>>>0;const e=Object.create(pi.prototype);return e.__wbg_ptr=t,Q2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Q2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint64_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return pi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint64_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint64_deserialize(e,r);if(i[2])throw o(i[1]);return pi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint64_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return pi.__wrap(_[0])}}const W2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class hi{static __wrap(t){t=t>>>0;const e=Object.create(hi.prototype);return e.__wbg_ptr=t,W2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,W2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint72_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return hi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint72_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint72_deserialize(e,r);if(i[2])throw o(i[1]);return hi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint72_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return hi.__wrap(_[0])}}const J2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class wi{static __wrap(t){t=t>>>0;const e=Object.create(wi.prototype);return e.__wbg_ptr=t,J2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,J2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint8_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return wi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return e[0]}serialize(){const t=s.fheuint8_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint8_deserialize(e,r);if(i[2])throw o(i[1]);return wi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint8_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return wi.__wrap(_[0])}}const $2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class di{static __wrap(t){t=t>>>0;const e=Object.create(di.prototype);return e.__wbg_ptr=t,$2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint80_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return di.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return di.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return di.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint80_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint80_deserialize(e,r);if(i[2])throw o(i[1]);return di.__wrap(i[0])}safe_serialize(t){const e=s.fheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint80_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return di.__wrap(_[0])}}const Z2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class gi{static __wrap(t){t=t>>>0;const e=Object.create(gi.prototype);return e.__wbg_ptr=t,Z2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Z2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint88_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return gi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint88_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint88_deserialize(e,r);if(i[2])throw o(i[1]);return gi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint88_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return gi.__wrap(_[0])}}const X2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class bi{static __wrap(t){t=t>>>0;const e=Object.create(bi.prototype);return e.__wbg_ptr=t,X2.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,X2.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint96_free(t,0)}static encrypt_with_client_key(t,e){b(e,F);const r=s.fheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bi.__wrap(r[0])}static encrypt_with_public_key(t,e){b(e,gt);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bi.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){b(e,bt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw o(r[1]);return bi.__wrap(r[0])}decrypt(t){b(t,F);const e=s.fheuint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw o(e[1]);return o(e[0])}serialize(){const t=s.fheuint96_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.fheuint96_deserialize(e,r);if(i[2])throw o(i[1]);return bi.__wrap(i[0])}safe_serialize(t){const e=s.fheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.fheuint96_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return bi.__wrap(_[0])}}const tm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class Va{static __wrap(t){t=t>>>0;const e=Object.create(Va.prototype);return e.__wbg_ptr=t,tm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_provencompactciphertextlist_free(t,0)}static builder(t){b(t,ar);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw o(e[1]);return hu.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}verify_and_expand(t,e,r){b(t,zr),b(e,ar);const i=S(r,s.__wbindgen_malloc),_=A,a=s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,i,_);if(a[2])throw o(a[1]);return po.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw o(t[1]);return po.__wrap(t[0])}serialize(){const t=s.provencompactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.provencompactciphertextlist_deserialize(e,r);if(i[2])throw o(i[1]);return Va.__wrap(i[0])}safe_serialize(t){const e=s.provencompactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.provencompactciphertextlist_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Va.__wrap(_[0])}}const Qv=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortint_free(n>>>0,1));class Wv{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qv.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortint_free(t,0)}static new_gaussian_from_std_dev(t){const e=s.shortint_new_gaussian_from_std_dev(t);return or.__wrap(e)}static try_new_t_uniform(t){const e=s.shortint_try_new_t_uniform(t);if(e[2])throw o(e[1]);return or.__wrap(e[0])}static new_parameters(t,e,r,i,_,a,c,u,l,f,d,y,v,N,I){b(i,or),b(_,or);const U=s.shortint_new_parameters(t,e,r,i.__wbg_ptr,_.__wbg_ptr,a,c,u,l,f,d,y,v,N,I);return ls.__wrap(U)}static new_client_key_from_seed_and_parameters(t,e,r){b(r,ls);const i=s.shortint_new_client_key_from_seed_and_parameters(t,e,r.__wbg_ptr);return Je.__wrap(i)}static new_client_key(t){b(t,ls);const e=s.shortint_new_client_key(t.__wbg_ptr);return Je.__wrap(e)}static new_public_key(t){b(t,Je);const e=s.shortint_new_public_key(t.__wbg_ptr);return s_.__wrap(e)}static new_compressed_public_key(t){b(t,Je);const e=s.shortint_new_compressed_public_key(t.__wbg_ptr);return i_.__wrap(e)}static new_compressed_server_key(t){b(t,Je);const e=s.shortint_new_compressed_server_key(t.__wbg_ptr);return Ya.__wrap(e)}static encrypt(t,e){b(t,Je);const r=s.shortint_encrypt(t.__wbg_ptr,e);return yi.__wrap(r)}static encrypt_compressed(t,e){b(t,Je);const r=s.shortint_encrypt_compressed(t.__wbg_ptr,e);return n_.__wrap(r)}static decompress_ciphertext(t){b(t,n_);const e=s.shortint_decompress_ciphertext(t.__wbg_ptr);return yi.__wrap(e)}static encrypt_with_public_key(t,e){b(t,s_);const r=s.shortint_encrypt_with_public_key(t.__wbg_ptr,e);return yi.__wrap(r)}static encrypt_with_compressed_public_key(t,e){b(t,i_);const r=s.shortint_encrypt_with_compressed_public_key(t.__wbg_ptr,e);return yi.__wrap(r)}static decrypt(t,e){b(t,Je),b(e,yi);const r=s.shortint_decrypt(t.__wbg_ptr,e.__wbg_ptr);return BigInt.asUintN(64,r)}static serialize_ciphertext(t){b(t,yi);const e=s.shortint_serialize_ciphertext(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_ciphertext(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_ciphertext(e,r);if(i[2])throw o(i[1]);return yi.__wrap(i[0])}static serialize_compressed_ciphertext(t){b(t,n_);const e=s.shortint_serialize_compressed_ciphertext(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_compressed_ciphertext(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_compressed_ciphertext(e,r);if(i[2])throw o(i[1]);return n_.__wrap(i[0])}static serialize_client_key(t){b(t,Je);const e=s.shortint_serialize_client_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_client_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_client_key(e,r);if(i[2])throw o(i[1]);return Je.__wrap(i[0])}static serialize_public_key(t){b(t,s_);const e=s.shortint_serialize_public_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_public_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_public_key(e,r);if(i[2])throw o(i[1]);return s_.__wrap(i[0])}static serialize_compressed_public_key(t){b(t,i_);const e=s.shortint_serialize_compressed_public_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_compressed_public_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_compressed_public_key(e,r);if(i[2])throw o(i[1]);return i_.__wrap(i[0])}static serialize_compressed_server_key(t){b(t,Ya);const e=s.shortint_serialize_compressed_server_key(t.__wbg_ptr);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize_compressed_server_key(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.shortint_deserialize_compressed_server_key(e,r);if(i[2])throw o(i[1]);return Ya.__wrap(i[0])}}const em=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintciphertext_free(n>>>0,1));class yi{static __wrap(t){t=t>>>0;const e=Object.create(yi.prototype);return e.__wbg_ptr=t,em.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,em.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintciphertext_free(t,0)}}const rm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintclientkey_free(n>>>0,1));class Je{static __wrap(t){t=t>>>0;const e=Object.create(Je.prototype);return e.__wbg_ptr=t,rm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintclientkey_free(t,0)}}const qh=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class r_{static __wrap(t){t=t>>>0;const e=Object.create(r_.prototype);return e.__wbg_ptr=t,qh.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qh.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,qh.register(this,this.__wbg_ptr,this),this}static new_parameters(t,e,r,i,_,a,c,u){b(e,or);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,_,a,c,u);if(l[2])throw o(l[1]);return r_.__wrap(l[0])}}const nm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompressedciphertext_free(n>>>0,1));class n_{static __wrap(t){t=t>>>0;const e=Object.create(n_.prototype);return e.__wbg_ptr=t,nm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompressedciphertext_free(t,0)}}const im=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompressedpublickey_free(n>>>0,1));class i_{static __wrap(t){t=t>>>0;const e=Object.create(i_.prototype);return e.__wbg_ptr=t,im.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,im.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompressedpublickey_free(t,0)}}const sm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompressedserverkey_free(n>>>0,1));class Ya{static __wrap(t){t=t>>>0;const e=Object.create(Ya.prototype);return e.__wbg_ptr=t,sm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompressedserverkey_free(t,0)}}const _m=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class or{static __wrap(t){t=t>>>0;const e=Object.create(or.prototype);return e.__wbg_ptr=t,_m.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_m.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintnoisedistribution_free(t,0)}}const Qh=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintparameters_free(n>>>0,1));class ls{static __wrap(t){t=t>>>0;const e=Object.create(ls.prototype);return e.__wbg_ptr=t,Qh.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qh.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintparameters_free(t,0)}lwe_dimension(){return s.shortintparameters_lwe_dimension(this.__wbg_ptr)>>>0}set_lwe_dimension(t){s.shortintparameters_set_lwe_dimension(this.__wbg_ptr,t)}glwe_dimension(){return s.shortintparameters_glwe_dimension(this.__wbg_ptr)>>>0}set_glwe_dimension(t){s.shortintparameters_set_glwe_dimension(this.__wbg_ptr,t)}polynomial_size(){return s.shortintparameters_polynomial_size(this.__wbg_ptr)>>>0}set_polynomial_size(t){s.shortintparameters_set_polynomial_size(this.__wbg_ptr,t)}lwe_noise_distribution(){const t=s.shortintparameters_glwe_noise_distribution(this.__wbg_ptr);return or.__wrap(t)}set_lwe_noise_distribution(t){b(t,or),s.shortintparameters_set_lwe_noise_distribution(this.__wbg_ptr,t.__wbg_ptr)}glwe_noise_distribution(){const t=s.shortintparameters_glwe_noise_distribution(this.__wbg_ptr);return or.__wrap(t)}set_glwe_noise_distribution(t){b(t,or),s.shortintparameters_set_glwe_noise_distribution(this.__wbg_ptr,t.__wbg_ptr)}pbs_base_log(){return s.shortintparameters_pbs_base_log(this.__wbg_ptr)>>>0}set_pbs_base_log(t){s.shortintparameters_set_pbs_base_log(this.__wbg_ptr,t)}pbs_level(){return s.shortintparameters_pbs_level(this.__wbg_ptr)>>>0}set_pbs_level(t){s.shortintparameters_set_pbs_level(this.__wbg_ptr,t)}ks_base_log(){return s.shortintparameters_ks_base_log(this.__wbg_ptr)>>>0}set_ks_base_log(t){s.shortintparameters_set_ks_base_log(this.__wbg_ptr,t)}ks_level(){return s.shortintparameters_ks_level(this.__wbg_ptr)>>>0}set_ks_level(t){s.shortintparameters_set_ks_level(this.__wbg_ptr,t)}message_modulus(){const t=s.shortintparameters_message_modulus(this.__wbg_ptr);return BigInt.asUintN(64,t)}set_message_modulus(t){s.shortintparameters_set_message_modulus(this.__wbg_ptr,t)}carry_modulus(){const t=s.shortintparameters_carry_modulus(this.__wbg_ptr);return BigInt.asUintN(64,t)}set_carry_modulus(t){s.shortintparameters_set_carry_modulus(this.__wbg_ptr,t)}encryption_key_choice(){return s.shortintparameters_encryption_key_choice(this.__wbg_ptr)}set_encryption_key_choice(t){s.shortintparameters_set_encryption_key_choice(this.__wbg_ptr,t)}constructor(t){const e=s.shortintparameters_new(t);return this.__wbg_ptr=e>>>0,Qh.register(this,this.__wbg_ptr,this),this}}const om=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintpublickey_free(n>>>0,1));class s_{static __wrap(t){t=t>>>0;const e=Object.create(s_.prototype);return e.__wbg_ptr=t,om.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,om.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintpublickey_free(t,0)}}const am=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheclientkey_free(n>>>0,1));class F{static __wrap(t){t=t>>>0;const e=Object.create(F.prototype);return e.__wbg_ptr=t,am.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,am.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheclientkey_free(t,0)}static generate(t){b(t,o_);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw o(e[1]);return F.__wrap(e[0])}static generate_with_seed(t,e){b(t,o_);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw o(r[1]);return F.__wrap(r[0])}serialize(){const t=s.tfheclientkey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfheclientkey_deserialize(e,r);if(i[2])throw o(i[1]);return F.__wrap(i[0])}safe_serialize(t){const e=s.tfheclientkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfheclientkey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return F.__wrap(_[0])}}const cm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class ar{static __wrap(t){t=t>>>0;const e=Object.create(ar.prototype);return e.__wbg_ptr=t,cm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompactpublickey_free(t,0)}static new(t){b(t,F);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return ar.__wrap(e[0])}serialize(){const t=s.tfhecompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfhecompactpublickey_deserialize(e,r);if(i[2])throw o(i[1]);return ar.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfhecompactpublickey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return ar.__wrap(_[0])}static safe_deserialize_conformant(t,e,r){const i=S(t,s.__wbindgen_malloc),_=A;b(r,r_);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,_,e,r.__wbg_ptr);if(a[2])throw o(a[1]);return ar.__wrap(a[0])}}const um=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));class __{static __wrap(t){t=t>>>0;const e=Object.create(__.prototype);return e.__wbg_ptr=t,um.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,um.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedcompactpublickey_free(t,0)}static new(t){b(t,F);const e=s.tfhecompressedcompactpublickey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return __.__wrap(e[0])}serialize(){const t=s.tfhecompressedcompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfhecompressedcompactpublickey_deserialize(e,r);if(i[2])throw o(i[1]);return __.__wrap(i[0])}decompress(){const t=s.tfhecompressedcompactpublickey_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return ar.__wrap(t[0])}safe_serialize(t){const e=s.tfhecompressedcompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfhecompressedcompactpublickey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return __.__wrap(_[0])}static safe_deserialize_conformant(t,e,r){const i=S(t,s.__wbindgen_malloc),_=A;b(r,r_);const a=s.tfhecompressedcompactpublickey_safe_deserialize_conformant(i,_,e,r.__wbg_ptr);if(a[2])throw o(a[1]);return __.__wrap(a[0])}}const fm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class bt{static __wrap(t){t=t>>>0;const e=Object.create(bt.prototype);return e.__wbg_ptr=t,fm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedpublickey_free(t,0)}static new(t){b(t,F);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return bt.__wrap(e[0])}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw o(t[1]);return gt.__wrap(t[0])}serialize(){const t=s.tfhecompressedpublickey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfhecompressedpublickey_deserialize(e,r);if(i[2])throw o(i[1]);return bt.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfhecompressedpublickey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return bt.__wrap(_[0])}}const lm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));class Ha{static __wrap(t){t=t>>>0;const e=Object.create(Ha.prototype);return e.__wbg_ptr=t,lm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedserverkey_free(t,0)}static new(t){b(t,F);const e=s.tfhecompressedserverkey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return Ha.__wrap(e[0])}serialize(){const t=s.tfhecompressedserverkey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfhecompressedserverkey_deserialize(e,r);if(i[2])throw o(i[1]);return Ha.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedserverkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfhecompressedserverkey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return Ha.__wrap(_[0])}}const pm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class o_{static __wrap(t){t=t>>>0;const e=Object.create(o_.prototype);return e.__wbg_ptr=t,pm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfig_free(t,0)}}const hm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));class a_{static __wrap(t){t=t>>>0;const e=Object.create(a_.prototype);return e.__wbg_ptr=t,hm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfigbuilder_free(t,0)}static default(){const t=s.tfheconfigbuilder_default();return a_.__wrap(t)}static with_custom_parameters(t){b(t,ls);const e=s.tfheconfigbuilder_with_custom_parameters(t.__wbg_ptr);return a_.__wrap(e)}use_custom_parameters(t){const e=this.__destroy_into_raw();b(t,ls);const r=s.tfheconfigbuilder_use_custom_parameters(e,t.__wbg_ptr);return a_.__wrap(r)}use_dedicated_compact_public_key_parameters(t){const e=this.__destroy_into_raw();b(t,r_);const r=s.tfheconfigbuilder_use_dedicated_compact_public_key_parameters(e,t.__wbg_ptr);return a_.__wrap(r)}build(){const t=this.__destroy_into_raw(),e=s.tfheconfigbuilder_build(t);return o_.__wrap(e)}}const wm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class gt{static __wrap(t){t=t>>>0;const e=Object.create(gt.prototype);return e.__wbg_ptr=t,wm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhepublickey_free(t,0)}static new(t){b(t,F);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return gt.__wrap(e[0])}serialize(){const t=s.tfhepublickey_serialize(this.__wbg_ptr);if(t[3])throw o(t[2]);var e=R(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=S(t,s.__wbindgen_malloc),r=A,i=s.tfhepublickey_deserialize(e,r);if(i[2])throw o(i[1]);return gt.__wrap(i[0])}safe_serialize(t){const e=s.tfhepublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw o(e[2]);var r=R(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=S(t,s.__wbindgen_malloc),i=A,_=s.tfhepublickey_safe_deserialize(r,i,e);if(_[2])throw o(_[1]);return gt.__wrap(_[0])}}const dm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheserverkey_free(n>>>0,1));class wu{static __wrap(t){t=t>>>0;const e=Object.create(wu.prototype);return e.__wbg_ptr=t,dm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheserverkey_free(t,0)}static new(t){b(t,F);const e=s.tfheserverkey_new(t.__wbg_ptr);if(e[2])throw o(e[1]);return wu.__wrap(e[0])}}const Jv=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhe_free(n>>>0,1));class $v{__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jv.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhe_free(t,0)}}const gm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class Gf{static __wrap(t){t=t>>>0;const e=Object.create(Gf.prototype);return e.__wbg_ptr=t,gm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gm.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}}async function Zv(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function bm(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_470dd987b8190f8e=function(t){return BigInt(t)},n.wbg.__wbg_BigInt_ddea6d2f55558acb=function(){return uo(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return uo(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return uo(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Js(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return uo(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(Js(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return uo(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return uo(function(){return module.require},arguments)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=Tf(r,s.__wbindgen_malloc,s.__wbindgen_realloc),_=A;Dr().setInt32(t+4*1,_,!0),Dr().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return Nv(t,e,Gf.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof kf>"u"?null:kf;return $s(t)?0:fu(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return $s(t)?0:fu(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return $s(t)?0:fu(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return $s(t)?0:fu(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_2f76f493957b63da=function(t,e,r){const i=e.toString(r),_=Tf(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=A;Dr().setInt32(t+4*1,a,!0),Dr().setInt32(t+4*0,_,!0)},n.wbg.__wbg_toString_c813bbd34d063839=function(t){return t.toString()},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_bigint_from_i128=function(t,e){return t<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_i64=function(t){return t},n.wbg.__wbindgen_bigint_from_u128=function(t,e){return BigInt.asUintN(64,t)<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_bigint_get_as_i64=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;Dr().setBigInt64(t+8*1,$s(i)?BigInt(0):i,!0),Dr().setInt32(t+4*0,!$s(i),!0)},n.wbg.__wbindgen_bit_and=function(t,e){return t&e},n.wbg.__wbindgen_bit_or=function(t,e){return t|e},n.wbg.__wbindgen_debug_string=function(t,e){const r=Vh(e),i=Tf(r,s.__wbindgen_malloc,s.__wbindgen_realloc),_=A;Dr().setInt32(t+4*1,_,!0),Dr().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Js(t,e))},n.wbg.__wbindgen_init_externref_table=function(){const t=s.__wbindgen_export_2,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_eq=function(t,e){return t===e},n.wbg.__wbindgen_lt=function(t,e){return t<e},n.wbg.__wbindgen_memory=function(){return s.memory},n.wbg.__wbindgen_module=function(){return du.__wbindgen_wasm_module},n.wbg.__wbindgen_neg=function(t){return-t},n.wbg.__wbindgen_number_new=function(t){return t},n.wbg.__wbindgen_shl=function(t,e){return t<<e},n.wbg.__wbindgen_shr=function(t,e){return t>>e},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var _=$s(i)?0:Tf(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=A;Dr().setInt32(t+4*1,a,!0),Dr().setInt32(t+4*0,_,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Js(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Js(t,e))},n}function ym(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:20,maximum:16384,shared:!0})}function Am(n,t,e){if(s=n.exports,du.__wbindgen_wasm_module=t,pu=null,lu=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}function Xv(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for `initSync()`; pass a single object instead"));const r=bm();ym(r,t),n instanceof WebAssembly.Module||(n=new WebAssembly.Module(n));const i=new WebAssembly.Instance(n,r);return Am(i,n,e)}async function du(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/tfhe_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ft&&Ft.tagName.toUpperCase()==="SCRIPT"&&Ft.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const r=bm();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),ym(r,t);const{instance:i,module:_}=await Zv(await n,r);return Am(i,_,e)}var tM=Object.freeze({__proto__:null,Boolean:qv,BooleanCiphertext:Lr,BooleanClientKey:_r,BooleanCompressedCiphertext:Zs,BooleanCompressedServerKey:lo,BooleanEncryptionKeyChoice:Fv,BooleanNoiseDistribution:Xs,BooleanParameterSet:Kv,BooleanParameters:t_,BooleanPublicKey:e_,CompactCiphertextList:fs,CompactCiphertextListBuilder:hu,CompactCiphertextListExpander:po,CompactPkeCrs:zr,CompressedFheBool:ho,CompressedFheInt10:wo,CompressedFheInt1024:go,CompressedFheInt104:bo,CompressedFheInt112:yo,CompressedFheInt12:Ao,CompressedFheInt120:mo,CompressedFheInt128:So,CompressedFheInt136:Ro,CompressedFheInt14:Eo,CompressedFheInt144:Po,CompressedFheInt152:zo,CompressedFheInt16:vo,CompressedFheInt160:Mo,CompressedFheInt168:Bo,CompressedFheInt176:xo,CompressedFheInt184:Co,CompressedFheInt192:Io,CompressedFheInt2:No,CompressedFheInt200:Oo,CompressedFheInt2048:ko,CompressedFheInt208:To,CompressedFheInt216:Go,CompressedFheInt224:Uo,CompressedFheInt232:Fo,CompressedFheInt24:Ko,CompressedFheInt240:Do,CompressedFheInt248:Lo,CompressedFheInt256:jo,CompressedFheInt32:Vo,CompressedFheInt4:Yo,CompressedFheInt40:Ho,CompressedFheInt48:qo,CompressedFheInt512:Qo,CompressedFheInt56:Wo,CompressedFheInt6:Jo,CompressedFheInt64:$o,CompressedFheInt72:Zo,CompressedFheInt8:Xo,CompressedFheInt80:ta,CompressedFheInt88:ea,CompressedFheInt96:ra,CompressedFheUint10:na,CompressedFheUint1024:ia,CompressedFheUint104:sa,CompressedFheUint112:_a,CompressedFheUint12:oa,CompressedFheUint120:aa,CompressedFheUint128:ca,CompressedFheUint136:ua,CompressedFheUint14:fa,CompressedFheUint144:la,CompressedFheUint152:pa,CompressedFheUint16:ha,CompressedFheUint160:wa,CompressedFheUint168:da,CompressedFheUint176:ga,CompressedFheUint184:ba,CompressedFheUint192:ya,CompressedFheUint2:Aa,CompressedFheUint200:ma,CompressedFheUint2048:Sa,CompressedFheUint208:Ra,CompressedFheUint216:Ea,CompressedFheUint224:Pa,CompressedFheUint232:za,CompressedFheUint24:va,CompressedFheUint240:Ma,CompressedFheUint248:Ba,CompressedFheUint256:xa,CompressedFheUint32:Ca,CompressedFheUint4:Ia,CompressedFheUint40:Na,CompressedFheUint48:Oa,CompressedFheUint512:ka,CompressedFheUint56:Ta,CompressedFheUint6:Ga,CompressedFheUint64:Ua,CompressedFheUint72:Fa,CompressedFheUint8:Ka,CompressedFheUint80:Da,CompressedFheUint88:La,CompressedFheUint96:ja,FheBool:jr,FheInt10:Vr,FheInt1024:Yr,FheInt104:Hr,FheInt112:qr,FheInt12:Qr,FheInt120:Wr,FheInt128:Jr,FheInt136:$r,FheInt14:Zr,FheInt144:Xr,FheInt152:tn,FheInt16:en,FheInt160:rn,FheInt168:nn,FheInt176:sn,FheInt184:_n,FheInt192:on,FheInt2:an,FheInt200:cn,FheInt2048:un,FheInt208:fn,FheInt216:ln,FheInt224:pn,FheInt232:hn,FheInt24:wn,FheInt240:dn,FheInt248:gn,FheInt256:bn,FheInt32:yn,FheInt4:An,FheInt40:mn,FheInt48:Sn,FheInt512:Rn,FheInt56:En,FheInt6:Pn,FheInt64:zn,FheInt72:vn,FheInt8:Mn,FheInt80:Bn,FheInt88:xn,FheInt96:Cn,FheTypes:Dv,FheUint10:In,FheUint1024:Nn,FheUint104:On,FheUint112:kn,FheUint12:Tn,FheUint120:Gn,FheUint128:Un,FheUint136:Fn,FheUint14:Kn,FheUint144:Dn,FheUint152:Ln,FheUint16:jn,FheUint160:Vn,FheUint168:Yn,FheUint176:Hn,FheUint184:qn,FheUint192:Qn,FheUint2:Wn,FheUint200:Jn,FheUint2048:$n,FheUint208:Zn,FheUint216:Xn,FheUint224:ti,FheUint232:ei,FheUint24:ri,FheUint240:ni,FheUint248:ii,FheUint256:si,FheUint32:_i,FheUint4:oi,FheUint40:ai,FheUint48:ci,FheUint512:ui,FheUint56:fi,FheUint6:li,FheUint64:pi,FheUint72:hi,FheUint8:wi,FheUint80:di,FheUint88:gi,FheUint96:bi,ProvenCompactCiphertextList:Va,Shortint:Wv,ShortintCiphertext:yi,ShortintClientKey:Je,ShortintCompactPublicKeyEncryptionParameters:r_,ShortintCompactPublicKeyEncryptionParametersName:Lv,ShortintCompressedCiphertext:n_,ShortintCompressedPublicKey:i_,ShortintCompressedServerKey:Ya,ShortintEncryptionKeyChoice:jv,ShortintNoiseDistribution:or,ShortintPBSOrder:Vv,ShortintParameters:ls,ShortintParametersName:Yv,ShortintPublicKey:s_,TfheClientKey:F,TfheCompactPublicKey:ar,TfheCompressedCompactPublicKey:__,TfheCompressedPublicKey:bt,TfheCompressedServerKey:Ha,TfheConfig:o_,TfheConfigBuilder:a_,TfhePublicKey:gt,TfheServerKey:wu,ZkComputeLoad:Ub,default:du,initSync:Xv,initThreadPool:Hh,init_panic_hook:Yh,set_server_key:kv,shortint_params_name:Gv,shortint_pke_params_name:Tv,tfhe:$v,wbg_rayon_PoolBuilder:Gf,wbg_rayon_start_worker:Uv});let _t,oe=0,gu=null;function qa(){return(gu===null||gu.byteLength===0)&&(gu=new Uint8Array(_t.memory.buffer)),gu}const Uf=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},eM=typeof Uf.encodeInto=="function"?function(n,t){return Uf.encodeInto(n,t)}:function(n,t){const e=Uf.encode(n);return t.set(e),{read:n.length,written:e.length}};function c_(n,t,e){if(e===void 0){const c=Uf.encode(n),u=t(c.length,1)>>>0;return qa().subarray(u,u+c.length).set(c),oe=c.length,u}let r=n.length,i=t(r,1)>>>0;const _=qa();let a=0;for(;a<r;a++){const c=n.charCodeAt(a);if(c>127)break;_[i+a]=c}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const c=qa().subarray(i+a,i+r),u=eM(n,c);a+=u.written,i=e(i,r,a,1)>>>0}return oe=a,i}let u_=null;function cr(){return(u_===null||u_.buffer.detached===!0||u_.buffer.detached===void 0&&u_.buffer!==_t.memory.buffer)&&(u_=new DataView(_t.memory.buffer)),u_}function Qa(n){const t=_t.__externref_table_alloc();return _t.__wbindgen_export_4.set(t,n),t}function f_(n,t){try{return n.apply(this,t)}catch(e){const r=Qa(e);_t.__wbindgen_exn_store(r)}}const mm=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&mm.decode();function bu(n,t){return n=n>>>0,mm.decode(qa().subarray(n,n+t))}function ps(n){return n==null}function Wh(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let _="[";i>0&&(_+=Wh(n[0]));for(let a=1;a<i;a++)_+=", "+Wh(n[a]);return _+="]",_}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
22
|
-
${n.stack}`:r}function l_(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function vr(n,t){return n=n>>>0,qa().subarray(n/1,n/1+t)}function Mr(n,t){const e=t(n.length*1,1)>>>0;return qa().set(n,e/1),oe=n.length,e}function p_(n){const t=_t.__wbindgen_export_4.get(n);return _t.__externref_table_dealloc(n),t}function rM(n,t){const e=c_(t,_t.__wbindgen_malloc,_t.__wbindgen_realloc),r=oe,i=_t.new_server_id_addr(n,e,r);if(i[2])throw p_(i[1]);return Ja.__wrap(i[0])}function Sm(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=Qa(n[r]);cr().setUint32(e+4*r,i,!0)}return oe=n.length,e}function nM(n,t,e){const r=Sm(n,_t.__wbindgen_malloc),i=oe,_=c_(t,_t.__wbindgen_malloc,_t.__wbindgen_realloc),a=oe,c=c_(e,_t.__wbindgen_malloc,_t.__wbindgen_realloc),u=oe,l=_t.new_client(r,i,_,a,c,u);if(l[2])throw p_(l[1]);return Ff.__wrap(l[0])}function Rm(n,t){n=n>>>0;const e=cr(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(_t.__wbindgen_export_4.get(e.getUint32(i,!0)));return _t.__externref_drop_slice(n,t),r}function iM(){const n=_t.ml_kem_pke_keygen();return h_.__wrap(n)}function sM(n){l_(n,h_);const t=_t.ml_kem_pke_get_pk(n.__wbg_ptr);return Wa.__wrap(t)}function _M(n){l_(n,Wa);const t=_t.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw p_(t[2]);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}function oM(n){l_(n,h_);const t=_t.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw p_(t[2]);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}function aM(n){const t=Mr(n,_t.__wbindgen_malloc),e=oe,r=_t.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw p_(r[1]);return Wa.__wrap(r[0])}function cM(n){const t=Mr(n,_t.__wbindgen_malloc),e=oe,r=_t.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw p_(r[1]);return h_.__wrap(r[0])}function uM(n,t,e,r,i,_,a){l_(n,Ff),l_(i,Wa),l_(_,h_);const c=_t.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,_.__wbg_ptr,a);if(c[3])throw p_(c[2]);var u=Rm(c[0],c[1]).slice();return _t.__wbindgen_free(c[0],c[1]*4,4),u}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_ciphertexthandle_free(n>>>0,1));const Em=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_client_free(n>>>0,1));class Ff{static __wrap(t){t=t>>>0;const e=Object.create(Ff.prototype);return e.__wbg_ptr=t,Em.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Em.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_cryptoboxct_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const Pm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_privateenckey_free(n>>>0,1));class h_{static __wrap(t){t=t>>>0;const e=Object.create(h_.prototype);return e.__wbg_ptr=t,Pm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_privateenckey_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_privatesigkey_free(n>>>0,1));const zm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_publicenckey_free(n>>>0,1));class Wa{static __wrap(t){t=t>>>0;const e=Object.create(Wa.prototype);return e.__wbg_ptr=t,zm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_publicenckey_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_requestid_free(n>>>0,1));const vm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_serveridaddr_free(n>>>0,1));class Ja{static __wrap(t){t=t>>>0;const e=Object.create(Ja.prototype);return e.__wbg_ptr=t,vm.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Ja?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_serveridaddr_free(t,0)}}const Mm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_typedciphertext_free(n>>>0,1));class yu{static __wrap(t){t=t>>>0;const e=Object.create(yu.prototype);return e.__wbg_ptr=t,Mm.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof yu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=_t.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return _t.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){_t.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=_t.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return _t.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){_t.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const Bm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_typedplaintext_free(n>>>0,1));class Jh{static __wrap(t){t=t>>>0;const e=Object.create(Jh.prototype);return e.__wbg_ptr=t,Bm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_typedplaintext_free(t,0)}get bytes(){const t=_t.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return _t.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){_t.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const xm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class Au{static __wrap(t){t=t>>>0;const e=Object.create(Au.prototype);return e.__wbg_ptr=t,xm.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof Au?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return _t.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){_t.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=_t.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=_t.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return _t.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){_t.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>_t.__wbg_userdecryptionrequest_free(n>>>0,1));const fM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_userdecryptionresponse_free(n>>>0,1));class $h{static __unwrap(t){return t instanceof $h?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fM.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=_t.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=_t.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=_t.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:Kf.__wrap(t)}set payload(t){let e=0;ps(t)||(l_(t,Kf),e=t.__destroy_into_raw()),_t.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}}const Cm=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>_t.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class Kf{static __wrap(t){t=t>>>0;const e=Object.create(Kf.prototype);return e.__wbg_ptr=t,Cm.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cm.unregister(this),t}free(){const t=this.__destroy_into_raw();_t.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=_t.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=_t.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=vr(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=Mr(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=_t.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=Rm(t[0],t[1]).slice();return _t.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=Sm(t,_t.__wbindgen_malloc),r=oe;_t.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return _t.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){_t.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return _t.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){_t.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function lM(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function pM(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=c_(r,_t.__wbindgen_malloc,_t.__wbindgen_realloc),_=oe;cr().setInt32(t+4*1,_,!0),cr().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return f_(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return f_(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(bu(t,e))}finally{_t.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return f_(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return f_(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(bu(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return f_(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return f_(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return f_(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return Ja.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return Ja.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=c_(r,_t.__wbindgen_malloc,_t.__wbindgen_realloc),_=oe;cr().setInt32(t+4*1,_,!0),cr().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof kf>"u"?null:kf;return ps(t)?0:Qa(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return ps(t)?0:Qa(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return ps(t)?0:Qa(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return ps(t)?0:Qa(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return yu.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return yu.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return Jh.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return Au.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return Au.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return $h.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=Wh(e),i=c_(r,_t.__wbindgen_malloc,_t.__wbindgen_realloc),_=oe;cr().setInt32(t+4*1,_,!0),cr().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(bu(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=_t.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return _t.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;cr().setFloat64(t+8*1,ps(i)?0:i,!0),cr().setInt32(t+4*0,!ps(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var _=ps(i)?0:c_(i,_t.__wbindgen_malloc,_t.__wbindgen_realloc),a=oe;cr().setInt32(t+4*1,a,!0),cr().setInt32(t+4*0,_,!0)},n.wbg.__wbindgen_string_new=function(t,e){return bu(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(bu(t,e))},n}function hM(n,t){return _t=n.exports,Zh.__wbindgen_wasm_module=t,u_=null,gu=null,_t.__wbindgen_start(),_t}async function Zh(n){if(_t!==void 0)return _t;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ft&&Ft.tagName.toUpperCase()==="SCRIPT"&&Ft.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=pM();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await lM(await n,t);return hM(e,r)}const wM=BigInt(1024*1024*512),Xh=BigInt(1024*1024*512),tw=BigInt(1024*1024*512),mu=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Im=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},ur=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function Ai(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const Df=function(n){if(!n||(n==null?void 0:n.length)===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function Nm(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function dM(n){const t=Nm(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function gM(n){const t=Nm(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Om(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function km(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Tm(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function bM(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Gm(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Um(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function ew(n,t,e,r){const i={method:"POST",headers:{"Content-Type":"application/json",...(r==null?void 0:r.apiKey)&&{"x-api-key":r.apiKey}},body:JSON.stringify(e)};let _,a;try{_=await fetch(t,i)}catch(u){Gm(n,u)}_.ok||await Om(n,_);let c;try{c=await _.json()}catch(u){km(n,u)}try{Um(c),a=c}catch(u){Tm(n,u)}return a}async function yM(n,t){let e,r;try{e=await fetch(t)}catch(_){Gm(n,_)}e.ok||await Om(n,e);let i;try{i=await e.json()}catch(_){km(n,_)}try{Um(i),r=i}catch(_){Tm(n,_)}return r}const rw={},Fm=async(n,t)=>{if(rw[n])return rw[n];const e=await yM("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const v=e.response.fhe_key_info.find(N=>N.fhe_public_key.data_id===t);if(!v)throw new Error(`Could not find FHE key info with data_id ${t}`);r=v.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let _;typeof i.bytes=="function"?_=await i.bytes():_=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],c=e.response.crs[2048].data_id,u=await fetch(a);if(!u.ok)throw new Error(`HTTP error! status: ${u.status} on ${u.url}`);let l;typeof u.bytes=="function"?l=await u.bytes():l=new Uint8Array(await u.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(_,Xh)}catch(v){throw new Error("Invalid public key (deserialization failed)",{cause:v})}let d;try{d=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),tw)}catch(v){throw new Error("Invalid crs (deserialization failed)",{cause:v})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:d,publicParamsId:c}}};return rw[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Km=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Dm=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],AM=n=>{if(typeof n.network=="string")return new Mz(n.network);if(n.network)return new xz(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},mM=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},SM=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Fm(mu(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,Xh),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},RM=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Fm(mu(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,tw),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},EM=async(n,t)=>await new Pr(t.kmsContractAddress,Km,n).getKmsSigners(),PM=async(n,t)=>{const r=await new Pr(t.kmsContractAddress,Km,n).getThreshold();return Number(r)},zM=async(n,t)=>await new Pr(t.inputVerifierContractAddress,Dm,n).getCoprocessorSigners(),vM=async(n,t)=>{const r=await new Pr(t.inputVerifierContractAddress,Dm,n).getThreshold();return Number(r)},Lm={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function jm(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in Lm))throw new Error(`Handle ${e} is not of valid type`);if(t+=Lm[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const Lf=n=>qt(n),MM=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Vm=10,Ym=BigInt(365);function BM(n,t){return t===0?n===BigInt(1):t===7?Lf("0x"+n.toString(16).padStart(40,"0")):t===9?"0x"+n.toString(16).padStart(128,"0"):t===10?"0x"+n.toString(16).padStart(256,"0"):t===11?"0x"+n.toString(16).padStart(512,"0"):n}function xM(n,t){let e=[];for(const i of n){const _=i.slice(-4,-2).toLowerCase(),a=parseInt(_,16);e.push(a)}let r={};return n.forEach((i,_)=>r[i]=BM(t[_],e[_])),r}function CM(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Ym)throw Error(`durationDays is above max duration of ${Ym}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const IM=(n,t,e,r,i,_,a,c)=>async(u,l,f,d,y,v,N,I)=>{let U,z;try{U=TKMS.u8vec_to_ml_kem_pke_pk(ur(f)),z=TKMS.u8vec_to_ml_kem_pke_sk(ur(l))}catch(j){throw new Error("Invalid public or private key",{cause:j})}const B=d.replace(/^(0x)/,""),O=f.replace(/^(0x)/,""),C=u.map(j=>({handle:typeof j.handle=="string"?Ai(ur(j.handle),!0):Ai(j.handle,!0),contractAddress:Lf(j.contractAddress)}));jm(C.map(j=>j.handle)),CM(BigInt(N),BigInt(I));const k=new Pr(i,MM,a),D=C.map(async({handle:j,contractAddress:Pt})=>{const xt=await k.persistAllowed(j,v),ft=await k.persistAllowed(j,Pt);if(!xt)throw new Error(`User ${v} is not authorized to user decrypt handle ${j}!`);if(!ft)throw new Error(`dapp contract ${Pt} is not authorized to user decrypt handle ${j}!`);if(v===Pt)throw new Error(`userAddress ${v} should not be equal to contractAddress when requesting user decryption!`)}),L=y.length;if(L===0)throw Error("contractAddresses is empty");if(L>Vm)throw Error(`contractAddresses max length of ${Vm} exceeded`);await Promise.all(D).catch(j=>{throw j});const V={handleContractPairs:C,requestValidity:{startTimestamp:N.toString(),durationDays:I.toString()},contractsChainId:e.toString(),contractAddresses:y.map(j=>Lf(j)),userAddress:Lf(v),signature:B,publicKey:O},tt=await ew("USER_DECRYPT",`${_}/v1/user-decrypt`,V,c);let rt=n.map((j,Pt)=>TKMS.new_server_id_addr(Pt+1,j));const wt=TKMS.new_client(rt,v,"default");try{const j=new ArrayBuffer(32);new DataView(j).setUint32(28,t,!1);const ft={name:"Decryption",version:"1",chain_id:new Uint8Array(j),verifying_contract:r,salt:null},yt={signature:B,client_address:v,enc_key:O,ciphertext_handles:C.map(It=>It.handle.replace(/^0x/,"")),eip712_verifying_contract:r},Bt=TKMS.process_user_decryption_resp_from_js(wt,yt,ft,tt.response,U,z,!0).map(It=>Df(It.bytes));return xM(C.map(It=>It.handle),Bt)}catch(j){throw new Error("An error occured during decryption",{cause:j})}},mi=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},NM=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:_})=>{if(!sr(i))throw new Error("Contract address is not a valid address.");if(!sr(_))throw new Error("User address is not a valid address.");const a=e,c=[],u=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=d=>{if(c.reduce((y,v)=>y+Math.max(2,v),0)+d>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(c.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(d){if(d==null)throw new Error("Missing value");if(typeof d!="boolean"&&typeof d!="number"&&typeof d!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(d)>1)throw new Error("The value must be 1 or 0.");return mi(Number(d),1),f(2),u.push_boolean(!!d),c.push(1),this},add8(d){return mi(d,8),f(8),u.push_u8(Number(d)),c.push(8),this},add16(d){return mi(d,16),f(16),u.push_u16(Number(d)),c.push(16),this},add32(d){return mi(d,32),f(32),u.push_u32(Number(d)),c.push(32),this},add64(d){return mi(d,64),f(64),u.push_u64(BigInt(d)),c.push(64),this},add128(d){return mi(d,128),f(128),u.push_u128(BigInt(d)),c.push(128),this},addAddress(d){if(!sr(d))throw new Error("The value must be a valid address.");return f(160),u.push_u160(BigInt(d)),c.push(160),this},add256(d){return mi(d,256),f(256),u.push_u256(BigInt(d)),c.push(256),this},addBytes64(d){if(d.length!==64)throw Error("Uncorrect length of input Uint8Array, should be 64 for an ebytes64");const y=Df(d);return mi(y,512),f(512),u.push_u512(y),c.push(512),this},addBytes128(d){if(d.length!==128)throw Error("Uncorrect length of input Uint8Array, should be 128 for an ebytes128");const y=Df(d);return mi(y,1024),f(1024),u.push_u1024(y),c.push(1024),this},addBytes256(d){if(d.length!==256)throw Error("Uncorrect length of input Uint8Array, should be 256 for an ebytes256");const y=Df(d);return mi(y,2048),f(2048),u.push_u2048(y),c.push(2048),this},getBits(){return c},encrypt(){const y=(()=>{const C=V=>Object.keys(V),k=c.reduce((V,tt)=>V+tt,0),D=C(r),L=D.find(V=>Number(V)>=k);if(!L)throw new Error(`Too many bits in provided values. Maximum is ${D[D.length-1]}.`);return L})(),v=r[y].publicParams,N=ur(i),I=ur(_),U=ur(n),z=ur(t.toString(16).padStart(64,"0")),B=new Uint8Array(N.length+I.length+U.length+32);return B.set(N,0),B.set(I,20),B.set(U,40),B.set(z,B.length-z.length),l=u.build_with_proof_packed(v,B,TFHE.ZkComputeLoad.Verify).safe_serialize(wM),l}}},Hm={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},OM=BigInt("18446744073709551615"),kM=(n,t,e,r,i)=>{const _=Nb("keccak256").update(yr.from(n)).digest(),a=yr.from(ur(e)),c=r.toString(16).padStart(64,"0"),u=yr.from(c,"hex");return t.map((f,d)=>{const y=Hm[f],v=yr.from([d]),N=Nb("keccak256").update(_).update(v).update(a).update(u).digest(),I=new Uint8Array(32);if(I.set(N,0),BigInt(r)>OM)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const U=ur(c).slice(24,32);return I[21]=d,I.set(U,22),I[30]=y,I[31]=i,I})},qm=n=>qt(n),TM=()=>0;function GM(n,t,e){const r=new Map;t.forEach((i,_)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,_)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function UM(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const FM=(n,t,e,r,i,_,a,c,u)=>(l,f)=>{if(!sr(l))throw new Error("Contract address is not a valid address.");if(!sr(f))throw new Error("User address is not a valid address.");const d=NM({aclContractAddress:n,chainId:e,tfheCompactPublicKey:_,publicParams:a,contractAddress:l,userAddress:f});return{_input:d,addBool(y){return d.addBool(y),this},add8(y){return d.add8(y),this},add16(y){return d.add16(y),this},add32(y){return d.add32(y),this},add64(y){return d.add64(y),this},add128(y){return d.add128(y),this},add256(y){return d.add256(y),this},addAddress(y){return d.addAddress(y),this},getBits(){return d.getBits()},encrypt:async y=>{const v=d.getBits(),N=d.encrypt(),I={contractAddress:qm(l),userAddress:qm(f),ciphertextWithInputVerification:Ai(N),contractChainId:"0x"+e.toString(16)},U=await ew("INPUT_PROOF",`${i}/v1/input-proof`,I,y);UM(U)||bM("INPUT_PROOF",U);const z=kM(N,v,n,e,TM());if(U.response.handles&&U.response.handles.length>0){const rt=U.response.handles.map(ur);if(z.length!=rt.length)throw new Error(`Incorrect Handles list sizes: (expected) ${z.length} != ${rt.length} (received)`);for(let wt=0;wt<z.length;wt+=1){let j=z[wt],Pt=rt[wt],xt=Ai(j),ft=Ai(Pt);if(xt!==ft)throw new Error(`Incorrect Handle ${wt}: (expected) ${xt} != ${ft} (received)`)}}const B=U.response.signatures,O={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},C={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"}]},k=B.map(rt=>{const wt=rt.startsWith("0x")?rt:`0x${rt}`;return Fg(O,C,{ctHandles:z,userAddress:f,contractAddress:l,contractChainId:e},wt)});if(!GM(c,k,u))throw Error("Coprocessor signers threshold is not reached");let L=Im(z.length);const V=B.length;return L+=Im(V),z.map(rt=>Ai(rt)).map(rt=>L+=rt),B.map(rt=>L+=rt.slice(2)),{handles:z,inputProof:ur(L)}}}},KM=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function DM(n,t,e){const r=new Map;t.forEach((i,_)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,_)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}const LM={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function jM(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),d=parseInt(f,16);e.push(d)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>LM[l]),c=new eo().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length);let u={};return n.forEach((l,f)=>u[l]=c[f]),u}const VM=(n,t,e,r,i,_,a,c)=>async u=>{const l=new Pr(i,KM,a);let f;try{f=await Promise.all(u.map(async k=>{const D=Ai(typeof k=="string"?ur(k):k,!0);if(!await l.isAllowedForDecryption(D))throw new Error(`Handle ${D} is not allowed for public decryption!`);return D}))}catch(k){throw k}jm(f);const d={ciphertextHandles:f},y=await ew("PUBLIC_DECRYPT",`${_}/v1/public-decrypt`,d,c),v={name:"Decryption",version:"1",chainId:e,verifyingContract:r},N={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"}]},I=y.response[0],U=I.decrypted_value.startsWith("0x")?I.decrypted_value:`0x${I.decrypted_value}`,B=I.signatures.map(k=>{const D=k.startsWith("0x")?k:`0x${k}`;return Fg(v,N,{ctHandles:f,decryptedResult:U},D)});if(!DM(n,B,t))throw Error("KMS signers threshold is not reached");return jM(f,U)},Qm=(n,t)=>(e,r,i,_,a)=>{if(a&&!sr(a))throw new Error("Invalid delegated account.");if(!sr(n))throw new Error("Invalid verifying contract address.");if(!r.every(y=>sr(y)))throw new Error("Invalid contract address.");const c=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,u=typeof i=="number"?i.toString():i,l=typeof _=="number"?_.toString():_,f=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],d={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:f,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:d,message:{publicKey:c,contractAddresses:r,contractsChainId:t,startTimestamp:u,durationDays:l,delegatedAccount:a}}:{types:{EIP712Domain:f,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"}]},primaryType:"UserDecryptRequestVerification",domain:d,message:{publicKey:c,contractAddresses:r,contractsChainId:t,startTimestamp:u,durationDays:l}}},Wm=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:Ai(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:Ai(TKMS.ml_kem_pke_sk_to_u8vec(n))}};re.fetch=Cv(re.fetch,{retries:5,retryDelay:500});const YM={aclContractAddress:"0x687820221192C5B662b25367F70076A37bc79b6c",kmsContractAddress:"0x1364cBBf2cDF5032C47d8226a6f6FBD2AFCDacAC",inputVerifierContractAddress:"0xbc91f3daD1A5F19F8390c400196e58073B6a0BC4",verifyingContractAddressDecryption:"0xb6E160B1ff80D67Bfe90A85eE06Ce0A2613607D1",verifyingContractAddressInputVerification:"0x7048C39f048125eDa9d678AEbaDfB22F7900a29F",chainId:11155111,gatewayChainId:55815,network:"https://eth-sepolia.public.blastapi.io",relayerUrl:"https://relayer.testnet.zama.cloud"},HM=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:_,gatewayChainId:a}=n;if(!i||!sr(i))throw new Error("KMS contract address is not valid or empty");if(!t||!sr(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!sr(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!_||!sr(_))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const c=AM(n);if(!c)throw new Error("No network has been provided!");const u=await mM(c,n),l=await SM(n),f=await RM(n),d=await EM(c,n),y=await PM(c,n),v=await zM(c,n),N=await vM(c,n);return{createEncryptedInput:FM(_,e,u,a,mu(n.relayerUrl),l.publicKey,f,v,N),generateKeypair:Wm,createEIP712:Qm(t,u),publicDecrypt:VM(d,y,a,t,_,mu(n.relayerUrl),c),userDecrypt:IM(d,a,u,t,_,mu(n.relayerUrl),c),getPublicKey:()=>l.publicKey?{publicKey:l.publicKey.safe_serialize(Xh),publicKeyId:l.publicKeyId}:null,getPublicParams:I=>f[I]?{publicParams:f[I].publicParams.safe_serialize(tw),publicParamsId:f[I].publicParamsId}:null}};let Jm=!1;const qM=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await Iv()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
11
|
+
*/(function(R){const P=e,z=T,k=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=L,R.SlowBuffer=X,R.INSPECT_MAX_BYTES=50;const C=2147483647;R.kMaxLength=C;const{Uint8Array:N,ArrayBuffer:D,SharedArrayBuffer:Y}=globalThis;L.TYPED_ARRAY_SUPPORT=Z(),!L.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function Z(){try{const m=new N(1),p={foo:function(){return 42}};return Object.setPrototypeOf(p,N.prototype),Object.setPrototypeOf(m,p),m.foo()===42}catch{return!1}}Object.defineProperty(L.prototype,"parent",{enumerable:!0,get:function(){if(L.isBuffer(this))return this.buffer}}),Object.defineProperty(L.prototype,"offset",{enumerable:!0,get:function(){if(L.isBuffer(this))return this.byteOffset}});function ft(m){if(m>C)throw new RangeError('The value "'+m+'" is invalid for option "size"');const p=new N(m);return Object.setPrototypeOf(p,L.prototype),p}function L(m,p,d){if(typeof m=="number"){if(typeof p=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return wt(m)}return At(m,p,d)}L.poolSize=8192;function At(m,p,d){if(typeof m=="string")return Et(m,p);if(D.isView(m))return vt(m);if(m==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m);if(Oe(m,D)||m&&Oe(m.buffer,D)||typeof Y<"u"&&(Oe(m,Y)||m&&Oe(m.buffer,Y)))return Bt(m,p,d);if(typeof m=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');const O=m.valueOf&&m.valueOf();if(O!=null&&O!==m)return L.from(O,p,d);const H=jt(m);if(H)return H;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof m[Symbol.toPrimitive]=="function")return L.from(m[Symbol.toPrimitive]("string"),p,d);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof m)}L.from=function(m,p,d){return At(m,p,d)},Object.setPrototypeOf(L.prototype,N.prototype),Object.setPrototypeOf(L,N);function Rt(m){if(typeof m!="number")throw new TypeError('"size" argument must be of type number');if(m<0)throw new RangeError('The value "'+m+'" is invalid for option "size"')}function at(m,p,d){return Rt(m),m<=0?ft(m):p!==void 0?typeof d=="string"?ft(m).fill(p,d):ft(m).fill(p):ft(m)}L.alloc=function(m,p,d){return at(m,p,d)};function wt(m){return Rt(m),ft(m<0?0:W(m)|0)}L.allocUnsafe=function(m){return wt(m)},L.allocUnsafeSlow=function(m){return wt(m)};function Et(m,p){if((typeof p!="string"||p==="")&&(p="utf8"),!L.isEncoding(p))throw new TypeError("Unknown encoding: "+p);const d=nt(m,p)|0;let O=ft(d);const H=O.write(m,p);return H!==d&&(O=O.slice(0,H)),O}function xt(m){const p=m.length<0?0:W(m.length)|0,d=ft(p);for(let O=0;O<p;O+=1)d[O]=m[O]&255;return d}function vt(m){if(Oe(m,N)){const p=new N(m);return Bt(p.buffer,p.byteOffset,p.byteLength)}return xt(m)}function Bt(m,p,d){if(p<0||m.byteLength<p)throw new RangeError('"offset" is outside of buffer bounds');if(m.byteLength<p+(d||0))throw new RangeError('"length" is outside of buffer bounds');let O;return p===void 0&&d===void 0?O=new N(m):d===void 0?O=new N(m,p):O=new N(m,p,d),Object.setPrototypeOf(O,L.prototype),O}function jt(m){if(L.isBuffer(m)){const p=W(m.length)|0,d=ft(p);return d.length===0||m.copy(d,0,0,p),d}if(m.length!==void 0)return typeof m.length!="number"||Gi(m.length)?ft(0):xt(m);if(m.type==="Buffer"&&Array.isArray(m.data))return xt(m.data)}function W(m){if(m>=C)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+C.toString(16)+" bytes");return m|0}function X(m){return+m!=m&&(m=0),L.alloc(+m)}L.isBuffer=function(p){return p!=null&&p._isBuffer===!0&&p!==L.prototype},L.compare=function(p,d){if(Oe(p,N)&&(p=L.from(p,p.offset,p.byteLength)),Oe(d,N)&&(d=L.from(d,d.offset,d.byteLength)),!L.isBuffer(p)||!L.isBuffer(d))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(p===d)return 0;let O=p.length,H=d.length;for(let $=0,ot=Math.min(O,H);$<ot;++$)if(p[$]!==d[$]){O=p[$],H=d[$];break}return O<H?-1:H<O?1:0},L.isEncoding=function(p){switch(String(p).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}},L.concat=function(p,d){if(!Array.isArray(p))throw new TypeError('"list" argument must be an Array of Buffers');if(p.length===0)return L.alloc(0);let O;if(d===void 0)for(d=0,O=0;O<p.length;++O)d+=p[O].length;const H=L.allocUnsafe(d);let $=0;for(O=0;O<p.length;++O){let ot=p[O];if(Oe(ot,N))$+ot.length>H.length?(L.isBuffer(ot)||(ot=L.from(ot)),ot.copy(H,$)):N.prototype.set.call(H,ot,$);else if(L.isBuffer(ot))ot.copy(H,$);else throw new TypeError('"list" argument must be an Array of Buffers');$+=ot.length}return H};function nt(m,p){if(L.isBuffer(m))return m.length;if(D.isView(m)||Oe(m,D))return m.byteLength;if(typeof m!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof m);const d=m.length,O=arguments.length>2&&arguments[2]===!0;if(!O&&d===0)return 0;let H=!1;for(;;)switch(p){case"ascii":case"latin1":case"binary":return d;case"utf8":case"utf-8":return Vt(m).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return d*2;case"hex":return d>>>1;case"base64":return Dt(m).length;default:if(H)return O?-1:Vt(m).length;p=(""+p).toLowerCase(),H=!0}}L.byteLength=nt;function dt(m,p,d){let O=!1;if((p===void 0||p<0)&&(p=0),p>this.length||((d===void 0||d>this.length)&&(d=this.length),d<=0)||(d>>>=0,p>>>=0,d<=p))return"";for(m||(m="utf8");;)switch(m){case"hex":return we(this,p,d);case"utf8":case"utf-8":return St(this,p,d);case"ascii":return pe(this,p,d);case"latin1":case"binary":return it(this,p,d);case"base64":return lt(this,p,d);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,p,d);default:if(O)throw new TypeError("Unknown encoding: "+m);m=(m+"").toLowerCase(),O=!0}}L.prototype._isBuffer=!0;function G(m,p,d){const O=m[p];m[p]=m[d],m[d]=O}L.prototype.swap16=function(){const p=this.length;if(p%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let d=0;d<p;d+=2)G(this,d,d+1);return this},L.prototype.swap32=function(){const p=this.length;if(p%4!==0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let d=0;d<p;d+=4)G(this,d,d+3),G(this,d+1,d+2);return this},L.prototype.swap64=function(){const p=this.length;if(p%8!==0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let d=0;d<p;d+=8)G(this,d,d+7),G(this,d+1,d+6),G(this,d+2,d+5),G(this,d+3,d+4);return this},L.prototype.toString=function(){const p=this.length;return p===0?"":arguments.length===0?St(this,0,p):dt.apply(this,arguments)},L.prototype.toLocaleString=L.prototype.toString,L.prototype.equals=function(p){if(!L.isBuffer(p))throw new TypeError("Argument must be a Buffer");return this===p?!0:L.compare(this,p)===0},L.prototype.inspect=function(){let p="";const d=R.INSPECT_MAX_BYTES;return p=this.toString("hex",0,d).replace(/(.{2})/g,"$1 ").trim(),this.length>d&&(p+=" ... "),"<Buffer "+p+">"},k&&(L.prototype[k]=L.prototype.inspect),L.prototype.compare=function(p,d,O,H,$){if(Oe(p,N)&&(p=L.from(p,p.offset,p.byteLength)),!L.isBuffer(p))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof p);if(d===void 0&&(d=0),O===void 0&&(O=p?p.length:0),H===void 0&&(H=0),$===void 0&&($=this.length),d<0||O>p.length||H<0||$>this.length)throw new RangeError("out of range index");if(H>=$&&d>=O)return 0;if(H>=$)return-1;if(d>=O)return 1;if(d>>>=0,O>>>=0,H>>>=0,$>>>=0,this===p)return 0;let ot=$-H,Ft=O-d;const Zt=Math.min(ot,Ft),Jt=this.slice(H,$),Xt=p.slice(d,O);for(let Ht=0;Ht<Zt;++Ht)if(Jt[Ht]!==Xt[Ht]){ot=Jt[Ht],Ft=Xt[Ht];break}return ot<Ft?-1:Ft<ot?1:0};function M(m,p,d,O,H){if(m.length===0)return-1;if(typeof d=="string"?(O=d,d=0):d>2147483647?d=2147483647:d<-2147483648&&(d=-2147483648),d=+d,Gi(d)&&(d=H?0:m.length-1),d<0&&(d=m.length+d),d>=m.length){if(H)return-1;d=m.length-1}else if(d<0)if(H)d=0;else return-1;if(typeof p=="string"&&(p=L.from(p,O)),L.isBuffer(p))return p.length===0?-1:tt(m,p,d,O,H);if(typeof p=="number")return p=p&255,typeof N.prototype.indexOf=="function"?H?N.prototype.indexOf.call(m,p,d):N.prototype.lastIndexOf.call(m,p,d):tt(m,[p],d,O,H);throw new TypeError("val must be string, number or Buffer")}function tt(m,p,d,O,H){let $=1,ot=m.length,Ft=p.length;if(O!==void 0&&(O=String(O).toLowerCase(),O==="ucs2"||O==="ucs-2"||O==="utf16le"||O==="utf-16le")){if(m.length<2||p.length<2)return-1;$=2,ot/=2,Ft/=2,d/=2}function Zt(Xt,Ht){return $===1?Xt[Ht]:Xt.readUInt16BE(Ht*$)}let Jt;if(H){let Xt=-1;for(Jt=d;Jt<ot;Jt++)if(Zt(m,Jt)===Zt(p,Xt===-1?0:Jt-Xt)){if(Xt===-1&&(Xt=Jt),Jt-Xt+1===Ft)return Xt*$}else Xt!==-1&&(Jt-=Jt-Xt),Xt=-1}else for(d+Ft>ot&&(d=ot-Ft),Jt=d;Jt>=0;Jt--){let Xt=!0;for(let Ht=0;Ht<Ft;Ht++)if(Zt(m,Jt+Ht)!==Zt(p,Ht)){Xt=!1;break}if(Xt)return Jt}return-1}L.prototype.includes=function(p,d,O){return this.indexOf(p,d,O)!==-1},L.prototype.indexOf=function(p,d,O){return M(this,p,d,O,!0)},L.prototype.lastIndexOf=function(p,d,O){return M(this,p,d,O,!1)};function ct(m,p,d,O){d=Number(d)||0;const H=m.length-d;O?(O=Number(O),O>H&&(O=H)):O=H;const $=p.length;O>$/2&&(O=$/2);let ot;for(ot=0;ot<O;++ot){const Ft=parseInt(p.substr(ot*2,2),16);if(Gi(Ft))return ot;m[d+ot]=Ft}return ot}function _t(m,p,d,O){return wi(Vt(p,m.length-d),m,d,O)}function v(m,p,d,O){return wi(qt(p),m,d,O)}function x(m,p,d,O){return wi(Dt(p),m,d,O)}function et(m,p,d,O){return wi(Wt(p,m.length-d),m,d,O)}L.prototype.write=function(p,d,O,H){if(d===void 0)H="utf8",O=this.length,d=0;else if(O===void 0&&typeof d=="string")H=d,O=this.length,d=0;else if(isFinite(d))d=d>>>0,isFinite(O)?(O=O>>>0,H===void 0&&(H="utf8")):(H=O,O=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");const $=this.length-d;if((O===void 0||O>$)&&(O=$),p.length>0&&(O<0||d<0)||d>this.length)throw new RangeError("Attempt to write outside buffer bounds");H||(H="utf8");let ot=!1;for(;;)switch(H){case"hex":return ct(this,p,d,O);case"utf8":case"utf-8":return _t(this,p,d,O);case"ascii":case"latin1":case"binary":return v(this,p,d,O);case"base64":return x(this,p,d,O);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return et(this,p,d,O);default:if(ot)throw new TypeError("Unknown encoding: "+H);H=(""+H).toLowerCase(),ot=!0}},L.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function lt(m,p,d){return p===0&&d===m.length?P.fromByteArray(m):P.fromByteArray(m.slice(p,d))}function St(m,p,d){d=Math.min(m.length,d);const O=[];let H=p;for(;H<d;){const $=m[H];let ot=null,Ft=$>239?4:$>223?3:$>191?2:1;if(H+Ft<=d){let Zt,Jt,Xt,Ht;switch(Ft){case 1:$<128&&(ot=$);break;case 2:Zt=m[H+1],(Zt&192)===128&&(Ht=($&31)<<6|Zt&63,Ht>127&&(ot=Ht));break;case 3:Zt=m[H+1],Jt=m[H+2],(Zt&192)===128&&(Jt&192)===128&&(Ht=($&15)<<12|(Zt&63)<<6|Jt&63,Ht>2047&&(Ht<55296||Ht>57343)&&(ot=Ht));break;case 4:Zt=m[H+1],Jt=m[H+2],Xt=m[H+3],(Zt&192)===128&&(Jt&192)===128&&(Xt&192)===128&&(Ht=($&15)<<18|(Zt&63)<<12|(Jt&63)<<6|Xt&63,Ht>65535&&Ht<1114112&&(ot=Ht))}}ot===null?(ot=65533,Ft=1):ot>65535&&(ot-=65536,O.push(ot>>>10&1023|55296),ot=56320|ot&1023),O.push(ot),H+=Ft}return Pt(O)}const yt=4096;function Pt(m){const p=m.length;if(p<=yt)return String.fromCharCode.apply(String,m);let d="",O=0;for(;O<p;)d+=String.fromCharCode.apply(String,m.slice(O,O+=yt));return d}function pe(m,p,d){let O="";d=Math.min(m.length,d);for(let H=p;H<d;++H)O+=String.fromCharCode(m[H]&127);return O}function it(m,p,d){let O="";d=Math.min(m.length,d);for(let H=p;H<d;++H)O+=String.fromCharCode(m[H]);return O}function we(m,p,d){const O=m.length;(!p||p<0)&&(p=0),(!d||d<0||d>O)&&(d=O);let H="";for(let $=p;$<d;++$)H+=no[m[$]];return H}function de(m,p,d){const O=m.slice(p,d);let H="";for(let $=0;$<O.length-1;$+=2)H+=String.fromCharCode(O[$]+O[$+1]*256);return H}L.prototype.slice=function(p,d){const O=this.length;p=~~p,d=d===void 0?O:~~d,p<0?(p+=O,p<0&&(p=0)):p>O&&(p=O),d<0?(d+=O,d<0&&(d=0)):d>O&&(d=O),d<p&&(d=p);const H=this.subarray(p,d);return Object.setPrototypeOf(H,L.prototype),H};function Gt(m,p,d){if(m%1!==0||m<0)throw new RangeError("offset is not uint");if(m+p>d)throw new RangeError("Trying to access beyond buffer length")}L.prototype.readUintLE=L.prototype.readUIntLE=function(p,d,O){p=p>>>0,d=d>>>0,O||Gt(p,d,this.length);let H=this[p],$=1,ot=0;for(;++ot<d&&($*=256);)H+=this[p+ot]*$;return H},L.prototype.readUintBE=L.prototype.readUIntBE=function(p,d,O){p=p>>>0,d=d>>>0,O||Gt(p,d,this.length);let H=this[p+--d],$=1;for(;d>0&&($*=256);)H+=this[p+--d]*$;return H},L.prototype.readUint8=L.prototype.readUInt8=function(p,d){return p=p>>>0,d||Gt(p,1,this.length),this[p]},L.prototype.readUint16LE=L.prototype.readUInt16LE=function(p,d){return p=p>>>0,d||Gt(p,2,this.length),this[p]|this[p+1]<<8},L.prototype.readUint16BE=L.prototype.readUInt16BE=function(p,d){return p=p>>>0,d||Gt(p,2,this.length),this[p]<<8|this[p+1]},L.prototype.readUint32LE=L.prototype.readUInt32LE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),(this[p]|this[p+1]<<8|this[p+2]<<16)+this[p+3]*16777216},L.prototype.readUint32BE=L.prototype.readUInt32BE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),this[p]*16777216+(this[p+1]<<16|this[p+2]<<8|this[p+3])},L.prototype.readBigUInt64LE=Qe(function(p){p=p>>>0,U(p,"offset");const d=this[p],O=this[p+7];(d===void 0||O===void 0)&&J(p,this.length-8);const H=d+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24,$=this[++p]+this[++p]*2**8+this[++p]*2**16+O*2**24;return BigInt(H)+(BigInt($)<<BigInt(32))}),L.prototype.readBigUInt64BE=Qe(function(p){p=p>>>0,U(p,"offset");const d=this[p],O=this[p+7];(d===void 0||O===void 0)&&J(p,this.length-8);const H=d*2**24+this[++p]*2**16+this[++p]*2**8+this[++p],$=this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+O;return(BigInt(H)<<BigInt(32))+BigInt($)}),L.prototype.readIntLE=function(p,d,O){p=p>>>0,d=d>>>0,O||Gt(p,d,this.length);let H=this[p],$=1,ot=0;for(;++ot<d&&($*=256);)H+=this[p+ot]*$;return $*=128,H>=$&&(H-=Math.pow(2,8*d)),H},L.prototype.readIntBE=function(p,d,O){p=p>>>0,d=d>>>0,O||Gt(p,d,this.length);let H=d,$=1,ot=this[p+--H];for(;H>0&&($*=256);)ot+=this[p+--H]*$;return $*=128,ot>=$&&(ot-=Math.pow(2,8*d)),ot},L.prototype.readInt8=function(p,d){return p=p>>>0,d||Gt(p,1,this.length),this[p]&128?(255-this[p]+1)*-1:this[p]},L.prototype.readInt16LE=function(p,d){p=p>>>0,d||Gt(p,2,this.length);const O=this[p]|this[p+1]<<8;return O&32768?O|4294901760:O},L.prototype.readInt16BE=function(p,d){p=p>>>0,d||Gt(p,2,this.length);const O=this[p+1]|this[p]<<8;return O&32768?O|4294901760:O},L.prototype.readInt32LE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),this[p]|this[p+1]<<8|this[p+2]<<16|this[p+3]<<24},L.prototype.readInt32BE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),this[p]<<24|this[p+1]<<16|this[p+2]<<8|this[p+3]},L.prototype.readBigInt64LE=Qe(function(p){p=p>>>0,U(p,"offset");const d=this[p],O=this[p+7];(d===void 0||O===void 0)&&J(p,this.length-8);const H=this[p+4]+this[p+5]*2**8+this[p+6]*2**16+(O<<24);return(BigInt(H)<<BigInt(32))+BigInt(d+this[++p]*2**8+this[++p]*2**16+this[++p]*2**24)}),L.prototype.readBigInt64BE=Qe(function(p){p=p>>>0,U(p,"offset");const d=this[p],O=this[p+7];(d===void 0||O===void 0)&&J(p,this.length-8);const H=(d<<24)+this[++p]*2**16+this[++p]*2**8+this[++p];return(BigInt(H)<<BigInt(32))+BigInt(this[++p]*2**24+this[++p]*2**16+this[++p]*2**8+O)}),L.prototype.readFloatLE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),z.read(this,p,!0,23,4)},L.prototype.readFloatBE=function(p,d){return p=p>>>0,d||Gt(p,4,this.length),z.read(this,p,!1,23,4)},L.prototype.readDoubleLE=function(p,d){return p=p>>>0,d||Gt(p,8,this.length),z.read(this,p,!0,52,8)},L.prototype.readDoubleBE=function(p,d){return p=p>>>0,d||Gt(p,8,this.length),z.read(this,p,!1,52,8)};function Qt(m,p,d,O,H,$){if(!L.isBuffer(m))throw new TypeError('"buffer" argument must be a Buffer instance');if(p>H||p<$)throw new RangeError('"value" argument is out of bounds');if(d+O>m.length)throw new RangeError("Index out of range")}L.prototype.writeUintLE=L.prototype.writeUIntLE=function(p,d,O,H){if(p=+p,d=d>>>0,O=O>>>0,!H){const Ft=Math.pow(2,8*O)-1;Qt(this,p,d,O,Ft,0)}let $=1,ot=0;for(this[d]=p&255;++ot<O&&($*=256);)this[d+ot]=p/$&255;return d+O},L.prototype.writeUintBE=L.prototype.writeUIntBE=function(p,d,O,H){if(p=+p,d=d>>>0,O=O>>>0,!H){const Ft=Math.pow(2,8*O)-1;Qt(this,p,d,O,Ft,0)}let $=O-1,ot=1;for(this[d+$]=p&255;--$>=0&&(ot*=256);)this[d+$]=p/ot&255;return d+O},L.prototype.writeUint8=L.prototype.writeUInt8=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,1,255,0),this[d]=p&255,d+1},L.prototype.writeUint16LE=L.prototype.writeUInt16LE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,2,65535,0),this[d]=p&255,this[d+1]=p>>>8,d+2},L.prototype.writeUint16BE=L.prototype.writeUInt16BE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,2,65535,0),this[d]=p>>>8,this[d+1]=p&255,d+2},L.prototype.writeUint32LE=L.prototype.writeUInt32LE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,4,4294967295,0),this[d+3]=p>>>24,this[d+2]=p>>>16,this[d+1]=p>>>8,this[d]=p&255,d+4},L.prototype.writeUint32BE=L.prototype.writeUInt32BE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,4,4294967295,0),this[d]=p>>>24,this[d+1]=p>>>16,this[d+2]=p>>>8,this[d+3]=p&255,d+4};function ge(m,p,d,O,H){F(p,O,H,m,d,7);let $=Number(p&BigInt(4294967295));m[d++]=$,$=$>>8,m[d++]=$,$=$>>8,m[d++]=$,$=$>>8,m[d++]=$;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[d++]=ot,ot=ot>>8,m[d++]=ot,ot=ot>>8,m[d++]=ot,ot=ot>>8,m[d++]=ot,d}function le(m,p,d,O,H){F(p,O,H,m,d,7);let $=Number(p&BigInt(4294967295));m[d+7]=$,$=$>>8,m[d+6]=$,$=$>>8,m[d+5]=$,$=$>>8,m[d+4]=$;let ot=Number(p>>BigInt(32)&BigInt(4294967295));return m[d+3]=ot,ot=ot>>8,m[d+2]=ot,ot=ot>>8,m[d+1]=ot,ot=ot>>8,m[d]=ot,d+8}L.prototype.writeBigUInt64LE=Qe(function(p,d=0){return ge(this,p,d,BigInt(0),BigInt("0xffffffffffffffff"))}),L.prototype.writeBigUInt64BE=Qe(function(p,d=0){return le(this,p,d,BigInt(0),BigInt("0xffffffffffffffff"))}),L.prototype.writeIntLE=function(p,d,O,H){if(p=+p,d=d>>>0,!H){const Zt=Math.pow(2,8*O-1);Qt(this,p,d,O,Zt-1,-Zt)}let $=0,ot=1,Ft=0;for(this[d]=p&255;++$<O&&(ot*=256);)p<0&&Ft===0&&this[d+$-1]!==0&&(Ft=1),this[d+$]=(p/ot>>0)-Ft&255;return d+O},L.prototype.writeIntBE=function(p,d,O,H){if(p=+p,d=d>>>0,!H){const Zt=Math.pow(2,8*O-1);Qt(this,p,d,O,Zt-1,-Zt)}let $=O-1,ot=1,Ft=0;for(this[d+$]=p&255;--$>=0&&(ot*=256);)p<0&&Ft===0&&this[d+$+1]!==0&&(Ft=1),this[d+$]=(p/ot>>0)-Ft&255;return d+O},L.prototype.writeInt8=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,1,127,-128),p<0&&(p=255+p+1),this[d]=p&255,d+1},L.prototype.writeInt16LE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,2,32767,-32768),this[d]=p&255,this[d+1]=p>>>8,d+2},L.prototype.writeInt16BE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,2,32767,-32768),this[d]=p>>>8,this[d+1]=p&255,d+2},L.prototype.writeInt32LE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,4,2147483647,-2147483648),this[d]=p&255,this[d+1]=p>>>8,this[d+2]=p>>>16,this[d+3]=p>>>24,d+4},L.prototype.writeInt32BE=function(p,d,O){return p=+p,d=d>>>0,O||Qt(this,p,d,4,2147483647,-2147483648),p<0&&(p=4294967295+p+1),this[d]=p>>>24,this[d+1]=p>>>16,this[d+2]=p>>>8,this[d+3]=p&255,d+4},L.prototype.writeBigInt64LE=Qe(function(p,d=0){return ge(this,p,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),L.prototype.writeBigInt64BE=Qe(function(p,d=0){return le(this,p,d,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Be(m,p,d,O,H,$){if(d+O>m.length)throw new RangeError("Index out of range");if(d<0)throw new RangeError("Index out of range")}function Ie(m,p,d,O,H){return p=+p,d=d>>>0,H||Be(m,p,d,4),z.write(m,p,d,O,23,4),d+4}L.prototype.writeFloatLE=function(p,d,O){return Ie(this,p,d,!0,O)},L.prototype.writeFloatBE=function(p,d,O){return Ie(this,p,d,!1,O)};function _e(m,p,d,O,H){return p=+p,d=d>>>0,H||Be(m,p,d,8),z.write(m,p,d,O,52,8),d+8}L.prototype.writeDoubleLE=function(p,d,O){return _e(this,p,d,!0,O)},L.prototype.writeDoubleBE=function(p,d,O){return _e(this,p,d,!1,O)},L.prototype.copy=function(p,d,O,H){if(!L.isBuffer(p))throw new TypeError("argument should be a Buffer");if(O||(O=0),!H&&H!==0&&(H=this.length),d>=p.length&&(d=p.length),d||(d=0),H>0&&H<O&&(H=O),H===O||p.length===0||this.length===0)return 0;if(d<0)throw new RangeError("targetStart out of bounds");if(O<0||O>=this.length)throw new RangeError("Index out of range");if(H<0)throw new RangeError("sourceEnd out of bounds");H>this.length&&(H=this.length),p.length-d<H-O&&(H=p.length-d+O);const $=H-O;return this===p&&typeof N.prototype.copyWithin=="function"?this.copyWithin(d,O,H):N.prototype.set.call(p,this.subarray(O,H),d),$},L.prototype.fill=function(p,d,O,H){if(typeof p=="string"){if(typeof d=="string"?(H=d,d=0,O=this.length):typeof O=="string"&&(H=O,O=this.length),H!==void 0&&typeof H!="string")throw new TypeError("encoding must be a string");if(typeof H=="string"&&!L.isEncoding(H))throw new TypeError("Unknown encoding: "+H);if(p.length===1){const ot=p.charCodeAt(0);(H==="utf8"&&ot<128||H==="latin1")&&(p=ot)}}else typeof p=="number"?p=p&255:typeof p=="boolean"&&(p=Number(p));if(d<0||this.length<d||this.length<O)throw new RangeError("Out of range index");if(O<=d)return this;d=d>>>0,O=O===void 0?this.length:O>>>0,p||(p=0);let $;if(typeof p=="number")for($=d;$<O;++$)this[$]=p;else{const ot=L.isBuffer(p)?p:L.from(p,H),Ft=ot.length;if(Ft===0)throw new TypeError('The value "'+p+'" is invalid for argument "value"');for($=0;$<O-d;++$)this[$+d]=ot[$%Ft]}return this};const qe={};function b(m,p,d){qe[m]=class extends d{constructor(){super(),Object.defineProperty(this,"message",{value:p.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${m}]`,this.stack,delete this.name}get code(){return m}set code(H){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:H,writable:!0})}toString(){return`${this.name} [${m}]: ${this.message}`}}}b("ERR_BUFFER_OUT_OF_BOUNDS",function(m){return m?`${m} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),b("ERR_INVALID_ARG_TYPE",function(m,p){return`The "${m}" argument must be of type number. Received type ${typeof p}`},TypeError),b("ERR_OUT_OF_RANGE",function(m,p,d){let O=`The value of "${m}" is out of range.`,H=d;return Number.isInteger(d)&&Math.abs(d)>2**32?H=h(String(d)):typeof d=="bigint"&&(H=String(d),(d>BigInt(2)**BigInt(32)||d<-(BigInt(2)**BigInt(32)))&&(H=h(H)),H+="n"),O+=` It must be ${p}. Received ${H}`,O},RangeError);function h(m){let p="",d=m.length;const O=m[0]==="-"?1:0;for(;d>=O+4;d-=3)p=`_${m.slice(d-3,d)}${p}`;return`${m.slice(0,d)}${p}`}function w(m,p,d){U(p,"offset"),(m[p]===void 0||m[p+d]===void 0)&&J(p,m.length-(d+1))}function F(m,p,d,O,H,$){if(m>d||m<p){const ot=typeof p=="bigint"?"n":"";let Ft;throw p===0||p===BigInt(0)?Ft=`>= 0${ot} and < 2${ot} ** ${($+1)*8}${ot}`:Ft=`>= -(2${ot} ** ${($+1)*8-1}${ot}) and < 2 ** ${($+1)*8-1}${ot}`,new qe.ERR_OUT_OF_RANGE("value",Ft,m)}w(O,H,$)}function U(m,p){if(typeof m!="number")throw new qe.ERR_INVALID_ARG_TYPE(p,"number",m)}function J(m,p,d){throw Math.floor(m)!==m?(U(m,d),new qe.ERR_OUT_OF_RANGE("offset","an integer",m)):p<0?new qe.ERR_BUFFER_OUT_OF_BOUNDS:new qe.ERR_OUT_OF_RANGE("offset",`>= 0 and <= ${p}`,m)}const st=/[^+/0-9A-Za-z-_]/g;function kt(m){if(m=m.split("=")[0],m=m.trim().replace(st,""),m.length<2)return"";for(;m.length%4!==0;)m=m+"=";return m}function Vt(m,p){p=p||1/0;let d;const O=m.length;let H=null;const $=[];for(let ot=0;ot<O;++ot){if(d=m.charCodeAt(ot),d>55295&&d<57344){if(!H){if(d>56319){(p-=3)>-1&&$.push(239,191,189);continue}else if(ot+1===O){(p-=3)>-1&&$.push(239,191,189);continue}H=d;continue}if(d<56320){(p-=3)>-1&&$.push(239,191,189),H=d;continue}d=(H-55296<<10|d-56320)+65536}else H&&(p-=3)>-1&&$.push(239,191,189);if(H=null,d<128){if((p-=1)<0)break;$.push(d)}else if(d<2048){if((p-=2)<0)break;$.push(d>>6|192,d&63|128)}else if(d<65536){if((p-=3)<0)break;$.push(d>>12|224,d>>6&63|128,d&63|128)}else if(d<1114112){if((p-=4)<0)break;$.push(d>>18|240,d>>12&63|128,d>>6&63|128,d&63|128)}else throw new Error("Invalid code point")}return $}function qt(m){const p=[];for(let d=0;d<m.length;++d)p.push(m.charCodeAt(d)&255);return p}function Wt(m,p){let d,O,H;const $=[];for(let ot=0;ot<m.length&&!((p-=2)<0);++ot)d=m.charCodeAt(ot),O=d>>8,H=d%256,$.push(H),$.push(O);return $}function Dt(m){return P.toByteArray(kt(m))}function wi(m,p,d,O){let H;for(H=0;H<O&&!(H+d>=p.length||H>=m.length);++H)p[H+d]=m[H];return H}function Oe(m,p){return m instanceof p||m!=null&&m.constructor!=null&&m.constructor.name!=null&&m.constructor.name===p.name}function Gi(m){return m!==m}const no=function(){const m="0123456789abcdef",p=new Array(256);for(let d=0;d<16;++d){const O=d*16;for(let H=0;H<16;++H)p[O+H]=m[d]+m[H]}return p}();function Qe(m){return typeof BigInt>"u"?io:m}function io(){throw new Error("BigInt not supported")}})(t);const A=t.Buffer;n.Blob=t.Blob,n.BlobOptions=t.BlobOptions,n.Buffer=t.Buffer,n.File=t.File,n.FileOptions=t.FileOptions,n.INSPECT_MAX_BYTES=t.INSPECT_MAX_BYTES,n.SlowBuffer=t.SlowBuffer,n.TranscodeEncoding=t.TranscodeEncoding,n.atob=t.atob,n.btoa=t.btoa,n.constants=t.constants,n.default=A,n.isAscii=t.isAscii,n.isUtf8=t.isUtf8,n.kMaxLength=t.kMaxLength,n.kStringMaxLength=t.kStringMaxLength,n.resolveObjectURL=t.resolveObjectURL,n.transcode=t.transcode}(gc)),gc}var yc={},bc={},mc,Ch;function Nh(){return Ch||(Ch=1,mc=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},e=Symbol("test"),r=Object(e);if(typeof e=="string"||Object.prototype.toString.call(e)!=="[object Symbol]"||Object.prototype.toString.call(r)!=="[object Symbol]")return!1;var i=42;t[e]=i;for(var o in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var a=Object.getOwnPropertySymbols(t);if(a.length!==1||a[0]!==e||!Object.prototype.propertyIsEnumerable.call(t,e))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var u=Object.getOwnPropertyDescriptor(t,e);if(u.value!==i||u.enumerable!==!0)return!1}return!0}),mc}var Ac,Lh;function Ec(){if(Lh)return Ac;Lh=1;var n=Nh();return Ac=function(){return n()&&!!Symbol.toStringTag},Ac}var vc,Dh;function Uh(){return Dh||(Dh=1,vc=Object),vc}var xc,Mh;function zm(){return Mh||(Mh=1,xc=Error),xc}var Rc,jh;function Bm(){return jh||(jh=1,Rc=EvalError),Rc}var zc,Gh;function Sm(){return Gh||(Gh=1,zc=RangeError),zc}var Bc,Hh;function Pm(){return Hh||(Hh=1,Bc=ReferenceError),Bc}var Sc,Vh;function qh(){return Vh||(Vh=1,Sc=SyntaxError),Sc}var Pc,Qh;function Ko(){return Qh||(Qh=1,Pc=TypeError),Pc}var kc,Kh;function km(){return Kh||(Kh=1,kc=URIError),kc}var Fc,Wh;function Fm(){return Wh||(Wh=1,Fc=Math.abs),Fc}var Ic,Jh;function Im(){return Jh||(Jh=1,Ic=Math.floor),Ic}var Oc,$h;function Om(){return $h||($h=1,Oc=Math.max),Oc}var Tc,Yh;function Tm(){return Yh||(Yh=1,Tc=Math.min),Tc}var Cc,Zh;function Cm(){return Zh||(Zh=1,Cc=Math.pow),Cc}var Nc,Xh;function Nm(){return Xh||(Xh=1,Nc=Math.round),Nc}var Lc,tp;function Lm(){return tp||(tp=1,Lc=Number.isNaN||function(t){return t!==t}),Lc}var Dc,ep;function Dm(){if(ep)return Dc;ep=1;var n=Lm();return Dc=function(e){return n(e)||e===0?e:e<0?-1:1},Dc}var Uc,rp;function Um(){return rp||(rp=1,Uc=Object.getOwnPropertyDescriptor),Uc}var Mc,np;function Hs(){if(np)return Mc;np=1;var n=Um();if(n)try{n([],"length")}catch{n=null}return Mc=n,Mc}var jc,ip;function Wo(){if(ip)return jc;ip=1;var n=Object.defineProperty||!1;if(n)try{n({},"a",{value:1})}catch{n=!1}return jc=n,jc}var Gc,sp;function Mm(){if(sp)return Gc;sp=1;var n=typeof Symbol<"u"&&Symbol,t=Nh();return Gc=function(){return typeof n!="function"||typeof Symbol!="function"||typeof n("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:t()},Gc}var Hc,op;function ap(){return op||(op=1,Hc=typeof Reflect<"u"&&Reflect.getPrototypeOf||null),Hc}var Vc,cp;function up(){if(cp)return Vc;cp=1;var n=Uh();return Vc=n.getPrototypeOf||null,Vc}var qc,_p;function jm(){if(_p)return qc;_p=1;var n="Function.prototype.bind called on incompatible ",t=Object.prototype.toString,e=Math.max,r="[object Function]",i=function(_,l){for(var f=[],g=0;g<_.length;g+=1)f[g]=_[g];for(var y=0;y<l.length;y+=1)f[y+_.length]=l[y];return f},o=function(_,l){for(var f=[],g=l,y=0;g<_.length;g+=1,y+=1)f[y]=_[g];return f},a=function(u,_){for(var l="",f=0;f<u.length;f+=1)l+=u[f],f+1<u.length&&(l+=_);return l};return qc=function(_){var l=this;if(typeof l!="function"||t.apply(l)!==r)throw new TypeError(n+l);for(var f=o(arguments,1),g,y=function(){if(this instanceof g){var A=l.apply(this,i(f,arguments));return Object(A)===A?A:this}return l.apply(_,i(f,arguments))},B=e(0,l.length-f.length),I=[],S=0;S<B;S++)I[S]="$"+S;if(g=Function("binder","return function ("+a(I,",")+"){ return binder.apply(this,arguments); }")(y),l.prototype){var T=function(){};T.prototype=l.prototype,g.prototype=new T,T.prototype=null}return g},qc}var Qc,fp;function Vs(){if(fp)return Qc;fp=1;var n=jm();return Qc=Function.prototype.bind||n,Qc}var Kc,lp;function Wc(){return lp||(lp=1,Kc=Function.prototype.call),Kc}var Jc,hp;function $c(){return hp||(hp=1,Jc=Function.prototype.apply),Jc}var Yc,pp;function Gm(){return pp||(pp=1,Yc=typeof Reflect<"u"&&Reflect&&Reflect.apply),Yc}var Zc,wp;function dp(){if(wp)return Zc;wp=1;var n=Vs(),t=$c(),e=Wc(),r=Gm();return Zc=r||n.call(e,t),Zc}var Xc,gp;function tu(){if(gp)return Xc;gp=1;var n=Vs(),t=Ko(),e=Wc(),r=dp();return Xc=function(o){if(o.length<1||typeof o[0]!="function")throw new t("a function is required");return r(n,e,o)},Xc}var eu,yp;function Hm(){if(yp)return eu;yp=1;var n=tu(),t=Hs(),e;try{e=[].__proto__===Array.prototype}catch(a){if(!a||typeof a!="object"||!("code"in a)||a.code!=="ERR_PROTO_ACCESS")throw a}var r=!!e&&t&&t(Object.prototype,"__proto__"),i=Object,o=i.getPrototypeOf;return eu=r&&typeof r.get=="function"?n([r.get]):typeof o=="function"?function(u){return o(u==null?u:i(u))}:!1,eu}var ru,bp;function mp(){if(bp)return ru;bp=1;var n=ap(),t=up(),e=Hm();return ru=n?function(i){return n(i)}:t?function(i){if(!i||typeof i!="object"&&typeof i!="function")throw new TypeError("getProto: not an object");return t(i)}:e?function(i){return e(i)}:null,ru}var nu,Ap;function Vm(){if(Ap)return nu;Ap=1;var n=Function.prototype.call,t=Object.prototype.hasOwnProperty,e=Vs();return nu=e.call(n,t),nu}var iu,Ep;function vp(){if(Ep)return iu;Ep=1;var n,t=Uh(),e=zm(),r=Bm(),i=Sm(),o=Pm(),a=qh(),u=Ko(),_=km(),l=Fm(),f=Im(),g=Om(),y=Tm(),B=Cm(),I=Nm(),S=Dm(),T=Function,A=function(ct){try{return T('"use strict"; return ('+ct+").constructor;")()}catch{}},R=Hs(),P=Wo(),z=function(){throw new u},k=R?function(){try{return arguments.callee,z}catch{try{return R(arguments,"callee").get}catch{return z}}}():z,C=Mm()(),N=mp(),D=up(),Y=ap(),Z=$c(),ft=Wc(),L={},At=typeof Uint8Array>"u"||!N?n:N(Uint8Array),Rt={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?n:ArrayBuffer,"%ArrayIteratorPrototype%":C&&N?N([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":L,"%AsyncGenerator%":L,"%AsyncGeneratorFunction%":L,"%AsyncIteratorPrototype%":L,"%Atomics%":typeof Atomics>"u"?n:Atomics,"%BigInt%":typeof BigInt>"u"?n:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?n:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":e,"%eval%":eval,"%EvalError%":r,"%Float16Array%":typeof Float16Array>"u"?n:Float16Array,"%Float32Array%":typeof Float32Array>"u"?n:Float32Array,"%Float64Array%":typeof Float64Array>"u"?n:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?n:FinalizationRegistry,"%Function%":T,"%GeneratorFunction%":L,"%Int8Array%":typeof Int8Array>"u"?n:Int8Array,"%Int16Array%":typeof Int16Array>"u"?n:Int16Array,"%Int32Array%":typeof Int32Array>"u"?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":C&&N?N(N([][Symbol.iterator]())):n,"%JSON%":typeof JSON=="object"?JSON:n,"%Map%":typeof Map>"u"?n:Map,"%MapIteratorPrototype%":typeof Map>"u"||!C||!N?n:N(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":t,"%Object.getOwnPropertyDescriptor%":R,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?n:Promise,"%Proxy%":typeof Proxy>"u"?n:Proxy,"%RangeError%":i,"%ReferenceError%":o,"%Reflect%":typeof Reflect>"u"?n:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?n:Set,"%SetIteratorPrototype%":typeof Set>"u"||!C||!N?n:N(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":C&&N?N(""[Symbol.iterator]()):n,"%Symbol%":C?Symbol:n,"%SyntaxError%":a,"%ThrowTypeError%":k,"%TypedArray%":At,"%TypeError%":u,"%Uint8Array%":typeof Uint8Array>"u"?n:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?n:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?n:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?n:Uint32Array,"%URIError%":_,"%WeakMap%":typeof WeakMap>"u"?n:WeakMap,"%WeakRef%":typeof WeakRef>"u"?n:WeakRef,"%WeakSet%":typeof WeakSet>"u"?n:WeakSet,"%Function.prototype.call%":ft,"%Function.prototype.apply%":Z,"%Object.defineProperty%":P,"%Object.getPrototypeOf%":D,"%Math.abs%":l,"%Math.floor%":f,"%Math.max%":g,"%Math.min%":y,"%Math.pow%":B,"%Math.round%":I,"%Math.sign%":S,"%Reflect.getPrototypeOf%":Y};if(N)try{null.error}catch(ct){var at=N(N(ct));Rt["%Error.prototype%"]=at}var wt=function ct(_t){var v;if(_t==="%AsyncFunction%")v=A("async function () {}");else if(_t==="%GeneratorFunction%")v=A("function* () {}");else if(_t==="%AsyncGeneratorFunction%")v=A("async function* () {}");else if(_t==="%AsyncGenerator%"){var x=ct("%AsyncGeneratorFunction%");x&&(v=x.prototype)}else if(_t==="%AsyncIteratorPrototype%"){var et=ct("%AsyncGenerator%");et&&N&&(v=N(et.prototype))}return Rt[_t]=v,v},Et={__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"]},xt=Vs(),vt=Vm(),Bt=xt.call(ft,Array.prototype.concat),jt=xt.call(Z,Array.prototype.splice),W=xt.call(ft,String.prototype.replace),X=xt.call(ft,String.prototype.slice),nt=xt.call(ft,RegExp.prototype.exec),dt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,G=/\\(\\)?/g,M=function(_t){var v=X(_t,0,1),x=X(_t,-1);if(v==="%"&&x!=="%")throw new a("invalid intrinsic syntax, expected closing `%`");if(x==="%"&&v!=="%")throw new a("invalid intrinsic syntax, expected opening `%`");var et=[];return W(_t,dt,function(lt,St,yt,Pt){et[et.length]=yt?W(Pt,G,"$1"):St||lt}),et},tt=function(_t,v){var x=_t,et;if(vt(Et,x)&&(et=Et[x],x="%"+et[0]+"%"),vt(Rt,x)){var lt=Rt[x];if(lt===L&&(lt=wt(x)),typeof lt>"u"&&!v)throw new u("intrinsic "+_t+" exists, but is not available. Please file an issue!");return{alias:et,name:x,value:lt}}throw new a("intrinsic "+_t+" does not exist!")};return iu=function(_t,v){if(typeof _t!="string"||_t.length===0)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof v!="boolean")throw new u('"allowMissing" argument must be a boolean');if(nt(/^%?[^%]*%?$/,_t)===null)throw new a("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var x=M(_t),et=x.length>0?x[0]:"",lt=tt("%"+et+"%",v),St=lt.name,yt=lt.value,Pt=!1,pe=lt.alias;pe&&(et=pe[0],jt(x,Bt([0,1],pe)));for(var it=1,we=!0;it<x.length;it+=1){var de=x[it],Gt=X(de,0,1),Qt=X(de,-1);if((Gt==='"'||Gt==="'"||Gt==="`"||Qt==='"'||Qt==="'"||Qt==="`")&&Gt!==Qt)throw new a("property names with quotes must have matching quotes");if((de==="constructor"||!we)&&(Pt=!0),et+="."+de,St="%"+et+"%",vt(Rt,St))yt=Rt[St];else if(yt!=null){if(!(de in yt)){if(!v)throw new u("base intrinsic for "+_t+" exists, but the property is not available.");return}if(R&&it+1>=x.length){var ge=R(yt,de);we=!!ge,we&&"get"in ge&&!("originalValue"in ge.get)?yt=ge.get:yt=yt[de]}else we=vt(yt,de),yt=yt[de];we&&!Pt&&(Rt[St]=yt)}}return yt},iu}var su,xp;function Rp(){if(xp)return su;xp=1;var n=vp(),t=tu(),e=t([n("%String.prototype.indexOf%")]);return su=function(i,o){var a=n(i,!!o);return typeof a=="function"&&e(i,".prototype.")>-1?t([a]):a},su}var ou,zp;function qm(){if(zp)return ou;zp=1;var n=Ec()(),t=Rp(),e=t("Object.prototype.toString"),r=function(u){return n&&u&&typeof u=="object"&&Symbol.toStringTag in u?!1:e(u)==="[object Arguments]"},i=function(u){return r(u)?!0:u!==null&&typeof u=="object"&&"length"in u&&typeof u.length=="number"&&u.length>=0&&e(u)!=="[object Array]"&&"callee"in u&&e(u.callee)==="[object Function]"},o=function(){return r(arguments)}();return r.isLegacyArguments=i,ou=o?r:i,ou}var au,Bp;function Qm(){if(Bp)return au;Bp=1;var n=Object.prototype.toString,t=Function.prototype.toString,e=/^\s*(?:function)?\*/,r=Ec()(),i=Object.getPrototypeOf,o=function(){if(!r)return!1;try{return Function("return function*() {}")()}catch{}},a;return au=function(_){if(typeof _!="function")return!1;if(e.test(t.call(_)))return!0;if(!r){var l=n.call(_);return l==="[object GeneratorFunction]"}if(!i)return!1;if(typeof a>"u"){var f=o();a=f?i(f):!1}return i(_)===a},au}var cu,Sp;function Km(){if(Sp)return cu;Sp=1;var n=Function.prototype.toString,t=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,e,r;if(typeof t=="function"&&typeof Object.defineProperty=="function")try{e=Object.defineProperty({},"length",{get:function(){throw r}}),r={},t(function(){throw 42},null,e)}catch(R){R!==r&&(t=null)}else t=null;var i=/^\s*class\b/,o=function(P){try{var z=n.call(P);return i.test(z)}catch{return!1}},a=function(P){try{return o(P)?!1:(n.call(P),!0)}catch{return!1}},u=Object.prototype.toString,_="[object Object]",l="[object Function]",f="[object GeneratorFunction]",g="[object HTMLAllCollection]",y="[object HTML document.all class]",B="[object HTMLCollection]",I=typeof Symbol=="function"&&!!Symbol.toStringTag,S=!(0 in[,]),T=function(){return!1};if(typeof document=="object"){var A=document.all;u.call(A)===u.call(document.all)&&(T=function(P){if((S||!P)&&(typeof P>"u"||typeof P=="object"))try{var z=u.call(P);return(z===g||z===y||z===B||z===_)&&P("")==null}catch{}return!1})}return cu=t?function(P){if(T(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;try{t(P,null,e)}catch(z){if(z!==r)return!1}return!o(P)&&a(P)}:function(P){if(T(P))return!0;if(!P||typeof P!="function"&&typeof P!="object")return!1;if(I)return a(P);if(o(P))return!1;var z=u.call(P);return z!==l&&z!==f&&!/^\[object HTML/.test(z)?!1:a(P)},cu}var uu,Pp;function Wm(){if(Pp)return uu;Pp=1;var n=Km(),t=Object.prototype.toString,e=Object.prototype.hasOwnProperty,r=function(_,l,f){for(var g=0,y=_.length;g<y;g++)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))},i=function(_,l,f){for(var g=0,y=_.length;g<y;g++)f==null?l(_.charAt(g),g,_):l.call(f,_.charAt(g),g,_)},o=function(_,l,f){for(var g in _)e.call(_,g)&&(f==null?l(_[g],g,_):l.call(f,_[g],g,_))};function a(u){return t.call(u)==="[object Array]"}return uu=function(_,l,f){if(!n(l))throw new TypeError("iterator must be a function");var g;arguments.length>=3&&(g=f),a(_)?r(_,l,g):typeof _=="string"?i(_,l,g):o(_,l,g)},uu}var _u,kp;function Jm(){return kp||(kp=1,_u=["Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]),_u}var fu,Fp;function $m(){if(Fp)return fu;Fp=1;var n=Jm(),t=typeof globalThis>"u"?li:globalThis;return fu=function(){for(var r=[],i=0;i<n.length;i++)typeof t[n[i]]=="function"&&(r[r.length]=n[i]);return r},fu}var lu={exports:{}},hu,Ip;function Ym(){if(Ip)return hu;Ip=1;var n=Wo(),t=qh(),e=Ko(),r=Hs();return hu=function(o,a,u){if(!o||typeof o!="object"&&typeof o!="function")throw new e("`obj` must be an object or a function`");if(typeof a!="string"&&typeof a!="symbol")throw new e("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new e("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new e("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new e("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new e("`loose`, if provided, must be a boolean");var _=arguments.length>3?arguments[3]:null,l=arguments.length>4?arguments[4]:null,f=arguments.length>5?arguments[5]:null,g=arguments.length>6?arguments[6]:!1,y=!!r&&r(o,a);if(n)n(o,a,{configurable:f===null&&y?y.configurable:!f,enumerable:_===null&&y?y.enumerable:!_,value:u,writable:l===null&&y?y.writable:!l});else if(g||!_&&!l&&!f)o[a]=u;else throw new t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")},hu}var pu,Op;function Zm(){if(Op)return pu;Op=1;var n=Wo(),t=function(){return!!n};return t.hasArrayLengthDefineBug=function(){if(!n)return null;try{return n([],"length",{value:1}).length!==1}catch{return!0}},pu=t,pu}var wu,Tp;function Xm(){if(Tp)return wu;Tp=1;var n=vp(),t=Ym(),e=Zm()(),r=Hs(),i=Ko(),o=n("%Math.floor%");return wu=function(u,_){if(typeof u!="function")throw new i("`fn` is not a function");if(typeof _!="number"||_<0||_>4294967295||o(_)!==_)throw new i("`length` must be a positive 32-bit integer");var l=arguments.length>2&&!!arguments[2],f=!0,g=!0;if("length"in u&&r){var y=r(u,"length");y&&!y.configurable&&(f=!1),y&&!y.writable&&(g=!1)}return(f||g||!l)&&(e?t(u,"length",_,!0,!0):t(u,"length",_)),u},wu}var du,Cp;function t2(){if(Cp)return du;Cp=1;var n=Vs(),t=$c(),e=dp();return du=function(){return e(n,t,arguments)},du}var Np;function e2(){return Np||(Np=1,function(n){var t=Xm(),e=Wo(),r=tu(),i=t2();n.exports=function(a){var u=r(arguments),_=a.length-(arguments.length-1);return t(u,1+(_>0?_:0),!0)},e?e(n.exports,"apply",{value:i}):n.exports.apply=i}(lu)),lu.exports}var gu,Lp;function Dp(){if(Lp)return gu;Lp=1;var n=Wm(),t=$m(),e=e2(),r=Rp(),i=Hs(),o=mp(),a=r("Object.prototype.toString"),u=Ec()(),_=typeof globalThis>"u"?li:globalThis,l=t(),f=r("String.prototype.slice"),g=r("Array.prototype.indexOf",!0)||function(T,A){for(var R=0;R<T.length;R+=1)if(T[R]===A)return R;return-1},y={__proto__:null};u&&i&&o?n(l,function(S){var T=new _[S];if(Symbol.toStringTag in T&&o){var A=o(T),R=i(A,Symbol.toStringTag);if(!R&&A){var P=o(A);R=i(P,Symbol.toStringTag)}y["$"+S]=e(R.get)}}):n(l,function(S){var T=new _[S],A=T.slice||T.set;A&&(y["$"+S]=e(A))});var B=function(T){var A=!1;return n(y,function(R,P){if(!A)try{"$"+R(T)===P&&(A=f(P,1))}catch{}}),A},I=function(T){var A=!1;return n(y,function(R,P){if(!A)try{R(T),A=f(P,1)}catch{}}),A};return gu=function(T){if(!T||typeof T!="object")return!1;if(!u){var A=f(a(T),8,-1);return g(l,A)>-1?A:A!=="Object"?!1:I(T)}return i?B(T):null},gu}var yu,Up;function r2(){if(Up)return yu;Up=1;var n=Dp();return yu=function(e){return!!n(e)},yu}var Mp;function n2(){return Mp||(Mp=1,function(n){var t=qm(),e=Qm(),r=Dp(),i=r2();function o(it){return it.call.bind(it)}var a=typeof BigInt<"u",u=typeof Symbol<"u",_=o(Object.prototype.toString),l=o(Number.prototype.valueOf),f=o(String.prototype.valueOf),g=o(Boolean.prototype.valueOf);if(a)var y=o(BigInt.prototype.valueOf);if(u)var B=o(Symbol.prototype.valueOf);function I(it,we){if(typeof it!="object")return!1;try{return we(it),!0}catch{return!1}}n.isArgumentsObject=t,n.isGeneratorFunction=e,n.isTypedArray=i;function S(it){return typeof Promise<"u"&&it instanceof Promise||it!==null&&typeof it=="object"&&typeof it.then=="function"&&typeof it.catch=="function"}n.isPromise=S;function T(it){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(it):i(it)||X(it)}n.isArrayBufferView=T;function A(it){return r(it)==="Uint8Array"}n.isUint8Array=A;function R(it){return r(it)==="Uint8ClampedArray"}n.isUint8ClampedArray=R;function P(it){return r(it)==="Uint16Array"}n.isUint16Array=P;function z(it){return r(it)==="Uint32Array"}n.isUint32Array=z;function k(it){return r(it)==="Int8Array"}n.isInt8Array=k;function C(it){return r(it)==="Int16Array"}n.isInt16Array=C;function N(it){return r(it)==="Int32Array"}n.isInt32Array=N;function D(it){return r(it)==="Float32Array"}n.isFloat32Array=D;function Y(it){return r(it)==="Float64Array"}n.isFloat64Array=Y;function Z(it){return r(it)==="BigInt64Array"}n.isBigInt64Array=Z;function ft(it){return r(it)==="BigUint64Array"}n.isBigUint64Array=ft;function L(it){return _(it)==="[object Map]"}L.working=typeof Map<"u"&&L(new Map);function At(it){return typeof Map>"u"?!1:L.working?L(it):it instanceof Map}n.isMap=At;function Rt(it){return _(it)==="[object Set]"}Rt.working=typeof Set<"u"&&Rt(new Set);function at(it){return typeof Set>"u"?!1:Rt.working?Rt(it):it instanceof Set}n.isSet=at;function wt(it){return _(it)==="[object WeakMap]"}wt.working=typeof WeakMap<"u"&&wt(new WeakMap);function Et(it){return typeof WeakMap>"u"?!1:wt.working?wt(it):it instanceof WeakMap}n.isWeakMap=Et;function xt(it){return _(it)==="[object WeakSet]"}xt.working=typeof WeakSet<"u"&&xt(new WeakSet);function vt(it){return xt(it)}n.isWeakSet=vt;function Bt(it){return _(it)==="[object ArrayBuffer]"}Bt.working=typeof ArrayBuffer<"u"&&Bt(new ArrayBuffer);function jt(it){return typeof ArrayBuffer>"u"?!1:Bt.working?Bt(it):it instanceof ArrayBuffer}n.isArrayBuffer=jt;function W(it){return _(it)==="[object DataView]"}W.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&W(new DataView(new ArrayBuffer(1),0,1));function X(it){return typeof DataView>"u"?!1:W.working?W(it):it instanceof DataView}n.isDataView=X;var nt=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function dt(it){return _(it)==="[object SharedArrayBuffer]"}function G(it){return typeof nt>"u"?!1:(typeof dt.working>"u"&&(dt.working=dt(new nt)),dt.working?dt(it):it instanceof nt)}n.isSharedArrayBuffer=G;function M(it){return _(it)==="[object AsyncFunction]"}n.isAsyncFunction=M;function tt(it){return _(it)==="[object Map Iterator]"}n.isMapIterator=tt;function ct(it){return _(it)==="[object Set Iterator]"}n.isSetIterator=ct;function _t(it){return _(it)==="[object Generator]"}n.isGeneratorObject=_t;function v(it){return _(it)==="[object WebAssembly.Module]"}n.isWebAssemblyCompiledModule=v;function x(it){return I(it,l)}n.isNumberObject=x;function et(it){return I(it,f)}n.isStringObject=et;function lt(it){return I(it,g)}n.isBooleanObject=lt;function St(it){return a&&I(it,y)}n.isBigIntObject=St;function yt(it){return u&&I(it,B)}n.isSymbolObject=yt;function Pt(it){return x(it)||et(it)||lt(it)||St(it)||yt(it)}n.isBoxedPrimitive=Pt;function pe(it){return typeof Uint8Array<"u"&&(jt(it)||G(it))}n.isAnyArrayBuffer=pe,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(it){Object.defineProperty(n,it,{enumerable:!1,value:function(){throw new Error(it+" is not supported in userland")}})})}(bc)),bc}var bu,jp;function i2(){return jp||(jp=1,bu=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}),bu}var Jo={exports:{}},Gp;function _s(){return Gp||(Gp=1,typeof Object.create=="function"?Jo.exports=function(t,e){e&&(t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:Jo.exports=function(t,e){if(e){t.super_=e;var r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}}),Jo.exports}var Hp;function Vp(){return Hp||(Hp=1,function(n){var t=Object.getOwnPropertyDescriptors||function(X){for(var nt=Object.keys(X),dt={},G=0;G<nt.length;G++)dt[nt[G]]=Object.getOwnPropertyDescriptor(X,nt[G]);return dt},e=/%[sdj%]/g;n.format=function(W){if(!k(W)){for(var X=[],nt=0;nt<arguments.length;nt++)X.push(a(arguments[nt]));return X.join(" ")}for(var nt=1,dt=arguments,G=dt.length,M=String(W).replace(e,function(ct){if(ct==="%%")return"%";if(nt>=G)return ct;switch(ct){case"%s":return String(dt[nt++]);case"%d":return Number(dt[nt++]);case"%j":try{return JSON.stringify(dt[nt++])}catch{return"[Circular]"}default:return ct}}),tt=dt[nt];nt<G;tt=dt[++nt])R(tt)||!Y(tt)?M+=" "+tt:M+=" "+a(tt);return M},n.deprecate=function(W,X){if(typeof Ct<"u"&&Ct.noDeprecation===!0)return W;if(typeof Ct>"u")return function(){return n.deprecate(W,X).apply(this,arguments)};var nt=!1;function dt(){if(!nt){if(Ct.throwDeprecation)throw new Error(X);Ct.traceDeprecation?console.trace(X):console.error(X),nt=!0}return W.apply(this,arguments)}return dt};var r={},i=/^$/;if(Ct.env.NODE_DEBUG){var o=Ct.env.NODE_DEBUG;o=o.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),i=new RegExp("^"+o+"$","i")}n.debuglog=function(W){if(W=W.toUpperCase(),!r[W])if(i.test(W)){var X=Ct.pid;r[W]=function(){var nt=n.format.apply(n,arguments);console.error("%s %d: %s",W,X,nt)}}else r[W]=function(){};return r[W]};function a(W,X){var nt={seen:[],stylize:_};return arguments.length>=3&&(nt.depth=arguments[2]),arguments.length>=4&&(nt.colors=arguments[3]),A(X)?nt.showHidden=X:X&&n._extend(nt,X),N(nt.showHidden)&&(nt.showHidden=!1),N(nt.depth)&&(nt.depth=2),N(nt.colors)&&(nt.colors=!1),N(nt.customInspect)&&(nt.customInspect=!0),nt.colors&&(nt.stylize=u),f(nt,W,nt.depth)}n.inspect=a,a.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},a.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function u(W,X){var nt=a.styles[X];return nt?"\x1B["+a.colors[nt][0]+"m"+W+"\x1B["+a.colors[nt][1]+"m":W}function _(W,X){return W}function l(W){var X={};return W.forEach(function(nt,dt){X[nt]=!0}),X}function f(W,X,nt){if(W.customInspect&&X&&L(X.inspect)&&X.inspect!==n.inspect&&!(X.constructor&&X.constructor.prototype===X)){var dt=X.inspect(nt,W);return k(dt)||(dt=f(W,dt,nt)),dt}var G=g(W,X);if(G)return G;var M=Object.keys(X),tt=l(M);if(W.showHidden&&(M=Object.getOwnPropertyNames(X)),ft(X)&&(M.indexOf("message")>=0||M.indexOf("description")>=0))return y(X);if(M.length===0){if(L(X)){var ct=X.name?": "+X.name:"";return W.stylize("[Function"+ct+"]","special")}if(D(X))return W.stylize(RegExp.prototype.toString.call(X),"regexp");if(Z(X))return W.stylize(Date.prototype.toString.call(X),"date");if(ft(X))return y(X)}var _t="",v=!1,x=["{","}"];if(T(X)&&(v=!0,x=["[","]"]),L(X)){var et=X.name?": "+X.name:"";_t=" [Function"+et+"]"}if(D(X)&&(_t=" "+RegExp.prototype.toString.call(X)),Z(X)&&(_t=" "+Date.prototype.toUTCString.call(X)),ft(X)&&(_t=" "+y(X)),M.length===0&&(!v||X.length==0))return x[0]+_t+x[1];if(nt<0)return D(X)?W.stylize(RegExp.prototype.toString.call(X),"regexp"):W.stylize("[Object]","special");W.seen.push(X);var lt;return v?lt=B(W,X,nt,tt,M):lt=M.map(function(St){return I(W,X,nt,tt,St,v)}),W.seen.pop(),S(lt,_t,x)}function g(W,X){if(N(X))return W.stylize("undefined","undefined");if(k(X)){var nt="'"+JSON.stringify(X).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return W.stylize(nt,"string")}if(z(X))return W.stylize(""+X,"number");if(A(X))return W.stylize(""+X,"boolean");if(R(X))return W.stylize("null","null")}function y(W){return"["+Error.prototype.toString.call(W)+"]"}function B(W,X,nt,dt,G){for(var M=[],tt=0,ct=X.length;tt<ct;++tt)xt(X,String(tt))?M.push(I(W,X,nt,dt,String(tt),!0)):M.push("");return G.forEach(function(_t){_t.match(/^\d+$/)||M.push(I(W,X,nt,dt,_t,!0))}),M}function I(W,X,nt,dt,G,M){var tt,ct,_t;if(_t=Object.getOwnPropertyDescriptor(X,G)||{value:X[G]},_t.get?_t.set?ct=W.stylize("[Getter/Setter]","special"):ct=W.stylize("[Getter]","special"):_t.set&&(ct=W.stylize("[Setter]","special")),xt(dt,G)||(tt="["+G+"]"),ct||(W.seen.indexOf(_t.value)<0?(R(nt)?ct=f(W,_t.value,null):ct=f(W,_t.value,nt-1),ct.indexOf(`
|
|
12
|
+
`)>-1&&(M?ct=ct.split(`
|
|
13
|
+
`).map(function(v){return" "+v}).join(`
|
|
14
|
+
`).slice(2):ct=`
|
|
15
|
+
`+ct.split(`
|
|
16
|
+
`).map(function(v){return" "+v}).join(`
|
|
17
|
+
`))):ct=W.stylize("[Circular]","special")),N(tt)){if(M&&G.match(/^\d+$/))return ct;tt=JSON.stringify(""+G),tt.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(tt=tt.slice(1,-1),tt=W.stylize(tt,"name")):(tt=tt.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),tt=W.stylize(tt,"string"))}return tt+": "+ct}function S(W,X,nt){var dt=W.reduce(function(G,M){return M.indexOf(`
|
|
18
|
+
`)>=0,G+M.replace(/\u001b\[\d\d?m/g,"").length+1},0);return dt>60?nt[0]+(X===""?"":X+`
|
|
19
|
+
`)+" "+W.join(`,
|
|
20
|
+
`)+" "+nt[1]:nt[0]+X+" "+W.join(", ")+" "+nt[1]}n.types=n2();function T(W){return Array.isArray(W)}n.isArray=T;function A(W){return typeof W=="boolean"}n.isBoolean=A;function R(W){return W===null}n.isNull=R;function P(W){return W==null}n.isNullOrUndefined=P;function z(W){return typeof W=="number"}n.isNumber=z;function k(W){return typeof W=="string"}n.isString=k;function C(W){return typeof W=="symbol"}n.isSymbol=C;function N(W){return W===void 0}n.isUndefined=N;function D(W){return Y(W)&&Rt(W)==="[object RegExp]"}n.isRegExp=D,n.types.isRegExp=D;function Y(W){return typeof W=="object"&&W!==null}n.isObject=Y;function Z(W){return Y(W)&&Rt(W)==="[object Date]"}n.isDate=Z,n.types.isDate=Z;function ft(W){return Y(W)&&(Rt(W)==="[object Error]"||W instanceof Error)}n.isError=ft,n.types.isNativeError=ft;function L(W){return typeof W=="function"}n.isFunction=L;function At(W){return W===null||typeof W=="boolean"||typeof W=="number"||typeof W=="string"||typeof W=="symbol"||typeof W>"u"}n.isPrimitive=At,n.isBuffer=i2();function Rt(W){return Object.prototype.toString.call(W)}function at(W){return W<10?"0"+W.toString(10):W.toString(10)}var wt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function Et(){var W=new Date,X=[at(W.getHours()),at(W.getMinutes()),at(W.getSeconds())].join(":");return[W.getDate(),wt[W.getMonth()],X].join(" ")}n.log=function(){console.log("%s - %s",Et(),n.format.apply(n,arguments))},n.inherits=_s(),n._extend=function(W,X){if(!X||!Y(X))return W;for(var nt=Object.keys(X),dt=nt.length;dt--;)W[nt[dt]]=X[nt[dt]];return W};function xt(W,X){return Object.prototype.hasOwnProperty.call(W,X)}var vt=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;n.promisify=function(X){if(typeof X!="function")throw new TypeError('The "original" argument must be of type Function');if(vt&&X[vt]){var nt=X[vt];if(typeof nt!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(nt,vt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),nt}function nt(){for(var dt,G,M=new Promise(function(_t,v){dt=_t,G=v}),tt=[],ct=0;ct<arguments.length;ct++)tt.push(arguments[ct]);tt.push(function(_t,v){_t?G(_t):dt(v)});try{X.apply(this,tt)}catch(_t){G(_t)}return M}return Object.setPrototypeOf(nt,Object.getPrototypeOf(X)),vt&&Object.defineProperty(nt,vt,{value:nt,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(nt,t(X))},n.promisify.custom=vt;function Bt(W,X){if(!W){var nt=new Error("Promise was rejected with a falsy value");nt.reason=W,W=nt}return X(W)}function jt(W){if(typeof W!="function")throw new TypeError('The "original" argument must be of type Function');function X(){for(var nt=[],dt=0;dt<arguments.length;dt++)nt.push(arguments[dt]);var G=nt.pop();if(typeof G!="function")throw new TypeError("The last argument must be of type Function");var M=this,tt=function(){return G.apply(M,arguments)};W.apply(this,nt).then(function(ct){Ct.nextTick(tt.bind(null,null,ct))},function(ct){Ct.nextTick(Bt.bind(null,ct,tt))})}return Object.setPrototypeOf(X,Object.getPrototypeOf(W)),Object.defineProperties(X,t(W)),X}n.callbackify=jt}(yc)),yc}var mu,qp;function s2(){if(qp)return mu;qp=1;function n(I,S){var T=Object.keys(I);if(Object.getOwnPropertySymbols){var A=Object.getOwnPropertySymbols(I);S&&(A=A.filter(function(R){return Object.getOwnPropertyDescriptor(I,R).enumerable})),T.push.apply(T,A)}return T}function t(I){for(var S=1;S<arguments.length;S++){var T=arguments[S]!=null?arguments[S]:{};S%2?n(Object(T),!0).forEach(function(A){e(I,A,T[A])}):Object.getOwnPropertyDescriptors?Object.defineProperties(I,Object.getOwnPropertyDescriptors(T)):n(Object(T)).forEach(function(A){Object.defineProperty(I,A,Object.getOwnPropertyDescriptor(T,A))})}return I}function e(I,S,T){return S=a(S),S in I?Object.defineProperty(I,S,{value:T,enumerable:!0,configurable:!0,writable:!0}):I[S]=T,I}function r(I,S){if(!(I instanceof S))throw new TypeError("Cannot call a class as a function")}function i(I,S){for(var T=0;T<S.length;T++){var A=S[T];A.enumerable=A.enumerable||!1,A.configurable=!0,"value"in A&&(A.writable=!0),Object.defineProperty(I,a(A.key),A)}}function o(I,S,T){return S&&i(I.prototype,S),Object.defineProperty(I,"prototype",{writable:!1}),I}function a(I){var S=u(I,"string");return typeof S=="symbol"?S:String(S)}function u(I,S){if(typeof I!="object"||I===null)return I;var T=I[Symbol.toPrimitive];if(T!==void 0){var A=T.call(I,S);if(typeof A!="object")return A;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(I)}var _=Qo(),l=_.Buffer,f=Vp(),g=f.inspect,y=g&&g.custom||"inspect";function B(I,S,T){l.prototype.copy.call(I,S,T)}return mu=function(){function I(){r(this,I),this.head=null,this.tail=null,this.length=0}return o(I,[{key:"push",value:function(T){var A={data:T,next:null};this.length>0?this.tail.next=A:this.head=A,this.tail=A,++this.length}},{key:"unshift",value:function(T){var A={data:T,next:this.head};this.length===0&&(this.tail=A),this.head=A,++this.length}},{key:"shift",value:function(){if(this.length!==0){var T=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,T}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(T){if(this.length===0)return"";for(var A=this.head,R=""+A.data;A=A.next;)R+=T+A.data;return R}},{key:"concat",value:function(T){if(this.length===0)return l.alloc(0);for(var A=l.allocUnsafe(T>>>0),R=this.head,P=0;R;)B(R.data,A,P),P+=R.data.length,R=R.next;return A}},{key:"consume",value:function(T,A){var R;return T<this.head.data.length?(R=this.head.data.slice(0,T),this.head.data=this.head.data.slice(T)):T===this.head.data.length?R=this.shift():R=A?this._getString(T):this._getBuffer(T),R}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(T){var A=this.head,R=1,P=A.data;for(T-=P.length;A=A.next;){var z=A.data,k=T>z.length?z.length:T;if(k===z.length?P+=z:P+=z.slice(0,T),T-=k,T===0){k===z.length?(++R,A.next?this.head=A.next:this.head=this.tail=null):(this.head=A,A.data=z.slice(k));break}++R}return this.length-=R,P}},{key:"_getBuffer",value:function(T){var A=l.allocUnsafe(T),R=this.head,P=1;for(R.data.copy(A),T-=R.data.length;R=R.next;){var z=R.data,k=T>z.length?z.length:T;if(z.copy(A,A.length-T,0,k),T-=k,T===0){k===z.length?(++P,R.next?this.head=R.next:this.head=this.tail=null):(this.head=R,R.data=z.slice(k));break}++P}return this.length-=P,A}},{key:y,value:function(T,A){return g(this,t(t({},A),{},{depth:0,customInspect:!1}))}}]),I}(),mu}var Au,Qp;function Kp(){if(Qp)return Au;Qp=1;function n(a,u){var _=this,l=this._readableState&&this._readableState.destroyed,f=this._writableState&&this._writableState.destroyed;return l||f?(u?u(a):a&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,Ct.nextTick(i,this,a)):Ct.nextTick(i,this,a)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(a||null,function(g){!u&&g?_._writableState?_._writableState.errorEmitted?Ct.nextTick(e,_):(_._writableState.errorEmitted=!0,Ct.nextTick(t,_,g)):Ct.nextTick(t,_,g):u?(Ct.nextTick(e,_),u(g)):Ct.nextTick(e,_)}),this)}function t(a,u){i(a,u),e(a)}function e(a){a._writableState&&!a._writableState.emitClose||a._readableState&&!a._readableState.emitClose||a.emit("close")}function r(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}function i(a,u){a.emit("error",u)}function o(a,u){var _=a._readableState,l=a._writableState;_&&_.autoDestroy||l&&l.autoDestroy?a.destroy(u):a.emit("error",u)}return Au={destroy:n,undestroy:r,errorOrDestroy:o},Au}var Eu={},Wp;function fs(){if(Wp)return Eu;Wp=1;function n(u,_){u.prototype=Object.create(_.prototype),u.prototype.constructor=u,u.__proto__=_}var t={};function e(u,_,l){l||(l=Error);function f(y,B,I){return typeof _=="string"?_:_(y,B,I)}var g=function(y){n(B,y);function B(I,S,T){return y.call(this,f(I,S,T))||this}return B}(l);g.prototype.name=l.name,g.prototype.code=u,t[u]=g}function r(u,_){if(Array.isArray(u)){var l=u.length;return u=u.map(function(f){return String(f)}),l>2?"one of ".concat(_," ").concat(u.slice(0,l-1).join(", "),", or ")+u[l-1]:l===2?"one of ".concat(_," ").concat(u[0]," or ").concat(u[1]):"of ".concat(_," ").concat(u[0])}else return"of ".concat(_," ").concat(String(u))}function i(u,_,l){return u.substr(0,_.length)===_}function o(u,_,l){return(l===void 0||l>u.length)&&(l=u.length),u.substring(l-_.length,l)===_}function a(u,_,l){return typeof l!="number"&&(l=0),l+_.length>u.length?!1:u.indexOf(_,l)!==-1}return e("ERR_INVALID_OPT_VALUE",function(u,_){return'The value "'+_+'" is invalid for option "'+u+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(u,_,l){var f;typeof _=="string"&&i(_,"not ")?(f="must not be",_=_.replace(/^not /,"")):f="must be";var g;if(o(u," argument"))g="The ".concat(u," ").concat(f," ").concat(r(_,"type"));else{var y=a(u,".")?"property":"argument";g='The "'.concat(u,'" ').concat(y," ").concat(f," ").concat(r(_,"type"))}return g+=". Received type ".concat(typeof l),g},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(u){return"The "+u+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(u){return"Cannot call "+u+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(u){return"Unknown encoding: "+u},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),Eu.codes=t,Eu}var vu,Jp;function $p(){if(Jp)return vu;Jp=1;var n=fs().codes.ERR_INVALID_OPT_VALUE;function t(r,i,o){return r.highWaterMark!=null?r.highWaterMark:i?r[o]:null}function e(r,i,o,a){var u=t(i,a,o);if(u!=null){if(!(isFinite(u)&&Math.floor(u)===u)||u<0){var _=a?o:"highWaterMark";throw new n(_,u)}return Math.floor(u)}return r.objectMode?16:16*1024}return vu={getHighWaterMark:e},vu}var xu,Yp;function o2(){if(Yp)return xu;Yp=1,xu=n;function n(e,r){if(t("noDeprecation"))return e;var i=!1;function o(){if(!i){if(t("throwDeprecation"))throw new Error(r);t("traceDeprecation")?console.trace(r):console.warn(r),i=!0}return e.apply(this,arguments)}return o}function t(e){try{if(!li.localStorage)return!1}catch{return!1}var r=li.localStorage[e];return r==null?!1:String(r).toLowerCase()==="true"}return xu}var Ru,Zp;function Xp(){if(Zp)return Ru;Zp=1,Ru=D;function n(G){var M=this;this.next=null,this.entry=null,this.finish=function(){dt(M,G)}}var t;D.WritableState=C;var e={deprecate:o2()},r=Oh(),i=Qo().Buffer,o=(typeof li<"u"?li:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function a(G){return i.from(G)}function u(G){return i.isBuffer(G)||G instanceof o}var _=Kp(),l=$p(),f=l.getHighWaterMark,g=fs().codes,y=g.ERR_INVALID_ARG_TYPE,B=g.ERR_METHOD_NOT_IMPLEMENTED,I=g.ERR_MULTIPLE_CALLBACK,S=g.ERR_STREAM_CANNOT_PIPE,T=g.ERR_STREAM_DESTROYED,A=g.ERR_STREAM_NULL_VALUES,R=g.ERR_STREAM_WRITE_AFTER_END,P=g.ERR_UNKNOWN_ENCODING,z=_.errorOrDestroy;_s()(D,r);function k(){}function C(G,M,tt){t=t||ls(),G=G||{},typeof tt!="boolean"&&(tt=M instanceof t),this.objectMode=!!G.objectMode,tt&&(this.objectMode=this.objectMode||!!G.writableObjectMode),this.highWaterMark=f(this,G,"writableHighWaterMark",tt),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var ct=G.decodeStrings===!1;this.decodeStrings=!ct,this.defaultEncoding=G.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(_t){wt(M,_t)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=G.emitClose!==!1,this.autoDestroy=!!G.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}C.prototype.getBuffer=function(){for(var M=this.bufferedRequest,tt=[];M;)tt.push(M),M=M.next;return tt},function(){try{Object.defineProperty(C.prototype,"buffer",{get:e.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}();var N;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(N=Function.prototype[Symbol.hasInstance],Object.defineProperty(D,Symbol.hasInstance,{value:function(M){return N.call(this,M)?!0:this!==D?!1:M&&M._writableState instanceof C}})):N=function(M){return M instanceof this};function D(G){t=t||ls();var M=this instanceof t;if(!M&&!N.call(D,this))return new D(G);this._writableState=new C(G,this,M),this.writable=!0,G&&(typeof G.write=="function"&&(this._write=G.write),typeof G.writev=="function"&&(this._writev=G.writev),typeof G.destroy=="function"&&(this._destroy=G.destroy),typeof G.final=="function"&&(this._final=G.final)),r.call(this)}D.prototype.pipe=function(){z(this,new S)};function Y(G,M){var tt=new R;z(G,tt),Ct.nextTick(M,tt)}function Z(G,M,tt,ct){var _t;return tt===null?_t=new A:typeof tt!="string"&&!M.objectMode&&(_t=new y("chunk",["string","Buffer"],tt)),_t?(z(G,_t),Ct.nextTick(ct,_t),!1):!0}D.prototype.write=function(G,M,tt){var ct=this._writableState,_t=!1,v=!ct.objectMode&&u(G);return v&&!i.isBuffer(G)&&(G=a(G)),typeof M=="function"&&(tt=M,M=null),v?M="buffer":M||(M=ct.defaultEncoding),typeof tt!="function"&&(tt=k),ct.ending?Y(this,tt):(v||Z(this,ct,G,tt))&&(ct.pendingcb++,_t=L(this,ct,v,G,M,tt)),_t},D.prototype.cork=function(){this._writableState.corked++},D.prototype.uncork=function(){var G=this._writableState;G.corked&&(G.corked--,!G.writing&&!G.corked&&!G.bufferProcessing&&G.bufferedRequest&&vt(this,G))},D.prototype.setDefaultEncoding=function(M){if(typeof M=="string"&&(M=M.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((M+"").toLowerCase())>-1))throw new P(M);return this._writableState.defaultEncoding=M,this},Object.defineProperty(D.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function ft(G,M,tt){return!G.objectMode&&G.decodeStrings!==!1&&typeof M=="string"&&(M=i.from(M,tt)),M}Object.defineProperty(D.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function L(G,M,tt,ct,_t,v){if(!tt){var x=ft(M,ct,_t);ct!==x&&(tt=!0,_t="buffer",ct=x)}var et=M.objectMode?1:ct.length;M.length+=et;var lt=M.length<M.highWaterMark;if(lt||(M.needDrain=!0),M.writing||M.corked){var St=M.lastBufferedRequest;M.lastBufferedRequest={chunk:ct,encoding:_t,isBuf:tt,callback:v,next:null},St?St.next=M.lastBufferedRequest:M.bufferedRequest=M.lastBufferedRequest,M.bufferedRequestCount+=1}else At(G,M,!1,et,ct,_t,v);return lt}function At(G,M,tt,ct,_t,v,x){M.writelen=ct,M.writecb=x,M.writing=!0,M.sync=!0,M.destroyed?M.onwrite(new T("write")):tt?G._writev(_t,M.onwrite):G._write(_t,v,M.onwrite),M.sync=!1}function Rt(G,M,tt,ct,_t){--M.pendingcb,tt?(Ct.nextTick(_t,ct),Ct.nextTick(X,G,M),G._writableState.errorEmitted=!0,z(G,ct)):(_t(ct),G._writableState.errorEmitted=!0,z(G,ct),X(G,M))}function at(G){G.writing=!1,G.writecb=null,G.length-=G.writelen,G.writelen=0}function wt(G,M){var tt=G._writableState,ct=tt.sync,_t=tt.writecb;if(typeof _t!="function")throw new I;if(at(tt),M)Rt(G,tt,ct,M,_t);else{var v=Bt(tt)||G.destroyed;!v&&!tt.corked&&!tt.bufferProcessing&&tt.bufferedRequest&&vt(G,tt),ct?Ct.nextTick(Et,G,tt,v,_t):Et(G,tt,v,_t)}}function Et(G,M,tt,ct){tt||xt(G,M),M.pendingcb--,ct(),X(G,M)}function xt(G,M){M.length===0&&M.needDrain&&(M.needDrain=!1,G.emit("drain"))}function vt(G,M){M.bufferProcessing=!0;var tt=M.bufferedRequest;if(G._writev&&tt&&tt.next){var ct=M.bufferedRequestCount,_t=new Array(ct),v=M.corkedRequestsFree;v.entry=tt;for(var x=0,et=!0;tt;)_t[x]=tt,tt.isBuf||(et=!1),tt=tt.next,x+=1;_t.allBuffers=et,At(G,M,!0,M.length,_t,"",v.finish),M.pendingcb++,M.lastBufferedRequest=null,v.next?(M.corkedRequestsFree=v.next,v.next=null):M.corkedRequestsFree=new n(M),M.bufferedRequestCount=0}else{for(;tt;){var lt=tt.chunk,St=tt.encoding,yt=tt.callback,Pt=M.objectMode?1:lt.length;if(At(G,M,!1,Pt,lt,St,yt),tt=tt.next,M.bufferedRequestCount--,M.writing)break}tt===null&&(M.lastBufferedRequest=null)}M.bufferedRequest=tt,M.bufferProcessing=!1}D.prototype._write=function(G,M,tt){tt(new B("_write()"))},D.prototype._writev=null,D.prototype.end=function(G,M,tt){var ct=this._writableState;return typeof G=="function"?(tt=G,G=null,M=null):typeof M=="function"&&(tt=M,M=null),G!=null&&this.write(G,M),ct.corked&&(ct.corked=1,this.uncork()),ct.ending||nt(this,ct,tt),this},Object.defineProperty(D.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function Bt(G){return G.ending&&G.length===0&&G.bufferedRequest===null&&!G.finished&&!G.writing}function jt(G,M){G._final(function(tt){M.pendingcb--,tt&&z(G,tt),M.prefinished=!0,G.emit("prefinish"),X(G,M)})}function W(G,M){!M.prefinished&&!M.finalCalled&&(typeof G._final=="function"&&!M.destroyed?(M.pendingcb++,M.finalCalled=!0,Ct.nextTick(jt,G,M)):(M.prefinished=!0,G.emit("prefinish")))}function X(G,M){var tt=Bt(M);if(tt&&(W(G,M),M.pendingcb===0&&(M.finished=!0,G.emit("finish"),M.autoDestroy))){var ct=G._readableState;(!ct||ct.autoDestroy&&ct.endEmitted)&&G.destroy()}return tt}function nt(G,M,tt){M.ending=!0,X(G,M),tt&&(M.finished?Ct.nextTick(tt):G.once("finish",tt)),M.ended=!0,G.writable=!1}function dt(G,M,tt){var ct=G.entry;for(G.entry=null;ct;){var _t=ct.callback;M.pendingcb--,_t(tt),ct=ct.next}M.corkedRequestsFree.next=G}return Object.defineProperty(D.prototype,"destroyed",{enumerable:!1,get:function(){return this._writableState===void 0?!1:this._writableState.destroyed},set:function(M){this._writableState&&(this._writableState.destroyed=M)}}),D.prototype.destroy=_.destroy,D.prototype._undestroy=_.undestroy,D.prototype._destroy=function(G,M){M(G)},Ru}var zu,tw;function ls(){if(tw)return zu;tw=1;var n=Object.keys||function(l){var f=[];for(var g in l)f.push(g);return f};zu=a;var t=cw(),e=Xp();_s()(a,t);for(var r=n(e.prototype),i=0;i<r.length;i++){var o=r[i];a.prototype[o]||(a.prototype[o]=e.prototype[o])}function a(l){if(!(this instanceof a))return new a(l);t.call(this,l),e.call(this,l),this.allowHalfOpen=!0,l&&(l.readable===!1&&(this.readable=!1),l.writable===!1&&(this.writable=!1),l.allowHalfOpen===!1&&(this.allowHalfOpen=!1,this.once("end",u)))}Object.defineProperty(a.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(a.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(a.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}});function u(){this._writableState.ended||Ct.nextTick(_,this)}function _(l){l.end()}return Object.defineProperty(a.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0||this._writableState===void 0?!1:this._readableState.destroyed&&this._writableState.destroyed},set:function(f){this._readableState===void 0||this._writableState===void 0||(this._readableState.destroyed=f,this._writableState.destroyed=f)}}),zu}var Bu={},$o={exports:{}};/*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */var ew;function a2(){return ew||(ew=1,function(n,t){var e=Qo(),r=e.Buffer;function i(a,u){for(var _ in a)u[_]=a[_]}r.from&&r.alloc&&r.allocUnsafe&&r.allocUnsafeSlow?n.exports=e:(i(e,t),t.Buffer=o);function o(a,u,_){return r(a,u,_)}o.prototype=Object.create(r.prototype),i(r,o),o.from=function(a,u,_){if(typeof a=="number")throw new TypeError("Argument must not be a number");return r(a,u,_)},o.alloc=function(a,u,_){if(typeof a!="number")throw new TypeError("Argument must be a number");var l=r(a);return u!==void 0?typeof _=="string"?l.fill(u,_):l.fill(u):l.fill(0),l},o.allocUnsafe=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return r(a)},o.allocUnsafeSlow=function(a){if(typeof a!="number")throw new TypeError("Argument must be a number");return e.SlowBuffer(a)}}($o,$o.exports)),$o.exports}var rw;function nw(){if(rw)return Bu;rw=1;var n=a2().Buffer,t=n.isEncoding||function(A){switch(A=""+A,A&&A.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function e(A){if(!A)return"utf8";for(var R;;)switch(A){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return A;default:if(R)return;A=(""+A).toLowerCase(),R=!0}}function r(A){var R=e(A);if(typeof R!="string"&&(n.isEncoding===t||!t(A)))throw new Error("Unknown encoding: "+A);return R||A}Bu.StringDecoder=i;function i(A){this.encoding=r(A);var R;switch(this.encoding){case"utf16le":this.text=g,this.end=y,R=4;break;case"utf8":this.fillLast=_,R=4;break;case"base64":this.text=B,this.end=I,R=3;break;default:this.write=S,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(R)}i.prototype.write=function(A){if(A.length===0)return"";var R,P;if(this.lastNeed){if(R=this.fillLast(A),R===void 0)return"";P=this.lastNeed,this.lastNeed=0}else P=0;return P<A.length?R?R+this.text(A,P):this.text(A,P):R||""},i.prototype.end=f,i.prototype.text=l,i.prototype.fillLast=function(A){if(this.lastNeed<=A.length)return A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,this.lastTotal-this.lastNeed,0,A.length),this.lastNeed-=A.length};function o(A){return A<=127?0:A>>5===6?2:A>>4===14?3:A>>3===30?4:A>>6===2?-1:-2}function a(A,R,P){var z=R.length-1;if(z<P)return 0;var k=o(R[z]);return k>=0?(k>0&&(A.lastNeed=k-1),k):--z<P||k===-2?0:(k=o(R[z]),k>=0?(k>0&&(A.lastNeed=k-2),k):--z<P||k===-2?0:(k=o(R[z]),k>=0?(k>0&&(k===2?k=0:A.lastNeed=k-3),k):0))}function u(A,R,P){if((R[0]&192)!==128)return A.lastNeed=0,"�";if(A.lastNeed>1&&R.length>1){if((R[1]&192)!==128)return A.lastNeed=1,"�";if(A.lastNeed>2&&R.length>2&&(R[2]&192)!==128)return A.lastNeed=2,"�"}}function _(A){var R=this.lastTotal-this.lastNeed,P=u(this,A);if(P!==void 0)return P;if(this.lastNeed<=A.length)return A.copy(this.lastChar,R,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);A.copy(this.lastChar,R,0,A.length),this.lastNeed-=A.length}function l(A,R){var P=a(this,A,R);if(!this.lastNeed)return A.toString("utf8",R);this.lastTotal=P;var z=A.length-(P-this.lastNeed);return A.copy(this.lastChar,0,z),A.toString("utf8",R,z)}function f(A){var R=A&&A.length?this.write(A):"";return this.lastNeed?R+"�":R}function g(A,R){if((A.length-R)%2===0){var P=A.toString("utf16le",R);if(P){var z=P.charCodeAt(P.length-1);if(z>=55296&&z<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1],P.slice(0,-1)}return P}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=A[A.length-1],A.toString("utf16le",R,A.length-1)}function y(A){var R=A&&A.length?this.write(A):"";if(this.lastNeed){var P=this.lastTotal-this.lastNeed;return R+this.lastChar.toString("utf16le",0,P)}return R}function B(A,R){var P=(A.length-R)%3;return P===0?A.toString("base64",R):(this.lastNeed=3-P,this.lastTotal=3,P===1?this.lastChar[0]=A[A.length-1]:(this.lastChar[0]=A[A.length-2],this.lastChar[1]=A[A.length-1]),A.toString("base64",R,A.length-P))}function I(A){var R=A&&A.length?this.write(A):"";return this.lastNeed?R+this.lastChar.toString("base64",0,3-this.lastNeed):R}function S(A){return A.toString(this.encoding)}function T(A){return A&&A.length?this.write(A):""}return Bu}var Su,iw;function Pu(){if(iw)return Su;iw=1;var n=fs().codes.ERR_STREAM_PREMATURE_CLOSE;function t(o){var a=!1;return function(){if(!a){a=!0;for(var u=arguments.length,_=new Array(u),l=0;l<u;l++)_[l]=arguments[l];o.apply(this,_)}}}function e(){}function r(o){return o.setHeader&&typeof o.abort=="function"}function i(o,a,u){if(typeof a=="function")return i(o,null,a);a||(a={}),u=t(u||e);var _=a.readable||a.readable!==!1&&o.readable,l=a.writable||a.writable!==!1&&o.writable,f=function(){o.writable||y()},g=o._writableState&&o._writableState.finished,y=function(){l=!1,g=!0,_||u.call(o)},B=o._readableState&&o._readableState.endEmitted,I=function(){_=!1,B=!0,l||u.call(o)},S=function(P){u.call(o,P)},T=function(){var P;if(_&&!B)return(!o._readableState||!o._readableState.ended)&&(P=new n),u.call(o,P);if(l&&!g)return(!o._writableState||!o._writableState.ended)&&(P=new n),u.call(o,P)},A=function(){o.req.on("finish",y)};return r(o)?(o.on("complete",y),o.on("abort",T),o.req?A():o.on("request",A)):l&&!o._writableState&&(o.on("end",f),o.on("close",f)),o.on("end",I),o.on("finish",y),a.error!==!1&&o.on("error",S),o.on("close",T),function(){o.removeListener("complete",y),o.removeListener("abort",T),o.removeListener("request",A),o.req&&o.req.removeListener("finish",y),o.removeListener("end",f),o.removeListener("close",f),o.removeListener("finish",y),o.removeListener("end",I),o.removeListener("error",S),o.removeListener("close",T)}}return Su=i,Su}var ku,sw;function c2(){if(sw)return ku;sw=1;var n;function t(P,z,k){return z=e(z),z in P?Object.defineProperty(P,z,{value:k,enumerable:!0,configurable:!0,writable:!0}):P[z]=k,P}function e(P){var z=r(P,"string");return typeof z=="symbol"?z:String(z)}function r(P,z){if(typeof P!="object"||P===null)return P;var k=P[Symbol.toPrimitive];if(k!==void 0){var C=k.call(P,z);if(typeof C!="object")return C;throw new TypeError("@@toPrimitive must return a primitive value.")}return(z==="string"?String:Number)(P)}var i=Pu(),o=Symbol("lastResolve"),a=Symbol("lastReject"),u=Symbol("error"),_=Symbol("ended"),l=Symbol("lastPromise"),f=Symbol("handlePromise"),g=Symbol("stream");function y(P,z){return{value:P,done:z}}function B(P){var z=P[o];if(z!==null){var k=P[g].read();k!==null&&(P[l]=null,P[o]=null,P[a]=null,z(y(k,!1)))}}function I(P){Ct.nextTick(B,P)}function S(P,z){return function(k,C){P.then(function(){if(z[_]){k(y(void 0,!0));return}z[f](k,C)},C)}}var T=Object.getPrototypeOf(function(){}),A=Object.setPrototypeOf((n={get stream(){return this[g]},next:function(){var z=this,k=this[u];if(k!==null)return Promise.reject(k);if(this[_])return Promise.resolve(y(void 0,!0));if(this[g].destroyed)return new Promise(function(Y,Z){Ct.nextTick(function(){z[u]?Z(z[u]):Y(y(void 0,!0))})});var C=this[l],N;if(C)N=new Promise(S(C,this));else{var D=this[g].read();if(D!==null)return Promise.resolve(y(D,!1));N=new Promise(this[f])}return this[l]=N,N}},t(n,Symbol.asyncIterator,function(){return this}),t(n,"return",function(){var z=this;return new Promise(function(k,C){z[g].destroy(null,function(N){if(N){C(N);return}k(y(void 0,!0))})})}),n),T),R=function(z){var k,C=Object.create(A,(k={},t(k,g,{value:z,writable:!0}),t(k,o,{value:null,writable:!0}),t(k,a,{value:null,writable:!0}),t(k,u,{value:null,writable:!0}),t(k,_,{value:z._readableState.endEmitted,writable:!0}),t(k,f,{value:function(D,Y){var Z=C[g].read();Z?(C[l]=null,C[o]=null,C[a]=null,D(y(Z,!1))):(C[o]=D,C[a]=Y)},writable:!0}),k));return C[l]=null,i(z,function(N){if(N&&N.code!=="ERR_STREAM_PREMATURE_CLOSE"){var D=C[a];D!==null&&(C[l]=null,C[o]=null,C[a]=null,D(N)),C[u]=N;return}var Y=C[o];Y!==null&&(C[l]=null,C[o]=null,C[a]=null,Y(y(void 0,!0))),C[_]=!0}),z.on("readable",I.bind(null,C)),C};return ku=R,ku}var Fu,ow;function u2(){return ow||(ow=1,Fu=function(){throw new Error("Readable.from is not available in the browser")}),Fu}var Iu,aw;function cw(){if(aw)return Iu;aw=1,Iu=Y;var n;Y.ReadableState=D,Fh().EventEmitter;var t=function(x,et){return x.listeners(et).length},e=Oh(),r=Qo().Buffer,i=(typeof li<"u"?li:typeof window<"u"?window:typeof self<"u"?self:{}).Uint8Array||function(){};function o(v){return r.from(v)}function a(v){return r.isBuffer(v)||v instanceof i}var u=Vp(),_;u&&u.debuglog?_=u.debuglog("stream"):_=function(){};var l=s2(),f=Kp(),g=$p(),y=g.getHighWaterMark,B=fs().codes,I=B.ERR_INVALID_ARG_TYPE,S=B.ERR_STREAM_PUSH_AFTER_EOF,T=B.ERR_METHOD_NOT_IMPLEMENTED,A=B.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,R,P,z;_s()(Y,e);var k=f.errorOrDestroy,C=["error","close","destroy","pause","resume"];function N(v,x,et){if(typeof v.prependListener=="function")return v.prependListener(x,et);!v._events||!v._events[x]?v.on(x,et):Array.isArray(v._events[x])?v._events[x].unshift(et):v._events[x]=[et,v._events[x]]}function D(v,x,et){n=n||ls(),v=v||{},typeof et!="boolean"&&(et=x instanceof n),this.objectMode=!!v.objectMode,et&&(this.objectMode=this.objectMode||!!v.readableObjectMode),this.highWaterMark=y(this,v,"readableHighWaterMark",et),this.buffer=new l,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=v.emitClose!==!1,this.autoDestroy=!!v.autoDestroy,this.destroyed=!1,this.defaultEncoding=v.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,v.encoding&&(R||(R=nw().StringDecoder),this.decoder=new R(v.encoding),this.encoding=v.encoding)}function Y(v){if(n=n||ls(),!(this instanceof Y))return new Y(v);var x=this instanceof n;this._readableState=new D(v,this,x),this.readable=!0,v&&(typeof v.read=="function"&&(this._read=v.read),typeof v.destroy=="function"&&(this._destroy=v.destroy)),e.call(this)}Object.defineProperty(Y.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(x){this._readableState&&(this._readableState.destroyed=x)}}),Y.prototype.destroy=f.destroy,Y.prototype._undestroy=f.undestroy,Y.prototype._destroy=function(v,x){x(v)},Y.prototype.push=function(v,x){var et=this._readableState,lt;return et.objectMode?lt=!0:typeof v=="string"&&(x=x||et.defaultEncoding,x!==et.encoding&&(v=r.from(v,x),x=""),lt=!0),Z(this,v,x,!1,lt)},Y.prototype.unshift=function(v){return Z(this,v,null,!0,!1)};function Z(v,x,et,lt,St){_("readableAddChunk",x);var yt=v._readableState;if(x===null)yt.reading=!1,wt(v,yt);else{var Pt;if(St||(Pt=L(yt,x)),Pt)k(v,Pt);else if(yt.objectMode||x&&x.length>0)if(typeof x!="string"&&!yt.objectMode&&Object.getPrototypeOf(x)!==r.prototype&&(x=o(x)),lt)yt.endEmitted?k(v,new A):ft(v,yt,x,!0);else if(yt.ended)k(v,new S);else{if(yt.destroyed)return!1;yt.reading=!1,yt.decoder&&!et?(x=yt.decoder.write(x),yt.objectMode||x.length!==0?ft(v,yt,x,!1):vt(v,yt)):ft(v,yt,x,!1)}else lt||(yt.reading=!1,vt(v,yt))}return!yt.ended&&(yt.length<yt.highWaterMark||yt.length===0)}function ft(v,x,et,lt){x.flowing&&x.length===0&&!x.sync?(x.awaitDrain=0,v.emit("data",et)):(x.length+=x.objectMode?1:et.length,lt?x.buffer.unshift(et):x.buffer.push(et),x.needReadable&&Et(v)),vt(v,x)}function L(v,x){var et;return!a(x)&&typeof x!="string"&&x!==void 0&&!v.objectMode&&(et=new I("chunk",["string","Buffer","Uint8Array"],x)),et}Y.prototype.isPaused=function(){return this._readableState.flowing===!1},Y.prototype.setEncoding=function(v){R||(R=nw().StringDecoder);var x=new R(v);this._readableState.decoder=x,this._readableState.encoding=this._readableState.decoder.encoding;for(var et=this._readableState.buffer.head,lt="";et!==null;)lt+=x.write(et.data),et=et.next;return this._readableState.buffer.clear(),lt!==""&&this._readableState.buffer.push(lt),this._readableState.length=lt.length,this};var At=1073741824;function Rt(v){return v>=At?v=At:(v--,v|=v>>>1,v|=v>>>2,v|=v>>>4,v|=v>>>8,v|=v>>>16,v++),v}function at(v,x){return v<=0||x.length===0&&x.ended?0:x.objectMode?1:v!==v?x.flowing&&x.length?x.buffer.head.data.length:x.length:(v>x.highWaterMark&&(x.highWaterMark=Rt(v)),v<=x.length?v:x.ended?x.length:(x.needReadable=!0,0))}Y.prototype.read=function(v){_("read",v),v=parseInt(v,10);var x=this._readableState,et=v;if(v!==0&&(x.emittedReadable=!1),v===0&&x.needReadable&&((x.highWaterMark!==0?x.length>=x.highWaterMark:x.length>0)||x.ended))return _("read: emitReadable",x.length,x.ended),x.length===0&&x.ended?tt(this):Et(this),null;if(v=at(v,x),v===0&&x.ended)return x.length===0&&tt(this),null;var lt=x.needReadable;_("need readable",lt),(x.length===0||x.length-v<x.highWaterMark)&&(lt=!0,_("length less than watermark",lt)),x.ended||x.reading?(lt=!1,_("reading or ended",lt)):lt&&(_("do read"),x.reading=!0,x.sync=!0,x.length===0&&(x.needReadable=!0),this._read(x.highWaterMark),x.sync=!1,x.reading||(v=at(et,x)));var St;return v>0?St=M(v,x):St=null,St===null?(x.needReadable=x.length<=x.highWaterMark,v=0):(x.length-=v,x.awaitDrain=0),x.length===0&&(x.ended||(x.needReadable=!0),et!==v&&x.ended&&tt(this)),St!==null&&this.emit("data",St),St};function wt(v,x){if(_("onEofChunk"),!x.ended){if(x.decoder){var et=x.decoder.end();et&&et.length&&(x.buffer.push(et),x.length+=x.objectMode?1:et.length)}x.ended=!0,x.sync?Et(v):(x.needReadable=!1,x.emittedReadable||(x.emittedReadable=!0,xt(v)))}}function Et(v){var x=v._readableState;_("emitReadable",x.needReadable,x.emittedReadable),x.needReadable=!1,x.emittedReadable||(_("emitReadable",x.flowing),x.emittedReadable=!0,Ct.nextTick(xt,v))}function xt(v){var x=v._readableState;_("emitReadable_",x.destroyed,x.length,x.ended),!x.destroyed&&(x.length||x.ended)&&(v.emit("readable"),x.emittedReadable=!1),x.needReadable=!x.flowing&&!x.ended&&x.length<=x.highWaterMark,G(v)}function vt(v,x){x.readingMore||(x.readingMore=!0,Ct.nextTick(Bt,v,x))}function Bt(v,x){for(;!x.reading&&!x.ended&&(x.length<x.highWaterMark||x.flowing&&x.length===0);){var et=x.length;if(_("maybeReadMore read 0"),v.read(0),et===x.length)break}x.readingMore=!1}Y.prototype._read=function(v){k(this,new T("_read()"))},Y.prototype.pipe=function(v,x){var et=this,lt=this._readableState;switch(lt.pipesCount){case 0:lt.pipes=v;break;case 1:lt.pipes=[lt.pipes,v];break;default:lt.pipes.push(v);break}lt.pipesCount+=1,_("pipe count=%d opts=%j",lt.pipesCount,x);var St=(!x||x.end!==!1)&&v!==Ct.stdout&&v!==Ct.stderr,yt=St?pe:Be;lt.endEmitted?Ct.nextTick(yt):et.once("end",yt),v.on("unpipe",Pt);function Pt(Ie,_e){_("onunpipe"),Ie===et&&_e&&_e.hasUnpiped===!1&&(_e.hasUnpiped=!0,de())}function pe(){_("onend"),v.end()}var it=jt(et);v.on("drain",it);var we=!1;function de(){_("cleanup"),v.removeListener("close",ge),v.removeListener("finish",le),v.removeListener("drain",it),v.removeListener("error",Qt),v.removeListener("unpipe",Pt),et.removeListener("end",pe),et.removeListener("end",Be),et.removeListener("data",Gt),we=!0,lt.awaitDrain&&(!v._writableState||v._writableState.needDrain)&&it()}et.on("data",Gt);function Gt(Ie){_("ondata");var _e=v.write(Ie);_("dest.write",_e),_e===!1&&((lt.pipesCount===1&<.pipes===v||lt.pipesCount>1&&_t(lt.pipes,v)!==-1)&&!we&&(_("false write response, pause",lt.awaitDrain),lt.awaitDrain++),et.pause())}function Qt(Ie){_("onerror",Ie),Be(),v.removeListener("error",Qt),t(v,"error")===0&&k(v,Ie)}N(v,"error",Qt);function ge(){v.removeListener("finish",le),Be()}v.once("close",ge);function le(){_("onfinish"),v.removeListener("close",ge),Be()}v.once("finish",le);function Be(){_("unpipe"),et.unpipe(v)}return v.emit("pipe",et),lt.flowing||(_("pipe resume"),et.resume()),v};function jt(v){return function(){var et=v._readableState;_("pipeOnDrain",et.awaitDrain),et.awaitDrain&&et.awaitDrain--,et.awaitDrain===0&&t(v,"data")&&(et.flowing=!0,G(v))}}Y.prototype.unpipe=function(v){var x=this._readableState,et={hasUnpiped:!1};if(x.pipesCount===0)return this;if(x.pipesCount===1)return v&&v!==x.pipes?this:(v||(v=x.pipes),x.pipes=null,x.pipesCount=0,x.flowing=!1,v&&v.emit("unpipe",this,et),this);if(!v){var lt=x.pipes,St=x.pipesCount;x.pipes=null,x.pipesCount=0,x.flowing=!1;for(var yt=0;yt<St;yt++)lt[yt].emit("unpipe",this,{hasUnpiped:!1});return this}var Pt=_t(x.pipes,v);return Pt===-1?this:(x.pipes.splice(Pt,1),x.pipesCount-=1,x.pipesCount===1&&(x.pipes=x.pipes[0]),v.emit("unpipe",this,et),this)},Y.prototype.on=function(v,x){var et=e.prototype.on.call(this,v,x),lt=this._readableState;return v==="data"?(lt.readableListening=this.listenerCount("readable")>0,lt.flowing!==!1&&this.resume()):v==="readable"&&!lt.endEmitted&&!lt.readableListening&&(lt.readableListening=lt.needReadable=!0,lt.flowing=!1,lt.emittedReadable=!1,_("on readable",lt.length,lt.reading),lt.length?Et(this):lt.reading||Ct.nextTick(X,this)),et},Y.prototype.addListener=Y.prototype.on,Y.prototype.removeListener=function(v,x){var et=e.prototype.removeListener.call(this,v,x);return v==="readable"&&Ct.nextTick(W,this),et},Y.prototype.removeAllListeners=function(v){var x=e.prototype.removeAllListeners.apply(this,arguments);return(v==="readable"||v===void 0)&&Ct.nextTick(W,this),x};function W(v){var x=v._readableState;x.readableListening=v.listenerCount("readable")>0,x.resumeScheduled&&!x.paused?x.flowing=!0:v.listenerCount("data")>0&&v.resume()}function X(v){_("readable nexttick read 0"),v.read(0)}Y.prototype.resume=function(){var v=this._readableState;return v.flowing||(_("resume"),v.flowing=!v.readableListening,nt(this,v)),v.paused=!1,this};function nt(v,x){x.resumeScheduled||(x.resumeScheduled=!0,Ct.nextTick(dt,v,x))}function dt(v,x){_("resume",x.reading),x.reading||v.read(0),x.resumeScheduled=!1,v.emit("resume"),G(v),x.flowing&&!x.reading&&v.read(0)}Y.prototype.pause=function(){return _("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(_("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function G(v){var x=v._readableState;for(_("flow",x.flowing);x.flowing&&v.read()!==null;);}Y.prototype.wrap=function(v){var x=this,et=this._readableState,lt=!1;v.on("end",function(){if(_("wrapped end"),et.decoder&&!et.ended){var Pt=et.decoder.end();Pt&&Pt.length&&x.push(Pt)}x.push(null)}),v.on("data",function(Pt){if(_("wrapped data"),et.decoder&&(Pt=et.decoder.write(Pt)),!(et.objectMode&&Pt==null)&&!(!et.objectMode&&(!Pt||!Pt.length))){var pe=x.push(Pt);pe||(lt=!0,v.pause())}});for(var St in v)this[St]===void 0&&typeof v[St]=="function"&&(this[St]=function(pe){return function(){return v[pe].apply(v,arguments)}}(St));for(var yt=0;yt<C.length;yt++)v.on(C[yt],this.emit.bind(this,C[yt]));return this._read=function(Pt){_("wrapped _read",Pt),lt&&(lt=!1,v.resume())},this},typeof Symbol=="function"&&(Y.prototype[Symbol.asyncIterator]=function(){return P===void 0&&(P=c2()),P(this)}),Object.defineProperty(Y.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(Y.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(Y.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(x){this._readableState&&(this._readableState.flowing=x)}}),Y._fromList=M,Object.defineProperty(Y.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}});function M(v,x){if(x.length===0)return null;var et;return x.objectMode?et=x.buffer.shift():!v||v>=x.length?(x.decoder?et=x.buffer.join(""):x.buffer.length===1?et=x.buffer.first():et=x.buffer.concat(x.length),x.buffer.clear()):et=x.buffer.consume(v,x.decoder),et}function tt(v){var x=v._readableState;_("endReadable",x.endEmitted),x.endEmitted||(x.ended=!0,Ct.nextTick(ct,x,v))}function ct(v,x){if(_("endReadableNT",v.endEmitted,v.length),!v.endEmitted&&v.length===0&&(v.endEmitted=!0,x.readable=!1,x.emit("end"),v.autoDestroy)){var et=x._writableState;(!et||et.autoDestroy&&et.finished)&&x.destroy()}}typeof Symbol=="function"&&(Y.from=function(v,x){return z===void 0&&(z=u2()),z(Y,v,x)});function _t(v,x){for(var et=0,lt=v.length;et<lt;et++)if(v[et]===x)return et;return-1}return Iu}var Ou,uw;function _w(){if(uw)return Ou;uw=1,Ou=u;var n=fs().codes,t=n.ERR_METHOD_NOT_IMPLEMENTED,e=n.ERR_MULTIPLE_CALLBACK,r=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,i=n.ERR_TRANSFORM_WITH_LENGTH_0,o=ls();_s()(u,o);function a(f,g){var y=this._transformState;y.transforming=!1;var B=y.writecb;if(B===null)return this.emit("error",new e);y.writechunk=null,y.writecb=null,g!=null&&this.push(g),B(f);var I=this._readableState;I.reading=!1,(I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}function u(f){if(!(this instanceof u))return new u(f);o.call(this,f),this._transformState={afterTransform:a.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,f&&(typeof f.transform=="function"&&(this._transform=f.transform),typeof f.flush=="function"&&(this._flush=f.flush)),this.on("prefinish",_)}function _(){var f=this;typeof this._flush=="function"&&!this._readableState.destroyed?this._flush(function(g,y){l(f,g,y)}):l(this,null,null)}u.prototype.push=function(f,g){return this._transformState.needTransform=!1,o.prototype.push.call(this,f,g)},u.prototype._transform=function(f,g,y){y(new t("_transform()"))},u.prototype._write=function(f,g,y){var B=this._transformState;if(B.writecb=y,B.writechunk=f,B.writeencoding=g,!B.transforming){var I=this._readableState;(B.needTransform||I.needReadable||I.length<I.highWaterMark)&&this._read(I.highWaterMark)}},u.prototype._read=function(f){var g=this._transformState;g.writechunk!==null&&!g.transforming?(g.transforming=!0,this._transform(g.writechunk,g.writeencoding,g.afterTransform)):g.needTransform=!0},u.prototype._destroy=function(f,g){o.prototype._destroy.call(this,f,function(y){g(y)})};function l(f,g,y){if(g)return f.emit("error",g);if(y!=null&&f.push(y),f._writableState.length)throw new i;if(f._transformState.transforming)throw new r;return f.push(null)}return Ou}var Tu,fw;function _2(){if(fw)return Tu;fw=1,Tu=t;var n=_w();_s()(t,n);function t(e){if(!(this instanceof t))return new t(e);n.call(this,e)}return t.prototype._transform=function(e,r,i){i(null,e)},Tu}var Cu,lw;function f2(){if(lw)return Cu;lw=1;var n;function t(y){var B=!1;return function(){B||(B=!0,y.apply(void 0,arguments))}}var e=fs().codes,r=e.ERR_MISSING_ARGS,i=e.ERR_STREAM_DESTROYED;function o(y){if(y)throw y}function a(y){return y.setHeader&&typeof y.abort=="function"}function u(y,B,I,S){S=t(S);var T=!1;y.on("close",function(){T=!0}),n===void 0&&(n=Pu()),n(y,{readable:B,writable:I},function(R){if(R)return S(R);T=!0,S()});var A=!1;return function(R){if(!T&&!A){if(A=!0,a(y))return y.abort();if(typeof y.destroy=="function")return y.destroy();S(R||new i("pipe"))}}}function _(y){y()}function l(y,B){return y.pipe(B)}function f(y){return!y.length||typeof y[y.length-1]!="function"?o:y.pop()}function g(){for(var y=arguments.length,B=new Array(y),I=0;I<y;I++)B[I]=arguments[I];var S=f(B);if(Array.isArray(B[0])&&(B=B[0]),B.length<2)throw new r("streams");var T,A=B.map(function(R,P){var z=P<B.length-1,k=P>0;return u(R,z,k,function(C){T||(T=C),C&&A.forEach(_),!z&&(A.forEach(_),S(T))})});return B.reduce(l)}return Cu=g,Cu}var hw;function pw(){return hw||(hw=1,function(n,t){t=n.exports=cw(),t.Stream=t,t.Readable=t,t.Writable=Xp(),t.Duplex=ls(),t.Transform=_w(),t.PassThrough=_2(),t.finished=Pu(),t.pipeline=f2()}(Ho,Ho.exports)),Ho.exports}var Nu,ww;function l2(){if(ww)return Nu;ww=1;const{Transform:n}=pw();return Nu=t=>class Vg extends n{constructor(r,i,o,a,u){super(u),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._hashBitLength=a,this._options=u,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(r){let i=null;try{this.push(this.digest())}catch(o){i=o}r(i)}update(r,i){if(!Ke.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Digest already called");return Ke.isBuffer(r)||(r=Ke.from(r,i)),this._state.absorb(r),this}digest(r){if(this._finalized)throw new Error("Digest already called");this._finalized=!0,this._delimitedSuffix&&this._state.absorbLastFewBits(this._delimitedSuffix);let i=this._state.squeeze(this._hashBitLength/8);return r!==void 0&&(i=i.toString(r)),this._resetState(),i}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new Vg(this._rate,this._capacity,this._delimitedSuffix,this._hashBitLength,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Nu}var Lu,dw;function h2(){if(dw)return Lu;dw=1;const{Transform:n}=pw();return Lu=t=>class qg extends n{constructor(r,i,o,a){super(a),this._rate=r,this._capacity=i,this._delimitedSuffix=o,this._options=a,this._state=new t,this._state.initialize(r,i),this._finalized=!1}_transform(r,i,o){let a=null;try{this.update(r,i)}catch(u){a=u}o(a)}_flush(){}_read(r){this.push(this.squeeze(r))}update(r,i){if(!Ke.isBuffer(r)&&typeof r!="string")throw new TypeError("Data must be a string or a buffer");if(this._finalized)throw new Error("Squeeze already called");return Ke.isBuffer(r)||(r=Ke.from(r,i)),this._state.absorb(r),this}squeeze(r,i){this._finalized||(this._finalized=!0,this._state.absorbLastFewBits(this._delimitedSuffix));let o=this._state.squeeze(r);return i!==void 0&&(o=o.toString(i)),o}_resetState(){return this._state.initialize(this._rate,this._capacity),this}_clone(){const r=new qg(this._rate,this._capacity,this._delimitedSuffix,this._options);return this._state.copy(r._state),r._finalized=this._finalized,r}},Lu}var Du,gw;function p2(){if(gw)return Du;gw=1;const n=l2(),t=h2();return Du=function(e){const r=n(e),i=t(e);return function(o,a){switch(typeof o=="string"?o.toLowerCase():o){case"keccak224":return new r(1152,448,null,224,a);case"keccak256":return new r(1088,512,null,256,a);case"keccak384":return new r(832,768,null,384,a);case"keccak512":return new r(576,1024,null,512,a);case"sha3-224":return new r(1152,448,6,224,a);case"sha3-256":return new r(1088,512,6,256,a);case"sha3-384":return new r(832,768,6,384,a);case"sha3-512":return new r(576,1024,6,512,a);case"shake128":return new i(1344,256,31,a);case"shake256":return new i(1088,512,31,a);default:throw new Error("Invald algorithm: "+o)}}},Du}var Uu={},yw;function w2(){if(yw)return Uu;yw=1;const n=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648];return Uu.p1600=function(t){for(let e=0;e<24;++e){const r=t[0]^t[10]^t[20]^t[30]^t[40],i=t[1]^t[11]^t[21]^t[31]^t[41],o=t[2]^t[12]^t[22]^t[32]^t[42],a=t[3]^t[13]^t[23]^t[33]^t[43],u=t[4]^t[14]^t[24]^t[34]^t[44],_=t[5]^t[15]^t[25]^t[35]^t[45],l=t[6]^t[16]^t[26]^t[36]^t[46],f=t[7]^t[17]^t[27]^t[37]^t[47],g=t[8]^t[18]^t[28]^t[38]^t[48],y=t[9]^t[19]^t[29]^t[39]^t[49];let B=g^(o<<1|a>>>31),I=y^(a<<1|o>>>31);const S=t[0]^B,T=t[1]^I,A=t[10]^B,R=t[11]^I,P=t[20]^B,z=t[21]^I,k=t[30]^B,C=t[31]^I,N=t[40]^B,D=t[41]^I;B=r^(u<<1|_>>>31),I=i^(_<<1|u>>>31);const Y=t[2]^B,Z=t[3]^I,ft=t[12]^B,L=t[13]^I,At=t[22]^B,Rt=t[23]^I,at=t[32]^B,wt=t[33]^I,Et=t[42]^B,xt=t[43]^I;B=o^(l<<1|f>>>31),I=a^(f<<1|l>>>31);const vt=t[4]^B,Bt=t[5]^I,jt=t[14]^B,W=t[15]^I,X=t[24]^B,nt=t[25]^I,dt=t[34]^B,G=t[35]^I,M=t[44]^B,tt=t[45]^I;B=u^(g<<1|y>>>31),I=_^(y<<1|g>>>31);const ct=t[6]^B,_t=t[7]^I,v=t[16]^B,x=t[17]^I,et=t[26]^B,lt=t[27]^I,St=t[36]^B,yt=t[37]^I,Pt=t[46]^B,pe=t[47]^I;B=l^(r<<1|i>>>31),I=f^(i<<1|r>>>31);const it=t[8]^B,we=t[9]^I,de=t[18]^B,Gt=t[19]^I,Qt=t[28]^B,ge=t[29]^I,le=t[38]^B,Be=t[39]^I,Ie=t[48]^B,_e=t[49]^I,qe=S,b=T,h=R<<4|A>>>28,w=A<<4|R>>>28,F=P<<3|z>>>29,U=z<<3|P>>>29,J=C<<9|k>>>23,st=k<<9|C>>>23,kt=N<<18|D>>>14,Vt=D<<18|N>>>14,qt=Y<<1|Z>>>31,Wt=Z<<1|Y>>>31,Dt=L<<12|ft>>>20,wi=ft<<12|L>>>20,Oe=At<<10|Rt>>>22,Gi=Rt<<10|At>>>22,no=wt<<13|at>>>19,Qe=at<<13|wt>>>19,io=Et<<2|xt>>>30,m=xt<<2|Et>>>30,p=Bt<<30|vt>>>2,d=vt<<30|Bt>>>2,O=jt<<6|W>>>26,H=W<<6|jt>>>26,$=nt<<11|X>>>21,ot=X<<11|nt>>>21,Ft=dt<<15|G>>>17,Zt=G<<15|dt>>>17,Jt=tt<<29|M>>>3,Xt=M<<29|tt>>>3,Ht=ct<<28|_t>>>4,t_=_t<<28|ct>>>4,e_=x<<23|v>>>9,r_=v<<23|x>>>9,n_=et<<25|lt>>>7,i_=lt<<25|et>>>7,s_=St<<21|yt>>>11,o_=yt<<21|St>>>11,a_=pe<<24|Pt>>>8,c_=Pt<<24|pe>>>8,u_=it<<27|we>>>5,__=we<<27|it>>>5,f_=de<<20|Gt>>>12,l_=Gt<<20|de>>>12,h_=ge<<7|Qt>>>25,p_=Qt<<7|ge>>>25,w_=le<<8|Be>>>24,d_=Be<<8|le>>>24,g_=Ie<<14|_e>>>18,y_=_e<<14|Ie>>>18;t[0]=qe^~Dt&$,t[1]=b^~wi&ot,t[10]=Ht^~f_&F,t[11]=t_^~l_&U,t[20]=qt^~O&n_,t[21]=Wt^~H&i_,t[30]=u_^~h&Oe,t[31]=__^~w&Gi,t[40]=p^~e_&h_,t[41]=d^~r_&p_,t[2]=Dt^~$&s_,t[3]=wi^~ot&o_,t[12]=f_^~F&no,t[13]=l_^~U&Qe,t[22]=O^~n_&w_,t[23]=H^~i_&d_,t[32]=h^~Oe&Ft,t[33]=w^~Gi&Zt,t[42]=e_^~h_&J,t[43]=r_^~p_&st,t[4]=$^~s_&g_,t[5]=ot^~o_&y_,t[14]=F^~no&Jt,t[15]=U^~Qe&Xt,t[24]=n_^~w_&kt,t[25]=i_^~d_&Vt,t[34]=Oe^~Ft&a_,t[35]=Gi^~Zt&c_,t[44]=h_^~J&io,t[45]=p_^~st&m,t[6]=s_^~g_&qe,t[7]=o_^~y_&b,t[16]=no^~Jt&Ht,t[17]=Qe^~Xt&t_,t[26]=w_^~kt&qt,t[27]=d_^~Vt&Wt,t[36]=Ft^~a_&u_,t[37]=Zt^~c_&__,t[46]=J^~io&p,t[47]=st^~m&d,t[8]=g_^~qe&Dt,t[9]=y_^~b&wi,t[18]=Jt^~Ht&f_,t[19]=Xt^~t_&l_,t[28]=kt^~qt&O,t[29]=Vt^~Wt&H,t[38]=a_^~u_&h,t[39]=c_^~__&w,t[48]=io^~p&e_,t[49]=m^~d&r_,t[0]^=n[e*2],t[1]^=n[e*2+1]}},Uu}var Mu,bw;function d2(){if(bw)return Mu;bw=1;const n=w2();function t(){this.state=[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],this.blockSize=null,this.count=0,this.squeezing=!1}return t.prototype.initialize=function(e,r){for(let i=0;i<50;++i)this.state[i]=0;this.blockSize=e/8,this.count=0,this.squeezing=!1},t.prototype.absorb=function(e){for(let r=0;r<e.length;++r)this.state[~~(this.count/4)]^=e[r]<<8*(this.count%4),this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0)},t.prototype.absorbLastFewBits=function(e){this.state[~~(this.count/4)]^=e<<8*(this.count%4),(e&128)!==0&&this.count===this.blockSize-1&&n.p1600(this.state),this.state[~~((this.blockSize-1)/4)]^=128<<8*((this.blockSize-1)%4),n.p1600(this.state),this.count=0,this.squeezing=!0},t.prototype.squeeze=function(e){this.squeezing||this.absorbLastFewBits(1);const r=Ke.alloc(e);for(let i=0;i<e;++i)r[i]=this.state[~~(this.count/4)]>>>8*(this.count%4)&255,this.count+=1,this.count===this.blockSize&&(n.p1600(this.state),this.count=0);return r},t.prototype.copy=function(e){for(let r=0;r<50;++r)e.state[r]=this.state[r];e.blockSize=this.blockSize,e.count=this.count,e.squeezing=this.squeezing},Mu=t,Mu}var ju,mw;function g2(){return mw||(mw=1,ju=p2()(d2())),ju}var y2=g2();const Aw=Rh(y2);var Yo={exports:{}},b2=Yo.exports,Ew;function m2(){return Ew||(Ew=1,function(n,t){(function(e,r){n.exports=r()})(b2,function(){var e=function(o,a){if(a=a||{},typeof o!="function")throw new i("fetch must be a function");if(typeof a!="object")throw new i("defaults must be an object");if(a.retries!==void 0&&!r(a.retries))throw new i("retries must be a positive integer");if(a.retryDelay!==void 0&&!r(a.retryDelay)&&typeof a.retryDelay!="function")throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(a.retryOn!==void 0&&!Array.isArray(a.retryOn)&&typeof a.retryOn!="function")throw new i("retryOn property expects an array or function");var u={retries:3,retryDelay:1e3,retryOn:[]};return a=Object.assign(u,a),function(l,f){var g=a.retries,y=a.retryDelay,B=a.retryOn;if(f&&f.retries!==void 0)if(r(f.retries))g=f.retries;else throw new i("retries must be a positive integer");if(f&&f.retryDelay!==void 0)if(r(f.retryDelay)||typeof f.retryDelay=="function")y=f.retryDelay;else throw new i("retryDelay must be a positive integer or a function returning a positive integer");if(f&&f.retryOn)if(Array.isArray(f.retryOn)||typeof f.retryOn=="function")B=f.retryOn;else throw new i("retryOn property expects an array or function");return new Promise(function(I,S){var T=function(R){var P=typeof Request<"u"&&l instanceof Request?l.clone():l;o(P,f).then(function(z){if(Array.isArray(B)&&B.indexOf(z.status)===-1)I(z);else if(typeof B=="function")try{return Promise.resolve(B(R,null,z)).then(function(k){k?A(R,null,z):I(z)}).catch(S)}catch(k){S(k)}else R<g?A(R,null,z):I(z)}).catch(function(z){if(typeof B=="function")try{Promise.resolve(B(R,z,null)).then(function(k){k?A(R,z,null):S(z)}).catch(function(k){S(k)})}catch(k){S(k)}else R<g?A(R,z,null):S(z)})};function A(R,P,z){var k=typeof y=="function"?y(R,P,z):y;setTimeout(function(){T(++R)},k)}T(0)})}};function r(o){return Number.isInteger(o)&&o>=0}function i(o){this.name="ArgumentError",this.message=o}return e})}(Yo)),Yo.exports}var A2=m2();const E2=Rh(A2),v2=()=>(async n=>{try{return typeof MessageChannel<"u"&&new MessageChannel().port1.postMessage(new SharedArrayBuffer(1)),WebAssembly.validate(n)}catch{return!1}})(new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,2,1,0,5,4,1,3,1,1,10,11,1,9,0,65,0,254,16,2,0,26,11]));var Zo=typeof Hi<"u"?Hi:typeof self<"u"?self:typeof window<"u"?window:{};function vw(n,t){return new Promise(e=>{n.addEventListener("message",function r({data:i}){i?.type===t&&(n.removeEventListener("message",r),e(i))})})}vw(self,"wasm_bindgen_worker_init").then(async({init:n,receiver:t})=>{const e=await Promise.resolve().then(function(){return F2});await e.default(n),postMessage({type:"wasm_bindgen_worker_ready"}),e.wbg_rayon_start_worker(t)});async function x2(n,t,e){if(e.numThreads()===0)throw new Error("num_threads must be > 0.");const r={type:"wasm_bindgen_worker_init",init:{module_or_path:n,memory:t},receiver:e.receiver()};await Promise.all(Array.from({length:e.numThreads()},async()=>{let i;try{i=new Worker(new URL("/workerHelpers.js",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href),{type:"module"})}catch{const u=await(await fetch("/workerHelpers.js")).blob(),_=URL.createObjectURL(u);i=new Worker(_)}return i.postMessage(r),await vw(i,"wasm_bindgen_worker_ready"),i})),e.build()}let s;function qs(n){const t=s.__externref_table_alloc();return s.__wbindgen_export_2.set(t,n),t}function hs(n,t){try{return n.apply(this,t)}catch(e){const r=qs(e);s.__wbindgen_exn_store(r)}}const xw=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&xw.decode();let Qs=null;function ps(){return(Qs===null||Qs.buffer!==s.memory.buffer)&&(Qs=new Uint8Array(s.memory.buffer)),Qs}function Ks(n,t){return n=n>>>0,xw.decode(ps().slice(n,n+t))}let j=0;const Rw=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},R2=function(n,t){const e=Rw.encode(n);return t.set(e),{read:n.length,written:e.length}};function Xo(n,t,e){if(e===void 0){const u=Rw.encode(n),_=t(u.length,1)>>>0;return ps().subarray(_,_+u.length).set(u),j=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=ps();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=ps().subarray(i+a,i+r),_=R2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return j=a,i}let Ws=null;function fr(){return(Ws===null||Ws.buffer!==s.memory.buffer)&&(Ws=new DataView(s.memory.buffer)),Ws}function Ci(n){return n==null}function Gu(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=Gu(n[0]));for(let a=1;a<i;a++)o+=", "+Gu(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
21
|
+
${n.stack}`:r}function E(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function c(n){const t=s.__wbindgen_export_2.get(n);return s.__externref_table_dealloc(n),t}function Q(n,t){return n=n>>>0,ps().subarray(n/1,n/1+t)}function q(n,t){const e=t(n.length*1,1)>>>0;return ps().set(n,e/1),j=n.length,e}function Hu(){s.init_panic_hook()}function Vu(n){return s.initThreadPool(n)}function z2(n){s.wbg_rayon_start_worker(n)}const zw=Object.freeze({Proof:0,0:"Proof",Verify:1,1:"Verify"});typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_boolean_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanclientkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleancompressedserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleannoisedistribution_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_booleanpublickey_free(n>>>0,1));const Bw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlist_free(n>>>0,1));class hi{static __wrap(t){t=t>>>0;const e=Object.create(hi.prototype);return e.__wbg_ptr=t,Bw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlist_free(t,0)}static builder(t){E(t,er);const e=s.compactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Js.__wrap(e[0])}len(){return s.compactciphertextlist_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlist_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}expand(){const t=s.compactciphertextlist_expand(this.__wbg_ptr);if(t[2])throw c(t[1]);return ws.__wrap(t[0])}serialize(){const t=s.compactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return hi.__wrap(i[0])}safe_serialize(t){const e=s.compactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hi.__wrap(o[0])}}const Sw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistbuilder_free(n>>>0,1));class Js{static __wrap(t){t=t>>>0;const e=Object.create(Js.prototype);return e.__wbg_ptr=t,Sw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistbuilder_free(t,0)}push_u24(t){const e=s.compactciphertextlistbuilder_push_u24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u40(t){const e=s.compactciphertextlistbuilder_push_u40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u48(t){const e=s.compactciphertextlistbuilder_push_u48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u56(t){const e=s.compactciphertextlistbuilder_push_u56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2(t){const e=s.compactciphertextlistbuilder_push_u2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u4(t){const e=s.compactciphertextlistbuilder_push_u4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u6(t){const e=s.compactciphertextlistbuilder_push_u6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u8(t){const e=s.compactciphertextlistbuilder_push_u8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u10(t){const e=s.compactciphertextlistbuilder_push_u10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u12(t){const e=s.compactciphertextlistbuilder_push_u12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u14(t){const e=s.compactciphertextlistbuilder_push_u14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u16(t){const e=s.compactciphertextlistbuilder_push_u16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u32(t){const e=s.compactciphertextlistbuilder_push_u32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u64(t){const e=s.compactciphertextlistbuilder_push_u64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i24(t){const e=s.compactciphertextlistbuilder_push_i24(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i40(t){const e=s.compactciphertextlistbuilder_push_i40(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i48(t){const e=s.compactciphertextlistbuilder_push_i48(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i56(t){const e=s.compactciphertextlistbuilder_push_i56(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i2(t){const e=s.compactciphertextlistbuilder_push_i2(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i4(t){const e=s.compactciphertextlistbuilder_push_i4(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i6(t){const e=s.compactciphertextlistbuilder_push_i6(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i8(t){const e=s.compactciphertextlistbuilder_push_i8(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i10(t){const e=s.compactciphertextlistbuilder_push_i10(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i12(t){const e=s.compactciphertextlistbuilder_push_i12(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i14(t){const e=s.compactciphertextlistbuilder_push_i14(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i16(t){const e=s.compactciphertextlistbuilder_push_i16(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i32(t){const e=s.compactciphertextlistbuilder_push_i32(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i64(t){const e=s.compactciphertextlistbuilder_push_i64(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u128(t){const e=s.compactciphertextlistbuilder_push_u128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u160(t){const e=s.compactciphertextlistbuilder_push_u160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u256(t){const e=s.compactciphertextlistbuilder_push_u256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u512(t){const e=s.compactciphertextlistbuilder_push_u512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u1024(t){const e=s.compactciphertextlistbuilder_push_u1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u2048(t){const e=s.compactciphertextlistbuilder_push_u2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i128(t){const e=s.compactciphertextlistbuilder_push_i128(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i160(t){const e=s.compactciphertextlistbuilder_push_i160(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i256(t){const e=s.compactciphertextlistbuilder_push_i256(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i512(t){const e=s.compactciphertextlistbuilder_push_i512(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i1024(t){const e=s.compactciphertextlistbuilder_push_i1024(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i2048(t){const e=s.compactciphertextlistbuilder_push_i2048(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_boolean(t){const e=s.compactciphertextlistbuilder_push_boolean(this.__wbg_ptr,t);if(e[1])throw c(e[0])}build(){const t=s.compactciphertextlistbuilder_build(this.__wbg_ptr);if(t[2])throw c(t[1]);return hi.__wrap(t[0])}build_packed(){const t=s.compactciphertextlistbuilder_build_packed(this.__wbg_ptr);if(t[2])throw c(t[1]);return hi.__wrap(t[0])}build_with_proof_packed(t,e,r){E(t,tr);const i=q(e,s.__wbindgen_malloc),o=j,a=s.compactciphertextlistbuilder_build_with_proof_packed(this.__wbg_ptr,t.__wbg_ptr,i,o,r);if(a[2])throw c(a[1]);return ds.__wrap(a[0])}push_u72(t){const e=s.compactciphertextlistbuilder_push_u72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u80(t){const e=s.compactciphertextlistbuilder_push_u80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u88(t){const e=s.compactciphertextlistbuilder_push_u88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u96(t){const e=s.compactciphertextlistbuilder_push_u96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u104(t){const e=s.compactciphertextlistbuilder_push_u104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u112(t){const e=s.compactciphertextlistbuilder_push_u112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u120(t){const e=s.compactciphertextlistbuilder_push_u120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u136(t){const e=s.compactciphertextlistbuilder_push_u136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u144(t){const e=s.compactciphertextlistbuilder_push_u144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u152(t){const e=s.compactciphertextlistbuilder_push_u152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u168(t){const e=s.compactciphertextlistbuilder_push_u168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u176(t){const e=s.compactciphertextlistbuilder_push_u176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u184(t){const e=s.compactciphertextlistbuilder_push_u184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u192(t){const e=s.compactciphertextlistbuilder_push_u192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u200(t){const e=s.compactciphertextlistbuilder_push_u200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u208(t){const e=s.compactciphertextlistbuilder_push_u208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u216(t){const e=s.compactciphertextlistbuilder_push_u216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u224(t){const e=s.compactciphertextlistbuilder_push_u224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u232(t){const e=s.compactciphertextlistbuilder_push_u232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u240(t){const e=s.compactciphertextlistbuilder_push_u240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_u248(t){const e=s.compactciphertextlistbuilder_push_u248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i72(t){const e=s.compactciphertextlistbuilder_push_i72(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i80(t){const e=s.compactciphertextlistbuilder_push_i80(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i88(t){const e=s.compactciphertextlistbuilder_push_i88(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i96(t){const e=s.compactciphertextlistbuilder_push_i96(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i104(t){const e=s.compactciphertextlistbuilder_push_i104(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i112(t){const e=s.compactciphertextlistbuilder_push_i112(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i120(t){const e=s.compactciphertextlistbuilder_push_i120(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i136(t){const e=s.compactciphertextlistbuilder_push_i136(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i144(t){const e=s.compactciphertextlistbuilder_push_i144(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i152(t){const e=s.compactciphertextlistbuilder_push_i152(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i168(t){const e=s.compactciphertextlistbuilder_push_i168(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i176(t){const e=s.compactciphertextlistbuilder_push_i176(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i184(t){const e=s.compactciphertextlistbuilder_push_i184(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i192(t){const e=s.compactciphertextlistbuilder_push_i192(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i200(t){const e=s.compactciphertextlistbuilder_push_i200(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i208(t){const e=s.compactciphertextlistbuilder_push_i208(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i216(t){const e=s.compactciphertextlistbuilder_push_i216(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i224(t){const e=s.compactciphertextlistbuilder_push_i224(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i232(t){const e=s.compactciphertextlistbuilder_push_i232(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i240(t){const e=s.compactciphertextlistbuilder_push_i240(this.__wbg_ptr,t);if(e[1])throw c(e[0])}push_i248(t){const e=s.compactciphertextlistbuilder_push_i248(this.__wbg_ptr,t);if(e[1])throw c(e[0])}}const Pw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactciphertextlistexpander_free(n>>>0,1));class ws{static __wrap(t){t=t>>>0;const e=Object.create(ws.prototype);return e.__wbg_ptr=t,Pw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactciphertextlistexpander_free(t,0)}get_uint24(t){const e=s.compactciphertextlistexpander_get_uint24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mn.__wrap(e[0])}get_uint40(t){const e=s.compactciphertextlistexpander_get_uint40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qn.__wrap(e[0])}get_uint48(t){const e=s.compactciphertextlistexpander_get_uint48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kn.__wrap(e[0])}get_uint56(t){const e=s.compactciphertextlistexpander_get_uint56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jn.__wrap(e[0])}get_uint72(t){const e=s.compactciphertextlistexpander_get_uint72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zn.__wrap(e[0])}get_uint80(t){const e=s.compactciphertextlistexpander_get_uint80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ti.__wrap(e[0])}get_uint88(t){const e=s.compactciphertextlistexpander_get_uint88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ei.__wrap(e[0])}get_uint96(t){const e=s.compactciphertextlistexpander_get_uint96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ri.__wrap(e[0])}get_uint104(t){const e=s.compactciphertextlistexpander_get_uint104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return yn.__wrap(e[0])}get_uint112(t){const e=s.compactciphertextlistexpander_get_uint112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return bn.__wrap(e[0])}get_uint120(t){const e=s.compactciphertextlistexpander_get_uint120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return An.__wrap(e[0])}get_uint136(t){const e=s.compactciphertextlistexpander_get_uint136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return vn.__wrap(e[0])}get_uint144(t){const e=s.compactciphertextlistexpander_get_uint144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Rn.__wrap(e[0])}get_uint152(t){const e=s.compactciphertextlistexpander_get_uint152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return zn.__wrap(e[0])}get_uint168(t){const e=s.compactciphertextlistexpander_get_uint168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pn.__wrap(e[0])}get_uint176(t){const e=s.compactciphertextlistexpander_get_uint176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kn.__wrap(e[0])}get_uint184(t){const e=s.compactciphertextlistexpander_get_uint184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fn.__wrap(e[0])}get_uint192(t){const e=s.compactciphertextlistexpander_get_uint192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return In.__wrap(e[0])}get_uint200(t){const e=s.compactciphertextlistexpander_get_uint200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tn.__wrap(e[0])}get_uint208(t){const e=s.compactciphertextlistexpander_get_uint208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nn.__wrap(e[0])}get_uint216(t){const e=s.compactciphertextlistexpander_get_uint216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ln.__wrap(e[0])}get_uint224(t){const e=s.compactciphertextlistexpander_get_uint224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Dn.__wrap(e[0])}get_uint232(t){const e=s.compactciphertextlistexpander_get_uint232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Un.__wrap(e[0])}get_uint240(t){const e=s.compactciphertextlistexpander_get_uint240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jn.__wrap(e[0])}get_uint248(t){const e=s.compactciphertextlistexpander_get_uint248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gn.__wrap(e[0])}get_uint256(t){const e=s.compactciphertextlistexpander_get_uint256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hn.__wrap(e[0])}get_uint2(t){const e=s.compactciphertextlistexpander_get_uint2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return On.__wrap(e[0])}get_uint4(t){const e=s.compactciphertextlistexpander_get_uint4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qn.__wrap(e[0])}get_uint6(t){const e=s.compactciphertextlistexpander_get_uint6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $n.__wrap(e[0])}get_uint8(t){const e=s.compactciphertextlistexpander_get_uint8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xn.__wrap(e[0])}get_uint10(t){const e=s.compactciphertextlistexpander_get_uint10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return dn.__wrap(e[0])}get_uint12(t){const e=s.compactciphertextlistexpander_get_uint12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return mn.__wrap(e[0])}get_uint14(t){const e=s.compactciphertextlistexpander_get_uint14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return xn.__wrap(e[0])}get_uint16(t){const e=s.compactciphertextlistexpander_get_uint16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Bn.__wrap(e[0])}get_uint32(t){const e=s.compactciphertextlistexpander_get_uint32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vn.__wrap(e[0])}get_uint64(t){const e=s.compactciphertextlistexpander_get_uint64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yn.__wrap(e[0])}get_uint128(t){const e=s.compactciphertextlistexpander_get_uint128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return En.__wrap(e[0])}get_uint160(t){const e=s.compactciphertextlistexpander_get_uint160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sn.__wrap(e[0])}get_uint512(t){const e=s.compactciphertextlistexpander_get_uint512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wn.__wrap(e[0])}get_uint1024(t){const e=s.compactciphertextlistexpander_get_uint1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return gn.__wrap(e[0])}get_uint2048(t){const e=s.compactciphertextlistexpander_get_uint2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cn.__wrap(e[0])}get_int24(t){const e=s.compactciphertextlistexpander_get_int24(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Zr.__wrap(e[0])}get_int40(t){const e=s.compactciphertextlistexpander_get_int40(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return sn.__wrap(e[0])}get_int48(t){const e=s.compactciphertextlistexpander_get_int48(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return on.__wrap(e[0])}get_int56(t){const e=s.compactciphertextlistexpander_get_int56(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return cn.__wrap(e[0])}get_int72(t){const e=s.compactciphertextlistexpander_get_int72(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return fn.__wrap(e[0])}get_int80(t){const e=s.compactciphertextlistexpander_get_int80(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return hn.__wrap(e[0])}get_int88(t){const e=s.compactciphertextlistexpander_get_int88(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return pn.__wrap(e[0])}get_int96(t){const e=s.compactciphertextlistexpander_get_int96(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return wn.__wrap(e[0])}get_int104(t){const e=s.compactciphertextlistexpander_get_int104(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return kr.__wrap(e[0])}get_int112(t){const e=s.compactciphertextlistexpander_get_int112(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Fr.__wrap(e[0])}get_int120(t){const e=s.compactciphertextlistexpander_get_int120(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Or.__wrap(e[0])}get_int136(t){const e=s.compactciphertextlistexpander_get_int136(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Cr.__wrap(e[0])}get_int144(t){const e=s.compactciphertextlistexpander_get_int144(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Lr.__wrap(e[0])}get_int152(t){const e=s.compactciphertextlistexpander_get_int152(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Dr.__wrap(e[0])}get_int168(t){const e=s.compactciphertextlistexpander_get_int168(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return jr.__wrap(e[0])}get_int176(t){const e=s.compactciphertextlistexpander_get_int176(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Gr.__wrap(e[0])}get_int184(t){const e=s.compactciphertextlistexpander_get_int184(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Hr.__wrap(e[0])}get_int192(t){const e=s.compactciphertextlistexpander_get_int192(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Vr.__wrap(e[0])}get_int200(t){const e=s.compactciphertextlistexpander_get_int200(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Qr.__wrap(e[0])}get_int208(t){const e=s.compactciphertextlistexpander_get_int208(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Wr.__wrap(e[0])}get_int216(t){const e=s.compactciphertextlistexpander_get_int216(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Jr.__wrap(e[0])}get_int224(t){const e=s.compactciphertextlistexpander_get_int224(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return $r.__wrap(e[0])}get_int232(t){const e=s.compactciphertextlistexpander_get_int232(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Yr.__wrap(e[0])}get_int240(t){const e=s.compactciphertextlistexpander_get_int240(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Xr.__wrap(e[0])}get_int248(t){const e=s.compactciphertextlistexpander_get_int248(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return tn.__wrap(e[0])}get_int2(t){const e=s.compactciphertextlistexpander_get_int2(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return qr.__wrap(e[0])}get_int4(t){const e=s.compactciphertextlistexpander_get_int4(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return nn.__wrap(e[0])}get_int6(t){const e=s.compactciphertextlistexpander_get_int6(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return un.__wrap(e[0])}get_int8(t){const e=s.compactciphertextlistexpander_get_int8(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return ln.__wrap(e[0])}get_int10(t){const e=s.compactciphertextlistexpander_get_int10(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Sr.__wrap(e[0])}get_int12(t){const e=s.compactciphertextlistexpander_get_int12(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ir.__wrap(e[0])}get_int14(t){const e=s.compactciphertextlistexpander_get_int14(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Nr.__wrap(e[0])}get_int16(t){const e=s.compactciphertextlistexpander_get_int16(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Ur.__wrap(e[0])}get_int32(t){const e=s.compactciphertextlistexpander_get_int32(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return rn.__wrap(e[0])}get_int64(t){const e=s.compactciphertextlistexpander_get_int64(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return _n.__wrap(e[0])}get_int128(t){const e=s.compactciphertextlistexpander_get_int128(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Tr.__wrap(e[0])}get_int160(t){const e=s.compactciphertextlistexpander_get_int160(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Mr.__wrap(e[0])}get_int256(t){const e=s.compactciphertextlistexpander_get_int256(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return en.__wrap(e[0])}get_int512(t){const e=s.compactciphertextlistexpander_get_int512(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return an.__wrap(e[0])}get_int1024(t){const e=s.compactciphertextlistexpander_get_int1024(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Pr.__wrap(e[0])}get_int2048(t){const e=s.compactciphertextlistexpander_get_int2048(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Kr.__wrap(e[0])}get_bool(t){const e=s.compactciphertextlistexpander_get_bool(this.__wbg_ptr,t);if(e[2])throw c(e[1]);return Br.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.compactciphertextlistexpander_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}}const kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_compactpkecrs_free(n>>>0,1));class tr{static __wrap(t){t=t>>>0;const e=Object.create(tr.prototype);return e.__wbg_ptr=t,kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_compactpkecrs_free(t,0)}serialize(t){const e=s.compactpkecrs_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize(e,r);if(i[2])throw c(i[1]);return tr.__wrap(i[0])}safe_serialize(t){const e=s.compactpkecrs_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return tr.__wrap(o[0])}static from_config(t,e){E(t,gs);const r=s.compactpkecrs_from_config(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return tr.__wrap(r[0])}static deserialize_from_public_params(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.compactpkecrs_deserialize_from_public_params(e,r);if(i[2])throw c(i[1]);return tr.__wrap(i[0])}static safe_deserialize_from_public_params(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.compactpkecrs_safe_deserialize_from_public_params(r,i,e);if(o[2])throw c(o[1]);return tr.__wrap(o[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfhebool_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheint96_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint10_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint1024_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint104_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint112_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint12_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint120_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint128_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint136_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint14_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint144_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint152_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint16_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint160_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint168_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint176_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint184_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint192_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint200_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint2048_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint208_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint216_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint224_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint232_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint24_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint240_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint248_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint256_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint32_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint4_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint40_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint48_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint512_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint56_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint6_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint64_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint72_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint8_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint80_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint88_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_compressedfheuint96_free(n>>>0,1));const Fw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fhebool_free(n>>>0,1));class Br{static __wrap(t){t=t>>>0;const e=Object.create(Br.prototype);return e.__wbg_ptr=t,Fw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fhebool_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fhebool_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fhebool_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fhebool_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Br.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fhebool_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]!==0}serialize(){const t=s.fhebool_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fhebool_deserialize(e,r);if(i[2])throw c(i[1]);return Br.__wrap(i[0])}safe_serialize(t){const e=s.fhebool_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fhebool_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Br.__wrap(o[0])}}const Iw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint10_free(n>>>0,1));class Sr{static __wrap(t){t=t>>>0;const e=Object.create(Sr.prototype);return e.__wbg_ptr=t,Iw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Iw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint10_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint10_deserialize(e,r);if(i[2])throw c(i[1]);return Sr.__wrap(i[0])}safe_serialize(t){const e=s.fheint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sr.__wrap(o[0])}}const Ow=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint1024_free(n>>>0,1));class Pr{static __wrap(t){t=t>>>0;const e=Object.create(Pr.prototype);return e.__wbg_ptr=t,Ow.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ow.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint1024_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint1024_deserialize(e,r);if(i[2])throw c(i[1]);return Pr.__wrap(i[0])}safe_serialize(t){const e=s.fheint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pr.__wrap(o[0])}}const Tw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint104_free(n>>>0,1));class kr{static __wrap(t){t=t>>>0;const e=Object.create(kr.prototype);return e.__wbg_ptr=t,Tw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Tw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint104_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint104_deserialize(e,r);if(i[2])throw c(i[1]);return kr.__wrap(i[0])}safe_serialize(t){const e=s.fheint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kr.__wrap(o[0])}}const Cw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint112_free(n>>>0,1));class Fr{static __wrap(t){t=t>>>0;const e=Object.create(Fr.prototype);return e.__wbg_ptr=t,Cw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint112_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint112_deserialize(e,r);if(i[2])throw c(i[1]);return Fr.__wrap(i[0])}safe_serialize(t){const e=s.fheint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fr.__wrap(o[0])}}const Nw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint12_free(n>>>0,1));class Ir{static __wrap(t){t=t>>>0;const e=Object.create(Ir.prototype);return e.__wbg_ptr=t,Nw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint12_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ir.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint12_deserialize(e,r);if(i[2])throw c(i[1]);return Ir.__wrap(i[0])}safe_serialize(t){const e=s.fheint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ir.__wrap(o[0])}}const Lw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint120_free(n>>>0,1));class Or{static __wrap(t){t=t>>>0;const e=Object.create(Or.prototype);return e.__wbg_ptr=t,Lw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Lw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint120_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Or.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint120_deserialize(e,r);if(i[2])throw c(i[1]);return Or.__wrap(i[0])}safe_serialize(t){const e=s.fheint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Or.__wrap(o[0])}}const Dw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint128_free(n>>>0,1));class Tr{static __wrap(t){t=t>>>0;const e=Object.create(Tr.prototype);return e.__wbg_ptr=t,Dw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint128_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint128_deserialize(e,r);if(i[2])throw c(i[1]);return Tr.__wrap(i[0])}safe_serialize(t){const e=s.fheint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tr.__wrap(o[0])}}const Uw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint136_free(n>>>0,1));class Cr{static __wrap(t){t=t>>>0;const e=Object.create(Cr.prototype);return e.__wbg_ptr=t,Uw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Uw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint136_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint136_deserialize(e,r);if(i[2])throw c(i[1]);return Cr.__wrap(i[0])}safe_serialize(t){const e=s.fheint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Cr.__wrap(o[0])}}const Mw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint14_free(n>>>0,1));class Nr{static __wrap(t){t=t>>>0;const e=Object.create(Nr.prototype);return e.__wbg_ptr=t,Mw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Mw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint14_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint14_deserialize(e,r);if(i[2])throw c(i[1]);return Nr.__wrap(i[0])}safe_serialize(t){const e=s.fheint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Nr.__wrap(o[0])}}const jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint144_free(n>>>0,1));class Lr{static __wrap(t){t=t>>>0;const e=Object.create(Lr.prototype);return e.__wbg_ptr=t,jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint144_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Lr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint144_deserialize(e,r);if(i[2])throw c(i[1]);return Lr.__wrap(i[0])}safe_serialize(t){const e=s.fheint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Lr.__wrap(o[0])}}const Gw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint152_free(n>>>0,1));class Dr{static __wrap(t){t=t>>>0;const e=Object.create(Dr.prototype);return e.__wbg_ptr=t,Gw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint152_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint152_deserialize(e,r);if(i[2])throw c(i[1]);return Dr.__wrap(i[0])}safe_serialize(t){const e=s.fheint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Dr.__wrap(o[0])}}const Hw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint16_free(n>>>0,1));class Ur{static __wrap(t){t=t>>>0;const e=Object.create(Ur.prototype);return e.__wbg_ptr=t,Hw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint16_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ur.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint16_deserialize(e,r);if(i[2])throw c(i[1]);return Ur.__wrap(i[0])}safe_serialize(t){const e=s.fheint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ur.__wrap(o[0])}}const Vw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint160_free(n>>>0,1));class Mr{static __wrap(t){t=t>>>0;const e=Object.create(Mr.prototype);return e.__wbg_ptr=t,Vw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint160_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint160_deserialize(e,r);if(i[2])throw c(i[1]);return Mr.__wrap(i[0])}safe_serialize(t){const e=s.fheint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Mr.__wrap(o[0])}}const qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint168_free(n>>>0,1));class jr{static __wrap(t){t=t>>>0;const e=Object.create(jr.prototype);return e.__wbg_ptr=t,qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint168_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint168_deserialize(e,r);if(i[2])throw c(i[1]);return jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return jr.__wrap(o[0])}}const Qw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint176_free(n>>>0,1));class Gr{static __wrap(t){t=t>>>0;const e=Object.create(Gr.prototype);return e.__wbg_ptr=t,Qw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint176_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint176_deserialize(e,r);if(i[2])throw c(i[1]);return Gr.__wrap(i[0])}safe_serialize(t){const e=s.fheint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gr.__wrap(o[0])}}const Kw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint184_free(n>>>0,1));class Hr{static __wrap(t){t=t>>>0;const e=Object.create(Hr.prototype);return e.__wbg_ptr=t,Kw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint184_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint184_deserialize(e,r);if(i[2])throw c(i[1]);return Hr.__wrap(i[0])}safe_serialize(t){const e=s.fheint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Hr.__wrap(o[0])}}const Ww=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint192_free(n>>>0,1));class Vr{static __wrap(t){t=t>>>0;const e=Object.create(Vr.prototype);return e.__wbg_ptr=t,Ww.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ww.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint192_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint192_deserialize(e,r);if(i[2])throw c(i[1]);return Vr.__wrap(i[0])}safe_serialize(t){const e=s.fheint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vr.__wrap(o[0])}}const Jw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2_free(n>>>0,1));class qr{static __wrap(t){t=t>>>0;const e=Object.create(qr.prototype);return e.__wbg_ptr=t,Jw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2_deserialize(e,r);if(i[2])throw c(i[1]);return qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return qr.__wrap(o[0])}}const $w=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint200_free(n>>>0,1));class Qr{static __wrap(t){t=t>>>0;const e=Object.create(Qr.prototype);return e.__wbg_ptr=t,$w.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$w.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint200_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint200_deserialize(e,r);if(i[2])throw c(i[1]);return Qr.__wrap(i[0])}safe_serialize(t){const e=s.fheint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Qr.__wrap(o[0])}}const Yw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint2048_free(n>>>0,1));class Kr{static __wrap(t){t=t>>>0;const e=Object.create(Kr.prototype);return e.__wbg_ptr=t,Yw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint2048_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint2048_deserialize(e,r);if(i[2])throw c(i[1]);return Kr.__wrap(i[0])}safe_serialize(t){const e=s.fheint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Kr.__wrap(o[0])}}const Zw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint208_free(n>>>0,1));class Wr{static __wrap(t){t=t>>>0;const e=Object.create(Wr.prototype);return e.__wbg_ptr=t,Zw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint208_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint208_deserialize(e,r);if(i[2])throw c(i[1]);return Wr.__wrap(i[0])}safe_serialize(t){const e=s.fheint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Wr.__wrap(o[0])}}const Xw=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint216_free(n>>>0,1));class Jr{static __wrap(t){t=t>>>0;const e=Object.create(Jr.prototype);return e.__wbg_ptr=t,Xw.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xw.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint216_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint216_deserialize(e,r);if(i[2])throw c(i[1]);return Jr.__wrap(i[0])}safe_serialize(t){const e=s.fheint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Jr.__wrap(o[0])}}const td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint224_free(n>>>0,1));class $r{static __wrap(t){t=t>>>0;const e=Object.create($r.prototype);return e.__wbg_ptr=t,td.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,td.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint224_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $r.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint224_deserialize(e,r);if(i[2])throw c(i[1]);return $r.__wrap(i[0])}safe_serialize(t){const e=s.fheint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return $r.__wrap(o[0])}}const ed=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint232_free(n>>>0,1));class Yr{static __wrap(t){t=t>>>0;const e=Object.create(Yr.prototype);return e.__wbg_ptr=t,ed.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ed.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint232_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint232_deserialize(e,r);if(i[2])throw c(i[1]);return Yr.__wrap(i[0])}safe_serialize(t){const e=s.fheint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Yr.__wrap(o[0])}}const rd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint24_free(n>>>0,1));class Zr{static __wrap(t){t=t>>>0;const e=Object.create(Zr.prototype);return e.__wbg_ptr=t,rd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint24_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint24_deserialize(e,r);if(i[2])throw c(i[1]);return Zr.__wrap(i[0])}safe_serialize(t){const e=s.fheint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Zr.__wrap(o[0])}}const nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint240_free(n>>>0,1));class Xr{static __wrap(t){t=t>>>0;const e=Object.create(Xr.prototype);return e.__wbg_ptr=t,nd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,nd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint240_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xr.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint240_deserialize(e,r);if(i[2])throw c(i[1]);return Xr.__wrap(i[0])}safe_serialize(t){const e=s.fheint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Xr.__wrap(o[0])}}const id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint248_free(n>>>0,1));class tn{static __wrap(t){t=t>>>0;const e=Object.create(tn.prototype);return e.__wbg_ptr=t,id.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,id.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint248_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return tn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint248_deserialize(e,r);if(i[2])throw c(i[1]);return tn.__wrap(i[0])}safe_serialize(t){const e=s.fheint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return tn.__wrap(o[0])}}const sd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint256_free(n>>>0,1));class en{static __wrap(t){t=t>>>0;const e=Object.create(en.prototype);return e.__wbg_ptr=t,sd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint256_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return en.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint256_deserialize(e,r);if(i[2])throw c(i[1]);return en.__wrap(i[0])}safe_serialize(t){const e=s.fheint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return en.__wrap(o[0])}}const od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint32_free(n>>>0,1));class rn{static __wrap(t){t=t>>>0;const e=Object.create(rn.prototype);return e.__wbg_ptr=t,od.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,od.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint32_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return rn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint32_deserialize(e,r);if(i[2])throw c(i[1]);return rn.__wrap(i[0])}safe_serialize(t){const e=s.fheint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return rn.__wrap(o[0])}}const ad=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint4_free(n>>>0,1));class nn{static __wrap(t){t=t>>>0;const e=Object.create(nn.prototype);return e.__wbg_ptr=t,ad.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ad.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint4_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return nn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint4_deserialize(e,r);if(i[2])throw c(i[1]);return nn.__wrap(i[0])}safe_serialize(t){const e=s.fheint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return nn.__wrap(o[0])}}const cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint40_free(n>>>0,1));class sn{static __wrap(t){t=t>>>0;const e=Object.create(sn.prototype);return e.__wbg_ptr=t,cd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint40_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return sn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint40_deserialize(e,r);if(i[2])throw c(i[1]);return sn.__wrap(i[0])}safe_serialize(t){const e=s.fheint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return sn.__wrap(o[0])}}const ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint48_free(n>>>0,1));class on{static __wrap(t){t=t>>>0;const e=Object.create(on.prototype);return e.__wbg_ptr=t,ud.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ud.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint48_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return on.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint48_deserialize(e,r);if(i[2])throw c(i[1]);return on.__wrap(i[0])}safe_serialize(t){const e=s.fheint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return on.__wrap(o[0])}}const _d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint512_free(n>>>0,1));class an{static __wrap(t){t=t>>>0;const e=Object.create(an.prototype);return e.__wbg_ptr=t,_d.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_d.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint512_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return an.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint512_deserialize(e,r);if(i[2])throw c(i[1]);return an.__wrap(i[0])}safe_serialize(t){const e=s.fheint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return an.__wrap(o[0])}}const fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint56_free(n>>>0,1));class cn{static __wrap(t){t=t>>>0;const e=Object.create(cn.prototype);return e.__wbg_ptr=t,fd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint56_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return cn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint56_deserialize(e,r);if(i[2])throw c(i[1]);return cn.__wrap(i[0])}safe_serialize(t){const e=s.fheint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return cn.__wrap(o[0])}}const ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint6_free(n>>>0,1));class un{static __wrap(t){t=t>>>0;const e=Object.create(un.prototype);return e.__wbg_ptr=t,ld.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ld.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint6_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return un.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint6_deserialize(e,r);if(i[2])throw c(i[1]);return un.__wrap(i[0])}safe_serialize(t){const e=s.fheint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return un.__wrap(o[0])}}const hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint64_free(n>>>0,1));class _n{static __wrap(t){t=t>>>0;const e=Object.create(_n.prototype);return e.__wbg_ptr=t,hd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint64_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return _n.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint64_deserialize(e,r);if(i[2])throw c(i[1]);return _n.__wrap(i[0])}safe_serialize(t){const e=s.fheint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return _n.__wrap(o[0])}}const pd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint72_free(n>>>0,1));class fn{static __wrap(t){t=t>>>0;const e=Object.create(fn.prototype);return e.__wbg_ptr=t,pd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,pd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint72_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return fn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint72_deserialize(e,r);if(i[2])throw c(i[1]);return fn.__wrap(i[0])}safe_serialize(t){const e=s.fheint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return fn.__wrap(o[0])}}const wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint8_free(n>>>0,1));class ln{static __wrap(t){t=t>>>0;const e=Object.create(ln.prototype);return e.__wbg_ptr=t,wd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,wd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint8_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ln.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint8_deserialize(e,r);if(i[2])throw c(i[1]);return ln.__wrap(i[0])}safe_serialize(t){const e=s.fheint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ln.__wrap(o[0])}}const dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint80_free(n>>>0,1));class hn{static __wrap(t){t=t>>>0;const e=Object.create(hn.prototype);return e.__wbg_ptr=t,dd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,dd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint80_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return hn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint80_deserialize(e,r);if(i[2])throw c(i[1]);return hn.__wrap(i[0])}safe_serialize(t){const e=s.fheint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return hn.__wrap(o[0])}}const gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint88_free(n>>>0,1));class pn{static __wrap(t){t=t>>>0;const e=Object.create(pn.prototype);return e.__wbg_ptr=t,gd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint88_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return pn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint88_deserialize(e,r);if(i[2])throw c(i[1]);return pn.__wrap(i[0])}safe_serialize(t){const e=s.fheint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pn.__wrap(o[0])}}const yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheint96_free(n>>>0,1));class wn{static __wrap(t){t=t>>>0;const e=Object.create(wn.prototype);return e.__wbg_ptr=t,yd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheint96_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return wn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheint96_deserialize(e,r);if(i[2])throw c(i[1]);return wn.__wrap(i[0])}safe_serialize(t){const e=s.fheint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return wn.__wrap(o[0])}}const bd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint10_free(n>>>0,1));class dn{static __wrap(t){t=t>>>0;const e=Object.create(dn.prototype);return e.__wbg_ptr=t,bd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint10_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint10_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint10_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint10_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return dn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint10_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint10_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint10_deserialize(e,r);if(i[2])throw c(i[1]);return dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint10_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint10_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return dn.__wrap(o[0])}}const md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint1024_free(n>>>0,1));class gn{static __wrap(t){t=t>>>0;const e=Object.create(gn.prototype);return e.__wbg_ptr=t,md.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,md.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint1024_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint1024_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint1024_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint1024_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return gn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint1024_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint1024_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint1024_deserialize(e,r);if(i[2])throw c(i[1]);return gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint1024_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint1024_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return gn.__wrap(o[0])}}const Ad=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint104_free(n>>>0,1));class yn{static __wrap(t){t=t>>>0;const e=Object.create(yn.prototype);return e.__wbg_ptr=t,Ad.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ad.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint104_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint104_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint104_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint104_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return yn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint104_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint104_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint104_deserialize(e,r);if(i[2])throw c(i[1]);return yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint104_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint104_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return yn.__wrap(o[0])}}const Ed=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint112_free(n>>>0,1));class bn{static __wrap(t){t=t>>>0;const e=Object.create(bn.prototype);return e.__wbg_ptr=t,Ed.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ed.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint112_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint112_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint112_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint112_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return bn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint112_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint112_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint112_deserialize(e,r);if(i[2])throw c(i[1]);return bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint112_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint112_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return bn.__wrap(o[0])}}const vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint12_free(n>>>0,1));class mn{static __wrap(t){t=t>>>0;const e=Object.create(mn.prototype);return e.__wbg_ptr=t,vd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint12_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint12_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint12_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint12_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return mn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint12_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint12_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint12_deserialize(e,r);if(i[2])throw c(i[1]);return mn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint12_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint12_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return mn.__wrap(o[0])}}const xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint120_free(n>>>0,1));class An{static __wrap(t){t=t>>>0;const e=Object.create(An.prototype);return e.__wbg_ptr=t,xd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint120_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint120_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint120_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint120_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return An.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint120_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint120_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint120_deserialize(e,r);if(i[2])throw c(i[1]);return An.__wrap(i[0])}safe_serialize(t){const e=s.fheuint120_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint120_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return An.__wrap(o[0])}}const Rd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint128_free(n>>>0,1));class En{static __wrap(t){t=t>>>0;const e=Object.create(En.prototype);return e.__wbg_ptr=t,Rd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Rd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint128_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint128_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint128_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint128_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return En.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint128_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint128_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint128_deserialize(e,r);if(i[2])throw c(i[1]);return En.__wrap(i[0])}safe_serialize(t){const e=s.fheuint128_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint128_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return En.__wrap(o[0])}}const zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint136_free(n>>>0,1));class vn{static __wrap(t){t=t>>>0;const e=Object.create(vn.prototype);return e.__wbg_ptr=t,zd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,zd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint136_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint136_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint136_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint136_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return vn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint136_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint136_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint136_deserialize(e,r);if(i[2])throw c(i[1]);return vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint136_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint136_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return vn.__wrap(o[0])}}const Bd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint14_free(n>>>0,1));class xn{static __wrap(t){t=t>>>0;const e=Object.create(xn.prototype);return e.__wbg_ptr=t,Bd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Bd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint14_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint14_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint14_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint14_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return xn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint14_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint14_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint14_deserialize(e,r);if(i[2])throw c(i[1]);return xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint14_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint14_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return xn.__wrap(o[0])}}const Sd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint144_free(n>>>0,1));class Rn{static __wrap(t){t=t>>>0;const e=Object.create(Rn.prototype);return e.__wbg_ptr=t,Sd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Sd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint144_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint144_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint144_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint144_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Rn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint144_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint144_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint144_deserialize(e,r);if(i[2])throw c(i[1]);return Rn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint144_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint144_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Rn.__wrap(o[0])}}const Pd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint152_free(n>>>0,1));class zn{static __wrap(t){t=t>>>0;const e=Object.create(zn.prototype);return e.__wbg_ptr=t,Pd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Pd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint152_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint152_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint152_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint152_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return zn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint152_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint152_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint152_deserialize(e,r);if(i[2])throw c(i[1]);return zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint152_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint152_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return zn.__wrap(o[0])}}const kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint16_free(n>>>0,1));class Bn{static __wrap(t){t=t>>>0;const e=Object.create(Bn.prototype);return e.__wbg_ptr=t,kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint16_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint16_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint16_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint16_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Bn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint16_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint16_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint16_deserialize(e,r);if(i[2])throw c(i[1]);return Bn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint16_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint16_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Bn.__wrap(o[0])}}const Fd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint160_free(n>>>0,1));class Sn{static __wrap(t){t=t>>>0;const e=Object.create(Sn.prototype);return e.__wbg_ptr=t,Fd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Fd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint160_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint160_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint160_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint160_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Sn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint160_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint160_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint160_deserialize(e,r);if(i[2])throw c(i[1]);return Sn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint160_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint160_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Sn.__wrap(o[0])}}const Id=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint168_free(n>>>0,1));class Pn{static __wrap(t){t=t>>>0;const e=Object.create(Pn.prototype);return e.__wbg_ptr=t,Id.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Id.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint168_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint168_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint168_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint168_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Pn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint168_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint168_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint168_deserialize(e,r);if(i[2])throw c(i[1]);return Pn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint168_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint168_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Pn.__wrap(o[0])}}const Od=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint176_free(n>>>0,1));class kn{static __wrap(t){t=t>>>0;const e=Object.create(kn.prototype);return e.__wbg_ptr=t,Od.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Od.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint176_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint176_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint176_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint176_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return kn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint176_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint176_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint176_deserialize(e,r);if(i[2])throw c(i[1]);return kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint176_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint176_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return kn.__wrap(o[0])}}const Td=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint184_free(n>>>0,1));class Fn{static __wrap(t){t=t>>>0;const e=Object.create(Fn.prototype);return e.__wbg_ptr=t,Td.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Td.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint184_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint184_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint184_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint184_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Fn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint184_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint184_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint184_deserialize(e,r);if(i[2])throw c(i[1]);return Fn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint184_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint184_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Fn.__wrap(o[0])}}const Cd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint192_free(n>>>0,1));class In{static __wrap(t){t=t>>>0;const e=Object.create(In.prototype);return e.__wbg_ptr=t,Cd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Cd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint192_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint192_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint192_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint192_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return In.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint192_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint192_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint192_deserialize(e,r);if(i[2])throw c(i[1]);return In.__wrap(i[0])}safe_serialize(t){const e=s.fheuint192_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint192_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return In.__wrap(o[0])}}const Nd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2_free(n>>>0,1));class On{static __wrap(t){t=t>>>0;const e=Object.create(On.prototype);return e.__wbg_ptr=t,Nd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Nd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint2_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint2_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint2_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return On.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint2_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint2_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2_deserialize(e,r);if(i[2])throw c(i[1]);return On.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return On.__wrap(o[0])}}const Ld=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint200_free(n>>>0,1));class Tn{static __wrap(t){t=t>>>0;const e=Object.create(Tn.prototype);return e.__wbg_ptr=t,Ld.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ld.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint200_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint200_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint200_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint200_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Tn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint200_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint200_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint200_deserialize(e,r);if(i[2])throw c(i[1]);return Tn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint200_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint200_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Tn.__wrap(o[0])}}const Dd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint2048_free(n>>>0,1));class Cn{static __wrap(t){t=t>>>0;const e=Object.create(Cn.prototype);return e.__wbg_ptr=t,Dd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Dd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint2048_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint2048_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint2048_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint2048_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Cn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint2048_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint2048_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint2048_deserialize(e,r);if(i[2])throw c(i[1]);return Cn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint2048_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint2048_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Cn.__wrap(o[0])}}const Ud=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint208_free(n>>>0,1));class Nn{static __wrap(t){t=t>>>0;const e=Object.create(Nn.prototype);return e.__wbg_ptr=t,Ud.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ud.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint208_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint208_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint208_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint208_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Nn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint208_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint208_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint208_deserialize(e,r);if(i[2])throw c(i[1]);return Nn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint208_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint208_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Nn.__wrap(o[0])}}const Md=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint216_free(n>>>0,1));class Ln{static __wrap(t){t=t>>>0;const e=Object.create(Ln.prototype);return e.__wbg_ptr=t,Md.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Md.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint216_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint216_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ln.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint216_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ln.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint216_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Ln.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint216_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint216_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint216_deserialize(e,r);if(i[2])throw c(i[1]);return Ln.__wrap(i[0])}safe_serialize(t){const e=s.fheuint216_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint216_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Ln.__wrap(o[0])}}const jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint224_free(n>>>0,1));class Dn{static __wrap(t){t=t>>>0;const e=Object.create(Dn.prototype);return e.__wbg_ptr=t,jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint224_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint224_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint224_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint224_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Dn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint224_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint224_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint224_deserialize(e,r);if(i[2])throw c(i[1]);return Dn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint224_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint224_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Dn.__wrap(o[0])}}const Gd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint232_free(n>>>0,1));class Un{static __wrap(t){t=t>>>0;const e=Object.create(Un.prototype);return e.__wbg_ptr=t,Gd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Gd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint232_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint232_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Un.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint232_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Un.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint232_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Un.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint232_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint232_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint232_deserialize(e,r);if(i[2])throw c(i[1]);return Un.__wrap(i[0])}safe_serialize(t){const e=s.fheuint232_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint232_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Un.__wrap(o[0])}}const Hd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint24_free(n>>>0,1));class Mn{static __wrap(t){t=t>>>0;const e=Object.create(Mn.prototype);return e.__wbg_ptr=t,Hd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Hd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint24_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint24_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint24_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint24_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Mn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint24_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint24_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint24_deserialize(e,r);if(i[2])throw c(i[1]);return Mn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint24_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint24_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Mn.__wrap(o[0])}}const Vd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint240_free(n>>>0,1));class jn{static __wrap(t){t=t>>>0;const e=Object.create(jn.prototype);return e.__wbg_ptr=t,Vd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Vd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint240_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint240_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint240_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint240_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return jn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint240_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint240_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint240_deserialize(e,r);if(i[2])throw c(i[1]);return jn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint240_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint240_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return jn.__wrap(o[0])}}const qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint248_free(n>>>0,1));class Gn{static __wrap(t){t=t>>>0;const e=Object.create(Gn.prototype);return e.__wbg_ptr=t,qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint248_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint248_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint248_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint248_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Gn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint248_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint248_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint248_deserialize(e,r);if(i[2])throw c(i[1]);return Gn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint248_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint248_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Gn.__wrap(o[0])}}const Qd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint256_free(n>>>0,1));class Hn{static __wrap(t){t=t>>>0;const e=Object.create(Hn.prototype);return e.__wbg_ptr=t,Qd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Qd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint256_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint256_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint256_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint256_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Hn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint256_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint256_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint256_deserialize(e,r);if(i[2])throw c(i[1]);return Hn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint256_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint256_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Hn.__wrap(o[0])}}const Kd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint32_free(n>>>0,1));class Vn{static __wrap(t){t=t>>>0;const e=Object.create(Vn.prototype);return e.__wbg_ptr=t,Kd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Kd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint32_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint32_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint32_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint32_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Vn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint32_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]>>>0}serialize(){const t=s.fheuint32_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint32_deserialize(e,r);if(i[2])throw c(i[1]);return Vn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint32_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint32_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Vn.__wrap(o[0])}}const Wd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint4_free(n>>>0,1));class qn{static __wrap(t){t=t>>>0;const e=Object.create(qn.prototype);return e.__wbg_ptr=t,Wd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Wd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint4_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint4_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint4_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint4_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return qn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint4_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint4_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint4_deserialize(e,r);if(i[2])throw c(i[1]);return qn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint4_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint4_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return qn.__wrap(o[0])}}const Jd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint40_free(n>>>0,1));class Qn{static __wrap(t){t=t>>>0;const e=Object.create(Qn.prototype);return e.__wbg_ptr=t,Jd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Jd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint40_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint40_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint40_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint40_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Qn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint40_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint40_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint40_deserialize(e,r);if(i[2])throw c(i[1]);return Qn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint40_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint40_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Qn.__wrap(o[0])}}const $d=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint48_free(n>>>0,1));class Kn{static __wrap(t){t=t>>>0;const e=Object.create(Kn.prototype);return e.__wbg_ptr=t,$d.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,$d.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint48_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint48_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint48_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint48_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Kn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint48_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint48_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint48_deserialize(e,r);if(i[2])throw c(i[1]);return Kn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint48_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint48_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Kn.__wrap(o[0])}}const Yd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint512_free(n>>>0,1));class Wn{static __wrap(t){t=t>>>0;const e=Object.create(Wn.prototype);return e.__wbg_ptr=t,Yd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Yd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint512_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint512_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint512_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint512_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Wn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint512_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint512_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint512_deserialize(e,r);if(i[2])throw c(i[1]);return Wn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint512_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint512_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Wn.__wrap(o[0])}}const Zd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint56_free(n>>>0,1));class Jn{static __wrap(t){t=t>>>0;const e=Object.create(Jn.prototype);return e.__wbg_ptr=t,Zd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Zd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint56_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint56_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint56_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint56_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Jn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint56_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint56_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint56_deserialize(e,r);if(i[2])throw c(i[1]);return Jn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint56_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint56_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Jn.__wrap(o[0])}}const Xd=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint6_free(n>>>0,1));class $n{static __wrap(t){t=t>>>0;const e=Object.create($n.prototype);return e.__wbg_ptr=t,Xd.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Xd.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint6_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint6_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $n.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint6_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $n.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint6_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return $n.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint6_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint6_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint6_deserialize(e,r);if(i[2])throw c(i[1]);return $n.__wrap(i[0])}safe_serialize(t){const e=s.fheuint6_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint6_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return $n.__wrap(o[0])}}const tg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint64_free(n>>>0,1));class Yn{static __wrap(t){t=t>>>0;const e=Object.create(Yn.prototype);return e.__wbg_ptr=t,tg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,tg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint64_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint64_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint64_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint64_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Yn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint64_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return BigInt.asUintN(64,e[0])}serialize(){const t=s.fheuint64_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint64_deserialize(e,r);if(i[2])throw c(i[1]);return Yn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint64_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint64_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Yn.__wrap(o[0])}}const eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint72_free(n>>>0,1));class Zn{static __wrap(t){t=t>>>0;const e=Object.create(Zn.prototype);return e.__wbg_ptr=t,eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,eg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint72_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint72_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint72_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint72_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Zn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint72_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint72_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint72_deserialize(e,r);if(i[2])throw c(i[1]);return Zn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint72_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint72_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Zn.__wrap(o[0])}}const rg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint8_free(n>>>0,1));class Xn{static __wrap(t){t=t>>>0;const e=Object.create(Xn.prototype);return e.__wbg_ptr=t,rg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,rg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint8_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint8_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xn.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint8_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xn.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint8_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return Xn.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint8_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return e[0]}serialize(){const t=s.fheuint8_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint8_deserialize(e,r);if(i[2])throw c(i[1]);return Xn.__wrap(i[0])}safe_serialize(t){const e=s.fheuint8_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint8_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return Xn.__wrap(o[0])}}const ng=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint80_free(n>>>0,1));class ti{static __wrap(t){t=t>>>0;const e=Object.create(ti.prototype);return e.__wbg_ptr=t,ng.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ng.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint80_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint80_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ti.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint80_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ti.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint80_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ti.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint80_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint80_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint80_deserialize(e,r);if(i[2])throw c(i[1]);return ti.__wrap(i[0])}safe_serialize(t){const e=s.fheuint80_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint80_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ti.__wrap(o[0])}}const ig=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint88_free(n>>>0,1));class ei{static __wrap(t){t=t>>>0;const e=Object.create(ei.prototype);return e.__wbg_ptr=t,ig.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ig.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint88_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint88_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ei.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint88_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ei.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint88_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ei.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint88_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint88_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint88_deserialize(e,r);if(i[2])throw c(i[1]);return ei.__wrap(i[0])}safe_serialize(t){const e=s.fheuint88_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint88_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ei.__wrap(o[0])}}const sg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_fheuint96_free(n>>>0,1));class ri{static __wrap(t){t=t>>>0;const e=Object.create(ri.prototype);return e.__wbg_ptr=t,sg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,sg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_fheuint96_free(t,0)}static encrypt_with_client_key(t,e){E(e,K);const r=s.fheuint96_encrypt_with_client_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ri.__wrap(r[0])}static encrypt_with_public_key(t,e){E(e,ht);const r=s.fheuint96_encrypt_with_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ri.__wrap(r[0])}static encrypt_with_compressed_public_key(t,e){E(e,pt);const r=s.fheuint96_encrypt_with_compressed_public_key(t,e.__wbg_ptr);if(r[2])throw c(r[1]);return ri.__wrap(r[0])}decrypt(t){E(t,K);const e=s.fheuint96_decrypt(this.__wbg_ptr,t.__wbg_ptr);if(e[2])throw c(e[1]);return c(e[0])}serialize(){const t=s.fheuint96_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.fheuint96_deserialize(e,r);if(i[2])throw c(i[1]);return ri.__wrap(i[0])}safe_serialize(t){const e=s.fheuint96_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.fheuint96_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ri.__wrap(o[0])}}const og=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_provencompactciphertextlist_free(n>>>0,1));class ds{static __wrap(t){t=t>>>0;const e=Object.create(ds.prototype);return e.__wbg_ptr=t,og.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,og.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_provencompactciphertextlist_free(t,0)}static builder(t){E(t,er);const e=s.provencompactciphertextlist_builder(t.__wbg_ptr);if(e[2])throw c(e[1]);return Js.__wrap(e[0])}len(){return s.compactciphertextlistexpander_len(this.__wbg_ptr)>>>0}is_empty(){return s.compactciphertextlistexpander_is_empty(this.__wbg_ptr)!==0}get_kind_of(t){const e=s.provencompactciphertextlist_get_kind_of(this.__wbg_ptr,t);return e===84?void 0:e}verify_and_expand(t,e,r){E(t,tr),E(e,er);const i=q(r,s.__wbindgen_malloc),o=j,a=s.provencompactciphertextlist_verify_and_expand(this.__wbg_ptr,t.__wbg_ptr,e.__wbg_ptr,i,o);if(a[2])throw c(a[1]);return ws.__wrap(a[0])}expand_without_verification(){const t=s.provencompactciphertextlist_expand_without_verification(this.__wbg_ptr);if(t[2])throw c(t[1]);return ws.__wrap(t[0])}serialize(){const t=s.provencompactciphertextlist_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.provencompactciphertextlist_deserialize(e,r);if(i[2])throw c(i[1]);return ds.__wrap(i[0])}safe_serialize(t){const e=s.provencompactciphertextlist_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.provencompactciphertextlist_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ds.__wrap(o[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortint_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintclientkey_free(n>>>0,1));const qu=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintcompactpublickeyencryptionparameters_free(n>>>0,1));class $s{static __wrap(t){t=t>>>0;const e=Object.create($s.prototype);return e.__wbg_ptr=t,qu.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,qu.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintcompactpublickeyencryptionparameters_free(t,0)}constructor(t){const e=s.shortintcompactpublickeyencryptionparameters_new(t);return this.__wbg_ptr=e>>>0,qu.register(this,this.__wbg_ptr,this),this}static new_parameters(t,e,r,i,o,a,u,_){E(e,ta);const l=s.shortintcompactpublickeyencryptionparameters_new_parameters(t,e.__wbg_ptr,r,i,o,a,u,_);if(l[2])throw c(l[1]);return $s.__wrap(l[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedciphertext_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedpublickey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintcompressedserverkey_free(n>>>0,1));const ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_shortintnoisedistribution_free(n>>>0,1));class ta{static __wrap(t){t=t>>>0;const e=Object.create(ta.prototype);return e.__wbg_ptr=t,ag.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ag.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_shortintnoisedistribution_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintparameters_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_shortintpublickey_free(n>>>0,1));const cg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheclientkey_free(n>>>0,1));class K{static __wrap(t){t=t>>>0;const e=Object.create(K.prototype);return e.__wbg_ptr=t,cg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,cg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheclientkey_free(t,0)}static generate(t){E(t,gs);const e=s.tfheclientkey_generate(t.__wbg_ptr);if(e[2])throw c(e[1]);return K.__wrap(e[0])}static generate_with_seed(t,e){E(t,gs);const r=s.tfheclientkey_generate_with_seed(t.__wbg_ptr,e);if(r[2])throw c(r[1]);return K.__wrap(r[0])}serialize(){const t=s.tfheclientkey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfheclientkey_deserialize(e,r);if(i[2])throw c(i[1]);return K.__wrap(i[0])}safe_serialize(t){const e=s.tfheclientkey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfheclientkey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return K.__wrap(o[0])}}const ug=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompactpublickey_free(n>>>0,1));class er{static __wrap(t){t=t>>>0;const e=Object.create(er.prototype);return e.__wbg_ptr=t,ug.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,ug.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompactpublickey_free(t,0)}static new(t){E(t,K);const e=s.tfhecompactpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return er.__wrap(e[0])}serialize(){const t=s.tfhecompactpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompactpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return er.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompactpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompactpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return er.__wrap(o[0])}static safe_deserialize_conformant(t,e,r){const i=q(t,s.__wbindgen_malloc),o=j;E(r,$s);const a=s.tfhecompactpublickey_safe_deserialize_conformant(i,o,e,r.__wbg_ptr);if(a[2])throw c(a[1]);return er.__wrap(a[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedcompactpublickey_free(n>>>0,1));const _g=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhecompressedpublickey_free(n>>>0,1));class pt{static __wrap(t){t=t>>>0;const e=Object.create(pt.prototype);return e.__wbg_ptr=t,_g.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,_g.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhecompressedpublickey_free(t,0)}static new(t){E(t,K);const e=s.tfhecompressedpublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return pt.__wrap(e[0])}decompress(){const t=s.tfhecompressedpublickey_decompress(this.__wbg_ptr);if(t[2])throw c(t[1]);return ht.__wrap(t[0])}serialize(){const t=s.tfhecompressedpublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhecompressedpublickey_deserialize(e,r);if(i[2])throw c(i[1]);return pt.__wrap(i[0])}safe_serialize(t){const e=s.tfhecompressedpublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhecompressedpublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return pt.__wrap(o[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhecompressedserverkey_free(n>>>0,1));const fg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfheconfig_free(n>>>0,1));class gs{static __wrap(t){t=t>>>0;const e=Object.create(gs.prototype);return e.__wbg_ptr=t,fg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,fg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfheconfig_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheconfigbuilder_free(n>>>0,1));const lg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_tfhepublickey_free(n>>>0,1));class ht{static __wrap(t){t=t>>>0;const e=Object.create(ht.prototype);return e.__wbg_ptr=t,lg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,lg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_tfhepublickey_free(t,0)}static new(t){E(t,K);const e=s.tfhepublickey_new(t.__wbg_ptr);if(e[2])throw c(e[1]);return ht.__wrap(e[0])}serialize(){const t=s.tfhepublickey_serialize(this.__wbg_ptr);if(t[3])throw c(t[2]);var e=Q(t[0],t[1]).slice();return s.__wbindgen_free(t[0],t[1]*1,1),e}static deserialize(t){const e=q(t,s.__wbindgen_malloc),r=j,i=s.tfhepublickey_deserialize(e,r);if(i[2])throw c(i[1]);return ht.__wrap(i[0])}safe_serialize(t){const e=s.tfhepublickey_safe_serialize(this.__wbg_ptr,t);if(e[3])throw c(e[2]);var r=Q(e[0],e[1]).slice();return s.__wbindgen_free(e[0],e[1]*1,1),r}static safe_deserialize(t,e){const r=q(t,s.__wbindgen_malloc),i=j,o=s.tfhepublickey_safe_deserialize(r,i,e);if(o[2])throw c(o[1]);return ht.__wrap(o[0])}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfheserverkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>s.__wbg_tfhe_free(n>>>0,1));const hg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>s.__wbg_wbg_rayon_poolbuilder_free(n>>>0,1));class ea{static __wrap(t){t=t>>>0;const e=Object.create(ea.prototype);return e.__wbg_ptr=t,hg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,hg.unregister(this),t}free(){const t=this.__destroy_into_raw();s.__wbg_wbg_rayon_poolbuilder_free(t,0)}numThreads(){return s.wbg_rayon_poolbuilder_numThreads(this.__wbg_ptr)>>>0}receiver(){return s.wbg_rayon_poolbuilder_receiver(this.__wbg_ptr)>>>0}build(){s.wbg_rayon_poolbuilder_build(this.__wbg_ptr)}}async function B2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function S2(){const n={};return n.wbg={},n.wbg.__wbg_BigInt_470dd987b8190f8e=function(t){return BigInt(t)},n.wbg.__wbg_BigInt_ddea6d2f55558acb=function(){return hs(function(t){return BigInt(t)},arguments)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return hs(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return hs(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_574e78ad8b13b65f=function(t){return t.crypto},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Ks(t,e))}finally{s.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_b8f5dbd5f3995a9e=function(){return hs(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_getTime_46267b1c24877e30=function(t){return t.getTime()},n.wbg.__wbg_instanceof_Window_def73ea0955fc569=function(t){let e;try{e=t instanceof Window}catch{e=!1}return e},n.wbg.__wbg_msCrypto_a61aeb35a24c1329=function(t){return t.msCrypto},n.wbg.__wbg_new0_f788a2397c7ca929=function(){return new Date},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(Ks(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_node_905d3e251edff8a2=function(t){return t.node},n.wbg.__wbg_process_dc0fbacc7c1c06f7=function(t){return t.process},n.wbg.__wbg_randomFillSync_ac0988aba3254290=function(){return hs(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_60cc747a6bc5215a=function(){return hs(function(){return module.require},arguments)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=Xo(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;fr().setInt32(t+4*1,o,!0),fr().setInt32(t+4*0,i,!0)},n.wbg.__wbg_startWorkers_2ca11761e08ff5d5=function(t,e,r){return x2(t,e,ea.__wrap(r))},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof Zo>"u"?null:Zo;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return Ci(t)?0:qs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return Ci(t)?0:qs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_toString_2f76f493957b63da=function(t,e,r){const i=e.toString(r),o=Xo(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;fr().setInt32(t+4*1,a,!0),fr().setInt32(t+4*0,o,!0)},n.wbg.__wbg_toString_c813bbd34d063839=function(t){return t.toString()},n.wbg.__wbg_versions_c01dfd4722a88165=function(t){return t.versions},n.wbg.__wbindgen_bigint_from_i128=function(t,e){return t<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_i64=function(t){return t},n.wbg.__wbindgen_bigint_from_u128=function(t,e){return BigInt.asUintN(64,t)<<BigInt(64)|BigInt.asUintN(64,e)},n.wbg.__wbindgen_bigint_from_u64=function(t){return BigInt.asUintN(64,t)},n.wbg.__wbindgen_bigint_get_as_i64=function(t,e){const r=e,i=typeof r=="bigint"?r:void 0;fr().setBigInt64(t+8*1,Ci(i)?BigInt(0):i,!0),fr().setInt32(t+4*0,!Ci(i),!0)},n.wbg.__wbindgen_bit_and=function(t,e){return t&e},n.wbg.__wbindgen_bit_or=function(t,e){return t|e},n.wbg.__wbindgen_debug_string=function(t,e){const r=Gu(e),i=Xo(r,s.__wbindgen_malloc,s.__wbindgen_realloc),o=j;fr().setInt32(t+4*1,o,!0),fr().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Ks(t,e))},n.wbg.__wbindgen_init_externref_table=function(){const t=s.__wbindgen_export_2,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_eq=function(t,e){return t===e},n.wbg.__wbindgen_lt=function(t,e){return t<e},n.wbg.__wbindgen_memory=function(){return s.memory},n.wbg.__wbindgen_module=function(){return Ys.__wbindgen_wasm_module},n.wbg.__wbindgen_neg=function(t){return-t},n.wbg.__wbindgen_number_new=function(t){return t},n.wbg.__wbindgen_shl=function(t,e){return t<<e},n.wbg.__wbindgen_shr=function(t,e){return t>>e},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=Ci(i)?0:Xo(i,s.__wbindgen_malloc,s.__wbindgen_realloc),a=j;fr().setInt32(t+4*1,a,!0),fr().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Ks(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Ks(t,e))},n}function P2(n,t){n.wbg.memory=t||new WebAssembly.Memory({initial:20,maximum:16384,shared:!0})}function k2(n,t,e){if(s=n.exports,Ys.__wbindgen_wasm_module=t,Ws=null,Qs=null,typeof e<"u"&&(typeof e!="number"||e===0||e%65536!==0))throw"invalid stack size";return s.__wbindgen_start(e),s}async function Ys(n,t){if(s!==void 0)return s;let e;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n,memory:t,thread_stack_size:e}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/tfhe_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const r=S2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n)),P2(r,t);const{instance:i,module:o}=await B2(await n,r);return k2(i,o,e)}var F2=Object.freeze({__proto__:null,CompactCiphertextList:hi,CompactCiphertextListBuilder:Js,CompactCiphertextListExpander:ws,CompactPkeCrs:tr,FheBool:Br,FheInt10:Sr,FheInt1024:Pr,FheInt104:kr,FheInt112:Fr,FheInt12:Ir,FheInt120:Or,FheInt128:Tr,FheInt136:Cr,FheInt14:Nr,FheInt144:Lr,FheInt152:Dr,FheInt16:Ur,FheInt160:Mr,FheInt168:jr,FheInt176:Gr,FheInt184:Hr,FheInt192:Vr,FheInt2:qr,FheInt200:Qr,FheInt2048:Kr,FheInt208:Wr,FheInt216:Jr,FheInt224:$r,FheInt232:Yr,FheInt24:Zr,FheInt240:Xr,FheInt248:tn,FheInt256:en,FheInt32:rn,FheInt4:nn,FheInt40:sn,FheInt48:on,FheInt512:an,FheInt56:cn,FheInt6:un,FheInt64:_n,FheInt72:fn,FheInt8:ln,FheInt80:hn,FheInt88:pn,FheInt96:wn,FheUint10:dn,FheUint1024:gn,FheUint104:yn,FheUint112:bn,FheUint12:mn,FheUint120:An,FheUint128:En,FheUint136:vn,FheUint14:xn,FheUint144:Rn,FheUint152:zn,FheUint16:Bn,FheUint160:Sn,FheUint168:Pn,FheUint176:kn,FheUint184:Fn,FheUint192:In,FheUint2:On,FheUint200:Tn,FheUint2048:Cn,FheUint208:Nn,FheUint216:Ln,FheUint224:Dn,FheUint232:Un,FheUint24:Mn,FheUint240:jn,FheUint248:Gn,FheUint256:Hn,FheUint32:Vn,FheUint4:qn,FheUint40:Qn,FheUint48:Kn,FheUint512:Wn,FheUint56:Jn,FheUint6:$n,FheUint64:Yn,FheUint72:Zn,FheUint8:Xn,FheUint80:ti,FheUint88:ei,FheUint96:ri,ProvenCompactCiphertextList:ds,ShortintCompactPublicKeyEncryptionParameters:$s,ShortintNoiseDistribution:ta,TfheClientKey:K,TfheCompactPublicKey:er,TfheCompressedPublicKey:pt,TfheConfig:gs,TfhePublicKey:ht,ZkComputeLoad:zw,default:Ys,initThreadPool:Vu,init_panic_hook:Hu,wbg_rayon_PoolBuilder:ea,wbg_rayon_start_worker:z2});let rt,ee=0,Zs=null;function ys(){return(Zs===null||Zs.byteLength===0)&&(Zs=new Uint8Array(rt.memory.buffer)),Zs}const ra=typeof TextEncoder<"u"?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},I2=typeof ra.encodeInto=="function"?function(n,t){return ra.encodeInto(n,t)}:function(n,t){const e=ra.encode(n);return t.set(e),{read:n.length,written:e.length}};function Ni(n,t,e){if(e===void 0){const u=ra.encode(n),_=t(u.length,1)>>>0;return ys().subarray(_,_+u.length).set(u),ee=u.length,_}let r=n.length,i=t(r,1)>>>0;const o=ys();let a=0;for(;a<r;a++){const u=n.charCodeAt(a);if(u>127)break;o[i+a]=u}if(a!==r){a!==0&&(n=n.slice(a)),i=e(i,r,r=a+n.length*3,1)>>>0;const u=ys().subarray(i+a,i+r),_=I2(n,u);a+=_.written,i=e(i,r,a,1)>>>0}return ee=a,i}let Li=null;function He(){return(Li===null||Li.buffer.detached===!0||Li.buffer.detached===void 0&&Li.buffer!==rt.memory.buffer)&&(Li=new DataView(rt.memory.buffer)),Li}function bs(n){const t=rt.__externref_table_alloc();return rt.__wbindgen_export_4.set(t,n),t}function Di(n,t){try{return n.apply(this,t)}catch(e){const r=bs(e);rt.__wbindgen_exn_store(r)}}const pg=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&pg.decode();function Xs(n,t){return n=n>>>0,pg.decode(ys().subarray(n,n+t))}function pi(n){return n==null}function Qu(n){const t=typeof n;if(t=="number"||t=="boolean"||n==null)return`${n}`;if(t=="string")return`"${n}"`;if(t=="symbol"){const i=n.description;return i==null?"Symbol":`Symbol(${i})`}if(t=="function"){const i=n.name;return typeof i=="string"&&i.length>0?`Function(${i})`:"Function"}if(Array.isArray(n)){const i=n.length;let o="[";i>0&&(o+=Qu(n[0]));for(let a=1;a<i;a++)o+=", "+Qu(n[a]);return o+="]",o}const e=/\[object ([^\]]+)\]/.exec(toString.call(n));let r;if(e&&e.length>1)r=e[1];else return toString.call(n);if(r=="Object")try{return"Object("+JSON.stringify(n)+")"}catch{return"Object"}return n instanceof Error?`${n.name}: ${n.message}
|
|
22
|
+
${n.stack}`:r}function Ui(n,t){if(!(n instanceof t))throw new Error(`expected instance of ${t.name}`)}function rr(n,t){return n=n>>>0,ys().subarray(n/1,n/1+t)}function nr(n,t){const e=t(n.length*1,1)>>>0;return ys().set(n,e/1),ee=n.length,e}function Mi(n){const t=rt.__wbindgen_export_4.get(n);return rt.__externref_table_dealloc(n),t}function O2(n,t){const e=Ni(t,rt.__wbindgen_malloc,rt.__wbindgen_realloc),r=ee,i=rt.new_server_id_addr(n,e,r);if(i[2])throw Mi(i[1]);return As.__wrap(i[0])}function wg(n,t){const e=t(n.length*4,4)>>>0;for(let r=0;r<n.length;r++){const i=bs(n[r]);He().setUint32(e+4*r,i,!0)}return ee=n.length,e}function T2(n,t,e){const r=wg(n,rt.__wbindgen_malloc),i=ee,o=Ni(t,rt.__wbindgen_malloc,rt.__wbindgen_realloc),a=ee,u=Ni(e,rt.__wbindgen_malloc,rt.__wbindgen_realloc),_=ee,l=rt.new_client(r,i,o,a,u,_);if(l[2])throw Mi(l[1]);return na.__wrap(l[0])}function dg(n,t){n=n>>>0;const e=He(),r=[];for(let i=n;i<n+4*t;i+=4)r.push(rt.__wbindgen_export_4.get(e.getUint32(i,!0)));return rt.__externref_drop_slice(n,t),r}function C2(){const n=rt.ml_kem_pke_keygen();return ji.__wrap(n)}function N2(n){Ui(n,ji);const t=rt.ml_kem_pke_get_pk(n.__wbg_ptr);return ms.__wrap(t)}function L2(n){Ui(n,ms);const t=rt.ml_kem_pke_pk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}function D2(n){Ui(n,ji);const t=rt.ml_kem_pke_sk_to_u8vec(n.__wbg_ptr);if(t[3])throw Mi(t[2]);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}function U2(n){const t=nr(n,rt.__wbindgen_malloc),e=ee,r=rt.u8vec_to_ml_kem_pke_pk(t,e);if(r[2])throw Mi(r[1]);return ms.__wrap(r[0])}function M2(n){const t=nr(n,rt.__wbindgen_malloc),e=ee,r=rt.u8vec_to_ml_kem_pke_sk(t,e);if(r[2])throw Mi(r[1]);return ji.__wrap(r[0])}function j2(n,t,e,r,i,o,a){Ui(n,na),Ui(i,ms),Ui(o,ji);const u=rt.process_user_decryption_resp_from_js(n.__wbg_ptr,t,e,r,i.__wbg_ptr,o.__wbg_ptr,a);if(u[3])throw Mi(u[2]);var _=dg(u[0],u[1]).slice();return rt.__wbindgen_free(u[0],u[1]*4,4),_}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_ciphertexthandle_free(n>>>0,1));const gg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_client_free(n>>>0,1));class na{static __wrap(t){t=t>>>0;const e=Object.create(na.prototype);return e.__wbg_ptr=t,gg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,gg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_client_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_cryptoboxct_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_eip712domainmsg_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_parseduserdecryptionrequest_free(n>>>0,1));const yg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_privateenckey_free(n>>>0,1));class ji{static __wrap(t){t=t>>>0;const e=Object.create(ji.prototype);return e.__wbg_ptr=t,yg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,yg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_privateenckey_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_privatesigkey_free(n>>>0,1));const bg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_publicenckey_free(n>>>0,1));class ms{static __wrap(t){t=t>>>0;const e=Object.create(ms.prototype);return e.__wbg_ptr=t,bg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,bg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_publicenckey_free(t,0)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_publicsigkey_free(n>>>0,1)),typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_requestid_free(n>>>0,1));const mg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_serveridaddr_free(n>>>0,1));class As{static __wrap(t){t=t>>>0;const e=Object.create(As.prototype);return e.__wbg_ptr=t,mg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof As?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,mg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_serveridaddr_free(t,0)}}const Ag=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_typedciphertext_free(n>>>0,1));class to{static __wrap(t){t=t>>>0;const e=Object.create(to.prototype);return e.__wbg_ptr=t,Ag.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof to?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Ag.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_typedciphertext_free(t,0)}get ciphertext(){const t=rt.__wbg_get_typedciphertext_ciphertext(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set ciphertext(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return rt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){rt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get external_handle(){const t=rt.__wbg_get_typedciphertext_external_handle(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get ciphertext_format(){return rt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)}set ciphertext_format(t){rt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}const Eg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_typedplaintext_free(n>>>0,1));class Ku{static __wrap(t){t=t>>>0;const e=Object.create(Ku.prototype);return e.__wbg_ptr=t,Eg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,Eg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_typedplaintext_free(t,0)}get bytes(){const t=rt.__wbg_get_typedplaintext_bytes(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set bytes(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get fhe_type(){return rt.__wbg_get_typedplaintext_fhe_type(this.__wbg_ptr)}set fhe_type(t){rt.__wbg_set_typedplaintext_fhe_type(this.__wbg_ptr,t)}}const vg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_typedsigncryptedciphertext_free(n>>>0,1));class eo{static __wrap(t){t=t>>>0;const e=Object.create(eo.prototype);return e.__wbg_ptr=t,vg.register(e,e.__wbg_ptr,e),e}static __unwrap(t){return t instanceof eo?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,vg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_typedsigncryptedciphertext_free(t,0)}get fhe_type(){return rt.__wbg_get_typedciphertext_fhe_type(this.__wbg_ptr)}set fhe_type(t){rt.__wbg_set_typedciphertext_fhe_type(this.__wbg_ptr,t)}get signcrypted_ciphertext(){const t=rt.__wbg_get_typedsigncryptedciphertext_signcrypted_ciphertext(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set signcrypted_ciphertext(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_handle(){const t=rt.__wbg_get_typedsigncryptedciphertext_external_handle(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set external_handle(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get packing_factor(){return rt.__wbg_get_typedciphertext_ciphertext_format(this.__wbg_ptr)>>>0}set packing_factor(t){rt.__wbg_set_typedciphertext_ciphertext_format(this.__wbg_ptr,t)}}typeof FinalizationRegistry>"u"||new FinalizationRegistry(n=>rt.__wbg_userdecryptionrequest_free(n>>>0,1));const G2=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_userdecryptionresponse_free(n>>>0,1));class Wu{static __unwrap(t){return t instanceof Wu?t.__destroy_into_raw():0}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,G2.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_userdecryptionresponse_free(t,0)}get signature(){const t=rt.__wbg_get_userdecryptionresponse_signature(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set signature(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get external_signature(){const t=rt.__wbg_get_userdecryptionresponse_external_signature(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set external_signature(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get payload(){const t=rt.__wbg_get_userdecryptionresponse_payload(this.__wbg_ptr);return t===0?void 0:ia.__wrap(t)}set payload(t){let e=0;pi(t)||(Ui(t,ia),e=t.__destroy_into_raw()),rt.__wbg_set_userdecryptionresponse_payload(this.__wbg_ptr,e)}}const xg=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(n=>rt.__wbg_userdecryptionresponsepayload_free(n>>>0,1));class ia{static __wrap(t){t=t>>>0;const e=Object.create(ia.prototype);return e.__wbg_ptr=t,xg.register(e,e.__wbg_ptr,e),e}__destroy_into_raw(){const t=this.__wbg_ptr;return this.__wbg_ptr=0,xg.unregister(this),t}free(){const t=this.__destroy_into_raw();rt.__wbg_userdecryptionresponsepayload_free(t,0)}get verification_key(){const t=rt.__wbg_get_userdecryptionresponsepayload_verification_key(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set verification_key(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_name(this.__wbg_ptr,e,r)}get digest(){const t=rt.__wbg_get_userdecryptionresponsepayload_digest(this.__wbg_ptr);var e=rr(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*1,1),e}set digest(t){const e=nr(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_eip712domainmsg_version(this.__wbg_ptr,e,r)}get signcrypted_ciphertexts(){const t=rt.__wbg_get_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr);var e=dg(t[0],t[1]).slice();return rt.__wbindgen_free(t[0],t[1]*4,4),e}set signcrypted_ciphertexts(t){const e=wg(t,rt.__wbindgen_malloc),r=ee;rt.__wbg_set_userdecryptionresponsepayload_signcrypted_ciphertexts(this.__wbg_ptr,e,r)}get party_id(){return rt.__wbg_get_userdecryptionresponsepayload_party_id(this.__wbg_ptr)>>>0}set party_id(t){rt.__wbg_set_userdecryptionresponsepayload_party_id(this.__wbg_ptr,t)}get degree(){return rt.__wbg_get_userdecryptionresponsepayload_degree(this.__wbg_ptr)>>>0}set degree(t){rt.__wbg_set_userdecryptionresponsepayload_degree(this.__wbg_ptr,t)}}async function H2(n,t){if(typeof Response=="function"&&n instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(n,t)}catch(r){if(n.headers.get("Content-Type")!="application/wasm")console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",r);else throw r}const e=await n.arrayBuffer();return await WebAssembly.instantiate(e,t)}else{const e=await WebAssembly.instantiate(n,t);return e instanceof WebAssembly.Instance?{instance:e,module:n}:e}}function V2(){const n={};return n.wbg={},n.wbg.__wbg_String_8f0eb39a4a4c2f66=function(t,e){const r=String(e),i=Ni(r,rt.__wbindgen_malloc,rt.__wbindgen_realloc),o=ee;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_buffer_609cc3eee51ed158=function(t){return t.buffer},n.wbg.__wbg_call_672a4d21634d4a24=function(){return Di(function(t,e){return t.call(e)},arguments)},n.wbg.__wbg_call_7cccdd69e0791ae2=function(){return Di(function(t,e,r){return t.call(e,r)},arguments)},n.wbg.__wbg_crypto_ed58b8e10a292839=function(t){return t.crypto},n.wbg.__wbg_done_769e5ede4b31c67b=function(t){return t.done},n.wbg.__wbg_error_7534b8e9a36f1ab4=function(t,e){let r,i;try{r=t,i=e,console.error(Xs(t,e))}finally{rt.__wbindgen_free(r,i,1)}},n.wbg.__wbg_getRandomValues_bcb4912f16000dc4=function(){return Di(function(t,e){t.getRandomValues(e)},arguments)},n.wbg.__wbg_get_67b2ba62fc30de12=function(){return Di(function(t,e){return Reflect.get(t,e)},arguments)},n.wbg.__wbg_get_b9b93047fe3cf45b=function(t,e){return t[e>>>0]},n.wbg.__wbg_getwithrefkey_1dc361bd10053bfe=function(t,e){return t[e]},n.wbg.__wbg_instanceof_ArrayBuffer_e14585432e3737fc=function(t){let e;try{e=t instanceof ArrayBuffer}catch{e=!1}return e},n.wbg.__wbg_instanceof_Uint8Array_17156bcf118086a9=function(t){let e;try{e=t instanceof Uint8Array}catch{e=!1}return e},n.wbg.__wbg_isArray_a1eab7e0d067391b=function(t){return Array.isArray(t)},n.wbg.__wbg_isSafeInteger_343e2beeeece1bb0=function(t){return Number.isSafeInteger(t)},n.wbg.__wbg_iterator_9a24c88df860dc65=function(){return Symbol.iterator},n.wbg.__wbg_length_a446193dc22c12f8=function(t){return t.length},n.wbg.__wbg_length_e2d2a49132c1b256=function(t){return t.length},n.wbg.__wbg_msCrypto_0a36e2ec3a343d26=function(t){return t.msCrypto},n.wbg.__wbg_new_8a6f238a6ece86ea=function(){return new Error},n.wbg.__wbg_new_a12002a7f91c75be=function(t){return new Uint8Array(t)},n.wbg.__wbg_newnoargs_105ed471475aaf50=function(t,e){return new Function(Xs(t,e))},n.wbg.__wbg_newwithbyteoffsetandlength_d97e637ebe145a9a=function(t,e,r){return new Uint8Array(t,e>>>0,r>>>0)},n.wbg.__wbg_newwithlength_a381634e90c276d4=function(t){return new Uint8Array(t>>>0)},n.wbg.__wbg_next_25feadfc0913fea9=function(t){return t.next},n.wbg.__wbg_next_6574e1a8a62d1055=function(){return Di(function(t){return t.next()},arguments)},n.wbg.__wbg_node_02999533c4ea02e3=function(t){return t.node},n.wbg.__wbg_process_5c1d670bc53614b8=function(t){return t.process},n.wbg.__wbg_randomFillSync_ab2cfe79ebbf2740=function(){return Di(function(t,e){t.randomFillSync(e)},arguments)},n.wbg.__wbg_require_79b1e9274cde3c87=function(){return Di(function(){return module.require},arguments)},n.wbg.__wbg_serveridaddr_new=function(t){return As.__wrap(t)},n.wbg.__wbg_serveridaddr_unwrap=function(t){return As.__unwrap(t)},n.wbg.__wbg_set_65595bdd868b3009=function(t,e,r){t.set(e,r>>>0)},n.wbg.__wbg_stack_0ed75d68575b0f3c=function(t,e){const r=e.stack,i=Ni(r,rt.__wbindgen_malloc,rt.__wbindgen_realloc),o=ee;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbg_static_accessor_GLOBAL_88a902d13a557d07=function(){const t=typeof Zo>"u"?null:Zo;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_GLOBAL_THIS_56578be7e9f832b0=function(){const t=typeof globalThis>"u"?null:globalThis;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_SELF_37c5d418e4bf5819=function(){const t=typeof self>"u"?null:self;return pi(t)?0:bs(t)},n.wbg.__wbg_static_accessor_WINDOW_5de37043a91a9c40=function(){const t=typeof window>"u"?null:window;return pi(t)?0:bs(t)},n.wbg.__wbg_subarray_aa9065fa9dc5df96=function(t,e,r){return t.subarray(e>>>0,r>>>0)},n.wbg.__wbg_typedciphertext_new=function(t){return to.__wrap(t)},n.wbg.__wbg_typedciphertext_unwrap=function(t){return to.__unwrap(t)},n.wbg.__wbg_typedplaintext_new=function(t){return Ku.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_new=function(t){return eo.__wrap(t)},n.wbg.__wbg_typedsigncryptedciphertext_unwrap=function(t){return eo.__unwrap(t)},n.wbg.__wbg_userdecryptionresponse_unwrap=function(t){return Wu.__unwrap(t)},n.wbg.__wbg_value_cd1ffa7b1ab794f1=function(t){return t.value},n.wbg.__wbg_versions_c71aa1626a93e0a1=function(t){return t.versions},n.wbg.__wbindgen_as_number=function(t){return+t},n.wbg.__wbindgen_boolean_get=function(t){const e=t;return typeof e=="boolean"?e?1:0:2},n.wbg.__wbindgen_debug_string=function(t,e){const r=Qu(e),i=Ni(r,rt.__wbindgen_malloc,rt.__wbindgen_realloc),o=ee;He().setInt32(t+4*1,o,!0),He().setInt32(t+4*0,i,!0)},n.wbg.__wbindgen_error_new=function(t,e){return new Error(Xs(t,e))},n.wbg.__wbindgen_in=function(t,e){return t in e},n.wbg.__wbindgen_init_externref_table=function(){const t=rt.__wbindgen_export_4,e=t.grow(4);t.set(0,void 0),t.set(e+0,void 0),t.set(e+1,null),t.set(e+2,!0),t.set(e+3,!1)},n.wbg.__wbindgen_is_function=function(t){return typeof t=="function"},n.wbg.__wbindgen_is_null=function(t){return t===null},n.wbg.__wbindgen_is_object=function(t){const e=t;return typeof e=="object"&&e!==null},n.wbg.__wbindgen_is_string=function(t){return typeof t=="string"},n.wbg.__wbindgen_is_undefined=function(t){return t===void 0},n.wbg.__wbindgen_jsval_loose_eq=function(t,e){return t==e},n.wbg.__wbindgen_memory=function(){return rt.memory},n.wbg.__wbindgen_number_get=function(t,e){const r=e,i=typeof r=="number"?r:void 0;He().setFloat64(t+8*1,pi(i)?0:i,!0),He().setInt32(t+4*0,!pi(i),!0)},n.wbg.__wbindgen_string_get=function(t,e){const r=e,i=typeof r=="string"?r:void 0;var o=pi(i)?0:Ni(i,rt.__wbindgen_malloc,rt.__wbindgen_realloc),a=ee;He().setInt32(t+4*1,a,!0),He().setInt32(t+4*0,o,!0)},n.wbg.__wbindgen_string_new=function(t,e){return Xs(t,e)},n.wbg.__wbindgen_throw=function(t,e){throw new Error(Xs(t,e))},n}function q2(n,t){return rt=n.exports,Ju.__wbindgen_wasm_module=t,Li=null,Zs=null,rt.__wbindgen_start(),rt}async function Ju(n){if(rt!==void 0)return rt;typeof n<"u"&&(Object.getPrototypeOf(n)===Object.prototype?{module_or_path:n}=n:console.warn("using deprecated parameters for the initialization function; pass a single object instead")),typeof n>"u"&&(n=new URL("/kms_lib_bg.wasm",typeof document>"u"&&typeof location>"u"?require("url").pathToFileURL(__filename).href:typeof document>"u"?location.href:Ce&&Ce.tagName.toUpperCase()==="SCRIPT"&&Ce.src||new URL("relayer-sdk-js.umd.cjs",document.baseURI).href));const t=V2();(typeof n=="string"||typeof Request=="function"&&n instanceof Request||typeof URL=="function"&&n instanceof URL)&&(n=fetch(n));const{instance:e,module:r}=await H2(await n,t);return q2(e,r)}const Q2=BigInt(1024*1024*512),$u=BigInt(1024*1024*512),Yu=BigInt(1024*1024*512),ro=n=>n?n.endsWith("/")?n.slice(0,-1):n:"",Rg=n=>{let t=n.toString(16);return t.length%2?"0"+t:t},Ve=n=>{const t=n.replace(/^(0x)/,"").match(/.{1,2}/g);return t?Uint8Array.from(t.map(e=>parseInt(e,16))):new Uint8Array};function lr(n,t=!1){return`${t?"0x":""}${n.reduce((e,r)=>e+r.toString(16).padStart(2,"0"),"")}`}const sa=function(n){if(!n||n?.length===0)return BigInt(0);const t=Array.from(n).map(e=>e.toString(16).padStart(2,"0")).join("");return BigInt(`0x${t}`)};function zg(n){if(n instanceof Error&&typeof n.cause=="object"&&n.cause!==null)return n.cause}function K2(n){const t=zg(n);if(!(!t||!("code"in t)||!t.code)&&typeof t.code=="string")return t.code}function W2(n){const t=zg(n);if(!(!t||!("status"in t)||t.status===void 0)&&typeof t.status=="number")return t.status}async function Bg(n,t){let e;if(t.status===429)e="Relayer rate limit exceeded: Please wait and try again later.";else switch(n){case"PUBLIC_DECRYPT":{e=`Public decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"USER_DECRYPT":{e=`User decrypt failed: relayer respond with HTTP code ${t.status}`;break}case"KEY_URL":{e=`HTTP error! status: ${t.status}`;break}default:{const i=await t.text();e=`Relayer didn't response correctly. Bad status ${t.statusText}. Content: ${i}`;break}}const r={code:"RELAYER_FETCH_ERROR",operation:n,status:t.status,statusText:t.statusText,url:t.url};throw new Error(e,{cause:r})}function Sg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't return a JSON";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't return a JSON";break}default:{e="Relayer didn't return a JSON";break}}const r={code:"RELAYER_NO_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function Pg(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer returned an unexpected JSON response";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer returned an unexpected JSON response";break}default:{e="Relayer returned an unexpected JSON response";break}}const r={code:"RELAYER_UNEXPECTED_JSON_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function J2(n,t){let e;switch(n){case"PUBLIC_DECRYPT":{e="Pulbic decrypt failed: the public decryption didn't succeed for an unknown reason";break}case"USER_DECRYPT":{e="User decrypt failed: the user decryption didn't succeed for an unknown reason";break}default:{e="Relayer didn't response correctly.";break}}const r={code:"RELAYER_INTERNAL_ERROR",operation:n,error:t};throw new Error(e,{cause:r})}function kg(n,t,e){if(!e)switch(n){case"PUBLIC_DECRYPT":{e="Public decrypt failed: Relayer didn't respond";break}case"USER_DECRYPT":{e="User decrypt failed: Relayer didn't respond";break}default:{e="Relayer didn't response correctly. Bad JSON.";break}}const r={code:"RELAYER_UNKNOWN_ERROR",operation:n,error:t};throw new Error(e??"Relayer didn't response correctly.",{cause:r})}function Fg(n){if(!n||typeof n!="object")throw new Error("Unexpected response JSON.");if(!("response"in n&&n.response!==null&&n.response!==void 0))throw new Error("Unexpected response JSON format: missing 'response' property.")}async function Zu(n,t,e,r){const i={method:"POST",headers:{"Content-Type":"application/json",...r?.apiKey&&{"x-api-key":r.apiKey}},body:JSON.stringify(e)};let o,a;try{o=await fetch(t,i)}catch(_){kg(n,_)}o.ok||await Bg(n,o);let u;try{u=await o.json()}catch(_){Sg(n,_)}try{Fg(u),a=u}catch(_){Pg(n,_)}return a}async function $2(n,t){let e,r;try{e=await fetch(t)}catch(o){kg(n,o)}e.ok||await Bg(n,e);let i;try{i=await e.json()}catch(o){Sg(n,o)}try{Fg(i),r=i}catch(o){Pg(n,o)}return r}const Xu={},Ig=async(n,t)=>{if(Xu[n])return Xu[n];const e=await $2("KEY_URL",`${n}/v1/keyurl`);try{let r;if(!t)r=e.response.fhe_key_info[0].fhe_public_key.urls[0],t=e.response.fhe_key_info[0].fhe_public_key.data_id;else{const B=e.response.fhe_key_info.find(I=>I.fhe_public_key.data_id===t);if(!B)throw new Error(`Could not find FHE key info with data_id ${t}`);r=B.fhe_public_key.urls[0]}const i=await fetch(r);if(!i.ok)throw new Error(`HTTP error! status: ${i.status} on ${i.url}`);let o;typeof i.bytes=="function"?o=await i.bytes():o=new Uint8Array(await i.arrayBuffer());const a=e.response.crs[2048].urls[0],u=e.response.crs[2048].data_id,_=await fetch(a);if(!_.ok)throw new Error(`HTTP error! status: ${_.status} on ${_.url}`);let l;typeof _.bytes=="function"?l=await _.bytes():l=new Uint8Array(await _.arrayBuffer());let f;try{f=TFHE.TfheCompactPublicKey.safe_deserialize(o,$u)}catch(B){throw new Error("Invalid public key (deserialization failed)",{cause:B})}let g;try{g=TFHE.CompactPkeCrs.safe_deserialize(new Uint8Array(l),Yu)}catch(B){throw new Error("Invalid crs (deserialization failed)",{cause:B})}const y={publicKey:f,publicKeyId:t,publicParams:{2048:{publicParams:g,publicParamsId:u}}};return Xu[n]=y,y}catch(r){throw new Error("Impossible to fetch public key: wrong relayer url.",{cause:r})}},Og=["function getKmsSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Tg=["function getCoprocessorSigners() view returns (address[])","function getThreshold() view returns (uint256)"],Y2=n=>{if(typeof n.network=="string")return new mm(n.network);if(n.network)return new Oi(n.network);throw new Error("You must provide a network URL or a EIP1193 object (eg: window.ethereum)")},Z2=async(n,t)=>{if(t.chainId&&typeof t.chainId=="number")return t.chainId;if(t.chainId&&typeof t.chainId!="number")throw new Error("chainId must be a number.");{const e=(await n.getNetwork()).chainId;return Number(e)}},X2=async n=>{if(n.relayerUrl&&!n.publicKey){const t=await Ig(ro(n.relayerUrl));return{publicKey:t.publicKey,publicKeyId:t.publicKeyId}}else if(n.publicKey&&n.publicKey.data&&n.publicKey.id){const t=n.publicKey.data;try{return{publicKey:TFHE.TfheCompactPublicKey.safe_deserialize(t,$u),publicKeyId:n.publicKey.id}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a public key with its public key ID.")},tA=async n=>{if(n.relayerUrl&&!n.publicParams)return(await Ig(ro(n.relayerUrl))).publicParams;if(n.publicParams&&n.publicParams[2048]){const t=n.publicParams[2048].publicParams;try{return{2048:{publicParams:TFHE.CompactPkeCrs.safe_deserialize(t,Yu),publicParamsId:n.publicParams[2048].publicParamsId}}}catch(e){throw new Error("Invalid public key (deserialization failed)",{cause:e})}}else throw new Error("You must provide a valid CRS with its CRS ID.")},eA=async(n,t)=>await new Xe(t.kmsContractAddress,Og,n).getKmsSigners(),rA=async(n,t)=>{const r=await new Xe(t.kmsContractAddress,Og,n).getThreshold();return Number(r)},nA=async(n,t)=>await new Xe(t.inputVerifierContractAddress,Tg,n).getCoprocessorSigners(),iA=async(n,t)=>{const r=await new Xe(t.inputVerifierContractAddress,Tg,n).getThreshold();return Number(r)},Cg={0:2,2:8,3:16,4:32,5:64,6:128,7:160,8:256};function Ng(n){let t=0;for(const e of n){if(e.length!==66)throw new Error(`Handle ${e} is not of valid length`);const r=e.slice(-4,-2).toLowerCase(),i=parseInt(r,16);if(!(i in Cg))throw new Error(`Handle ${e} is not of valid type`);if(t+=Cg[i],t>2048)throw new Error("Cannot decrypt more than 2048 encrypted bits in a single request")}return t}const oa=n=>Ut(n),sA=["function persistAllowed(bytes32 handle, address account) view returns (bool)"],Lg=10,Dg=BigInt(365);function oA(n,t){return t===0?n===BigInt(1):t===7?oa("0x"+n.toString(16).padStart(40,"0")):t===9?"0x"+n.toString(16).padStart(128,"0"):t===10?"0x"+n.toString(16).padStart(256,"0"):t===11?"0x"+n.toString(16).padStart(512,"0"):n}function aA(n,t){let e=[];for(const i of n){const o=i.slice(-4,-2).toLowerCase(),a=parseInt(o,16);e.push(a)}let r={};return n.forEach((i,o)=>r[i]=oA(t[o],e[o])),r}function cA(n,t){if(t===BigInt(0))throw Error("durationDays is null");if(t>Dg)throw Error(`durationDays is above max duration of ${Dg}`);const e=BigInt(Math.floor(Date.now()/1e3));if(n>e)throw Error("startTimestamp is set in the future");const r=t*BigInt(86400);if(n+r<e)throw Error("User decrypt request has expired")}const uA=(n,t,e,r,i,o,a,u)=>async(_,l,f,g,y,B,I,S)=>{let T,A;try{T=TKMS.u8vec_to_ml_kem_pke_pk(Ve(f)),A=TKMS.u8vec_to_ml_kem_pke_sk(Ve(l))}catch(L){throw new Error("Invalid public or private key",{cause:L})}const R=g.replace(/^(0x)/,""),P=f.replace(/^(0x)/,""),z=_.map(L=>({handle:typeof L.handle=="string"?lr(Ve(L.handle),!0):lr(L.handle,!0),contractAddress:oa(L.contractAddress)}));Ng(z.map(L=>L.handle)),cA(BigInt(I),BigInt(S));const k=new Xe(i,sA,a),C=z.map(async({handle:L,contractAddress:At})=>{const Rt=await k.persistAllowed(L,B),at=await k.persistAllowed(L,At);if(!Rt)throw new Error(`User ${B} is not authorized to user decrypt handle ${L}!`);if(!at)throw new Error(`dapp contract ${At} is not authorized to user decrypt handle ${L}!`);if(B===At)throw new Error(`userAddress ${B} should not be equal to contractAddress when requesting user decryption!`)}),N=y.length;if(N===0)throw Error("contractAddresses is empty");if(N>Lg)throw Error(`contractAddresses max length of ${Lg} exceeded`);await Promise.all(C).catch(L=>{throw L});const D={handleContractPairs:z,requestValidity:{startTimestamp:I.toString(),durationDays:S.toString()},contractsChainId:e.toString(),contractAddresses:y.map(L=>oa(L)),userAddress:oa(B),signature:R,publicKey:P},Y=await Zu("USER_DECRYPT",`${o}/v1/user-decrypt`,D,u);let Z=n.map((L,At)=>TKMS.new_server_id_addr(At+1,L));const ft=TKMS.new_client(Z,B,"default");try{const L=new ArrayBuffer(32);new DataView(L).setUint32(28,t,!1);const at={name:"Decryption",version:"1",chain_id:new Uint8Array(L),verifying_contract:r,salt:null},wt={signature:R,client_address:B,enc_key:P,ciphertext_handles:z.map(Bt=>Bt.handle.replace(/^0x/,"")),eip712_verifying_contract:r},xt=TKMS.process_user_decryption_resp_from_js(ft,wt,at,Y.response,T,A,!0).map(Bt=>sa(Bt.bytes));return aA(z.map(Bt=>Bt.handle),xt)}catch(L){throw new Error("An error occured during decryption",{cause:L})}},hr=(n,t)=>{if(n==null)throw new Error("Missing value");let e;if(t>=8?e=BigInt(`0x${new Array(t/8).fill(null).reduce(r=>`${r}ff`,"")}`):e=BigInt(2**t-1),typeof n!="number"&&typeof n!="bigint")throw new Error("Value must be a number or a bigint.");if(n>e)throw new Error(`The value exceeds the limit for ${t}bits integer (${e.toString()}).`)},_A=({aclContractAddress:n,chainId:t,tfheCompactPublicKey:e,publicParams:r,contractAddress:i,userAddress:o})=>{if(!je(i))throw new Error("Contract address is not a valid address.");if(!je(o))throw new Error("User address is not a valid address.");const a=e,u=[],_=TFHE.CompactCiphertextList.builder(a);let l=new Uint8Array;const f=g=>{if(u.reduce((y,B)=>y+Math.max(2,B),0)+g>2048)throw Error("Packing more than 2048 bits in a single input ciphertext is unsupported");if(u.length+1>256)throw Error("Packing more than 256 variables in a single input ciphertext is unsupported")};return{addBool(g){if(g==null)throw new Error("Missing value");if(typeof g!="boolean"&&typeof g!="number"&&typeof g!="bigint")throw new Error("The value must be a boolean, a number or a bigint.");if(Number(g)>1)throw new Error("The value must be 1 or 0.");return hr(Number(g),1),f(2),_.push_boolean(!!g),u.push(1),this},add8(g){return hr(g,8),f(8),_.push_u8(Number(g)),u.push(8),this},add16(g){return hr(g,16),f(16),_.push_u16(Number(g)),u.push(16),this},add32(g){return hr(g,32),f(32),_.push_u32(Number(g)),u.push(32),this},add64(g){return hr(g,64),f(64),_.push_u64(BigInt(g)),u.push(64),this},add128(g){return hr(g,128),f(128),_.push_u128(BigInt(g)),u.push(128),this},addAddress(g){if(!je(g))throw new Error("The value must be a valid address.");return f(160),_.push_u160(BigInt(g)),u.push(160),this},add256(g){return hr(g,256),f(256),_.push_u256(BigInt(g)),u.push(256),this},addBytes64(g){if(g.length!==64)throw Error("Uncorrect length of input Uint8Array, should be 64 for an ebytes64");const y=sa(g);return hr(y,512),f(512),_.push_u512(y),u.push(512),this},addBytes128(g){if(g.length!==128)throw Error("Uncorrect length of input Uint8Array, should be 128 for an ebytes128");const y=sa(g);return hr(y,1024),f(1024),_.push_u1024(y),u.push(1024),this},addBytes256(g){if(g.length!==256)throw Error("Uncorrect length of input Uint8Array, should be 256 for an ebytes256");const y=sa(g);return hr(y,2048),f(2048),_.push_u2048(y),u.push(2048),this},getBits(){return u},encrypt(){const y=(()=>{const z=D=>Object.keys(D),k=u.reduce((D,Y)=>D+Y,0),C=z(r),N=C.find(D=>Number(D)>=k);if(!N)throw new Error(`Too many bits in provided values. Maximum is ${C[C.length-1]}.`);return N})(),B=r[y].publicParams,I=Ve(i),S=Ve(o),T=Ve(n),A=Ve(t.toString(16).padStart(64,"0")),R=new Uint8Array(I.length+S.length+T.length+32);return R.set(I,0),R.set(S,20),R.set(T,40),R.set(A,R.length-A.length),l=_.build_with_proof_packed(B,R,TFHE.ZkComputeLoad.Verify).safe_serialize(Q2),l}}},Ug={1:0,8:2,16:3,32:4,64:5,128:6,160:7,256:8,512:9,1024:10,2048:11},fA=BigInt("18446744073709551615"),lA=(n,t,e,r,i)=>{const o=Aw("keccak256").update(Ke.from(n)).digest(),a=Ke.from(Ve(e)),u=r.toString(16).padStart(64,"0"),_=Ke.from(u,"hex");return t.map((f,g)=>{const y=Ug[f],B=Ke.from([g]),I=Aw("keccak256").update(o).update(B).update(a).update(_).digest(),S=new Uint8Array(32);if(S.set(I,0),BigInt(r)>fA)throw new Error("ChainId exceeds maximum allowed value (8 bytes)");const T=Ve(u).slice(24,32);return S[21]=g,S.set(T,22),S[30]=y,S[31]=i,S})},Mg=n=>Ut(n),hA=()=>0;function pA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate coprocessor signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of coprocessor signers`);return t.length>=e}function wA(n){const t=n.response;return typeof t!="object"||t===null||!("handles"in t&&Array.isArray(t.handles))||!("signatures"in t&&Array.isArray(t.signatures))?!1:t.signatures.every(e=>typeof e=="string")&&t.handles.every(e=>typeof e=="string")}const dA=(n,t,e,r,i,o,a,u,_)=>(l,f)=>{if(!je(l))throw new Error("Contract address is not a valid address.");if(!je(f))throw new Error("User address is not a valid address.");const g=_A({aclContractAddress:n,chainId:e,tfheCompactPublicKey:o,publicParams:a,contractAddress:l,userAddress:f});return{_input:g,addBool(y){return g.addBool(y),this},add8(y){return g.add8(y),this},add16(y){return g.add16(y),this},add32(y){return g.add32(y),this},add64(y){return g.add64(y),this},add128(y){return g.add128(y),this},add256(y){return g.add256(y),this},addAddress(y){return g.addAddress(y),this},getBits(){return g.getBits()},encrypt:async y=>{const B=g.getBits(),I=g.encrypt(),S={contractAddress:Mg(l),userAddress:Mg(f),ciphertextWithInputVerification:lr(I),contractChainId:"0x"+e.toString(16)},T=await Zu("INPUT_PROOF",`${i}/v1/input-proof`,S,y);wA(T)||J2("INPUT_PROOF",T);const A=lA(I,B,n,e,hA());if(T.response.handles&&T.response.handles.length>0){const Z=T.response.handles.map(Ve);if(A.length!=Z.length)throw new Error(`Incorrect Handles list sizes: (expected) ${A.length} != ${Z.length} (received)`);for(let ft=0;ft<A.length;ft+=1){let L=A[ft],At=Z[ft],Rt=lr(L),at=lr(At);if(Rt!==at)throw new Error(`Incorrect Handle ${ft}: (expected) ${Rt} != ${at} (received)`)}}const R=T.response.signatures,P={name:"InputVerification",version:"1",chainId:r,verifyingContract:t},z={CiphertextVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"userAddress",type:"address"},{name:"contractAddress",type:"address"},{name:"contractChainId",type:"uint256"}]},k=R.map(Z=>{const ft=Z.startsWith("0x")?Z:`0x${Z}`;return Bl(P,z,{ctHandles:A,userAddress:f,contractAddress:l,contractChainId:e},ft)});if(!pA(u,k,_))throw Error("Coprocessor signers threshold is not reached");let N=Rg(A.length);const D=R.length;return N+=Rg(D),A.map(Z=>lr(Z)).map(Z=>N+=Z),R.map(Z=>N+=Z.slice(2)),{handles:A,inputProof:Ve(N)}}}},gA=["function isAllowedForDecryption(bytes32 handle) view returns (bool)"];function yA(n,t,e){const r=new Map;t.forEach((i,o)=>{if(r.has(i)){const a=i;throw new Error(`Duplicate KMS signer address found: ${a} appears multiple times in recovered addresses`)}r.set(i,o)});for(const i of t)if(!n.includes(i))throw new Error(`Invalid address found: ${i} is not in the list of KMS signers`);return t.length>=e}const bA={0:"bool",2:"uint256",3:"uint256",4:"uint256",5:"uint256",6:"uint256",7:"address",8:"uint256"};function mA(n,t){let e=[];for(const l of n){const f=l.slice(-4,-2).toLowerCase(),g=parseInt(f,16);e.push(g)}const r="0x"+"00".repeat(32)+t.slice(2)+"00".repeat(32),i=e.map(l=>bA[l]),u=new Si().decode(["uint256",...i,"bytes[]"],r).slice(1,1+e.length);let _={};return n.forEach((l,f)=>_[l]=u[f]),_}const AA=(n,t,e,r,i,o,a,u)=>async _=>{const l=new Xe(i,gA,a);let f;try{f=await Promise.all(_.map(async k=>{const C=lr(typeof k=="string"?Ve(k):k,!0);if(!await l.isAllowedForDecryption(C))throw new Error(`Handle ${C} is not allowed for public decryption!`);return C}))}catch(k){throw k}Ng(f);const g={ciphertextHandles:f},y=await Zu("PUBLIC_DECRYPT",`${o}/v1/public-decrypt`,g,u),B={name:"Decryption",version:"1",chainId:e,verifyingContract:r},I={PublicDecryptVerification:[{name:"ctHandles",type:"bytes32[]"},{name:"decryptedResult",type:"bytes"}]},S=y.response[0],T=S.decrypted_value.startsWith("0x")?S.decrypted_value:`0x${S.decrypted_value}`,R=S.signatures.map(k=>{const C=k.startsWith("0x")?k:`0x${k}`;return Bl(B,I,{ctHandles:f,decryptedResult:T},C)});if(!yA(n,R,t))throw Error("KMS signers threshold is not reached");return mA(f,T)},jg=(n,t)=>(e,r,i,o,a)=>{if(a&&!je(a))throw new Error("Invalid delegated account.");if(!je(n))throw new Error("Invalid verifying contract address.");if(!r.every(y=>je(y)))throw new Error("Invalid contract address.");const u=typeof e=="string"?e.startsWith("0x")?e:`0x${e}`:e,_=typeof i=="number"?i.toString():i,l=typeof o=="number"?o.toString():o,f=[{name:"name",type:"string"},{name:"version",type:"string"},{name:"chainId",type:"uint256"},{name:"verifyingContract",type:"address"}],g={name:"Decryption",version:"1",chainId:t,verifyingContract:n};return a?{types:{EIP712Domain:f,DelegatedUserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"},{name:"delegatedAccount",type:"address"}]},primaryType:"DelegatedUserDecryptRequestVerification",domain:g,message:{publicKey:u,contractAddresses:r,contractsChainId:t,startTimestamp:_,durationDays:l,delegatedAccount:a}}:{types:{EIP712Domain:f,UserDecryptRequestVerification:[{name:"publicKey",type:"bytes"},{name:"contractAddresses",type:"address[]"},{name:"contractsChainId",type:"uint256"},{name:"startTimestamp",type:"uint256"},{name:"durationDays",type:"uint256"}]},primaryType:"UserDecryptRequestVerification",domain:g,message:{publicKey:u,contractAddresses:r,contractsChainId:t,startTimestamp:_,durationDays:l}}},Gg=()=>{const n=TKMS.ml_kem_pke_keygen();return{publicKey:lr(TKMS.ml_kem_pke_pk_to_u8vec(TKMS.ml_kem_pke_get_pk(n))),privateKey:lr(TKMS.ml_kem_pke_sk_to_u8vec(n))}};Hi.fetch=E2(Hi.fetch,{retries:5,retryDelay:500});const EA={aclContractAddress:"0x687820221192C5B662b25367F70076A37bc79b6c",kmsContractAddress:"0x1364cBBf2cDF5032C47d8226a6f6FBD2AFCDacAC",inputVerifierContractAddress:"0xbc91f3daD1A5F19F8390c400196e58073B6a0BC4",verifyingContractAddressDecryption:"0xb6E160B1ff80D67Bfe90A85eE06Ce0A2613607D1",verifyingContractAddressInputVerification:"0x7048C39f048125eDa9d678AEbaDfB22F7900a29F",chainId:11155111,gatewayChainId:55815,network:"https://eth-sepolia.public.blastapi.io",relayerUrl:"https://relayer.testnet.zama.cloud"},vA=async n=>{const{verifyingContractAddressDecryption:t,verifyingContractAddressInputVerification:e,publicKey:r,kmsContractAddress:i,aclContractAddress:o,gatewayChainId:a}=n;if(!i||!je(i))throw new Error("KMS contract address is not valid or empty");if(!t||!je(t))throw new Error("Verifying contract for Decryption address is not valid or empty");if(!e||!je(e))throw new Error("Verifying contract for InputVerification address is not valid or empty");if(!o||!je(o))throw new Error("ACL contract address is not valid or empty");if(r&&!(r.data instanceof Uint8Array))throw new Error("publicKey must be a Uint8Array");const u=Y2(n);if(!u)throw new Error("No network has been provided!");const _=await Z2(u,n),l=await X2(n),f=await tA(n),g=await eA(u,n),y=await rA(u,n),B=await nA(u,n),I=await iA(u,n);return{createEncryptedInput:dA(o,e,_,a,ro(n.relayerUrl),l.publicKey,f,B,I),generateKeypair:Gg,createEIP712:jg(t,_),publicDecrypt:AA(g,y,a,t,o,ro(n.relayerUrl),u),userDecrypt:uA(g,a,_,t,o,ro(n.relayerUrl),u),getPublicKey:()=>l.publicKey?{publicKey:l.publicKey.safe_serialize($u),publicKeyId:l.publicKeyId}:null,getPublicParams:S=>f[S]?{publicParams:f[S].publicParams.safe_serialize(Yu),publicParamsId:f[S].publicParamsId}:null}};let Hg=!1;const xA=async({tfheParams:n,kmsParams:t,thread:e}={})=>(e==null&&(e=navigator.hardwareConcurrency),await v2()||(console.warn(`This browser does not support threads. Verify that your server returns correct headers:
|
|
23
23
|
`,`'Cross-Origin-Opener-Policy': 'same-origin'
|
|
24
|
-
`,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),
|
|
24
|
+
`,"'Cross-Origin-Embedder-Policy': 'require-corp'"),e=void 0),Hg||(await Ys({module_or_path:n}),await Ju({module_or_path:t}),e&&(Hu(),await Vu(e)),Hg=!0),!0);window.TFHE={default:Ys,initThreadPool:Vu,init_panic_hook:Hu,TfheCompactPublicKey:er,CompactPkeCrs:tr,CompactCiphertextList:hi,ZkComputeLoad:zw},window.TKMS={default:Ju,u8vec_to_ml_kem_pke_pk:U2,u8vec_to_ml_kem_pke_sk:M2,new_client:T2,new_server_id_addr:O2,process_user_decryption_resp_from_js:j2,ml_kem_pke_keygen:C2,ml_kem_pke_pk_to_u8vec:L2,ml_kem_pke_sk_to_u8vec:D2,ml_kem_pke_get_pk:N2},Te.ENCRYPTION_TYPES=Ug,Te.SepoliaConfig=EA,Te.createEIP712=jg,Te.createInstance=vA,Te.generateKeypair=Gg,Te.getErrorCauseCode=K2,Te.getErrorCauseStatus=W2,Te.initSDK=xA,Object.defineProperty(Te,Symbol.toStringTag,{value:"Module"})});
|