@sentio/sdk-bundle 2.42.1 → 2.43.0-rc.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.
Files changed (97) hide show
  1. package/lib/aptos/builtin/0x1.js +1 -1
  2. package/lib/aptos/builtin/0x3.js +1 -1
  3. package/lib/aptos/builtin/index.js +1 -1
  4. package/lib/aptos/ext/index.js +1 -1
  5. package/lib/aptos/index.js +1 -1
  6. package/lib/btc/index.js +1 -1
  7. package/lib/{chunk-7BEMS4NV.js → chunk-2DKKSB3Q.js} +2 -2
  8. package/lib/{chunk-2JLUHA3R.js → chunk-445FSAJP.js} +2 -2
  9. package/lib/{chunk-MF5KGJWT.js → chunk-4O5AYOIW.js} +2 -2
  10. package/lib/chunk-4XDWWAOR.js +1054 -0
  11. package/lib/chunk-4XDWWAOR.js.map +1 -0
  12. package/lib/{chunk-SBU7XQ42.js → chunk-5ZKQRZMR.js} +3 -3
  13. package/lib/chunk-5ZKQRZMR.js.map +1 -0
  14. package/lib/{chunk-HWTRE7ZA.js → chunk-B35KZPC6.js} +2 -2
  15. package/lib/{chunk-T4HXXSET.js → chunk-DD4573FW.js} +2 -2
  16. package/lib/{chunk-DTZPQWAR.js → chunk-DLSAUULX.js} +2 -2
  17. package/lib/{chunk-QRX2UVZ3.js → chunk-EIZ4SUA5.js} +2 -2
  18. package/lib/{chunk-LW4OLSFS.js → chunk-F4FBNBOO.js} +2 -2
  19. package/lib/{chunk-ZLEKYV7V.js → chunk-HYUXOS4C.js} +2 -2
  20. package/lib/chunk-HZPD32NX.js +5 -0
  21. package/lib/chunk-HZPD32NX.js.map +1 -0
  22. package/lib/{chunk-3MJI3F52.js → chunk-IDIPUIJS.js} +2 -2
  23. package/lib/{chunk-CG7IRNK3.js → chunk-MDJARXZT.js} +2 -2
  24. package/lib/{chunk-ZIGQO7R5.js → chunk-MZ2FIAD2.js} +2 -2
  25. package/lib/{chunk-M5LNOTPX.js → chunk-SHDD6PWL.js} +2 -2
  26. package/lib/{chunk-HC2IIOHY.js → chunk-SWU2T3IV.js} +2 -2
  27. package/lib/{chunk-EU2WV53M.js → chunk-WS4VFEL7.js} +2 -2
  28. package/lib/{chunk-SWTOKXE3.js → chunk-Y5WJ4P52.js} +2 -2
  29. package/lib/core/index.js +1 -1
  30. package/lib/eth/builtin/eacaggregatorproxy.js +1 -1
  31. package/lib/eth/builtin/erc1155.js +1 -1
  32. package/lib/eth/builtin/erc20.js +1 -1
  33. package/lib/eth/builtin/erc721.js +1 -1
  34. package/lib/eth/builtin/index.js +1 -1
  35. package/lib/eth/builtin/weth9.js +1 -1
  36. package/lib/eth/codegen/index.js +1 -1
  37. package/lib/eth/index.js +1 -1
  38. package/lib/fuel/asset-processor.d.ts +1 -0
  39. package/lib/fuel/asset-processor.d.ts.map +1 -1
  40. package/lib/fuel/codegen/index.js +1 -1
  41. package/lib/fuel/codegen/index.js.map +1 -1
  42. package/lib/fuel/context.d.ts +6 -4
  43. package/lib/fuel/context.d.ts.map +1 -1
  44. package/lib/fuel/fuel-plugin.d.ts +3 -1
  45. package/lib/fuel/fuel-plugin.d.ts.map +1 -1
  46. package/lib/fuel/fuel-processor.d.ts +8 -3
  47. package/lib/fuel/fuel-processor.d.ts.map +1 -1
  48. package/lib/fuel/global-processor.d.ts +3 -2
  49. package/lib/fuel/global-processor.d.ts.map +1 -1
  50. package/lib/fuel/index.js +1 -1
  51. package/lib/fuel/transaction.d.ts +2 -7
  52. package/lib/fuel/transaction.d.ts.map +1 -1
  53. package/lib/fuel/types.d.ts +15 -1
  54. package/lib/fuel/types.d.ts.map +1 -1
  55. package/lib/index.js +1 -1
  56. package/lib/move/index.js +1 -1
  57. package/lib/solana/builtin/index.js +1 -1
  58. package/lib/solana/index.js +1 -1
  59. package/lib/stark/index.js +1 -1
  60. package/lib/store/index.js +1 -1
  61. package/lib/sui/builtin/0x1.js +1 -1
  62. package/lib/sui/builtin/0x2.js +1 -1
  63. package/lib/sui/builtin/0x3.js +1 -1
  64. package/lib/sui/builtin/index.js +1 -1
  65. package/lib/sui/ext/index.js +1 -1
  66. package/lib/sui/index.js +1 -1
  67. package/lib/testing/index.js +1 -1
  68. package/lib/utils/index.js +1 -1
  69. package/package.json +2 -2
  70. package/src/fuel/asset-processor.ts +8 -1
  71. package/src/fuel/context.ts +8 -3
  72. package/src/fuel/fuel-plugin.ts +44 -2
  73. package/src/fuel/fuel-processor.ts +100 -6
  74. package/src/fuel/global-processor.ts +10 -3
  75. package/src/fuel/transaction.ts +2 -9
  76. package/src/fuel/types.ts +26 -1
  77. package/lib/chunk-O3IGCLZM.js +0 -4
  78. package/lib/chunk-O3IGCLZM.js.map +0 -1
  79. package/lib/chunk-SBU7XQ42.js.map +0 -1
  80. package/lib/chunk-TO35Z22E.js +0 -1037
  81. package/lib/chunk-TO35Z22E.js.map +0 -1
  82. /package/lib/{chunk-7BEMS4NV.js.map → chunk-2DKKSB3Q.js.map} +0 -0
  83. /package/lib/{chunk-2JLUHA3R.js.map → chunk-445FSAJP.js.map} +0 -0
  84. /package/lib/{chunk-MF5KGJWT.js.map → chunk-4O5AYOIW.js.map} +0 -0
  85. /package/lib/{chunk-HWTRE7ZA.js.map → chunk-B35KZPC6.js.map} +0 -0
  86. /package/lib/{chunk-T4HXXSET.js.map → chunk-DD4573FW.js.map} +0 -0
  87. /package/lib/{chunk-DTZPQWAR.js.map → chunk-DLSAUULX.js.map} +0 -0
  88. /package/lib/{chunk-QRX2UVZ3.js.map → chunk-EIZ4SUA5.js.map} +0 -0
  89. /package/lib/{chunk-LW4OLSFS.js.map → chunk-F4FBNBOO.js.map} +0 -0
  90. /package/lib/{chunk-ZLEKYV7V.js.map → chunk-HYUXOS4C.js.map} +0 -0
  91. /package/lib/{chunk-3MJI3F52.js.map → chunk-IDIPUIJS.js.map} +0 -0
  92. /package/lib/{chunk-CG7IRNK3.js.map → chunk-MDJARXZT.js.map} +0 -0
  93. /package/lib/{chunk-ZIGQO7R5.js.map → chunk-MZ2FIAD2.js.map} +0 -0
  94. /package/lib/{chunk-M5LNOTPX.js.map → chunk-SHDD6PWL.js.map} +0 -0
  95. /package/lib/{chunk-HC2IIOHY.js.map → chunk-SWU2T3IV.js.map} +0 -0
  96. /package/lib/{chunk-EU2WV53M.js.map → chunk-WS4VFEL7.js.map} +0 -0
  97. /package/lib/{chunk-SWTOKXE3.js.map → chunk-Y5WJ4P52.js.map} +0 -0
@@ -0,0 +1,1054 @@
1
+ import { createRequire as createRequireSdkShim } from 'module'; const require = createRequireSdkShim(import.meta.url);
2
+ import{A as at,a as Ww,c as x,d as v,f as rr,g as I,h as On,i as ys,j as rn,k as Ah,l as D,m as vs,n as ie,o as L,q as zl,r as Hw,s as Pn,t as Gl,u as Zw,v as Cu,w as Br,x as ws,z as Xw}from"./chunk-5ZKQRZMR.js";import{r as I1,t as S1,u as rb,v as ib}from"./chunk-PLLN42GP.js";import{b as E1,c as C1}from"./chunk-NMFPLO65.js";import{a as wh,b as nb}from"./chunk-K6FJLTBX.js";import{c as di,d as Hl,e as eb,f as w1,h as tb,i as b1}from"./chunk-GQE2JYJW.js";import{a as Ra,f as v1,g as Wl,j as Re,k as yh,m as vh,r as Yw,t as $w,x as Kw,y as jw}from"./chunk-DJQ5RDDN.js";import{a as Vt}from"./chunk-FC546GTB.js";import{a as Ae,b as ct,c as N,d as Vl,e as Bn,f as nr,g as nn}from"./chunk-LLHU72AA.js";var Qb=N(Ns=>{"use strict";Object.defineProperty(Ns,"__esModule",{value:!0});Ns.bech32m=Ns.bech32=void 0;var jl="qpzry9x8gf2tvdw0s3jn54khce6mua7l",Fb={};for(let e=0;e<jl.length;e++){let t=jl.charAt(e);Fb[t]=e}function Ts(e){let t=e>>25;return(e&33554431)<<5^-(t>>0&1)&996825010^-(t>>1&1)&642813549^-(t>>2&1)&513874426^-(t>>3&1)&1027748829^-(t>>4&1)&705979059}function Mb(e){let t=1;for(let n=0;n<e.length;++n){let r=e.charCodeAt(n);if(r<33||r>126)return"Invalid prefix ("+e+")";t=Ts(t)^r>>5}t=Ts(t);for(let n=0;n<e.length;++n){let r=e.charCodeAt(n);t=Ts(t)^r&31}return t}function Fh(e,t,n,r){let i=0,a=0,s=(1<<n)-1,o=[];for(let c=0;c<e.length;++c)for(i=i<<t|e[c],a+=t;a>=n;)a-=n,o.push(i>>a&s);if(r)a>0&&o.push(i<<n-a&s);else{if(a>=t)return"Excess padding";if(i<<n-a&s)return"Non-zero padding"}return o}function TO(e){return Fh(e,8,5,!0)}function NO(e){let t=Fh(e,5,8,!1);if(Array.isArray(t))return t}function RO(e){let t=Fh(e,5,8,!1);if(Array.isArray(t))return t;throw new Error(t)}function Lb(e){let t;e==="bech32"?t=1:t=734539939;function n(s,o,c){if(c=c||90,s.length+7+o.length>c)throw new TypeError("Exceeds length limit");s=s.toLowerCase();let u=Mb(s);if(typeof u=="string")throw new Error(u);let d=s+"1";for(let p=0;p<o.length;++p){let h=o[p];if(h>>5)throw new Error("Non 5-bit word");u=Ts(u)^h,d+=jl.charAt(h)}for(let p=0;p<6;++p)u=Ts(u);u^=t;for(let p=0;p<6;++p){let h=u>>(5-p)*5&31;d+=jl.charAt(h)}return d}function r(s,o){if(o=o||90,s.length<8)return s+" too short";if(s.length>o)return"Exceeds length limit";let c=s.toLowerCase(),u=s.toUpperCase();if(s!==c&&s!==u)return"Mixed-case string "+s;s=c;let d=s.lastIndexOf("1");if(d===-1)return"No separator character for "+s;if(d===0)return"Missing prefix for "+s;let p=s.slice(0,d),h=s.slice(d+1);if(h.length<6)return"Data too short";let _=Mb(p);if(typeof _=="string")return _;let w=[];for(let A=0;A<h.length;++A){let S=h.charAt(A),b=Fb[S];if(b===void 0)return"Unknown character "+S;_=Ts(_)^b,!(A+6>=h.length)&&w.push(b)}return _!==t?"Invalid checksum for "+s:{prefix:p,words:w}}function i(s,o){let c=r(s,o);if(typeof c=="object")return c}function a(s,o){let c=r(s,o);if(typeof c=="object")return c;throw new Error(c)}return{decodeUnsafe:i,decode:a,encode:n,toWords:TO,fromWordsUnsafe:NO,fromWords:RO}}Ns.bech32=Lb("bech32");Ns.bech32m=Lb("bech32m")});var Hh={};Vl(Hh,{abytes:()=>ks,bitGet:()=>JO,bitLen:()=>qO,bitMask:()=>Tu,bitSet:()=>VO,bytesToHex:()=>Da,bytesToNumberBE:()=>pi,bytesToNumberLE:()=>sd,concatBytes:()=>Bs,createHmacDrbg:()=>Wh,ensureBytes:()=>yn,equalBytes:()=>Gh,hexToBytes:()=>Ma,hexToNumber:()=>zh,isBytes:()=>Fi,numberToBytesBE:()=>Li,numberToBytesLE:()=>od,numberToHexUnpadded:()=>iE,numberToVarBytesBE:()=>QO,utf8ToBytes:()=>UO,validateObject:()=>Qi});function Fi(e){return e instanceof Uint8Array||e!=null&&typeof e=="object"&&e.constructor.name==="Uint8Array"}function ks(e){if(!Fi(e))throw new Error("Uint8Array expected")}function Da(e){ks(e);let t="";for(let n=0;n<e.length;n++)t+=LO[e[n]];return t}function iE(e){let t=e.toString(16);return t.length&1?`0${t}`:t}function zh(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);return BigInt(e===""?"0":`0x${e}`)}function tE(e){if(e>=fi._0&&e<=fi._9)return e-fi._0;if(e>=fi._A&&e<=fi._F)return e-(fi._A-10);if(e>=fi._a&&e<=fi._f)return e-(fi._a-10)}function Ma(e){if(typeof e!="string")throw new Error("hex string expected, got "+typeof e);let t=e.length,n=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);let r=new Uint8Array(n);for(let i=0,a=0;i<n;i++,a+=2){let s=tE(e.charCodeAt(a)),o=tE(e.charCodeAt(a+1));if(s===void 0||o===void 0){let c=e[a]+e[a+1];throw new Error('hex string expected, got non-hex character "'+c+'" at index '+a)}r[i]=s*16+o}return r}function pi(e){return zh(Da(e))}function sd(e){return ks(e),zh(Da(Uint8Array.from(e).reverse()))}function Li(e,t){return Ma(e.toString(16).padStart(t*2,"0"))}function od(e,t){return Li(e,t).reverse()}function QO(e){return Ma(iE(e))}function yn(e,t,n){let r;if(typeof t=="string")try{r=Ma(t)}catch(a){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${a}`)}else if(Fi(t))r=Uint8Array.from(t);else throw new Error(`${e} must be hex string or Uint8Array`);let i=r.length;if(typeof n=="number"&&i!==n)throw new Error(`${e} expected ${n} bytes, got ${i}`);return r}function Bs(...e){let t=0;for(let r=0;r<e.length;r++){let i=e[r];ks(i),t+=i.length}let n=new Uint8Array(t);for(let r=0,i=0;r<e.length;r++){let a=e[r];n.set(a,i),i+=a.length}return n}function Gh(e,t){if(e.length!==t.length)return!1;let n=0;for(let r=0;r<e.length;r++)n|=e[r]^t[r];return n===0}function UO(e){if(typeof e!="string")throw new Error(`utf8ToBytes expected string, got ${typeof e}`);return new Uint8Array(new TextEncoder().encode(e))}function qO(e){let t;for(t=0;e>rE;e>>=ad,t+=1);return t}function JO(e,t){return e>>BigInt(t)&ad}function VO(e,t,n){return e|(n?ad:rE)<<BigInt(t)}function Wh(e,t,n){if(typeof e!="number"||e<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 n!="function")throw new Error("hmacFn must be a function");let r=Vh(e),i=Vh(e),a=0,s=()=>{r.fill(1),i.fill(0),a=0},o=(...p)=>n(i,r,...p),c=(p=Vh())=>{i=o(nE([0]),p),r=o(),p.length!==0&&(i=o(nE([1]),p),r=o())},u=()=>{if(a++>=1e3)throw new Error("drbg: tried 1000 values");let p=0,h=[];for(;p<t;){r=o();let _=r.slice();h.push(_),p+=r.length}return Bs(...h)};return(p,h)=>{s(),c(p);let _;for(;!(_=h(u()));)c();return s(),_}}function Qi(e,t,n={}){let r=(i,a,s)=>{let o=zO[a];if(typeof o!="function")throw new Error(`Invalid validator "${a}", expected function`);let c=e[i];if(!(s&&c===void 0)&&!o(c,e))throw new Error(`Invalid param ${String(i)}=${c} (${typeof c}), expected ${a}`)};for(let[i,a]of Object.entries(t))r(i,a,!1);for(let[i,a]of Object.entries(n))r(i,a,!0);return e}var rE,ad,FO,LO,fi,Tu,Vh,nE,zO,Os=ct(()=>{rE=BigInt(0),ad=BigInt(1),FO=BigInt(2);LO=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));fi={_0:48,_9:57,_A:65,_F:70,_a:97,_f:102};Tu=e=>(FO<<BigInt(e-1))-ad,Vh=e=>new Uint8Array(e),nE=e=>Uint8Array.from(e);zO={bigint:e=>typeof e=="bigint",function:e=>typeof e=="function",boolean:e=>typeof e=="boolean",string:e=>typeof e=="string",stringOrUint8Array:e=>typeof e=="string"||Fi(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>typeof e=="function"&&Number.isSafeInteger(e.outputLen)}});var sE=N((Fa,aE)=>{var Nu=(C1(),nr(E1)),GO=Nu.default||Nu,cd=function(e,t){return/^\/\//.test(e)&&(e="https:"+e),GO.call(this,e,t)};cd.ponyfill=!0;aE.exports=Fa=cd;Fa.fetch=cd;Fa.Headers=Nu.Headers;Fa.Request=Nu.Request;Fa.Response=Nu.Response;Fa.default=cd});var Zh=N((m$,oE)=>{"use strict";oE.exports=function(t){var n=t.uri,r=t.name,i=t.type;this.uri=n,this.name=r,this.type=i}});var Xh=N((g$,cE)=>{"use strict";var WO=Zh();cE.exports=function(t){return typeof File<"u"&&t instanceof File||typeof Blob<"u"&&t instanceof Blob||t instanceof WO}});var lE=N((_$,uE)=>{"use strict";var HO=Xh();uE.exports=function e(t,n,r){n===void 0&&(n=""),r===void 0&&(r=HO);var i,a=new Map;function s(d,p){var h=a.get(p);h?h.push.apply(h,d):a.set(p,d)}if(r(t))i=null,s([n],t);else{var o=n?n+".":"";if(typeof FileList<"u"&&t instanceof FileList)i=Array.prototype.map.call(t,function(d,p){return s([""+o+p],d),null});else if(Array.isArray(t))i=t.map(function(d,p){var h=e(d,""+o+p,r);return h.files.forEach(s),h.clone});else if(t&&t.constructor===Object){i={};for(var c in t){var u=e(t[c],""+o+c,r);u.files.forEach(s),i[c]=u.clone}}else i=t}return{clone:i,files:a}}});var dE=N(ud=>{"use strict";ud.ReactNativeFile=Zh();ud.extractFiles=lE();ud.isExtractableFile=Xh()});var hE=N((y$,pE)=>{var fE=Ae("stream").Stream,ZO=Ae("util");pE.exports=sr;function sr(){this.source=null,this.dataSize=0,this.maxDataSize=1024*1024,this.pauseStream=!0,this._maxDataSizeExceeded=!1,this._released=!1,this._bufferedEvents=[]}ZO.inherits(sr,fE);sr.create=function(e,t){var n=new this;t=t||{};for(var r in t)n[r]=t[r];n.source=e;var i=e.emit;return e.emit=function(){return n._handleEmit(arguments),i.apply(e,arguments)},e.on("error",function(){}),n.pauseStream&&e.pause(),n};Object.defineProperty(sr.prototype,"readable",{configurable:!0,enumerable:!0,get:function(){return this.source.readable}});sr.prototype.setEncoding=function(){return this.source.setEncoding.apply(this.source,arguments)};sr.prototype.resume=function(){this._released||this.release(),this.source.resume()};sr.prototype.pause=function(){this.source.pause()};sr.prototype.release=function(){this._released=!0,this._bufferedEvents.forEach(function(e){this.emit.apply(this,e)}.bind(this)),this._bufferedEvents=[]};sr.prototype.pipe=function(){var e=fE.prototype.pipe.apply(this,arguments);return this.resume(),e};sr.prototype._handleEmit=function(e){if(this._released){this.emit.apply(this,e);return}e[0]==="data"&&(this.dataSize+=e[1].length,this._checkIfMaxDataSizeExceeded()),this._bufferedEvents.push(e)};sr.prototype._checkIfMaxDataSizeExceeded=function(){if(!this._maxDataSizeExceeded&&!(this.dataSize<=this.maxDataSize)){this._maxDataSizeExceeded=!0;var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this.emit("error",new Error(e))}}});var AE=N((v$,_E)=>{var XO=Ae("util"),gE=Ae("stream").Stream,mE=hE();_E.exports=st;function st(){this.writable=!1,this.readable=!0,this.dataSize=0,this.maxDataSize=2*1024*1024,this.pauseStreams=!0,this._released=!1,this._streams=[],this._currentStream=null,this._insideLoop=!1,this._pendingNext=!1}XO.inherits(st,gE);st.create=function(e){var t=new this;e=e||{};for(var n in e)t[n]=e[n];return t};st.isStreamLike=function(e){return typeof e!="function"&&typeof e!="string"&&typeof e!="boolean"&&typeof e!="number"&&!Buffer.isBuffer(e)};st.prototype.append=function(e){var t=st.isStreamLike(e);if(t){if(!(e instanceof mE)){var n=mE.create(e,{maxDataSize:1/0,pauseStream:this.pauseStreams});e.on("data",this._checkDataSize.bind(this)),e=n}this._handleErrors(e),this.pauseStreams&&e.pause()}return this._streams.push(e),this};st.prototype.pipe=function(e,t){return gE.prototype.pipe.call(this,e,t),this.resume(),e};st.prototype._getNext=function(){if(this._currentStream=null,this._insideLoop){this._pendingNext=!0;return}this._insideLoop=!0;try{do this._pendingNext=!1,this._realGetNext();while(this._pendingNext)}finally{this._insideLoop=!1}};st.prototype._realGetNext=function(){var e=this._streams.shift();if(typeof e>"u"){this.end();return}if(typeof e!="function"){this._pipeNext(e);return}var t=e;t(function(n){var r=st.isStreamLike(n);r&&(n.on("data",this._checkDataSize.bind(this)),this._handleErrors(n)),this._pipeNext(n)}.bind(this))};st.prototype._pipeNext=function(e){this._currentStream=e;var t=st.isStreamLike(e);if(t){e.on("end",this._getNext.bind(this)),e.pipe(this,{end:!1});return}var n=e;this.write(n),this._getNext()};st.prototype._handleErrors=function(e){var t=this;e.on("error",function(n){t._emitError(n)})};st.prototype.write=function(e){this.emit("data",e)};st.prototype.pause=function(){this.pauseStreams&&(this.pauseStreams&&this._currentStream&&typeof this._currentStream.pause=="function"&&this._currentStream.pause(),this.emit("pause"))};st.prototype.resume=function(){this._released||(this._released=!0,this.writable=!0,this._getNext()),this.pauseStreams&&this._currentStream&&typeof this._currentStream.resume=="function"&&this._currentStream.resume(),this.emit("resume")};st.prototype.end=function(){this._reset(),this.emit("end")};st.prototype.destroy=function(){this._reset(),this.emit("close")};st.prototype._reset=function(){this.writable=!1,this._streams=[],this._currentStream=null};st.prototype._checkDataSize=function(){if(this._updateDataSize(),!(this.dataSize<=this.maxDataSize)){var e="DelayedStream#maxDataSize of "+this.maxDataSize+" bytes exceeded.";this._emitError(new Error(e))}};st.prototype._updateDataSize=function(){this.dataSize=0;var e=this;this._streams.forEach(function(t){t.dataSize&&(e.dataSize+=t.dataSize)}),this._currentStream&&this._currentStream.dataSize&&(this.dataSize+=this._currentStream.dataSize)};st.prototype._emitError=function(e){this._reset(),this.emit("error",e)}});var yE=N((w$,YO)=>{YO.exports={"application/1d-interleaved-parityfec":{source:"iana"},"application/3gpdash-qoe-report+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/3gpp-ims+xml":{source:"iana",compressible:!0},"application/3gpphal+json":{source:"iana",compressible:!0},"application/3gpphalforms+json":{source:"iana",compressible:!0},"application/a2l":{source:"iana"},"application/ace+cbor":{source:"iana"},"application/activemessage":{source:"iana"},"application/activity+json":{source:"iana",compressible:!0},"application/alto-costmap+json":{source:"iana",compressible:!0},"application/alto-costmapfilter+json":{source:"iana",compressible:!0},"application/alto-directory+json":{source:"iana",compressible:!0},"application/alto-endpointcost+json":{source:"iana",compressible:!0},"application/alto-endpointcostparams+json":{source:"iana",compressible:!0},"application/alto-endpointprop+json":{source:"iana",compressible:!0},"application/alto-endpointpropparams+json":{source:"iana",compressible:!0},"application/alto-error+json":{source:"iana",compressible:!0},"application/alto-networkmap+json":{source:"iana",compressible:!0},"application/alto-networkmapfilter+json":{source:"iana",compressible:!0},"application/alto-updatestreamcontrol+json":{source:"iana",compressible:!0},"application/alto-updatestreamparams+json":{source:"iana",compressible:!0},"application/aml":{source:"iana"},"application/andrew-inset":{source:"iana",extensions:["ez"]},"application/applefile":{source:"iana"},"application/applixware":{source:"apache",extensions:["aw"]},"application/at+jwt":{source:"iana"},"application/atf":{source:"iana"},"application/atfx":{source:"iana"},"application/atom+xml":{source:"iana",compressible:!0,extensions:["atom"]},"application/atomcat+xml":{source:"iana",compressible:!0,extensions:["atomcat"]},"application/atomdeleted+xml":{source:"iana",compressible:!0,extensions:["atomdeleted"]},"application/atomicmail":{source:"iana"},"application/atomsvc+xml":{source:"iana",compressible:!0,extensions:["atomsvc"]},"application/atsc-dwd+xml":{source:"iana",compressible:!0,extensions:["dwd"]},"application/atsc-dynamic-event-message":{source:"iana"},"application/atsc-held+xml":{source:"iana",compressible:!0,extensions:["held"]},"application/atsc-rdt+json":{source:"iana",compressible:!0},"application/atsc-rsat+xml":{source:"iana",compressible:!0,extensions:["rsat"]},"application/atxml":{source:"iana"},"application/auth-policy+xml":{source:"iana",compressible:!0},"application/bacnet-xdd+zip":{source:"iana",compressible:!1},"application/batch-smtp":{source:"iana"},"application/bdoc":{compressible:!1,extensions:["bdoc"]},"application/beep+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/calendar+json":{source:"iana",compressible:!0},"application/calendar+xml":{source:"iana",compressible:!0,extensions:["xcs"]},"application/call-completion":{source:"iana"},"application/cals-1840":{source:"iana"},"application/captive+json":{source:"iana",compressible:!0},"application/cbor":{source:"iana"},"application/cbor-seq":{source:"iana"},"application/cccex":{source:"iana"},"application/ccmp+xml":{source:"iana",compressible:!0},"application/ccxml+xml":{source:"iana",compressible:!0,extensions:["ccxml"]},"application/cdfx+xml":{source:"iana",compressible:!0,extensions:["cdfx"]},"application/cdmi-capability":{source:"iana",extensions:["cdmia"]},"application/cdmi-container":{source:"iana",extensions:["cdmic"]},"application/cdmi-domain":{source:"iana",extensions:["cdmid"]},"application/cdmi-object":{source:"iana",extensions:["cdmio"]},"application/cdmi-queue":{source:"iana",extensions:["cdmiq"]},"application/cdni":{source:"iana"},"application/cea":{source:"iana"},"application/cea-2018+xml":{source:"iana",compressible:!0},"application/cellml+xml":{source:"iana",compressible:!0},"application/cfw":{source:"iana"},"application/city+json":{source:"iana",compressible:!0},"application/clr":{source:"iana"},"application/clue+xml":{source:"iana",compressible:!0},"application/clue_info+xml":{source:"iana",compressible:!0},"application/cms":{source:"iana"},"application/cnrp+xml":{source:"iana",compressible:!0},"application/coap-group+json":{source:"iana",compressible:!0},"application/coap-payload":{source:"iana"},"application/commonground":{source:"iana"},"application/conference-info+xml":{source:"iana",compressible:!0},"application/cose":{source:"iana"},"application/cose-key":{source:"iana"},"application/cose-key-set":{source:"iana"},"application/cpl+xml":{source:"iana",compressible:!0,extensions:["cpl"]},"application/csrattrs":{source:"iana"},"application/csta+xml":{source:"iana",compressible:!0},"application/cstadata+xml":{source:"iana",compressible:!0},"application/csvm+json":{source:"iana",compressible:!0},"application/cu-seeme":{source:"apache",extensions:["cu"]},"application/cwt":{source:"iana"},"application/cybercash":{source:"iana"},"application/dart":{compressible:!0},"application/dash+xml":{source:"iana",compressible:!0,extensions:["mpd"]},"application/dash-patch+xml":{source:"iana",compressible:!0,extensions:["mpp"]},"application/dashdelta":{source:"iana"},"application/davmount+xml":{source:"iana",compressible:!0,extensions:["davmount"]},"application/dca-rft":{source:"iana"},"application/dcd":{source:"iana"},"application/dec-dx":{source:"iana"},"application/dialog-info+xml":{source:"iana",compressible:!0},"application/dicom":{source:"iana"},"application/dicom+json":{source:"iana",compressible:!0},"application/dicom+xml":{source:"iana",compressible:!0},"application/dii":{source:"iana"},"application/dit":{source:"iana"},"application/dns":{source:"iana"},"application/dns+json":{source:"iana",compressible:!0},"application/dns-message":{source:"iana"},"application/docbook+xml":{source:"apache",compressible:!0,extensions:["dbk"]},"application/dots+cbor":{source:"iana"},"application/dskpp+xml":{source:"iana",compressible:!0},"application/dssc+der":{source:"iana",extensions:["dssc"]},"application/dssc+xml":{source:"iana",compressible:!0,extensions:["xdssc"]},"application/dvcs":{source:"iana"},"application/ecmascript":{source:"iana",compressible:!0,extensions:["es","ecma"]},"application/edi-consent":{source:"iana"},"application/edi-x12":{source:"iana",compressible:!1},"application/edifact":{source:"iana",compressible:!1},"application/efi":{source:"iana"},"application/elm+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/elm+xml":{source:"iana",compressible:!0},"application/emergencycalldata.cap+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/emergencycalldata.comment+xml":{source:"iana",compressible:!0},"application/emergencycalldata.control+xml":{source:"iana",compressible:!0},"application/emergencycalldata.deviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.ecall.msd":{source:"iana"},"application/emergencycalldata.providerinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.serviceinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.subscriberinfo+xml":{source:"iana",compressible:!0},"application/emergencycalldata.veds+xml":{source:"iana",compressible:!0},"application/emma+xml":{source:"iana",compressible:!0,extensions:["emma"]},"application/emotionml+xml":{source:"iana",compressible:!0,extensions:["emotionml"]},"application/encaprtp":{source:"iana"},"application/epp+xml":{source:"iana",compressible:!0},"application/epub+zip":{source:"iana",compressible:!1,extensions:["epub"]},"application/eshop":{source:"iana"},"application/exi":{source:"iana",extensions:["exi"]},"application/expect-ct-report+json":{source:"iana",compressible:!0},"application/express":{source:"iana",extensions:["exp"]},"application/fastinfoset":{source:"iana"},"application/fastsoap":{source:"iana"},"application/fdt+xml":{source:"iana",compressible:!0,extensions:["fdt"]},"application/fhir+json":{source:"iana",charset:"UTF-8",compressible:!0},"application/fhir+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/fido.trusted-apps+json":{compressible:!0},"application/fits":{source:"iana"},"application/flexfec":{source:"iana"},"application/font-sfnt":{source:"iana"},"application/font-tdpfr":{source:"iana",extensions:["pfr"]},"application/font-woff":{source:"iana",compressible:!1},"application/framework-attributes+xml":{source:"iana",compressible:!0},"application/geo+json":{source:"iana",compressible:!0,extensions:["geojson"]},"application/geo+json-seq":{source:"iana"},"application/geopackage+sqlite3":{source:"iana"},"application/geoxacml+xml":{source:"iana",compressible:!0},"application/gltf-buffer":{source:"iana"},"application/gml+xml":{source:"iana",compressible:!0,extensions:["gml"]},"application/gpx+xml":{source:"apache",compressible:!0,extensions:["gpx"]},"application/gxf":{source:"apache",extensions:["gxf"]},"application/gzip":{source:"iana",compressible:!1,extensions:["gz"]},"application/h224":{source:"iana"},"application/held+xml":{source:"iana",compressible:!0},"application/hjson":{extensions:["hjson"]},"application/http":{source:"iana"},"application/hyperstudio":{source:"iana",extensions:["stk"]},"application/ibe-key-request+xml":{source:"iana",compressible:!0},"application/ibe-pkg-reply+xml":{source:"iana",compressible:!0},"application/ibe-pp-data":{source:"iana"},"application/iges":{source:"iana"},"application/im-iscomposing+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/index":{source:"iana"},"application/index.cmd":{source:"iana"},"application/index.obj":{source:"iana"},"application/index.response":{source:"iana"},"application/index.vnd":{source:"iana"},"application/inkml+xml":{source:"iana",compressible:!0,extensions:["ink","inkml"]},"application/iotp":{source:"iana"},"application/ipfix":{source:"iana",extensions:["ipfix"]},"application/ipp":{source:"iana"},"application/isup":{source:"iana"},"application/its+xml":{source:"iana",compressible:!0,extensions:["its"]},"application/java-archive":{source:"apache",compressible:!1,extensions:["jar","war","ear"]},"application/java-serialized-object":{source:"apache",compressible:!1,extensions:["ser"]},"application/java-vm":{source:"apache",compressible:!1,extensions:["class"]},"application/javascript":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["js","mjs"]},"application/jf2feed+json":{source:"iana",compressible:!0},"application/jose":{source:"iana"},"application/jose+json":{source:"iana",compressible:!0},"application/jrd+json":{source:"iana",compressible:!0},"application/jscalendar+json":{source:"iana",compressible:!0},"application/json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["json","map"]},"application/json-patch+json":{source:"iana",compressible:!0},"application/json-seq":{source:"iana"},"application/json5":{extensions:["json5"]},"application/jsonml+json":{source:"apache",compressible:!0,extensions:["jsonml"]},"application/jwk+json":{source:"iana",compressible:!0},"application/jwk-set+json":{source:"iana",compressible:!0},"application/jwt":{source:"iana"},"application/kpml-request+xml":{source:"iana",compressible:!0},"application/kpml-response+xml":{source:"iana",compressible:!0},"application/ld+json":{source:"iana",compressible:!0,extensions:["jsonld"]},"application/lgr+xml":{source:"iana",compressible:!0,extensions:["lgr"]},"application/link-format":{source:"iana"},"application/load-control+xml":{source:"iana",compressible:!0},"application/lost+xml":{source:"iana",compressible:!0,extensions:["lostxml"]},"application/lostsync+xml":{source:"iana",compressible:!0},"application/lpf+zip":{source:"iana",compressible:!1},"application/lxf":{source:"iana"},"application/mac-binhex40":{source:"iana",extensions:["hqx"]},"application/mac-compactpro":{source:"apache",extensions:["cpt"]},"application/macwriteii":{source:"iana"},"application/mads+xml":{source:"iana",compressible:!0,extensions:["mads"]},"application/manifest+json":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["webmanifest"]},"application/marc":{source:"iana",extensions:["mrc"]},"application/marcxml+xml":{source:"iana",compressible:!0,extensions:["mrcx"]},"application/mathematica":{source:"iana",extensions:["ma","nb","mb"]},"application/mathml+xml":{source:"iana",compressible:!0,extensions:["mathml"]},"application/mathml-content+xml":{source:"iana",compressible:!0},"application/mathml-presentation+xml":{source:"iana",compressible:!0},"application/mbms-associated-procedure-description+xml":{source:"iana",compressible:!0},"application/mbms-deregister+xml":{source:"iana",compressible:!0},"application/mbms-envelope+xml":{source:"iana",compressible:!0},"application/mbms-msk+xml":{source:"iana",compressible:!0},"application/mbms-msk-response+xml":{source:"iana",compressible:!0},"application/mbms-protection-description+xml":{source:"iana",compressible:!0},"application/mbms-reception-report+xml":{source:"iana",compressible:!0},"application/mbms-register+xml":{source:"iana",compressible:!0},"application/mbms-register-response+xml":{source:"iana",compressible:!0},"application/mbms-schedule+xml":{source:"iana",compressible:!0},"application/mbms-user-service-description+xml":{source:"iana",compressible:!0},"application/mbox":{source:"iana",extensions:["mbox"]},"application/media-policy-dataset+xml":{source:"iana",compressible:!0,extensions:["mpf"]},"application/media_control+xml":{source:"iana",compressible:!0},"application/mediaservercontrol+xml":{source:"iana",compressible:!0,extensions:["mscml"]},"application/merge-patch+json":{source:"iana",compressible:!0},"application/metalink+xml":{source:"apache",compressible:!0,extensions:["metalink"]},"application/metalink4+xml":{source:"iana",compressible:!0,extensions:["meta4"]},"application/mets+xml":{source:"iana",compressible:!0,extensions:["mets"]},"application/mf4":{source:"iana"},"application/mikey":{source:"iana"},"application/mipc":{source:"iana"},"application/missing-blocks+cbor-seq":{source:"iana"},"application/mmt-aei+xml":{source:"iana",compressible:!0,extensions:["maei"]},"application/mmt-usd+xml":{source:"iana",compressible:!0,extensions:["musd"]},"application/mods+xml":{source:"iana",compressible:!0,extensions:["mods"]},"application/moss-keys":{source:"iana"},"application/moss-signature":{source:"iana"},"application/mosskey-data":{source:"iana"},"application/mosskey-request":{source:"iana"},"application/mp21":{source:"iana",extensions:["m21","mp21"]},"application/mp4":{source:"iana",extensions:["mp4s","m4p"]},"application/mpeg4-generic":{source:"iana"},"application/mpeg4-iod":{source:"iana"},"application/mpeg4-iod-xmt":{source:"iana"},"application/mrb-consumer+xml":{source:"iana",compressible:!0},"application/mrb-publish+xml":{source:"iana",compressible:!0},"application/msc-ivr+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msc-mixer+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/msword":{source:"iana",compressible:!1,extensions:["doc","dot"]},"application/mud+json":{source:"iana",compressible:!0},"application/multipart-core":{source:"iana"},"application/mxf":{source:"iana",extensions:["mxf"]},"application/n-quads":{source:"iana",extensions:["nq"]},"application/n-triples":{source:"iana",extensions:["nt"]},"application/nasdata":{source:"iana"},"application/news-checkgroups":{source:"iana",charset:"US-ASCII"},"application/news-groupinfo":{source:"iana",charset:"US-ASCII"},"application/news-transmission":{source:"iana"},"application/nlsml+xml":{source:"iana",compressible:!0},"application/node":{source:"iana",extensions:["cjs"]},"application/nss":{source:"iana"},"application/oauth-authz-req+jwt":{source:"iana"},"application/oblivious-dns-message":{source:"iana"},"application/ocsp-request":{source:"iana"},"application/ocsp-response":{source:"iana"},"application/octet-stream":{source:"iana",compressible:!1,extensions:["bin","dms","lrf","mar","so","dist","distz","pkg","bpk","dump","elc","deploy","exe","dll","deb","dmg","iso","img","msi","msp","msm","buffer"]},"application/oda":{source:"iana",extensions:["oda"]},"application/odm+xml":{source:"iana",compressible:!0},"application/odx":{source:"iana"},"application/oebps-package+xml":{source:"iana",compressible:!0,extensions:["opf"]},"application/ogg":{source:"iana",compressible:!1,extensions:["ogx"]},"application/omdoc+xml":{source:"apache",compressible:!0,extensions:["omdoc"]},"application/onenote":{source:"apache",extensions:["onetoc","onetoc2","onetmp","onepkg"]},"application/opc-nodeset+xml":{source:"iana",compressible:!0},"application/oscore":{source:"iana"},"application/oxps":{source:"iana",extensions:["oxps"]},"application/p21":{source:"iana"},"application/p21+zip":{source:"iana",compressible:!1},"application/p2p-overlay+xml":{source:"iana",compressible:!0,extensions:["relo"]},"application/parityfec":{source:"iana"},"application/passport":{source:"iana"},"application/patch-ops-error+xml":{source:"iana",compressible:!0,extensions:["xer"]},"application/pdf":{source:"iana",compressible:!1,extensions:["pdf"]},"application/pdx":{source:"iana"},"application/pem-certificate-chain":{source:"iana"},"application/pgp-encrypted":{source:"iana",compressible:!1,extensions:["pgp"]},"application/pgp-keys":{source:"iana",extensions:["asc"]},"application/pgp-signature":{source:"iana",extensions:["asc","sig"]},"application/pics-rules":{source:"apache",extensions:["prf"]},"application/pidf+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pidf-diff+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/pkcs10":{source:"iana",extensions:["p10"]},"application/pkcs12":{source:"iana"},"application/pkcs7-mime":{source:"iana",extensions:["p7m","p7c"]},"application/pkcs7-signature":{source:"iana",extensions:["p7s"]},"application/pkcs8":{source:"iana",extensions:["p8"]},"application/pkcs8-encrypted":{source:"iana"},"application/pkix-attr-cert":{source:"iana",extensions:["ac"]},"application/pkix-cert":{source:"iana",extensions:["cer"]},"application/pkix-crl":{source:"iana",extensions:["crl"]},"application/pkix-pkipath":{source:"iana",extensions:["pkipath"]},"application/pkixcmp":{source:"iana",extensions:["pki"]},"application/pls+xml":{source:"iana",compressible:!0,extensions:["pls"]},"application/poc-settings+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/postscript":{source:"iana",compressible:!0,extensions:["ai","eps","ps"]},"application/ppsp-tracker+json":{source:"iana",compressible:!0},"application/problem+json":{source:"iana",compressible:!0},"application/problem+xml":{source:"iana",compressible:!0},"application/provenance+xml":{source:"iana",compressible:!0,extensions:["provx"]},"application/prs.alvestrand.titrax-sheet":{source:"iana"},"application/prs.cww":{source:"iana",extensions:["cww"]},"application/prs.cyn":{source:"iana",charset:"7-BIT"},"application/prs.hpub+zip":{source:"iana",compressible:!1},"application/prs.nprend":{source:"iana"},"application/prs.plucker":{source:"iana"},"application/prs.rdf-xml-crypt":{source:"iana"},"application/prs.xsf+xml":{source:"iana",compressible:!0},"application/pskc+xml":{source:"iana",compressible:!0,extensions:["pskcxml"]},"application/pvd+json":{source:"iana",compressible:!0},"application/qsig":{source:"iana"},"application/raml+yaml":{compressible:!0,extensions:["raml"]},"application/raptorfec":{source:"iana"},"application/rdap+json":{source:"iana",compressible:!0},"application/rdf+xml":{source:"iana",compressible:!0,extensions:["rdf","owl"]},"application/reginfo+xml":{source:"iana",compressible:!0,extensions:["rif"]},"application/relax-ng-compact-syntax":{source:"iana",extensions:["rnc"]},"application/remote-printing":{source:"iana"},"application/reputon+json":{source:"iana",compressible:!0},"application/resource-lists+xml":{source:"iana",compressible:!0,extensions:["rl"]},"application/resource-lists-diff+xml":{source:"iana",compressible:!0,extensions:["rld"]},"application/rfc+xml":{source:"iana",compressible:!0},"application/riscos":{source:"iana"},"application/rlmi+xml":{source:"iana",compressible:!0},"application/rls-services+xml":{source:"iana",compressible:!0,extensions:["rs"]},"application/route-apd+xml":{source:"iana",compressible:!0,extensions:["rapd"]},"application/route-s-tsid+xml":{source:"iana",compressible:!0,extensions:["sls"]},"application/route-usd+xml":{source:"iana",compressible:!0,extensions:["rusd"]},"application/rpki-ghostbusters":{source:"iana",extensions:["gbr"]},"application/rpki-manifest":{source:"iana",extensions:["mft"]},"application/rpki-publication":{source:"iana"},"application/rpki-roa":{source:"iana",extensions:["roa"]},"application/rpki-updown":{source:"iana"},"application/rsd+xml":{source:"apache",compressible:!0,extensions:["rsd"]},"application/rss+xml":{source:"apache",compressible:!0,extensions:["rss"]},"application/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"application/rtploopback":{source:"iana"},"application/rtx":{source:"iana"},"application/samlassertion+xml":{source:"iana",compressible:!0},"application/samlmetadata+xml":{source:"iana",compressible:!0},"application/sarif+json":{source:"iana",compressible:!0},"application/sarif-external-properties+json":{source:"iana",compressible:!0},"application/sbe":{source:"iana"},"application/sbml+xml":{source:"iana",compressible:!0,extensions:["sbml"]},"application/scaip+xml":{source:"iana",compressible:!0},"application/scim+json":{source:"iana",compressible:!0},"application/scvp-cv-request":{source:"iana",extensions:["scq"]},"application/scvp-cv-response":{source:"iana",extensions:["scs"]},"application/scvp-vp-request":{source:"iana",extensions:["spq"]},"application/scvp-vp-response":{source:"iana",extensions:["spp"]},"application/sdp":{source:"iana",extensions:["sdp"]},"application/secevent+jwt":{source:"iana"},"application/senml+cbor":{source:"iana"},"application/senml+json":{source:"iana",compressible:!0},"application/senml+xml":{source:"iana",compressible:!0,extensions:["senmlx"]},"application/senml-etch+cbor":{source:"iana"},"application/senml-etch+json":{source:"iana",compressible:!0},"application/senml-exi":{source:"iana"},"application/sensml+cbor":{source:"iana"},"application/sensml+json":{source:"iana",compressible:!0},"application/sensml+xml":{source:"iana",compressible:!0,extensions:["sensmlx"]},"application/sensml-exi":{source:"iana"},"application/sep+xml":{source:"iana",compressible:!0},"application/sep-exi":{source:"iana"},"application/session-info":{source:"iana"},"application/set-payment":{source:"iana"},"application/set-payment-initiation":{source:"iana",extensions:["setpay"]},"application/set-registration":{source:"iana"},"application/set-registration-initiation":{source:"iana",extensions:["setreg"]},"application/sgml":{source:"iana"},"application/sgml-open-catalog":{source:"iana"},"application/shf+xml":{source:"iana",compressible:!0,extensions:["shf"]},"application/sieve":{source:"iana",extensions:["siv","sieve"]},"application/simple-filter+xml":{source:"iana",compressible:!0},"application/simple-message-summary":{source:"iana"},"application/simplesymbolcontainer":{source:"iana"},"application/sipc":{source:"iana"},"application/slate":{source:"iana"},"application/smil":{source:"iana"},"application/smil+xml":{source:"iana",compressible:!0,extensions:["smi","smil"]},"application/smpte336m":{source:"iana"},"application/soap+fastinfoset":{source:"iana"},"application/soap+xml":{source:"iana",compressible:!0},"application/sparql-query":{source:"iana",extensions:["rq"]},"application/sparql-results+xml":{source:"iana",compressible:!0,extensions:["srx"]},"application/spdx+json":{source:"iana",compressible:!0},"application/spirits-event+xml":{source:"iana",compressible:!0},"application/sql":{source:"iana"},"application/srgs":{source:"iana",extensions:["gram"]},"application/srgs+xml":{source:"iana",compressible:!0,extensions:["grxml"]},"application/sru+xml":{source:"iana",compressible:!0,extensions:["sru"]},"application/ssdl+xml":{source:"apache",compressible:!0,extensions:["ssdl"]},"application/ssml+xml":{source:"iana",compressible:!0,extensions:["ssml"]},"application/stix+json":{source:"iana",compressible:!0},"application/swid+xml":{source:"iana",compressible:!0,extensions:["swidtag"]},"application/tamp-apex-update":{source:"iana"},"application/tamp-apex-update-confirm":{source:"iana"},"application/tamp-community-update":{source:"iana"},"application/tamp-community-update-confirm":{source:"iana"},"application/tamp-error":{source:"iana"},"application/tamp-sequence-adjust":{source:"iana"},"application/tamp-sequence-adjust-confirm":{source:"iana"},"application/tamp-status-query":{source:"iana"},"application/tamp-status-response":{source:"iana"},"application/tamp-update":{source:"iana"},"application/tamp-update-confirm":{source:"iana"},"application/tar":{compressible:!0},"application/taxii+json":{source:"iana",compressible:!0},"application/td+json":{source:"iana",compressible:!0},"application/tei+xml":{source:"iana",compressible:!0,extensions:["tei","teicorpus"]},"application/tetra_isi":{source:"iana"},"application/thraud+xml":{source:"iana",compressible:!0,extensions:["tfi"]},"application/timestamp-query":{source:"iana"},"application/timestamp-reply":{source:"iana"},"application/timestamped-data":{source:"iana",extensions:["tsd"]},"application/tlsrpt+gzip":{source:"iana"},"application/tlsrpt+json":{source:"iana",compressible:!0},"application/tnauthlist":{source:"iana"},"application/token-introspection+jwt":{source:"iana"},"application/toml":{compressible:!0,extensions:["toml"]},"application/trickle-ice-sdpfrag":{source:"iana"},"application/trig":{source:"iana",extensions:["trig"]},"application/ttml+xml":{source:"iana",compressible:!0,extensions:["ttml"]},"application/tve-trigger":{source:"iana"},"application/tzif":{source:"iana"},"application/tzif-leap":{source:"iana"},"application/ubjson":{compressible:!1,extensions:["ubj"]},"application/ulpfec":{source:"iana"},"application/urc-grpsheet+xml":{source:"iana",compressible:!0},"application/urc-ressheet+xml":{source:"iana",compressible:!0,extensions:["rsheet"]},"application/urc-targetdesc+xml":{source:"iana",compressible:!0,extensions:["td"]},"application/urc-uisocketdesc+xml":{source:"iana",compressible:!0},"application/vcard+json":{source:"iana",compressible:!0},"application/vcard+xml":{source:"iana",compressible:!0},"application/vemmi":{source:"iana"},"application/vividence.scriptfile":{source:"apache"},"application/vnd.1000minds.decision-model+xml":{source:"iana",compressible:!0,extensions:["1km"]},"application/vnd.3gpp-prose+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-prose-pc3ch+xml":{source:"iana",compressible:!0},"application/vnd.3gpp-v2x-local-service-information":{source:"iana"},"application/vnd.3gpp.5gnas":{source:"iana"},"application/vnd.3gpp.access-transfer-events+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.bsf+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gmop+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.gtpc":{source:"iana"},"application/vnd.3gpp.interworking-data":{source:"iana"},"application/vnd.3gpp.lpp":{source:"iana"},"application/vnd.3gpp.mc-signalling-ear":{source:"iana"},"application/vnd.3gpp.mcdata-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-payload":{source:"iana"},"application/vnd.3gpp.mcdata-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-signalling":{source:"iana"},"application/vnd.3gpp.mcdata-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcdata-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-floor-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-signed+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-ue-init-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcptt-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-command+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-affiliation-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-location-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-mbms-usage-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-service-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-transmission-request+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-ue-config+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mcvideo-user-profile+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.mid-call+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ngap":{source:"iana"},"application/vnd.3gpp.pfcp":{source:"iana"},"application/vnd.3gpp.pic-bw-large":{source:"iana",extensions:["plb"]},"application/vnd.3gpp.pic-bw-small":{source:"iana",extensions:["psb"]},"application/vnd.3gpp.pic-bw-var":{source:"iana",extensions:["pvb"]},"application/vnd.3gpp.s1ap":{source:"iana"},"application/vnd.3gpp.sms":{source:"iana"},"application/vnd.3gpp.sms+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-ext+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.srvcc-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.state-and-event-info+xml":{source:"iana",compressible:!0},"application/vnd.3gpp.ussd+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.bcmcsinfo+xml":{source:"iana",compressible:!0},"application/vnd.3gpp2.sms":{source:"iana"},"application/vnd.3gpp2.tcap":{source:"iana",extensions:["tcap"]},"application/vnd.3lightssoftware.imagescal":{source:"iana"},"application/vnd.3m.post-it-notes":{source:"iana",extensions:["pwn"]},"application/vnd.accpac.simply.aso":{source:"iana",extensions:["aso"]},"application/vnd.accpac.simply.imp":{source:"iana",extensions:["imp"]},"application/vnd.acucobol":{source:"iana",extensions:["acu"]},"application/vnd.acucorp":{source:"iana",extensions:["atc","acutc"]},"application/vnd.adobe.air-application-installer-package+zip":{source:"apache",compressible:!1,extensions:["air"]},"application/vnd.adobe.flash.movie":{source:"iana"},"application/vnd.adobe.formscentral.fcdt":{source:"iana",extensions:["fcdt"]},"application/vnd.adobe.fxp":{source:"iana",extensions:["fxp","fxpl"]},"application/vnd.adobe.partial-upload":{source:"iana"},"application/vnd.adobe.xdp+xml":{source:"iana",compressible:!0,extensions:["xdp"]},"application/vnd.adobe.xfdf":{source:"iana",extensions:["xfdf"]},"application/vnd.aether.imp":{source:"iana"},"application/vnd.afpc.afplinedata":{source:"iana"},"application/vnd.afpc.afplinedata-pagedef":{source:"iana"},"application/vnd.afpc.cmoca-cmresource":{source:"iana"},"application/vnd.afpc.foca-charset":{source:"iana"},"application/vnd.afpc.foca-codedfont":{source:"iana"},"application/vnd.afpc.foca-codepage":{source:"iana"},"application/vnd.afpc.modca":{source:"iana"},"application/vnd.afpc.modca-cmtable":{source:"iana"},"application/vnd.afpc.modca-formdef":{source:"iana"},"application/vnd.afpc.modca-mediummap":{source:"iana"},"application/vnd.afpc.modca-objectcontainer":{source:"iana"},"application/vnd.afpc.modca-overlay":{source:"iana"},"application/vnd.afpc.modca-pagesegment":{source:"iana"},"application/vnd.age":{source:"iana",extensions:["age"]},"application/vnd.ah-barcode":{source:"iana"},"application/vnd.ahead.space":{source:"iana",extensions:["ahead"]},"application/vnd.airzip.filesecure.azf":{source:"iana",extensions:["azf"]},"application/vnd.airzip.filesecure.azs":{source:"iana",extensions:["azs"]},"application/vnd.amadeus+json":{source:"iana",compressible:!0},"application/vnd.amazon.ebook":{source:"apache",extensions:["azw"]},"application/vnd.amazon.mobi8-ebook":{source:"iana"},"application/vnd.americandynamics.acc":{source:"iana",extensions:["acc"]},"application/vnd.amiga.ami":{source:"iana",extensions:["ami"]},"application/vnd.amundsen.maze+xml":{source:"iana",compressible:!0},"application/vnd.android.ota":{source:"iana"},"application/vnd.android.package-archive":{source:"apache",compressible:!1,extensions:["apk"]},"application/vnd.anki":{source:"iana"},"application/vnd.anser-web-certificate-issue-initiation":{source:"iana",extensions:["cii"]},"application/vnd.anser-web-funds-transfer-initiation":{source:"apache",extensions:["fti"]},"application/vnd.antix.game-component":{source:"iana",extensions:["atx"]},"application/vnd.apache.arrow.file":{source:"iana"},"application/vnd.apache.arrow.stream":{source:"iana"},"application/vnd.apache.thrift.binary":{source:"iana"},"application/vnd.apache.thrift.compact":{source:"iana"},"application/vnd.apache.thrift.json":{source:"iana"},"application/vnd.api+json":{source:"iana",compressible:!0},"application/vnd.aplextor.warrp+json":{source:"iana",compressible:!0},"application/vnd.apothekende.reservation+json":{source:"iana",compressible:!0},"application/vnd.apple.installer+xml":{source:"iana",compressible:!0,extensions:["mpkg"]},"application/vnd.apple.keynote":{source:"iana",extensions:["key"]},"application/vnd.apple.mpegurl":{source:"iana",extensions:["m3u8"]},"application/vnd.apple.numbers":{source:"iana",extensions:["numbers"]},"application/vnd.apple.pages":{source:"iana",extensions:["pages"]},"application/vnd.apple.pkpass":{compressible:!1,extensions:["pkpass"]},"application/vnd.arastra.swi":{source:"iana"},"application/vnd.aristanetworks.swi":{source:"iana",extensions:["swi"]},"application/vnd.artisan+json":{source:"iana",compressible:!0},"application/vnd.artsquare":{source:"iana"},"application/vnd.astraea-software.iota":{source:"iana",extensions:["iota"]},"application/vnd.audiograph":{source:"iana",extensions:["aep"]},"application/vnd.autopackage":{source:"iana"},"application/vnd.avalon+json":{source:"iana",compressible:!0},"application/vnd.avistar+xml":{source:"iana",compressible:!0},"application/vnd.balsamiq.bmml+xml":{source:"iana",compressible:!0,extensions:["bmml"]},"application/vnd.balsamiq.bmpr":{source:"iana"},"application/vnd.banana-accounting":{source:"iana"},"application/vnd.bbf.usp.error":{source:"iana"},"application/vnd.bbf.usp.msg":{source:"iana"},"application/vnd.bbf.usp.msg+json":{source:"iana",compressible:!0},"application/vnd.bekitzur-stech+json":{source:"iana",compressible:!0},"application/vnd.bint.med-content":{source:"iana"},"application/vnd.biopax.rdf+xml":{source:"iana",compressible:!0},"application/vnd.blink-idb-value-wrapper":{source:"iana"},"application/vnd.blueice.multipass":{source:"iana",extensions:["mpm"]},"application/vnd.bluetooth.ep.oob":{source:"iana"},"application/vnd.bluetooth.le.oob":{source:"iana"},"application/vnd.bmi":{source:"iana",extensions:["bmi"]},"application/vnd.bpf":{source:"iana"},"application/vnd.bpf3":{source:"iana"},"application/vnd.businessobjects":{source:"iana",extensions:["rep"]},"application/vnd.byu.uapi+json":{source:"iana",compressible:!0},"application/vnd.cab-jscript":{source:"iana"},"application/vnd.canon-cpdl":{source:"iana"},"application/vnd.canon-lips":{source:"iana"},"application/vnd.capasystems-pg+json":{source:"iana",compressible:!0},"application/vnd.cendio.thinlinc.clientconf":{source:"iana"},"application/vnd.century-systems.tcp_stream":{source:"iana"},"application/vnd.chemdraw+xml":{source:"iana",compressible:!0,extensions:["cdxml"]},"application/vnd.chess-pgn":{source:"iana"},"application/vnd.chipnuts.karaoke-mmd":{source:"iana",extensions:["mmd"]},"application/vnd.ciedi":{source:"iana"},"application/vnd.cinderella":{source:"iana",extensions:["cdy"]},"application/vnd.cirpack.isdn-ext":{source:"iana"},"application/vnd.citationstyles.style+xml":{source:"iana",compressible:!0,extensions:["csl"]},"application/vnd.claymore":{source:"iana",extensions:["cla"]},"application/vnd.cloanto.rp9":{source:"iana",extensions:["rp9"]},"application/vnd.clonk.c4group":{source:"iana",extensions:["c4g","c4d","c4f","c4p","c4u"]},"application/vnd.cluetrust.cartomobile-config":{source:"iana",extensions:["c11amc"]},"application/vnd.cluetrust.cartomobile-config-pkg":{source:"iana",extensions:["c11amz"]},"application/vnd.coffeescript":{source:"iana"},"application/vnd.collabio.xodocuments.document":{source:"iana"},"application/vnd.collabio.xodocuments.document-template":{source:"iana"},"application/vnd.collabio.xodocuments.presentation":{source:"iana"},"application/vnd.collabio.xodocuments.presentation-template":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet":{source:"iana"},"application/vnd.collabio.xodocuments.spreadsheet-template":{source:"iana"},"application/vnd.collection+json":{source:"iana",compressible:!0},"application/vnd.collection.doc+json":{source:"iana",compressible:!0},"application/vnd.collection.next+json":{source:"iana",compressible:!0},"application/vnd.comicbook+zip":{source:"iana",compressible:!1},"application/vnd.comicbook-rar":{source:"iana"},"application/vnd.commerce-battelle":{source:"iana"},"application/vnd.commonspace":{source:"iana",extensions:["csp"]},"application/vnd.contact.cmsg":{source:"iana",extensions:["cdbcmsg"]},"application/vnd.coreos.ignition+json":{source:"iana",compressible:!0},"application/vnd.cosmocaller":{source:"iana",extensions:["cmc"]},"application/vnd.crick.clicker":{source:"iana",extensions:["clkx"]},"application/vnd.crick.clicker.keyboard":{source:"iana",extensions:["clkk"]},"application/vnd.crick.clicker.palette":{source:"iana",extensions:["clkp"]},"application/vnd.crick.clicker.template":{source:"iana",extensions:["clkt"]},"application/vnd.crick.clicker.wordbank":{source:"iana",extensions:["clkw"]},"application/vnd.criticaltools.wbs+xml":{source:"iana",compressible:!0,extensions:["wbs"]},"application/vnd.cryptii.pipe+json":{source:"iana",compressible:!0},"application/vnd.crypto-shade-file":{source:"iana"},"application/vnd.cryptomator.encrypted":{source:"iana"},"application/vnd.cryptomator.vault":{source:"iana"},"application/vnd.ctc-posml":{source:"iana",extensions:["pml"]},"application/vnd.ctct.ws+xml":{source:"iana",compressible:!0},"application/vnd.cups-pdf":{source:"iana"},"application/vnd.cups-postscript":{source:"iana"},"application/vnd.cups-ppd":{source:"iana",extensions:["ppd"]},"application/vnd.cups-raster":{source:"iana"},"application/vnd.cups-raw":{source:"iana"},"application/vnd.curl":{source:"iana"},"application/vnd.curl.car":{source:"apache",extensions:["car"]},"application/vnd.curl.pcurl":{source:"apache",extensions:["pcurl"]},"application/vnd.cyan.dean.root+xml":{source:"iana",compressible:!0},"application/vnd.cybank":{source:"iana"},"application/vnd.cyclonedx+json":{source:"iana",compressible:!0},"application/vnd.cyclonedx+xml":{source:"iana",compressible:!0},"application/vnd.d2l.coursepackage1p0+zip":{source:"iana",compressible:!1},"application/vnd.d3m-dataset":{source:"iana"},"application/vnd.d3m-problem":{source:"iana"},"application/vnd.dart":{source:"iana",compressible:!0,extensions:["dart"]},"application/vnd.data-vision.rdz":{source:"iana",extensions:["rdz"]},"application/vnd.datapackage+json":{source:"iana",compressible:!0},"application/vnd.dataresource+json":{source:"iana",compressible:!0},"application/vnd.dbf":{source:"iana",extensions:["dbf"]},"application/vnd.debian.binary-package":{source:"iana"},"application/vnd.dece.data":{source:"iana",extensions:["uvf","uvvf","uvd","uvvd"]},"application/vnd.dece.ttml+xml":{source:"iana",compressible:!0,extensions:["uvt","uvvt"]},"application/vnd.dece.unspecified":{source:"iana",extensions:["uvx","uvvx"]},"application/vnd.dece.zip":{source:"iana",extensions:["uvz","uvvz"]},"application/vnd.denovo.fcselayout-link":{source:"iana",extensions:["fe_launch"]},"application/vnd.desmume.movie":{source:"iana"},"application/vnd.dir-bi.plate-dl-nosuffix":{source:"iana"},"application/vnd.dm.delegation+xml":{source:"iana",compressible:!0},"application/vnd.dna":{source:"iana",extensions:["dna"]},"application/vnd.document+json":{source:"iana",compressible:!0},"application/vnd.dolby.mlp":{source:"apache",extensions:["mlp"]},"application/vnd.dolby.mobile.1":{source:"iana"},"application/vnd.dolby.mobile.2":{source:"iana"},"application/vnd.doremir.scorecloud-binary-document":{source:"iana"},"application/vnd.dpgraph":{source:"iana",extensions:["dpg"]},"application/vnd.dreamfactory":{source:"iana",extensions:["dfac"]},"application/vnd.drive+json":{source:"iana",compressible:!0},"application/vnd.ds-keypoint":{source:"apache",extensions:["kpxx"]},"application/vnd.dtg.local":{source:"iana"},"application/vnd.dtg.local.flash":{source:"iana"},"application/vnd.dtg.local.html":{source:"iana"},"application/vnd.dvb.ait":{source:"iana",extensions:["ait"]},"application/vnd.dvb.dvbisl+xml":{source:"iana",compressible:!0},"application/vnd.dvb.dvbj":{source:"iana"},"application/vnd.dvb.esgcontainer":{source:"iana"},"application/vnd.dvb.ipdcdftnotifaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess":{source:"iana"},"application/vnd.dvb.ipdcesgaccess2":{source:"iana"},"application/vnd.dvb.ipdcesgpdd":{source:"iana"},"application/vnd.dvb.ipdcroaming":{source:"iana"},"application/vnd.dvb.iptv.alfec-base":{source:"iana"},"application/vnd.dvb.iptv.alfec-enhancement":{source:"iana"},"application/vnd.dvb.notif-aggregate-root+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-container+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-generic+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-msglist+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-request+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-ia-registration-response+xml":{source:"iana",compressible:!0},"application/vnd.dvb.notif-init+xml":{source:"iana",compressible:!0},"application/vnd.dvb.pfr":{source:"iana"},"application/vnd.dvb.service":{source:"iana",extensions:["svc"]},"application/vnd.dxr":{source:"iana"},"application/vnd.dynageo":{source:"iana",extensions:["geo"]},"application/vnd.dzr":{source:"iana"},"application/vnd.easykaraoke.cdgdownload":{source:"iana"},"application/vnd.ecdis-update":{source:"iana"},"application/vnd.ecip.rlp":{source:"iana"},"application/vnd.eclipse.ditto+json":{source:"iana",compressible:!0},"application/vnd.ecowin.chart":{source:"iana",extensions:["mag"]},"application/vnd.ecowin.filerequest":{source:"iana"},"application/vnd.ecowin.fileupdate":{source:"iana"},"application/vnd.ecowin.series":{source:"iana"},"application/vnd.ecowin.seriesrequest":{source:"iana"},"application/vnd.ecowin.seriesupdate":{source:"iana"},"application/vnd.efi.img":{source:"iana"},"application/vnd.efi.iso":{source:"iana"},"application/vnd.emclient.accessrequest+xml":{source:"iana",compressible:!0},"application/vnd.enliven":{source:"iana",extensions:["nml"]},"application/vnd.enphase.envoy":{source:"iana"},"application/vnd.eprints.data+xml":{source:"iana",compressible:!0},"application/vnd.epson.esf":{source:"iana",extensions:["esf"]},"application/vnd.epson.msf":{source:"iana",extensions:["msf"]},"application/vnd.epson.quickanime":{source:"iana",extensions:["qam"]},"application/vnd.epson.salt":{source:"iana",extensions:["slt"]},"application/vnd.epson.ssf":{source:"iana",extensions:["ssf"]},"application/vnd.ericsson.quickcall":{source:"iana"},"application/vnd.espass-espass+zip":{source:"iana",compressible:!1},"application/vnd.eszigno3+xml":{source:"iana",compressible:!0,extensions:["es3","et3"]},"application/vnd.etsi.aoc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.asic-e+zip":{source:"iana",compressible:!1},"application/vnd.etsi.asic-s+zip":{source:"iana",compressible:!1},"application/vnd.etsi.cug+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvcommand+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-bc+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-cod+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsad-npvr+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvservice+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvsync+xml":{source:"iana",compressible:!0},"application/vnd.etsi.iptvueprofile+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mcid+xml":{source:"iana",compressible:!0},"application/vnd.etsi.mheg5":{source:"iana"},"application/vnd.etsi.overload-control-policy-dataset+xml":{source:"iana",compressible:!0},"application/vnd.etsi.pstn+xml":{source:"iana",compressible:!0},"application/vnd.etsi.sci+xml":{source:"iana",compressible:!0},"application/vnd.etsi.simservs+xml":{source:"iana",compressible:!0},"application/vnd.etsi.timestamp-token":{source:"iana"},"application/vnd.etsi.tsl+xml":{source:"iana",compressible:!0},"application/vnd.etsi.tsl.der":{source:"iana"},"application/vnd.eu.kasparian.car+json":{source:"iana",compressible:!0},"application/vnd.eudora.data":{source:"iana"},"application/vnd.evolv.ecig.profile":{source:"iana"},"application/vnd.evolv.ecig.settings":{source:"iana"},"application/vnd.evolv.ecig.theme":{source:"iana"},"application/vnd.exstream-empower+zip":{source:"iana",compressible:!1},"application/vnd.exstream-package":{source:"iana"},"application/vnd.ezpix-album":{source:"iana",extensions:["ez2"]},"application/vnd.ezpix-package":{source:"iana",extensions:["ez3"]},"application/vnd.f-secure.mobile":{source:"iana"},"application/vnd.familysearch.gedcom+zip":{source:"iana",compressible:!1},"application/vnd.fastcopy-disk-image":{source:"iana"},"application/vnd.fdf":{source:"iana",extensions:["fdf"]},"application/vnd.fdsn.mseed":{source:"iana",extensions:["mseed"]},"application/vnd.fdsn.seed":{source:"iana",extensions:["seed","dataless"]},"application/vnd.ffsns":{source:"iana"},"application/vnd.ficlab.flb+zip":{source:"iana",compressible:!1},"application/vnd.filmit.zfc":{source:"iana"},"application/vnd.fints":{source:"iana"},"application/vnd.firemonkeys.cloudcell":{source:"iana"},"application/vnd.flographit":{source:"iana",extensions:["gph"]},"application/vnd.fluxtime.clip":{source:"iana",extensions:["ftc"]},"application/vnd.font-fontforge-sfd":{source:"iana"},"application/vnd.framemaker":{source:"iana",extensions:["fm","frame","maker","book"]},"application/vnd.frogans.fnc":{source:"iana",extensions:["fnc"]},"application/vnd.frogans.ltf":{source:"iana",extensions:["ltf"]},"application/vnd.fsc.weblaunch":{source:"iana",extensions:["fsc"]},"application/vnd.fujifilm.fb.docuworks":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.binder":{source:"iana"},"application/vnd.fujifilm.fb.docuworks.container":{source:"iana"},"application/vnd.fujifilm.fb.jfi+xml":{source:"iana",compressible:!0},"application/vnd.fujitsu.oasys":{source:"iana",extensions:["oas"]},"application/vnd.fujitsu.oasys2":{source:"iana",extensions:["oa2"]},"application/vnd.fujitsu.oasys3":{source:"iana",extensions:["oa3"]},"application/vnd.fujitsu.oasysgp":{source:"iana",extensions:["fg5"]},"application/vnd.fujitsu.oasysprs":{source:"iana",extensions:["bh2"]},"application/vnd.fujixerox.art-ex":{source:"iana"},"application/vnd.fujixerox.art4":{source:"iana"},"application/vnd.fujixerox.ddd":{source:"iana",extensions:["ddd"]},"application/vnd.fujixerox.docuworks":{source:"iana",extensions:["xdw"]},"application/vnd.fujixerox.docuworks.binder":{source:"iana",extensions:["xbd"]},"application/vnd.fujixerox.docuworks.container":{source:"iana"},"application/vnd.fujixerox.hbpl":{source:"iana"},"application/vnd.fut-misnet":{source:"iana"},"application/vnd.futoin+cbor":{source:"iana"},"application/vnd.futoin+json":{source:"iana",compressible:!0},"application/vnd.fuzzysheet":{source:"iana",extensions:["fzs"]},"application/vnd.genomatix.tuxedo":{source:"iana",extensions:["txd"]},"application/vnd.gentics.grd+json":{source:"iana",compressible:!0},"application/vnd.geo+json":{source:"iana",compressible:!0},"application/vnd.geocube+xml":{source:"iana",compressible:!0},"application/vnd.geogebra.file":{source:"iana",extensions:["ggb"]},"application/vnd.geogebra.slides":{source:"iana"},"application/vnd.geogebra.tool":{source:"iana",extensions:["ggt"]},"application/vnd.geometry-explorer":{source:"iana",extensions:["gex","gre"]},"application/vnd.geonext":{source:"iana",extensions:["gxt"]},"application/vnd.geoplan":{source:"iana",extensions:["g2w"]},"application/vnd.geospace":{source:"iana",extensions:["g3w"]},"application/vnd.gerber":{source:"iana"},"application/vnd.globalplatform.card-content-mgt":{source:"iana"},"application/vnd.globalplatform.card-content-mgt-response":{source:"iana"},"application/vnd.gmx":{source:"iana",extensions:["gmx"]},"application/vnd.google-apps.document":{compressible:!1,extensions:["gdoc"]},"application/vnd.google-apps.presentation":{compressible:!1,extensions:["gslides"]},"application/vnd.google-apps.spreadsheet":{compressible:!1,extensions:["gsheet"]},"application/vnd.google-earth.kml+xml":{source:"iana",compressible:!0,extensions:["kml"]},"application/vnd.google-earth.kmz":{source:"iana",compressible:!1,extensions:["kmz"]},"application/vnd.gov.sk.e-form+xml":{source:"iana",compressible:!0},"application/vnd.gov.sk.e-form+zip":{source:"iana",compressible:!1},"application/vnd.gov.sk.xmldatacontainer+xml":{source:"iana",compressible:!0},"application/vnd.grafeq":{source:"iana",extensions:["gqf","gqs"]},"application/vnd.gridmp":{source:"iana"},"application/vnd.groove-account":{source:"iana",extensions:["gac"]},"application/vnd.groove-help":{source:"iana",extensions:["ghf"]},"application/vnd.groove-identity-message":{source:"iana",extensions:["gim"]},"application/vnd.groove-injector":{source:"iana",extensions:["grv"]},"application/vnd.groove-tool-message":{source:"iana",extensions:["gtm"]},"application/vnd.groove-tool-template":{source:"iana",extensions:["tpl"]},"application/vnd.groove-vcard":{source:"iana",extensions:["vcg"]},"application/vnd.hal+json":{source:"iana",compressible:!0},"application/vnd.hal+xml":{source:"iana",compressible:!0,extensions:["hal"]},"application/vnd.handheld-entertainment+xml":{source:"iana",compressible:!0,extensions:["zmm"]},"application/vnd.hbci":{source:"iana",extensions:["hbci"]},"application/vnd.hc+json":{source:"iana",compressible:!0},"application/vnd.hcl-bireports":{source:"iana"},"application/vnd.hdt":{source:"iana"},"application/vnd.heroku+json":{source:"iana",compressible:!0},"application/vnd.hhe.lesson-player":{source:"iana",extensions:["les"]},"application/vnd.hl7cda+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hl7v2+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.hp-hpgl":{source:"iana",extensions:["hpgl"]},"application/vnd.hp-hpid":{source:"iana",extensions:["hpid"]},"application/vnd.hp-hps":{source:"iana",extensions:["hps"]},"application/vnd.hp-jlyt":{source:"iana",extensions:["jlt"]},"application/vnd.hp-pcl":{source:"iana",extensions:["pcl"]},"application/vnd.hp-pclxl":{source:"iana",extensions:["pclxl"]},"application/vnd.httphone":{source:"iana"},"application/vnd.hydrostatix.sof-data":{source:"iana",extensions:["sfd-hdstx"]},"application/vnd.hyper+json":{source:"iana",compressible:!0},"application/vnd.hyper-item+json":{source:"iana",compressible:!0},"application/vnd.hyperdrive+json":{source:"iana",compressible:!0},"application/vnd.hzn-3d-crossword":{source:"iana"},"application/vnd.ibm.afplinedata":{source:"iana"},"application/vnd.ibm.electronic-media":{source:"iana"},"application/vnd.ibm.minipay":{source:"iana",extensions:["mpy"]},"application/vnd.ibm.modcap":{source:"iana",extensions:["afp","listafp","list3820"]},"application/vnd.ibm.rights-management":{source:"iana",extensions:["irm"]},"application/vnd.ibm.secure-container":{source:"iana",extensions:["sc"]},"application/vnd.iccprofile":{source:"iana",extensions:["icc","icm"]},"application/vnd.ieee.1905":{source:"iana"},"application/vnd.igloader":{source:"iana",extensions:["igl"]},"application/vnd.imagemeter.folder+zip":{source:"iana",compressible:!1},"application/vnd.imagemeter.image+zip":{source:"iana",compressible:!1},"application/vnd.immervision-ivp":{source:"iana",extensions:["ivp"]},"application/vnd.immervision-ivu":{source:"iana",extensions:["ivu"]},"application/vnd.ims.imsccv1p1":{source:"iana"},"application/vnd.ims.imsccv1p2":{source:"iana"},"application/vnd.ims.imsccv1p3":{source:"iana"},"application/vnd.ims.lis.v2.result+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolconsumerprofile+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolproxy.id+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings+json":{source:"iana",compressible:!0},"application/vnd.ims.lti.v2.toolsettings.simple+json":{source:"iana",compressible:!0},"application/vnd.informedcontrol.rms+xml":{source:"iana",compressible:!0},"application/vnd.informix-visionary":{source:"iana"},"application/vnd.infotech.project":{source:"iana"},"application/vnd.infotech.project+xml":{source:"iana",compressible:!0},"application/vnd.innopath.wamp.notification":{source:"iana"},"application/vnd.insors.igm":{source:"iana",extensions:["igm"]},"application/vnd.intercon.formnet":{source:"iana",extensions:["xpw","xpx"]},"application/vnd.intergeo":{source:"iana",extensions:["i2g"]},"application/vnd.intertrust.digibox":{source:"iana"},"application/vnd.intertrust.nncp":{source:"iana"},"application/vnd.intu.qbo":{source:"iana",extensions:["qbo"]},"application/vnd.intu.qfx":{source:"iana",extensions:["qfx"]},"application/vnd.iptc.g2.catalogitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.conceptitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.knowledgeitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.newsmessage+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.packageitem+xml":{source:"iana",compressible:!0},"application/vnd.iptc.g2.planningitem+xml":{source:"iana",compressible:!0},"application/vnd.ipunplugged.rcprofile":{source:"iana",extensions:["rcprofile"]},"application/vnd.irepository.package+xml":{source:"iana",compressible:!0,extensions:["irp"]},"application/vnd.is-xpr":{source:"iana",extensions:["xpr"]},"application/vnd.isac.fcs":{source:"iana",extensions:["fcs"]},"application/vnd.iso11783-10+zip":{source:"iana",compressible:!1},"application/vnd.jam":{source:"iana",extensions:["jam"]},"application/vnd.japannet-directory-service":{source:"iana"},"application/vnd.japannet-jpnstore-wakeup":{source:"iana"},"application/vnd.japannet-payment-wakeup":{source:"iana"},"application/vnd.japannet-registration":{source:"iana"},"application/vnd.japannet-registration-wakeup":{source:"iana"},"application/vnd.japannet-setstore-wakeup":{source:"iana"},"application/vnd.japannet-verification":{source:"iana"},"application/vnd.japannet-verification-wakeup":{source:"iana"},"application/vnd.jcp.javame.midlet-rms":{source:"iana",extensions:["rms"]},"application/vnd.jisp":{source:"iana",extensions:["jisp"]},"application/vnd.joost.joda-archive":{source:"iana",extensions:["joda"]},"application/vnd.jsk.isdn-ngn":{source:"iana"},"application/vnd.kahootz":{source:"iana",extensions:["ktz","ktr"]},"application/vnd.kde.karbon":{source:"iana",extensions:["karbon"]},"application/vnd.kde.kchart":{source:"iana",extensions:["chrt"]},"application/vnd.kde.kformula":{source:"iana",extensions:["kfo"]},"application/vnd.kde.kivio":{source:"iana",extensions:["flw"]},"application/vnd.kde.kontour":{source:"iana",extensions:["kon"]},"application/vnd.kde.kpresenter":{source:"iana",extensions:["kpr","kpt"]},"application/vnd.kde.kspread":{source:"iana",extensions:["ksp"]},"application/vnd.kde.kword":{source:"iana",extensions:["kwd","kwt"]},"application/vnd.kenameaapp":{source:"iana",extensions:["htke"]},"application/vnd.kidspiration":{source:"iana",extensions:["kia"]},"application/vnd.kinar":{source:"iana",extensions:["kne","knp"]},"application/vnd.koan":{source:"iana",extensions:["skp","skd","skt","skm"]},"application/vnd.kodak-descriptor":{source:"iana",extensions:["sse"]},"application/vnd.las":{source:"iana"},"application/vnd.las.las+json":{source:"iana",compressible:!0},"application/vnd.las.las+xml":{source:"iana",compressible:!0,extensions:["lasxml"]},"application/vnd.laszip":{source:"iana"},"application/vnd.leap+json":{source:"iana",compressible:!0},"application/vnd.liberty-request+xml":{source:"iana",compressible:!0},"application/vnd.llamagraphics.life-balance.desktop":{source:"iana",extensions:["lbd"]},"application/vnd.llamagraphics.life-balance.exchange+xml":{source:"iana",compressible:!0,extensions:["lbe"]},"application/vnd.logipipe.circuit+zip":{source:"iana",compressible:!1},"application/vnd.loom":{source:"iana"},"application/vnd.lotus-1-2-3":{source:"iana",extensions:["123"]},"application/vnd.lotus-approach":{source:"iana",extensions:["apr"]},"application/vnd.lotus-freelance":{source:"iana",extensions:["pre"]},"application/vnd.lotus-notes":{source:"iana",extensions:["nsf"]},"application/vnd.lotus-organizer":{source:"iana",extensions:["org"]},"application/vnd.lotus-screencam":{source:"iana",extensions:["scm"]},"application/vnd.lotus-wordpro":{source:"iana",extensions:["lwp"]},"application/vnd.macports.portpkg":{source:"iana",extensions:["portpkg"]},"application/vnd.mapbox-vector-tile":{source:"iana",extensions:["mvt"]},"application/vnd.marlin.drm.actiontoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.conftoken+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.license+xml":{source:"iana",compressible:!0},"application/vnd.marlin.drm.mdcf":{source:"iana"},"application/vnd.mason+json":{source:"iana",compressible:!0},"application/vnd.maxar.archive.3tz+zip":{source:"iana",compressible:!1},"application/vnd.maxmind.maxmind-db":{source:"iana"},"application/vnd.mcd":{source:"iana",extensions:["mcd"]},"application/vnd.medcalcdata":{source:"iana",extensions:["mc1"]},"application/vnd.mediastation.cdkey":{source:"iana",extensions:["cdkey"]},"application/vnd.meridian-slingshot":{source:"iana"},"application/vnd.mfer":{source:"iana",extensions:["mwf"]},"application/vnd.mfmp":{source:"iana",extensions:["mfm"]},"application/vnd.micro+json":{source:"iana",compressible:!0},"application/vnd.micrografx.flo":{source:"iana",extensions:["flo"]},"application/vnd.micrografx.igx":{source:"iana",extensions:["igx"]},"application/vnd.microsoft.portable-executable":{source:"iana"},"application/vnd.microsoft.windows.thumbnail-cache":{source:"iana"},"application/vnd.miele+json":{source:"iana",compressible:!0},"application/vnd.mif":{source:"iana",extensions:["mif"]},"application/vnd.minisoft-hp3000-save":{source:"iana"},"application/vnd.mitsubishi.misty-guard.trustweb":{source:"iana"},"application/vnd.mobius.daf":{source:"iana",extensions:["daf"]},"application/vnd.mobius.dis":{source:"iana",extensions:["dis"]},"application/vnd.mobius.mbk":{source:"iana",extensions:["mbk"]},"application/vnd.mobius.mqy":{source:"iana",extensions:["mqy"]},"application/vnd.mobius.msl":{source:"iana",extensions:["msl"]},"application/vnd.mobius.plc":{source:"iana",extensions:["plc"]},"application/vnd.mobius.txf":{source:"iana",extensions:["txf"]},"application/vnd.mophun.application":{source:"iana",extensions:["mpn"]},"application/vnd.mophun.certificate":{source:"iana",extensions:["mpc"]},"application/vnd.motorola.flexsuite":{source:"iana"},"application/vnd.motorola.flexsuite.adsi":{source:"iana"},"application/vnd.motorola.flexsuite.fis":{source:"iana"},"application/vnd.motorola.flexsuite.gotap":{source:"iana"},"application/vnd.motorola.flexsuite.kmr":{source:"iana"},"application/vnd.motorola.flexsuite.ttc":{source:"iana"},"application/vnd.motorola.flexsuite.wem":{source:"iana"},"application/vnd.motorola.iprm":{source:"iana"},"application/vnd.mozilla.xul+xml":{source:"iana",compressible:!0,extensions:["xul"]},"application/vnd.ms-3mfdocument":{source:"iana"},"application/vnd.ms-artgalry":{source:"iana",extensions:["cil"]},"application/vnd.ms-asf":{source:"iana"},"application/vnd.ms-cab-compressed":{source:"iana",extensions:["cab"]},"application/vnd.ms-color.iccprofile":{source:"apache"},"application/vnd.ms-excel":{source:"iana",compressible:!1,extensions:["xls","xlm","xla","xlc","xlt","xlw"]},"application/vnd.ms-excel.addin.macroenabled.12":{source:"iana",extensions:["xlam"]},"application/vnd.ms-excel.sheet.binary.macroenabled.12":{source:"iana",extensions:["xlsb"]},"application/vnd.ms-excel.sheet.macroenabled.12":{source:"iana",extensions:["xlsm"]},"application/vnd.ms-excel.template.macroenabled.12":{source:"iana",extensions:["xltm"]},"application/vnd.ms-fontobject":{source:"iana",compressible:!0,extensions:["eot"]},"application/vnd.ms-htmlhelp":{source:"iana",extensions:["chm"]},"application/vnd.ms-ims":{source:"iana",extensions:["ims"]},"application/vnd.ms-lrm":{source:"iana",extensions:["lrm"]},"application/vnd.ms-office.activex+xml":{source:"iana",compressible:!0},"application/vnd.ms-officetheme":{source:"iana",extensions:["thmx"]},"application/vnd.ms-opentype":{source:"apache",compressible:!0},"application/vnd.ms-outlook":{compressible:!1,extensions:["msg"]},"application/vnd.ms-package.obfuscated-opentype":{source:"apache"},"application/vnd.ms-pki.seccat":{source:"apache",extensions:["cat"]},"application/vnd.ms-pki.stl":{source:"apache",extensions:["stl"]},"application/vnd.ms-playready.initiator+xml":{source:"iana",compressible:!0},"application/vnd.ms-powerpoint":{source:"iana",compressible:!1,extensions:["ppt","pps","pot"]},"application/vnd.ms-powerpoint.addin.macroenabled.12":{source:"iana",extensions:["ppam"]},"application/vnd.ms-powerpoint.presentation.macroenabled.12":{source:"iana",extensions:["pptm"]},"application/vnd.ms-powerpoint.slide.macroenabled.12":{source:"iana",extensions:["sldm"]},"application/vnd.ms-powerpoint.slideshow.macroenabled.12":{source:"iana",extensions:["ppsm"]},"application/vnd.ms-powerpoint.template.macroenabled.12":{source:"iana",extensions:["potm"]},"application/vnd.ms-printdevicecapabilities+xml":{source:"iana",compressible:!0},"application/vnd.ms-printing.printticket+xml":{source:"apache",compressible:!0},"application/vnd.ms-printschematicket+xml":{source:"iana",compressible:!0},"application/vnd.ms-project":{source:"iana",extensions:["mpp","mpt"]},"application/vnd.ms-tnef":{source:"iana"},"application/vnd.ms-windows.devicepairing":{source:"iana"},"application/vnd.ms-windows.nwprinting.oob":{source:"iana"},"application/vnd.ms-windows.printerpairing":{source:"iana"},"application/vnd.ms-windows.wsd.oob":{source:"iana"},"application/vnd.ms-wmdrm.lic-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.lic-resp":{source:"iana"},"application/vnd.ms-wmdrm.meter-chlg-req":{source:"iana"},"application/vnd.ms-wmdrm.meter-resp":{source:"iana"},"application/vnd.ms-word.document.macroenabled.12":{source:"iana",extensions:["docm"]},"application/vnd.ms-word.template.macroenabled.12":{source:"iana",extensions:["dotm"]},"application/vnd.ms-works":{source:"iana",extensions:["wps","wks","wcm","wdb"]},"application/vnd.ms-wpl":{source:"iana",extensions:["wpl"]},"application/vnd.ms-xpsdocument":{source:"iana",compressible:!1,extensions:["xps"]},"application/vnd.msa-disk-image":{source:"iana"},"application/vnd.mseq":{source:"iana",extensions:["mseq"]},"application/vnd.msign":{source:"iana"},"application/vnd.multiad.creator":{source:"iana"},"application/vnd.multiad.creator.cif":{source:"iana"},"application/vnd.music-niff":{source:"iana"},"application/vnd.musician":{source:"iana",extensions:["mus"]},"application/vnd.muvee.style":{source:"iana",extensions:["msty"]},"application/vnd.mynfc":{source:"iana",extensions:["taglet"]},"application/vnd.nacamar.ybrid+json":{source:"iana",compressible:!0},"application/vnd.ncd.control":{source:"iana"},"application/vnd.ncd.reference":{source:"iana"},"application/vnd.nearst.inv+json":{source:"iana",compressible:!0},"application/vnd.nebumind.line":{source:"iana"},"application/vnd.nervana":{source:"iana"},"application/vnd.netfpx":{source:"iana"},"application/vnd.neurolanguage.nlu":{source:"iana",extensions:["nlu"]},"application/vnd.nimn":{source:"iana"},"application/vnd.nintendo.nitro.rom":{source:"iana"},"application/vnd.nintendo.snes.rom":{source:"iana"},"application/vnd.nitf":{source:"iana",extensions:["ntf","nitf"]},"application/vnd.noblenet-directory":{source:"iana",extensions:["nnd"]},"application/vnd.noblenet-sealer":{source:"iana",extensions:["nns"]},"application/vnd.noblenet-web":{source:"iana",extensions:["nnw"]},"application/vnd.nokia.catalogs":{source:"iana"},"application/vnd.nokia.conml+wbxml":{source:"iana"},"application/vnd.nokia.conml+xml":{source:"iana",compressible:!0},"application/vnd.nokia.iptv.config+xml":{source:"iana",compressible:!0},"application/vnd.nokia.isds-radio-presets":{source:"iana"},"application/vnd.nokia.landmark+wbxml":{source:"iana"},"application/vnd.nokia.landmark+xml":{source:"iana",compressible:!0},"application/vnd.nokia.landmarkcollection+xml":{source:"iana",compressible:!0},"application/vnd.nokia.n-gage.ac+xml":{source:"iana",compressible:!0,extensions:["ac"]},"application/vnd.nokia.n-gage.data":{source:"iana",extensions:["ngdat"]},"application/vnd.nokia.n-gage.symbian.install":{source:"iana",extensions:["n-gage"]},"application/vnd.nokia.ncd":{source:"iana"},"application/vnd.nokia.pcd+wbxml":{source:"iana"},"application/vnd.nokia.pcd+xml":{source:"iana",compressible:!0},"application/vnd.nokia.radio-preset":{source:"iana",extensions:["rpst"]},"application/vnd.nokia.radio-presets":{source:"iana",extensions:["rpss"]},"application/vnd.novadigm.edm":{source:"iana",extensions:["edm"]},"application/vnd.novadigm.edx":{source:"iana",extensions:["edx"]},"application/vnd.novadigm.ext":{source:"iana",extensions:["ext"]},"application/vnd.ntt-local.content-share":{source:"iana"},"application/vnd.ntt-local.file-transfer":{source:"iana"},"application/vnd.ntt-local.ogw_remote-access":{source:"iana"},"application/vnd.ntt-local.sip-ta_remote":{source:"iana"},"application/vnd.ntt-local.sip-ta_tcp_stream":{source:"iana"},"application/vnd.oasis.opendocument.chart":{source:"iana",extensions:["odc"]},"application/vnd.oasis.opendocument.chart-template":{source:"iana",extensions:["otc"]},"application/vnd.oasis.opendocument.database":{source:"iana",extensions:["odb"]},"application/vnd.oasis.opendocument.formula":{source:"iana",extensions:["odf"]},"application/vnd.oasis.opendocument.formula-template":{source:"iana",extensions:["odft"]},"application/vnd.oasis.opendocument.graphics":{source:"iana",compressible:!1,extensions:["odg"]},"application/vnd.oasis.opendocument.graphics-template":{source:"iana",extensions:["otg"]},"application/vnd.oasis.opendocument.image":{source:"iana",extensions:["odi"]},"application/vnd.oasis.opendocument.image-template":{source:"iana",extensions:["oti"]},"application/vnd.oasis.opendocument.presentation":{source:"iana",compressible:!1,extensions:["odp"]},"application/vnd.oasis.opendocument.presentation-template":{source:"iana",extensions:["otp"]},"application/vnd.oasis.opendocument.spreadsheet":{source:"iana",compressible:!1,extensions:["ods"]},"application/vnd.oasis.opendocument.spreadsheet-template":{source:"iana",extensions:["ots"]},"application/vnd.oasis.opendocument.text":{source:"iana",compressible:!1,extensions:["odt"]},"application/vnd.oasis.opendocument.text-master":{source:"iana",extensions:["odm"]},"application/vnd.oasis.opendocument.text-template":{source:"iana",extensions:["ott"]},"application/vnd.oasis.opendocument.text-web":{source:"iana",extensions:["oth"]},"application/vnd.obn":{source:"iana"},"application/vnd.ocf+cbor":{source:"iana"},"application/vnd.oci.image.manifest.v1+json":{source:"iana",compressible:!0},"application/vnd.oftn.l10n+json":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessdownload+xml":{source:"iana",compressible:!0},"application/vnd.oipf.contentaccessstreaming+xml":{source:"iana",compressible:!0},"application/vnd.oipf.cspg-hexbinary":{source:"iana"},"application/vnd.oipf.dae.svg+xml":{source:"iana",compressible:!0},"application/vnd.oipf.dae.xhtml+xml":{source:"iana",compressible:!0},"application/vnd.oipf.mippvcontrolmessage+xml":{source:"iana",compressible:!0},"application/vnd.oipf.pae.gem":{source:"iana"},"application/vnd.oipf.spdiscovery+xml":{source:"iana",compressible:!0},"application/vnd.oipf.spdlist+xml":{source:"iana",compressible:!0},"application/vnd.oipf.ueprofile+xml":{source:"iana",compressible:!0},"application/vnd.oipf.userprofile+xml":{source:"iana",compressible:!0},"application/vnd.olpc-sugar":{source:"iana",extensions:["xo"]},"application/vnd.oma-scws-config":{source:"iana"},"application/vnd.oma-scws-http-request":{source:"iana"},"application/vnd.oma-scws-http-response":{source:"iana"},"application/vnd.oma.bcast.associated-procedure-parameter+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.drm-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.imd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.ltkm":{source:"iana"},"application/vnd.oma.bcast.notification+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.provisioningtrigger":{source:"iana"},"application/vnd.oma.bcast.sgboot":{source:"iana"},"application/vnd.oma.bcast.sgdd+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sgdu":{source:"iana"},"application/vnd.oma.bcast.simple-symbol-container":{source:"iana"},"application/vnd.oma.bcast.smartcard-trigger+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.sprov+xml":{source:"iana",compressible:!0},"application/vnd.oma.bcast.stkm":{source:"iana"},"application/vnd.oma.cab-address-book+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-feature-handler+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-pcc+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-subs-invite+xml":{source:"iana",compressible:!0},"application/vnd.oma.cab-user-prefs+xml":{source:"iana",compressible:!0},"application/vnd.oma.dcd":{source:"iana"},"application/vnd.oma.dcdc":{source:"iana"},"application/vnd.oma.dd2+xml":{source:"iana",compressible:!0,extensions:["dd2"]},"application/vnd.oma.drm.risd+xml":{source:"iana",compressible:!0},"application/vnd.oma.group-usage-list+xml":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+cbor":{source:"iana"},"application/vnd.oma.lwm2m+json":{source:"iana",compressible:!0},"application/vnd.oma.lwm2m+tlv":{source:"iana"},"application/vnd.oma.pal+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.detailed-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.final-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.groups+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.invocation-descriptor+xml":{source:"iana",compressible:!0},"application/vnd.oma.poc.optimized-progress-report+xml":{source:"iana",compressible:!0},"application/vnd.oma.push":{source:"iana"},"application/vnd.oma.scidm.messages+xml":{source:"iana",compressible:!0},"application/vnd.oma.xcap-directory+xml":{source:"iana",compressible:!0},"application/vnd.omads-email+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-file+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omads-folder+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.omaloc-supl-init":{source:"iana"},"application/vnd.onepager":{source:"iana"},"application/vnd.onepagertamp":{source:"iana"},"application/vnd.onepagertamx":{source:"iana"},"application/vnd.onepagertat":{source:"iana"},"application/vnd.onepagertatp":{source:"iana"},"application/vnd.onepagertatx":{source:"iana"},"application/vnd.openblox.game+xml":{source:"iana",compressible:!0,extensions:["obgx"]},"application/vnd.openblox.game-binary":{source:"iana"},"application/vnd.openeye.oeb":{source:"iana"},"application/vnd.openofficeorg.extension":{source:"apache",extensions:["oxt"]},"application/vnd.openstreetmap.data+xml":{source:"iana",compressible:!0,extensions:["osm"]},"application/vnd.opentimestamps.ots":{source:"iana"},"application/vnd.openxmlformats-officedocument.custom-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.customxmlproperties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawing+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chart+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.chartshapes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramcolors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramdata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramlayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.drawingml.diagramstyle+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.extended-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.commentauthors+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.handoutmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesmaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.notesslide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presentation":{source:"iana",compressible:!1,extensions:["pptx"]},"application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.presprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slide":{source:"iana",extensions:["sldx"]},"application/vnd.openxmlformats-officedocument.presentationml.slide+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidelayout+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slidemaster+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideshow":{source:"iana",extensions:["ppsx"]},"application/vnd.openxmlformats-officedocument.presentationml.slideshow.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.slideupdateinfo+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tablestyles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.tags+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.template":{source:"iana",extensions:["potx"]},"application/vnd.openxmlformats-officedocument.presentationml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.presentationml.viewprops+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.calcchain+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.chartsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.connections+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.dialogsheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.externallink+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcachedefinition+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivotcacherecords+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.pivottable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.querytable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionheaders+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.revisionlog+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sharedstrings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":{source:"iana",compressible:!1,extensions:["xlsx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.sheetmetadata+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.table+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.tablesinglecells+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.template":{source:"iana",extensions:["xltx"]},"application/vnd.openxmlformats-officedocument.spreadsheetml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.usernames+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.volatiledependencies+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.theme+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.themeoverride+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.vmldrawing":{source:"iana"},"application/vnd.openxmlformats-officedocument.wordprocessingml.comments+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document":{source:"iana",compressible:!1,extensions:["docx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.glossary+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.document.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.endnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.fonttable+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footer+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.footnotes+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.numbering+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.settings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.styles+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.template":{source:"iana",extensions:["dotx"]},"application/vnd.openxmlformats-officedocument.wordprocessingml.template.main+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-officedocument.wordprocessingml.websettings+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.core-properties+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.digital-signature-xmlsignature+xml":{source:"iana",compressible:!0},"application/vnd.openxmlformats-package.relationships+xml":{source:"iana",compressible:!0},"application/vnd.oracle.resource+json":{source:"iana",compressible:!0},"application/vnd.orange.indata":{source:"iana"},"application/vnd.osa.netdeploy":{source:"iana"},"application/vnd.osgeo.mapguide.package":{source:"iana",extensions:["mgp"]},"application/vnd.osgi.bundle":{source:"iana"},"application/vnd.osgi.dp":{source:"iana",extensions:["dp"]},"application/vnd.osgi.subsystem":{source:"iana",extensions:["esa"]},"application/vnd.otps.ct-kip+xml":{source:"iana",compressible:!0},"application/vnd.oxli.countgraph":{source:"iana"},"application/vnd.pagerduty+json":{source:"iana",compressible:!0},"application/vnd.palm":{source:"iana",extensions:["pdb","pqa","oprc"]},"application/vnd.panoply":{source:"iana"},"application/vnd.paos.xml":{source:"iana"},"application/vnd.patentdive":{source:"iana"},"application/vnd.patientecommsdoc":{source:"iana"},"application/vnd.pawaafile":{source:"iana",extensions:["paw"]},"application/vnd.pcos":{source:"iana"},"application/vnd.pg.format":{source:"iana",extensions:["str"]},"application/vnd.pg.osasli":{source:"iana",extensions:["ei6"]},"application/vnd.piaccess.application-licence":{source:"iana"},"application/vnd.picsel":{source:"iana",extensions:["efif"]},"application/vnd.pmi.widget":{source:"iana",extensions:["wg"]},"application/vnd.poc.group-advertisement+xml":{source:"iana",compressible:!0},"application/vnd.pocketlearn":{source:"iana",extensions:["plf"]},"application/vnd.powerbuilder6":{source:"iana",extensions:["pbd"]},"application/vnd.powerbuilder6-s":{source:"iana"},"application/vnd.powerbuilder7":{source:"iana"},"application/vnd.powerbuilder7-s":{source:"iana"},"application/vnd.powerbuilder75":{source:"iana"},"application/vnd.powerbuilder75-s":{source:"iana"},"application/vnd.preminet":{source:"iana"},"application/vnd.previewsystems.box":{source:"iana",extensions:["box"]},"application/vnd.proteus.magazine":{source:"iana",extensions:["mgz"]},"application/vnd.psfs":{source:"iana"},"application/vnd.publishare-delta-tree":{source:"iana",extensions:["qps"]},"application/vnd.pvi.ptid1":{source:"iana",extensions:["ptid"]},"application/vnd.pwg-multiplexed":{source:"iana"},"application/vnd.pwg-xhtml-print+xml":{source:"iana",compressible:!0},"application/vnd.qualcomm.brew-app-res":{source:"iana"},"application/vnd.quarantainenet":{source:"iana"},"application/vnd.quark.quarkxpress":{source:"iana",extensions:["qxd","qxt","qwd","qwt","qxl","qxb"]},"application/vnd.quobject-quoxdocument":{source:"iana"},"application/vnd.radisys.moml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-conn+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-audit-stream+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-conf+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-base+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-detect+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-fax-sendrecv+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-group+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-speech+xml":{source:"iana",compressible:!0},"application/vnd.radisys.msml-dialog-transform+xml":{source:"iana",compressible:!0},"application/vnd.rainstor.data":{source:"iana"},"application/vnd.rapid":{source:"iana"},"application/vnd.rar":{source:"iana",extensions:["rar"]},"application/vnd.realvnc.bed":{source:"iana",extensions:["bed"]},"application/vnd.recordare.musicxml":{source:"iana",extensions:["mxl"]},"application/vnd.recordare.musicxml+xml":{source:"iana",compressible:!0,extensions:["musicxml"]},"application/vnd.renlearn.rlprint":{source:"iana"},"application/vnd.resilient.logic":{source:"iana"},"application/vnd.restful+json":{source:"iana",compressible:!0},"application/vnd.rig.cryptonote":{source:"iana",extensions:["cryptonote"]},"application/vnd.rim.cod":{source:"apache",extensions:["cod"]},"application/vnd.rn-realmedia":{source:"apache",extensions:["rm"]},"application/vnd.rn-realmedia-vbr":{source:"apache",extensions:["rmvb"]},"application/vnd.route66.link66+xml":{source:"iana",compressible:!0,extensions:["link66"]},"application/vnd.rs-274x":{source:"iana"},"application/vnd.ruckus.download":{source:"iana"},"application/vnd.s3sms":{source:"iana"},"application/vnd.sailingtracker.track":{source:"iana",extensions:["st"]},"application/vnd.sar":{source:"iana"},"application/vnd.sbm.cid":{source:"iana"},"application/vnd.sbm.mid2":{source:"iana"},"application/vnd.scribus":{source:"iana"},"application/vnd.sealed.3df":{source:"iana"},"application/vnd.sealed.csf":{source:"iana"},"application/vnd.sealed.doc":{source:"iana"},"application/vnd.sealed.eml":{source:"iana"},"application/vnd.sealed.mht":{source:"iana"},"application/vnd.sealed.net":{source:"iana"},"application/vnd.sealed.ppt":{source:"iana"},"application/vnd.sealed.tiff":{source:"iana"},"application/vnd.sealed.xls":{source:"iana"},"application/vnd.sealedmedia.softseal.html":{source:"iana"},"application/vnd.sealedmedia.softseal.pdf":{source:"iana"},"application/vnd.seemail":{source:"iana",extensions:["see"]},"application/vnd.seis+json":{source:"iana",compressible:!0},"application/vnd.sema":{source:"iana",extensions:["sema"]},"application/vnd.semd":{source:"iana",extensions:["semd"]},"application/vnd.semf":{source:"iana",extensions:["semf"]},"application/vnd.shade-save-file":{source:"iana"},"application/vnd.shana.informed.formdata":{source:"iana",extensions:["ifm"]},"application/vnd.shana.informed.formtemplate":{source:"iana",extensions:["itp"]},"application/vnd.shana.informed.interchange":{source:"iana",extensions:["iif"]},"application/vnd.shana.informed.package":{source:"iana",extensions:["ipk"]},"application/vnd.shootproof+json":{source:"iana",compressible:!0},"application/vnd.shopkick+json":{source:"iana",compressible:!0},"application/vnd.shp":{source:"iana"},"application/vnd.shx":{source:"iana"},"application/vnd.sigrok.session":{source:"iana"},"application/vnd.simtech-mindmapper":{source:"iana",extensions:["twd","twds"]},"application/vnd.siren+json":{source:"iana",compressible:!0},"application/vnd.smaf":{source:"iana",extensions:["mmf"]},"application/vnd.smart.notebook":{source:"iana"},"application/vnd.smart.teacher":{source:"iana",extensions:["teacher"]},"application/vnd.snesdev-page-table":{source:"iana"},"application/vnd.software602.filler.form+xml":{source:"iana",compressible:!0,extensions:["fo"]},"application/vnd.software602.filler.form-xml-zip":{source:"iana"},"application/vnd.solent.sdkm+xml":{source:"iana",compressible:!0,extensions:["sdkm","sdkd"]},"application/vnd.spotfire.dxp":{source:"iana",extensions:["dxp"]},"application/vnd.spotfire.sfs":{source:"iana",extensions:["sfs"]},"application/vnd.sqlite3":{source:"iana"},"application/vnd.sss-cod":{source:"iana"},"application/vnd.sss-dtf":{source:"iana"},"application/vnd.sss-ntf":{source:"iana"},"application/vnd.stardivision.calc":{source:"apache",extensions:["sdc"]},"application/vnd.stardivision.draw":{source:"apache",extensions:["sda"]},"application/vnd.stardivision.impress":{source:"apache",extensions:["sdd"]},"application/vnd.stardivision.math":{source:"apache",extensions:["smf"]},"application/vnd.stardivision.writer":{source:"apache",extensions:["sdw","vor"]},"application/vnd.stardivision.writer-global":{source:"apache",extensions:["sgl"]},"application/vnd.stepmania.package":{source:"iana",extensions:["smzip"]},"application/vnd.stepmania.stepchart":{source:"iana",extensions:["sm"]},"application/vnd.street-stream":{source:"iana"},"application/vnd.sun.wadl+xml":{source:"iana",compressible:!0,extensions:["wadl"]},"application/vnd.sun.xml.calc":{source:"apache",extensions:["sxc"]},"application/vnd.sun.xml.calc.template":{source:"apache",extensions:["stc"]},"application/vnd.sun.xml.draw":{source:"apache",extensions:["sxd"]},"application/vnd.sun.xml.draw.template":{source:"apache",extensions:["std"]},"application/vnd.sun.xml.impress":{source:"apache",extensions:["sxi"]},"application/vnd.sun.xml.impress.template":{source:"apache",extensions:["sti"]},"application/vnd.sun.xml.math":{source:"apache",extensions:["sxm"]},"application/vnd.sun.xml.writer":{source:"apache",extensions:["sxw"]},"application/vnd.sun.xml.writer.global":{source:"apache",extensions:["sxg"]},"application/vnd.sun.xml.writer.template":{source:"apache",extensions:["stw"]},"application/vnd.sus-calendar":{source:"iana",extensions:["sus","susp"]},"application/vnd.svd":{source:"iana",extensions:["svd"]},"application/vnd.swiftview-ics":{source:"iana"},"application/vnd.sycle+xml":{source:"iana",compressible:!0},"application/vnd.syft+json":{source:"iana",compressible:!0},"application/vnd.symbian.install":{source:"apache",extensions:["sis","sisx"]},"application/vnd.syncml+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xsm"]},"application/vnd.syncml.dm+wbxml":{source:"iana",charset:"UTF-8",extensions:["bdm"]},"application/vnd.syncml.dm+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["xdm"]},"application/vnd.syncml.dm.notification":{source:"iana"},"application/vnd.syncml.dmddf+wbxml":{source:"iana"},"application/vnd.syncml.dmddf+xml":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["ddf"]},"application/vnd.syncml.dmtnds+wbxml":{source:"iana"},"application/vnd.syncml.dmtnds+xml":{source:"iana",charset:"UTF-8",compressible:!0},"application/vnd.syncml.ds.notification":{source:"iana"},"application/vnd.tableschema+json":{source:"iana",compressible:!0},"application/vnd.tao.intent-module-archive":{source:"iana",extensions:["tao"]},"application/vnd.tcpdump.pcap":{source:"iana",extensions:["pcap","cap","dmp"]},"application/vnd.think-cell.ppttc+json":{source:"iana",compressible:!0},"application/vnd.tmd.mediaflex.api+xml":{source:"iana",compressible:!0},"application/vnd.tml":{source:"iana"},"application/vnd.tmobile-livetv":{source:"iana",extensions:["tmo"]},"application/vnd.tri.onesource":{source:"iana"},"application/vnd.trid.tpt":{source:"iana",extensions:["tpt"]},"application/vnd.triscape.mxs":{source:"iana",extensions:["mxs"]},"application/vnd.trueapp":{source:"iana",extensions:["tra"]},"application/vnd.truedoc":{source:"iana"},"application/vnd.ubisoft.webplayer":{source:"iana"},"application/vnd.ufdl":{source:"iana",extensions:["ufd","ufdl"]},"application/vnd.uiq.theme":{source:"iana",extensions:["utz"]},"application/vnd.umajin":{source:"iana",extensions:["umj"]},"application/vnd.unity":{source:"iana",extensions:["unityweb"]},"application/vnd.uoml+xml":{source:"iana",compressible:!0,extensions:["uoml"]},"application/vnd.uplanet.alert":{source:"iana"},"application/vnd.uplanet.alert-wbxml":{source:"iana"},"application/vnd.uplanet.bearer-choice":{source:"iana"},"application/vnd.uplanet.bearer-choice-wbxml":{source:"iana"},"application/vnd.uplanet.cacheop":{source:"iana"},"application/vnd.uplanet.cacheop-wbxml":{source:"iana"},"application/vnd.uplanet.channel":{source:"iana"},"application/vnd.uplanet.channel-wbxml":{source:"iana"},"application/vnd.uplanet.list":{source:"iana"},"application/vnd.uplanet.list-wbxml":{source:"iana"},"application/vnd.uplanet.listcmd":{source:"iana"},"application/vnd.uplanet.listcmd-wbxml":{source:"iana"},"application/vnd.uplanet.signal":{source:"iana"},"application/vnd.uri-map":{source:"iana"},"application/vnd.valve.source.material":{source:"iana"},"application/vnd.vcx":{source:"iana",extensions:["vcx"]},"application/vnd.vd-study":{source:"iana"},"application/vnd.vectorworks":{source:"iana"},"application/vnd.vel+json":{source:"iana",compressible:!0},"application/vnd.verimatrix.vcas":{source:"iana"},"application/vnd.veritone.aion+json":{source:"iana",compressible:!0},"application/vnd.veryant.thin":{source:"iana"},"application/vnd.ves.encrypted":{source:"iana"},"application/vnd.vidsoft.vidconference":{source:"iana"},"application/vnd.visio":{source:"iana",extensions:["vsd","vst","vss","vsw"]},"application/vnd.visionary":{source:"iana",extensions:["vis"]},"application/vnd.vividence.scriptfile":{source:"iana"},"application/vnd.vsf":{source:"iana",extensions:["vsf"]},"application/vnd.wap.sic":{source:"iana"},"application/vnd.wap.slc":{source:"iana"},"application/vnd.wap.wbxml":{source:"iana",charset:"UTF-8",extensions:["wbxml"]},"application/vnd.wap.wmlc":{source:"iana",extensions:["wmlc"]},"application/vnd.wap.wmlscriptc":{source:"iana",extensions:["wmlsc"]},"application/vnd.webturbo":{source:"iana",extensions:["wtb"]},"application/vnd.wfa.dpp":{source:"iana"},"application/vnd.wfa.p2p":{source:"iana"},"application/vnd.wfa.wsc":{source:"iana"},"application/vnd.windows.devicepairing":{source:"iana"},"application/vnd.wmc":{source:"iana"},"application/vnd.wmf.bootstrap":{source:"iana"},"application/vnd.wolfram.mathematica":{source:"iana"},"application/vnd.wolfram.mathematica.package":{source:"iana"},"application/vnd.wolfram.player":{source:"iana",extensions:["nbp"]},"application/vnd.wordperfect":{source:"iana",extensions:["wpd"]},"application/vnd.wqd":{source:"iana",extensions:["wqd"]},"application/vnd.wrq-hp3000-labelled":{source:"iana"},"application/vnd.wt.stf":{source:"iana",extensions:["stf"]},"application/vnd.wv.csp+wbxml":{source:"iana"},"application/vnd.wv.csp+xml":{source:"iana",compressible:!0},"application/vnd.wv.ssp+xml":{source:"iana",compressible:!0},"application/vnd.xacml+json":{source:"iana",compressible:!0},"application/vnd.xara":{source:"iana",extensions:["xar"]},"application/vnd.xfdl":{source:"iana",extensions:["xfdl"]},"application/vnd.xfdl.webform":{source:"iana"},"application/vnd.xmi+xml":{source:"iana",compressible:!0},"application/vnd.xmpie.cpkg":{source:"iana"},"application/vnd.xmpie.dpkg":{source:"iana"},"application/vnd.xmpie.plan":{source:"iana"},"application/vnd.xmpie.ppkg":{source:"iana"},"application/vnd.xmpie.xlim":{source:"iana"},"application/vnd.yamaha.hv-dic":{source:"iana",extensions:["hvd"]},"application/vnd.yamaha.hv-script":{source:"iana",extensions:["hvs"]},"application/vnd.yamaha.hv-voice":{source:"iana",extensions:["hvp"]},"application/vnd.yamaha.openscoreformat":{source:"iana",extensions:["osf"]},"application/vnd.yamaha.openscoreformat.osfpvg+xml":{source:"iana",compressible:!0,extensions:["osfpvg"]},"application/vnd.yamaha.remote-setup":{source:"iana"},"application/vnd.yamaha.smaf-audio":{source:"iana",extensions:["saf"]},"application/vnd.yamaha.smaf-phrase":{source:"iana",extensions:["spf"]},"application/vnd.yamaha.through-ngn":{source:"iana"},"application/vnd.yamaha.tunnel-udpencap":{source:"iana"},"application/vnd.yaoweme":{source:"iana"},"application/vnd.yellowriver-custom-menu":{source:"iana",extensions:["cmp"]},"application/vnd.youtube.yt":{source:"iana"},"application/vnd.zul":{source:"iana",extensions:["zir","zirz"]},"application/vnd.zzazz.deck+xml":{source:"iana",compressible:!0,extensions:["zaz"]},"application/voicexml+xml":{source:"iana",compressible:!0,extensions:["vxml"]},"application/voucher-cms+json":{source:"iana",compressible:!0},"application/vq-rtcpxr":{source:"iana"},"application/wasm":{source:"iana",compressible:!0,extensions:["wasm"]},"application/watcherinfo+xml":{source:"iana",compressible:!0,extensions:["wif"]},"application/webpush-options+json":{source:"iana",compressible:!0},"application/whoispp-query":{source:"iana"},"application/whoispp-response":{source:"iana"},"application/widget":{source:"iana",extensions:["wgt"]},"application/winhlp":{source:"apache",extensions:["hlp"]},"application/wita":{source:"iana"},"application/wordperfect5.1":{source:"iana"},"application/wsdl+xml":{source:"iana",compressible:!0,extensions:["wsdl"]},"application/wspolicy+xml":{source:"iana",compressible:!0,extensions:["wspolicy"]},"application/x-7z-compressed":{source:"apache",compressible:!1,extensions:["7z"]},"application/x-abiword":{source:"apache",extensions:["abw"]},"application/x-ace-compressed":{source:"apache",extensions:["ace"]},"application/x-amf":{source:"apache"},"application/x-apple-diskimage":{source:"apache",extensions:["dmg"]},"application/x-arj":{compressible:!1,extensions:["arj"]},"application/x-authorware-bin":{source:"apache",extensions:["aab","x32","u32","vox"]},"application/x-authorware-map":{source:"apache",extensions:["aam"]},"application/x-authorware-seg":{source:"apache",extensions:["aas"]},"application/x-bcpio":{source:"apache",extensions:["bcpio"]},"application/x-bdoc":{compressible:!1,extensions:["bdoc"]},"application/x-bittorrent":{source:"apache",extensions:["torrent"]},"application/x-blorb":{source:"apache",extensions:["blb","blorb"]},"application/x-bzip":{source:"apache",compressible:!1,extensions:["bz"]},"application/x-bzip2":{source:"apache",compressible:!1,extensions:["bz2","boz"]},"application/x-cbr":{source:"apache",extensions:["cbr","cba","cbt","cbz","cb7"]},"application/x-cdlink":{source:"apache",extensions:["vcd"]},"application/x-cfs-compressed":{source:"apache",extensions:["cfs"]},"application/x-chat":{source:"apache",extensions:["chat"]},"application/x-chess-pgn":{source:"apache",extensions:["pgn"]},"application/x-chrome-extension":{extensions:["crx"]},"application/x-cocoa":{source:"nginx",extensions:["cco"]},"application/x-compress":{source:"apache"},"application/x-conference":{source:"apache",extensions:["nsc"]},"application/x-cpio":{source:"apache",extensions:["cpio"]},"application/x-csh":{source:"apache",extensions:["csh"]},"application/x-deb":{compressible:!1},"application/x-debian-package":{source:"apache",extensions:["deb","udeb"]},"application/x-dgc-compressed":{source:"apache",extensions:["dgc"]},"application/x-director":{source:"apache",extensions:["dir","dcr","dxr","cst","cct","cxt","w3d","fgd","swa"]},"application/x-doom":{source:"apache",extensions:["wad"]},"application/x-dtbncx+xml":{source:"apache",compressible:!0,extensions:["ncx"]},"application/x-dtbook+xml":{source:"apache",compressible:!0,extensions:["dtb"]},"application/x-dtbresource+xml":{source:"apache",compressible:!0,extensions:["res"]},"application/x-dvi":{source:"apache",compressible:!1,extensions:["dvi"]},"application/x-envoy":{source:"apache",extensions:["evy"]},"application/x-eva":{source:"apache",extensions:["eva"]},"application/x-font-bdf":{source:"apache",extensions:["bdf"]},"application/x-font-dos":{source:"apache"},"application/x-font-framemaker":{source:"apache"},"application/x-font-ghostscript":{source:"apache",extensions:["gsf"]},"application/x-font-libgrx":{source:"apache"},"application/x-font-linux-psf":{source:"apache",extensions:["psf"]},"application/x-font-pcf":{source:"apache",extensions:["pcf"]},"application/x-font-snf":{source:"apache",extensions:["snf"]},"application/x-font-speedo":{source:"apache"},"application/x-font-sunos-news":{source:"apache"},"application/x-font-type1":{source:"apache",extensions:["pfa","pfb","pfm","afm"]},"application/x-font-vfont":{source:"apache"},"application/x-freearc":{source:"apache",extensions:["arc"]},"application/x-futuresplash":{source:"apache",extensions:["spl"]},"application/x-gca-compressed":{source:"apache",extensions:["gca"]},"application/x-glulx":{source:"apache",extensions:["ulx"]},"application/x-gnumeric":{source:"apache",extensions:["gnumeric"]},"application/x-gramps-xml":{source:"apache",extensions:["gramps"]},"application/x-gtar":{source:"apache",extensions:["gtar"]},"application/x-gzip":{source:"apache"},"application/x-hdf":{source:"apache",extensions:["hdf"]},"application/x-httpd-php":{compressible:!0,extensions:["php"]},"application/x-install-instructions":{source:"apache",extensions:["install"]},"application/x-iso9660-image":{source:"apache",extensions:["iso"]},"application/x-iwork-keynote-sffkey":{extensions:["key"]},"application/x-iwork-numbers-sffnumbers":{extensions:["numbers"]},"application/x-iwork-pages-sffpages":{extensions:["pages"]},"application/x-java-archive-diff":{source:"nginx",extensions:["jardiff"]},"application/x-java-jnlp-file":{source:"apache",compressible:!1,extensions:["jnlp"]},"application/x-javascript":{compressible:!0},"application/x-keepass2":{extensions:["kdbx"]},"application/x-latex":{source:"apache",compressible:!1,extensions:["latex"]},"application/x-lua-bytecode":{extensions:["luac"]},"application/x-lzh-compressed":{source:"apache",extensions:["lzh","lha"]},"application/x-makeself":{source:"nginx",extensions:["run"]},"application/x-mie":{source:"apache",extensions:["mie"]},"application/x-mobipocket-ebook":{source:"apache",extensions:["prc","mobi"]},"application/x-mpegurl":{compressible:!1},"application/x-ms-application":{source:"apache",extensions:["application"]},"application/x-ms-shortcut":{source:"apache",extensions:["lnk"]},"application/x-ms-wmd":{source:"apache",extensions:["wmd"]},"application/x-ms-wmz":{source:"apache",extensions:["wmz"]},"application/x-ms-xbap":{source:"apache",extensions:["xbap"]},"application/x-msaccess":{source:"apache",extensions:["mdb"]},"application/x-msbinder":{source:"apache",extensions:["obd"]},"application/x-mscardfile":{source:"apache",extensions:["crd"]},"application/x-msclip":{source:"apache",extensions:["clp"]},"application/x-msdos-program":{extensions:["exe"]},"application/x-msdownload":{source:"apache",extensions:["exe","dll","com","bat","msi"]},"application/x-msmediaview":{source:"apache",extensions:["mvb","m13","m14"]},"application/x-msmetafile":{source:"apache",extensions:["wmf","wmz","emf","emz"]},"application/x-msmoney":{source:"apache",extensions:["mny"]},"application/x-mspublisher":{source:"apache",extensions:["pub"]},"application/x-msschedule":{source:"apache",extensions:["scd"]},"application/x-msterminal":{source:"apache",extensions:["trm"]},"application/x-mswrite":{source:"apache",extensions:["wri"]},"application/x-netcdf":{source:"apache",extensions:["nc","cdf"]},"application/x-ns-proxy-autoconfig":{compressible:!0,extensions:["pac"]},"application/x-nzb":{source:"apache",extensions:["nzb"]},"application/x-perl":{source:"nginx",extensions:["pl","pm"]},"application/x-pilot":{source:"nginx",extensions:["prc","pdb"]},"application/x-pkcs12":{source:"apache",compressible:!1,extensions:["p12","pfx"]},"application/x-pkcs7-certificates":{source:"apache",extensions:["p7b","spc"]},"application/x-pkcs7-certreqresp":{source:"apache",extensions:["p7r"]},"application/x-pki-message":{source:"iana"},"application/x-rar-compressed":{source:"apache",compressible:!1,extensions:["rar"]},"application/x-redhat-package-manager":{source:"nginx",extensions:["rpm"]},"application/x-research-info-systems":{source:"apache",extensions:["ris"]},"application/x-sea":{source:"nginx",extensions:["sea"]},"application/x-sh":{source:"apache",compressible:!0,extensions:["sh"]},"application/x-shar":{source:"apache",extensions:["shar"]},"application/x-shockwave-flash":{source:"apache",compressible:!1,extensions:["swf"]},"application/x-silverlight-app":{source:"apache",extensions:["xap"]},"application/x-sql":{source:"apache",extensions:["sql"]},"application/x-stuffit":{source:"apache",compressible:!1,extensions:["sit"]},"application/x-stuffitx":{source:"apache",extensions:["sitx"]},"application/x-subrip":{source:"apache",extensions:["srt"]},"application/x-sv4cpio":{source:"apache",extensions:["sv4cpio"]},"application/x-sv4crc":{source:"apache",extensions:["sv4crc"]},"application/x-t3vm-image":{source:"apache",extensions:["t3"]},"application/x-tads":{source:"apache",extensions:["gam"]},"application/x-tar":{source:"apache",compressible:!0,extensions:["tar"]},"application/x-tcl":{source:"apache",extensions:["tcl","tk"]},"application/x-tex":{source:"apache",extensions:["tex"]},"application/x-tex-tfm":{source:"apache",extensions:["tfm"]},"application/x-texinfo":{source:"apache",extensions:["texinfo","texi"]},"application/x-tgif":{source:"apache",extensions:["obj"]},"application/x-ustar":{source:"apache",extensions:["ustar"]},"application/x-virtualbox-hdd":{compressible:!0,extensions:["hdd"]},"application/x-virtualbox-ova":{compressible:!0,extensions:["ova"]},"application/x-virtualbox-ovf":{compressible:!0,extensions:["ovf"]},"application/x-virtualbox-vbox":{compressible:!0,extensions:["vbox"]},"application/x-virtualbox-vbox-extpack":{compressible:!1,extensions:["vbox-extpack"]},"application/x-virtualbox-vdi":{compressible:!0,extensions:["vdi"]},"application/x-virtualbox-vhd":{compressible:!0,extensions:["vhd"]},"application/x-virtualbox-vmdk":{compressible:!0,extensions:["vmdk"]},"application/x-wais-source":{source:"apache",extensions:["src"]},"application/x-web-app-manifest+json":{compressible:!0,extensions:["webapp"]},"application/x-www-form-urlencoded":{source:"iana",compressible:!0},"application/x-x509-ca-cert":{source:"iana",extensions:["der","crt","pem"]},"application/x-x509-ca-ra-cert":{source:"iana"},"application/x-x509-next-ca-cert":{source:"iana"},"application/x-xfig":{source:"apache",extensions:["fig"]},"application/x-xliff+xml":{source:"apache",compressible:!0,extensions:["xlf"]},"application/x-xpinstall":{source:"apache",compressible:!1,extensions:["xpi"]},"application/x-xz":{source:"apache",extensions:["xz"]},"application/x-zmachine":{source:"apache",extensions:["z1","z2","z3","z4","z5","z6","z7","z8"]},"application/x400-bp":{source:"iana"},"application/xacml+xml":{source:"iana",compressible:!0},"application/xaml+xml":{source:"apache",compressible:!0,extensions:["xaml"]},"application/xcap-att+xml":{source:"iana",compressible:!0,extensions:["xav"]},"application/xcap-caps+xml":{source:"iana",compressible:!0,extensions:["xca"]},"application/xcap-diff+xml":{source:"iana",compressible:!0,extensions:["xdf"]},"application/xcap-el+xml":{source:"iana",compressible:!0,extensions:["xel"]},"application/xcap-error+xml":{source:"iana",compressible:!0},"application/xcap-ns+xml":{source:"iana",compressible:!0,extensions:["xns"]},"application/xcon-conference-info+xml":{source:"iana",compressible:!0},"application/xcon-conference-info-diff+xml":{source:"iana",compressible:!0},"application/xenc+xml":{source:"iana",compressible:!0,extensions:["xenc"]},"application/xhtml+xml":{source:"iana",compressible:!0,extensions:["xhtml","xht"]},"application/xhtml-voice+xml":{source:"apache",compressible:!0},"application/xliff+xml":{source:"iana",compressible:!0,extensions:["xlf"]},"application/xml":{source:"iana",compressible:!0,extensions:["xml","xsl","xsd","rng"]},"application/xml-dtd":{source:"iana",compressible:!0,extensions:["dtd"]},"application/xml-external-parsed-entity":{source:"iana"},"application/xml-patch+xml":{source:"iana",compressible:!0},"application/xmpp+xml":{source:"iana",compressible:!0},"application/xop+xml":{source:"iana",compressible:!0,extensions:["xop"]},"application/xproc+xml":{source:"apache",compressible:!0,extensions:["xpl"]},"application/xslt+xml":{source:"iana",compressible:!0,extensions:["xsl","xslt"]},"application/xspf+xml":{source:"apache",compressible:!0,extensions:["xspf"]},"application/xv+xml":{source:"iana",compressible:!0,extensions:["mxml","xhvml","xvml","xvm"]},"application/yang":{source:"iana",extensions:["yang"]},"application/yang-data+json":{source:"iana",compressible:!0},"application/yang-data+xml":{source:"iana",compressible:!0},"application/yang-patch+json":{source:"iana",compressible:!0},"application/yang-patch+xml":{source:"iana",compressible:!0},"application/yin+xml":{source:"iana",compressible:!0,extensions:["yin"]},"application/zip":{source:"iana",compressible:!1,extensions:["zip"]},"application/zlib":{source:"iana"},"application/zstd":{source:"iana"},"audio/1d-interleaved-parityfec":{source:"iana"},"audio/32kadpcm":{source:"iana"},"audio/3gpp":{source:"iana",compressible:!1,extensions:["3gpp"]},"audio/3gpp2":{source:"iana"},"audio/aac":{source:"iana"},"audio/ac3":{source:"iana"},"audio/adpcm":{source:"apache",extensions:["adp"]},"audio/amr":{source:"iana",extensions:["amr"]},"audio/amr-wb":{source:"iana"},"audio/amr-wb+":{source:"iana"},"audio/aptx":{source:"iana"},"audio/asc":{source:"iana"},"audio/atrac-advanced-lossless":{source:"iana"},"audio/atrac-x":{source:"iana"},"audio/atrac3":{source:"iana"},"audio/basic":{source:"iana",compressible:!1,extensions:["au","snd"]},"audio/bv16":{source:"iana"},"audio/bv32":{source:"iana"},"audio/clearmode":{source:"iana"},"audio/cn":{source:"iana"},"audio/dat12":{source:"iana"},"audio/dls":{source:"iana"},"audio/dsr-es201108":{source:"iana"},"audio/dsr-es202050":{source:"iana"},"audio/dsr-es202211":{source:"iana"},"audio/dsr-es202212":{source:"iana"},"audio/dv":{source:"iana"},"audio/dvi4":{source:"iana"},"audio/eac3":{source:"iana"},"audio/encaprtp":{source:"iana"},"audio/evrc":{source:"iana"},"audio/evrc-qcp":{source:"iana"},"audio/evrc0":{source:"iana"},"audio/evrc1":{source:"iana"},"audio/evrcb":{source:"iana"},"audio/evrcb0":{source:"iana"},"audio/evrcb1":{source:"iana"},"audio/evrcnw":{source:"iana"},"audio/evrcnw0":{source:"iana"},"audio/evrcnw1":{source:"iana"},"audio/evrcwb":{source:"iana"},"audio/evrcwb0":{source:"iana"},"audio/evrcwb1":{source:"iana"},"audio/evs":{source:"iana"},"audio/flexfec":{source:"iana"},"audio/fwdred":{source:"iana"},"audio/g711-0":{source:"iana"},"audio/g719":{source:"iana"},"audio/g722":{source:"iana"},"audio/g7221":{source:"iana"},"audio/g723":{source:"iana"},"audio/g726-16":{source:"iana"},"audio/g726-24":{source:"iana"},"audio/g726-32":{source:"iana"},"audio/g726-40":{source:"iana"},"audio/g728":{source:"iana"},"audio/g729":{source:"iana"},"audio/g7291":{source:"iana"},"audio/g729d":{source:"iana"},"audio/g729e":{source:"iana"},"audio/gsm":{source:"iana"},"audio/gsm-efr":{source:"iana"},"audio/gsm-hr-08":{source:"iana"},"audio/ilbc":{source:"iana"},"audio/ip-mr_v2.5":{source:"iana"},"audio/isac":{source:"apache"},"audio/l16":{source:"iana"},"audio/l20":{source:"iana"},"audio/l24":{source:"iana",compressible:!1},"audio/l8":{source:"iana"},"audio/lpc":{source:"iana"},"audio/melp":{source:"iana"},"audio/melp1200":{source:"iana"},"audio/melp2400":{source:"iana"},"audio/melp600":{source:"iana"},"audio/mhas":{source:"iana"},"audio/midi":{source:"apache",extensions:["mid","midi","kar","rmi"]},"audio/mobile-xmf":{source:"iana",extensions:["mxmf"]},"audio/mp3":{compressible:!1,extensions:["mp3"]},"audio/mp4":{source:"iana",compressible:!1,extensions:["m4a","mp4a"]},"audio/mp4a-latm":{source:"iana"},"audio/mpa":{source:"iana"},"audio/mpa-robust":{source:"iana"},"audio/mpeg":{source:"iana",compressible:!1,extensions:["mpga","mp2","mp2a","mp3","m2a","m3a"]},"audio/mpeg4-generic":{source:"iana"},"audio/musepack":{source:"apache"},"audio/ogg":{source:"iana",compressible:!1,extensions:["oga","ogg","spx","opus"]},"audio/opus":{source:"iana"},"audio/parityfec":{source:"iana"},"audio/pcma":{source:"iana"},"audio/pcma-wb":{source:"iana"},"audio/pcmu":{source:"iana"},"audio/pcmu-wb":{source:"iana"},"audio/prs.sid":{source:"iana"},"audio/qcelp":{source:"iana"},"audio/raptorfec":{source:"iana"},"audio/red":{source:"iana"},"audio/rtp-enc-aescm128":{source:"iana"},"audio/rtp-midi":{source:"iana"},"audio/rtploopback":{source:"iana"},"audio/rtx":{source:"iana"},"audio/s3m":{source:"apache",extensions:["s3m"]},"audio/scip":{source:"iana"},"audio/silk":{source:"apache",extensions:["sil"]},"audio/smv":{source:"iana"},"audio/smv-qcp":{source:"iana"},"audio/smv0":{source:"iana"},"audio/sofa":{source:"iana"},"audio/sp-midi":{source:"iana"},"audio/speex":{source:"iana"},"audio/t140c":{source:"iana"},"audio/t38":{source:"iana"},"audio/telephone-event":{source:"iana"},"audio/tetra_acelp":{source:"iana"},"audio/tetra_acelp_bb":{source:"iana"},"audio/tone":{source:"iana"},"audio/tsvcis":{source:"iana"},"audio/uemclip":{source:"iana"},"audio/ulpfec":{source:"iana"},"audio/usac":{source:"iana"},"audio/vdvi":{source:"iana"},"audio/vmr-wb":{source:"iana"},"audio/vnd.3gpp.iufp":{source:"iana"},"audio/vnd.4sb":{source:"iana"},"audio/vnd.audiokoz":{source:"iana"},"audio/vnd.celp":{source:"iana"},"audio/vnd.cisco.nse":{source:"iana"},"audio/vnd.cmles.radio-events":{source:"iana"},"audio/vnd.cns.anp1":{source:"iana"},"audio/vnd.cns.inf1":{source:"iana"},"audio/vnd.dece.audio":{source:"iana",extensions:["uva","uvva"]},"audio/vnd.digital-winds":{source:"iana",extensions:["eol"]},"audio/vnd.dlna.adts":{source:"iana"},"audio/vnd.dolby.heaac.1":{source:"iana"},"audio/vnd.dolby.heaac.2":{source:"iana"},"audio/vnd.dolby.mlp":{source:"iana"},"audio/vnd.dolby.mps":{source:"iana"},"audio/vnd.dolby.pl2":{source:"iana"},"audio/vnd.dolby.pl2x":{source:"iana"},"audio/vnd.dolby.pl2z":{source:"iana"},"audio/vnd.dolby.pulse.1":{source:"iana"},"audio/vnd.dra":{source:"iana",extensions:["dra"]},"audio/vnd.dts":{source:"iana",extensions:["dts"]},"audio/vnd.dts.hd":{source:"iana",extensions:["dtshd"]},"audio/vnd.dts.uhd":{source:"iana"},"audio/vnd.dvb.file":{source:"iana"},"audio/vnd.everad.plj":{source:"iana"},"audio/vnd.hns.audio":{source:"iana"},"audio/vnd.lucent.voice":{source:"iana",extensions:["lvp"]},"audio/vnd.ms-playready.media.pya":{source:"iana",extensions:["pya"]},"audio/vnd.nokia.mobile-xmf":{source:"iana"},"audio/vnd.nortel.vbk":{source:"iana"},"audio/vnd.nuera.ecelp4800":{source:"iana",extensions:["ecelp4800"]},"audio/vnd.nuera.ecelp7470":{source:"iana",extensions:["ecelp7470"]},"audio/vnd.nuera.ecelp9600":{source:"iana",extensions:["ecelp9600"]},"audio/vnd.octel.sbc":{source:"iana"},"audio/vnd.presonus.multitrack":{source:"iana"},"audio/vnd.qcelp":{source:"iana"},"audio/vnd.rhetorex.32kadpcm":{source:"iana"},"audio/vnd.rip":{source:"iana",extensions:["rip"]},"audio/vnd.rn-realaudio":{compressible:!1},"audio/vnd.sealedmedia.softseal.mpeg":{source:"iana"},"audio/vnd.vmx.cvsd":{source:"iana"},"audio/vnd.wave":{compressible:!1},"audio/vorbis":{source:"iana",compressible:!1},"audio/vorbis-config":{source:"iana"},"audio/wav":{compressible:!1,extensions:["wav"]},"audio/wave":{compressible:!1,extensions:["wav"]},"audio/webm":{source:"apache",compressible:!1,extensions:["weba"]},"audio/x-aac":{source:"apache",compressible:!1,extensions:["aac"]},"audio/x-aiff":{source:"apache",extensions:["aif","aiff","aifc"]},"audio/x-caf":{source:"apache",compressible:!1,extensions:["caf"]},"audio/x-flac":{source:"apache",extensions:["flac"]},"audio/x-m4a":{source:"nginx",extensions:["m4a"]},"audio/x-matroska":{source:"apache",extensions:["mka"]},"audio/x-mpegurl":{source:"apache",extensions:["m3u"]},"audio/x-ms-wax":{source:"apache",extensions:["wax"]},"audio/x-ms-wma":{source:"apache",extensions:["wma"]},"audio/x-pn-realaudio":{source:"apache",extensions:["ram","ra"]},"audio/x-pn-realaudio-plugin":{source:"apache",extensions:["rmp"]},"audio/x-realaudio":{source:"nginx",extensions:["ra"]},"audio/x-tta":{source:"apache"},"audio/x-wav":{source:"apache",extensions:["wav"]},"audio/xm":{source:"apache",extensions:["xm"]},"chemical/x-cdx":{source:"apache",extensions:["cdx"]},"chemical/x-cif":{source:"apache",extensions:["cif"]},"chemical/x-cmdf":{source:"apache",extensions:["cmdf"]},"chemical/x-cml":{source:"apache",extensions:["cml"]},"chemical/x-csml":{source:"apache",extensions:["csml"]},"chemical/x-pdb":{source:"apache"},"chemical/x-xyz":{source:"apache",extensions:["xyz"]},"font/collection":{source:"iana",extensions:["ttc"]},"font/otf":{source:"iana",compressible:!0,extensions:["otf"]},"font/sfnt":{source:"iana"},"font/ttf":{source:"iana",compressible:!0,extensions:["ttf"]},"font/woff":{source:"iana",extensions:["woff"]},"font/woff2":{source:"iana",extensions:["woff2"]},"image/aces":{source:"iana",extensions:["exr"]},"image/apng":{compressible:!1,extensions:["apng"]},"image/avci":{source:"iana",extensions:["avci"]},"image/avcs":{source:"iana",extensions:["avcs"]},"image/avif":{source:"iana",compressible:!1,extensions:["avif"]},"image/bmp":{source:"iana",compressible:!0,extensions:["bmp"]},"image/cgm":{source:"iana",extensions:["cgm"]},"image/dicom-rle":{source:"iana",extensions:["drle"]},"image/emf":{source:"iana",extensions:["emf"]},"image/fits":{source:"iana",extensions:["fits"]},"image/g3fax":{source:"iana",extensions:["g3"]},"image/gif":{source:"iana",compressible:!1,extensions:["gif"]},"image/heic":{source:"iana",extensions:["heic"]},"image/heic-sequence":{source:"iana",extensions:["heics"]},"image/heif":{source:"iana",extensions:["heif"]},"image/heif-sequence":{source:"iana",extensions:["heifs"]},"image/hej2k":{source:"iana",extensions:["hej2"]},"image/hsj2":{source:"iana",extensions:["hsj2"]},"image/ief":{source:"iana",extensions:["ief"]},"image/jls":{source:"iana",extensions:["jls"]},"image/jp2":{source:"iana",compressible:!1,extensions:["jp2","jpg2"]},"image/jpeg":{source:"iana",compressible:!1,extensions:["jpeg","jpg","jpe"]},"image/jph":{source:"iana",extensions:["jph"]},"image/jphc":{source:"iana",extensions:["jhc"]},"image/jpm":{source:"iana",compressible:!1,extensions:["jpm"]},"image/jpx":{source:"iana",compressible:!1,extensions:["jpx","jpf"]},"image/jxr":{source:"iana",extensions:["jxr"]},"image/jxra":{source:"iana",extensions:["jxra"]},"image/jxrs":{source:"iana",extensions:["jxrs"]},"image/jxs":{source:"iana",extensions:["jxs"]},"image/jxsc":{source:"iana",extensions:["jxsc"]},"image/jxsi":{source:"iana",extensions:["jxsi"]},"image/jxss":{source:"iana",extensions:["jxss"]},"image/ktx":{source:"iana",extensions:["ktx"]},"image/ktx2":{source:"iana",extensions:["ktx2"]},"image/naplps":{source:"iana"},"image/pjpeg":{compressible:!1},"image/png":{source:"iana",compressible:!1,extensions:["png"]},"image/prs.btif":{source:"iana",extensions:["btif"]},"image/prs.pti":{source:"iana",extensions:["pti"]},"image/pwg-raster":{source:"iana"},"image/sgi":{source:"apache",extensions:["sgi"]},"image/svg+xml":{source:"iana",compressible:!0,extensions:["svg","svgz"]},"image/t38":{source:"iana",extensions:["t38"]},"image/tiff":{source:"iana",compressible:!1,extensions:["tif","tiff"]},"image/tiff-fx":{source:"iana",extensions:["tfx"]},"image/vnd.adobe.photoshop":{source:"iana",compressible:!0,extensions:["psd"]},"image/vnd.airzip.accelerator.azv":{source:"iana",extensions:["azv"]},"image/vnd.cns.inf2":{source:"iana"},"image/vnd.dece.graphic":{source:"iana",extensions:["uvi","uvvi","uvg","uvvg"]},"image/vnd.djvu":{source:"iana",extensions:["djvu","djv"]},"image/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"image/vnd.dwg":{source:"iana",extensions:["dwg"]},"image/vnd.dxf":{source:"iana",extensions:["dxf"]},"image/vnd.fastbidsheet":{source:"iana",extensions:["fbs"]},"image/vnd.fpx":{source:"iana",extensions:["fpx"]},"image/vnd.fst":{source:"iana",extensions:["fst"]},"image/vnd.fujixerox.edmics-mmr":{source:"iana",extensions:["mmr"]},"image/vnd.fujixerox.edmics-rlc":{source:"iana",extensions:["rlc"]},"image/vnd.globalgraphics.pgb":{source:"iana"},"image/vnd.microsoft.icon":{source:"iana",compressible:!0,extensions:["ico"]},"image/vnd.mix":{source:"iana"},"image/vnd.mozilla.apng":{source:"iana"},"image/vnd.ms-dds":{compressible:!0,extensions:["dds"]},"image/vnd.ms-modi":{source:"iana",extensions:["mdi"]},"image/vnd.ms-photo":{source:"apache",extensions:["wdp"]},"image/vnd.net-fpx":{source:"iana",extensions:["npx"]},"image/vnd.pco.b16":{source:"iana",extensions:["b16"]},"image/vnd.radiance":{source:"iana"},"image/vnd.sealed.png":{source:"iana"},"image/vnd.sealedmedia.softseal.gif":{source:"iana"},"image/vnd.sealedmedia.softseal.jpg":{source:"iana"},"image/vnd.svf":{source:"iana"},"image/vnd.tencent.tap":{source:"iana",extensions:["tap"]},"image/vnd.valve.source.texture":{source:"iana",extensions:["vtf"]},"image/vnd.wap.wbmp":{source:"iana",extensions:["wbmp"]},"image/vnd.xiff":{source:"iana",extensions:["xif"]},"image/vnd.zbrush.pcx":{source:"iana",extensions:["pcx"]},"image/webp":{source:"apache",extensions:["webp"]},"image/wmf":{source:"iana",extensions:["wmf"]},"image/x-3ds":{source:"apache",extensions:["3ds"]},"image/x-cmu-raster":{source:"apache",extensions:["ras"]},"image/x-cmx":{source:"apache",extensions:["cmx"]},"image/x-freehand":{source:"apache",extensions:["fh","fhc","fh4","fh5","fh7"]},"image/x-icon":{source:"apache",compressible:!0,extensions:["ico"]},"image/x-jng":{source:"nginx",extensions:["jng"]},"image/x-mrsid-image":{source:"apache",extensions:["sid"]},"image/x-ms-bmp":{source:"nginx",compressible:!0,extensions:["bmp"]},"image/x-pcx":{source:"apache",extensions:["pcx"]},"image/x-pict":{source:"apache",extensions:["pic","pct"]},"image/x-portable-anymap":{source:"apache",extensions:["pnm"]},"image/x-portable-bitmap":{source:"apache",extensions:["pbm"]},"image/x-portable-graymap":{source:"apache",extensions:["pgm"]},"image/x-portable-pixmap":{source:"apache",extensions:["ppm"]},"image/x-rgb":{source:"apache",extensions:["rgb"]},"image/x-tga":{source:"apache",extensions:["tga"]},"image/x-xbitmap":{source:"apache",extensions:["xbm"]},"image/x-xcf":{compressible:!1},"image/x-xpixmap":{source:"apache",extensions:["xpm"]},"image/x-xwindowdump":{source:"apache",extensions:["xwd"]},"message/cpim":{source:"iana"},"message/delivery-status":{source:"iana"},"message/disposition-notification":{source:"iana",extensions:["disposition-notification"]},"message/external-body":{source:"iana"},"message/feedback-report":{source:"iana"},"message/global":{source:"iana",extensions:["u8msg"]},"message/global-delivery-status":{source:"iana",extensions:["u8dsn"]},"message/global-disposition-notification":{source:"iana",extensions:["u8mdn"]},"message/global-headers":{source:"iana",extensions:["u8hdr"]},"message/http":{source:"iana",compressible:!1},"message/imdn+xml":{source:"iana",compressible:!0},"message/news":{source:"iana"},"message/partial":{source:"iana",compressible:!1},"message/rfc822":{source:"iana",compressible:!0,extensions:["eml","mime"]},"message/s-http":{source:"iana"},"message/sip":{source:"iana"},"message/sipfrag":{source:"iana"},"message/tracking-status":{source:"iana"},"message/vnd.si.simp":{source:"iana"},"message/vnd.wfa.wsc":{source:"iana",extensions:["wsc"]},"model/3mf":{source:"iana",extensions:["3mf"]},"model/e57":{source:"iana"},"model/gltf+json":{source:"iana",compressible:!0,extensions:["gltf"]},"model/gltf-binary":{source:"iana",compressible:!0,extensions:["glb"]},"model/iges":{source:"iana",compressible:!1,extensions:["igs","iges"]},"model/mesh":{source:"iana",compressible:!1,extensions:["msh","mesh","silo"]},"model/mtl":{source:"iana",extensions:["mtl"]},"model/obj":{source:"iana",extensions:["obj"]},"model/step":{source:"iana"},"model/step+xml":{source:"iana",compressible:!0,extensions:["stpx"]},"model/step+zip":{source:"iana",compressible:!1,extensions:["stpz"]},"model/step-xml+zip":{source:"iana",compressible:!1,extensions:["stpxz"]},"model/stl":{source:"iana",extensions:["stl"]},"model/vnd.collada+xml":{source:"iana",compressible:!0,extensions:["dae"]},"model/vnd.dwf":{source:"iana",extensions:["dwf"]},"model/vnd.flatland.3dml":{source:"iana"},"model/vnd.gdl":{source:"iana",extensions:["gdl"]},"model/vnd.gs-gdl":{source:"apache"},"model/vnd.gs.gdl":{source:"iana"},"model/vnd.gtw":{source:"iana",extensions:["gtw"]},"model/vnd.moml+xml":{source:"iana",compressible:!0},"model/vnd.mts":{source:"iana",extensions:["mts"]},"model/vnd.opengex":{source:"iana",extensions:["ogex"]},"model/vnd.parasolid.transmit.binary":{source:"iana",extensions:["x_b"]},"model/vnd.parasolid.transmit.text":{source:"iana",extensions:["x_t"]},"model/vnd.pytha.pyox":{source:"iana"},"model/vnd.rosette.annotated-data-model":{source:"iana"},"model/vnd.sap.vds":{source:"iana",extensions:["vds"]},"model/vnd.usdz+zip":{source:"iana",compressible:!1,extensions:["usdz"]},"model/vnd.valve.source.compiled-map":{source:"iana",extensions:["bsp"]},"model/vnd.vtu":{source:"iana",extensions:["vtu"]},"model/vrml":{source:"iana",compressible:!1,extensions:["wrl","vrml"]},"model/x3d+binary":{source:"apache",compressible:!1,extensions:["x3db","x3dbz"]},"model/x3d+fastinfoset":{source:"iana",extensions:["x3db"]},"model/x3d+vrml":{source:"apache",compressible:!1,extensions:["x3dv","x3dvz"]},"model/x3d+xml":{source:"iana",compressible:!0,extensions:["x3d","x3dz"]},"model/x3d-vrml":{source:"iana",extensions:["x3dv"]},"multipart/alternative":{source:"iana",compressible:!1},"multipart/appledouble":{source:"iana"},"multipart/byteranges":{source:"iana"},"multipart/digest":{source:"iana"},"multipart/encrypted":{source:"iana",compressible:!1},"multipart/form-data":{source:"iana",compressible:!1},"multipart/header-set":{source:"iana"},"multipart/mixed":{source:"iana"},"multipart/multilingual":{source:"iana"},"multipart/parallel":{source:"iana"},"multipart/related":{source:"iana",compressible:!1},"multipart/report":{source:"iana"},"multipart/signed":{source:"iana",compressible:!1},"multipart/vnd.bint.med-plus":{source:"iana"},"multipart/voice-message":{source:"iana"},"multipart/x-mixed-replace":{source:"iana"},"text/1d-interleaved-parityfec":{source:"iana"},"text/cache-manifest":{source:"iana",compressible:!0,extensions:["appcache","manifest"]},"text/calendar":{source:"iana",extensions:["ics","ifb"]},"text/calender":{compressible:!0},"text/cmd":{compressible:!0},"text/coffeescript":{extensions:["coffee","litcoffee"]},"text/cql":{source:"iana"},"text/cql-expression":{source:"iana"},"text/cql-identifier":{source:"iana"},"text/css":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["css"]},"text/csv":{source:"iana",compressible:!0,extensions:["csv"]},"text/csv-schema":{source:"iana"},"text/directory":{source:"iana"},"text/dns":{source:"iana"},"text/ecmascript":{source:"iana"},"text/encaprtp":{source:"iana"},"text/enriched":{source:"iana"},"text/fhirpath":{source:"iana"},"text/flexfec":{source:"iana"},"text/fwdred":{source:"iana"},"text/gff3":{source:"iana"},"text/grammar-ref-list":{source:"iana"},"text/html":{source:"iana",compressible:!0,extensions:["html","htm","shtml"]},"text/jade":{extensions:["jade"]},"text/javascript":{source:"iana",compressible:!0},"text/jcr-cnd":{source:"iana"},"text/jsx":{compressible:!0,extensions:["jsx"]},"text/less":{compressible:!0,extensions:["less"]},"text/markdown":{source:"iana",compressible:!0,extensions:["markdown","md"]},"text/mathml":{source:"nginx",extensions:["mml"]},"text/mdx":{compressible:!0,extensions:["mdx"]},"text/mizar":{source:"iana"},"text/n3":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["n3"]},"text/parameters":{source:"iana",charset:"UTF-8"},"text/parityfec":{source:"iana"},"text/plain":{source:"iana",compressible:!0,extensions:["txt","text","conf","def","list","log","in","ini"]},"text/provenance-notation":{source:"iana",charset:"UTF-8"},"text/prs.fallenstein.rst":{source:"iana"},"text/prs.lines.tag":{source:"iana",extensions:["dsc"]},"text/prs.prop.logic":{source:"iana"},"text/raptorfec":{source:"iana"},"text/red":{source:"iana"},"text/rfc822-headers":{source:"iana"},"text/richtext":{source:"iana",compressible:!0,extensions:["rtx"]},"text/rtf":{source:"iana",compressible:!0,extensions:["rtf"]},"text/rtp-enc-aescm128":{source:"iana"},"text/rtploopback":{source:"iana"},"text/rtx":{source:"iana"},"text/sgml":{source:"iana",extensions:["sgml","sgm"]},"text/shaclc":{source:"iana"},"text/shex":{source:"iana",extensions:["shex"]},"text/slim":{extensions:["slim","slm"]},"text/spdx":{source:"iana",extensions:["spdx"]},"text/strings":{source:"iana"},"text/stylus":{extensions:["stylus","styl"]},"text/t140":{source:"iana"},"text/tab-separated-values":{source:"iana",compressible:!0,extensions:["tsv"]},"text/troff":{source:"iana",extensions:["t","tr","roff","man","me","ms"]},"text/turtle":{source:"iana",charset:"UTF-8",extensions:["ttl"]},"text/ulpfec":{source:"iana"},"text/uri-list":{source:"iana",compressible:!0,extensions:["uri","uris","urls"]},"text/vcard":{source:"iana",compressible:!0,extensions:["vcard"]},"text/vnd.a":{source:"iana"},"text/vnd.abc":{source:"iana"},"text/vnd.ascii-art":{source:"iana"},"text/vnd.curl":{source:"iana",extensions:["curl"]},"text/vnd.curl.dcurl":{source:"apache",extensions:["dcurl"]},"text/vnd.curl.mcurl":{source:"apache",extensions:["mcurl"]},"text/vnd.curl.scurl":{source:"apache",extensions:["scurl"]},"text/vnd.debian.copyright":{source:"iana",charset:"UTF-8"},"text/vnd.dmclientscript":{source:"iana"},"text/vnd.dvb.subtitle":{source:"iana",extensions:["sub"]},"text/vnd.esmertec.theme-descriptor":{source:"iana",charset:"UTF-8"},"text/vnd.familysearch.gedcom":{source:"iana",extensions:["ged"]},"text/vnd.ficlab.flt":{source:"iana"},"text/vnd.fly":{source:"iana",extensions:["fly"]},"text/vnd.fmi.flexstor":{source:"iana",extensions:["flx"]},"text/vnd.gml":{source:"iana"},"text/vnd.graphviz":{source:"iana",extensions:["gv"]},"text/vnd.hans":{source:"iana"},"text/vnd.hgl":{source:"iana"},"text/vnd.in3d.3dml":{source:"iana",extensions:["3dml"]},"text/vnd.in3d.spot":{source:"iana",extensions:["spot"]},"text/vnd.iptc.newsml":{source:"iana"},"text/vnd.iptc.nitf":{source:"iana"},"text/vnd.latex-z":{source:"iana"},"text/vnd.motorola.reflex":{source:"iana"},"text/vnd.ms-mediapackage":{source:"iana"},"text/vnd.net2phone.commcenter.command":{source:"iana"},"text/vnd.radisys.msml-basic-layout":{source:"iana"},"text/vnd.senx.warpscript":{source:"iana"},"text/vnd.si.uricatalogue":{source:"iana"},"text/vnd.sosi":{source:"iana"},"text/vnd.sun.j2me.app-descriptor":{source:"iana",charset:"UTF-8",extensions:["jad"]},"text/vnd.trolltech.linguist":{source:"iana",charset:"UTF-8"},"text/vnd.wap.si":{source:"iana"},"text/vnd.wap.sl":{source:"iana"},"text/vnd.wap.wml":{source:"iana",extensions:["wml"]},"text/vnd.wap.wmlscript":{source:"iana",extensions:["wmls"]},"text/vtt":{source:"iana",charset:"UTF-8",compressible:!0,extensions:["vtt"]},"text/x-asm":{source:"apache",extensions:["s","asm"]},"text/x-c":{source:"apache",extensions:["c","cc","cxx","cpp","h","hh","dic"]},"text/x-component":{source:"nginx",extensions:["htc"]},"text/x-fortran":{source:"apache",extensions:["f","for","f77","f90"]},"text/x-gwt-rpc":{compressible:!0},"text/x-handlebars-template":{extensions:["hbs"]},"text/x-java-source":{source:"apache",extensions:["java"]},"text/x-jquery-tmpl":{compressible:!0},"text/x-lua":{extensions:["lua"]},"text/x-markdown":{compressible:!0,extensions:["mkd"]},"text/x-nfo":{source:"apache",extensions:["nfo"]},"text/x-opml":{source:"apache",extensions:["opml"]},"text/x-org":{compressible:!0,extensions:["org"]},"text/x-pascal":{source:"apache",extensions:["p","pas"]},"text/x-processing":{compressible:!0,extensions:["pde"]},"text/x-sass":{extensions:["sass"]},"text/x-scss":{extensions:["scss"]},"text/x-setext":{source:"apache",extensions:["etx"]},"text/x-sfv":{source:"apache",extensions:["sfv"]},"text/x-suse-ymp":{compressible:!0,extensions:["ymp"]},"text/x-uuencode":{source:"apache",extensions:["uu"]},"text/x-vcalendar":{source:"apache",extensions:["vcs"]},"text/x-vcard":{source:"apache",extensions:["vcf"]},"text/xml":{source:"iana",compressible:!0,extensions:["xml"]},"text/xml-external-parsed-entity":{source:"iana"},"text/yaml":{compressible:!0,extensions:["yaml","yml"]},"video/1d-interleaved-parityfec":{source:"iana"},"video/3gpp":{source:"iana",extensions:["3gp","3gpp"]},"video/3gpp-tt":{source:"iana"},"video/3gpp2":{source:"iana",extensions:["3g2"]},"video/av1":{source:"iana"},"video/bmpeg":{source:"iana"},"video/bt656":{source:"iana"},"video/celb":{source:"iana"},"video/dv":{source:"iana"},"video/encaprtp":{source:"iana"},"video/ffv1":{source:"iana"},"video/flexfec":{source:"iana"},"video/h261":{source:"iana",extensions:["h261"]},"video/h263":{source:"iana",extensions:["h263"]},"video/h263-1998":{source:"iana"},"video/h263-2000":{source:"iana"},"video/h264":{source:"iana",extensions:["h264"]},"video/h264-rcdo":{source:"iana"},"video/h264-svc":{source:"iana"},"video/h265":{source:"iana"},"video/iso.segment":{source:"iana",extensions:["m4s"]},"video/jpeg":{source:"iana",extensions:["jpgv"]},"video/jpeg2000":{source:"iana"},"video/jpm":{source:"apache",extensions:["jpm","jpgm"]},"video/jxsv":{source:"iana"},"video/mj2":{source:"iana",extensions:["mj2","mjp2"]},"video/mp1s":{source:"iana"},"video/mp2p":{source:"iana"},"video/mp2t":{source:"iana",extensions:["ts"]},"video/mp4":{source:"iana",compressible:!1,extensions:["mp4","mp4v","mpg4"]},"video/mp4v-es":{source:"iana"},"video/mpeg":{source:"iana",compressible:!1,extensions:["mpeg","mpg","mpe","m1v","m2v"]},"video/mpeg4-generic":{source:"iana"},"video/mpv":{source:"iana"},"video/nv":{source:"iana"},"video/ogg":{source:"iana",compressible:!1,extensions:["ogv"]},"video/parityfec":{source:"iana"},"video/pointer":{source:"iana"},"video/quicktime":{source:"iana",compressible:!1,extensions:["qt","mov"]},"video/raptorfec":{source:"iana"},"video/raw":{source:"iana"},"video/rtp-enc-aescm128":{source:"iana"},"video/rtploopback":{source:"iana"},"video/rtx":{source:"iana"},"video/scip":{source:"iana"},"video/smpte291":{source:"iana"},"video/smpte292m":{source:"iana"},"video/ulpfec":{source:"iana"},"video/vc1":{source:"iana"},"video/vc2":{source:"iana"},"video/vnd.cctv":{source:"iana"},"video/vnd.dece.hd":{source:"iana",extensions:["uvh","uvvh"]},"video/vnd.dece.mobile":{source:"iana",extensions:["uvm","uvvm"]},"video/vnd.dece.mp4":{source:"iana"},"video/vnd.dece.pd":{source:"iana",extensions:["uvp","uvvp"]},"video/vnd.dece.sd":{source:"iana",extensions:["uvs","uvvs"]},"video/vnd.dece.video":{source:"iana",extensions:["uvv","uvvv"]},"video/vnd.directv.mpeg":{source:"iana"},"video/vnd.directv.mpeg-tts":{source:"iana"},"video/vnd.dlna.mpeg-tts":{source:"iana"},"video/vnd.dvb.file":{source:"iana",extensions:["dvb"]},"video/vnd.fvt":{source:"iana",extensions:["fvt"]},"video/vnd.hns.video":{source:"iana"},"video/vnd.iptvforum.1dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.1dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.2dparityfec-1010":{source:"iana"},"video/vnd.iptvforum.2dparityfec-2005":{source:"iana"},"video/vnd.iptvforum.ttsavc":{source:"iana"},"video/vnd.iptvforum.ttsmpeg2":{source:"iana"},"video/vnd.motorola.video":{source:"iana"},"video/vnd.motorola.videop":{source:"iana"},"video/vnd.mpegurl":{source:"iana",extensions:["mxu","m4u"]},"video/vnd.ms-playready.media.pyv":{source:"iana",extensions:["pyv"]},"video/vnd.nokia.interleaved-multimedia":{source:"iana"},"video/vnd.nokia.mp4vr":{source:"iana"},"video/vnd.nokia.videovoip":{source:"iana"},"video/vnd.objectvideo":{source:"iana"},"video/vnd.radgamettools.bink":{source:"iana"},"video/vnd.radgamettools.smacker":{source:"iana"},"video/vnd.sealed.mpeg1":{source:"iana"},"video/vnd.sealed.mpeg4":{source:"iana"},"video/vnd.sealed.swf":{source:"iana"},"video/vnd.sealedmedia.softseal.mov":{source:"iana"},"video/vnd.uvvu.mp4":{source:"iana",extensions:["uvu","uvvu"]},"video/vnd.vivo":{source:"iana",extensions:["viv"]},"video/vnd.youtube.yt":{source:"iana"},"video/vp8":{source:"iana"},"video/vp9":{source:"iana"},"video/webm":{source:"apache",compressible:!1,extensions:["webm"]},"video/x-f4v":{source:"apache",extensions:["f4v"]},"video/x-fli":{source:"apache",extensions:["fli"]},"video/x-flv":{source:"apache",compressible:!1,extensions:["flv"]},"video/x-m4v":{source:"apache",extensions:["m4v"]},"video/x-matroska":{source:"apache",compressible:!1,extensions:["mkv","mk3d","mks"]},"video/x-mng":{source:"apache",extensions:["mng"]},"video/x-ms-asf":{source:"apache",extensions:["asf","asx"]},"video/x-ms-vob":{source:"apache",extensions:["vob"]},"video/x-ms-wm":{source:"apache",extensions:["wm"]},"video/x-ms-wmv":{source:"apache",compressible:!1,extensions:["wmv"]},"video/x-ms-wmx":{source:"apache",extensions:["wmx"]},"video/x-ms-wvx":{source:"apache",extensions:["wvx"]},"video/x-msvideo":{source:"apache",extensions:["avi"]},"video/x-sgi-movie":{source:"apache",extensions:["movie"]},"video/x-smv":{source:"apache",extensions:["smv"]},"x-conference/x-cooltalk":{source:"apache",extensions:["ice"]},"x-shader/x-fragment":{compressible:!0},"x-shader/x-vertex":{compressible:!0}}});var wE=N((b$,vE)=>{vE.exports=yE()});var CE=N(on=>{"use strict";var ld=wE(),$O=Ae("path").extname,bE=/^\s*([^;\s]*)(?:;|\s|$)/,KO=/^text\//i;on.charset=EE;on.charsets={lookup:EE};on.contentType=jO;on.extension=e3;on.extensions=Object.create(null);on.lookup=t3;on.types=Object.create(null);n3(on.extensions,on.types);function EE(e){if(!e||typeof e!="string")return!1;var t=bE.exec(e),n=t&&ld[t[1].toLowerCase()];return n&&n.charset?n.charset:t&&KO.test(t[1])?"UTF-8":!1}function jO(e){if(!e||typeof e!="string")return!1;var t=e.indexOf("/")===-1?on.lookup(e):e;if(!t)return!1;if(t.indexOf("charset")===-1){var n=on.charset(t);n&&(t+="; charset="+n.toLowerCase())}return t}function e3(e){if(!e||typeof e!="string")return!1;var t=bE.exec(e),n=t&&on.extensions[t[1].toLowerCase()];return!n||!n.length?!1:n[0]}function t3(e){if(!e||typeof e!="string")return!1;var t=$O("x."+e).toLowerCase().substr(1);return t&&on.types[t]||!1}function n3(e,t){var n=["nginx","apache",void 0,"iana"];Object.keys(ld).forEach(function(i){var a=ld[i],s=a.extensions;if(!(!s||!s.length)){e[i]=s;for(var o=0;o<s.length;o++){var c=s[o];if(t[c]){var u=n.indexOf(ld[t[c]].source),d=n.indexOf(a.source);if(t[c]!=="application/octet-stream"&&(u>d||u===d&&t[c].substr(0,12)==="application/"))continue}t[c]=i}}})}});var SE=N((C$,IE)=>{IE.exports=r3;function r3(e){var t=typeof setImmediate=="function"?setImmediate:typeof process=="object"&&typeof process.nextTick=="function"?process.nextTick:null;t?t(e):setTimeout(e,0)}});var Yh=N((I$,TE)=>{var xE=SE();TE.exports=i3;function i3(e){var t=!1;return xE(function(){t=!0}),function(r,i){t?e(r,i):xE(function(){e(r,i)})}}});var $h=N((S$,NE)=>{NE.exports=a3;function a3(e){Object.keys(e.jobs).forEach(s3.bind(e)),e.jobs={}}function s3(e){typeof this.jobs[e]=="function"&&this.jobs[e]()}});var Kh=N((x$,kE)=>{var RE=Yh(),o3=$h();kE.exports=c3;function c3(e,t,n,r){var i=n.keyedList?n.keyedList[n.index]:n.index;n.jobs[i]=u3(t,i,e[i],function(a,s){i in n.jobs&&(delete n.jobs[i],a?o3(n):n.results[i]=s,r(a,n.results))})}function u3(e,t,n,r){var i;return e.length==2?i=e(n,RE(r)):i=e(n,t,RE(r)),i}});var jh=N((T$,BE)=>{BE.exports=l3;function l3(e,t){var n=!Array.isArray(e),r={index:0,keyedList:n||t?Object.keys(e):null,jobs:{},results:n?{}:[],size:n?Object.keys(e).length:e.length};return t&&r.keyedList.sort(n?t:function(i,a){return t(e[i],e[a])}),r}});var em=N((N$,OE)=>{var d3=$h(),f3=Yh();OE.exports=p3;function p3(e){Object.keys(this.jobs).length&&(this.index=this.size,d3(this),f3(e)(null,this.results))}});var DE=N((R$,PE)=>{var h3=Kh(),m3=jh(),g3=em();PE.exports=_3;function _3(e,t,n){for(var r=m3(e);r.index<(r.keyedList||e).length;)h3(e,t,r,function(i,a){if(i){n(i,a);return}if(Object.keys(r.jobs).length===0){n(null,r.results);return}}),r.index++;return g3.bind(r,n)}});var tm=N((k$,dd)=>{var ME=Kh(),A3=jh(),y3=em();dd.exports=v3;dd.exports.ascending=FE;dd.exports.descending=w3;function v3(e,t,n,r){var i=A3(e,n);return ME(e,t,i,function a(s,o){if(s){r(s,o);return}if(i.index++,i.index<(i.keyedList||e).length){ME(e,t,i,a);return}r(null,i.results)}),y3.bind(i,r)}function FE(e,t){return e<t?-1:e>t?1:0}function w3(e,t){return-1*FE(e,t)}});var QE=N((B$,LE)=>{var b3=tm();LE.exports=E3;function E3(e,t,n){return b3(e,t,null,n)}});var qE=N((O$,UE)=>{UE.exports={parallel:DE(),serial:QE(),serialOrdered:tm()}});var VE=N((P$,JE)=>{JE.exports=function(e,t){return Object.keys(t).forEach(function(n){e[n]=e[n]||t[n]}),e}});var WE=N((D$,GE)=>{var am=AE(),zE=Ae("util"),nm=Ae("path"),C3=Ae("http"),I3=Ae("https"),S3=Ae("url").parse,x3=Ae("fs"),rm=CE(),T3=qE(),im=VE();GE.exports=ke;zE.inherits(ke,am);function ke(e){if(!(this instanceof ke))return new ke(e);this._overheadLength=0,this._valueLength=0,this._valuesToMeasure=[],am.call(this),e=e||{};for(var t in e)this[t]=e[t]}ke.LINE_BREAK=`\r
3
+ `;ke.DEFAULT_CONTENT_TYPE="application/octet-stream";ke.prototype.append=function(e,t,n){n=n||{},typeof n=="string"&&(n={filename:n});var r=am.prototype.append.bind(this);if(typeof t=="number"&&(t=""+t),zE.isArray(t)){this._error(new Error("Arrays are not supported."));return}var i=this._multiPartHeader(e,t,n),a=this._multiPartFooter();r(i),r(t),r(a),this._trackLength(i,t,n)};ke.prototype._trackLength=function(e,t,n){var r=0;n.knownLength!=null?r+=+n.knownLength:Buffer.isBuffer(t)?r=t.length:typeof t=="string"&&(r=Buffer.byteLength(t)),this._valueLength+=r,this._overheadLength+=Buffer.byteLength(e)+ke.LINE_BREAK.length,!(!t||!t.path&&!(t.readable&&t.hasOwnProperty("httpVersion")))&&(n.knownLength||this._valuesToMeasure.push(t))};ke.prototype._lengthRetriever=function(e,t){e.hasOwnProperty("fd")?e.end!=null&&e.end!=1/0&&e.start!=null?t(null,e.end+1-(e.start?e.start:0)):x3.stat(e.path,function(n,r){var i;if(n){t(n);return}i=r.size-(e.start?e.start:0),t(null,i)}):e.hasOwnProperty("httpVersion")?t(null,+e.headers["content-length"]):e.hasOwnProperty("httpModule")?(e.on("response",function(n){e.pause(),t(null,+n.headers["content-length"])}),e.resume()):t("Unknown stream")};ke.prototype._multiPartHeader=function(e,t,n){if(typeof n.header=="string")return n.header;var r=this._getContentDisposition(t,n),i=this._getContentType(t,n),a="",s={"Content-Disposition":["form-data",'name="'+e+'"'].concat(r||[]),"Content-Type":[].concat(i||[])};typeof n.header=="object"&&im(s,n.header);var o;for(var c in s)s.hasOwnProperty(c)&&(o=s[c],o!=null&&(Array.isArray(o)||(o=[o]),o.length&&(a+=c+": "+o.join("; ")+ke.LINE_BREAK)));return"--"+this.getBoundary()+ke.LINE_BREAK+a+ke.LINE_BREAK};ke.prototype._getContentDisposition=function(e,t){var n,r;return typeof t.filepath=="string"?n=nm.normalize(t.filepath).replace(/\\/g,"/"):t.filename||e.name||e.path?n=nm.basename(t.filename||e.name||e.path):e.readable&&e.hasOwnProperty("httpVersion")&&(n=nm.basename(e.client._httpMessage.path||"")),n&&(r='filename="'+n+'"'),r};ke.prototype._getContentType=function(e,t){var n=t.contentType;return!n&&e.name&&(n=rm.lookup(e.name)),!n&&e.path&&(n=rm.lookup(e.path)),!n&&e.readable&&e.hasOwnProperty("httpVersion")&&(n=e.headers["content-type"]),!n&&(t.filepath||t.filename)&&(n=rm.lookup(t.filepath||t.filename)),!n&&typeof e=="object"&&(n=ke.DEFAULT_CONTENT_TYPE),n};ke.prototype._multiPartFooter=function(){return function(e){var t=ke.LINE_BREAK,n=this._streams.length===0;n&&(t+=this._lastBoundary()),e(t)}.bind(this)};ke.prototype._lastBoundary=function(){return"--"+this.getBoundary()+"--"+ke.LINE_BREAK};ke.prototype.getHeaders=function(e){var t,n={"content-type":"multipart/form-data; boundary="+this.getBoundary()};for(t in e)e.hasOwnProperty(t)&&(n[t.toLowerCase()]=e[t]);return n};ke.prototype.setBoundary=function(e){this._boundary=e};ke.prototype.getBoundary=function(){return this._boundary||this._generateBoundary(),this._boundary};ke.prototype.getBuffer=function(){for(var e=new Buffer.alloc(0),t=this.getBoundary(),n=0,r=this._streams.length;n<r;n++)typeof this._streams[n]!="function"&&(Buffer.isBuffer(this._streams[n])?e=Buffer.concat([e,this._streams[n]]):e=Buffer.concat([e,Buffer.from(this._streams[n])]),(typeof this._streams[n]!="string"||this._streams[n].substring(2,t.length+2)!==t)&&(e=Buffer.concat([e,Buffer.from(ke.LINE_BREAK)])));return Buffer.concat([e,Buffer.from(this._lastBoundary())])};ke.prototype._generateBoundary=function(){for(var e="--------------------------",t=0;t<24;t++)e+=Math.floor(Math.random()*10).toString(16);this._boundary=e};ke.prototype.getLengthSync=function(){var e=this._overheadLength+this._valueLength;return this._streams.length&&(e+=this._lastBoundary().length),this.hasKnownLength()||this._error(new Error("Cannot calculate proper length in synchronous way.")),e};ke.prototype.hasKnownLength=function(){var e=!0;return this._valuesToMeasure.length&&(e=!1),e};ke.prototype.getLength=function(e){var t=this._overheadLength+this._valueLength;if(this._streams.length&&(t+=this._lastBoundary().length),!this._valuesToMeasure.length){process.nextTick(e.bind(this,null,t));return}T3.parallel(this._valuesToMeasure,this._lengthRetriever,function(n,r){if(n){e(n);return}r.forEach(function(i){t+=i}),e(null,t)})};ke.prototype.submit=function(e,t){var n,r,i={method:"post"};return typeof e=="string"?(e=S3(e),r=im({port:e.port,path:e.pathname,host:e.hostname,protocol:e.protocol},i)):(r=im(e,i),r.port||(r.port=r.protocol=="https:"?443:80)),r.headers=this.getHeaders(e.headers),r.protocol=="https:"?n=I3.request(r):n=C3.request(r),this.getLength(function(a,s){if(a){this._error(a);return}if(n.setHeader("Content-Length",s),this.pipe(n),t){var o,c=function(u,d){return n.removeListener("error",c),n.removeListener("response",o),t.call(this,u,d)};o=c.bind(this,null),n.on("error",c),n.on("response",o)}}.bind(this)),n};ke.prototype._error=function(e){this.error||(this.error=e,this.pause(),this.emit("error",e))};ke.prototype.toString=function(){return"[object FormData]"}});var sm=N(fd=>{"use strict";Object.defineProperty(fd,"__esModule",{value:!0});fd.defaultJsonSerializer=void 0;fd.defaultJsonSerializer={parse:JSON.parse,stringify:JSON.stringify}});var ZE=N(Ru=>{"use strict";var N3=Ru&&Ru.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(Ru,"__esModule",{value:!0});var HE=dE(),R3=N3(WE()),k3=sm(),B3=function(e){return HE.isExtractableFile(e)||e!==null&&typeof e=="object"&&typeof e.pipe=="function"};function O3(e,t,n,r){r===void 0&&(r=k3.defaultJsonSerializer);var i=HE.extractFiles({query:e,variables:t,operationName:n},"",B3),a=i.clone,s=i.files;if(s.size===0){if(!Array.isArray(e))return r.stringify(a);if(typeof t<"u"&&!Array.isArray(t))throw new Error("Cannot create request body with given variable type, array expected");var o=e.reduce(function(h,_,w){return h.push({query:_,variables:t?t[w]:void 0}),h},[]);return r.stringify(o)}var c=typeof FormData>"u"?R3.default:FormData,u=new c;u.append("operations",r.stringify(a));var d={},p=0;return s.forEach(function(h){d[++p]=h}),u.append("map",r.stringify(d)),p=0,s.forEach(function(h,_){u.append(""+ ++p,_)}),u}Ru.default=O3});var XE=N(cn=>{"use strict";Object.defineProperty(cn,"__esModule",{value:!0});cn.parseBatchRequestsExtendedArgs=cn.parseRawRequestExtendedArgs=cn.parseRequestExtendedArgs=cn.parseBatchRequestArgs=cn.parseRawRequestArgs=cn.parseRequestArgs=void 0;function P3(e,t,n){return e.document?e:{document:e,variables:t,requestHeaders:n,signal:void 0}}cn.parseRequestArgs=P3;function D3(e,t,n){return e.query?e:{query:e,variables:t,requestHeaders:n,signal:void 0}}cn.parseRawRequestArgs=D3;function M3(e,t){return e.documents?e:{documents:e,requestHeaders:t,signal:void 0}}cn.parseBatchRequestArgs=M3;function F3(e,t,n,r){return e.document?e:{url:e,document:t,variables:n,requestHeaders:r,signal:void 0}}cn.parseRequestExtendedArgs=F3;function L3(e,t,n,r){return e.query?e:{url:e,query:t,variables:n,requestHeaders:r,signal:void 0}}cn.parseRawRequestExtendedArgs=L3;function Q3(e,t,n){return e.documents?e:{url:e,documents:t,requestHeaders:n,signal:void 0}}cn.parseBatchRequestsExtendedArgs=Q3});var om=N(Ps=>{"use strict";var U3=Ps&&Ps.__extends||function(){var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,i){r.__proto__=i}||function(r,i){for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(r[a]=i[a])},e(t,n)};return function(t,n){if(typeof n!="function"&&n!==null)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");e(t,n);function r(){this.constructor=t}t.prototype=n===null?Object.create(n):(r.prototype=n.prototype,new r)}}();Object.defineProperty(Ps,"__esModule",{value:!0});Ps.ClientError=void 0;var q3=function(e){U3(t,e);function t(n,r){var i=this,a=t.extractMessage(n)+": "+JSON.stringify({response:n,request:r});return i=e.call(this,a)||this,Object.setPrototypeOf(i,t.prototype),i.response=n,i.request=r,typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(i,t),i}return t.extractMessage=function(n){try{return n.errors[0].message}catch{return"GraphQL Error (Code: "+n.status+")"}},t}(Error);Ps.ClientError=q3});var t0=N(Lr=>{"use strict";var pd=Lr&&Lr.__assign||function(){return pd=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},pd.apply(this,arguments)},J3=Lr&&Lr.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?a(d.value):i(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},V3=Lr&&Lr.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}};Object.defineProperty(Lr,"__esModule",{value:!0});Lr.GraphQLWebSocketClient=void 0;var YE=om(),z3=cm(),G3="connection_init",W3="connection_ack",KE="ping",jE="pong",H3="subscribe",Z3="next",X3="error",e0="complete",Ds=function(){function e(t,n,r){this._type=t,this._payload=n,this._id=r}return Object.defineProperty(e.prototype,"type",{get:function(){return this._type},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"id",{get:function(){return this._id},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"payload",{get:function(){return this._payload},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"text",{get:function(){var t={type:this.type};return this.id!=null&&this.id!=null&&(t.id=this.id),this.payload!=null&&this.payload!=null&&(t.payload=this.payload),JSON.stringify(t)},enumerable:!1,configurable:!0}),e.parse=function(t,n){var r=JSON.parse(t),i=r.type,a=r.payload,s=r.id;return new e(i,n(a),s)},e}(),Y3=function(){function e(t,n){var r=this,i=n.onInit,a=n.onAcknowledged,s=n.onPing,o=n.onPong;this.socketState={acknowledged:!1,lastRequestId:0,subscriptions:{}},this.socket=t,t.onopen=function(c){return J3(r,void 0,void 0,function(){var u,d,p,h;return V3(this,function(_){switch(_.label){case 0:return this.socketState.acknowledged=!1,this.socketState.subscriptions={},d=(u=t).send,p=K3,i?[4,i()]:[3,2];case 1:return h=_.sent(),[3,3];case 2:h=null,_.label=3;case 3:return d.apply(u,[p.apply(void 0,[h]).text]),[2]}})})},t.onclose=function(c){r.socketState.acknowledged=!1,r.socketState.subscriptions={}},t.onerror=function(c){console.error(c)},t.onmessage=function(c){try{var u=$3(c.data);switch(u.type){case W3:{r.socketState.acknowledged?console.warn("Duplicate CONNECTION_ACK message ignored"):(r.socketState.acknowledged=!0,a&&a(u.payload));return}case KE:{s?s(u.payload).then(function(w){return t.send($E(w).text)}):t.send($E(null).text);return}case jE:{o&&o(u.payload);return}}if(!r.socketState.acknowledged||u.id===void 0||u.id===null||!r.socketState.subscriptions[u.id])return;var d=r.socketState.subscriptions[u.id],p=d.query,h=d.variables,_=d.subscriber;switch(u.type){case Z3:{!u.payload.errors&&u.payload.data&&_.next&&_.next(u.payload.data),u.payload.errors&&_.error&&_.error(new YE.ClientError(pd(pd({},u.payload),{status:200}),{query:p,variables:h}));return}case X3:{_.error&&_.error(new YE.ClientError({errors:u.payload,status:200},{query:p,variables:h}));return}case e0:{_.complete&&_.complete(),delete r.socketState.subscriptions[u.id];return}}}catch(w){console.error(w),t.close(1006)}t.close(4400,"Unknown graphql-ws message.")}}return e.prototype.makeSubscribe=function(t,n,r,i){var a=this,s=(this.socketState.lastRequestId++).toString();return this.socketState.subscriptions[s]={query:t,variables:r,subscriber:i},this.socket.send(eP(s,{query:t,operationName:n,variables:r}).text),function(){a.socket.send(tP(s).text),delete a.socketState.subscriptions[s]}},e.prototype.rawRequest=function(t,n){var r=this;return new Promise(function(i,a){var s;r.rawSubscribe(t,{next:function(o,c){return s={data:o,extensions:c}},error:a,complete:function(){return i(s)}},n)})},e.prototype.request=function(t,n){var r=this;return new Promise(function(i,a){var s;r.subscribe(t,{next:function(o){return s=o},error:a,complete:function(){return i(s)}},n)})},e.prototype.subscribe=function(t,n,r){var i=z3.resolveRequestDocument(t),a=i.query,s=i.operationName;return this.makeSubscribe(a,s,r,n)},e.prototype.rawSubscribe=function(t,n,r){return this.makeSubscribe(t,void 0,r,n)},e.prototype.ping=function(t){this.socket.send(j3(t).text)},e.prototype.close=function(){this.socket.close(1e3)},e.PROTOCOL="graphql-transport-ws",e}();Lr.GraphQLWebSocketClient=Y3;function $3(e,t){t===void 0&&(t=function(r){return r});var n=Ds.parse(e,t);return n}function K3(e){return new Ds(G3,e)}function j3(e){return new Ds(KE,e,void 0)}function $E(e){return new Ds(jE,e,void 0)}function eP(e,t){return new Ds(H3,t,e)}function tP(e){return new Ds(e0,void 0,e)}});var cm=N(xe=>{"use strict";var At=xe&&xe.__assign||function(){return At=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++){t=arguments[n];for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])}return e},At.apply(this,arguments)},nP=xe&&xe.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),rP=xe&&xe.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),iP=xe&&xe.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&nP(t,e,n);return rP(t,e),t},Ui=xe&&xe.__awaiter||function(e,t,n,r){function i(a){return a instanceof n?a:new n(function(s){s(a)})}return new(n||(n=Promise))(function(a,s){function o(d){try{u(r.next(d))}catch(p){s(p)}}function c(d){try{u(r.throw(d))}catch(p){s(p)}}function u(d){d.done?a(d.value):i(d.value).then(o,c)}u((r=r.apply(e,t||[])).next())})},qi=xe&&xe.__generator||function(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}},hd=xe&&xe.__rest||function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var i=0,r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]]);return n},aP=xe&&xe.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(xe,"__esModule",{value:!0});xe.GraphQLWebSocketClient=xe.gql=xe.resolveRequestDocument=xe.batchRequests=xe.request=xe.rawRequest=xe.GraphQLClient=xe.ClientError=void 0;var md=iP(sE()),um=md,sP=I1(),oP=S1(),cP=aP(ZE()),uP=sm(),Fs=XE(),i0=om();Object.defineProperty(xe,"ClientError",{enumerable:!0,get:function(){return i0.ClientError}});var Ms=function(e){var t={};return e&&(typeof Headers<"u"&&e instanceof Headers||um&&um.Headers&&e instanceof um.Headers?t=_P(e):Array.isArray(e)?e.forEach(function(n){var r=n[0],i=n[1];t[r]=i}):t=e),t},n0=function(e){return e.replace(/([\s,]|#[^\n\r]+)+/g," ").trim()},lP=function(e){var t=e.query,n=e.variables,r=e.operationName,i=e.jsonSerializer;if(!Array.isArray(t)){var a=["query="+encodeURIComponent(n0(t))];return n&&a.push("variables="+encodeURIComponent(i.stringify(n))),r&&a.push("operationName="+encodeURIComponent(r)),a.join("&")}if(typeof n<"u"&&!Array.isArray(n))throw new Error("Cannot create query with given variable type, array expected");var s=t.reduce(function(o,c,u){return o.push({query:n0(c),variables:n?i.stringify(n[u]):void 0}),o},[]);return"query="+encodeURIComponent(i.stringify(s))},dP=function(e){var t=e.url,n=e.query,r=e.variables,i=e.operationName,a=e.headers,s=e.fetch,o=e.fetchOptions,c=e.middleware;return Ui(void 0,void 0,void 0,function(){var u,d;return qi(this,function(p){switch(p.label){case 0:return u=cP.default(n,r,i,o.jsonSerializer),d=At({method:"POST",headers:At(At({},typeof u=="string"?{"Content-Type":"application/json"}:{}),a),body:u},o),c?[4,Promise.resolve(c(d))]:[3,2];case 1:d=p.sent(),p.label=2;case 2:return[4,s(t,d)];case 3:return[2,p.sent()]}})})},fP=function(e){var t=e.url,n=e.query,r=e.variables,i=e.operationName,a=e.headers,s=e.fetch,o=e.fetchOptions,c=e.middleware;return Ui(void 0,void 0,void 0,function(){var u,d;return qi(this,function(p){switch(p.label){case 0:return u=lP({query:n,variables:r,operationName:i,jsonSerializer:o.jsonSerializer}),d=At({method:"GET",headers:a},o),c?[4,Promise.resolve(c(d))]:[3,2];case 1:d=p.sent(),p.label=2;case 2:return[4,s(t+"?"+u,d)];case 3:return[2,p.sent()]}})})},_d=function(){function e(t,n){n===void 0&&(n={}),this.url=t,this.options=n}return e.prototype.rawRequest=function(t,n,r){return Ui(this,void 0,void 0,function(){var i,a,s,o,c,u,d,p,h,_,w,A;return qi(this,function(S){return i=Fs.parseRawRequestArgs(t,n,r),a=this.options,s=a.headers,o=a.fetch,c=o===void 0?md.default:o,u=a.method,d=u===void 0?"POST":u,p=a.requestMiddleware,h=a.responseMiddleware,_=hd(a,["headers","fetch","method","requestMiddleware","responseMiddleware"]),w=this.url,i.signal!==void 0&&(_.signal=i.signal),A=gd(i.query).operationName,[2,lm({url:w,query:i.query,variables:i.variables,headers:At(At({},Ms(dm(s))),Ms(i.requestHeaders)),operationName:A,fetch:c,method:d,fetchOptions:_,middleware:p}).then(function(b){return h&&h(b),b}).catch(function(b){throw h&&h(b),b})]})})},e.prototype.request=function(t){for(var n=[],r=1;r<arguments.length;r++)n[r-1]=arguments[r];var i=n[0],a=n[1],s=Fs.parseRequestArgs(t,i,a),o=this.options,c=o.headers,u=o.fetch,d=u===void 0?md.default:u,p=o.method,h=p===void 0?"POST":p,_=o.requestMiddleware,w=o.responseMiddleware,A=hd(o,["headers","fetch","method","requestMiddleware","responseMiddleware"]),S=this.url;s.signal!==void 0&&(A.signal=s.signal);var b=gd(s.document),T=b.query,B=b.operationName;return lm({url:S,query:T,variables:s.variables,headers:At(At({},Ms(dm(c))),Ms(s.requestHeaders)),operationName:B,fetch:d,method:h,fetchOptions:A,middleware:_}).then(function(O){return w&&w(O),O.data}).catch(function(O){throw w&&w(O),O})},e.prototype.batchRequests=function(t,n){var r=Fs.parseBatchRequestArgs(t,n),i=this.options,a=i.headers,s=i.fetch,o=s===void 0?md.default:s,c=i.method,u=c===void 0?"POST":c,d=i.requestMiddleware,p=i.responseMiddleware,h=hd(i,["headers","fetch","method","requestMiddleware","responseMiddleware"]),_=this.url;r.signal!==void 0&&(h.signal=r.signal);var w=r.documents.map(function(S){var b=S.document;return gd(b).query}),A=r.documents.map(function(S){var b=S.variables;return b});return lm({url:_,query:w,variables:A,headers:At(At({},Ms(dm(a))),Ms(r.requestHeaders)),operationName:void 0,fetch:o,method:u,fetchOptions:h,middleware:d}).then(function(S){return p&&p(S),S.data}).catch(function(S){throw p&&p(S),S})},e.prototype.setHeaders=function(t){return this.options.headers=t,this},e.prototype.setHeader=function(t,n){var r,i=this.options.headers;return i?i[t]=n:this.options.headers=(r={},r[t]=n,r),this},e.prototype.setEndpoint=function(t){return this.url=t,this},e}();xe.GraphQLClient=_d;function lm(e){var t=e.url,n=e.query,r=e.variables,i=e.headers,a=e.operationName,s=e.fetch,o=e.method,c=o===void 0?"POST":o,u=e.fetchOptions,d=e.middleware;return Ui(this,void 0,void 0,function(){var p,h,_,w,A,S,b,T,B,O,z,Q;return qi(this,function(V){switch(V.label){case 0:return p=c.toUpperCase()==="POST"?dP:fP,h=Array.isArray(n),[4,p({url:t,query:n,variables:r,operationName:a,headers:i,fetch:s,fetchOptions:u,middleware:d})];case 1:return _=V.sent(),[4,mP(_,u.jsonSerializer)];case 2:if(w=V.sent(),A=h&&Array.isArray(w)?!w.some(function(Z){var fe=Z.data;return!fe}):!!w.data,S=!w.errors||u.errorPolicy==="all"||u.errorPolicy==="ignore",_.ok&&S&&A)return b=_.headers,T=_.status,B=w.errors,O=hd(w,["errors"]),z=u.errorPolicy==="ignore"?O:w,[2,At(At({},h?{data:z}:z),{headers:b,status:T})];throw Q=typeof w=="string"?{error:w}:w,new i0.ClientError(At(At({},Q),{status:_.status,headers:_.headers}),{query:n,variables:r})}})})}function pP(e,t,n,r){return Ui(this,void 0,void 0,function(){var i,a;return qi(this,function(s){return i=Fs.parseRawRequestExtendedArgs(e,t,n,r),a=new _d(i.url),[2,a.rawRequest(At({},i))]})})}xe.rawRequest=pP;function a0(e,t){for(var n=[],r=2;r<arguments.length;r++)n[r-2]=arguments[r];return Ui(this,void 0,void 0,function(){var i,a,s,o;return qi(this,function(c){return i=n[0],a=n[1],s=Fs.parseRequestExtendedArgs(e,t,i,a),o=new _d(s.url),[2,o.request(At({},s))]})})}xe.request=a0;function hP(e,t,n){return Ui(this,void 0,void 0,function(){var r,i;return qi(this,function(a){return r=Fs.parseBatchRequestsExtendedArgs(e,t,n),i=new _d(r.url),[2,i.batchRequests(At({},r))]})})}xe.batchRequests=hP;xe.default=a0;function mP(e,t){return t===void 0&&(t=uP.defaultJsonSerializer),Ui(this,void 0,void 0,function(){var n,r,i;return qi(this,function(a){switch(a.label){case 0:return e.headers.forEach(function(s,o){o.toLowerCase()==="content-type"&&(n=s)}),n&&n.toLowerCase().startsWith("application/json")?(i=(r=t).parse,[4,e.text()]):[3,2];case 1:return[2,i.apply(r,[a.sent()])];case 2:return[2,e.text()]}})})}function r0(e){var t,n=void 0,r=e.definitions.filter(function(i){return i.kind==="OperationDefinition"});return r.length===1&&(n=(t=r[0].name)===null||t===void 0?void 0:t.value),n}function gd(e){if(typeof e=="string"){var t=void 0;try{var n=sP.parse(e);t=r0(n)}catch{}return{query:e,operationName:t}}var r=r0(e);return{query:oP.print(e),operationName:r}}xe.resolveRequestDocument=gd;function dm(e){return typeof e=="function"?e():e}function gP(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];return e.reduce(function(r,i,a){return""+r+i+(a in t?t[a]:"")},"")}xe.gql=gP;function _P(e){var t={};return e.forEach(function(n,r){t[r]=n}),t}var AP=t0();Object.defineProperty(xe,"GraphQLWebSocketClient",{enumerable:!0,get:function(){return AP.GraphQLWebSocketClient}})});var Du=N(C=>{"use strict";var l,B0=typeof TextDecoder<"u"?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};typeof TextDecoder<"u"&&B0.decode();var Ou=null;function O0(){return(Ou===null||Ou.byteLength===0)&&(Ou=new Uint8Array(l.memory.buffer)),Ou}function xP(e,t){return e=e>>>0,B0.decode(O0().subarray(e,e+t))}function m(e,t){if(!(e instanceof t))throw new Error(`expected instance of ${t.name}`);return e.ptr}function TP(e,t){let n=l.gm_args(e,t);return F.__wrap(n)}function NP(e,t,n){let r=l.gtf_args(e,t,n);return F.__wrap(r)}function RP(e,t,n,r){m(r,Qr);var i=r.__destroy_into_raw();let a=l.wdcm_args(e,t,n,i);return F.__wrap(a)}function kP(e,t,n,r){m(r,Qr);var i=r.__destroy_into_raw();let a=l.wqcm_args(e,t,n,i);return F.__wrap(a)}function BP(e,t,n,r){m(r,Qa);var i=r.__destroy_into_raw();let a=l.wdop_args(e,t,n,i);return F.__wrap(a)}function OP(e,t,n,r){m(r,Qa);var i=r.__destroy_into_raw();let a=l.wqop_args(e,t,n,i);return F.__wrap(a)}function PP(e,t,n,r){m(r,Ua);var i=r.__destroy_into_raw();let a=l.wdml_args(e,t,n,i);return F.__wrap(a)}function DP(e,t,n,r){m(r,Ua);var i=r.__destroy_into_raw();let a=l.wqml_args(e,t,n,i);return F.__wrap(a)}function MP(e,t,n,r){m(r,La);var i=r.__destroy_into_raw();let a=l.wddv_args(e,t,n,i);return F.__wrap(a)}function FP(e,t,n,r){m(r,La);var i=r.__destroy_into_raw();let a=l.wqdv_args(e,t,n,i);return F.__wrap(a)}function LP(e,t,n){let r=l.add(e,t,n);return F.__wrap(r)}function QP(e,t,n){let r=l.and(e,t,n);return F.__wrap(r)}function UP(e,t,n){let r=l.div(e,t,n);return F.__wrap(r)}function qP(e,t,n){let r=l.eq(e,t,n);return F.__wrap(r)}function JP(e,t,n){let r=l.exp(e,t,n);return F.__wrap(r)}function VP(e,t,n){let r=l.gt(e,t,n);return F.__wrap(r)}function zP(e,t,n){let r=l.lt(e,t,n);return F.__wrap(r)}function GP(e,t,n){let r=l.mlog(e,t,n);return F.__wrap(r)}function WP(e,t,n){let r=l.mroo(e,t,n);return F.__wrap(r)}function HP(e,t,n){let r=l.mod_(e,t,n);return F.__wrap(r)}function ZP(e,t){let n=l.move_(e,t);return F.__wrap(n)}function XP(e,t,n){let r=l.mul(e,t,n);return F.__wrap(r)}function YP(e,t){let n=l.not(e,t);return F.__wrap(n)}function $P(e,t,n){let r=l.or(e,t,n);return F.__wrap(r)}function KP(e,t,n){let r=l.sll(e,t,n);return F.__wrap(r)}function jP(e,t,n){let r=l.srl(e,t,n);return F.__wrap(r)}function eD(e,t,n){let r=l.sub(e,t,n);return F.__wrap(r)}function tD(e,t,n){let r=l.xor(e,t,n);return F.__wrap(r)}function nD(e,t,n,r){let i=l.mldv(e,t,n,r);return F.__wrap(i)}function rD(e){let t=l.ret(e);return F.__wrap(t)}function iD(e,t){let n=l.retd(e,t);return F.__wrap(n)}function aD(e){let t=l.aloc(e);return F.__wrap(t)}function sD(e,t){let n=l.mcl(e,t);return F.__wrap(n)}function oD(e,t,n){let r=l.mcp(e,t,n);return F.__wrap(r)}function cD(e,t,n,r){let i=l.meq(e,t,n,r);return F.__wrap(i)}function uD(e,t){let n=l.bhsh(e,t);return F.__wrap(n)}function lD(e){let t=l.bhei(e);return F.__wrap(t)}function dD(e,t){let n=l.burn(e,t);return F.__wrap(n)}function fD(e,t,n,r){let i=l.call(e,t,n,r);return F.__wrap(i)}function pD(e,t,n,r){let i=l.ccp(e,t,n,r);return F.__wrap(i)}function hD(e,t){let n=l.croo(e,t);return F.__wrap(n)}function mD(e,t){let n=l.csiz(e,t);return F.__wrap(n)}function gD(e){let t=l.cb(e);return F.__wrap(t)}function _D(e,t,n,r){let i=l.ldc(e,t,n,r);return F.__wrap(i)}function AD(e,t,n,r){let i=l.log(e,t,n,r);return F.__wrap(i)}function yD(e,t,n,r){let i=l.logd(e,t,n,r);return F.__wrap(i)}function vD(e,t){let n=l.mint(e,t);return F.__wrap(n)}function wD(e){let t=l.rvrt(e);return F.__wrap(t)}function bD(e,t,n){let r=l.scwq(e,t,n);return F.__wrap(r)}function ED(e,t,n){let r=l.srw(e,t,n);return F.__wrap(r)}function CD(e,t,n,r){let i=l.srwq(e,t,n,r);return F.__wrap(i)}function ID(e,t,n){let r=l.sww(e,t,n);return F.__wrap(r)}function SD(e,t,n,r){let i=l.swwq(e,t,n,r);return F.__wrap(i)}function xD(e,t,n){let r=l.tr(e,t,n);return F.__wrap(r)}function TD(e,t,n,r){let i=l.tro(e,t,n,r);return F.__wrap(i)}function ND(e,t,n){let r=l.eck1(e,t,n);return F.__wrap(r)}function RD(e,t,n){let r=l.ecr1(e,t,n);return F.__wrap(r)}function kD(e,t,n,r){let i=l.ed19(e,t,n,r);return F.__wrap(i)}function BD(e,t,n){let r=l.k256(e,t,n);return F.__wrap(r)}function OD(e,t,n){let r=l.s256(e,t,n);return F.__wrap(r)}function PD(e,t){let n=l.time(e,t);return F.__wrap(n)}function DD(){let e=l.noop();return F.__wrap(e)}function MD(e){let t=l.flag(e);return F.__wrap(t)}function FD(e,t,n){let r=l.bal(e,t,n);return F.__wrap(r)}function LD(e){let t=l.jmp(e);return F.__wrap(t)}function QD(e,t,n){let r=l.jne(e,t,n);return F.__wrap(r)}function UD(e,t,n,r){let i=l.smo(e,t,n,r);return F.__wrap(i)}function qD(e,t,n){let r=l.addi(e,t,n);return F.__wrap(r)}function JD(e,t,n){let r=l.andi(e,t,n);return F.__wrap(r)}function VD(e,t,n){let r=l.divi(e,t,n);return F.__wrap(r)}function zD(e,t,n){let r=l.expi(e,t,n);return F.__wrap(r)}function GD(e,t,n){let r=l.modi(e,t,n);return F.__wrap(r)}function WD(e,t,n){let r=l.muli(e,t,n);return F.__wrap(r)}function HD(e,t,n){let r=l.ori(e,t,n);return F.__wrap(r)}function ZD(e,t,n){let r=l.slli(e,t,n);return F.__wrap(r)}function XD(e,t,n){let r=l.srli(e,t,n);return F.__wrap(r)}function YD(e,t,n){let r=l.subi(e,t,n);return F.__wrap(r)}function $D(e,t,n){let r=l.xori(e,t,n);return F.__wrap(r)}function KD(e,t,n){let r=l.jnei(e,t,n);return F.__wrap(r)}function jD(e,t,n){let r=l.lb(e,t,n);return F.__wrap(r)}function eM(e,t,n){let r=l.lw(e,t,n);return F.__wrap(r)}function tM(e,t,n){let r=l.sb(e,t,n);return F.__wrap(r)}function nM(e,t,n){let r=l.sw(e,t,n);return F.__wrap(r)}function rM(e,t,n){let r=l.mcpi(e,t,n);return F.__wrap(r)}function iM(e,t,n){let r=l.gtf(e,t,n);return F.__wrap(r)}function aM(e,t){let n=l.mcli(e,t);return F.__wrap(n)}function sM(e,t){let n=l.gm(e,t);return F.__wrap(n)}function oM(e,t){let n=l.movi(e,t);return F.__wrap(n)}function cM(e,t){let n=l.jnzi(e,t);return F.__wrap(n)}function uM(e,t){let n=l.jmpf(e,t);return F.__wrap(n)}function lM(e,t){let n=l.jmpb(e,t);return F.__wrap(n)}function dM(e,t,n){let r=l.jnzf(e,t,n);return F.__wrap(r)}function fM(e,t,n){let r=l.jnzb(e,t,n);return F.__wrap(r)}function pM(e,t,n,r){let i=l.jnef(e,t,n,r);return F.__wrap(i)}function hM(e,t,n,r){let i=l.jneb(e,t,n,r);return F.__wrap(i)}function mM(e){let t=l.ji(e);return F.__wrap(t)}function gM(e){let t=l.cfei(e);return F.__wrap(t)}function _M(e){let t=l.cfsi(e);return F.__wrap(t)}function AM(e){let t=l.cfe(e);return F.__wrap(t)}function yM(e){let t=l.cfs(e);return F.__wrap(t)}function vM(e){let t=l.pshl(e);return F.__wrap(t)}function wM(e){let t=l.pshh(e);return F.__wrap(t)}function bM(e){let t=l.popl(e);return F.__wrap(t)}function EM(e){let t=l.poph(e);return F.__wrap(t)}function CM(e,t,n,r){let i=l.wdcm(e,t,n,r);return F.__wrap(i)}function IM(e,t,n,r){let i=l.wqcm(e,t,n,r);return F.__wrap(i)}function SM(e,t,n,r){let i=l.wdop(e,t,n,r);return F.__wrap(i)}function xM(e,t,n,r){let i=l.wqop(e,t,n,r);return F.__wrap(i)}function TM(e,t,n,r){let i=l.wdml(e,t,n,r);return F.__wrap(i)}function NM(e,t,n,r){let i=l.wqml(e,t,n,r);return F.__wrap(i)}function RM(e,t,n,r){let i=l.wddv(e,t,n,r);return F.__wrap(i)}function kM(e,t,n,r){let i=l.wqdv(e,t,n,r);return F.__wrap(i)}function BM(e,t,n,r){let i=l.wdmd(e,t,n,r);return F.__wrap(i)}function OM(e,t,n,r){let i=l.wqmd(e,t,n,r);return F.__wrap(i)}function PM(e,t,n,r){let i=l.wdam(e,t,n,r);return F.__wrap(i)}function DM(e,t,n,r){let i=l.wqam(e,t,n,r);return F.__wrap(i)}function MM(e,t,n,r){let i=l.wdmm(e,t,n,r);return F.__wrap(i)}function FM(e,t,n,r){let i=l.wqmm(e,t,n,r);return F.__wrap(i)}function LM(e,t,n,r){let i=l.ecal(e,t,n,r);return F.__wrap(i)}function QM(e,t){let n=l.bsiz(e,t);return F.__wrap(n)}function UM(e,t,n,r){let i=l.bldd(e,t,n,r);return F.__wrap(i)}var Pu=null;function h0(){return(Pu===null||Pu.byteLength===0)&&(Pu=new Int32Array(l.memory.buffer)),Pu}function qM(e,t){return e=e>>>0,O0().subarray(e/1,e/1+t)}var JM=Object.freeze({IsCallerExternal:1,1:"IsCallerExternal",GetCaller:2,2:"GetCaller",GetVerifyingPredicate:3,3:"GetVerifyingPredicate",GetChainId:4,4:"GetChainId",TxStart:5,5:"TxStart",BaseAssetId:6,6:"BaseAssetId"}),VM=Object.freeze({EQ:0,0:"EQ",NE:1,1:"NE",LT:2,2:"LT",GT:3,3:"GT",LTE:4,4:"LTE",GTE:5,5:"GTE",LZC:6,6:"LZC"}),zM=Object.freeze({UnknownPanicReason:0,0:"UnknownPanicReason",Revert:1,1:"Revert",OutOfGas:2,2:"OutOfGas",TransactionValidity:3,3:"TransactionValidity",MemoryOverflow:4,4:"MemoryOverflow",ArithmeticOverflow:5,5:"ArithmeticOverflow",ContractNotFound:6,6:"ContractNotFound",MemoryOwnership:7,7:"MemoryOwnership",NotEnoughBalance:8,8:"NotEnoughBalance",ExpectedInternalContext:9,9:"ExpectedInternalContext",AssetIdNotFound:10,10:"AssetIdNotFound",InputNotFound:11,11:"InputNotFound",OutputNotFound:12,12:"OutputNotFound",WitnessNotFound:13,13:"WitnessNotFound",TransactionMaturity:14,14:"TransactionMaturity",InvalidMetadataIdentifier:15,15:"InvalidMetadataIdentifier",MalformedCallStructure:16,16:"MalformedCallStructure",ReservedRegisterNotWritable:17,17:"ReservedRegisterNotWritable",InvalidFlags:18,18:"InvalidFlags",InvalidImmediateValue:19,19:"InvalidImmediateValue",ExpectedCoinInput:20,20:"ExpectedCoinInput",EcalError:21,21:"EcalError",MemoryWriteOverlap:22,22:"MemoryWriteOverlap",ContractNotInInputs:23,23:"ContractNotInInputs",InternalBalanceOverflow:24,24:"InternalBalanceOverflow",ContractMaxSize:25,25:"ContractMaxSize",ExpectedUnallocatedStack:26,26:"ExpectedUnallocatedStack",MaxStaticContractsReached:27,27:"MaxStaticContractsReached",TransferAmountCannotBeZero:28,28:"TransferAmountCannotBeZero",ExpectedOutputVariable:29,29:"ExpectedOutputVariable",ExpectedParentInternalContext:30,30:"ExpectedParentInternalContext",PredicateReturnedNonOne:31,31:"PredicateReturnedNonOne",ContractIdAlreadyDeployed:32,32:"ContractIdAlreadyDeployed",ContractMismatch:33,33:"ContractMismatch",MessageDataTooLong:34,34:"MessageDataTooLong",ArithmeticError:35,35:"ArithmeticError",ContractInstructionNotAllowed:36,36:"ContractInstructionNotAllowed",TransferZeroCoins:37,37:"TransferZeroCoins",InvalidInstruction:38,38:"InvalidInstruction",MemoryNotExecutable:39,39:"MemoryNotExecutable",PolicyIsNotSet:40,40:"PolicyIsNotSet",PolicyNotFound:41,41:"PolicyNotFound",TooManyReceipts:42,42:"TooManyReceipts",BalanceOverflow:43,43:"BalanceOverflow",InvalidBlockHeight:44,44:"InvalidBlockHeight",TooManySlots:45,45:"TooManySlots",ExpectedNestedCaller:46,46:"ExpectedNestedCaller",MemoryGrowthOverlap:47,47:"MemoryGrowthOverlap",UninitalizedMemoryAccess:48,48:"UninitalizedMemoryAccess",OverridingConsensusParameters:49,49:"OverridingConsensusParameters",UnknownStateTransactionBytecodeRoot:50,50:"UnknownStateTransactionBytecodeRoot",OverridingStateTransactionBytecode:51,51:"OverridingStateTransactionBytecode",BytecodeAlreadyUploaded:52,52:"BytecodeAlreadyUploaded",ThePartIsNotSequentiallyConnected:53,53:"ThePartIsNotSequentiallyConnected",BlobNotFound:54,54:"BlobNotFound",BlobIdAlreadyUploaded:55,55:"BlobIdAlreadyUploaded",GasCostNotDefined:56,56:"GasCostNotDefined"}),GM=Object.freeze({Type:1,1:"Type",ScriptGasLimit:2,2:"ScriptGasLimit",ScriptLength:3,3:"ScriptLength",ScriptDataLength:4,4:"ScriptDataLength",ScriptInputsCount:5,5:"ScriptInputsCount",ScriptOutputsCount:6,6:"ScriptOutputsCount",ScriptWitnessesCount:7,7:"ScriptWitnessesCount",Script:9,9:"Script",ScriptData:10,10:"ScriptData",ScriptInputAtIndex:11,11:"ScriptInputAtIndex",ScriptOutputAtIndex:12,12:"ScriptOutputAtIndex",ScriptWitnessAtIndex:13,13:"ScriptWitnessAtIndex",TxLength:14,14:"TxLength",CreateBytecodeWitnessIndex:257,257:"CreateBytecodeWitnessIndex",CreateStorageSlotsCount:258,258:"CreateStorageSlotsCount",CreateInputsCount:259,259:"CreateInputsCount",CreateOutputsCount:260,260:"CreateOutputsCount",CreateWitnessesCount:261,261:"CreateWitnessesCount",CreateSalt:262,262:"CreateSalt",CreateStorageSlotAtIndex:263,263:"CreateStorageSlotAtIndex",CreateInputAtIndex:264,264:"CreateInputAtIndex",CreateOutputAtIndex:265,265:"CreateOutputAtIndex",CreateWitnessAtIndex:266,266:"CreateWitnessAtIndex",InputType:512,512:"InputType",InputCoinTxId:513,513:"InputCoinTxId",InputCoinOutputIndex:514,514:"InputCoinOutputIndex",InputCoinOwner:515,515:"InputCoinOwner",InputCoinAmount:516,516:"InputCoinAmount",InputCoinAssetId:517,517:"InputCoinAssetId",InputCoinTxPointer:518,518:"InputCoinTxPointer",InputCoinWitnessIndex:519,519:"InputCoinWitnessIndex",InputCoinPredicateLength:521,521:"InputCoinPredicateLength",InputCoinPredicateDataLength:522,522:"InputCoinPredicateDataLength",InputCoinPredicate:523,523:"InputCoinPredicate",InputCoinPredicateData:524,524:"InputCoinPredicateData",InputCoinPredicateGasUsed:525,525:"InputCoinPredicateGasUsed",InputContractTxId:544,544:"InputContractTxId",InputContractOutputIndex:545,545:"InputContractOutputIndex",InputContractId:549,549:"InputContractId",InputMessageSender:576,576:"InputMessageSender",InputMessageRecipient:577,577:"InputMessageRecipient",InputMessageAmount:578,578:"InputMessageAmount",InputMessageNonce:579,579:"InputMessageNonce",InputMessageWitnessIndex:580,580:"InputMessageWitnessIndex",InputMessageDataLength:581,581:"InputMessageDataLength",InputMessagePredicateLength:582,582:"InputMessagePredicateLength",InputMessagePredicateDataLength:583,583:"InputMessagePredicateDataLength",InputMessageData:584,584:"InputMessageData",InputMessagePredicate:585,585:"InputMessagePredicate",InputMessagePredicateData:586,586:"InputMessagePredicateData",InputMessagePredicateGasUsed:587,587:"InputMessagePredicateGasUsed",OutputType:768,768:"OutputType",OutputCoinTo:769,769:"OutputCoinTo",OutputCoinAmount:770,770:"OutputCoinAmount",OutputCoinAssetId:771,771:"OutputCoinAssetId",OutputContractInputIndex:772,772:"OutputContractInputIndex",OutputContractCreatedContractId:775,775:"OutputContractCreatedContractId",OutputContractCreatedStateRoot:776,776:"OutputContractCreatedStateRoot",WitnessDataLength:1024,1024:"WitnessDataLength",WitnessData:1025,1025:"WitnessData",PolicyTypes:1280,1280:"PolicyTypes",PolicyTip:1281,1281:"PolicyTip",PolicyWitnessLimit:1282,1282:"PolicyWitnessLimit",PolicyMaturity:1283,1283:"PolicyMaturity",PolicyMaxFee:1284,1284:"PolicyMaxFee"}),WM=Object.freeze({ADD:0,0:"ADD",SUB:1,1:"SUB",NOT:2,2:"NOT",OR:3,3:"OR",XOR:4,4:"XOR",AND:5,5:"AND",SHL:6,6:"SHL",SHR:7,7:"SHR"}),HM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_add_free(e>>>0)),pm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,HM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_add_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},ZM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_addi_free(e>>>0)),hm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ZM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_addi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},XM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_aloc_free(e>>>0)),mm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,XM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_aloc_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},YM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_and_free(e>>>0)),gm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,YM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_and_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},$M=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_andi_free(e>>>0)),_m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$M.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_andi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},KM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bal_free(e>>>0)),Am=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,KM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bal_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},jM=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bhei_free(e>>>0)),ym=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,jM.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bhei_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},eF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bhsh_free(e>>>0)),vm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,eF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bhsh_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},tF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bldd_free(e>>>0)),wm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bldd_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},nF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_bsiz_free(e>>>0)),bm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_bsiz_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},rF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_burn_free(e>>>0)),Em=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,rF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_burn_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},iF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_call_free(e>>>0)),Cm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,iF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_call_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},aF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cb_free(e>>>0)),Im=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,aF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cb_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},sF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ccp_free(e>>>0)),Sm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,sF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ccp_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},oF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfe_free(e>>>0)),xm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,oF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfe_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},cF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfei_free(e>>>0)),Tm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,cF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfei_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},uF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfs_free(e>>>0)),Nm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,uF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfs_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},lF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_cfsi_free(e>>>0)),Rm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,lF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_cfsi_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},dF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_croo_free(e>>>0)),km=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,dF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_croo_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},fF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_csiz_free(e>>>0)),Bm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,fF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_csiz_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},m0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_compareargs_free(e>>>0)),Qr=class{static __wrap(t){t=t>>>0;let n=Object.create(Qr.prototype);return n.__wbg_ptr=t,m0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,m0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_compareargs_free(t)}get mode(){return l.__wbg_get_compareargs_mode(this.__wbg_ptr)}set mode(t){l.__wbg_set_compareargs_mode(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}to_imm(){let t=this.__destroy_into_raw(),n=l.compareargs_to_imm(t);return ze.__wrap(n)}static from_imm(t){m(t,ze);var n=t.__destroy_into_raw();let r=l.compareargs_from_imm(n);return r===0?void 0:Qr.__wrap(r)}},pF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_div_free(e>>>0)),Om=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,pF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_div_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},hF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_divi_free(e>>>0)),Pm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,hF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_divi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},mF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_divargs_free(e>>>0)),La=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,mF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_divargs_free(t)}get indirect_rhs(){return l.__wbg_get_divargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}},gF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ecal_free(e>>>0)),Dm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,gF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ecal_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},_F=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_eck1_free(e>>>0)),Mm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_F.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_eck1_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},AF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ecr1_free(e>>>0)),Fm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,AF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ecr1_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},yF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ed19_free(e>>>0)),Lm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,yF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ed19_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},vF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_eq_free(e>>>0)),Qm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,vF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_eq_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},wF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_exp_free(e>>>0)),Um=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,wF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_exp_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},bF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_expi_free(e>>>0)),qm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,bF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_expi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},EF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_flag_free(e>>>0)),Jm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,EF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_flag_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},g0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gm_free(e>>>0)),Qs=class{static __wrap(t){t=t>>>0;let n=Object.create(Qs.prototype);return n.__wbg_ptr=t,g0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,g0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gm_free(t)}static from_args(t,n){m(t,f);var r=t.__destroy_into_raw();let i=l.gm_from_args(r,n);return Qs.__wrap(i)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.gm_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},CF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gt_free(e>>>0)),Vm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,CF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gt_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},_0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_gtf_free(e>>>0)),Us=class{static __wrap(t){t=t>>>0;let n=Object.create(Us.prototype);return n.__wbg_ptr=t,_0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_gtf_free(t)}static from_args(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();let s=l.gtf_from_args(i,a,r);return Us.__wrap(s)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.gtf_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},A0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm06_free(e>>>0)),ze=class{static __wrap(t){t=t>>>0;let n=Object.create(ze.prototype);return n.__wbg_ptr=t,A0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,A0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm06_free(t)}},y0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm12_free(e>>>0)),_e=class{static __wrap(t){t=t>>>0;let n=Object.create(_e.prototype);return n.__wbg_ptr=t,y0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,y0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm12_free(t)}},v0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm18_free(e>>>0)),Ft=class{static __wrap(t){t=t>>>0;let n=Object.create(Ft.prototype);return n.__wbg_ptr=t,v0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,v0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm18_free(t)}},w0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_imm24_free(e>>>0)),yt=class{static __wrap(t){t=t>>>0;let n=Object.create(yt.prototype);return n.__wbg_ptr=t,w0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,w0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_imm24_free(t)}},b0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_instruction_free(e>>>0)),F=class{static __wrap(t){t=t>>>0;let n=Object.create(F.prototype);return n.__wbg_ptr=t,b0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,b0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_instruction_free(t)}to_bytes(){try{let i=l.__wbindgen_add_to_stack_pointer(-16);l.instruction_to_bytes(i,this.__wbg_ptr);var t=h0()[i/4+0],n=h0()[i/4+1],r=qM(t,n).slice();return l.__wbindgen_export_0(t,n*1,1),r}finally{l.__wbindgen_add_to_stack_pointer(16)}}static size(){return l.instruction_size()>>>0}},IF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ji_free(e>>>0)),zm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,IF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ji_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},SF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmp_free(e>>>0)),Gm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,SF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmp_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},xF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmpb_free(e>>>0)),Wm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,xF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmpb_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},TF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jmpf_free(e>>>0)),Hm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,TF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jmpf_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},NF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jne_free(e>>>0)),Zm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,NF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jne_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},RF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jneb_free(e>>>0)),Xm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,RF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jneb_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},kF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnef_free(e>>>0)),Ym=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,kF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnef_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},BF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnei_free(e>>>0)),$m=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,BF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnei_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},OF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzb_free(e>>>0)),Km=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,OF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzb_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},PF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzf_free(e>>>0)),jm=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,PF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzf_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},DF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_jnzi_free(e>>>0)),eg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,DF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_jnzi_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},MF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_k256_free(e>>>0)),tg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,MF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_k256_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},FF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lb_free(e>>>0)),ng=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,FF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lb_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},LF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ldc_free(e>>>0)),rg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,LF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ldc_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},QF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_log_free(e>>>0)),ig=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,QF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_log_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},UF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_logd_free(e>>>0)),ag=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,UF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_logd_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},qF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lt_free(e>>>0)),sg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,qF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lt_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},JF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_lw_free(e>>>0)),og=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,JF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_lw_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},VF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcl_free(e>>>0)),cg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,VF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcl_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},zF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcli_free(e>>>0)),ug=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,zF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcli_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},GF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcp_free(e>>>0)),lg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,GF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcp_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},WF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mcpi_free(e>>>0)),dg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,WF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mcpi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},HF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_meq_free(e>>>0)),fg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,HF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_meq_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ZF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mint_free(e>>>0)),pg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ZF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mint_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},XF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mldv_free(e>>>0)),hg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,XF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mldv_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},YF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mlog_free(e>>>0)),mg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,YF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mlog_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},$F=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mod_free(e>>>0)),gg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,$F.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mod_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},KF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_modi_free(e>>>0)),_g=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,KF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_modi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},jF=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_move_free(e>>>0)),Ag=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,jF.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_move_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},eL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_movi_free(e>>>0)),yg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,eL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_movi_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,Ft);var i=n.__destroy_into_raw();let a=l.jmpb_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}imm18(){let t=l.gm_imm18(this.__wbg_ptr);return Ft.__wrap(t)}},tL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mroo_free(e>>>0)),vg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,tL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mroo_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},nL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mul_free(e>>>0)),wg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,nL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mul_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},rL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_muli_free(e>>>0)),bg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,rL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_muli_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},iL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mathargs_free(e>>>0)),Qa=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,iL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mathargs_free(t)}get op(){return l.__wbg_get_mathargs_op(this.__wbg_ptr)}set op(t){l.__wbg_set_mathargs_op(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}},aL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_mulargs_free(e>>>0)),Ua=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,aL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_mulargs_free(t)}get indirect_lhs(){return l.__wbg_get_compareargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_lhs(t){l.__wbg_set_compareargs_indirect_rhs(this.__wbg_ptr,t)}get indirect_rhs(){return l.__wbg_get_mulargs_indirect_rhs(this.__wbg_ptr)!==0}set indirect_rhs(t){l.__wbg_set_mulargs_indirect_rhs(this.__wbg_ptr,t)}},sL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_noop_free(e>>>0)),Eg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,sL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_noop_free(t)}constructor(){let t=l.noop_new_typescript();return this.__wbg_ptr=t>>>0,this}},oL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_not_free(e>>>0)),Cg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,oL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_not_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},cL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_or_free(e>>>0)),Ig=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,cL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_or_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},uL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ori_free(e>>>0)),Sg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,uL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ori_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},lL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_poph_free(e>>>0)),xg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,lL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_poph_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},dL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_popl_free(e>>>0)),Tg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,dL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_popl_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},fL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_pshh_free(e>>>0)),Ng=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,fL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_pshh_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},pL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_pshl_free(e>>>0)),Rg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,pL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_pshl_free(t)}constructor(t){m(t,yt);var n=t.__destroy_into_raw();let r=l.cfei_new_typescript(n);return this.__wbg_ptr=r>>>0,this}imm24(){let t=l.cfei_imm24(this.__wbg_ptr);return yt.__wrap(t)}},hL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_panicinstruction_free(e>>>0)),kg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,hL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_panicinstruction_free(t)}constructor(t,n){let r=l.panicinstruction_error_typescript(t,n);return this.__wbg_ptr=r>>>0,this}reason(){return l.panicinstruction_reason(this.__wbg_ptr)}instruction(){return l.panicinstruction_instruction(this.__wbg_ptr)>>>0}},mL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_ret_free(e>>>0)),Bg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,mL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_ret_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},gL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_retd_free(e>>>0)),Og=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,gL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_retd_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},_L=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_rvrt_free(e>>>0)),Pg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,_L.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_rvrt_free(t)}constructor(t){m(t,f);var n=t.__destroy_into_raw();let r=l.aloc_new_typescript(n);return this.__wbg_ptr=r>>>0,this}ra(){let t=l.aloc_ra(this.__wbg_ptr);return f.__wrap(t)}},E0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_regid_free(e>>>0)),f=class{static __wrap(t){t=t>>>0;let n=Object.create(f.prototype);return n.__wbg_ptr=t,E0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,E0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_regid_free(t)}static new_checked(t){let n=l.regid_new_checked(t);return n===0?void 0:f.__wrap(n)}static bal(){let t=l.regid_bal();return f.__wrap(t)}static cgas(){let t=l.regid_cgas();return f.__wrap(t)}static err(){let t=l.regid_err();return f.__wrap(t)}static flag(){let t=l.regid_flag();return f.__wrap(t)}static fp(){let t=l.regid_fp();return f.__wrap(t)}static ggas(){let t=l.regid_ggas();return f.__wrap(t)}static hp(){let t=l.regid_hp();return f.__wrap(t)}static is(){let t=l.regid_is();return f.__wrap(t)}static of(){let t=l.regid_of();return f.__wrap(t)}static one(){let t=l.regid_one();return f.__wrap(t)}static pc(){let t=l.regid_pc();return f.__wrap(t)}static ret(){let t=l.regid_ret();return f.__wrap(t)}static retl(){let t=l.regid_retl();return f.__wrap(t)}static sp(){let t=l.regid_sp();return f.__wrap(t)}static spp(){let t=l.regid_spp();return f.__wrap(t)}static writable(){let t=l.regid_writable();return f.__wrap(t)}static zero(){let t=l.regid_zero();return f.__wrap(t)}constructor(t){let n=l.regid_new_typescript(t);return this.__wbg_ptr=n>>>0,this}to_u8(){let t=this.__destroy_into_raw();return l.regid_to_u8(t)}},AL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_s256_free(e>>>0)),Dg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,AL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_s256_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},yL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sb_free(e>>>0)),Mg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,yL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sb_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},vL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_scwq_free(e>>>0)),Fg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,vL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_scwq_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},wL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sll_free(e>>>0)),Lg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,wL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sll_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},bL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_slli_free(e>>>0)),Qg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,bL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_slli_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},EL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_smo_free(e>>>0)),Ug=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,EL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_smo_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},CL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srl_free(e>>>0)),qg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,CL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srl_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},IL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srli_free(e>>>0)),Jg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,IL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srli_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},SL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srw_free(e>>>0)),Vg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,SL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srw_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},xL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_srwq_free(e>>>0)),zg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,xL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_srwq_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},TL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sub_free(e>>>0)),Gg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,TL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sub_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},NL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_subi_free(e>>>0)),Wg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,NL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_subi_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},RL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sw_free(e>>>0)),Hg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,RL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sw_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}},kL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_sww_free(e>>>0)),Zg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,kL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_sww_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},BL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_swwq_free(e>>>0)),Xg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,BL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_swwq_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},OL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_time_free(e>>>0)),Yg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,OL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_time_free(t)}constructor(t,n){m(t,f);var r=t.__destroy_into_raw();m(n,f);var i=n.__destroy_into_raw();let a=l.bhsh_new_typescript(r,i);return this.__wbg_ptr=a>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}},PL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_tr_free(e>>>0)),$g=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,PL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_tr_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},DL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_tro_free(e>>>0)),Kg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,DL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_tro_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},ML=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdam_free(e>>>0)),jg=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,ML.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdam_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},C0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdcm_free(e>>>0)),qs=class{static __wrap(t){t=t>>>0;let n=Object.create(qs.prototype);return n.__wbg_ptr=t,C0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,C0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdcm_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Qr);var c=i.__destroy_into_raw();let u=l.wdcm_from_args(a,s,o,c);return qs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},I0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wddv_free(e>>>0)),Js=class{static __wrap(t){t=t>>>0;let n=Object.create(Js.prototype);return n.__wbg_ptr=t,I0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,I0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wddv_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,La);var c=i.__destroy_into_raw();let u=l.wddv_from_args(a,s,o,c);return Js.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},FL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdmd_free(e>>>0)),e_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,FL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdmd_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},S0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdml_free(e>>>0)),Vs=class{static __wrap(t){t=t>>>0;let n=Object.create(Vs.prototype);return n.__wbg_ptr=t,S0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,S0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdml_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Ua);var c=i.__destroy_into_raw();let u=l.wdml_from_args(a,s,o,c);return Vs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},LL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdmm_free(e>>>0)),t_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,LL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdmm_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},x0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wdop_free(e>>>0)),zs=class{static __wrap(t){t=t>>>0;let n=Object.create(zs.prototype);return n.__wbg_ptr=t,x0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,x0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wdop_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Qa);var c=i.__destroy_into_raw();let u=l.wdop_from_args(a,s,o,c);return zs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},QL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqam_free(e>>>0)),n_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,QL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqam_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},T0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqcm_free(e>>>0)),Gs=class{static __wrap(t){t=t>>>0;let n=Object.create(Gs.prototype);return n.__wbg_ptr=t,T0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,T0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqcm_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Qr);var c=i.__destroy_into_raw();let u=l.wdcm_from_args(a,s,o,c);return Gs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},N0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqdv_free(e>>>0)),Ws=class{static __wrap(t){t=t>>>0;let n=Object.create(Ws.prototype);return n.__wbg_ptr=t,N0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,N0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqdv_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,La);var c=i.__destroy_into_raw();let u=l.wddv_from_args(a,s,o,c);return Ws.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},UL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqmd_free(e>>>0)),r_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,UL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqmd_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},R0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqml_free(e>>>0)),Hs=class{static __wrap(t){t=t>>>0;let n=Object.create(Hs.prototype);return n.__wbg_ptr=t,R0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,R0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqml_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Ua);var c=i.__destroy_into_raw();let u=l.wdml_from_args(a,s,o,c);return Hs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},qL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqmm_free(e>>>0)),i_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,qL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqmm_free(t)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,f);var c=i.__destroy_into_raw();let u=l.bldd_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}rd(){let t=l.bldd_rd(this.__wbg_ptr);return f.__wrap(t)}},k0=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_wqop_free(e>>>0)),Zs=class{static __wrap(t){t=t>>>0;let n=Object.create(Zs.prototype);return n.__wbg_ptr=t,k0.register(n,n.__wbg_ptr,n),n}__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,k0.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_wqop_free(t)}static from_args(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,Qa);var c=i.__destroy_into_raw();let u=l.wdop_from_args(a,s,o,c);return Zs.__wrap(u)}constructor(t,n,r,i){m(t,f);var a=t.__destroy_into_raw();m(n,f);var s=n.__destroy_into_raw();m(r,f);var o=r.__destroy_into_raw();m(i,ze);var c=i.__destroy_into_raw();let u=l.wdcm_new_typescript(a,s,o,c);return this.__wbg_ptr=u>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}imm06(){let t=l.jneb_imm06(this.__wbg_ptr);return ze.__wrap(t)}},JL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_xor_free(e>>>0)),a_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,JL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_xor_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,f);var s=r.__destroy_into_raw();let o=l.add_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}rc(){let t=l.add_rc(this.__wbg_ptr);return f.__wrap(t)}},VL=typeof FinalizationRegistry>"u"?{register:()=>{},unregister:()=>{}}:new FinalizationRegistry(e=>l.__wbg_xori_free(e>>>0)),s_=class{__destroy_into_raw(){let t=this.__wbg_ptr;return this.__wbg_ptr=0,VL.unregister(this),t}free(){let t=this.__destroy_into_raw();l.__wbg_xori_free(t)}constructor(t,n,r){m(t,f);var i=t.__destroy_into_raw();m(n,f);var a=n.__destroy_into_raw();m(r,_e);var s=r.__destroy_into_raw();let o=l.addi_new_typescript(i,a,s);return this.__wbg_ptr=o>>>0,this}ra(){let t=l.add_ra(this.__wbg_ptr);return f.__wrap(t)}rb(){let t=l.add_rb(this.__wbg_ptr);return f.__wrap(t)}imm12(){let t=l.addi_imm12(this.__wbg_ptr);return _e.__wrap(t)}};async function zL(e,t){if(typeof Response=="function"&&e instanceof Response){if(typeof WebAssembly.instantiateStreaming=="function")try{return await WebAssembly.instantiateStreaming(e,t)}catch(r){if(e.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}let n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}else{let n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}function P0(){let e={};return e.wbg={},e.wbg.__wbindgen_throw=function(t,n){throw new Error(xP(t,n))},e}function D0(e,t){return l=e.exports,M0.__wbindgen_wasm_module=t,Pu=null,Ou=null,l}function GL(e){if(l!==void 0)return l;let t=P0();e instanceof WebAssembly.Module||(e=new WebAssembly.Module(e));let n=new WebAssembly.Instance(e,t);return D0(n,e)}async function M0(e){if(l!==void 0)return l;let t=P0(),{instance:n,module:r}=await zL(await e,t);return D0(n,r)}function WL(e,t,n,r){function i(p,h,_){var w=_?WebAssembly.instantiateStreaming:WebAssembly.instantiate,A=_?WebAssembly.compileStreaming:WebAssembly.compile;return h?w(p,h):A(p)}var a=null,s=typeof process<"u"&&process.versions!=null&&process.versions.node!=null;if(s)a=Buffer.from(n,"base64");else{var o=globalThis.atob(n),c=o.length;a=new Uint8Array(new ArrayBuffer(c));for(var u=0;u<c;u++)a[u]=o.charCodeAt(u)}if(e){var d=new WebAssembly.Module(a);return r?new WebAssembly.Instance(d,r):d}else return i(a,r,!1)}function HL(e){return WL(1,null,"AGFzbQEAAAABQAtgA39/fwF/YAF/AX9gBH9/f38Bf2ACf38Bf2AAAX9gAn9/AGABfwBgBX9/f39/AX9gA39/fwBgAABgAn5/AX8CGAEDd2JnEF9fd2JpbmRnZW5fdGhyb3cABQP9AfsBAQMKBgEFBQUBBQEBAQEBAQECBQICAQMBAgICAgUCAwMDAwMDAwIBBQEFAAMDAwMDAwMDAwMDAwEAAQEFBQEBAQEBAQEBAQECAQUFBQMCAQAAAQEBBQICAQEGAAYCAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGBgMHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEBAQEBAQEBAQEBAQMGAAMBAQEHAgIAAgAGAQQDAQMFCAEJCQMDAwUBAQEGBgYGBAQEBAQEBAQEBAQEBAQEBAQEBAYHBwICAgMHBwAIAAMEBQFwAQcHBQMBABEGCQF/AUGAgMAACwf4TM8FBm1lbW9yeQIAFl9fd2JnX2NvbXBhcmVhcmdzX2ZyZWUAexpfX3diZ19nZXRfY29tcGFyZWFyZ3NfbW9kZQA6Gl9fd2JnX3NldF9jb21wYXJlYXJnc19tb2RlACgiX193YmdfZ2V0X2NvbXBhcmVhcmdzX2luZGlyZWN0X3JocwA7Il9fd2JnX3NldF9jb21wYXJlYXJnc19pbmRpcmVjdF9yaHMAPBJjb21wYXJlYXJnc190b19pbW0ASRRjb21wYXJlYXJnc19mcm9tX2ltbQApFV9fd2JnX2dldF9tYXRoYXJnc19vcAA6FV9fd2JnX3NldF9tYXRoYXJnc19vcAAqEl9fd2JnX211bGFyZ3NfZnJlZQB8Hl9fd2JnX2dldF9tdWxhcmdzX2luZGlyZWN0X3JocwA6Hl9fd2JnX3NldF9tdWxhcmdzX2luZGlyZWN0X3JocwA9El9fd2JnX2RpdmFyZ3NfZnJlZQDYAR5fX3diZ19nZXRfZGl2YXJnc19pbmRpcmVjdF9yaHMArwEhcGFuaWNpbnN0cnVjdGlvbl9lcnJvcl90eXBlc2NyaXB0AE0XcGFuaWNpbnN0cnVjdGlvbl9yZWFzb24APxxwYW5pY2luc3RydWN0aW9uX2luc3RydWN0aW9uAEAMZ21fZnJvbV9hcmdzAMsBDWd0Zl9mcm9tX2FyZ3MAwwEHZ21fYXJncwB9CGd0Zl9hcmdzAFsOd2RjbV9mcm9tX2FyZ3MAJg53ZG9wX2Zyb21fYXJncwAmDndkbWxfZnJvbV9hcmdzAB4Od2Rkdl9mcm9tX2FyZ3MAwQEJd2RjbV9hcmdzABkJd3FjbV9hcmdzABoJd2RvcF9hcmdzABsJd3FvcF9hcmdzABwJd2RtbF9hcmdzABQJd3FtbF9hcmdzABUJd2Rkdl9hcmdzAFYJd3Fkdl9hcmdzAFcQX193YmdfaW1tMDZfZnJlZQDZARBfX3diZ19pbW0xMl9mcmVlANoBEF9fd2JnX2ltbTE4X2ZyZWUA2wEOX193YmdfYWRkX2ZyZWUAugEPX193Ymdfbm9vcF9mcmVlAFwSYWRkX25ld190eXBlc2NyaXB0AFAGYWRkX3JhABYGYWRkX3JiAAsGYWRkX3JjAA8DYWRkALsBA2FuZAB/A2RpdgCAAQJlcQCBAQNleHAAggECZ3QAgwECbHQAhAEEbWxvZwCFAQRtcm9vAIYBBG1vZF8AhwEFbW92ZV8ALANtdWwAiAEDbm90AC0Cb3IAiQEDc2xsAIoBA3NybACLAQNzdWIAjAEDeG9yAI0BBG1sZHYAXQNyZXQAsAEEcmV0ZAAuE2Fsb2NfbmV3X3R5cGVzY3JpcHQAWAdhbG9jX3JhAE8EYWxvYwCxAQNtY2wALwNtY3AAjgEDbWVxAF4TYmhzaF9uZXdfdHlwZXNjcmlwdAAfBGJoc2gAMARiaGVpALIBBGJ1cm4AMQRjYWxsAF8DY2NwAGAEY3JvbwAyBGNzaXoAMwJjYgCzAQNsZGMAYQNsb2cAYgRsb2dkAGMEbWludAA0BHJ2cnQAtAEEc2N3cQCPAQNzcncAkAEEc3J3cQBkA3N3dwCRAQRzd3dxAGUCdHIAkgEDdHJvAGYEZWNrMQCTAQRlY3IxAJQBBGVkMTkAZwRrMjU2AJUBBHMyNTYAlgEEdGltZQA1E25vb3BfbmV3X3R5cGVzY3JpcHQAyAEEbm9vcADcAQRmbGFnALUBA2JhbACXAQNqbXAAtgEDam5lAJgBA3NtbwBoE2FkZGlfbmV3X3R5cGVzY3JpcHQAUQphZGRpX2ltbTEyAAwEYWRkaQCZAQRhbmRpAJoBBGRpdmkAmwEEZXhwaQCcAQRtb2RpAJ0BBG11bGkAngEDb3JpAJ8BBHNsbGkAoAEEc3JsaQChAQRzdWJpAKIBBHhvcmkAowEEam5laQCkAQJsYgClAQJsdwCmAQJzYgCnAQJzdwCoAQRtY3BpAKkBEmd0Zl9uZXdfdHlwZXNjcmlwdADFAQNndGYAqgEEbWNsaQAgEWdtX25ld190eXBlc2NyaXB0ADYIZ21faW1tMTgACQJnbQAhBG1vdmkAIgRqbnppACMEam1wZgAkE2ptcGJfbmV3X3R5cGVzY3JpcHQAFwRqbXBiACUEam56ZgCrAQRqbnpiAKwBBGpuZWYAaQpqbmViX2ltbTA2ABgEam5lYgBqAmppAEETY2ZlaV9uZXdfdHlwZXNjcmlwdAA4CmNmZWlfaW1tMjQAJwRjZmVpAEIEY2ZzaQBDA2NmZQC3AQNjZnMAuAEEcHNobABEBHBzaGgARQRwb3BsAEYEcG9waABHE3dkY21fbmV3X3R5cGVzY3JpcHQAwgEEd2RjbQBrBHdxY20AbAR3ZG9wAG0Ed3FvcABuBHdkbWwAbwR3cW1sAHAEd2RkdgBxBHdxZHYAcgR3ZG1kAHMEd3FtZAB0BHdkYW0AdQR3cWFtAHYEd2RtbQB3BHdxbW0AeARlY2FsAHkEYnNpegA3E2JsZGRfbmV3X3R5cGVzY3JpcHQATgdibGRkX3JkABgEYmxkZAB6Fl9fd2JnX2luc3RydWN0aW9uX2ZyZWUAWhRpbnN0cnVjdGlvbl90b19ieXRlcwAKEGluc3RydWN0aW9uX3NpemUA7gERcmVnaWRfbmV3X2NoZWNrZWQArQEJcmVnaWRfYmFsAN0BCnJlZ2lkX2NnYXMA3gEJcmVnaWRfZXJyAN8BCnJlZ2lkX2ZsYWcA4AEIcmVnaWRfZnAA4QEKcmVnaWRfZ2dhcwDiAQhyZWdpZF9ocADjAQhyZWdpZF9pcwDkAQhyZWdpZF9vZgDlAQlyZWdpZF9vbmUA5gEIcmVnaWRfcGMA5wEJcmVnaWRfcmV0AOgBCnJlZ2lkX3JldGwA6QEIcmVnaWRfc3AA6gEJcmVnaWRfc3BwAOsBDnJlZ2lkX3dyaXRhYmxlAOwBCnJlZ2lkX3plcm8A7QEUcmVnaWRfbmV3X3R5cGVzY3JpcHQA1QELcmVnaWRfdG9fdTgA1gETbW92aV9uZXdfdHlwZXNjcmlwdAAXE21jbGlfbmV3X3R5cGVzY3JpcHQAFxNqbnppX25ld190eXBlc2NyaXB0ABcTam1wZl9uZXdfdHlwZXNjcmlwdAAXEm5vdF9uZXdfdHlwZXNjcmlwdAAfE3JldGRfbmV3X3R5cGVzY3JpcHQAHxNtb3ZlX25ld190eXBlc2NyaXB0AB8SbWNsX25ld190eXBlc2NyaXB0AB8TYnVybl9uZXdfdHlwZXNjcmlwdAAfE2Nyb29fbmV3X3R5cGVzY3JpcHQAHxNjc2l6X25ld190eXBlc2NyaXB0AB8TbWludF9uZXdfdHlwZXNjcmlwdAAfE3RpbWVfbmV3X3R5cGVzY3JpcHQAHxNic2l6X25ld190eXBlc2NyaXB0AB8ScmV0X25ld190eXBlc2NyaXB0AFgTYmhlaV9uZXdfdHlwZXNjcmlwdABYEWNiX25ld190eXBlc2NyaXB0AFgTcnZydF9uZXdfdHlwZXNjcmlwdABYE2ZsYWdfbmV3X3R5cGVzY3JpcHQAWBJqbXBfbmV3X3R5cGVzY3JpcHQAWBJjZmVfbmV3X3R5cGVzY3JpcHQAWBJjZnNfbmV3X3R5cGVzY3JpcHQAWBNtbGR2X25ld190eXBlc2NyaXB0AE4SbWVxX25ld190eXBlc2NyaXB0AE4SY2NwX25ld190eXBlc2NyaXB0AE4SbG9nX25ld190eXBlc2NyaXB0AE4TbG9nZF9uZXdfdHlwZXNjcmlwdABOE3Nyd3FfbmV3X3R5cGVzY3JpcHQAThNzd3dxX25ld190eXBlc2NyaXB0AE4SdHJvX25ld190eXBlc2NyaXB0AE4TZWQxOV9uZXdfdHlwZXNjcmlwdABOEnNtb19uZXdfdHlwZXNjcmlwdABOEmxkY19uZXdfdHlwZXNjcmlwdABOE2puZWZfbmV3X3R5cGVzY3JpcHQAThN3ZG1kX25ld190eXBlc2NyaXB0AE4Td3FtZF9uZXdfdHlwZXNjcmlwdABOE3dkYW1fbmV3X3R5cGVzY3JpcHQAThN3cWFtX25ld190eXBlc2NyaXB0AE4Td2RtbV9uZXdfdHlwZXNjcmlwdABOE3dxbW1fbmV3X3R5cGVzY3JpcHQAThNlY2FsX25ld190eXBlc2NyaXB0AE4TY2FsbF9uZXdfdHlwZXNjcmlwdABOEmFuZF9uZXdfdHlwZXNjcmlwdABQEmRpdl9uZXdfdHlwZXNjcmlwdABQEWVxX25ld190eXBlc2NyaXB0AFASZXhwX25ld190eXBlc2NyaXB0AFARZ3RfbmV3X3R5cGVzY3JpcHQAUBFsdF9uZXdfdHlwZXNjcmlwdABQE21sb2dfbmV3X3R5cGVzY3JpcHQAUBNtcm9vX25ld190eXBlc2NyaXB0AFASbW9kX25ld190eXBlc2NyaXB0AFASbXVsX25ld190eXBlc2NyaXB0AFARb3JfbmV3X3R5cGVzY3JpcHQAUBJzbGxfbmV3X3R5cGVzY3JpcHQAUBJzcmxfbmV3X3R5cGVzY3JpcHQAUBJzdWJfbmV3X3R5cGVzY3JpcHQAUBJ4b3JfbmV3X3R5cGVzY3JpcHQAUBJtY3BfbmV3X3R5cGVzY3JpcHQAUBNzY3dxX25ld190eXBlc2NyaXB0AFASc3J3X25ld190eXBlc2NyaXB0AFASc3d3X25ld190eXBlc2NyaXB0AFARdHJfbmV3X3R5cGVzY3JpcHQAUBNlY2sxX25ld190eXBlc2NyaXB0AFATZWNyMV9uZXdfdHlwZXNjcmlwdABQE2syNTZfbmV3X3R5cGVzY3JpcHQAUBNzMjU2X25ld190eXBlc2NyaXB0AFASYmFsX25ld190eXBlc2NyaXB0AFASam5lX25ld190eXBlc2NyaXB0AFATYW5kaV9uZXdfdHlwZXNjcmlwdABRE2RpdmlfbmV3X3R5cGVzY3JpcHQAURNleHBpX25ld190eXBlc2NyaXB0AFETbW9kaV9uZXdfdHlwZXNjcmlwdABRE211bGlfbmV3X3R5cGVzY3JpcHQAURJvcmlfbmV3X3R5cGVzY3JpcHQAURNzbGxpX25ld190eXBlc2NyaXB0AFETc3JsaV9uZXdfdHlwZXNjcmlwdABRE3N1YmlfbmV3X3R5cGVzY3JpcHQAURN4b3JpX25ld190eXBlc2NyaXB0AFETam5laV9uZXdfdHlwZXNjcmlwdABREWxiX25ld190eXBlc2NyaXB0AFERbHdfbmV3X3R5cGVzY3JpcHQAURFzYl9uZXdfdHlwZXNjcmlwdABREXN3X25ld190eXBlc2NyaXB0AFETbWNwaV9uZXdfdHlwZXNjcmlwdABRE2puemZfbmV3X3R5cGVzY3JpcHQAURNqbnpiX25ld190eXBlc2NyaXB0AFEOd3FjbV9mcm9tX2FyZ3MAJg53cW9wX2Zyb21fYXJncwAmH19fd2JnX3NldF9tYXRoYXJnc19pbmRpcmVjdF9yaHMAPB5fX3diZ19zZXRfbXVsYXJnc19pbmRpcmVjdF9saHMAPB5fX3diZ19zZXRfZGl2YXJnc19pbmRpcmVjdF9yaHMAPBFqaV9uZXdfdHlwZXNjcmlwdAA4E2Nmc2lfbmV3X3R5cGVzY3JpcHQAOBNwc2hsX25ld190eXBlc2NyaXB0ADgTcHNoaF9uZXdfdHlwZXNjcmlwdAA4E3BvcGxfbmV3X3R5cGVzY3JpcHQAOBNwb3BoX25ld190eXBlc2NyaXB0ADgTd3FvcF9uZXdfdHlwZXNjcmlwdADCARN3ZG1sX25ld190eXBlc2NyaXB0AMIBE3dkZHZfbmV3X3R5cGVzY3JpcHQAwgETd2RvcF9uZXdfdHlwZXNjcmlwdADCARN3cW1sX25ld190eXBlc2NyaXB0AMIBDndxbWxfZnJvbV9hcmdzAB4Td3Fkdl9uZXdfdHlwZXNjcmlwdADCAQ53cWR2X2Zyb21fYXJncwDBARN3cWNtX25ld190eXBlc2NyaXB0AMIBEF9fd2JnX3JlZ2lkX2ZyZWUA2QEQX193YmdfaW1tMjRfZnJlZQDbAQ5fX3diZ19tdWxfZnJlZQC6AQZqbXBfcmEATw5fX3diZ19qbXBfZnJlZQC6AQZjZmVfcmEATw5fX3diZ19jZmVfZnJlZQC6AQ1fX3diZ19nbV9mcmVlALoBD19fd2JnX2puemlfZnJlZQC6AQ9fX3diZ193ZGNtX2ZyZWUAugEOX193Ymdfc3J3X2ZyZWUAugEPX193YmdfbG9nZF9mcmVlALoBDl9fd2JnX3NybF9mcmVlALoBD19fd2JnX2Nyb29fZnJlZQC6AQ9fX3diZ19yZXRkX2ZyZWUAugEPX193Ymdfd3FtbV9mcmVlALoBDV9fd2JnX3NiX2ZyZWUAugEPX193YmdfdGltZV9mcmVlALoBD19fd2JnX3dxbWxfZnJlZQC6AQ9fX3diZ19zdWJpX2ZyZWUAugEOX193Ymdfc3ViX2ZyZWUAugEOX193Ymdfbm90X2ZyZWUAugENX193YmdfbGJfZnJlZQC6AQ9fX3diZ193cWFtX2ZyZWUAugEPX193YmdfczI1Nl9mcmVlALoBBWNiX3JhAE8NX193YmdfY2JfZnJlZQC6AQ9fX3diZ19wb3BoX2ZyZWUAugEPX193YmdfZGl2aV9mcmVlALoBD19fd2JnX21vZGlfZnJlZQC6AQ5fX3diZ19zd3dfZnJlZQC6AQ5fX3diZ19ndGZfZnJlZQC6AQpwb3BoX2ltbTI0ACcNX193YmdfamlfZnJlZQC6AQ9fX3diZ19zcndxX2ZyZWUAugEPX193Ymdfam1wZl9mcmVlALoBD19fd2JnX2syNTZfZnJlZQC6AQ9fX3diZ193ZG9wX2ZyZWUAugEPX193YmdfYW5kaV9mcmVlALoBD19fd2JnX3NsbGlfZnJlZQC6AQ5fX3diZ19tb2RfZnJlZQC6AQpwb3BsX2ltbTI0ACcPX193YmdfcG9wbF9mcmVlALoBD19fd2JnX2Fsb2NfZnJlZQC6AQ9fX3diZ193ZG1kX2ZyZWUAugEPX193YmdfbWxkdl9mcmVlALoBDV9fd2JnX3N3X2ZyZWUAugEPX193Ymdfam5lYl9mcmVlALoBDl9fd2JnX3Ryb19mcmVlALoBDl9fd2JnX29yaV9mcmVlALoBDl9fd2JnX3NsbF9mcmVlALoBD19fd2JnX3dxZHZfZnJlZQC6AQ9fX3diZ193cW1kX2ZyZWUAugEOX193Ymdfam5lX2ZyZWUAugEPX193YmdfbWxvZ19mcmVlALoBD19fd2JnX21pbnRfZnJlZQC6AQ9fX3diZ193cWNtX2ZyZWUAugEPX193YmdfbXVsaV9mcmVlALoBHl9fd2JnX2dldF9tdWxhcmdzX2luZGlyZWN0X2xocwA7D19fd2JnX21jbGlfZnJlZQC6AQ9fX3diZ19qbmVpX2ZyZWUAugEPX193YmdfY3Npel9mcmVlALoBDV9fd2JnX3RyX2ZyZWUAugEPX193YmdfYmxkZF9mcmVlALoBD19fd2JnX2V4cGlfZnJlZQC6AQ9fX3diZ194b3JpX2ZyZWUAugENX193Ymdfb3JfZnJlZQC6AQ9fX3diZ19lY2sxX2ZyZWUAugEHYmhlaV9yYQBPD19fd2JnX2JoZWlfZnJlZQC6AQhqaV9pbW0yNAAnD19fd2JnX2Nmc2lfZnJlZQC6AQ5fX3diZ19tY2xfZnJlZQC6AQ9fX3diZ19qbnpmX2ZyZWUAugEPX193Ymdfc3d3cV9mcmVlALoBDV9fd2JnX2d0X2ZyZWUAugEPX193Ymdfam1wYl9mcmVlALoBDl9fd2JnX2Rpdl9mcmVlALoBD19fd2JnX2J1cm5fZnJlZQC6AR9fX3diZ19nZXRfbWF0aGFyZ3NfaW5kaXJlY3RfcmhzADsOX193YmdfeG9yX2ZyZWUAugEHcnZydF9yYQBPD19fd2JnX3J2cnRfZnJlZQC6AQZyZXRfcmEATw5fX3diZ19yZXRfZnJlZQC6AQ9fX3diZ193ZG1sX2ZyZWUAugEPX193YmdfY2FsbF9mcmVlALoBD19fd2JnX3dkbW1fZnJlZQC6AQ9fX3diZ19tY3BpX2ZyZWUAugEPX193YmdfYWRkaV9mcmVlALoBD19fd2JnX2puemJfZnJlZQC6AQ9fX3diZ19tcm9vX2ZyZWUAugEOX193YmdfZXhwX2ZyZWUAugEOX193YmdfYmFsX2ZyZWUAugEGY2ZzX3JhAE8OX193YmdfY2ZzX2ZyZWUAugEPX193YmdfZWQxOV9mcmVlALoBD19fd2JnX3NybGlfZnJlZQC6AQpwc2hsX2ltbTI0ACcPX193YmdfcHNobF9mcmVlALoBDl9fd2JnX21lcV9mcmVlALoBD19fd2JnX2Joc2hfZnJlZQC6AQ5fX3diZ19sZGNfZnJlZQC6AQ9fX3diZ19qbmVmX2ZyZWUAugEKcHNoaF9pbW0yNAAnD19fd2JnX3BzaGhfZnJlZQC6AQ9fX3diZ193ZGFtX2ZyZWUAugEOX193YmdfbWNwX2ZyZWUAugENX193YmdfbHRfZnJlZQC6AQ9fX3diZ193cW9wX2ZyZWUAugEOX193YmdfYW5kX2ZyZWUAugEPX193YmdfYnNpel9mcmVlALoBD19fd2JnX3dkZHZfZnJlZQC6AQ9fX3diZ19lY2FsX2ZyZWUAugEKY2ZzaV9pbW0yNAAnD19fd2JnX2NmZWlfZnJlZQC6AQ9fX3diZ19lY3IxX2ZyZWUAugEPX193YmdfbW92aV9mcmVlALoBB2ZsYWdfcmEATw9fX3diZ19mbGFnX2ZyZWUAugEPX193YmdfbW92ZV9mcmVlALoBD19fd2JnX3Njd3FfZnJlZQC6AQ1fX3diZ19lcV9mcmVlALoBDl9fd2JnX3Ntb19mcmVlALoBDl9fd2JnX2xvZ19mcmVlALoBDl9fd2JnX2NjcF9mcmVlALoBDV9fd2JnX2x3X2ZyZWUAugETam5lYl9uZXdfdHlwZXNjcmlwdABOCndxZHZfaW1tMDYAGAp3cW1sX2ltbTA2ABgKd2RtbF9pbW0wNgAYCndxb3BfaW1tMDYAGAp3ZG9wX2ltbTA2ABgKd3FjbV9pbW0wNgAYCndkZHZfaW1tMDYAGAp3ZGNtX2ltbTA2ABgKam5lZl9pbW0wNgAYCWxkY19pbW0wNgAYBm11bF9yYQAWB3dkY21fcmMADwd3ZGNtX3JiAAsHd2RjbV9yYQAWBnNyd19yYwAPBnNyd19yYgALBnNyd19yYQAWBm11bF9yYwAPBm11bF9yYgALB2xvZ2RfcmEAFgZzcmxfcmMADwZzcmxfcmIACwZzcmxfcmEAFgdsb2dkX3JiAAsHam56aV9yYQAWB3JldGRfcmIACwdyZXRkX3JhABYHd3FtbV9yZAAYB3dxbW1fcmMADwd3cW1tX3JiAAsHd3FtbV9yYQAWBXNiX3JiAAsFc2JfcmEAFgd0aW1lX3JiAAsHdGltZV9yYQAWB3dxbWxfcmMADwd3cW1sX3JiAAsHd3FtbF9yYQAWCnN1YmlfaW1tMTIADAdzdWJpX3JiAAsHc3ViaV9yYQAWBnN1Yl9yYwAPBnN1Yl9yYgALBnN1Yl9yYQAWBm5vdF9yYgALBm5vdF9yYQAWCHNiX2ltbTEyAAwFbGJfcmIACwVsYl9yYQAWB3dxYW1fcmQAGAd3cWFtX3JjAA8Hd3FhbV9yYgALB3dxYW1fcmEAFgdzMjU2X3JjAA8HczI1Nl9yYgALB3MyNTZfcmEAFghsYl9pbW0xMgAMB2RpdmlfcmIACwdkaXZpX3JhABYKbW9kaV9pbW0xMgAMB21vZGlfcmIACwdtb2RpX3JhABYGc3d3X3JjAA8Gc3d3X3JiAAsGc3d3X3JhABYJZ3RmX2ltbTEyAAwGZ3RmX3JiAAsGZ3RmX3JhABYHc3J3cV9yZAAYB3Nyd3FfcmMADwdzcndxX3JiAAsHc3J3cV9yYQAWCmpuemlfaW1tMTgACQdqbXBmX3JhABYHbG9nZF9yYwAPB2syNTZfcmIACwdrMjU2X3JhABYHd2RvcF9yYwAPB3dkb3BfcmIACwd3ZG9wX3JhABYKZGl2aV9pbW0xMgAMB2Nyb29fcmIACwdjcm9vX3JhABYKc2xsaV9pbW0xMgAMB3NsbGlfcmIACwdzbGxpX3JhABYGbW9kX3JjAA8GbW9kX3JiAAsGbW9kX3JhABYKYW5kaV9pbW0xMgAMB2FuZGlfcmIACwdhbmRpX3JhABYHd2RtZF9yZAAYB3dkbWRfcmMADwd3ZG1kX3JiAAsHd2RtZF9yYQAWB21sZHZfcmQAGAdtbGR2X3JjAA8HbWxkdl9yYgALB21sZHZfcmEAFghzd19pbW0xMgAMBXN3X3JiAAsFc3dfcmEAFgdrMjU2X3JjAA8Ham5lYl9yYgALB2puZWJfcmEAFgZ0cm9fcmQAGAZ0cm9fcmMADwZ0cm9fcmIACwZ0cm9fcmEAFglvcmlfaW1tMTIADAZvcmlfcmIACwZvcmlfcmEAFgZzbGxfcmMADwZzbGxfcmIACwZzbGxfcmEAFgd3cWR2X3JjAA8Hd3Fkdl9yYgALB3dxZHZfcmEAFgd3cW1kX3JkABgHd3FtZF9yYwAPB3dxbWRfcmIACwd3cW1kX3JhABYHam5lYl9yYwAPBmpuZV9yYgALBmpuZV9yYQAWB21sb2dfcmMADwdtbG9nX3JiAAsHbWxvZ19yYQAWB21pbnRfcmIACwdtaW50X3JhABYHd3FjbV9yYwAPB3dxY21fcmIACwd3cWNtX3JhABYKbXVsaV9pbW0xMgAMB211bGlfcmIACwdtdWxpX3JhABYKbWNsaV9pbW0xOAAJB21jbGlfcmEAFgpqbmVpX2ltbTEyAAwHam5laV9yYgALB2puZWlfcmEAFgdjc2l6X3JiAAsHY3Npel9yYQAWBXRyX3JjAA8FdHJfcmIACwV0cl9yYQAWB2xvZ2RfcmQAGAZqbmVfcmMADwdibGRkX3JiAAsHYmxkZF9yYQAWCmV4cGlfaW1tMTIADAdleHBpX3JiAAsHZXhwaV9yYQAWCnhvcmlfaW1tMTIADAd4b3JpX3JiAAsHeG9yaV9yYQAWBW9yX3JjAA8Fb3JfcmIACwVvcl9yYQAWB2VjazFfcmMADwdlY2sxX3JiAAsHZWNrMV9yYQAWBm1jbF9yYgALBm1jbF9yYQAWCmpuemZfaW1tMTIADAdqbnpmX3JiAAsHam56Zl9yYQAWB3N3d3FfcmQAGAdzd3dxX3JjAA8Hc3d3cV9yYgALB3N3d3FfcmEAFgVndF9yYwAPBWd0X3JiAAsFZ3RfcmEAFgpqbXBmX2ltbTE4AAkHam1wYl9yYQAWBmRpdl9yYwAPBmRpdl9yYgALBmRpdl9yYQAWB2J1cm5fcmIACwdidXJuX3JhABYTX193YmdfbWF0aGFyZ3NfZnJlZQB7Bnhvcl9yYwAPBnhvcl9yYgALBnhvcl9yYQAWB3dkbWxfcmMADwd3ZG1sX3JiAAsHd2RtbF9yYQAWB2NhbGxfcmQAGAdjYWxsX3JjAA8HY2FsbF9yYgALB2NhbGxfcmEAFgd3ZG1tX3JkABgHd2RtbV9yYwAPB3dkbW1fcmIACwd3ZG1tX3JhABYKbWNwaV9pbW0xMgAMB21jcGlfcmIACwdtY3BpX3JhABYHYmxkZF9yYwAPB2FkZGlfcmIACwdhZGRpX3JhABYKam56Yl9pbW0xMgAMB2puemJfcmIACwdqbnpiX3JhABYHbXJvb19yYwAPB21yb29fcmIACwdtcm9vX3JhABYGZXhwX3JjAA8GZXhwX3JiAAsGZXhwX3JhABYGYmFsX3JjAA8GYmFsX3JiAAsGYmFsX3JhABYHZWQxOV9yZAAYB2VkMTlfcmMADwdlZDE5X3JiAAsHZWQxOV9yYQAWCnNybGlfaW1tMTIADAdzcmxpX3JiAAsHc3JsaV9yYQAWBm1lcV9yZAAYBm1lcV9yYwAPBm1lcV9yYgALBm1lcV9yYQAWB2Joc2hfcmIACwdiaHNoX3JhABYGbGRjX3JjAA8GbGRjX3JiAAsGbGRjX3JhABYHam5lZl9yYwAPB2puZWZfcmIACwdqbmVmX3JhABYHd2RhbV9yZAAYB3dkYW1fcmMADwd3ZGFtX3JiAAsHd2RhbV9yYQAWBm1jcF9yYwAPBm1jcF9yYgALBm1jcF9yYQAWBWx0X3JjAA8FbHRfcmIACwVsdF9yYQAWB3dxb3BfcmMADwd3cW9wX3JiAAsHd3FvcF9yYQAWBmFuZF9yYwAPBmFuZF9yYgALBmFuZF9yYQAWB2JzaXpfcmIACwdic2l6X3JhABYHd2Rkdl9yYwAPB3dkZHZfcmIACwd3ZGR2X3JhABYHZWNhbF9yZAAYB2VjYWxfcmMADwdlY2FsX3JiAAsHZWNhbF9yYQAWB2VjcjFfcmMADwdlY3IxX3JiAAsHZWNyMV9yYQAWCm1vdmlfaW1tMTgACQdtb3ZpX3JhABYKam1wYl9pbW0xOAAJBWdtX3JhABYHbW92ZV9yYgALB21vdmVfcmEAFgdzY3dxX3JjAA8Hc2N3cV9yYgALB3Njd3FfcmEAFgVlcV9yYwAPBWVxX3JiAAsFZXFfcmEAFgZzbW9fcmQAGAZzbW9fcmMADwZzbW9fcmIACwZzbW9fcmEAFgZsb2dfcmQAGAZsb2dfcmMADwZsb2dfcmIACwZsb2dfcmEAFgZjY3BfcmQAGAZjY3BfcmMADwZjY3BfcmIACwZjY3BfcmEAFghsd19pbW0xMgAMBWx3X3JiAAsFbHdfcmEAFhtfX3diZ19wYW5pY2luc3RydWN0aW9uX2ZyZWUAugEfX193YmluZGdlbl9hZGRfdG9fc3RhY2tfcG9pbnRlcgDOARNfX3diaW5kZ2VuX2V4cG9ydF8wAM0BCREBAEEBCwYC0QHSAdMB7wHMAQrygQH7AYkjAgh/AX4CQAJAAkACQAJAAkACQAJAIABB9QFPBEAgAEHN/3tPDQUgAEELaiIAQXhxIQVBgI3AACgCACIIRQ0EQQAgBWshBAJ/QQAgBUGAAkkNABpBHyAFQf///wdLDQAaIAVBBiAAQQh2ZyIAa3ZBAXEgAEEBdGtBPmoLIgdBAnRB5InAAGooAgAiAUUEQEEAIQAMAgtBACEAIAVBGSAHQQF2a0EAIAdBH0cbdCEDA0ACQCABKAIEQXhxIgYgBUkNACAGIAVrIgYgBE8NACABIQIgBiIEDQBBACEEIAEhAAwECyABQRRqKAIAIgYgACAGIAEgA0EddkEEcWpBEGooAgAiAUcbIAAgBhshACADQQF0IQMgAQ0ACwwBC0H8jMAAKAIAIgJBECAAQQtqQXhxIABBC0kbIgVBA3YiAHYiAUEDcQRAAkAgAUF/c0EBcSAAaiIBQQN0IgBB9IrAAGoiAyAAQfyKwABqKAIAIgAoAggiBEcEQCAEIAM2AgwgAyAENgIIDAELQfyMwAAgAkF+IAF3cTYCAAsgACABQQN0IgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMCAsgBUGEjcAAKAIATQ0DAkACQCABRQRAQYCNwAAoAgAiAEUNBiAAaEECdEHkicAAaigCACIBKAIEQXhxIAVrIQQgASECA0ACQCABKAIQIgANACABQRRqKAIAIgANACACKAIYIQcCQAJAIAIgAigCDCIARgRAIAJBFEEQIAJBFGoiACgCACIDG2ooAgAiAQ0BQQAhAAwCCyACKAIIIgEgADYCDCAAIAE2AggMAQsgACACQRBqIAMbIQMDQCADIQYgASIAQRRqIgEgAEEQaiABKAIAIgEbIQMgAEEUQRAgARtqKAIAIgENAAsgBkEANgIACyAHRQ0EIAIgAigCHEECdEHkicAAaiIBKAIARwRAIAdBEEEUIAcoAhAgAkYbaiAANgIAIABFDQUMBAsgASAANgIAIAANA0GAjcAAQYCNwAAoAgBBfiACKAIcd3E2AgAMBAsgACgCBEF4cSAFayIBIAQgASAESSIBGyEEIAAgAiABGyECIAAhAQwACwALAkBBAiAAdCIDQQAgA2tyIAEgAHRxaCIAQQN0IgFB9IrAAGoiAyABQfyKwABqKAIAIgEoAggiBEcEQCAEIAM2AgwgAyAENgIIDAELQfyMwAAgAkF+IAB3cTYCAAsgASAFQQNyNgIEIAEgBWoiBiAAQQN0IgAgBWsiBEEBcjYCBCAAIAFqIAQ2AgBBhI3AACgCACICBEAgAkF4cUH0isAAaiEAQYyNwAAoAgAhAwJ/QfyMwAAoAgAiBUEBIAJBA3Z0IgJxRQRAQfyMwAAgAiAFcjYCACAADAELIAAoAggLIQIgACADNgIIIAIgAzYCDCADIAA2AgwgAyACNgIIC0GMjcAAIAY2AgBBhI3AACAENgIAIAFBCGoPCyAAIAc2AhggAigCECIBBEAgACABNgIQIAEgADYCGAsgAkEUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkACQCAEQRBPBEAgAiAFQQNyNgIEIAIgBWoiBSAEQQFyNgIEIAQgBWogBDYCAEGEjcAAKAIAIgNFDQEgA0F4cUH0isAAaiEAQYyNwAAoAgAhAQJ/QfyMwAAoAgAiBkEBIANBA3Z0IgNxRQRAQfyMwAAgAyAGcjYCACAADAELIAAoAggLIQMgACABNgIIIAMgATYCDCABIAA2AgwgASADNgIIDAELIAIgBCAFaiIAQQNyNgIEIAAgAmoiACAAKAIEQQFyNgIEDAELQYyNwAAgBTYCAEGEjcAAIAQ2AgALIAJBCGoPCyAAIAJyRQRAQQAhAkECIAd0IgBBACAAa3IgCHEiAEUNAyAAaEECdEHkicAAaigCACEACyAARQ0BCwNAIAAgAiAAKAIEQXhxIgMgBWsiBiAESSIHGyEIIAAoAhAiAUUEQCAAQRRqKAIAIQELIAIgCCADIAVJIgAbIQIgBCAGIAQgBxsgABshBCABIgANAAsLIAJFDQAgBUGEjcAAKAIAIgBNIAQgACAFa09xDQAgAigCGCEHAkACQCACIAIoAgwiAEYEQCACQRRBECACQRRqIgAoAgAiAxtqKAIAIgENAUEAIQAMAgsgAigCCCIBIAA2AgwgACABNgIIDAELIAAgAkEQaiADGyEDA0AgAyEGIAEiAEEUaiIBIABBEGogASgCACIBGyEDIABBFEEQIAEbaigCACIBDQALIAZBADYCAAsgB0UNAyACIAIoAhxBAnRB5InAAGoiASgCAEcEQCAHQRBBFCAHKAIQIAJGG2ogADYCACAARQ0EDAMLIAEgADYCACAADQJBgI3AAEGAjcAAKAIAQX4gAigCHHdxNgIADAMLAkACQAJAAkACQCAFQYSNwAAoAgAiAUsEQCAFQYiNwAAoAgAiAE8EQEEAIQQgBUGvgARqIgBBEHZAACIBQX9GIgMNByABQRB0IgJFDQdBlI3AAEEAIABBgIB8cSADGyIEQZSNwAAoAgBqIgA2AgBBmI3AAEGYjcAAKAIAIgEgACAAIAFJGzYCAAJAAkBBkI3AACgCACIDBEBB5IrAACEAA0AgACgCACIBIAAoAgQiBmogAkYNAiAAKAIIIgANAAsMAgtBoI3AACgCACIAQQAgACACTRtFBEBBoI3AACACNgIAC0GkjcAAQf8fNgIAQeiKwAAgBDYCAEHkisAAIAI2AgBBgIvAAEH0isAANgIAQYiLwABB/IrAADYCAEH8isAAQfSKwAA2AgBBkIvAAEGEi8AANgIAQYSLwABB/IrAADYCAEGYi8AAQYyLwAA2AgBBjIvAAEGEi8AANgIAQaCLwABBlIvAADYCAEGUi8AAQYyLwAA2AgBBqIvAAEGci8AANgIAQZyLwABBlIvAADYCAEGwi8AAQaSLwAA2AgBBpIvAAEGci8AANgIAQbiLwABBrIvAADYCAEGsi8AAQaSLwAA2AgBB8IrAAEEANgIAQcCLwABBtIvAADYCAEG0i8AAQayLwAA2AgBBvIvAAEG0i8AANgIAQciLwABBvIvAADYCAEHEi8AAQbyLwAA2AgBB0IvAAEHEi8AANgIAQcyLwABBxIvAADYCAEHYi8AAQcyLwAA2AgBB1IvAAEHMi8AANgIAQeCLwABB1IvAADYCAEHci8AAQdSLwAA2AgBB6IvAAEHci8AANgIAQeSLwABB3IvAADYCAEHwi8AAQeSLwAA2AgBB7IvAAEHki8AANgIAQfiLwABB7IvAADYCAEH0i8AAQeyLwAA2AgBBgIzAAEH0i8AANgIAQYiMwABB/IvAADYCAEH8i8AAQfSLwAA2AgBBkIzAAEGEjMAANgIAQYSMwABB/IvAADYCAEGYjMAAQYyMwAA2AgBBjIzAAEGEjMAANgIAQaCMwABBlIzAADYCAEGUjMAAQYyMwAA2AgBBqIzAAEGcjMAANgIAQZyMwABBlIzAADYCAEGwjMAAQaSMwAA2AgBBpIzAAEGcjMAANgIAQbiMwABBrIzAADYCAEGsjMAAQaSMwAA2AgBBwIzAAEG0jMAANgIAQbSMwABBrIzAADYCAEHIjMAAQbyMwAA2AgBBvIzAAEG0jMAANgIAQdCMwABBxIzAADYCAEHEjMAAQbyMwAA2AgBB2IzAAEHMjMAANgIAQcyMwABBxIzAADYCAEHgjMAAQdSMwAA2AgBB1IzAAEHMjMAANgIAQeiMwABB3IzAADYCAEHcjMAAQdSMwAA2AgBB8IzAAEHkjMAANgIAQeSMwABB3IzAADYCAEH4jMAAQeyMwAA2AgBB7IzAAEHkjMAANgIAQZCNwAAgAjYCAEH0jMAAQeyMwAA2AgBBiI3AACAEQShrIgA2AgAgAiAAQQFyNgIEIAAgAmpBKDYCBEGcjcAAQYCAgAE2AgAMCAsgAiADTSABIANLcg0AIAAoAgxFDQMLQaCNwABBoI3AACgCACIAIAIgACACSRs2AgAgAiAEaiEBQeSKwAAhAAJAAkADQCABIAAoAgBHBEAgACgCCCIADQEMAgsLIAAoAgxFDQELQeSKwAAhAANAAkAgAyAAKAIAIgFPBEAgASAAKAIEaiIGIANLDQELIAAoAgghAAwBCwtBkI3AACACNgIAQYiNwAAgBEEoayIANgIAIAIgAEEBcjYCBCAAIAJqQSg2AgRBnI3AAEGAgIABNgIAIAMgBkEga0F4cUEIayIAIAAgA0EQakkbIgFBGzYCBEHkisAAKQIAIQkgAUEQakHsisAAKQIANwIAIAEgCTcCCEHoisAAIAQ2AgBB5IrAACACNgIAQeyKwAAgAUEIajYCAEHwisAAQQA2AgAgAUEcaiEAA0AgAEEHNgIAIABBBGoiACAGSQ0ACyABIANGDQcgASABKAIEQX5xNgIEIAMgASADayIAQQFyNgIEIAEgADYCACAAQYACTwRAIAMgABAIDAgLIABBeHFB9IrAAGohAQJ/QfyMwAAoAgAiAkEBIABBA3Z0IgBxRQRAQfyMwAAgACACcjYCACABDAELIAEoAggLIQAgASADNgIIIAAgAzYCDCADIAE2AgwgAyAANgIIDAcLIAAgAjYCACAAIAAoAgQgBGo2AgQgAiAFQQNyNgIEIAEgAiAFaiIDayEFIAFBkI3AACgCAEYNAyABQYyNwAAoAgBGDQQgASgCBCIEQQNxQQFGBEAgASAEQXhxIgAQByAAIAVqIQUgACABaiIBKAIEIQQLIAEgBEF+cTYCBCADIAVBAXI2AgQgAyAFaiAFNgIAIAVBgAJPBEAgAyAFEAgMBgsgBUF4cUH0isAAaiEAAn9B/IzAACgCACIBQQEgBUEDdnQiBHFFBEBB/IzAACABIARyNgIAIAAMAQsgACgCCAshBSAAIAM2AgggBSADNgIMIAMgADYCDCADIAU2AggMBQtBiI3AACAAIAVrIgE2AgBBkI3AAEGQjcAAKAIAIgAgBWoiAjYCACACIAFBAXI2AgQgACAFQQNyNgIEIABBCGohBAwGC0GMjcAAKAIAIQACQCABIAVrIgJBD00EQEGMjcAAQQA2AgBBhI3AAEEANgIAIAAgAUEDcjYCBCAAIAFqIgEgASgCBEEBcjYCBAwBC0GEjcAAIAI2AgBBjI3AACAAIAVqIgM2AgAgAyACQQFyNgIEIAAgAWogAjYCACAAIAVBA3I2AgQLDAgLIAAgBCAGajYCBEGQjcAAQZCNwAAoAgAiAEEPakF4cSIBQQhrIgI2AgBBiI3AAEGIjcAAKAIAIARqIgMgACABa2pBCGoiATYCACACIAFBAXI2AgQgACADakEoNgIEQZyNwABBgICAATYCAAwDC0GQjcAAIAM2AgBBiI3AAEGIjcAAKAIAIAVqIgA2AgAgAyAAQQFyNgIEDAELQYyNwAAgAzYCAEGEjcAAQYSNwAAoAgAgBWoiADYCACADIABBAXI2AgQgACADaiAANgIACyACQQhqDwtBACEEQYiNwAAoAgAiACAFTQ0AQYiNwAAgACAFayIBNgIAQZCNwABBkI3AACgCACIAIAVqIgI2AgAgAiABQQFyNgIEIAAgBUEDcjYCBAwDCyAEDwsgACAHNgIYIAIoAhAiAQRAIAAgATYCECABIAA2AhgLIAJBFGooAgAiAUUNACAAQRRqIAE2AgAgASAANgIYCwJAIARBEE8EQCACIAVBA3I2AgQgAiAFaiIBIARBAXI2AgQgASAEaiAENgIAIARBgAJPBEAgASAEEAgMAgsgBEF4cUH0isAAaiEAAn9B/IzAACgCACIDQQEgBEEDdnQiBHFFBEBB/IzAACADIARyNgIAIAAMAQsgACgCCAshBCAAIAE2AgggBCABNgIMIAEgADYCDCABIAQ2AggMAQsgAiAEIAVqIgBBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQLIAJBCGoPCyAAQQhqC+0LAQt/IAAoAgQhByAAKAIAIQUCQAJAAkAgASgCACIKIAEoAggiAHIEQAJAIABFDQAgBSAHaiEJIAFBDGooAgBBAWohBiAFIQIDQAJAIAIhACAGQQFrIgZFDQAgACAJRg0CAn8gACwAACIEQQBOBEAgBEH/AXEhBCAAQQFqDAELIAAtAAFBP3EhCCAEQR9xIQIgBEFfTQRAIAJBBnQgCHIhBCAAQQJqDAELIAAtAAJBP3EgCEEGdHIhCCAEQXBJBEAgCCACQQx0ciEEIABBA2oMAQsgAkESdEGAgPAAcSAALQADQT9xIAhBBnRyciIEQYCAxABGDQMgAEEEagsiAiADIABraiEDIARBgIDEAEcNAQwCCwsgACAJRg0AIAAsAAAiAkEATiACQWBJciACQXBJckUEQCACQf8BcUESdEGAgPAAcSAALQADQT9xIAAtAAJBP3FBBnQgAC0AAUE/cUEMdHJyckGAgMQARg0BCwJAAkAgA0UNACADIAdPBEBBACEAIAMgB0YNAQwCC0EAIQAgAyAFaiwAAEFASA0BCyAFIQALIAMgByAAGyEHIAAgBSAAGyEFCyAKRQ0DIAEoAgQhCyAHQRBPBEAgByAFIAVBA2pBfHEiBGsiBmoiCkEDcSEIQQAhCUEAIQAgBCAFRwRAIAQgBUF/c2pBA08EQEEAIQMDQCAAIAMgBWoiAiwAAEG/f0pqIAJBAWosAABBv39KaiACQQJqLAAAQb9/SmogAkEDaiwAAEG/f0pqIQAgA0EEaiIDDQALCyAFIQIDQCAAIAIsAABBv39KaiEAIAJBAWohAiAGQQFqIgYNAAsLAkAgCEUNACAEIApBfHFqIgIsAABBv39KIQkgCEEBRg0AIAkgAiwAAUG/f0pqIQkgCEECRg0AIAkgAiwAAkG/f0pqIQkLIApBAnYhCCAAIAlqIQMDQCAEIQYgCEUNBEHAASAIIAhBwAFPGyIJQQNxIQogCUECdCEEQQAhAiAJQQRPBEAgBiAEQfAHcWohDCAGIQADQCACIAAoAgAiAkF/c0EHdiACQQZ2ckGBgoQIcWogAEEEaigCACICQX9zQQd2IAJBBnZyQYGChAhxaiAAQQhqKAIAIgJBf3NBB3YgAkEGdnJBgYKECHFqIABBDGooAgAiAkF/c0EHdiACQQZ2ckGBgoQIcWohAiAAQRBqIgAgDEcNAAsLIAggCWshCCAEIAZqIQQgAkEIdkH/gfwHcSACQf+B/AdxakGBgARsQRB2IANqIQMgCkUNAAsgBiAJQfwBcUECdGoiAigCACIAQX9zQQd2IABBBnZyQYGChAhxIQAgCkEBRg0CIAAgAigCBCIAQX9zQQd2IABBBnZyQYGChAhxaiEAIApBAkYNAiAAIAIoAggiAEF/c0EHdiAAQQZ2ckGBgoQIcWohAAwCCyAHRQRAQQAhAwwDCyAHQQNxIQICQCAHQQRJBEBBACEDQQAhBgwBC0EAIQMgBSEAIAdBfHEiBiEEA0AgAyAALAAAQb9/SmogAEEBaiwAAEG/f0pqIABBAmosAABBv39KaiAAQQNqLAAAQb9/SmohAyAAQQRqIQAgBEEEayIEDQALCyACRQ0CIAUgBmohAANAIAMgACwAAEG/f0pqIQMgAEEBaiEAIAJBAWsiAg0ACwwCCwwCCyAAQQh2Qf+BHHEgAEH/gfwHcWpBgYAEbEEQdiADaiEDCwJAIAMgC0kEQCALIANrIQNBACEAAkACQAJAIAEtACBBAWsOAgABAgsgAyEAQQAhAwwBCyADQQF2IQAgA0EBakEBdiEDCyAAQQFqIQAgAUEYaigCACECIAEoAhAhBiABKAIUIQEDQCAAQQFrIgBFDQIgASAGIAIoAhARAwBFDQALQQEPCwwBC0EBIQAgASAFIAcgAigCDBEAAAR/QQEFQQAhAAJ/A0AgAyAAIANGDQEaIABBAWohACABIAYgAigCEBEDAEUNAAsgAEEBawsgA0kLDwsgASgCFCAFIAcgAUEYaigCACgCDBEAAAumBgINfwF+IwBBMGsiByQAQSchAgJAIABCkM4AVARAIAAhDwwBCwNAIAdBCWogAmoiBkEEayAAQpDOAIAiD0LwsQN+IAB8pyIEQf//A3FB5ABuIgNBAXRB0IbAAGovAAA7AAAgBkECayADQZx/bCAEakH//wNxQQF0QdCGwABqLwAAOwAAIAJBBGshAiAAQv/B1y9WIA8hAA0ACwsgD6ciBEHjAEsEQCACQQJrIgIgB0EJamogD6ciA0H//wNxQeQAbiIEQZx/bCADakH//wNxQQF0QdCGwABqLwAAOwAACwJAIARBCk8EQCACQQJrIgIgB0EJamogBEEBdEHQhsAAai8AADsAAAwBCyACQQFrIgIgB0EJamogBEEwajoAAAtBJyACayEIQQEhBUErQYCAxAAgASgCHCIEQQFxIgwbIQkgBEEddEEfdUHwiMAAcSEKIAdBCWogAmohCwJAIAEoAgBFBEAgASgCFCIDIAEoAhgiASAJIAoQSA0BIAMgCyAIIAEoAgwRAAAhBQwBCyABKAIEIg0gCCAMaiIDTQRAIAEoAhQiAyABKAIYIgEgCSAKEEgNASADIAsgCCABKAIMEQAAIQUMAQsgBEEIcQRAIAEoAhAhBCABQTA2AhAgAS0AICEDIAFBAToAICABKAIUIg4gASgCGCIGIAkgChBIDQEgAiANaiAMa0EmayECA0AgAkEBayICBEAgDkEwIAYoAhARAwBFDQEMAwsLIA4gCyAIIAYoAgwRAAANASABIAM6ACAgASAENgIQQQAhBQwBCyANIANrIQMCQAJAAkAgAS0AICICQQFrDgMAAQACCyADIQJBACEDDAELIANBAXYhAiADQQFqQQF2IQMLIAJBAWohAiABQRhqKAIAIQYgASgCECEEIAEoAhQhAQJAA0AgAkEBayICRQ0BIAEgBCAGKAIQEQMARQ0ACwwBCyABIAYgCSAKEEgNACABIAsgCCAGKAIMEQAADQBBACECA0AgAiADRgRAQQAhBQwCCyACQQFqIQIgASAEIAYoAhARAwBFDQALIAJBAWsgA0khBQsgB0EwaiQAIAUL/AUBBX8gAEEIayIBIABBBGsoAgAiA0F4cSIAaiECAkACQAJAAkAgA0EBcQ0AIANBA3FFDQEgASgCACIDIABqIQAgASADayIBQYyNwAAoAgBGBEAgAigCBEEDcUEDRw0BQYSNwAAgADYCACACIAIoAgRBfnE2AgQgASAAQQFyNgIEIAIgADYCAA8LIAEgAxAHCwJAAkAgAigCBCIDQQJxRQRAIAJBkI3AACgCAEYNAiACQYyNwAAoAgBGDQUgAiADQXhxIgIQByABIAAgAmoiAEEBcjYCBCAAIAFqIAA2AgAgAUGMjcAAKAIARw0BQYSNwAAgADYCAA8LIAIgA0F+cTYCBCABIABBAXI2AgQgACABaiAANgIACyAAQYACSQ0CIAEgABAIQQAhAUGkjcAAQaSNwAAoAgBBAWsiADYCACAADQFB7IrAACgCACIABEADQCABQQFqIQEgACgCCCIADQALC0GkjcAAQf8fIAEgAUH/H00bNgIADwtBkI3AACABNgIAQYiNwABBiI3AACgCACAAaiIANgIAIAEgAEEBcjYCBEGMjcAAKAIAIAFGBEBBhI3AAEEANgIAQYyNwABBADYCAAsgAEGcjcAAKAIAIgNNDQBBkI3AACgCACICRQ0AQQAhAQJAQYiNwAAoAgAiBEEpSQ0AQeSKwAAhAANAIAIgACgCACIFTwRAIAUgACgCBGogAksNAgsgACgCCCIADQALC0HsisAAKAIAIgAEQANAIAFBAWohASAAKAIIIgANAAsLQaSNwABB/x8gASABQf8fTRs2AgAgAyAETw0AQZyNwABBfzYCAAsPCyAAQXhxQfSKwABqIQICf0H8jMAAKAIAIgNBASAAQQN2dCIAcUUEQEH8jMAAIAAgA3I2AgAgAgwBCyACKAIICyEAIAIgATYCCCAAIAE2AgwgASACNgIMIAEgADYCCA8LQYyNwAAgATYCAEGEjcAAQYSNwAAoAgAgAGoiADYCACABIABBAXI2AgQgACABaiAANgIAC/sEAQF/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABBgARrDiYBAgMEBQYHCCwJCgsMDSwsLCwsLCwsLCwsLCwsLCwsLA4PLCwsEAALQQEhAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEEBaw4OQQECAwQFBkIHCAkKCwwACwJAIABBwARrDgwnKCkqKywtLi8wMTIACwJAIABBgQJrDgoNDg8QERITFBUWAAsCQCAAQYAGaw4JMzQ1NjdCQjg5AAsCQCAAQYAKaw4FPD0+P0AACyAAQYAIaw4COTpBC0ECDwtBAw8LQQQPC0EFDwtBBg8LQQcPC0EJDwtBCg8LQQsPC0EMDwtBDQ8LQQ4PC0GBAg8LQYICDwtBgwIPC0GEAg8LQYUCDwtBhgIPC0GHAg8LQYgCDwtBiQIPC0GKAg8LQYAEDwtBgQQPC0GCBA8LQYMEDwtBhAQPC0GFBA8LQYYEDwtBhwQPC0GJBA8LQYoEDwtBiwQPC0GMBA8LQY0EDwtBoAQPC0GhBA8LQaUEDwtBwAQPC0HBBA8LQcIEDwtBwwQPC0HEBA8LQcUEDwtBxgQPC0HHBA8LQcgEDwtByQQPC0HKBA8LQcsEDwtBgAYPC0GBBg8LQYIGDwtBgwYPC0GEBg8LQYcGDwtBiAYPC0GACA8LQYEIDwtBgAoPC0GBCg8LQYIKDwtBgwoPC0GECiEBCyABDwtB4ILAAEEZENQBAAv4AwECfyAAIAFqIQICQAJAIAAoAgQiA0EBcQ0AIANBA3FFDQEgACgCACIDIAFqIQEgACADayIAQYyNwAAoAgBGBEAgAigCBEEDcUEDRw0BQYSNwAAgATYCACACIAIoAgRBfnE2AgQgACABQQFyNgIEIAIgATYCAA8LIAAgAxAHCwJAAkACQCACKAIEIgNBAnFFBEAgAkGQjcAAKAIARg0CIAJBjI3AACgCAEYNAyACIANBeHEiAhAHIAAgASACaiIBQQFyNgIEIAAgAWogATYCACAAQYyNwAAoAgBHDQFBhI3AACABNgIADwsgAiADQX5xNgIEIAAgAUEBcjYCBCAAIAFqIAE2AgALIAFBgAJPBEAgACABEAgMAwsgAUF4cUH0isAAaiECAn9B/IzAACgCACIDQQEgAUEDdnQiAXFFBEBB/IzAACABIANyNgIAIAIMAQsgAigCCAshASACIAA2AgggASAANgIMIAAgAjYCDCAAIAE2AggPC0GQjcAAIAA2AgBBiI3AAEGIjcAAKAIAIAFqIgE2AgAgACABQQFyNgIEIABBjI3AACgCAEcNAUGEjcAAQQA2AgBBjI3AAEEANgIADwtBjI3AACAANgIAQYSNwABBhI3AACgCACABaiIBNgIAIAAgAUEBcjYCBCAAIAFqIAE2AgALC/sCAQR/IAAoAgwhAgJAAkAgAUGAAk8EQCAAKAIYIQMCQAJAIAAgAkYEQCAAQRRBECAAQRRqIgIoAgAiBBtqKAIAIgENAUEAIQIMAgsgACgCCCIBIAI2AgwgAiABNgIIDAELIAIgAEEQaiAEGyEEA0AgBCEFIAEiAkEUaiIBIAJBEGogASgCACIBGyEEIAJBFEEQIAEbaigCACIBDQALIAVBADYCAAsgA0UNAiAAIAAoAhxBAnRB5InAAGoiASgCAEcEQCADQRBBFCADKAIQIABGG2ogAjYCACACRQ0DDAILIAEgAjYCACACDQFBgI3AAEGAjcAAKAIAQX4gACgCHHdxNgIADAILIAAoAggiACACRwRAIAAgAjYCDCACIAA2AggPC0H8jMAAQfyMwAAoAgBBfiABQQN2d3E2AgAPCyACIAM2AhggACgCECIBBEAgAiABNgIQIAEgAjYCGAsgAEEUaigCACIARQ0AIAJBFGogADYCACAAIAI2AhgLC6wCAQR/QR8hAiAAQgA3AhAgAUH///8HTQRAIAFBBiABQQh2ZyIDa3ZBAXEgA0EBdGtBPmohAgsgACACNgIcIAJBAnRB5InAAGohBAJAQYCNwAAoAgAiBUEBIAJ0IgNxRQRAQYCNwAAgAyAFcjYCACAEIAA2AgAgACAENgIYDAELAkACQCABIAQoAgAiAygCBEF4cUYEQCADIQIMAQsgAUEZIAJBAXZrQQAgAkEfRxt0IQQDQCADIARBHXZBBHFqQRBqIgUoAgAiAkUNAiAEQQF0IQQgAiEDIAIoAgRBeHEgAUcNAAsLIAIoAggiASAANgIMIAIgADYCCCAAQQA2AhggACACNgIMIAAgATYCCA8LIAUgADYCACAAIAM2AhgLIAAgADYCDCAAIAA2AggLaQEDfyMAQRBrIgEkACABQQhqIAAQSyABKAIIIgBBAmotAAAhAiAALwAAIAEoAgwiAyADKAIAQQFrNgIAIAJBEHRyENcBIgBBgAZxQQh0IABBCHZBgP4DcSAAQRh2cnIQvgEgAUEQaiQAC3kBA38gARDGAQJAIAEoAgAiAkF/RwRAIAEgAkEBajYCACABKAIEKAAAIgNBGHRBFnVB/ILAAGooAgAhBEEBQQQQyQEiAkUNASACIAQgA0GAfnFyNgAAIAEgASgCAEEBazYCACAAQQQ2AgQgACACNgIADwsQ0AEACwALZgEDfyMAQRBrIgEkACABQQhqIAAQSyABKAIIIgBBAmotAAAhAiAALwAAIAEoAgwiAyADKAIAQQFrNgIAIAJBEHRyENcBIgBBgAZxQQh0IABBCHZBgOADcXJBDHYQvQEgAUEQaiQAC24BAn8jAEEQayIBJAAgAUEIaiAAEEsgASgCCCIALwAAIABBAmotAABBEHRyENcBIQAgASgCDCICIAIoAgBBAWs2AgBBCEEEELwBIgIgAEEIdkGAHnEgAEEYdnI7AQQgAkEANgIAIAFBEGokACACC20BAX8jAEEwayIBJAAgASAAOgAPIABB/wFxQcAATwRAIAFBHGpCATcCACABQQI2AhQgAUH0gMAANgIQIAFBAjYCLCABIAFBKGo2AhggASABQQ9qNgIoIAFBEGpBhIHAABBKAAsgAUEwaiQAIAALbgEBfyMAQTBrIgEkACABIAA7AQ4gAEH//wNxQYAgTwRAIAFBHGpCATcCACABQQI2AhQgAUG4gcAANgIQIAFBAzYCLCABIAFBKGo2AhggASABQQ5qNgIoIAFBEGpByIHAABBKAAsgAUEwaiQAIAALXQEDfyMAQRBrIgEkACABQQhqIAAQSyABKAIIIgBBAmotAAAhAiAALwAAIAEoAgwiAyADKAIAQQFrNgIAIAJBEHRyENcBIgBBHnYgAEEOdkE8cXIQvQEgAUEQaiQACxUAIABBjILAAEH8gcAAQYCAEBDzAQsWACAAQdCCwABBwILAAEGAgIAIEPMBC0wAIANB/wFxIAFB/wFxQQx0IABB/wFxQRJ0ciIAIAJB/wFxQQZ0cnIiAUEQdEGAgPwHcSAAQQh2QYD+A3EgAUGA/gNxQQh0ckEIdnILVQIBfwF+IwBBEGsiAiQAIAEQxgEgAkEIaiABEFUgAigCDEEANgIAIAEpAgAhAyABEAQgACADQiiIp0EBcToAASAAIANCIIinQQFxOgAAIAJBEGokAAsQACAAIAEgAiADQeIAEPYBCxAAIAAgASACIANB4wAQ9gELTwEDfyMAQRBrIgEkACABQQhqIAAQSyABKAIIIgBBAmotAAAhAiAALwAAIAEoAgwiAyADKAIAQQFrNgIAIAJBEHRyEMoBEL0BIAFBEGokAAtSAQF/IAAQUiECIAEQVCEAQQhBBBC8ASIBIABBEHRBgID8B3EgACACQf8BcUESdHIiAEGA/gNxQQh0IABBCHZBgP4DcXJBCHZyrUIghjcCACABC1UBA38jAEEQayIBJAAgAUEIaiAAEEsgASgCCCIAQQJqLQAAIQIgAC8AACABKAIMIgMgAygCAEEBazYCACACQRB0chDXAUEYdkE/cRC9ASABQRBqJAALEAAgACABIAIgA0HeABD3AQsQACAAIAEgAiADQd8AEPcBCxAAIAAgASACIANB4AAQ9wELEAAgACABIAIgA0HhABD3AQtRAgF/AX4jAEEQayICJAAgARDGASACQQhqIAEQVSACKAIMQQA2AgAgASkCACEDIAEQBCAAIANCKIg8AAEgACADQiCIp0EBcToAACACQRBqJAALPgEBfyMAQRBrIgQkACAAEFIgARBSIAIQUiAEQQhqIAMQEyAELQAIQQFxIAQtAAlBAXEQfhCuASAEQRBqJAALSQEBfyAAEFIhACABEFIhAUEIQQQQvAEiAiABQf8BcUEMdCAAQRJ0ciIAQYDgA3FBCHQgAEEIdkGA/gNxckEIdq1CIIY3AgAgAgsMACAAIAFBywAQ+AELDAAgACABQcwAEPgBCwwAIAAgAUHNABD4AQsMACAAIAFBzgAQ+AELDAAgACABQc8AEPgBCwwAIAAgAUHQABD4AQs8AQF/IwBBEGsiBCQAIAAQUiABEFIgAhBSIARBCGogAxAdIAQtAAhBAXEgBC0ACRDAARCuASAEQRBqJAALSAAgABDGASAAKAIAQX9GBEAQ0AEACyAALwAEIABBBmotAABBEHRyENcBIgBBgP4DcUEIdCAAQQh2QYD+A3EgAEEYdnJyEL4BCwsAIAAgAUEHEPkBCz8BAn8CQCAAEFIiAEEYcQ0AIABBB3EiAkEHRg0AQQhBBBC8ASIBIABBBXZBAXGtQiCGIAKtQiiGhDcCAAsgAQsLACAAIAFBCBD5AQs/ACACQRZ0QYCAgAZxIAFB/wFxQQx0IgEgAkH8AXFBBnRyQYD+A3FBCHQgASAAQRJ0ckEIdkGA/gNxckEIdnILCwAgACABQQoQ+gELCwAgACABQQwQ+gELCwAgACABQRQQ+gELCwAgACABQRYQ+gELCwAgACABQRkQ+gELCwAgACABQRsQ+gELCwAgACABQR4Q+gELCwAgACABQR8Q+gELCwAgACABQSQQ+gELCwAgACABQTIQ+gELPwAgABBSIQAgARBUIgFBEHRBgID8B3EgAEH/AXFBEnQgAXIiAEGA/gNxQQh0IABBCHZBgP4DcXJBCHZyEK4BCwwAIAAgAUHtABD6AQtAAQF/IAAQVCEAQQhBBBC8ASIBIABBEHRBgID8B3EgAEEIdkGA/gNxIABBgP4DcUEIdHJBCHZyrUIghjcCACABCzgAIAJBEHRBgID8B3EgAUH/AXFBDHQiASACckGA/gNxQQh0IAEgAEESdHJBCHZBgP4DcXJBCHZyCzwBAn8jAEEQayIBJAAgABDGASABQQhqIAAQTCABKAIILQABIAEoAgwiAiACKAIAQQFrNgIAIAFBEGokAAs8AQJ/IwBBEGsiASQAIAAQxgEgAUEIaiAAEEwgASgCCC0AACABKAIMIgIgAigCAEEBazYCACABQRBqJAALOQEBfyMAQRBrIgIkACAAEMYBIAJBCGogABBVIAIoAgwgAigCCCABQQBHOgAAQQA2AgAgAkEQaiQACzkBAX8jAEEQayICJAAgABDGASACQQhqIAAQVSACKAIMIAIoAgggAUEARzoAAUEANgIAIAJBEGokAAs4AQJ/IwBBEGsiASQAIAAQxgEgAUEIaiAAEFUgASgCDEEANgIAIAAtAAQgABAEIAFBEGokAEEBcQs3AQJ/IwBBEGsiASQAIAFBCGogABBLIAEoAggtAAQgASgCDCICIAIoAgBBAWs2AgAgAUEQaiQACzcBAn8jAEEQayIBJAAgAUEIaiAAEEsgASgCCCgCACABKAIMIgIgAigCAEEBazYCACABQRBqJAALCgAgAEHVABD7AQsKACAAQdYAEPsBCwoAIABB1wAQ+wELCgAgAEHaABD7AQsKACAAQdsAEPsBCwoAIABB3AAQ+wELCgAgAEHdABD7AQs5AAJAAn8gAkGAgMQARwRAQQEgACACIAEoAhARAwANARoLIAMNAUEACw8LIAAgA0EAIAEoAgwRAAALMQEBfyMAQRBrIgEkACABQQhqIAAQHSABLQAJIAEtAAhBBXRBIHFyEL0BIAFBEGokAAuhAgEBfyMAQSBrIgIkACACQQE7ARwgAiABNgIYIAIgADYCFCACQcCGwAA2AhAgAkHwiMAANgIMIAJBDGoiACgCCCIBRQRAIwBBIGsiACQAIABBDGpCADcCACAAQQE2AgQgAEHwiMAANgIIIABBKzYCHCAAQZiIwAA2AhggACAAQRhqNgIAIABB4IjAABBKAAsgAUEMaigCACECAkACQCABKAIEDgIAAAELIAINAAsgAC0AECEBIAAtABEaQeCJwABB4InAACgCACIAQQFqNgIAAkAgAEEASA0AQayNwAAtAABBAXENAEGsjcAAQQE6AABBqI3AAEGojcAAKAIAQQFqNgIAQdyJwAAoAgBBAEgNAEGsjcAAQQA6AAAgAUUNAAALAAs1AQF/IAEQxgEgASgCACICQX9GBEAQ0AEACyABIAJBAWo2AgAgACABNgIEIAAgAUEEajYCAAsxAQF/IAEoAgAiAkF/RwRAIAEgAkEBajYCACAAIAE2AgQgACABQQRqNgIADwsQ0AEACzUBAX8gAEE5TwRAQeCCwABBGRDUAQALQQxBBBC8ASICIAA6AAggAiABNgIEIAJBADYCACACCzAAIAAQUiABEFIgAhBSIAMQUhASIQBBCEEEELwBIgEgAK1C////B4NCIIY3AgAgAQstACAAEMYBIAAoAgBBf0YEQBDQAQALIAAvAAQgAEEGai0AAEEQdHIQygEQvQELLAAgABBSIAEQUiACEFIQKyEAQQhBBBC8ASIBIACtQv///weDQiCGNwIAIAELLAAgABBSIAEQUiACEFMQOSEAQQhBBBC8ASIBIACtQv///weDQiCGNwIAIAELJQEBfwJAIAAEQCAAKAIADQEgAC0ABCAAEAQPCxDPAQALENABAAslAQF/AkAgAARAIAAoAgANASAALwEEIAAQBA8LEM8BAAsQ0AEACyUBAX8CQCAABEAgACgCAA0BIAAoAgQgABAEDwsQzwEACxDQAQALKAAgASgCAEUEQCABQX82AgAgACABNgIEIAAgAUEEajYCAA8LENABAAspACADED4hAyAAEL8BIAEQvwEgAhC/ASADEMQBQQh0QeQAchDHARC+AQspACADED4hAyAAEL8BIAEQvwEgAhC/ASADEMQBQQh0QeUAchDHARC+AQslAQF/IAAQUiEAQQhBBBC8ASIBIABBAnRB/AFxrUIghjcCACABCyAAIABBAWsiAEEFTQRAIABBAWoPC0HggsAAQRkQ1AEACyABAX8gABDGASAAKAIABEAQ0AEACyAAKAIEIAAQBBAECyMAIAIQBSECIAAQvwEgARC/ASACEDlBCHRBygByEMcBEL4BCx4AAkAgAARAIAAoAgANASAAEAQPCxDPAQALENABAAsPACAAIAEgAiADQRIQ8AELDwAgACABIAIgA0EYEPABCw8AIAAgASACIANBHBDwAQsPACAAIAEgAiADQR0Q8AELDwAgACABIAIgA0EhEPEBCw8AIAAgASACIANBIhDwAQsPACAAIAEgAiADQSMQ8AELDwAgACABIAIgA0EoEPABCw8AIAAgASACIANBKhDwAQsPACAAIAEgAiADQSwQ8AELDwAgACABIAIgA0EvEPABCw8AIAAgASACIANBOBDwAQsQACAAIAEgAiADQdMAEPEBCxAAIAAgASACIANB1AAQ8QELEAAgACABIAIgA0HeABDxAQsQACAAIAEgAiADQd8AEPEBCxAAIAAgASACIANB4AAQ8QELEAAgACABIAIgA0HhABDxAQsQACAAIAEgAiADQeIAEPEBCxAAIAAgASACIANB4wAQ8QELEAAgACABIAIgA0HkABDxAQsQACAAIAEgAiADQeUAEPEBCxAAIAAgASACIANB5gAQ8AELEAAgACABIAIgA0HnABDwAQsQACAAIAEgAiADQegAEPABCxAAIAAgASACIANB6QAQ8AELEAAgACABIAIgA0HqABDwAQsQACAAIAEgAiADQesAEPABCxAAIAAgASACIANB7AAQ8AELEAAgACABIAIgA0HuABDwAQsdAQF/IwBBEGsiASQAIAFBCGogABAdIAFBEGokAAsdAQF/IwBBEGsiASQAIAFBCGogABATIAFBEGokAAsfACABEFkhASAAEL8BIAEQuQFBCHRBzAByEMcBEL4BCxkAIAAgASACQSBBACAEG0EQQQAgAxtyEBILDQAgACABIAJBARDyAQsNACAAIAEgAkECEPIBCw0AIAAgASACQQMQ8gELDQAgACABIAJBBBDyAQsNACAAIAEgAkEFEPIBCw0AIAAgASACQQYQ8gELDQAgACABIAJBBxDyAQsNACAAIAEgAkEIEPIBCw0AIAAgASACQQkQ8gELDQAgACABIAJBCxDyAQsNACAAIAEgAkENEPIBCw0AIAAgASACQQ4Q8gELDQAgACABIAJBDxDyAQsNACAAIAEgAkEQEPIBCw0AIAAgASACQREQ8gELDQAgACABIAJBFxDyAQsNACAAIAEgAkEmEPIBCw0AIAAgASACQScQ8gELDQAgACABIAJBKRDyAQsNACAAIAEgAkErEPIBCw0AIAAgASACQS0Q8gELDQAgACABIAJBLhDyAQsNACAAIAEgAkEwEPIBCw0AIAAgASACQTEQ8gELDQAgACABIAJBNRDyAQsNACAAIAEgAkE3EPIBCw0AIAAgASACQTkQ9AELDQAgACABIAJBOhD0AQsNACAAIAEgAkE7EPQBCw0AIAAgASACQTwQ9AELDQAgACABIAJBPRD0AQsNACAAIAEgAkE+EPQBCw0AIAAgASACQT8Q9AELDgAgACABIAJBwAAQ9AELDgAgACABIAJBwQAQ9AELDgAgACABIAJBwgAQ9AELDgAgACABIAJBwwAQ9AELDgAgACABIAJBxAAQ9AELDgAgACABIAJBxQAQ9AELDgAgACABIAJBxgAQ9AELDgAgACABIAJBxwAQ9AELDgAgACABIAJByAAQ9AELDgAgACABIAJByQAQ9AELDgAgACABIAJBygAQ9AELDgAgACABIAJB0QAQ9AELDgAgACABIAJB0gAQ9AELGAEBfyAAQf8BcUE/TQR/IAAQvQEFQQALCx4BAX9BCEEEELwBIgEgAK1C////B4NCIIY3AgAgAQsbACAAEMYBIAAoAgBBf0YEQBDQAQALIAAtAAQLCQAgAEETEPUBCwkAIABBFRD1AQsJACAAQRoQ9QELCQAgAEEgEPUBCwkAIABBJRD1AQsJACAAQTQQ9QELCQAgAEE2EPUBCwoAIABB2AAQ9QELCgAgAEHZABD1AQsXACABQRB0QYCA/AdxIABBAnRB/AFxcgsXACAAEMYBIAAoAgAEQBDQAQALIAAQBAscACAAEL8BIAEQvwEgAhC/ARArQQh0EMcBEL4BCxIAIAEgABDJASIABEAgAA8LAAsbAQF/QQhBBBC8ASIBIAA6AAQgAUEANgIAIAELGwEBf0EIQQQQvAEiASAANgIEIAFBADYCACABC24AIABB/wFxQcAATwRAIwBBMGsiACQAIABBIjYCDCAAQYCAwAA2AgggAEEcakIBNwIAIABBATYCFCAAQbiGwAA2AhAgAEEBNgIsIAAgAEEoajYCGCAAIABBCGo2AiggAEEQakG4gMAAEEoACyAACxQAIAAgASACQSBBACADGyAEchASCxgAIAAQUiABEFIgAhBSIAMQPhDEARCuAQsXACAAEFIgARBSIAIQUiADEFIQEhCuAQsTACAAEFIgARBSIAIQBRA5EK4BCxEAIAAgASACQSBBACADGxASCxMAIAAQUiABEFIgAhBTEDkQrgELDAAgAARADwsQzwEACxQBAX9BBEEBELwBIgEgADYAACABCxQBAX9BCEEEELwBIgBCADcCACAAC4EDAQV/Qa2NwAAtAAAaAn8gAEEJTwRAAkBBzf97QRAgACAAQRBNGyIAayABTQ0AIABBECABQQtqQXhxIAFBC0kbIgRqQQxqEAEiAkUNACACQQhrIQECQCAAQQFrIgMgAnFFBEAgASEADAELIAJBBGsiBSgCACIGQXhxIAIgA2pBACAAa3FBCGsiAiAAQQAgAiABa0EQTRtqIgAgAWsiAmshAyAGQQNxBEAgACADIAAoAgRBAXFyQQJyNgIEIAAgA2oiAyADKAIEQQFyNgIEIAUgAiAFKAIAQQFxckECcjYCACABIAJqIgMgAygCBEEBcjYCBCABIAIQBgwBCyABKAIAIQEgACADNgIEIAAgASACajYCAAsCQCAAKAIEIgFBA3FFDQAgAUF4cSICIARBEGpNDQAgACAEIAFBAXFyQQJyNgIEIAAgBGoiASACIARrIgRBA3I2AgQgACACaiICIAIoAgRBAXI2AgQgASAEEAYLIABBCGohAwsgAwwBCyABEAELCw0AIAAQ1wFBCnZBP3ELEAAgABBSIAEQWRC5ARCuAQsgACAAQsWAsKa9qOHJSzcDCCAAQpXM9oWR7LDtHzcDAAsLACABBEAgABAECwsLACAAIwBqJAAjAAsNAEHwiMAAQRsQ1AEACw4AQYuJwABBzwAQ1AEACwsAIAAxAAAgARADCwsAIAAzAQAgARADCwsAIAA1AgAgARADCwkAIAAgARAAAAsKACAAQT9xEL0BCwoAIAAQUkH/AXELBwAgAEEIdAsHACAAED4aCwcAIAAQUhoLBwAgABBTGgsHACAAEFQaCwoAQTMQxwEQvgELBwBBCxC9AQsHAEEKEL0BCwcAQQgQvQELBwBBDxC9AQsHAEEGEL0BCwcAQQkQvQELBwBBBxC9AQsHAEEMEL0BCwcAQQIQvQELBwBBARC9AQsHAEEDEL0BCwcAQQ0QvQELBwBBDhC9AQsHAEEFEL0BCwcAQQQQvQELBwBBEBC9AQsHAEEAEL0BCwQAQQQLAgALJAAgABC/ASABEL8BIAIQvwEgAxC/ARASQQh0IARyEMcBEL4BCyMAIAAQvwEgARC/ASACEL8BIAMQDRASQQh0IARyEMcBEL4BCx8AIAAQvwEgARC/ASACEL8BECtBCHQgA3IQxwEQvgELYgEBfyMAQTBrIgQkACAEIAA2AgwgACADTwRAIARBHGpCATcCACAEQQI2AhQgBCACNgIQIARBBDYCLCAEIARBKGo2AhggBCAEQQxqNgIoIARBEGogARBKAAsgBEEwaiQAIAALHgAgABC/ASABEL8BIAIQDhA5QQh0IANyEMcBEL4BCxsAIAAQvwEaIABBCnRBgPgDcSABchDHARC+AQtSAQJ/IwBBEGsiBSQAIAVBCGogAxATIAUtAAkhAyAFLQAIIQYgABC/ASABEL8BIAIQvwEgBkEBcSADQQFxEH5BCHQgBHIQxwEQvgEgBUEQaiQAC1ABAn8jAEEQayIFJAAgBUEIaiADEB0gBS0ACCEDIAUtAAkhBiAAEL8BIAEQvwEgAhC/ASADQQFxIAYQwAFBCHQgBHIQxwEQvgEgBUEQaiQAC0oAIAAQvwEaIAEQECIBQRB0QYCA/AdxIABBEnRBgIDwH3EgAXIiAEGA/gNxQQh0IABBCHZBgP4DcXJBCHZyQQh0IAJyEMcBEL4BC0kBAX8jAEEQayIDJAAgABDGASABIAJPBEBB4ILAAEEZENQBAAsgA0EIaiAAEFUgAygCDCADKAIIIAE6AAFBADYCACADQRBqJAALQgAgABC/ARogARC/ARogAEESdEGAgPAHcSABQQx0QYDgP3FyIgBBCHZBgP4DcSAAQYDgA3FBCHRyIAJyEMcBEL4BCzYAIAAQESIAQRB0QYCA/AdxIABBCHZBgP4DcSAAQYD+A3FBCHRyQQh2ckEIdCABchDHARC+AQsL5AkBAEGAgMAAC9oJQ2hlY2tSZWdJZCB3YXMgZ2l2ZW4gaW52YWxpZCBSZWdJZGZ1ZWwtYXNtL3NyYy9saWIucnMAAAAiABAAEwAAAG4AAAAiAAAAVmFsdWUgYGAgb3V0IG9mIHJhbmdlIGZvciA2LWJpdCBpbW1lZGlhdGUAAABIABAABwAAAE8AEAAiAAAAIgAQABMAAACuAwAAHAAAAGAgb3V0IG9mIHJhbmdlIGZvciAxMi1iaXQgaW1tZWRpYXRlAEgAEAAHAAAAlAAQACMAAAAiABAAEwAAALMDAAAcAAAAYCBvdXQgb2YgcmFuZ2UgZm9yIDE4LWJpdCBpbW1lZGlhdGUASAAQAAcAAADYABAAIwAAACIAEAATAAAAuAMAABwAAABgIG91dCBvZiByYW5nZSBmb3IgMjQtYml0IGltbWVkaWF0ZQBIABAABwAAABwBEAAjAAAAIgAQABMAAAC9AwAAHAAAAGludmFsaWQgZW51bSB2YWx1ZSBwYXNzZWQAAAAQAAAAEQAAABIAAAATAAAAFAAAABUAAAAWAAAAFwAAABgAAAAZAAAAGgAAABsAAAAcAAAAHQAAAB4AAAAfAAAAIAAAACEAAAAiAAAAJAAAACUAAAAmAAAAJwAAACgAAAApAAAAKgAAACsAAAAsAAAALQAAAC4AAAAvAAAAMAAAADEAAAAyAAAAMwAAADQAAAA1AAAANgAAADcAAAA4AAAAOQAAADoAAAA7AAAAPAAAAD0AAAA+AAAAPwAAAEAAAABBAAAAQgAAAEMAAABHAAAASAAAAEkAAABKAAAASwAAAEwAAABQAAAAUQAAAFIAAABTAAAAVAAAAFUAAABWAAAAVwAAAFgAAABZAAAAWgAAAFsAAABcAAAAXQAAAF4AAABfAAAAYAAAAGEAAABwAAAAcQAAAHIAAABzAAAAdAAAAHUAAAB2AAAAdwAAAHgAAAB5AAAAkAAAAJEAAACSAAAAkwAAAJQAAACVAAAAlgAAAJcAAACYAAAAoAAAAKEAAACiAAAAowAAAKQAAAClAAAApgAAAKcAAACoAAAAqQAAAKoAAACrAAAArAAAAK0AAACwAAAAugAAALsAAABwBBAAAAAAAAUAAAAAAAAAAQAAAAYAAAAwMDAxMDIwMzA0MDUwNjA3MDgwOTEwMTExMjEzMTQxNTE2MTcxODE5MjAyMTIyMjMyNDI1MjYyNzI4MjkzMDMxMzIzMzM0MzUzNjM3MzgzOTQwNDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OWNhbGxlZCBgT3B0aW9uOjp1bndyYXAoKWAgb24gYSBgTm9uZWAgdmFsdWVsaWJyYXJ5L3N0ZC9zcmMvcGFuaWNraW5nLnJzAEMEEAAcAAAAhAIAAB4AAABudWxsIHBvaW50ZXIgcGFzc2VkIHRvIHJ1c3RyZWN1cnNpdmUgdXNlIG9mIGFuIG9iamVjdCBkZXRlY3RlZCB3aGljaCB3b3VsZCBsZWFkIHRvIHVuc2FmZSBhbGlhc2luZyBpbiBydXN0ADsJcHJvZHVjZXJzAQxwcm9jZXNzZWQtYnkCBndhbHJ1cwYwLjIwLjMMd2FzbS1iaW5kZ2VuBjAuMi45Mg==",e)}async function F0(){return await M0(HL())}F0();C.ADD=pm;C.ADDI=hm;C.ALOC=mm;C.AND=gm;C.ANDI=_m;C.BAL=Am;C.BHEI=ym;C.BHSH=vm;C.BLDD=wm;C.BSIZ=bm;C.BURN=Em;C.CALL=Cm;C.CB=Im;C.CCP=Sm;C.CFE=xm;C.CFEI=Tm;C.CFS=Nm;C.CFSI=Rm;C.CROO=km;C.CSIZ=Bm;C.CompareArgs=Qr;C.CompareMode=VM;C.DIV=Om;C.DIVI=Pm;C.DivArgs=La;C.ECAL=Dm;C.ECK1=Mm;C.ECR1=Fm;C.ED19=Lm;C.EQ=Qm;C.EXP=Um;C.EXPI=qm;C.FLAG=Jm;C.GM=Qs;C.GMArgs=JM;C.GT=Vm;C.GTF=Us;C.GTFArgs=GM;C.Imm06=ze;C.Imm12=_e;C.Imm18=Ft;C.Imm24=yt;C.Instruction=F;C.JI=zm;C.JMP=Gm;C.JMPB=Wm;C.JMPF=Hm;C.JNE=Zm;C.JNEB=Xm;C.JNEF=Ym;C.JNEI=$m;C.JNZB=Km;C.JNZF=jm;C.JNZI=eg;C.K256=tg;C.LB=ng;C.LDC=rg;C.LOG=ig;C.LOGD=ag;C.LT=sg;C.LW=og;C.MCL=cg;C.MCLI=ug;C.MCP=lg;C.MCPI=dg;C.MEQ=fg;C.MINT=pg;C.MLDV=hg;C.MLOG=mg;C.MOD=gg;C.MODI=_g;C.MOVE=Ag;C.MOVI=yg;C.MROO=vg;C.MUL=wg;C.MULI=bg;C.MathArgs=Qa;C.MathOp=WM;C.MulArgs=Ua;C.NOOP=Eg;C.NOT=Cg;C.OR=Ig;C.ORI=Sg;C.POPH=xg;C.POPL=Tg;C.PSHH=Ng;C.PSHL=Rg;C.PanicInstruction=kg;C.PanicReason=zM;C.RET=Bg;C.RETD=Og;C.RVRT=Pg;C.RegId=f;C.S256=Dg;C.SB=Mg;C.SCWQ=Fg;C.SLL=Lg;C.SLLI=Qg;C.SMO=Ug;C.SRL=qg;C.SRLI=Jg;C.SRW=Vg;C.SRWQ=zg;C.SUB=Gg;C.SUBI=Wg;C.SW=Hg;C.SWW=Zg;C.SWWQ=Xg;C.TIME=Yg;C.TR=$g;C.TRO=Kg;C.WDAM=jg;C.WDCM=qs;C.WDDV=Js;C.WDMD=e_;C.WDML=Vs;C.WDMM=t_;C.WDOP=zs;C.WQAM=n_;C.WQCM=Gs;C.WQDV=Ws;C.WQMD=r_;C.WQML=Hs;C.WQMM=i_;C.WQOP=Zs;C.XOR=a_;C.XORI=s_;C.add=LP;C.addi=qD;C.aloc=aD;C.and=QP;C.andi=JD;C.bal=FD;C.bhei=lD;C.bhsh=uD;C.bldd=UM;C.bsiz=QM;C.burn=dD;C.call=fD;C.cb=gD;C.ccp=pD;C.cfe=AM;C.cfei=gM;C.cfs=yM;C.cfsi=_M;C.croo=hD;C.csiz=mD;C.div=UP;C.divi=VD;C.ecal=LM;C.eck1=ND;C.ecr1=RD;C.ed19=kD;C.eq=qP;C.exp=JP;C.expi=zD;C.flag=MD;C.gm=sM;C.gm_args=TP;C.gt=VP;C.gtf=iM;C.gtf_args=NP;C.initSync=GL;C.initWasm=F0;C.ji=mM;C.jmp=LD;C.jmpb=lM;C.jmpf=uM;C.jne=QD;C.jneb=hM;C.jnef=pM;C.jnei=KD;C.jnzb=fM;C.jnzf=dM;C.jnzi=cM;C.k256=BD;C.lb=jD;C.ldc=_D;C.log=AD;C.logd=yD;C.lt=zP;C.lw=eM;C.mcl=sD;C.mcli=aM;C.mcp=oD;C.mcpi=rM;C.meq=cD;C.mint=vD;C.mldv=nD;C.mlog=GP;C.mod_=HP;C.modi=GD;C.move_=ZP;C.movi=oM;C.mroo=WP;C.mul=XP;C.muli=WD;C.noop=DD;C.not=YP;C.or=$P;C.ori=HD;C.poph=EM;C.popl=bM;C.pshh=wM;C.pshl=vM;C.ret=rD;C.retd=iD;C.rvrt=wD;C.s256=OD;C.sb=tM;C.scwq=bD;C.sll=KP;C.slli=ZD;C.smo=UD;C.srl=jP;C.srli=XD;C.srw=ED;C.srwq=CD;C.sub=eD;C.subi=YD;C.sw=nM;C.sww=ID;C.swwq=SD;C.time=PD;C.tr=xD;C.tro=TD;C.wdam=PM;C.wdcm=CM;C.wdcm_args=RP;C.wddv=RM;C.wddv_args=MP;C.wdmd=BM;C.wdml=TM;C.wdml_args=PP;C.wdmm=MM;C.wdop=SM;C.wdop_args=BP;C.wqam=DM;C.wqcm=IM;C.wqcm_args=kP;C.wqdv=kM;C.wqdv_args=FP;C.wqmd=OM;C.wqml=NM;C.wqml_args=DP;C.wqmm=FM;C.wqop=xM;C.wqop_args=OP;C.xor=tD;C.xori=$D});function Lt(e,t){let n=e%t;return n>=vt?n:t+n}function $L(e,t,n){if(n<=vt||t<vt)throw new Error("Expected power/modulo > 0");if(n===et)return vt;let r=et;for(;t>vt;)t&et&&(r=r*e%n),e=e*e%n,t>>=et;return r}function vn(e,t,n){let r=e;for(;t-- >vt;)r*=r,r%=n;return r}function wd(e,t){if(e===vt||t<=vt)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let n=Lt(e,t),r=t,i=vt,a=et,s=et,o=vt;for(;n!==vt;){let u=r/n,d=r%n,p=i-s*u,h=a-o*u;r=n,n=d,i=s,a=o,s=p,o=h}if(r!==et)throw new Error("invert: does not exist");return Lt(i,t)}function KL(e){let t=(e-et)/qa,n,r,i;for(n=e-et,r=0;n%qa===vt;n/=qa,r++);for(i=qa;i<e&&$L(i,t,e)!==e-et;i++);if(r===1){let s=(e+et)/o_;return function(c,u){let d=c.pow(u,s);if(!c.eql(c.sqr(d),u))throw new Error("Cannot find square root");return d}}let a=(n+et)/qa;return function(o,c){if(o.pow(c,t)===o.neg(o.ONE))throw new Error("Cannot find square root");let u=r,d=o.pow(o.mul(o.ONE,i),n),p=o.pow(c,a),h=o.pow(c,n);for(;!o.eql(h,o.ONE);){if(o.eql(h,o.ZERO))return o.ZERO;let _=1;for(let A=o.sqr(h);_<u&&!o.eql(A,o.ONE);_++)A=o.sqr(A);let w=o.pow(d,et<<BigInt(u-_-1));d=o.sqr(w),p=o.mul(p,w),h=o.mul(h,d),u=_}return p}}function jL(e){if(e%o_===ZL){let t=(e+et)/o_;return function(r,i){let a=r.pow(i,t);if(!r.eql(r.sqr(a),i))throw new Error("Cannot find square root");return a}}if(e%Q0===L0){let t=(e-L0)/Q0;return function(r,i){let a=r.mul(i,qa),s=r.pow(a,t),o=r.mul(i,s),c=r.mul(r.mul(o,qa),s),u=r.mul(o,r.sub(c,r.ONE));if(!r.eql(r.sqr(u),i))throw new Error("Cannot find square root");return u}}return e%YL,KL(e)}function c_(e){let t={ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"},n=e4.reduce((r,i)=>(r[i]="function",r),t);return Qi(e,n)}function t4(e,t,n){if(n<vt)throw new Error("Expected power > 0");if(n===vt)return e.ONE;if(n===et)return t;let r=e.ONE,i=t;for(;n>vt;)n&et&&(r=e.mul(r,i)),i=e.sqr(i),n>>=et;return r}function n4(e,t){let n=new Array(t.length),r=t.reduce((a,s,o)=>e.is0(s)?a:(n[o]=a,e.mul(a,s)),e.ONE),i=e.inv(r);return t.reduceRight((a,s,o)=>e.is0(s)?a:(n[o]=e.mul(a,n[o]),e.mul(a,s)),i),n}function u_(e,t){let n=t!==void 0?t:e.toString(2).length,r=Math.ceil(n/8);return{nBitLength:n,nByteLength:r}}function U0(e,t,n=!1,r={}){if(e<=vt)throw new Error(`Expected Field ORDER > 0, got ${e}`);let{nBitLength:i,nByteLength:a}=u_(e,t);if(a>2048)throw new Error("Field lengths over 2048 bytes are not supported");let s=jL(e),o=Object.freeze({ORDER:e,BITS:i,BYTES:a,MASK:Tu(i),ZERO:vt,ONE:et,create:c=>Lt(c,e),isValid:c=>{if(typeof c!="bigint")throw new Error(`Invalid field element: expected bigint, got ${typeof c}`);return vt<=c&&c<e},is0:c=>c===vt,isOdd:c=>(c&et)===et,neg:c=>Lt(-c,e),eql:(c,u)=>c===u,sqr:c=>Lt(c*c,e),add:(c,u)=>Lt(c+u,e),sub:(c,u)=>Lt(c-u,e),mul:(c,u)=>Lt(c*u,e),pow:(c,u)=>t4(o,c,u),div:(c,u)=>Lt(c*wd(u,e),e),sqrN:c=>c*c,addN:(c,u)=>c+u,subN:(c,u)=>c-u,mulN:(c,u)=>c*u,inv:c=>wd(c,e),sqrt:r.sqrt||(c=>s(o,c)),invertBatch:c=>n4(o,c),cmov:(c,u,d)=>d?u:c,toBytes:c=>n?od(c,a):Li(c,a),fromBytes:c=>{if(c.length!==a)throw new Error(`Fp.fromBytes: expected ${a}, got ${c.length}`);return n?sd(c):pi(c)}});return Object.freeze(o)}function q0(e){if(typeof e!="bigint")throw new Error("field order must be bigint");let t=e.toString(2).length;return Math.ceil(t/8)}function l_(e){let t=q0(e);return t+Math.ceil(t/2)}function J0(e,t,n=!1){let r=e.length,i=q0(t),a=l_(t);if(r<16||r<a||r>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${r}`);let s=n?pi(e):sd(e),o=Lt(s,t-et)+et;return n?od(o,i):Li(o,i)}var vt,et,qa,ZL,o_,L0,Q0,XL,YL,eK,e4,bd=ct(()=>{Os();vt=BigInt(0),et=BigInt(1),qa=BigInt(2),ZL=BigInt(3),o_=BigInt(4),L0=BigInt(5),Q0=BigInt(8),XL=BigInt(9),YL=BigInt(16);eK=(e,t)=>(Lt(e,t)&et)===et,e4=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"]});function V0(e,t){let n=(i,a)=>{let s=a.negate();return i?s:a},r=i=>{let a=Math.ceil(t/i)+1,s=2**(i-1);return{windows:a,windowSize:s}};return{constTimeNegate:n,unsafeLadder(i,a){let s=e.ZERO,o=i;for(;a>i4;)a&d_&&(s=s.add(o)),o=o.double(),a>>=d_;return s},precomputeWindow(i,a){let{windows:s,windowSize:o}=r(a),c=[],u=i,d=u;for(let p=0;p<s;p++){d=u,c.push(d);for(let h=1;h<o;h++)d=d.add(u),c.push(d);u=d.double()}return c},wNAF(i,a,s){let{windows:o,windowSize:c}=r(i),u=e.ZERO,d=e.BASE,p=BigInt(2**i-1),h=2**i,_=BigInt(i);for(let w=0;w<o;w++){let A=w*c,S=Number(s&p);s>>=_,S>c&&(S-=h,s+=d_);let b=A,T=A+Math.abs(S)-1,B=w%2!==0,O=S<0;S===0?d=d.add(n(B,a[b])):u=u.add(n(O,a[T]))}return{p:u,f:d}},wNAFCached(i,a,s,o){let c=i._WINDOW_SIZE||1,u=a.get(i);return u||(u=this.precomputeWindow(i,c),c!==1&&a.set(i,o(u))),this.wNAF(c,u,s)}}}function f_(e){return c_(e.Fp),Qi(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...u_(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}var i4,d_,z0=ct(()=>{bd();Os();i4=BigInt(0),d_=BigInt(1)});function a4(e){let t=f_(e);Qi(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});let{endo:n,Fp:r,a:i}=t;if(n){if(!r.eql(i,r.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if(typeof n!="object"||typeof n.beta!="bigint"||typeof n.splitScalar!="function")throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}function c4(e){let t=a4(e),{Fp:n}=t,r=t.toBytes||((w,A,S)=>{let b=A.toAffine();return Bs(Uint8Array.from([4]),n.toBytes(b.x),n.toBytes(b.y))}),i=t.fromBytes||(w=>{let A=w.subarray(1),S=n.fromBytes(A.subarray(0,n.BYTES)),b=n.fromBytes(A.subarray(n.BYTES,2*n.BYTES));return{x:S,y:b}});function a(w){let{a:A,b:S}=t,b=n.sqr(w),T=n.mul(b,w);return n.add(n.add(T,n.mul(w,A)),S)}if(!n.eql(n.sqr(t.Gy),a(t.Gx)))throw new Error("bad generator point: equation left != right");function s(w){return typeof w=="bigint"&&hi<w&&w<t.n}function o(w){if(!s(w))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function c(w){let{allowedPrivateKeyLengths:A,nByteLength:S,wrapPrivateKey:b,n:T}=t;if(A&&typeof w!="bigint"){if(Fi(w)&&(w=Da(w)),typeof w!="string"||!A.includes(w.length))throw new Error("Invalid key");w=w.padStart(S*2,"0")}let B;try{B=typeof w=="bigint"?w:pi(yn("private key",w,S))}catch{throw new Error(`private key must be ${S} bytes, hex or bigint, not ${typeof w}`)}return b&&(B=Lt(B,T)),o(B),B}let u=new Map;function d(w){if(!(w instanceof p))throw new Error("ProjectivePoint expected")}class p{constructor(A,S,b){if(this.px=A,this.py=S,this.pz=b,A==null||!n.isValid(A))throw new Error("x required");if(S==null||!n.isValid(S))throw new Error("y required");if(b==null||!n.isValid(b))throw new Error("z required")}static fromAffine(A){let{x:S,y:b}=A||{};if(!A||!n.isValid(S)||!n.isValid(b))throw new Error("invalid affine point");if(A instanceof p)throw new Error("projective point not allowed");let T=B=>n.eql(B,n.ZERO);return T(S)&&T(b)?p.ZERO:new p(S,b,n.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(A){let S=n.invertBatch(A.map(b=>b.pz));return A.map((b,T)=>b.toAffine(S[T])).map(p.fromAffine)}static fromHex(A){let S=p.fromAffine(i(yn("pointHex",A)));return S.assertValidity(),S}static fromPrivateKey(A){return p.BASE.multiply(c(A))}_setWindowSize(A){this._WINDOW_SIZE=A,u.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!n.is0(this.py))return;throw new Error("bad point: ZERO")}let{x:A,y:S}=this.toAffine();if(!n.isValid(A)||!n.isValid(S))throw new Error("bad point: x or y not FE");let b=n.sqr(S),T=a(A);if(!n.eql(b,T))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){let{y:A}=this.toAffine();if(n.isOdd)return!n.isOdd(A);throw new Error("Field doesn't support isOdd")}equals(A){d(A);let{px:S,py:b,pz:T}=this,{px:B,py:O,pz:z}=A,Q=n.eql(n.mul(S,z),n.mul(B,T)),V=n.eql(n.mul(b,z),n.mul(O,T));return Q&&V}negate(){return new p(this.px,n.neg(this.py),this.pz)}double(){let{a:A,b:S}=t,b=n.mul(S,G0),{px:T,py:B,pz:O}=this,z=n.ZERO,Q=n.ZERO,V=n.ZERO,Z=n.mul(T,T),fe=n.mul(B,B),ne=n.mul(O,O),k=n.mul(T,B);return k=n.add(k,k),V=n.mul(T,O),V=n.add(V,V),z=n.mul(A,V),Q=n.mul(b,ne),Q=n.add(z,Q),z=n.sub(fe,Q),Q=n.add(fe,Q),Q=n.mul(z,Q),z=n.mul(k,z),V=n.mul(b,V),ne=n.mul(A,ne),k=n.sub(Z,ne),k=n.mul(A,k),k=n.add(k,V),V=n.add(Z,Z),Z=n.add(V,Z),Z=n.add(Z,ne),Z=n.mul(Z,k),Q=n.add(Q,Z),ne=n.mul(B,O),ne=n.add(ne,ne),Z=n.mul(ne,k),z=n.sub(z,Z),V=n.mul(ne,fe),V=n.add(V,V),V=n.add(V,V),new p(z,Q,V)}add(A){d(A);let{px:S,py:b,pz:T}=this,{px:B,py:O,pz:z}=A,Q=n.ZERO,V=n.ZERO,Z=n.ZERO,fe=t.a,ne=n.mul(t.b,G0),k=n.mul(S,B),pe=n.mul(b,O),M=n.mul(T,z),y=n.add(S,b),R=n.add(B,O);y=n.mul(y,R),R=n.add(k,pe),y=n.sub(y,R),R=n.add(S,T);let J=n.add(B,z);return R=n.mul(R,J),J=n.add(k,M),R=n.sub(R,J),J=n.add(b,T),Q=n.add(O,z),J=n.mul(J,Q),Q=n.add(pe,M),J=n.sub(J,Q),Z=n.mul(fe,R),Q=n.mul(ne,M),Z=n.add(Q,Z),Q=n.sub(pe,Z),Z=n.add(pe,Z),V=n.mul(Q,Z),pe=n.add(k,k),pe=n.add(pe,k),M=n.mul(fe,M),R=n.mul(ne,R),pe=n.add(pe,M),M=n.sub(k,M),M=n.mul(fe,M),R=n.add(R,M),k=n.mul(pe,R),V=n.add(V,k),k=n.mul(J,R),Q=n.mul(y,Q),Q=n.sub(Q,k),k=n.mul(y,pe),Z=n.mul(J,Z),Z=n.add(Z,k),new p(Q,V,Z)}subtract(A){return this.add(A.negate())}is0(){return this.equals(p.ZERO)}wNAF(A){return _.wNAFCached(this,u,A,S=>{let b=n.invertBatch(S.map(T=>T.pz));return S.map((T,B)=>T.toAffine(b[B])).map(p.fromAffine)})}multiplyUnsafe(A){let S=p.ZERO;if(A===hi)return S;if(o(A),A===Mn)return this;let{endo:b}=t;if(!b)return _.unsafeLadder(this,A);let{k1neg:T,k1:B,k2neg:O,k2:z}=b.splitScalar(A),Q=S,V=S,Z=this;for(;B>hi||z>hi;)B&Mn&&(Q=Q.add(Z)),z&Mn&&(V=V.add(Z)),Z=Z.double(),B>>=Mn,z>>=Mn;return T&&(Q=Q.negate()),O&&(V=V.negate()),V=new p(n.mul(V.px,b.beta),V.py,V.pz),Q.add(V)}multiply(A){o(A);let S=A,b,T,{endo:B}=t;if(B){let{k1neg:O,k1:z,k2neg:Q,k2:V}=B.splitScalar(S),{p:Z,f:fe}=this.wNAF(z),{p:ne,f:k}=this.wNAF(V);Z=_.constTimeNegate(O,Z),ne=_.constTimeNegate(Q,ne),ne=new p(n.mul(ne.px,B.beta),ne.py,ne.pz),b=Z.add(ne),T=fe.add(k)}else{let{p:O,f:z}=this.wNAF(S);b=O,T=z}return p.normalizeZ([b,T])[0]}multiplyAndAddUnsafe(A,S,b){let T=p.BASE,B=(z,Q)=>Q===hi||Q===Mn||!z.equals(T)?z.multiplyUnsafe(Q):z.multiply(Q),O=B(this,S).add(B(A,b));return O.is0()?void 0:O}toAffine(A){let{px:S,py:b,pz:T}=this,B=this.is0();A==null&&(A=B?n.ONE:n.inv(T));let O=n.mul(S,A),z=n.mul(b,A),Q=n.mul(T,A);if(B)return{x:n.ZERO,y:n.ZERO};if(!n.eql(Q,n.ONE))throw new Error("invZ was invalid");return{x:O,y:z}}isTorsionFree(){let{h:A,isTorsionFree:S}=t;if(A===Mn)return!0;if(S)return S(p,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){let{h:A,clearCofactor:S}=t;return A===Mn?this:S?S(p,this):this.multiplyUnsafe(t.h)}toRawBytes(A=!0){return this.assertValidity(),r(p,this,A)}toHex(A=!0){return Da(this.toRawBytes(A))}}p.BASE=new p(t.Gx,t.Gy,n.ONE),p.ZERO=new p(n.ZERO,n.ONE,n.ZERO);let h=t.nBitLength,_=V0(p,t.endo?Math.ceil(h/2):h);return{CURVE:t,ProjectivePoint:p,normPrivateKeyToScalar:c,weierstrassEquation:a,isWithinCurveOrder:s}}function u4(e){let t=f_(e);return Qi(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}function W0(e){let t=u4(e),{Fp:n,n:r}=t,i=n.BYTES+1,a=2*n.BYTES+1;function s(R){return hi<R&&R<n.ORDER}function o(R){return Lt(R,r)}function c(R){return wd(R,r)}let{ProjectivePoint:u,normPrivateKeyToScalar:d,weierstrassEquation:p,isWithinCurveOrder:h}=c4({...t,toBytes(R,J,Y){let re=J.toAffine(),ae=n.toBytes(re.x),ce=Bs;return Y?ce(Uint8Array.from([J.hasEvenY()?2:3]),ae):ce(Uint8Array.from([4]),ae,n.toBytes(re.y))},fromBytes(R){let J=R.length,Y=R[0],re=R.subarray(1);if(J===i&&(Y===2||Y===3)){let ae=pi(re);if(!s(ae))throw new Error("Point is not on curve");let ce=p(ae),Ee;try{Ee=n.sqrt(ce)}catch(qe){let Je=qe instanceof Error?": "+qe.message:"";throw new Error("Point is not on curve"+Je)}let Ce=(Ee&Mn)===Mn;return(Y&1)===1!==Ce&&(Ee=n.neg(Ee)),{x:ae,y:Ee}}else if(J===a&&Y===4){let ae=n.fromBytes(re.subarray(0,n.BYTES)),ce=n.fromBytes(re.subarray(n.BYTES,2*n.BYTES));return{x:ae,y:ce}}else throw new Error(`Point of length ${J} was invalid. Expected ${i} compressed bytes or ${a} uncompressed bytes`)}}),_=R=>Da(Li(R,t.nByteLength));function w(R){let J=r>>Mn;return R>J}function A(R){return w(R)?o(-R):R}let S=(R,J,Y)=>pi(R.slice(J,Y));class b{constructor(J,Y,re){this.r=J,this.s=Y,this.recovery=re,this.assertValidity()}static fromCompact(J){let Y=t.nByteLength;return J=yn("compactSignature",J,Y*2),new b(S(J,0,Y),S(J,Y,2*Y))}static fromDER(J){let{r:Y,s:re}=Ja.toSig(yn("DER",J));return new b(Y,re)}assertValidity(){if(!h(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!h(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(J){return new b(this.r,this.s,J)}recoverPublicKey(J){let{r:Y,s:re,recovery:ae}=this,ce=V(yn("msgHash",J));if(ae==null||![0,1,2,3].includes(ae))throw new Error("recovery id invalid");let Ee=ae===2||ae===3?Y+t.n:Y;if(Ee>=n.ORDER)throw new Error("recovery id 2 or 3 invalid");let Ce=ae&1?"03":"02",Fe=u.fromHex(Ce+_(Ee)),qe=c(Ee),Je=o(-ce*qe),ot=o(re*qe),Yt=u.BASE.multiplyAndAddUnsafe(Fe,Je,ot);if(!Yt)throw new Error("point at infinify");return Yt.assertValidity(),Yt}hasHighS(){return w(this.s)}normalizeS(){return this.hasHighS()?new b(this.r,o(-this.s),this.recovery):this}toDERRawBytes(){return Ma(this.toDERHex())}toDERHex(){return Ja.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return Ma(this.toCompactHex())}toCompactHex(){return _(this.r)+_(this.s)}}let T={isValidPrivateKey(R){try{return d(R),!0}catch{return!1}},normPrivateKeyToScalar:d,randomPrivateKey:()=>{let R=l_(t.n);return J0(t.randomBytes(R),t.n)},precompute(R=8,J=u.BASE){return J._setWindowSize(R),J.multiply(BigInt(3)),J}};function B(R,J=!0){return u.fromPrivateKey(R).toRawBytes(J)}function O(R){let J=Fi(R),Y=typeof R=="string",re=(J||Y)&&R.length;return J?re===i||re===a:Y?re===2*i||re===2*a:R instanceof u}function z(R,J,Y=!0){if(O(R))throw new Error("first arg must be private key");if(!O(J))throw new Error("second arg must be public key");return u.fromHex(J).multiply(d(R)).toRawBytes(Y)}let Q=t.bits2int||function(R){let J=pi(R),Y=R.length*8-t.nBitLength;return Y>0?J>>BigInt(Y):J},V=t.bits2int_modN||function(R){return o(Q(R))},Z=Tu(t.nBitLength);function fe(R){if(typeof R!="bigint")throw new Error("bigint expected");if(!(hi<=R&&R<Z))throw new Error(`bigint expected < 2^${t.nBitLength}`);return Li(R,t.nByteLength)}function ne(R,J,Y=k){if(["recovered","canonical"].some(U=>U in Y))throw new Error("sign() legacy options not supported");let{hash:re,randomBytes:ae}=t,{lowS:ce,prehash:Ee,extraEntropy:Ce}=Y;ce==null&&(ce=!0),R=yn("msgHash",R),Ee&&(R=yn("prehashed msgHash",re(R)));let Fe=V(R),qe=d(J),Je=[fe(qe),fe(Fe)];if(Ce!=null&&Ce!==!1){let U=Ce===!0?ae(n.BYTES):Ce;Je.push(yn("extraEntropy",U))}let ot=Bs(...Je),Yt=Fe;function gt(U){let q=Q(U);if(!h(q))return;let H=c(q),ee=u.BASE.multiply(q).toAffine(),K=o(ee.x);if(K===hi)return;let he=o(H*o(Yt+K*qe));if(he===hi)return;let He=(ee.x===K?0:2)|Number(ee.y&Mn),tr=he;return ce&&w(he)&&(tr=A(he),He^=1),new b(K,tr,He)}return{seed:ot,k2sig:gt}}let k={lowS:t.lowS,prehash:!1},pe={lowS:t.lowS,prehash:!1};function M(R,J,Y=k){let{seed:re,k2sig:ae}=ne(R,J,Y),ce=t;return Wh(ce.hash.outputLen,ce.nByteLength,ce.hmac)(re,ae)}u.BASE._setWindowSize(8);function y(R,J,Y,re=pe){let ae=R;if(J=yn("msgHash",J),Y=yn("publicKey",Y),"strict"in re)throw new Error("options.strict was renamed to lowS");let{lowS:ce,prehash:Ee}=re,Ce,Fe;try{if(typeof ae=="string"||Fi(ae))try{Ce=b.fromDER(ae)}catch(ee){if(!(ee instanceof Ja.Err))throw ee;Ce=b.fromCompact(ae)}else if(typeof ae=="object"&&typeof ae.r=="bigint"&&typeof ae.s=="bigint"){let{r:ee,s:K}=ae;Ce=new b(ee,K)}else throw new Error("PARSE");Fe=u.fromHex(Y)}catch(ee){if(ee.message==="PARSE")throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(ce&&Ce.hasHighS())return!1;Ee&&(J=t.hash(J));let{r:qe,s:Je}=Ce,ot=V(J),Yt=c(Je),gt=o(ot*Yt),U=o(qe*Yt),q=u.BASE.multiplyAndAddUnsafe(Fe,gt,U)?.toAffine();return q?o(q.x)===qe:!1}return{CURVE:t,getPublicKey:B,getSharedSecret:z,sign:M,verify:y,ProjectivePoint:u,Signature:b,utils:T}}var s4,o4,Ja,hi,Mn,oK,G0,cK,H0=ct(()=>{z0();bd();Os();Os();({bytesToNumberBE:s4,hexToBytes:o4}=Hh),Ja={Err:class extends Error{constructor(t=""){super(t)}},_parseInt(e){let{Err:t}=Ja;if(e.length<2||e[0]!==2)throw new t("Invalid signature integer tag");let n=e[1],r=e.subarray(2,n+2);if(!n||r.length!==n)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:s4(r),l:e.subarray(n+2)}},toSig(e){let{Err:t}=Ja,n=typeof e=="string"?o4(e):e;ks(n);let r=n.length;if(r<2||n[0]!=48)throw new t("Invalid signature tag");if(n[1]!==r-2)throw new t("Invalid signature: incorrect length");let{d:i,l:a}=Ja._parseInt(n.subarray(2)),{d:s,l:o}=Ja._parseInt(a);if(o.length)throw new t("Invalid signature: left bytes after parsing");return{r:i,s}},hexFromSig(e){let t=u=>Number.parseInt(u[0],16)&8?"00"+u:u,n=u=>{let d=u.toString(16);return d.length&1?`0${d}`:d},r=t(n(e.s)),i=t(n(e.r)),a=r.length/2,s=i.length/2,o=n(a),c=n(s);return`30${n(s+a+4)}02${c}${i}02${o}${r}`}},hi=BigInt(0),Mn=BigInt(1),oK=BigInt(2),G0=BigInt(3),cK=BigInt(4)});function l4(e){return{hash:e,hmac:(t,...n)=>eb(e,t,Yw(...n)),randomBytes:Kw}}function Z0(e,t){let n=r=>W0({...e,...l4(r)});return Object.freeze({...n(t),create:n})}var X0=ct(()=>{w1();jw();H0();});function f4(e){let t=K0,n=BigInt(3),r=BigInt(6),i=BigInt(11),a=BigInt(22),s=BigInt(23),o=BigInt(44),c=BigInt(88),u=e*e*e%t,d=u*u*e%t,p=vn(d,n,t)*d%t,h=vn(p,n,t)*d%t,_=vn(h,p_,t)*u%t,w=vn(_,i,t)*_%t,A=vn(w,a,t)*w%t,S=vn(A,o,t)*A%t,b=vn(S,c,t)*S%t,T=vn(b,o,t)*A%t,B=vn(T,n,t)*d%t,O=vn(B,s,t)*w%t,z=vn(O,r,t)*u%t,Q=vn(z,p_,t);if(!h_.eql(h_.sqr(Q),e))throw new Error("Cannot find square root");return Q}var K0,Y0,d4,p_,$0,h_,mi,_K,AK,j0=ct(()=>{Hl();X0();bd();K0=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),Y0=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),d4=BigInt(1),p_=BigInt(2),$0=(e,t)=>(e+t/p_)/t;h_=U0(K0,void 0,void 0,{sqrt:f4}),mi=Z0({a:BigInt(0),b:BigInt(7),Fp:h_,n:Y0,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{let t=Y0,n=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),r=-d4*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),a=n,s=BigInt("0x100000000000000000000000000000000"),o=$0(a*e,t),c=$0(-r*e,t),u=Lt(e-o*n-c*i,t),d=Lt(-o*r-c*a,t),p=u>s,h=d>s;if(p&&(u=t-u),h&&(d=t-d),u>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:p,k1:u,k2neg:h,k2:d}}}},di),_K=BigInt(0),AK=mi.ProjectivePoint});var Y_=N((Lre,yI)=>{"use strict";yI.exports=H6;function H6(e,t){for(var n=new Array(arguments.length-1),r=0,i=2,a=!0;i<arguments.length;)n[r++]=arguments[i++];return new Promise(function(o,c){n[r]=function(d){if(a)if(a=!1,d)c(d);else{for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h++]=arguments[h];o.apply(null,p)}};try{e.apply(t||null,n)}catch(u){a&&(a=!1,c(u))}})}});var EI=N(bI=>{"use strict";var Fd=bI;Fd.length=function(t){var n=t.length;if(!n)return 0;for(var r=0;--n%4>1&&t.charAt(n)==="=";)++r;return Math.ceil(t.length*3)/4-r};var ao=new Array(64),wI=new Array(123);for(lr=0;lr<64;)wI[ao[lr]=lr<26?lr+65:lr<52?lr+71:lr<62?lr-4:lr-59|43]=lr++;var lr;Fd.encode=function(t,n,r){for(var i=null,a=[],s=0,o=0,c;n<r;){var u=t[n++];switch(o){case 0:a[s++]=ao[u>>2],c=(u&3)<<4,o=1;break;case 1:a[s++]=ao[c|u>>4],c=(u&15)<<2,o=2;break;case 2:a[s++]=ao[c|u>>6],a[s++]=ao[u&63],o=0;break}s>8191&&((i||(i=[])).push(String.fromCharCode.apply(String,a)),s=0)}return o&&(a[s++]=ao[c],a[s++]=61,o===1&&(a[s++]=61)),i?(s&&i.push(String.fromCharCode.apply(String,a.slice(0,s))),i.join("")):String.fromCharCode.apply(String,a.slice(0,s))};var vI="invalid encoding";Fd.decode=function(t,n,r){for(var i=r,a=0,s,o=0;o<t.length;){var c=t.charCodeAt(o++);if(c===61&&a>1)break;if((c=wI[c])===void 0)throw Error(vI);switch(a){case 0:s=c,a=1;break;case 1:n[r++]=s<<2|(c&48)>>4,s=c,a=2;break;case 2:n[r++]=(s&15)<<4|(c&60)>>2,s=c,a=3;break;case 3:n[r++]=(s&3)<<6|c,a=0;break}}if(a===1)throw Error(vI);return r-i};Fd.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}});var II=N((Ure,CI)=>{"use strict";CI.exports=Ld;function Ld(){this._listeners={}}Ld.prototype.on=function(t,n,r){return(this._listeners[t]||(this._listeners[t]=[])).push({fn:n,ctx:r||this}),this};Ld.prototype.off=function(t,n){if(t===void 0)this._listeners={};else if(n===void 0)this._listeners[t]=[];else for(var r=this._listeners[t],i=0;i<r.length;)r[i].fn===n?r.splice(i,1):++i;return this};Ld.prototype.emit=function(t){var n=this._listeners[t];if(n){for(var r=[],i=1;i<arguments.length;)r.push(arguments[i++]);for(i=0;i<n.length;)n[i].fn.apply(n[i++].ctx,r)}return this}});var BI=N((qre,kI)=>{"use strict";kI.exports=SI(SI);function SI(e){return typeof Float32Array<"u"?function(){var t=new Float32Array([-0]),n=new Uint8Array(t.buffer),r=n[3]===128;function i(c,u,d){t[0]=c,u[d]=n[0],u[d+1]=n[1],u[d+2]=n[2],u[d+3]=n[3]}function a(c,u,d){t[0]=c,u[d]=n[3],u[d+1]=n[2],u[d+2]=n[1],u[d+3]=n[0]}e.writeFloatLE=r?i:a,e.writeFloatBE=r?a:i;function s(c,u){return n[0]=c[u],n[1]=c[u+1],n[2]=c[u+2],n[3]=c[u+3],t[0]}function o(c,u){return n[3]=c[u],n[2]=c[u+1],n[1]=c[u+2],n[0]=c[u+3],t[0]}e.readFloatLE=r?s:o,e.readFloatBE=r?o:s}():function(){function t(r,i,a,s){var o=i<0?1:0;if(o&&(i=-i),i===0)r(1/i>0?0:2147483648,a,s);else if(isNaN(i))r(2143289344,a,s);else if(i>34028234663852886e22)r((o<<31|2139095040)>>>0,a,s);else if(i<11754943508222875e-54)r((o<<31|Math.round(i/1401298464324817e-60))>>>0,a,s);else{var c=Math.floor(Math.log(i)/Math.LN2),u=Math.round(i*Math.pow(2,-c)*8388608)&8388607;r((o<<31|c+127<<23|u)>>>0,a,s)}}e.writeFloatLE=t.bind(null,xI),e.writeFloatBE=t.bind(null,TI);function n(r,i,a){var s=r(i,a),o=(s>>31)*2+1,c=s>>>23&255,u=s&8388607;return c===255?u?NaN:o*(1/0):c===0?o*1401298464324817e-60*u:o*Math.pow(2,c-150)*(u+8388608)}e.readFloatLE=n.bind(null,NI),e.readFloatBE=n.bind(null,RI)}(),typeof Float64Array<"u"?function(){var t=new Float64Array([-0]),n=new Uint8Array(t.buffer),r=n[7]===128;function i(c,u,d){t[0]=c,u[d]=n[0],u[d+1]=n[1],u[d+2]=n[2],u[d+3]=n[3],u[d+4]=n[4],u[d+5]=n[5],u[d+6]=n[6],u[d+7]=n[7]}function a(c,u,d){t[0]=c,u[d]=n[7],u[d+1]=n[6],u[d+2]=n[5],u[d+3]=n[4],u[d+4]=n[3],u[d+5]=n[2],u[d+6]=n[1],u[d+7]=n[0]}e.writeDoubleLE=r?i:a,e.writeDoubleBE=r?a:i;function s(c,u){return n[0]=c[u],n[1]=c[u+1],n[2]=c[u+2],n[3]=c[u+3],n[4]=c[u+4],n[5]=c[u+5],n[6]=c[u+6],n[7]=c[u+7],t[0]}function o(c,u){return n[7]=c[u],n[6]=c[u+1],n[5]=c[u+2],n[4]=c[u+3],n[3]=c[u+4],n[2]=c[u+5],n[1]=c[u+6],n[0]=c[u+7],t[0]}e.readDoubleLE=r?s:o,e.readDoubleBE=r?o:s}():function(){function t(r,i,a,s,o,c){var u=s<0?1:0;if(u&&(s=-s),s===0)r(0,o,c+i),r(1/s>0?0:2147483648,o,c+a);else if(isNaN(s))r(0,o,c+i),r(2146959360,o,c+a);else if(s>17976931348623157e292)r(0,o,c+i),r((u<<31|2146435072)>>>0,o,c+a);else{var d;if(s<22250738585072014e-324)d=s/5e-324,r(d>>>0,o,c+i),r((u<<31|d/4294967296)>>>0,o,c+a);else{var p=Math.floor(Math.log(s)/Math.LN2);p===1024&&(p=1023),d=s*Math.pow(2,-p),r(d*4503599627370496>>>0,o,c+i),r((u<<31|p+1023<<20|d*1048576&1048575)>>>0,o,c+a)}}}e.writeDoubleLE=t.bind(null,xI,0,4),e.writeDoubleBE=t.bind(null,TI,4,0);function n(r,i,a,s,o){var c=r(s,o+i),u=r(s,o+a),d=(u>>31)*2+1,p=u>>>20&2047,h=4294967296*(u&1048575)+c;return p===2047?h?NaN:d*(1/0):p===0?d*5e-324*h:d*Math.pow(2,p-1075)*(h+4503599627370496)}e.readDoubleLE=n.bind(null,NI,0,4),e.readDoubleBE=n.bind(null,RI,4,0)}(),e}function xI(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}function TI(e,t,n){t[n]=e>>>24,t[n+1]=e>>>16&255,t[n+2]=e>>>8&255,t[n+3]=e&255}function NI(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0}function RI(e,t){return(e[t]<<24|e[t+1]<<16|e[t+2]<<8|e[t+3])>>>0}});var $_=N((exports,module)=>{"use strict";module.exports=inquire;function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}});var PI=N(OI=>{"use strict";var K_=OI;K_.length=function(t){for(var n=0,r=0,i=0;i<t.length;++i)r=t.charCodeAt(i),r<128?n+=1:r<2048?n+=2:(r&64512)===55296&&(t.charCodeAt(i+1)&64512)===56320?(++i,n+=4):n+=3;return n};K_.read=function(t,n,r){var i=r-n;if(i<1)return"";for(var a=null,s=[],o=0,c;n<r;)c=t[n++],c<128?s[o++]=c:c>191&&c<224?s[o++]=(c&31)<<6|t[n++]&63:c>239&&c<365?(c=((c&7)<<18|(t[n++]&63)<<12|(t[n++]&63)<<6|t[n++]&63)-65536,s[o++]=55296+(c>>10),s[o++]=56320+(c&1023)):s[o++]=(c&15)<<12|(t[n++]&63)<<6|t[n++]&63,o>8191&&((a||(a=[])).push(String.fromCharCode.apply(String,s)),o=0);return a?(o&&a.push(String.fromCharCode.apply(String,s.slice(0,o))),a.join("")):String.fromCharCode.apply(String,s.slice(0,o))};K_.write=function(t,n,r){for(var i=r,a,s,o=0;o<t.length;++o)a=t.charCodeAt(o),a<128?n[r++]=a:a<2048?(n[r++]=a>>6|192,n[r++]=a&63|128):(a&64512)===55296&&((s=t.charCodeAt(o+1))&64512)===56320?(a=65536+((a&1023)<<10)+(s&1023),++o,n[r++]=a>>18|240,n[r++]=a>>12&63|128,n[r++]=a>>6&63|128,n[r++]=a&63|128):(n[r++]=a>>12|224,n[r++]=a>>6&63|128,n[r++]=a&63|128);return r-i}});var MI=N((Vre,DI)=>{"use strict";DI.exports=Z6;function Z6(e,t,n){var r=n||8192,i=r>>>1,a=null,s=r;return function(c){if(c<1||c>i)return e(c);s+c>r&&(a=e(r),s=0);var u=t.call(a,s,s+=c);return s&7&&(s=(s|7)+1),u}}});var LI=N((zre,FI)=>{"use strict";FI.exports=xt;var Vu=zr();function xt(e,t){this.lo=e>>>0,this.hi=t>>>0}var Ha=xt.zero=new xt(0,0);Ha.toNumber=function(){return 0};Ha.zzEncode=Ha.zzDecode=function(){return this};Ha.length=function(){return 1};var X6=xt.zeroHash="\0\0\0\0\0\0\0\0";xt.fromNumber=function(t){if(t===0)return Ha;var n=t<0;n&&(t=-t);var r=t>>>0,i=(t-r)/4294967296>>>0;return n&&(i=~i>>>0,r=~r>>>0,++r>4294967295&&(r=0,++i>4294967295&&(i=0))),new xt(r,i)};xt.from=function(t){if(typeof t=="number")return xt.fromNumber(t);if(Vu.isString(t))if(Vu.Long)t=Vu.Long.fromString(t);else return xt.fromNumber(parseInt(t,10));return t.low||t.high?new xt(t.low>>>0,t.high>>>0):Ha};xt.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var n=~this.lo+1>>>0,r=~this.hi>>>0;return n||(r=r+1>>>0),-(n+r*4294967296)}return this.lo+this.hi*4294967296};xt.prototype.toLong=function(t){return Vu.Long?new Vu.Long(this.lo|0,this.hi|0,!!t):{low:this.lo|0,high:this.hi|0,unsigned:!!t}};var Hi=String.prototype.charCodeAt;xt.fromHash=function(t){return t===X6?Ha:new xt((Hi.call(t,0)|Hi.call(t,1)<<8|Hi.call(t,2)<<16|Hi.call(t,3)<<24)>>>0,(Hi.call(t,4)|Hi.call(t,5)<<8|Hi.call(t,6)<<16|Hi.call(t,7)<<24)>>>0)};xt.prototype.toHash=function(){return String.fromCharCode(this.lo&255,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,this.hi&255,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)};xt.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this};xt.prototype.zzDecode=function(){var t=-(this.lo&1);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this};xt.prototype.length=function(){var t=this.lo,n=(this.lo>>>28|this.hi<<4)>>>0,r=this.hi>>>24;return r===0?n===0?t<16384?t<128?1:2:t<2097152?3:4:n<16384?n<128?5:6:n<2097152?7:8:r<128?9:10}});var zr=N(j_=>{"use strict";var oe=j_;oe.asPromise=Y_();oe.base64=EI();oe.EventEmitter=II();oe.float=BI();oe.inquire=$_();oe.utf8=PI();oe.pool=MI();oe.LongBits=LI();oe.isNode=!!(typeof global<"u"&&global&&global.process&&global.process.versions&&global.process.versions.node);oe.global=oe.isNode&&global||typeof window<"u"&&window||typeof self<"u"&&self||j_;oe.emptyArray=Object.freeze?Object.freeze([]):[];oe.emptyObject=Object.freeze?Object.freeze({}):{};oe.isInteger=Number.isInteger||function(t){return typeof t=="number"&&isFinite(t)&&Math.floor(t)===t};oe.isString=function(t){return typeof t=="string"||t instanceof String};oe.isObject=function(t){return t&&typeof t=="object"};oe.isset=oe.isSet=function(t,n){var r=t[n];return r!=null&&t.hasOwnProperty(n)?typeof r!="object"||(Array.isArray(r)?r.length:Object.keys(r).length)>0:!1};oe.Buffer=function(){try{var e=oe.inquire("buffer").Buffer;return e.prototype.utf8Write?e:null}catch{return null}}();oe._Buffer_from=null;oe._Buffer_allocUnsafe=null;oe.newBuffer=function(t){return typeof t=="number"?oe.Buffer?oe._Buffer_allocUnsafe(t):new oe.Array(t):oe.Buffer?oe._Buffer_from(t):typeof Uint8Array>"u"?t:new Uint8Array(t)};oe.Array=typeof Uint8Array<"u"?Uint8Array:Array;oe.Long=oe.global.dcodeIO&&oe.global.dcodeIO.Long||oe.global.Long||oe.inquire("long");oe.key2Re=/^true|false|0|1$/;oe.key32Re=/^-?(?:0|[1-9][0-9]*)$/;oe.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/;oe.longToHash=function(t){return t?oe.LongBits.from(t).toHash():oe.LongBits.zeroHash};oe.longFromHash=function(t,n){var r=oe.LongBits.fromHash(t);return oe.Long?oe.Long.fromBits(r.lo,r.hi,n):r.toNumber(!!n)};function QI(e,t,n){for(var r=Object.keys(t),i=0;i<r.length;++i)(e[r[i]]===void 0||!n)&&(e[r[i]]=t[r[i]]);return e}oe.merge=QI;oe.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)};function UI(e){function t(n,r){if(!(this instanceof t))return new t(n,r);Object.defineProperty(this,"message",{get:function(){return n}}),Error.captureStackTrace?Error.captureStackTrace(this,t):Object.defineProperty(this,"stack",{value:new Error().stack||""}),r&&QI(this,r)}return t.prototype=Object.create(Error.prototype,{constructor:{value:t,writable:!0,enumerable:!1,configurable:!0},name:{get:function(){return e},set:void 0,enumerable:!1,configurable:!0},toString:{value:function(){return this.name+": "+this.message},writable:!0,enumerable:!1,configurable:!0}}),t}oe.newError=UI;oe.ProtocolError=UI("ProtocolError");oe.oneOfGetter=function(t){for(var n={},r=0;r<t.length;++r)n[t[r]]=1;return function(){for(var i=Object.keys(this),a=i.length-1;a>-1;--a)if(n[i[a]]===1&&this[i[a]]!==void 0&&this[i[a]]!==null)return i[a]}};oe.oneOfSetter=function(t){return function(n){for(var r=0;r<t.length;++r)t[r]!==n&&delete this[t[r]]}};oe.toJSONOptions={longs:String,enums:String,bytes:String,json:!0};oe._configure=function(){var e=oe.Buffer;if(!e){oe._Buffer_from=oe._Buffer_allocUnsafe=null;return}oe._Buffer_from=e.from!==Uint8Array.from&&e.from||function(n,r){return new e(n,r)},oe._Buffer_allocUnsafe=e.allocUnsafe||function(n){return new e(n)}}});var Ud=N((Wre,zI)=>{"use strict";zI.exports=Be;var Un=zr(),eA,Qd=Un.LongBits,qI=Un.base64,JI=Un.utf8;function zu(e,t,n){this.fn=e,this.len=t,this.next=void 0,this.val=n}function nA(){}function Y6(e){this.head=e.head,this.tail=e.tail,this.len=e.len,this.next=e.states}function Be(){this.len=0,this.head=new zu(nA,0,0),this.tail=this.head,this.states=null}var VI=function(){return Un.Buffer?function(){return(Be.create=function(){return new eA})()}:function(){return new Be}};Be.create=VI();Be.alloc=function(t){return new Un.Array(t)};Un.Array!==Array&&(Be.alloc=Un.pool(Be.alloc,Un.Array.prototype.subarray));Be.prototype._push=function(t,n,r){return this.tail=this.tail.next=new zu(t,n,r),this.len+=n,this};function rA(e,t,n){t[n]=e&255}function $6(e,t,n){for(;e>127;)t[n++]=e&127|128,e>>>=7;t[n]=e}function iA(e,t){this.len=e,this.next=void 0,this.val=t}iA.prototype=Object.create(zu.prototype);iA.prototype.fn=$6;Be.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new iA((t=t>>>0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this};Be.prototype.int32=function(t){return t<0?this._push(aA,10,Qd.fromNumber(t)):this.uint32(t)};Be.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)};function aA(e,t,n){for(;e.hi;)t[n++]=e.lo&127|128,e.lo=(e.lo>>>7|e.hi<<25)>>>0,e.hi>>>=7;for(;e.lo>127;)t[n++]=e.lo&127|128,e.lo=e.lo>>>7;t[n++]=e.lo}Be.prototype.uint64=function(t){var n=Qd.from(t);return this._push(aA,n.length(),n)};Be.prototype.int64=Be.prototype.uint64;Be.prototype.sint64=function(t){var n=Qd.from(t).zzEncode();return this._push(aA,n.length(),n)};Be.prototype.bool=function(t){return this._push(rA,1,t?1:0)};function tA(e,t,n){t[n]=e&255,t[n+1]=e>>>8&255,t[n+2]=e>>>16&255,t[n+3]=e>>>24}Be.prototype.fixed32=function(t){return this._push(tA,4,t>>>0)};Be.prototype.sfixed32=Be.prototype.fixed32;Be.prototype.fixed64=function(t){var n=Qd.from(t);return this._push(tA,4,n.lo)._push(tA,4,n.hi)};Be.prototype.sfixed64=Be.prototype.fixed64;Be.prototype.float=function(t){return this._push(Un.float.writeFloatLE,4,t)};Be.prototype.double=function(t){return this._push(Un.float.writeDoubleLE,8,t)};var K6=Un.Array.prototype.set?function(t,n,r){n.set(t,r)}:function(t,n,r){for(var i=0;i<t.length;++i)n[r+i]=t[i]};Be.prototype.bytes=function(t){var n=t.length>>>0;if(!n)return this._push(rA,1,0);if(Un.isString(t)){var r=Be.alloc(n=qI.length(t));qI.decode(t,r,0),t=r}return this.uint32(n)._push(K6,n,t)};Be.prototype.string=function(t){var n=JI.length(t);return n?this.uint32(n)._push(JI.write,n,t):this._push(rA,1,0)};Be.prototype.fork=function(){return this.states=new Y6(this),this.head=this.tail=new zu(nA,0,0),this.len=0,this};Be.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new zu(nA,0,0),this.len=0),this};Be.prototype.ldelim=function(){var t=this.head,n=this.tail,r=this.len;return this.reset().uint32(r),r&&(this.tail.next=t.next,this.tail=n,this.len+=r),this};Be.prototype.finish=function(){for(var t=this.head.next,n=this.constructor.alloc(this.len),r=0;t;)t.fn(t.val,n,r),r+=t.len,t=t.next;return n};Be._configure=function(e){eA=e,Be.create=VI(),eA._configure()}});var HI=N((Hre,WI)=>{"use strict";WI.exports=Gr;var GI=Ud();(Gr.prototype=Object.create(GI.prototype)).constructor=Gr;var Zi=zr();function Gr(){GI.call(this)}Gr._configure=function(){Gr.alloc=Zi._Buffer_allocUnsafe,Gr.writeBytesBuffer=Zi.Buffer&&Zi.Buffer.prototype instanceof Uint8Array&&Zi.Buffer.prototype.set.name==="set"?function(t,n,r){n.set(t,r)}:function(t,n,r){if(t.copy)t.copy(n,r,0,t.length);else for(var i=0;i<t.length;)n[r++]=t[i++]}};Gr.prototype.bytes=function(t){Zi.isString(t)&&(t=Zi._Buffer_from(t,"base64"));var n=t.length>>>0;return this.uint32(n),n&&this._push(Gr.writeBytesBuffer,n,t),this};function j6(e,t,n){e.length<40?Zi.utf8.write(e,t,n):t.utf8Write?t.utf8Write(e,n):t.write(e,n)}Gr.prototype.string=function(t){var n=Zi.Buffer.byteLength(t);return this.uint32(n),n&&this._push(j6,n,t),this};Gr._configure()});var Jd=N((Zre,KI)=>{"use strict";KI.exports=ut;var dr=zr(),oA,YI=dr.LongBits,eq=dr.utf8;function fr(e,t){return RangeError("index out of range: "+e.pos+" + "+(t||1)+" > "+e.len)}function ut(e){this.buf=e,this.pos=0,this.len=e.length}var ZI=typeof Uint8Array<"u"?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new ut(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new ut(t);throw Error("illegal buffer")},$I=function(){return dr.Buffer?function(n){return(ut.create=function(i){return dr.Buffer.isBuffer(i)?new oA(i):ZI(i)})(n)}:ZI};ut.create=$I();ut.prototype._slice=dr.Array.prototype.subarray||dr.Array.prototype.slice;ut.prototype.uint32=function(){var t=4294967295;return function(){if(t=(this.buf[this.pos]&127)>>>0,this.buf[this.pos++]<128||(t=(t|(this.buf[this.pos]&127)<<7)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<14)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&127)<<21)>>>0,this.buf[this.pos++]<128)||(t=(t|(this.buf[this.pos]&15)<<28)>>>0,this.buf[this.pos++]<128))return t;if((this.pos+=5)>this.len)throw this.pos=this.len,fr(this,10);return t}}();ut.prototype.int32=function(){return this.uint32()|0};ut.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(t&1)|0};function sA(){var e=new YI(0,0),t=0;if(this.len-this.pos>4){for(;t<4;++t)if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e;if(e.lo=(e.lo|(this.buf[this.pos]&127)<<28)>>>0,e.hi=(e.hi|(this.buf[this.pos]&127)>>4)>>>0,this.buf[this.pos++]<128)return e;t=0}else{for(;t<3;++t){if(this.pos>=this.len)throw fr(this);if(e.lo=(e.lo|(this.buf[this.pos]&127)<<t*7)>>>0,this.buf[this.pos++]<128)return e}return e.lo=(e.lo|(this.buf[this.pos++]&127)<<t*7)>>>0,e}if(this.len-this.pos>4){for(;t<5;++t)if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}else for(;t<5;++t){if(this.pos>=this.len)throw fr(this);if(e.hi=(e.hi|(this.buf[this.pos]&127)<<t*7+3)>>>0,this.buf[this.pos++]<128)return e}throw Error("invalid varint encoding")}ut.prototype.bool=function(){return this.uint32()!==0};function qd(e,t){return(e[t-4]|e[t-3]<<8|e[t-2]<<16|e[t-1]<<24)>>>0}ut.prototype.fixed32=function(){if(this.pos+4>this.len)throw fr(this,4);return qd(this.buf,this.pos+=4)};ut.prototype.sfixed32=function(){if(this.pos+4>this.len)throw fr(this,4);return qd(this.buf,this.pos+=4)|0};function XI(){if(this.pos+8>this.len)throw fr(this,8);return new YI(qd(this.buf,this.pos+=4),qd(this.buf,this.pos+=4))}ut.prototype.float=function(){if(this.pos+4>this.len)throw fr(this,4);var t=dr.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t};ut.prototype.double=function(){if(this.pos+8>this.len)throw fr(this,4);var t=dr.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t};ut.prototype.bytes=function(){var t=this.uint32(),n=this.pos,r=this.pos+t;if(r>this.len)throw fr(this,t);if(this.pos+=t,Array.isArray(this.buf))return this.buf.slice(n,r);if(n===r){var i=dr.Buffer;return i?i.alloc(0):new this.buf.constructor(0)}return this._slice.call(this.buf,n,r)};ut.prototype.string=function(){var t=this.bytes();return eq.read(t,0,t.length)};ut.prototype.skip=function(t){if(typeof t=="number"){if(this.pos+t>this.len)throw fr(this,t);this.pos+=t}else do if(this.pos>=this.len)throw fr(this);while(this.buf[this.pos++]&128);return this};ut.prototype.skipType=function(e){switch(e){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;(e=this.uint32()&7)!==4;)this.skipType(e);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+e+" at offset "+this.pos)}return this};ut._configure=function(e){oA=e,ut.create=$I(),oA._configure();var t=dr.Long?"toLong":"toNumber";dr.merge(ut.prototype,{int64:function(){return sA.call(this)[t](!1)},uint64:function(){return sA.call(this)[t](!0)},sint64:function(){return sA.call(this).zzDecode()[t](!1)},fixed64:function(){return XI.call(this)[t](!0)},sfixed64:function(){return XI.call(this)[t](!1)}})}});var nS=N((Xre,tS)=>{"use strict";tS.exports=Za;var eS=Jd();(Za.prototype=Object.create(eS.prototype)).constructor=Za;var jI=zr();function Za(e){eS.call(this,e)}Za._configure=function(){jI.Buffer&&(Za.prototype._slice=jI.Buffer.prototype.slice)};Za.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))};Za._configure()});var iS=N((Yre,rS)=>{"use strict";rS.exports=Gu;var cA=zr();(Gu.prototype=Object.create(cA.EventEmitter.prototype)).constructor=Gu;function Gu(e,t,n){if(typeof e!="function")throw TypeError("rpcImpl must be a function");cA.EventEmitter.call(this),this.rpcImpl=e,this.requestDelimited=!!t,this.responseDelimited=!!n}Gu.prototype.rpcCall=function e(t,n,r,i,a){if(!i)throw TypeError("request must be specified");var s=this;if(!a)return cA.asPromise(e,s,t,n,r,i);if(!s.rpcImpl){setTimeout(function(){a(Error("already ended"))},0);return}try{return s.rpcImpl(t,n[s.requestDelimited?"encodeDelimited":"encode"](i).finish(),function(c,u){if(c)return s.emit("error",c,t),a(c);if(u===null){s.end(!0);return}if(!(u instanceof r))try{u=r[s.responseDelimited?"decodeDelimited":"decode"](u)}catch(d){return s.emit("error",d,t),a(d)}return s.emit("data",u,t),a(null,u)})}catch(o){s.emit("error",o,t),setTimeout(function(){a(o)},0);return}};Gu.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}});var uA=N(aS=>{"use strict";var tq=aS;tq.Service=iS()});var lA=N((Kre,sS)=>{"use strict";sS.exports={}});var dA=N(cS=>{"use strict";var fn=cS;fn.build="minimal";fn.Writer=Ud();fn.BufferWriter=HI();fn.Reader=Jd();fn.BufferReader=nS();fn.util=zr();fn.rpc=uA();fn.roots=lA();fn.configure=oS;function oS(){fn.util._configure(),fn.Writer._configure(fn.BufferWriter),fn.Reader._configure(fn.BufferReader)}oS()});var so=N((eie,uS)=>{"use strict";uS.exports=dA()});var lN=N(Kd=>{"use strict";Object.defineProperty(Kd,"__esModule",{value:!0});Kd.Metadata=void 0;Kd.Metadata=function(t){let n=new Map,r={set(i,a){if(i=Ic(i),Array.isArray(a))if(a.length===0)n.delete(i);else{for(let s of a)xA(i,s);n.set(i,i.endsWith("-bin")?a:[a.join(", ")])}else xA(i,a),n.set(i,[a]);return r},append(i,a){i=Ic(i),xA(i,a);let s=n.get(i);return s==null&&(s=[],n.set(i,s)),s.push(a),i.endsWith("-bin")||n.set(i,[s.join(", ")]),r},delete(i){i=Ic(i),n.delete(i)},get(i){var a;return i=Ic(i),(a=n.get(i))===null||a===void 0?void 0:a[0]},getAll(i){var a;return i=Ic(i),(a=n.get(i))!==null&&a!==void 0?a:[]},has(i){return i=Ic(i),n.has(i)},[Symbol.iterator](){return n[Symbol.iterator]()}};if(t!=null){let i=Pq(t)?t:Object.entries(t);for(let[a,s]of i)r.set(a,s)}return r};function Ic(e){return e.toLowerCase()}function xA(e,t){if(!/^[0-9a-z_.-]+$/.test(e))throw new Error(`Metadata key '${e}' contains illegal characters`);if(e.endsWith("-bin")){if(!(t instanceof Uint8Array))throw new Error(`Metadata key '${e}' ends with '-bin', thus it must have binary value`)}else{if(typeof t!="string")throw new Error(`Metadata key '${e}' doesn't end with '-bin', thus it must have string value`);if(!/^[ -~]*$/.test(t))throw new Error(`Metadata value '${t}' of key '${e}' contains illegal characters`)}}function Pq(e){return Symbol.iterator in e}});var jd=N(Zu=>{"use strict";Object.defineProperty(Zu,"__esModule",{value:!0});Zu.Status=void 0;var Dq;(function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(Dq=Zu.Status||(Zu.Status={}))});var fN=N(dN=>{"use strict";Object.defineProperty(dN,"__esModule",{value:!0})});var hN=N(pN=>{"use strict";Object.defineProperty(pN,"__esModule",{value:!0})});var gN=N(mN=>{"use strict";Object.defineProperty(mN,"__esModule",{value:!0})});var _N=N(ef=>{"use strict";Object.defineProperty(ef,"__esModule",{value:!0});ef.composeClientMiddleware=void 0;function Mq(e,t){return(n,r)=>t(Object.assign(Object.assign({},n),{next:(i,a)=>e(Object.assign(Object.assign({},n),{request:i}),a)}),r)}ef.composeClientMiddleware=Mq});var TA={};Vl(TA,{ExtendableError:()=>tf,default:()=>Fq});var tf,Fq,NA=ct(()=>{tf=class extends Error{constructor(...t){super(...t);var n=t.length>0&&typeof t[0]=="string"?t[0]:"";(this.name===void 0||this.name==="Error")&&Object.defineProperty(this,"name",{configurable:!0,enumerable:!1,value:this.constructor.name,writable:!0}),Object.defineProperty(this,"message",{configurable:!0,enumerable:!1,value:n,writable:!0}),Object.defineProperty(this,"stack",{configurable:!0,enumerable:!1,value:"",writable:!0}),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack===""&&(this.stack=new Error(n).stack)}},Fq=tf});var AN=N(nf=>{"use strict";Object.defineProperty(nf,"__esModule",{value:!0});nf.ClientError=void 0;var Lq=(NA(),nr(TA)),Qq=jd(),Sc=class extends Lq.ExtendableError{constructor(t,n,r){super(`${t} ${Qq.Status[n]}: ${r}`),this.path=t,this.code=n,this.details=r,this.name="ClientError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ClientError",{value:!0})}static[Symbol.hasInstance](t){return this!==Sc?this.prototype.isPrototypeOf(t):typeof t=="object"&&t!==null&&(t.constructor===Sc||t["@@nice-grpc:ClientError"]===!0||t.name==="ClientError"&&t["@@nice-grpc"]===!0)}};nf.ClientError=Sc});var vN=N(yN=>{"use strict";Object.defineProperty(yN,"__esModule",{value:!0})});var bN=N(wN=>{"use strict";Object.defineProperty(wN,"__esModule",{value:!0})});var EN=N(rf=>{"use strict";Object.defineProperty(rf,"__esModule",{value:!0});rf.composeServerMiddleware=void 0;function Uq(e,t){return(n,r)=>e(Object.assign(Object.assign({},n),{next:(i,a)=>t(Object.assign(Object.assign({},n),{request:i}),a)}),r)}rf.composeServerMiddleware=Uq});var CN=N(af=>{"use strict";Object.defineProperty(af,"__esModule",{value:!0});af.ServerError=void 0;var qq=(NA(),nr(TA)),Jq=jd(),xc=class extends qq.ExtendableError{constructor(t,n){super(`${Jq.Status[t]}: ${n}`),this.code=t,this.details=n,this.name="ServerError",Object.defineProperty(this,"@@nice-grpc",{value:!0}),Object.defineProperty(this,"@@nice-grpc:ServerError",{value:!0})}static[Symbol.hasInstance](t){return this!==xc?this.prototype.isPrototypeOf(t):typeof t=="object"&&t!==null&&(t.constructor===xc||t["@@nice-grpc:ServerError"]===!0||t.name==="ServerError"&&t["@@nice-grpc"]===!0)}};af.ServerError=xc});var qn=N(Ut=>{"use strict";var Vq=Ut&&Ut.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Cr=Ut&&Ut.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&Vq(t,e,n)};Object.defineProperty(Ut,"__esModule",{value:!0});Cr(lN(),Ut);Cr(jd(),Ut);Cr(fN(),Ut);Cr(hN(),Ut);Cr(gN(),Ut);Cr(_N(),Ut);Cr(AN(),Ut);Cr(vN(),Ut);Cr(bN(),Ut);Cr(EN(),Ut);Cr(CN(),Ut)});var Pe=N(Jn=>{"use strict";Object.defineProperty(Jn,"__esModule",{value:!0});Jn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=Jn.DEFAULT_MAX_SEND_MESSAGE_LENGTH=Jn.Propagate=Jn.LogVerbosity=Jn.Status=void 0;var IN;(function(e){e[e.OK=0]="OK",e[e.CANCELLED=1]="CANCELLED",e[e.UNKNOWN=2]="UNKNOWN",e[e.INVALID_ARGUMENT=3]="INVALID_ARGUMENT",e[e.DEADLINE_EXCEEDED=4]="DEADLINE_EXCEEDED",e[e.NOT_FOUND=5]="NOT_FOUND",e[e.ALREADY_EXISTS=6]="ALREADY_EXISTS",e[e.PERMISSION_DENIED=7]="PERMISSION_DENIED",e[e.RESOURCE_EXHAUSTED=8]="RESOURCE_EXHAUSTED",e[e.FAILED_PRECONDITION=9]="FAILED_PRECONDITION",e[e.ABORTED=10]="ABORTED",e[e.OUT_OF_RANGE=11]="OUT_OF_RANGE",e[e.UNIMPLEMENTED=12]="UNIMPLEMENTED",e[e.INTERNAL=13]="INTERNAL",e[e.UNAVAILABLE=14]="UNAVAILABLE",e[e.DATA_LOSS=15]="DATA_LOSS",e[e.UNAUTHENTICATED=16]="UNAUTHENTICATED"})(IN||(Jn.Status=IN={}));var SN;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.ERROR=2]="ERROR",e[e.NONE=3]="NONE"})(SN||(Jn.LogVerbosity=SN={}));var xN;(function(e){e[e.DEADLINE=1]="DEADLINE",e[e.CENSUS_STATS_CONTEXT=2]="CENSUS_STATS_CONTEXT",e[e.CENSUS_TRACING_CONTEXT=4]="CENSUS_TRACING_CONTEXT",e[e.CANCELLATION=8]="CANCELLATION",e[e.DEFAULTS=65535]="DEFAULTS"})(xN||(Jn.Propagate=xN={}));Jn.DEFAULT_MAX_SEND_MESSAGE_LENGTH=-1;Jn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH=4*1024*1024});var RA=N((hae,zq)=>{zq.exports={name:"@grpc/grpc-js",version:"1.10.10",description:"gRPC Library for Node - pure JS implementation",homepage:"https://grpc.io/",repository:"https://github.com/grpc/grpc-node/tree/master/packages/grpc-js",main:"build/src/index.js",engines:{node:">=12.10.0"},keywords:[],author:{name:"Google Inc."},types:"build/src/index.d.ts",license:"Apache-2.0",devDependencies:{"@types/gulp":"^4.0.17","@types/gulp-mocha":"0.0.37","@types/lodash":"^4.14.202","@types/mocha":"^10.0.6","@types/ncp":"^2.0.8","@types/node":">=20.11.20","@types/pify":"^5.0.4","@types/semver":"^7.5.8","@typescript-eslint/eslint-plugin":"^7.1.0","@typescript-eslint/parser":"^7.1.0","@typescript-eslint/typescript-estree":"^7.1.0","clang-format":"^1.8.0",eslint:"^8.42.0","eslint-config-prettier":"^8.8.0","eslint-plugin-node":"^11.1.0","eslint-plugin-prettier":"^4.2.1",execa:"^2.0.3",gulp:"^4.0.2","gulp-mocha":"^6.0.0",lodash:"^4.17.21",madge:"^5.0.1","mocha-jenkins-reporter":"^0.4.1",ncp:"^2.0.0",pify:"^4.0.1",prettier:"^2.8.8",rimraf:"^3.0.2",semver:"^7.6.0","ts-node":"^10.9.2",typescript:"^5.3.3"},contributors:[{name:"Google Inc."}],scripts:{build:"npm run compile",clean:"rimraf ./build",compile:"tsc -p .",format:'clang-format -i -style="{Language: JavaScript, BasedOnStyle: Google, ColumnLimit: 80}" src/*.ts test/*.ts',lint:"eslint src/*.ts test/*.ts",prepare:"npm run generate-types && npm run compile",test:"gulp test",check:"npm run lint",fix:"eslint --fix src/*.ts test/*.ts",pretest:"npm run generate-types && npm run generate-test-types && npm run compile",posttest:"npm run check && madge -c ./build/src","generate-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --includeDirs proto/ --include-dirs test/fixtures/ -O src/generated/ --grpcLib ../index channelz.proto","generate-test-types":"proto-loader-gen-types --keepCase --longs String --enums String --defaults --oneofs --includeComments --include-dirs test/fixtures/ -O test/generated/ --grpcLib ../../src/index test_service.proto"},dependencies:{"@grpc/proto-loader":"^0.7.13","@js-sdsl/ordered-map":"^4.4.2"},files:["src/**/*.ts","build/src/**/*.{js,d.ts,js.map}","proto/*.proto","LICENSE","deps/envoy-api/envoy/api/v2/**/*.proto","deps/envoy-api/envoy/config/**/*.proto","deps/envoy-api/envoy/service/**/*.proto","deps/envoy-api/envoy/type/**/*.proto","deps/udpa/udpa/**/*.proto","deps/googleapis/google/api/*.proto","deps/googleapis/google/rpc/*.proto","deps/protoc-gen-validate/validate/**/*.proto"]}});var it=N(Kt=>{"use strict";var kA,BA,OA,PA;Object.defineProperty(Kt,"__esModule",{value:!0});Kt.isTracerEnabled=Kt.trace=Kt.log=Kt.setLoggerVerbosity=Kt.setLogger=Kt.getLogger=void 0;var na=Pe(),Gq=Ae("process"),Wq=RA().version,Hq={error:(e,...t)=>{console.error("E "+e,...t)},info:(e,...t)=>{console.error("I "+e,...t)},debug:(e,...t)=>{console.error("D "+e,...t)}},es=Hq,Tc=na.LogVerbosity.ERROR,Zq=(BA=(kA=process.env.GRPC_NODE_VERBOSITY)!==null&&kA!==void 0?kA:process.env.GRPC_VERBOSITY)!==null&&BA!==void 0?BA:"";switch(Zq.toUpperCase()){case"DEBUG":Tc=na.LogVerbosity.DEBUG;break;case"INFO":Tc=na.LogVerbosity.INFO;break;case"ERROR":Tc=na.LogVerbosity.ERROR;break;case"NONE":Tc=na.LogVerbosity.NONE;break;default:}var Xq=()=>es;Kt.getLogger=Xq;var Yq=e=>{es=e};Kt.setLogger=Yq;var $q=e=>{Tc=e};Kt.setLoggerVerbosity=$q;var Kq=(e,...t)=>{let n;if(e>=Tc){switch(e){case na.LogVerbosity.DEBUG:n=es.debug;break;case na.LogVerbosity.INFO:n=es.info;break;case na.LogVerbosity.ERROR:n=es.error;break}n||(n=es.error),n&&n.bind(es)(...t)}};Kt.log=Kq;var jq=(PA=(OA=process.env.GRPC_NODE_TRACE)!==null&&OA!==void 0?OA:process.env.GRPC_TRACE)!==null&&PA!==void 0?PA:"",DA=new Set,TN=new Set;for(let e of jq.split(","))e.startsWith("-")?TN.add(e.substring(1)):DA.add(e);var eJ=DA.has("all");function tJ(e,t,n){NN(t)&&(0,Kt.log)(e,new Date().toISOString()+" | v"+Wq+" "+Gq.pid+" | "+t+" | "+n)}Kt.trace=tJ;function NN(e){return!TN.has(e)&&(eJ||DA.has(e))}Kt.isTracerEnabled=NN});var sf=N(Nc=>{"use strict";Object.defineProperty(Nc,"__esModule",{value:!0});Nc.getErrorCode=Nc.getErrorMessage=void 0;function nJ(e){return e instanceof Error?e.message:String(e)}Nc.getErrorMessage=nJ;function rJ(e){return typeof e=="object"&&e!==null&&"code"in e&&typeof e.code=="number"?e.code:null}Nc.getErrorCode=rJ});var jt=N(cf=>{"use strict";Object.defineProperty(cf,"__esModule",{value:!0});cf.Metadata=void 0;var iJ=it(),aJ=Pe(),sJ=sf(),oJ=/^[0-9a-z_.-]+$/,cJ=/^[ -~]*$/;function uJ(e){return oJ.test(e)}function lJ(e){return cJ.test(e)}function kN(e){return e.endsWith("-bin")}function dJ(e){return!e.startsWith("grpc-")}function of(e){return e.toLowerCase()}function RN(e,t){if(!uJ(e))throw new Error('Metadata key "'+e+'" contains illegal characters');if(t!=null)if(kN(e)){if(!Buffer.isBuffer(t))throw new Error("keys that end with '-bin' must have Buffer values")}else{if(Buffer.isBuffer(t))throw new Error("keys that don't end with '-bin' must have String values");if(!lJ(t))throw new Error('Metadata string value "'+t+'" contains illegal characters')}}var Rc=class{constructor(t={}){this.internalRepr=new Map,this.options=t}set(t,n){t=of(t),RN(t,n),this.internalRepr.set(t,[n])}add(t,n){t=of(t),RN(t,n);let r=this.internalRepr.get(t);r===void 0?this.internalRepr.set(t,[n]):r.push(n)}remove(t){t=of(t),this.internalRepr.delete(t)}get(t){return t=of(t),this.internalRepr.get(t)||[]}getMap(){let t={};for(let[n,r]of this.internalRepr)if(r.length>0){let i=r[0];t[n]=Buffer.isBuffer(i)?Buffer.from(i):i}return t}clone(){let t=new Rc(this.options),n=t.internalRepr;for(let[r,i]of this.internalRepr){let a=i.map(s=>Buffer.isBuffer(s)?Buffer.from(s):s);n.set(r,a)}return t}merge(t){for(let[n,r]of t.internalRepr){let i=(this.internalRepr.get(n)||[]).concat(r);this.internalRepr.set(n,i)}}setOptions(t){this.options=t}getOptions(){return this.options}toHttp2Headers(){let t={};for(let[n,r]of this.internalRepr)t[n]=r.map(fJ);return t}toJSON(){let t={};for(let[n,r]of this.internalRepr)t[n]=r;return t}static fromHttp2Headers(t){let n=new Rc;for(let r of Object.keys(t)){if(r.charAt(0)===":")continue;let i=t[r];try{kN(r)?Array.isArray(i)?i.forEach(a=>{n.add(r,Buffer.from(a,"base64"))}):i!==void 0&&(dJ(r)?i.split(",").forEach(a=>{n.add(r,Buffer.from(a.trim(),"base64"))}):n.add(r,Buffer.from(i,"base64"))):Array.isArray(i)?i.forEach(a=>{n.add(r,a)}):i!==void 0&&n.add(r,i)}catch(a){let s=`Failed to add metadata entry ${r}: ${i}. ${(0,sJ.getErrorMessage)(a)}. For more information see https://github.com/grpc/grpc-node/issues/1173`;(0,iJ.log)(aJ.LogVerbosity.ERROR,s)}}return n}};cf.Metadata=Rc;var fJ=e=>Buffer.isBuffer(e)?e.toString("base64"):e});var FA=N(uf=>{"use strict";Object.defineProperty(uf,"__esModule",{value:!0});uf.CallCredentials=void 0;var MA=jt();function pJ(e){return"getRequestHeaders"in e&&typeof e.getRequestHeaders=="function"}var ra=class{static createFromMetadataGenerator(t){return new Xu(t)}static createFromGoogleCredential(t){return ra.createFromMetadataGenerator((n,r)=>{let i;pJ(t)?i=t.getRequestHeaders(n.service_url):i=new Promise((a,s)=>{t.getRequestMetadata(n.service_url,(o,c)=>{if(o){s(o);return}if(!c){s(new Error("Headers not set by metadata plugin"));return}a(c)})}),i.then(a=>{let s=new MA.Metadata;for(let o of Object.keys(a))s.add(o,a[o]);r(null,s)},a=>{r(a)})})}static createEmpty(){return new Yu}};uf.CallCredentials=ra;var kc=class extends ra{constructor(t){super(),this.creds=t}async generateMetadata(t){let n=new MA.Metadata,r=await Promise.all(this.creds.map(i=>i.generateMetadata(t)));for(let i of r)n.merge(i);return n}compose(t){return new kc(this.creds.concat([t]))}_equals(t){return this===t?!0:t instanceof kc?this.creds.every((n,r)=>n._equals(t.creds[r])):!1}},Xu=class extends ra{constructor(t){super(),this.metadataGenerator=t}generateMetadata(t){return new Promise((n,r)=>{this.metadataGenerator(t,(i,a)=>{a!==void 0?n(a):r(i)})})}compose(t){return new kc([this,t])}_equals(t){return this===t?!0:t instanceof Xu?this.metadataGenerator===t.metadataGenerator:!1}},Yu=class extends ra{generateMetadata(t){return Promise.resolve(new MA.Metadata)}compose(t){return t}_equals(t){return t instanceof Yu}}});var QA=N(Bc=>{"use strict";Object.defineProperty(Bc,"__esModule",{value:!0});Bc.getDefaultRootsData=Bc.CIPHER_SUITES=void 0;var hJ=Ae("fs");Bc.CIPHER_SUITES=process.env.GRPC_SSL_CIPHER_SUITES;var BN=process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH,LA=null;function mJ(){return BN?(LA===null&&(LA=hJ.readFileSync(BN)),LA):null}Bc.getDefaultRootsData=mJ});var df=N(lf=>{"use strict";Object.defineProperty(lf,"__esModule",{value:!0});lf.ChannelCredentials=void 0;var gJ=Ae("tls"),_J=FA(),ON=QA();function UA(e,t){if(e&&!(e instanceof Buffer))throw new TypeError(`${t}, if provided, must be a Buffer.`)}var Oc=class{constructor(t){this.callCredentials=t||_J.CallCredentials.createEmpty()}_getCallCredentials(){return this.callCredentials}static createSsl(t,n,r,i){var a;if(UA(t,"Root certificate"),UA(n,"Private key"),UA(r,"Certificate chain"),n&&!r)throw new Error("Private key must be given with accompanying certificate chain");if(!n&&r)throw new Error("Certificate chain must be given with accompanying private key");let s=(0,gJ.createSecureContext)({ca:(a=t??(0,ON.getDefaultRootsData)())!==null&&a!==void 0?a:void 0,key:n??void 0,cert:r??void 0,ciphers:ON.CIPHER_SUITES});return new Pc(s,i??{})}static createFromSecureContext(t,n){return new Pc(t,n??{})}static createInsecure(){return new $u}};lf.ChannelCredentials=Oc;var $u=class extends Oc{constructor(){super()}compose(t){throw new Error("Cannot compose insecure credentials")}_getConnectionOptions(){return null}_isSecure(){return!1}_equals(t){return t instanceof $u}},Pc=class extends Oc{constructor(t,n){super(),this.secureContext=t,this.verifyOptions=n,this.connectionOptions={secureContext:t},n?.checkServerIdentity&&(this.connectionOptions.checkServerIdentity=n.checkServerIdentity)}compose(t){let n=this.callCredentials.compose(t);return new Dc(this,n)}_getConnectionOptions(){return Object.assign({},this.connectionOptions)}_isSecure(){return!0}_equals(t){return this===t?!0:t instanceof Pc?this.secureContext===t.secureContext&&this.verifyOptions.checkServerIdentity===t.verifyOptions.checkServerIdentity:!1}},Dc=class extends Oc{constructor(t,n){super(n),this.channelCredentials=t}compose(t){let n=this.callCredentials.compose(t);return new Dc(this.channelCredentials,n)}_getConnectionOptions(){return this.channelCredentials._getConnectionOptions()}_isSecure(){return!0}_equals(t){return this===t?!0:t instanceof Dc?this.channelCredentials._equals(t.channelCredentials)&&this.callCredentials._equals(t.callCredentials):!1}}});var ts=N(Ot=>{"use strict";Object.defineProperty(Ot,"__esModule",{value:!0});Ot.selectLbConfigFromList=Ot.getDefaultConfig=Ot.parseLoadBalancingConfig=Ot.isLoadBalancerNameRegistered=Ot.createLoadBalancer=Ot.registerDefaultLoadBalancerType=Ot.registerLoadBalancerType=Ot.createChildChannelControlHelper=void 0;var AJ=it(),yJ=Pe();function vJ(e,t){var n,r,i,a,s,o,c,u,d,p;return{createSubchannel:(r=(n=t.createSubchannel)===null||n===void 0?void 0:n.bind(t))!==null&&r!==void 0?r:e.createSubchannel.bind(e),updateState:(a=(i=t.updateState)===null||i===void 0?void 0:i.bind(t))!==null&&a!==void 0?a:e.updateState.bind(e),requestReresolution:(o=(s=t.requestReresolution)===null||s===void 0?void 0:s.bind(t))!==null&&o!==void 0?o:e.requestReresolution.bind(e),addChannelzChild:(u=(c=t.addChannelzChild)===null||c===void 0?void 0:c.bind(t))!==null&&u!==void 0?u:e.addChannelzChild.bind(e),removeChannelzChild:(p=(d=t.removeChannelzChild)===null||d===void 0?void 0:d.bind(t))!==null&&p!==void 0?p:e.removeChannelzChild.bind(e)}}Ot.createChildChannelControlHelper=vJ;var ia={},Ku=null;function wJ(e,t,n){ia[e]={LoadBalancer:t,LoadBalancingConfig:n}}Ot.registerLoadBalancerType=wJ;function bJ(e){Ku=e}Ot.registerDefaultLoadBalancerType=bJ;function EJ(e,t,n){let r=e.getLoadBalancerName();return r in ia?new ia[r].LoadBalancer(t,n):null}Ot.createLoadBalancer=EJ;function CJ(e){return e in ia}Ot.isLoadBalancerNameRegistered=CJ;function PN(e){let t=Object.keys(e);if(t.length!==1)throw new Error("Provided load balancing config has multiple conflicting entries");let n=t[0];if(n in ia)try{return ia[n].LoadBalancingConfig.createFromJson(e[n])}catch(r){throw new Error(`${n}: ${r.message}`)}else throw new Error(`Unrecognized load balancing config name ${n}`)}Ot.parseLoadBalancingConfig=PN;function IJ(){if(!Ku)throw new Error("No default load balancer type registered");return new ia[Ku].LoadBalancingConfig}Ot.getDefaultConfig=IJ;function SJ(e,t=!1){for(let n of e)try{return PN(n)}catch(r){(0,AJ.log)(yJ.LogVerbosity.DEBUG,"Config parsing failed with error",r.message);continue}return t&&Ku?new ia[Ku].LoadBalancingConfig:null}Ot.selectLbConfigFromList=SJ});var qA=N(aa=>{"use strict";Object.defineProperty(aa,"__esModule",{value:!0});aa.extractAndSelectServiceConfig=aa.validateServiceConfig=aa.validateRetryThrottling=void 0;var xJ=Ae("os"),ff=Pe(),pf=/^\d+(\.\d{1,9})?s$/,TJ="node";function NJ(e){if("service"in e&&e.service!==""){if(typeof e.service!="string")throw new Error(`Invalid method config name: invalid service: expected type string, got ${typeof e.service}`);if("method"in e&&e.method!==""){if(typeof e.method!="string")throw new Error(`Invalid method config name: invalid method: expected type string, got ${typeof e.service}`);return{service:e.service,method:e.method}}else return{service:e.service}}else{if("method"in e&&e.method!==void 0)throw new Error("Invalid method config name: method set with empty or unset service");return{}}}function RJ(e){if(!("maxAttempts"in e)||!Number.isInteger(e.maxAttempts)||e.maxAttempts<2)throw new Error("Invalid method config retry policy: maxAttempts must be an integer at least 2");if(!("initialBackoff"in e)||typeof e.initialBackoff!="string"||!pf.test(e.initialBackoff))throw new Error("Invalid method config retry policy: initialBackoff must be a string consisting of a positive integer followed by s");if(!("maxBackoff"in e)||typeof e.maxBackoff!="string"||!pf.test(e.maxBackoff))throw new Error("Invalid method config retry policy: maxBackoff must be a string consisting of a positive integer followed by s");if(!("backoffMultiplier"in e)||typeof e.backoffMultiplier!="number"||e.backoffMultiplier<=0)throw new Error("Invalid method config retry policy: backoffMultiplier must be a number greater than 0");if(!("retryableStatusCodes"in e&&Array.isArray(e.retryableStatusCodes)))throw new Error("Invalid method config retry policy: retryableStatusCodes is required");if(e.retryableStatusCodes.length===0)throw new Error("Invalid method config retry policy: retryableStatusCodes must be non-empty");for(let t of e.retryableStatusCodes)if(typeof t=="number"){if(!Object.values(ff.Status).includes(t))throw new Error("Invalid method config retry policy: retryableStatusCodes value not in status code range")}else if(typeof t=="string"){if(!Object.values(ff.Status).includes(t.toUpperCase()))throw new Error("Invalid method config retry policy: retryableStatusCodes value not a status code name")}else throw new Error("Invalid method config retry policy: retryableStatusCodes value must be a string or number");return{maxAttempts:e.maxAttempts,initialBackoff:e.initialBackoff,maxBackoff:e.maxBackoff,backoffMultiplier:e.backoffMultiplier,retryableStatusCodes:e.retryableStatusCodes}}function kJ(e){if(!("maxAttempts"in e)||!Number.isInteger(e.maxAttempts)||e.maxAttempts<2)throw new Error("Invalid method config hedging policy: maxAttempts must be an integer at least 2");if("hedgingDelay"in e&&(typeof e.hedgingDelay!="string"||!pf.test(e.hedgingDelay)))throw new Error("Invalid method config hedging policy: hedgingDelay must be a string consisting of a positive integer followed by s");if("nonFatalStatusCodes"in e&&Array.isArray(e.nonFatalStatusCodes))for(let n of e.nonFatalStatusCodes)if(typeof n=="number"){if(!Object.values(ff.Status).includes(n))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not in status code range")}else if(typeof n=="string"){if(!Object.values(ff.Status).includes(n.toUpperCase()))throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value not a status code name")}else throw new Error("Invlid method config hedging policy: nonFatalStatusCodes value must be a string or number");let t={maxAttempts:e.maxAttempts};return e.hedgingDelay&&(t.hedgingDelay=e.hedgingDelay),e.nonFatalStatusCodes&&(t.nonFatalStatusCodes=e.nonFatalStatusCodes),t}function BJ(e){var t;let n={name:[]};if(!("name"in e)||!Array.isArray(e.name))throw new Error("Invalid method config: invalid name array");for(let r of e.name)n.name.push(NJ(r));if("waitForReady"in e){if(typeof e.waitForReady!="boolean")throw new Error("Invalid method config: invalid waitForReady");n.waitForReady=e.waitForReady}if("timeout"in e)if(typeof e.timeout=="object"){if(!("seconds"in e.timeout)||typeof e.timeout.seconds!="number")throw new Error("Invalid method config: invalid timeout.seconds");if(!("nanos"in e.timeout)||typeof e.timeout.nanos!="number")throw new Error("Invalid method config: invalid timeout.nanos");n.timeout=e.timeout}else if(typeof e.timeout=="string"&&pf.test(e.timeout)){let r=e.timeout.substring(0,e.timeout.length-1).split(".");n.timeout={seconds:r[0]|0,nanos:((t=r[1])!==null&&t!==void 0?t:0)|0}}else throw new Error("Invalid method config: invalid timeout");if("maxRequestBytes"in e){if(typeof e.maxRequestBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");n.maxRequestBytes=e.maxRequestBytes}if("maxResponseBytes"in e){if(typeof e.maxResponseBytes!="number")throw new Error("Invalid method config: invalid maxRequestBytes");n.maxResponseBytes=e.maxResponseBytes}if("retryPolicy"in e){if("hedgingPolicy"in e)throw new Error("Invalid method config: retryPolicy and hedgingPolicy cannot both be specified");n.retryPolicy=RJ(e.retryPolicy)}else"hedgingPolicy"in e&&(n.hedgingPolicy=kJ(e.hedgingPolicy));return n}function DN(e){if(!("maxTokens"in e)||typeof e.maxTokens!="number"||e.maxTokens<=0||e.maxTokens>1e3)throw new Error("Invalid retryThrottling: maxTokens must be a number in (0, 1000]");if(!("tokenRatio"in e)||typeof e.tokenRatio!="number"||e.tokenRatio<=0)throw new Error("Invalid retryThrottling: tokenRatio must be a number greater than 0");return{maxTokens:+e.maxTokens.toFixed(3),tokenRatio:+e.tokenRatio.toFixed(3)}}aa.validateRetryThrottling=DN;function OJ(e){if(!(typeof e=="object"&&e!==null))throw new Error(`Invalid loadBalancingConfig: unexpected type ${typeof e}`);let t=Object.keys(e);if(t.length>1)throw new Error(`Invalid loadBalancingConfig: unexpected multiple keys ${t}`);if(t.length===0)throw new Error("Invalid loadBalancingConfig: load balancing policy name required");return{[t[0]]:e[t[0]]}}function MN(e){let t={loadBalancingConfig:[],methodConfig:[]};if("loadBalancingPolicy"in e)if(typeof e.loadBalancingPolicy=="string")t.loadBalancingPolicy=e.loadBalancingPolicy;else throw new Error("Invalid service config: invalid loadBalancingPolicy");if("loadBalancingConfig"in e)if(Array.isArray(e.loadBalancingConfig))for(let r of e.loadBalancingConfig)t.loadBalancingConfig.push(OJ(r));else throw new Error("Invalid service config: invalid loadBalancingConfig");if("methodConfig"in e&&Array.isArray(e.methodConfig))for(let r of e.methodConfig)t.methodConfig.push(BJ(r));"retryThrottling"in e&&(t.retryThrottling=DN(e.retryThrottling));let n=[];for(let r of t.methodConfig)for(let i of r.name){for(let a of n)if(i.service===a.service&&i.method===a.method)throw new Error(`Invalid service config: duplicate name ${i.service}/${i.method}`);n.push(i)}return t}aa.validateServiceConfig=MN;function PJ(e){if(!("serviceConfig"in e))throw new Error("Invalid service config choice: missing service config");let t={serviceConfig:MN(e.serviceConfig)};if("clientLanguage"in e)if(Array.isArray(e.clientLanguage)){t.clientLanguage=[];for(let r of e.clientLanguage)if(typeof r=="string")t.clientLanguage.push(r);else throw new Error("Invalid service config choice: invalid clientLanguage")}else throw new Error("Invalid service config choice: invalid clientLanguage");if("clientHostname"in e)if(Array.isArray(e.clientHostname)){t.clientHostname=[];for(let r of e.clientHostname)if(typeof r=="string")t.clientHostname.push(r);else throw new Error("Invalid service config choice: invalid clientHostname")}else throw new Error("Invalid service config choice: invalid clientHostname");if("percentage"in e)if(typeof e.percentage=="number"&&0<=e.percentage&&e.percentage<=100)t.percentage=e.percentage;else throw new Error("Invalid service config choice: invalid percentage");let n=["clientLanguage","percentage","clientHostname","serviceConfig"];for(let r in e)if(!n.includes(r))throw new Error(`Invalid service config choice: unexpected field ${r}`);return t}function DJ(e,t){if(!Array.isArray(e))throw new Error("Invalid service config list");for(let n of e){let r=PJ(n);if(!(typeof r.percentage=="number"&&t>r.percentage)){if(Array.isArray(r.clientHostname)){let i=!1;for(let a of r.clientHostname)a===xJ.hostname()&&(i=!0);if(!i)continue}if(Array.isArray(r.clientLanguage)){let i=!1;for(let a of r.clientLanguage)a===TJ&&(i=!0);if(!i)continue}return r.serviceConfig}}throw new Error("No matching service config found")}function MJ(e,t){for(let n of e)if(n.length>0&&n[0].startsWith("grpc_config=")){let r=n.join("").substring(12),i=JSON.parse(r);return DJ(i,t)}return null}aa.extractAndSelectServiceConfig=MJ});var Vn=N(hf=>{"use strict";Object.defineProperty(hf,"__esModule",{value:!0});hf.ConnectivityState=void 0;var FN;(function(e){e[e.IDLE=0]="IDLE",e[e.CONNECTING=1]="CONNECTING",e[e.READY=2]="READY",e[e.TRANSIENT_FAILURE=3]="TRANSIENT_FAILURE",e[e.SHUTDOWN=4]="SHUTDOWN"})(FN||(hf.ConnectivityState=FN={}))});var Sn=N(Yr=>{"use strict";Object.defineProperty(Yr,"__esModule",{value:!0});Yr.uriToString=Yr.combineHostPort=Yr.splitHostPort=Yr.parseUri=void 0;var FJ=/^(?:([A-Za-z0-9+.-]+):)?(?:\/\/([^/]*)\/)?(.+)$/;function LJ(e){let t=FJ.exec(e);return t===null?null:{scheme:t[1],authority:t[2],path:t[3]}}Yr.parseUri=LJ;var LN=/^\d+$/;function QJ(e){if(e.startsWith("[")){let t=e.indexOf("]");if(t===-1)return null;let n=e.substring(1,t);if(n.indexOf(":")===-1)return null;if(e.length>t+1)if(e[t+1]===":"){let r=e.substring(t+2);return LN.test(r)?{host:n,port:+r}:null}else return null;else return{host:n}}else{let t=e.split(":");return t.length===2?LN.test(t[1])?{host:t[0],port:+t[1]}:null:{host:e}}}Yr.splitHostPort=QJ;function UJ(e){return e.port===void 0?e.host:e.host.includes(":")?`[${e.host}]:${e.port}`:`${e.host}:${e.port}`}Yr.combineHostPort=UJ;function qJ(e){let t="";return e.scheme!==void 0&&(t+=e.scheme+":"),e.authority!==void 0&&(t+="//"+e.authority+"/"),t+=e.path,t}Yr.uriToString=qJ});var $r=N(zn=>{"use strict";Object.defineProperty(zn,"__esModule",{value:!0});zn.mapUriDefaultScheme=zn.getDefaultAuthority=zn.createResolver=zn.registerDefaultScheme=zn.registerResolver=void 0;var VA=Sn(),Mc={},JA=null;function JJ(e,t){Mc[e]=t}zn.registerResolver=JJ;function VJ(e){JA=e}zn.registerDefaultScheme=VJ;function zJ(e,t,n){if(e.scheme!==void 0&&e.scheme in Mc)return new Mc[e.scheme](e,t,n);throw new Error(`No resolver could be created for target ${(0,VA.uriToString)(e)}`)}zn.createResolver=zJ;function GJ(e){if(e.scheme!==void 0&&e.scheme in Mc)return Mc[e.scheme].getDefaultAuthority(e);throw new Error(`Invalid target ${(0,VA.uriToString)(e)}`)}zn.getDefaultAuthority=GJ;function WJ(e){return e.scheme===void 0||!(e.scheme in Mc)?JA!==null?{scheme:JA,authority:void 0,path:(0,VA.uriToString)(e)}:null:e}zn.mapUriDefaultScheme=WJ});var oa=N(sa=>{"use strict";Object.defineProperty(sa,"__esModule",{value:!0});sa.QueuePicker=sa.UnavailablePicker=sa.PickResultType=void 0;var HJ=jt(),ZJ=Pe(),mf;(function(e){e[e.COMPLETE=0]="COMPLETE",e[e.QUEUE=1]="QUEUE",e[e.TRANSIENT_FAILURE=2]="TRANSIENT_FAILURE",e[e.DROP=3]="DROP"})(mf||(sa.PickResultType=mf={}));var zA=class{constructor(t){this.status=Object.assign({code:ZJ.Status.UNAVAILABLE,details:"No connection established",metadata:new HJ.Metadata},t)}pick(t){return{pickResultType:mf.TRANSIENT_FAILURE,subchannel:null,status:this.status,onCallStarted:null,onCallEnded:null}}};sa.UnavailablePicker=zA;var GA=class{constructor(t,n){this.loadBalancer=t,this.childPicker=n,this.calledExitIdle=!1}pick(t){return this.calledExitIdle||(process.nextTick(()=>{this.loadBalancer.exitIdle()}),this.calledExitIdle=!0),this.childPicker?this.childPicker.pick(t):{pickResultType:mf.QUEUE,subchannel:null,status:null,onCallStarted:null,onCallEnded:null}}};sa.QueuePicker=GA});var ju=N(gf=>{"use strict";Object.defineProperty(gf,"__esModule",{value:!0});gf.BackoffTimeout=void 0;var XJ=1e3,YJ=1.6,$J=12e4,KJ=.2;function jJ(e,t){return Math.random()*(t-e)+e}var WA=class{constructor(t,n){this.callback=t,this.initialDelay=XJ,this.multiplier=YJ,this.maxDelay=$J,this.jitter=KJ,this.running=!1,this.hasRef=!0,this.startTime=new Date,this.endTime=new Date,n&&(n.initialDelay&&(this.initialDelay=n.initialDelay),n.multiplier&&(this.multiplier=n.multiplier),n.jitter&&(this.jitter=n.jitter),n.maxDelay&&(this.maxDelay=n.maxDelay)),this.nextDelay=this.initialDelay,this.timerId=setTimeout(()=>{},0),clearTimeout(this.timerId)}runTimer(t){var n,r;this.endTime=this.startTime,this.endTime.setMilliseconds(this.endTime.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),this.timerId=setTimeout(()=>{this.callback(),this.running=!1},t),this.hasRef||(r=(n=this.timerId).unref)===null||r===void 0||r.call(n)}runOnce(){this.running=!0,this.startTime=new Date,this.runTimer(this.nextDelay);let t=Math.min(this.nextDelay*this.multiplier,this.maxDelay),n=t*this.jitter;this.nextDelay=t+jJ(-n,n)}stop(){clearTimeout(this.timerId),this.running=!1}reset(){if(this.nextDelay=this.initialDelay,this.running){let t=new Date,n=this.startTime;n.setMilliseconds(n.getMilliseconds()+this.nextDelay),clearTimeout(this.timerId),t<n?this.runTimer(n.getTime()-t.getTime()):this.running=!1}}isRunning(){return this.running}ref(){var t,n;this.hasRef=!0,(n=(t=this.timerId).ref)===null||n===void 0||n.call(t)}unref(){var t,n;this.hasRef=!1,(n=(t=this.timerId).unref)===null||n===void 0||n.call(t)}getEndTime(){return this.endTime}};gf.BackoffTimeout=WA});var Af=N(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});_f.ChildLoadBalancerHandler=void 0;var eV=ts(),tV=Vn(),nV="child_load_balancer_helper",HA=class{constructor(t,n){this.channelControlHelper=t,this.options=n,this.currentChild=null,this.pendingChild=null,this.latestConfig=null,this.ChildPolicyHelper=class{constructor(r){this.parent=r,this.child=null}createSubchannel(r,i){return this.parent.channelControlHelper.createSubchannel(r,i)}updateState(r,i){var a;if(this.calledByPendingChild()){if(r===tV.ConnectivityState.CONNECTING)return;(a=this.parent.currentChild)===null||a===void 0||a.destroy(),this.parent.currentChild=this.parent.pendingChild,this.parent.pendingChild=null}else if(!this.calledByCurrentChild())return;this.parent.channelControlHelper.updateState(r,i)}requestReresolution(){var r;let i=(r=this.parent.pendingChild)!==null&&r!==void 0?r:this.parent.currentChild;this.child===i&&this.parent.channelControlHelper.requestReresolution()}setChild(r){this.child=r}addChannelzChild(r){this.parent.channelControlHelper.addChannelzChild(r)}removeChannelzChild(r){this.parent.channelControlHelper.removeChannelzChild(r)}calledByPendingChild(){return this.child===this.parent.pendingChild}calledByCurrentChild(){return this.child===this.parent.currentChild}}}configUpdateRequiresNewPolicyInstance(t,n){return t.getLoadBalancerName()!==n.getLoadBalancerName()}updateAddressList(t,n,r){let i;if(this.currentChild===null||this.latestConfig===null||this.configUpdateRequiresNewPolicyInstance(this.latestConfig,n)){let a=new this.ChildPolicyHelper(this),s=(0,eV.createLoadBalancer)(n,a,this.options);a.setChild(s),this.currentChild===null?(this.currentChild=s,i=this.currentChild):(this.pendingChild&&this.pendingChild.destroy(),this.pendingChild=s,i=this.pendingChild)}else this.pendingChild===null?i=this.currentChild:i=this.pendingChild;this.latestConfig=n,i.updateAddressList(t,n,r)}exitIdle(){this.currentChild&&(this.currentChild.exitIdle(),this.pendingChild&&this.pendingChild.exitIdle())}resetBackoff(){this.currentChild&&(this.currentChild.resetBackoff(),this.pendingChild&&this.pendingChild.resetBackoff())}destroy(){this.currentChild&&(this.currentChild.destroy(),this.currentChild=null),this.pendingChild&&(this.pendingChild.destroy(),this.pendingChild=null)}getTypeName(){return nV}};_f.ChildLoadBalancerHandler=HA});var UN=N(yf=>{"use strict";Object.defineProperty(yf,"__esModule",{value:!0});yf.ResolvingLoadBalancer=void 0;var rV=ts(),iV=qA(),hn=Vn(),aV=$r(),el=oa(),sV=ju(),ZA=Pe(),oV=jt(),cV=it(),uV=Pe(),lV=Sn(),dV=Af(),fV="resolving_load_balancer";function QN(e){cV.trace(uV.LogVerbosity.DEBUG,fV,e)}var pV=["SERVICE_AND_METHOD","SERVICE","EMPTY"];function hV(e,t,n,r){for(let i of n.name)switch(r){case"EMPTY":if(!i.service&&!i.method)return!0;break;case"SERVICE":if(i.service===e&&!i.method)return!0;break;case"SERVICE_AND_METHOD":if(i.service===e&&i.method===t)return!0}return!1}function mV(e,t,n,r){for(let i of n)if(hV(e,t,i,r))return i;return null}function gV(e){return function(n,r){var i,a;let s=n.split("/").filter(u=>u.length>0),o=(i=s[0])!==null&&i!==void 0?i:"",c=(a=s[1])!==null&&a!==void 0?a:"";if(e&&e.methodConfig)for(let u of pV){let d=mV(o,c,e.methodConfig,u);if(d)return{methodConfig:d,pickInformation:{},status:ZA.Status.OK,dynamicFilterFactories:[]}}return{methodConfig:{name:[]},pickInformation:{},status:ZA.Status.OK,dynamicFilterFactories:[]}}}var XA=class{constructor(t,n,r,i,a){this.target=t,this.channelControlHelper=n,this.onSuccessfulResolution=i,this.onFailedResolution=a,this.latestChildState=hn.ConnectivityState.IDLE,this.latestChildPicker=new el.QueuePicker(this),this.currentState=hn.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1,r["grpc.service_config"]?this.defaultServiceConfig=(0,iV.validateServiceConfig)(JSON.parse(r["grpc.service_config"])):this.defaultServiceConfig={loadBalancingConfig:[],methodConfig:[]},this.updateState(hn.ConnectivityState.IDLE,new el.QueuePicker(this)),this.childLoadBalancer=new dV.ChildLoadBalancerHandler({createSubchannel:n.createSubchannel.bind(n),requestReresolution:()=>{this.backoffTimeout.isRunning()?(QN("requestReresolution delayed by backoff timer until "+this.backoffTimeout.getEndTime().toISOString()),this.continueResolving=!0):this.updateResolution()},updateState:(o,c)=>{this.latestChildState=o,this.latestChildPicker=c,this.updateState(o,c)},addChannelzChild:n.addChannelzChild.bind(n),removeChannelzChild:n.removeChannelzChild.bind(n)},r),this.innerResolver=(0,aV.createResolver)(t,{onSuccessfulResolution:(o,c,u,d,p)=>{var h;this.backoffTimeout.stop(),this.backoffTimeout.reset();let _=null;c===null?u===null?(this.previousServiceConfig=null,_=this.defaultServiceConfig):this.previousServiceConfig===null?this.handleResolutionFailure(u):_=this.previousServiceConfig:(_=c,this.previousServiceConfig=c);let w=(h=_?.loadBalancingConfig)!==null&&h!==void 0?h:[],A=(0,rV.selectLbConfigFromList)(w,!0);if(A===null){this.handleResolutionFailure({code:ZA.Status.UNAVAILABLE,details:"All load balancer options in service config are not compatible",metadata:new oV.Metadata});return}this.childLoadBalancer.updateAddressList(o,A,p);let S=_??this.defaultServiceConfig;this.onSuccessfulResolution(S,d??gV(S))},onError:o=>{this.handleResolutionFailure(o)}},r);let s={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new sV.BackoffTimeout(()=>{this.continueResolving?(this.updateResolution(),this.continueResolving=!1):this.updateState(this.latestChildState,this.latestChildPicker)},s),this.backoffTimeout.unref()}updateResolution(){this.innerResolver.updateResolution(),this.currentState===hn.ConnectivityState.IDLE&&this.updateState(hn.ConnectivityState.CONNECTING,this.latestChildPicker),this.backoffTimeout.runOnce()}updateState(t,n){QN((0,lV.uriToString)(this.target)+" "+hn.ConnectivityState[this.currentState]+" -> "+hn.ConnectivityState[t]),t===hn.ConnectivityState.IDLE&&(n=new el.QueuePicker(this,n)),this.currentState=t,this.channelControlHelper.updateState(t,n)}handleResolutionFailure(t){this.latestChildState===hn.ConnectivityState.IDLE&&(this.updateState(hn.ConnectivityState.TRANSIENT_FAILURE,new el.UnavailablePicker(t)),this.onFailedResolution(t))}exitIdle(){(this.currentState===hn.ConnectivityState.IDLE||this.currentState===hn.ConnectivityState.TRANSIENT_FAILURE)&&(this.backoffTimeout.isRunning()?this.continueResolving=!0:this.updateResolution()),this.childLoadBalancer.exitIdle()}updateAddressList(t,n){throw new Error("updateAddressList not supported on ResolvingLoadBalancer")}resetBackoff(){this.backoffTimeout.reset(),this.childLoadBalancer.resetBackoff()}destroy(){this.childLoadBalancer.destroy(),this.innerResolver.destroy(),this.backoffTimeout.reset(),this.backoffTimeout.stop(),this.latestChildState=hn.ConnectivityState.IDLE,this.latestChildPicker=new el.QueuePicker(this),this.currentState=hn.ConnectivityState.IDLE,this.previousServiceConfig=null,this.continueResolving=!1}getTypeName(){return"resolving_load_balancer"}};yf.ResolvingLoadBalancer=XA});var qN=N(Fc=>{"use strict";Object.defineProperty(Fc,"__esModule",{value:!0});Fc.channelOptionsEqual=Fc.recognizedOptions=void 0;Fc.recognizedOptions={"grpc.ssl_target_name_override":!0,"grpc.primary_user_agent":!0,"grpc.secondary_user_agent":!0,"grpc.default_authority":!0,"grpc.keepalive_time_ms":!0,"grpc.keepalive_timeout_ms":!0,"grpc.keepalive_permit_without_calls":!0,"grpc.service_config":!0,"grpc.max_concurrent_streams":!0,"grpc.initial_reconnect_backoff_ms":!0,"grpc.max_reconnect_backoff_ms":!0,"grpc.use_local_subchannel_pool":!0,"grpc.max_send_message_length":!0,"grpc.max_receive_message_length":!0,"grpc.enable_http_proxy":!0,"grpc.enable_channelz":!0,"grpc.dns_min_time_between_resolutions_ms":!0,"grpc.enable_retries":!0,"grpc.per_rpc_retry_buffer_size":!0,"grpc.retry_buffer_size":!0,"grpc.max_connection_age_ms":!0,"grpc.max_connection_age_grace_ms":!0,"grpc-node.max_session_memory":!0,"grpc.service_config_disable_resolution":!0,"grpc.client_idle_timeout_ms":!0,"grpc-node.tls_enable_trace":!0,"grpc.lb.ring_hash.ring_size_cap":!0};function _V(e,t){let n=Object.keys(e).sort(),r=Object.keys(t).sort();if(n.length!==r.length)return!1;for(let i=0;i<n.length;i+=1)if(n[i]!==r[i]||e[n[i]]!==t[r[i]])return!1;return!0}Fc.channelOptionsEqual=_V});var Ir=N(Pt=>{"use strict";Object.defineProperty(Pt,"__esModule",{value:!0});Pt.EndpointMap=Pt.endpointHasAddress=Pt.endpointToString=Pt.endpointEqual=Pt.stringToSubchannelAddress=Pt.subchannelAddressToString=Pt.subchannelAddressEqual=Pt.isTcpSubchannelAddress=void 0;var JN=Ae("net");function nl(e){return"port"in e}Pt.isTcpSubchannelAddress=nl;function vf(e,t){return!e&&!t?!0:!e||!t?!1:nl(e)?nl(t)&&e.host===t.host&&e.port===t.port:!nl(t)&&e.path===t.path}Pt.subchannelAddressEqual=vf;function VN(e){return nl(e)?(0,JN.isIPv6)(e.host)?"["+e.host+"]:"+e.port:e.host+":"+e.port:e.path}Pt.subchannelAddressToString=VN;var AV=443;function yV(e,t){return(0,JN.isIP)(e)?{host:e,port:t??AV}:{path:e}}Pt.stringToSubchannelAddress=yV;function vV(e,t){if(e.addresses.length!==t.addresses.length)return!1;for(let n=0;n<e.addresses.length;n++)if(!vf(e.addresses[n],t.addresses[n]))return!1;return!0}Pt.endpointEqual=vV;function wV(e){return"["+e.addresses.map(VN).join(", ")+"]"}Pt.endpointToString=wV;function zN(e,t){for(let n of e.addresses)if(vf(n,t))return!0;return!1}Pt.endpointHasAddress=zN;function tl(e,t){if(e.addresses.length!==t.addresses.length)return!1;for(let n of e.addresses){let r=!1;for(let i of t.addresses)if(vf(n,i)){r=!0;break}if(!r)return!1}return!0}var YA=class{constructor(){this.map=new Set}get size(){return this.map.size}getForSubchannelAddress(t){for(let n of this.map)if(zN(n.key,t))return n.value}deleteMissing(t){let n=[];for(let r of this.map){let i=!1;for(let a of t)tl(a,r.key)&&(i=!0);i||(n.push(r.value),this.map.delete(r))}return n}get(t){for(let n of this.map)if(tl(t,n.key))return n.value}set(t,n){for(let r of this.map)if(tl(t,r.key)){r.value=n;return}this.map.add({key:t,value:n})}delete(t){for(let n of this.map)if(tl(t,n.key)){this.map.delete(n);return}}has(t){for(let n of this.map)if(tl(t,n.key))return!0;return!1}clear(){this.map.clear()}*keys(){for(let t of this.map)yield t.key}*values(){for(let t of this.map)yield t.value}*entries(){for(let t of this.map)yield[t.key,t.value]}};Pt.EndpointMap=YA});var WN={};Vl(WN,{OrderedMap:()=>NV});function Lc(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");$A(e,t);function n(){this.constructor=e}e.prototype=t===null?Object.create(t):(n.prototype=t.prototype,new n)}function bV(e,t){var n={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},r,i,a,s;return s={next:o(0),throw:o(1),return:o(2)},typeof Symbol=="function"&&(s[Symbol.iterator]=function(){return this}),s;function o(u){return function(d){return c([u,d])}}function c(u){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,u[0]&&(n=0)),n;)try{if(r=1,i&&(a=u[0]&2?i.return:u[0]?i.throw||((a=i.return)&&a.call(i),0):i.next)&&!(a=a.call(i,u[1])).done)return a;switch(i=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return n.label++,{value:u[1],done:!1};case 5:n.label++,i=u[1],u=[0];continue;case 7:u=n.ops.pop(),n.trys.pop();continue;default:if(a=n.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){n=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){n.label=u[1];break}if(u[0]===6&&n.label<a[1]){n.label=a[1],a=u;break}if(a&&n.label<a[2]){n.label=a[2],n.ops.push(u);break}a[2]&&n.ops.pop(),n.trys.pop();continue}u=t.call(e,n)}catch(d){u=[6,d],i=0}finally{r=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function ns(){throw new RangeError("Iterator access denied!")}var $A,GN,EV,CV,IV,SV,xV,TV,Ci,NV,HN=ct(()=>{$A=function(e,t){return $A=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(n,r){n.__proto__=r}||function(n,r){for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(n[i]=r[i])},$A(e,t)};GN=function(){function e(t,n,r){r===void 0&&(r=1),this.t=void 0,this.i=void 0,this.h=void 0,this.u=t,this.o=n,this.l=r}return e.prototype.v=function(){var t=this,n=t.h.h===t;if(n&&t.l===1)t=t.i;else if(t.t)for(t=t.t;t.i;)t=t.i;else{if(n)return t.h;for(var r=t.h;r.t===t;)t=r,r=t.h;t=r}return t},e.prototype.p=function(){var t=this;if(t.i){for(t=t.i;t.t;)t=t.t;return t}else{for(var n=t.h;n.i===t;)t=n,n=t.h;return t.i!==n?n:t}},e.prototype.T=function(){var t=this.h,n=this.i,r=n.t;return t.h===this?t.h=n:t.t===this?t.t=n:t.i=n,n.h=t,n.t=this,this.h=n,this.i=r,r&&(r.h=this),n},e.prototype.I=function(){var t=this.h,n=this.t,r=n.i;return t.h===this?t.h=n:t.t===this?t.t=n:t.i=n,n.h=t,n.i=this,this.h=n,this.t=r,r&&(r.h=this),n},e}(),EV=function(e){Lc(t,e);function t(){var n=e!==null&&e.apply(this,arguments)||this;return n.O=1,n}return t.prototype.T=function(){var n=e.prototype.T.call(this);return this.M(),n.M(),n},t.prototype.I=function(){var n=e.prototype.I.call(this);return this.M(),n.M(),n},t.prototype.M=function(){this.O=1,this.t&&(this.O+=this.t.O),this.i&&(this.O+=this.i.O)},t}(GN),CV=function(){function e(t){t===void 0&&(t=0),this.iteratorType=t}return e.prototype.equals=function(t){return this.C===t.C},e}(),IV=function(){function e(){this._=0}return Object.defineProperty(e.prototype,"length",{get:function(){return this._},enumerable:!1,configurable:!0}),e.prototype.size=function(){return this._},e.prototype.empty=function(){return this._===0},e}(),SV=function(e){Lc(t,e);function t(){return e!==null&&e.apply(this,arguments)||this}return t}(IV);xV=function(e){Lc(t,e);function t(n,r){n===void 0&&(n=function(a,s){return a<s?-1:a>s?1:0}),r===void 0&&(r=!1);var i=e.call(this)||this;return i.N=void 0,i.g=n,i.enableIndex=r,i.S=r?EV:GN,i.A=new i.S,i}return t.prototype.m=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);if(a<0)n=n.i;else if(a>0)i=n,n=n.t;else return n}return i},t.prototype.B=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);a<=0?n=n.i:(i=n,n=n.t)}return i},t.prototype.j=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);if(a<0)i=n,n=n.i;else if(a>0)n=n.t;else return n}return i},t.prototype.k=function(n,r){for(var i=this.A;n;){var a=this.g(n.u,r);a<0?(i=n,n=n.i):n=n.t}return i},t.prototype.R=function(n){for(;;){var r=n.h;if(r===this.A)return;if(n.l===1){n.l=0;return}if(n===r.t){var i=r.i;if(i.l===1)i.l=0,r.l=1,r===this.N?this.N=r.T():r.T();else if(i.i&&i.i.l===1){i.l=r.l,r.l=0,i.i.l=0,r===this.N?this.N=r.T():r.T();return}else i.t&&i.t.l===1?(i.l=1,i.t.l=0,i.I()):(i.l=1,n=r)}else{var i=r.t;if(i.l===1)i.l=0,r.l=1,r===this.N?this.N=r.I():r.I();else if(i.t&&i.t.l===1){i.l=r.l,r.l=0,i.t.l=0,r===this.N?this.N=r.I():r.I();return}else i.i&&i.i.l===1?(i.l=1,i.i.l=0,i.T()):(i.l=1,n=r)}}},t.prototype.G=function(n){if(this._===1){this.clear();return}for(var r=n;r.t||r.i;){if(r.i)for(r=r.i;r.t;)r=r.t;else r=r.t;var i=n.u;n.u=r.u,r.u=i;var a=n.o;n.o=r.o,r.o=a,n=r}this.A.t===r?this.A.t=r.h:this.A.i===r&&(this.A.i=r.h),this.R(r);var s=r.h;if(r===s.t?s.t=void 0:s.i=void 0,this._-=1,this.N.l=0,this.enableIndex)for(;s!==this.A;)s.O-=1,s=s.h},t.prototype.P=function(n){for(var r=typeof n=="number"?n:void 0,i=typeof n=="function"?n:void 0,a=typeof n>"u"?[]:void 0,s=0,o=this.N,c=[];c.length||o;)if(o)c.push(o),o=o.t;else{if(o=c.pop(),s===r)return o;a&&a.push(o),i&&i(o,s,this),s+=1,o=o.i}return a},t.prototype.q=function(n){for(;;){var r=n.h;if(r.l===0)return;var i=r.h;if(r===i.t){var a=i.i;if(a&&a.l===1){if(a.l=r.l=0,i===this.N)return;i.l=1,n=i;continue}else if(n===r.i){if(n.l=0,n.t&&(n.t.h=r),n.i&&(n.i.h=i),r.i=n.t,i.t=n.i,n.t=r,n.i=i,i===this.N)this.N=n,this.A.h=n;else{var s=i.h;s.t===i?s.t=n:s.i=n}n.h=i.h,r.h=n,i.h=n,i.l=1}else{r.l=0,i===this.N?this.N=i.I():i.I(),i.l=1;return}}else{var a=i.t;if(a&&a.l===1){if(a.l=r.l=0,i===this.N)return;i.l=1,n=i;continue}else if(n===r.t){if(n.l=0,n.t&&(n.t.h=i),n.i&&(n.i.h=r),i.i=n.t,r.t=n.i,n.t=i,n.i=r,i===this.N)this.N=n,this.A.h=n;else{var s=i.h;s.t===i?s.t=n:s.i=n}n.h=i.h,r.h=n,i.h=n,i.l=1}else{r.l=0,i===this.N?this.N=i.T():i.T(),i.l=1;return}}this.enableIndex&&(r.M(),i.M(),n.M());return}},t.prototype.D=function(n,r,i){if(this.N===void 0)return this._+=1,this.N=new this.S(n,r,0),this.N.h=this.A,this.A.h=this.A.t=this.A.i=this.N,this._;var a,s=this.A.t,o=this.g(s.u,n);if(o===0)return s.o=r,this._;if(o>0)s.t=new this.S(n,r),s.t.h=s,a=s.t,this.A.t=a;else{var c=this.A.i,u=this.g(c.u,n);if(u===0)return c.o=r,this._;if(u<0)c.i=new this.S(n,r),c.i.h=c,a=c.i,this.A.i=a;else{if(i!==void 0){var d=i.C;if(d!==this.A){var p=this.g(d.u,n);if(p===0)return d.o=r,this._;if(p>0){var h=d.v(),_=this.g(h.u,n);if(_===0)return h.o=r,this._;_<0&&(a=new this.S(n,r),h.i===void 0?(h.i=a,a.h=h):(d.t=a,a.h=d))}}}if(a===void 0)for(a=this.N;;){var w=this.g(a.u,n);if(w>0){if(a.t===void 0){a.t=new this.S(n,r),a.t.h=a,a=a.t;break}a=a.t}else if(w<0){if(a.i===void 0){a.i=new this.S(n,r),a.i.h=a,a=a.i;break}a=a.i}else return a.o=r,this._}}}if(this.enableIndex)for(var A=a.h;A!==this.A;)A.O+=1,A=A.h;return this.q(a),this._+=1,this._},t.prototype.F=function(n,r){for(;n;){var i=this.g(n.u,r);if(i<0)n=n.i;else if(i>0)n=n.t;else return n}return n||this.A},t.prototype.clear=function(){this._=0,this.N=void 0,this.A.h=void 0,this.A.t=this.A.i=void 0},t.prototype.updateKeyByIterator=function(n,r){var i=n.C;if(i===this.A&&ns(),this._===1)return i.u=r,!0;var a=i.p().u;if(i===this.A.t)return this.g(a,r)>0?(i.u=r,!0):!1;var s=i.v().u;return i===this.A.i?this.g(s,r)<0?(i.u=r,!0):!1:this.g(s,r)>=0||this.g(a,r)<=0?!1:(i.u=r,!0)},t.prototype.eraseElementByPos=function(n){if(n<0||n>this._-1)throw new RangeError;var r=this.P(n);return this.G(r),this._},t.prototype.eraseElementByKey=function(n){if(this._===0)return!1;var r=this.F(this.N,n);return r===this.A?!1:(this.G(r),!0)},t.prototype.eraseElementByIterator=function(n){var r=n.C;r===this.A&&ns();var i=r.i===void 0,a=n.iteratorType===0;return a?i&&n.next():(!i||r.t===void 0)&&n.next(),this.G(r),n},t.prototype.getHeight=function(){if(this._===0)return 0;function n(r){return r?Math.max(n(r.t),n(r.i))+1:0}return n(this.N)},t}(SV),TV=function(e){Lc(t,e);function t(n,r,i){var a=e.call(this,i)||this;return a.C=n,a.A=r,a.iteratorType===0?(a.pre=function(){return this.C===this.A.t&&ns(),this.C=this.C.v(),this},a.next=function(){return this.C===this.A&&ns(),this.C=this.C.p(),this}):(a.pre=function(){return this.C===this.A.i&&ns(),this.C=this.C.p(),this},a.next=function(){return this.C===this.A&&ns(),this.C=this.C.v(),this}),a}return Object.defineProperty(t.prototype,"index",{get:function(){var n=this.C,r=this.A.h;if(n===this.A)return r?r.O-1:0;var i=0;for(n.t&&(i+=n.t.O);n!==r;){var a=n.h;n===a.i&&(i+=1,a.t&&(i+=a.t.O)),n=a}return i},enumerable:!1,configurable:!0}),t.prototype.isAccessible=function(){return this.C!==this.A},t}(CV),Ci=function(e){Lc(t,e);function t(n,r,i,a){var s=e.call(this,n,r,a)||this;return s.container=i,s}return Object.defineProperty(t.prototype,"pointer",{get:function(){this.C===this.A&&ns();var n=this;return new Proxy([],{get:function(r,i){return i==="0"?n.C.u:i==="1"?n.C.o:(r[0]=n.C.u,r[1]=n.C.o,r[i])},set:function(r,i,a){if(i!=="1")throw new TypeError("prop must be 1");return n.C.o=a,!0}})},enumerable:!1,configurable:!0}),t.prototype.copy=function(){return new t(this.C,this.A,this.container,this.iteratorType)},t}(TV),NV=function(e){Lc(t,e);function t(n,r,i){n===void 0&&(n=[]);var a=e.call(this,r,i)||this,s=a;return n.forEach(function(o){s.setElement(o[0],o[1])}),a}return t.prototype.begin=function(){return new Ci(this.A.t||this.A,this.A,this)},t.prototype.end=function(){return new Ci(this.A,this.A,this)},t.prototype.rBegin=function(){return new Ci(this.A.i||this.A,this.A,this,1)},t.prototype.rEnd=function(){return new Ci(this.A,this.A,this,1)},t.prototype.front=function(){if(this._!==0){var n=this.A.t;return[n.u,n.o]}},t.prototype.back=function(){if(this._!==0){var n=this.A.i;return[n.u,n.o]}},t.prototype.lowerBound=function(n){var r=this.m(this.N,n);return new Ci(r,this.A,this)},t.prototype.upperBound=function(n){var r=this.B(this.N,n);return new Ci(r,this.A,this)},t.prototype.reverseLowerBound=function(n){var r=this.j(this.N,n);return new Ci(r,this.A,this)},t.prototype.reverseUpperBound=function(n){var r=this.k(this.N,n);return new Ci(r,this.A,this)},t.prototype.forEach=function(n){this.P(function(r,i,a){n([r.u,r.o],i,a)})},t.prototype.setElement=function(n,r,i){return this.D(n,r,i)},t.prototype.getElementByPos=function(n){if(n<0||n>this._-1)throw new RangeError;var r=this.P(n);return[r.u,r.o]},t.prototype.find=function(n){var r=this.F(this.N,n);return new Ci(r,this.A,this)},t.prototype.getElementByKey=function(n){var r=this.F(this.N,n);return r.o},t.prototype.union=function(n){var r=this;return n.forEach(function(i){r.setElement(i[0],i[1])}),this._},t.prototype[Symbol.iterator]=function(){var n,r,i,a;return bV(this,function(s){switch(s.label){case 0:n=this._,r=this.P(),i=0,s.label=1;case 1:return i<n?(a=r[i],[4,[a.u,a.o]]):[3,4];case 2:s.sent(),s.label=3;case 3:return++i,[3,1];case 4:return[2]}})},t}(xV)});var wf=N(Qc=>{"use strict";Object.defineProperty(Qc,"__esModule",{value:!0});Qc.addAdminServicesToServer=Qc.registerAdminService=void 0;var ZN=[];function RV(e,t){ZN.push({getServiceDefinition:e,getHandlers:t})}Qc.registerAdminService=RV;function kV(e){for(let{getServiceDefinition:t,getHandlers:n}of ZN)e.addService(t(),n())}Qc.addAdminServicesToServer=kV});var XN=N(Gn=>{"use strict";Object.defineProperty(Gn,"__esModule",{value:!0});Gn.ClientDuplexStreamImpl=Gn.ClientWritableStreamImpl=Gn.ClientReadableStreamImpl=Gn.ClientUnaryCallImpl=Gn.callErrorFromStatus=void 0;var BV=Ae("events"),ny=Ae("stream"),rl=Pe();function OV(e,t){let n=`${e.code} ${rl.Status[e.code]}: ${e.details}`,i=`${new Error(n).stack}
4
+ for call at
5
+ ${t}`;return Object.assign(new Error(n),e,{stack:i})}Gn.callErrorFromStatus=OV;var KA=class extends BV.EventEmitter{constructor(){super()}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}};Gn.ClientUnaryCallImpl=KA;var jA=class extends ny.Readable{constructor(t){super({objectMode:!0}),this.deserialize=t}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_read(t){var n;(n=this.call)===null||n===void 0||n.startRead()}};Gn.ClientReadableStreamImpl=jA;var ey=class extends ny.Writable{constructor(t){super({objectMode:!0}),this.serialize=t}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_write(t,n,r){var i;let a={callback:r},s=Number(n);Number.isNaN(s)||(a.flags=s),(i=this.call)===null||i===void 0||i.sendMessageWithContext(a,t)}_final(t){var n;(n=this.call)===null||n===void 0||n.halfClose(),t()}};Gn.ClientWritableStreamImpl=ey;var ty=class extends ny.Duplex{constructor(t,n){super({objectMode:!0}),this.serialize=t,this.deserialize=n}cancel(){var t;(t=this.call)===null||t===void 0||t.cancelWithStatus(rl.Status.CANCELLED,"Cancelled on client")}getPeer(){var t,n;return(n=(t=this.call)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:"unknown"}_read(t){var n;(n=this.call)===null||n===void 0||n.startRead()}_write(t,n,r){var i;let a={callback:r},s=Number(n);Number.isNaN(s)||(a.flags=s),(i=this.call)===null||i===void 0||i.sendMessageWithContext(a,t)}_final(t){var n;(n=this.call)===null||n===void 0||n.halfClose(),t()}};Gn.ClientDuplexStreamImpl=ty});var YN=N(Uc=>{"use strict";Object.defineProperty(Uc,"__esModule",{value:!0});Uc.InterceptingListenerImpl=Uc.isInterceptingListener=void 0;function PV(e){return e.onReceiveMetadata!==void 0&&e.onReceiveMetadata.length===1}Uc.isInterceptingListener=PV;var ry=class{constructor(t,n){this.listener=t,this.nextListener=n,this.processingMetadata=!1,this.hasPendingMessage=!1,this.processingMessage=!1,this.pendingStatus=null}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingStatus(){this.pendingStatus&&this.nextListener.onReceiveStatus(this.pendingStatus)}onReceiveMetadata(t){this.processingMetadata=!0,this.listener.onReceiveMetadata(t,n=>{this.processingMetadata=!1,this.nextListener.onReceiveMetadata(n),this.processPendingMessage(),this.processPendingStatus()})}onReceiveMessage(t){this.processingMessage=!0,this.listener.onReceiveMessage(t,n=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=n,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(n),this.processPendingStatus())})}onReceiveStatus(t){this.listener.onReceiveStatus(t,n=>{this.processingMetadata||this.processingMessage?this.pendingStatus=n:this.nextListener.onReceiveStatus(n)})}};Uc.InterceptingListenerImpl=ry});var ly=N(Wn=>{"use strict";Object.defineProperty(Wn,"__esModule",{value:!0});Wn.getInterceptingCall=Wn.InterceptingCall=Wn.RequesterBuilder=Wn.ListenerBuilder=Wn.InterceptorConfigurationError=void 0;var DV=jt(),$N=YN(),KN=Pe(),jN=sf(),rs=class extends Error{constructor(t){super(t),this.name="InterceptorConfigurationError",Error.captureStackTrace(this,rs)}};Wn.InterceptorConfigurationError=rs;var ay=class{constructor(){this.metadata=void 0,this.message=void 0,this.status=void 0}withOnReceiveMetadata(t){return this.metadata=t,this}withOnReceiveMessage(t){return this.message=t,this}withOnReceiveStatus(t){return this.status=t,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveStatus:this.status}}};Wn.ListenerBuilder=ay;var sy=class{constructor(){this.start=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withStart(t){return this.start=t,this}withSendMessage(t){return this.message=t,this}withHalfClose(t){return this.halfClose=t,this}withCancel(t){return this.cancel=t,this}build(){return{start:this.start,sendMessage:this.message,halfClose:this.halfClose,cancel:this.cancel}}};Wn.RequesterBuilder=sy;var iy={onReceiveMetadata:(e,t)=>{t(e)},onReceiveMessage:(e,t)=>{t(e)},onReceiveStatus:(e,t)=>{t(e)}},il={start:(e,t,n)=>{n(e,t)},sendMessage:(e,t)=>{t(e)},halfClose:e=>{e()},cancel:e=>{e()}},oy=class{constructor(t,n){var r,i,a,s;this.nextCall=t,this.processingMetadata=!1,this.pendingMessageContext=null,this.processingMessage=!1,this.pendingHalfClose=!1,n?this.requester={start:(r=n.start)!==null&&r!==void 0?r:il.start,sendMessage:(i=n.sendMessage)!==null&&i!==void 0?i:il.sendMessage,halfClose:(a=n.halfClose)!==null&&a!==void 0?a:il.halfClose,cancel:(s=n.cancel)!==null&&s!==void 0?s:il.cancel}:this.requester=il}cancelWithStatus(t,n){this.requester.cancel(()=>{this.nextCall.cancelWithStatus(t,n)})}getPeer(){return this.nextCall.getPeer()}processPendingMessage(){this.pendingMessageContext&&(this.nextCall.sendMessageWithContext(this.pendingMessageContext,this.pendingMessage),this.pendingMessageContext=null,this.pendingMessage=null)}processPendingHalfClose(){this.pendingHalfClose&&this.nextCall.halfClose()}start(t,n){var r,i,a,s,o,c;let u={onReceiveMetadata:(i=(r=n?.onReceiveMetadata)===null||r===void 0?void 0:r.bind(n))!==null&&i!==void 0?i:d=>{},onReceiveMessage:(s=(a=n?.onReceiveMessage)===null||a===void 0?void 0:a.bind(n))!==null&&s!==void 0?s:d=>{},onReceiveStatus:(c=(o=n?.onReceiveStatus)===null||o===void 0?void 0:o.bind(n))!==null&&c!==void 0?c:d=>{}};this.processingMetadata=!0,this.requester.start(t,u,(d,p)=>{var h,_,w;this.processingMetadata=!1;let A;if((0,$N.isInterceptingListener)(p))A=p;else{let S={onReceiveMetadata:(h=p.onReceiveMetadata)!==null&&h!==void 0?h:iy.onReceiveMetadata,onReceiveMessage:(_=p.onReceiveMessage)!==null&&_!==void 0?_:iy.onReceiveMessage,onReceiveStatus:(w=p.onReceiveStatus)!==null&&w!==void 0?w:iy.onReceiveStatus};A=new $N.InterceptingListenerImpl(S,u)}this.nextCall.start(d,A),this.processPendingMessage(),this.processPendingHalfClose()})}sendMessageWithContext(t,n){this.processingMessage=!0,this.requester.sendMessage(n,r=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessageContext=t,this.pendingMessage=n):(this.nextCall.sendMessageWithContext(t,r),this.processPendingHalfClose())})}sendMessage(t){this.sendMessageWithContext({},t)}startRead(){this.nextCall.startRead()}halfClose(){this.requester.halfClose(()=>{this.processingMetadata||this.processingMessage?this.pendingHalfClose=!0:this.nextCall.halfClose()})}};Wn.InterceptingCall=oy;function MV(e,t,n){var r,i;let a=(r=n.deadline)!==null&&r!==void 0?r:1/0,s=n.host,o=(i=n.parent)!==null&&i!==void 0?i:null,c=n.propagate_flags,u=n.credentials,d=e.createCall(t,a,s,o,c);return u&&d.setCredentials(u),d}var bf=class{constructor(t,n){this.call=t,this.methodDefinition=n}cancelWithStatus(t,n){this.call.cancelWithStatus(t,n)}getPeer(){return this.call.getPeer()}sendMessageWithContext(t,n){let r;try{r=this.methodDefinition.requestSerialize(n)}catch(i){this.call.cancelWithStatus(KN.Status.INTERNAL,`Request message serialization failure: ${(0,jN.getErrorMessage)(i)}`);return}this.call.sendMessageWithContext(t,r)}sendMessage(t){this.sendMessageWithContext({},t)}start(t,n){let r=null;this.call.start(t,{onReceiveMetadata:i=>{var a;(a=n?.onReceiveMetadata)===null||a===void 0||a.call(n,i)},onReceiveMessage:i=>{var a;let s;try{s=this.methodDefinition.responseDeserialize(i)}catch(o){r={code:KN.Status.INTERNAL,details:`Response message parsing error: ${(0,jN.getErrorMessage)(o)}`,metadata:new DV.Metadata},this.call.cancelWithStatus(r.code,r.details);return}(a=n?.onReceiveMessage)===null||a===void 0||a.call(n,s)},onReceiveStatus:i=>{var a,s;r?(a=n?.onReceiveStatus)===null||a===void 0||a.call(n,r):(s=n?.onReceiveStatus)===null||s===void 0||s.call(n,i)}})}startRead(){this.call.startRead()}halfClose(){this.call.halfClose()}},cy=class extends bf{constructor(t,n){super(t,n)}start(t,n){var r,i;let a=!1,s={onReceiveMetadata:(i=(r=n?.onReceiveMetadata)===null||r===void 0?void 0:r.bind(n))!==null&&i!==void 0?i:o=>{},onReceiveMessage:o=>{var c;a=!0,(c=n?.onReceiveMessage)===null||c===void 0||c.call(n,o)},onReceiveStatus:o=>{var c,u;a||(c=n?.onReceiveMessage)===null||c===void 0||c.call(n,null),(u=n?.onReceiveStatus)===null||u===void 0||u.call(n,o)}};super.start(t,s),this.call.startRead()}},uy=class extends bf{};function FV(e,t,n){let r=MV(e,n.path,t);return n.responseStream?new uy(r,n):new cy(r,n)}function LV(e,t,n,r){if(e.clientInterceptors.length>0&&e.clientInterceptorProviders.length>0)throw new rs("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(e.callInterceptors.length>0&&e.callInterceptorProviders.length>0)throw new rs("Both interceptors and interceptor_providers were passed as call options. Only one of these is allowed.");let i=[];e.callInterceptors.length>0||e.callInterceptorProviders.length>0?i=[].concat(e.callInterceptors,e.callInterceptorProviders.map(o=>o(t))).filter(o=>o):i=[].concat(e.clientInterceptors,e.clientInterceptorProviders.map(o=>o(t))).filter(o=>o);let a=Object.assign({},n,{method_definition:t});return i.reduceRight((o,c)=>u=>c(u,o),o=>FV(r,o,t))(a)}Wn.getInterceptingCall=LV});var py=N(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.Client=void 0;var Kr=XN(),QV=hy(),UV=Vn(),ca=Pe(),qc=jt(),Ef=ly(),Sr=Symbol(),Jc=Symbol(),Vc=Symbol(),Ii=Symbol();function dy(e){return typeof e=="function"}function zc(e){var t;return((t=e.stack)===null||t===void 0?void 0:t.split(`
6
+ `).slice(1).join(`
7
+ `))||"no stack trace available"}var fy=class{constructor(t,n,r={}){var i,a;if(r=Object.assign({},r),this[Jc]=(i=r.interceptors)!==null&&i!==void 0?i:[],delete r.interceptors,this[Vc]=(a=r.interceptor_providers)!==null&&a!==void 0?a:[],delete r.interceptor_providers,this[Jc].length>0&&this[Vc].length>0)throw new Error("Both interceptors and interceptor_providers were passed as options to the client constructor. Only one of these is allowed.");if(this[Ii]=r.callInvocationTransformer,delete r.callInvocationTransformer,r.channelOverride)this[Sr]=r.channelOverride;else if(r.channelFactoryOverride){let s=r.channelFactoryOverride;delete r.channelFactoryOverride,this[Sr]=s(t,n,r)}else this[Sr]=new QV.ChannelImplementation(t,n,r)}close(){this[Sr].close()}getChannel(){return this[Sr]}waitForReady(t,n){let r=i=>{if(i){n(new Error("Failed to connect before the deadline"));return}let a;try{a=this[Sr].getConnectivityState(!0)}catch{n(new Error("The channel has been closed"));return}if(a===UV.ConnectivityState.READY)n();else try{this[Sr].watchConnectivityState(a,t,r)}catch{n(new Error("The channel has been closed"))}};setImmediate(r)}checkOptionalUnaryResponseArguments(t,n,r){if(dy(t))return{metadata:new qc.Metadata,options:{},callback:t};if(dy(n))return t instanceof qc.Metadata?{metadata:t,options:{},callback:n}:{metadata:new qc.Metadata,options:t,callback:n};if(!(t instanceof qc.Metadata&&n instanceof Object&&dy(r)))throw new Error("Incorrect arguments passed");return{metadata:t,options:n,callback:r}}makeUnaryRequest(t,n,r,i,a,s,o){var c,u;let d=this.checkOptionalUnaryResponseArguments(a,s,o),p={path:t,requestStream:!1,responseStream:!1,requestSerialize:n,responseDeserialize:r},h={argument:i,metadata:d.metadata,call:new Kr.ClientUnaryCallImpl,channel:this[Sr],methodDefinition:p,callOptions:d.options,callback:d.callback};this[Ii]&&(h=this[Ii](h));let _=h.call,w={clientInterceptors:this[Jc],clientInterceptorProviders:this[Vc],callInterceptors:(c=h.callOptions.interceptors)!==null&&c!==void 0?c:[],callInterceptorProviders:(u=h.callOptions.interceptor_providers)!==null&&u!==void 0?u:[]},A=(0,Ef.getInterceptingCall)(w,h.methodDefinition,h.callOptions,h.channel);_.call=A;let S=null,b=!1,T=new Error;return A.start(h.metadata,{onReceiveMetadata:B=>{_.emit("metadata",B)},onReceiveMessage(B){S!==null&&A.cancelWithStatus(ca.Status.UNIMPLEMENTED,"Too many responses received"),S=B},onReceiveStatus(B){if(!b){if(b=!0,B.code===ca.Status.OK)if(S===null){let O=zc(T);h.callback((0,Kr.callErrorFromStatus)({code:ca.Status.UNIMPLEMENTED,details:"No message received",metadata:B.metadata},O))}else h.callback(null,S);else{let O=zc(T);h.callback((0,Kr.callErrorFromStatus)(B,O))}T=null,_.emit("status",B)}}}),A.sendMessage(i),A.halfClose(),_}makeClientStreamRequest(t,n,r,i,a,s){var o,c;let u=this.checkOptionalUnaryResponseArguments(i,a,s),d={path:t,requestStream:!0,responseStream:!1,requestSerialize:n,responseDeserialize:r},p={metadata:u.metadata,call:new Kr.ClientWritableStreamImpl(n),channel:this[Sr],methodDefinition:d,callOptions:u.options,callback:u.callback};this[Ii]&&(p=this[Ii](p));let h=p.call,_={clientInterceptors:this[Jc],clientInterceptorProviders:this[Vc],callInterceptors:(o=p.callOptions.interceptors)!==null&&o!==void 0?o:[],callInterceptorProviders:(c=p.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},w=(0,Ef.getInterceptingCall)(_,p.methodDefinition,p.callOptions,p.channel);h.call=w;let A=null,S=!1,b=new Error;return w.start(p.metadata,{onReceiveMetadata:T=>{h.emit("metadata",T)},onReceiveMessage(T){A!==null&&w.cancelWithStatus(ca.Status.UNIMPLEMENTED,"Too many responses received"),A=T,w.startRead()},onReceiveStatus(T){if(!S){if(S=!0,T.code===ca.Status.OK)if(A===null){let B=zc(b);p.callback((0,Kr.callErrorFromStatus)({code:ca.Status.UNIMPLEMENTED,details:"No message received",metadata:T.metadata},B))}else p.callback(null,A);else{let B=zc(b);p.callback((0,Kr.callErrorFromStatus)(T,B))}b=null,h.emit("status",T)}}}),h}checkMetadataAndOptions(t,n){let r,i;return t instanceof qc.Metadata?(r=t,n?i=n:i={}):(t?i=t:i={},r=new qc.Metadata),{metadata:r,options:i}}makeServerStreamRequest(t,n,r,i,a,s){var o,c;let u=this.checkMetadataAndOptions(a,s),d={path:t,requestStream:!1,responseStream:!0,requestSerialize:n,responseDeserialize:r},p={argument:i,metadata:u.metadata,call:new Kr.ClientReadableStreamImpl(r),channel:this[Sr],methodDefinition:d,callOptions:u.options};this[Ii]&&(p=this[Ii](p));let h=p.call,_={clientInterceptors:this[Jc],clientInterceptorProviders:this[Vc],callInterceptors:(o=p.callOptions.interceptors)!==null&&o!==void 0?o:[],callInterceptorProviders:(c=p.callOptions.interceptor_providers)!==null&&c!==void 0?c:[]},w=(0,Ef.getInterceptingCall)(_,p.methodDefinition,p.callOptions,p.channel);h.call=w;let A=!1,S=new Error;return w.start(p.metadata,{onReceiveMetadata(b){h.emit("metadata",b)},onReceiveMessage(b){h.push(b)},onReceiveStatus(b){if(!A){if(A=!0,h.push(null),b.code!==ca.Status.OK){let T=zc(S);h.emit("error",(0,Kr.callErrorFromStatus)(b,T))}S=null,h.emit("status",b)}}}),w.sendMessage(i),w.halfClose(),h}makeBidiStreamRequest(t,n,r,i,a){var s,o;let c=this.checkMetadataAndOptions(i,a),u={path:t,requestStream:!0,responseStream:!0,requestSerialize:n,responseDeserialize:r},d={metadata:c.metadata,call:new Kr.ClientDuplexStreamImpl(n,r),channel:this[Sr],methodDefinition:u,callOptions:c.options};this[Ii]&&(d=this[Ii](d));let p=d.call,h={clientInterceptors:this[Jc],clientInterceptorProviders:this[Vc],callInterceptors:(s=d.callOptions.interceptors)!==null&&s!==void 0?s:[],callInterceptorProviders:(o=d.callOptions.interceptor_providers)!==null&&o!==void 0?o:[]},_=(0,Ef.getInterceptingCall)(h,d.methodDefinition,d.callOptions,d.channel);p.call=_;let w=!1,A=new Error;return _.start(d.metadata,{onReceiveMetadata(S){p.emit("metadata",S)},onReceiveMessage(S){p.push(S)},onReceiveStatus(S){if(!w){if(w=!0,p.push(null),S.code!==ca.Status.OK){let b=zc(A);p.emit("error",(0,Kr.callErrorFromStatus)(S,b))}A=null,p.emit("status",S)}}}),p}};Cf.Client=fy});var gy=N(Gc=>{"use strict";Object.defineProperty(Gc,"__esModule",{value:!0});Gc.loadPackageDefinition=Gc.makeClientConstructor=void 0;var al=py(),qV={unary:al.Client.prototype.makeUnaryRequest,server_stream:al.Client.prototype.makeServerStreamRequest,client_stream:al.Client.prototype.makeClientStreamRequest,bidi:al.Client.prototype.makeBidiStreamRequest};function my(e){return["__proto__","prototype","constructor"].includes(e)}function eR(e,t,n){n||(n={});class r extends al.Client{}return Object.keys(e).forEach(i=>{if(my(i))return;let a=e[i],s;if(typeof i=="string"&&i.charAt(0)==="$")throw new Error("Method names cannot start with $");a.requestStream?a.responseStream?s="bidi":s="client_stream":a.responseStream?s="server_stream":s="unary";let o=a.requestSerialize,c=a.responseDeserialize,u=JV(qV[s],a.path,o,c);r.prototype[i]=u,Object.assign(r.prototype[i],a),a.originalName&&!my(a.originalName)&&(r.prototype[a.originalName]=r.prototype[i])}),r.service=e,r.serviceName=t,r}Gc.makeClientConstructor=eR;function JV(e,t,n,r){return function(...i){return e.call(this,t,n,r,...i)}}function VV(e){return"format"in e}function zV(e){let t={};for(let n in e)if(Object.prototype.hasOwnProperty.call(e,n)){let r=e[n],i=n.split(".");if(i.some(o=>my(o)))continue;let a=i[i.length-1],s=t;for(let o of i.slice(0,-1))s[o]||(s[o]={}),s=s[o];VV(r)?s[a]=r:s[a]=eR(r,a,{})}return t}Gc.loadPackageDefinition=zV});var IR=N((Qae,CR)=>{var GV=1/0,WV="[object Symbol]",HV=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ZV=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,Sf="\\ud800-\\udfff",cR="\\u0300-\\u036f\\ufe20-\\ufe23",uR="\\u20d0-\\u20f0",lR="\\u2700-\\u27bf",dR="a-z\\xdf-\\xf6\\xf8-\\xff",XV="\\xac\\xb1\\xd7\\xf7",YV="\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf",$V="\\u2000-\\u206f",KV=" \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",fR="A-Z\\xc0-\\xd6\\xd8-\\xde",pR="\\ufe0e\\ufe0f",hR=XV+YV+$V+KV,Ay="['\u2019]",jV="["+Sf+"]",tR="["+hR+"]",If="["+cR+uR+"]",mR="\\d+",ez="["+lR+"]",gR="["+dR+"]",_R="[^"+Sf+hR+mR+lR+dR+fR+"]",_y="\\ud83c[\\udffb-\\udfff]",tz="(?:"+If+"|"+_y+")",AR="[^"+Sf+"]",yy="(?:\\ud83c[\\udde6-\\uddff]){2}",vy="[\\ud800-\\udbff][\\udc00-\\udfff]",Wc="["+fR+"]",yR="\\u200d",nR="(?:"+gR+"|"+_R+")",nz="(?:"+Wc+"|"+_R+")",rR="(?:"+Ay+"(?:d|ll|m|re|s|t|ve))?",iR="(?:"+Ay+"(?:D|LL|M|RE|S|T|VE))?",vR=tz+"?",wR="["+pR+"]?",rz="(?:"+yR+"(?:"+[AR,yy,vy].join("|")+")"+wR+vR+")*",bR=wR+vR+rz,iz="(?:"+[ez,yy,vy].join("|")+")"+bR,az="(?:"+[AR+If+"?",If,yy,vy,jV].join("|")+")",sz=RegExp(Ay,"g"),oz=RegExp(If,"g"),cz=RegExp(_y+"(?="+_y+")|"+az+bR,"g"),uz=RegExp([Wc+"?"+gR+"+"+rR+"(?="+[tR,Wc,"$"].join("|")+")",nz+"+"+iR+"(?="+[tR,Wc+nR,"$"].join("|")+")",Wc+"?"+nR+"+"+rR,Wc+"+"+iR,mR,iz].join("|"),"g"),lz=RegExp("["+yR+Sf+cR+uR+pR+"]"),dz=/[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,fz={\u00C0:"A",\u00C1:"A",\u00C2:"A",\u00C3:"A",\u00C4:"A",\u00C5:"A",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u00E3:"a",\u00E4:"a",\u00E5:"a",\u00C7:"C",\u00E7:"c",\u00D0:"D",\u00F0:"d",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u00CB:"E",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u00EB:"e",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u00CF:"I",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u00EF:"i",\u00D1:"N",\u00F1:"n",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u00D5:"O",\u00D6:"O",\u00D8:"O",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u00F5:"o",\u00F6:"o",\u00F8:"o",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u00DC:"U",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u00FC:"u",\u00DD:"Y",\u00FD:"y",\u00FF:"y",\u00C6:"Ae",\u00E6:"ae",\u00DE:"Th",\u00FE:"th",\u00DF:"ss",\u0100:"A",\u0102:"A",\u0104:"A",\u0101:"a",\u0103:"a",\u0105:"a",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u010E:"D",\u0110:"D",\u010F:"d",\u0111:"d",\u0112:"E",\u0114:"E",\u0116:"E",\u0118:"E",\u011A:"E",\u0113:"e",\u0115:"e",\u0117:"e",\u0119:"e",\u011B:"e",\u011C:"G",\u011E:"G",\u0120:"G",\u0122:"G",\u011D:"g",\u011F:"g",\u0121:"g",\u0123:"g",\u0124:"H",\u0126:"H",\u0125:"h",\u0127:"h",\u0128:"I",\u012A:"I",\u012C:"I",\u012E:"I",\u0130:"I",\u0129:"i",\u012B:"i",\u012D:"i",\u012F:"i",\u0131:"i",\u0134:"J",\u0135:"j",\u0136:"K",\u0137:"k",\u0138:"k",\u0139:"L",\u013B:"L",\u013D:"L",\u013F:"L",\u0141:"L",\u013A:"l",\u013C:"l",\u013E:"l",\u0140:"l",\u0142:"l",\u0143:"N",\u0145:"N",\u0147:"N",\u014A:"N",\u0144:"n",\u0146:"n",\u0148:"n",\u014B:"n",\u014C:"O",\u014E:"O",\u0150:"O",\u014D:"o",\u014F:"o",\u0151:"o",\u0154:"R",\u0156:"R",\u0158:"R",\u0155:"r",\u0157:"r",\u0159:"r",\u015A:"S",\u015C:"S",\u015E:"S",\u0160:"S",\u015B:"s",\u015D:"s",\u015F:"s",\u0161:"s",\u0162:"T",\u0164:"T",\u0166:"T",\u0163:"t",\u0165:"t",\u0167:"t",\u0168:"U",\u016A:"U",\u016C:"U",\u016E:"U",\u0170:"U",\u0172:"U",\u0169:"u",\u016B:"u",\u016D:"u",\u016F:"u",\u0171:"u",\u0173:"u",\u0174:"W",\u0175:"w",\u0176:"Y",\u0177:"y",\u0178:"Y",\u0179:"Z",\u017B:"Z",\u017D:"Z",\u017A:"z",\u017C:"z",\u017E:"z",\u0132:"IJ",\u0133:"ij",\u0152:"Oe",\u0153:"oe",\u0149:"'n",\u017F:"ss"},pz=typeof global=="object"&&global&&global.Object===Object&&global,hz=typeof self=="object"&&self&&self.Object===Object&&self,mz=pz||hz||Function("return this")();function gz(e,t,n,r){var i=-1,a=e?e.length:0;for(r&&a&&(n=e[++i]);++i<a;)n=t(n,e[i],i,e);return n}function _z(e){return e.split("")}function Az(e){return e.match(HV)||[]}function yz(e){return function(t){return e?.[t]}}var vz=yz(fz);function ER(e){return lz.test(e)}function wz(e){return dz.test(e)}function bz(e){return ER(e)?Ez(e):_z(e)}function Ez(e){return e.match(cz)||[]}function Cz(e){return e.match(uz)||[]}var Iz=Object.prototype,Sz=Iz.toString,aR=mz.Symbol,sR=aR?aR.prototype:void 0,oR=sR?sR.toString:void 0;function xz(e,t,n){var r=-1,i=e.length;t<0&&(t=-t>i?0:i+t),n=n>i?i:n,n<0&&(n+=i),i=t>n?0:n-t>>>0,t>>>=0;for(var a=Array(i);++r<i;)a[r]=e[r+t];return a}function Tz(e){if(typeof e=="string")return e;if(Oz(e))return oR?oR.call(e):"";var t=e+"";return t=="0"&&1/e==-GV?"-0":t}function Nz(e,t,n){var r=e.length;return n=n===void 0?r:n,!t&&n>=r?e:xz(e,t,n)}function Rz(e){return function(t){t=xf(t);var n=ER(t)?bz(t):void 0,r=n?n[0]:t.charAt(0),i=n?Nz(n,1).join(""):t.slice(1);return r[e]()+i}}function kz(e){return function(t){return gz(Lz(Mz(t).replace(sz,"")),e,"")}}function Bz(e){return!!e&&typeof e=="object"}function Oz(e){return typeof e=="symbol"||Bz(e)&&Sz.call(e)==WV}function xf(e){return e==null?"":Tz(e)}var Pz=kz(function(e,t,n){return t=t.toLowerCase(),e+(n?Dz(t):t)});function Dz(e){return Fz(xf(e).toLowerCase())}function Mz(e){return e=xf(e),e&&e.replace(ZV,vz).replace(oz,"")}var Fz=Rz("toUpperCase");function Lz(e,t,n){return e=xf(e),t=n?void 0:t,t===void 0?wz(e)?Cz(e):Az(e):e.match(t)||[]}CR.exports=Pz});var xR=N((Uae,SR)=>{"use strict";SR.exports=wy;function wy(e,t){typeof e=="string"&&(t=e,e=void 0);var n=[];function r(a){if(typeof a!="string"){var s=i();if(wy.verbose&&console.log("codegen: "+s),s="return "+s,a){for(var o=Object.keys(a),c=new Array(o.length+1),u=new Array(o.length),d=0;d<o.length;)c[d]=o[d],u[d]=a[o[d++]];return c[d]=s,Function.apply(null,c).apply(null,u)}return Function(s)()}for(var p=new Array(arguments.length-1),h=0;h<p.length;)p[h]=arguments[++h];if(h=0,a=a.replace(/%([%dfijs])/g,function(w,A){var S=p[h++];switch(A){case"d":case"f":return String(Number(S));case"i":return String(Math.floor(S));case"j":return JSON.stringify(S);case"s":return String(S)}return"%"}),h!==p.length)throw Error("parameter count mismatch");return n.push(a),r}function i(a){return"function "+(a||t||"")+"("+(e&&e.join(",")||"")+`){
8
+ `+n.join(`
9
+ `)+`
10
+ }`}return r.toString=i,r}wy.verbose=!1});var NR=N((qae,TR)=>{"use strict";TR.exports=sl;var Qz=Y_(),Uz=$_(),by=Uz("fs");function sl(e,t,n){return typeof t=="function"?(n=t,t={}):t||(t={}),n?!t.xhr&&by&&by.readFile?by.readFile(e,function(i,a){return i&&typeof XMLHttpRequest<"u"?sl.xhr(e,t,n):i?n(i):n(null,t.binary?a:a.toString("utf8"))}):sl.xhr(e,t,n):Qz(sl,this,e,t)}sl.xhr=function(t,n,r){var i=new XMLHttpRequest;i.onreadystatechange=function(){if(i.readyState===4){if(i.status!==0&&i.status!==200)return r(Error("status "+i.status));if(n.binary){var s=i.response;if(!s){s=[];for(var o=0;o<i.responseText.length;++o)s.push(i.responseText.charCodeAt(o)&255)}return r(null,typeof Uint8Array<"u"?new Uint8Array(s):s)}return r(null,i.responseText)}},n.binary&&("overrideMimeType"in i&&i.overrideMimeType("text/plain; charset=x-user-defined"),i.responseType="arraybuffer"),i.open("GET",t),i.send()}});var BR=N(kR=>{"use strict";var Cy=kR,RR=Cy.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},Ey=Cy.normalize=function(t){t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/");var n=t.split("/"),r=RR(t),i="";r&&(i=n.shift()+"/");for(var a=0;a<n.length;)n[a]===".."?a>0&&n[a-1]!==".."?n.splice(--a,2):r?n.splice(a,1):++a:n[a]==="."?n.splice(a,1):++a;return i+n.join("/")};Cy.resolve=function(t,n,r){return r||(n=Ey(n)),RR(n)?n:(r||(t=Ey(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?Ey(t+"/"+n):n)}});var is=N(OR=>{"use strict";var ol=OR,qz=Dt(),Jz=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function cl(e,t){var n=0,r={};for(t|=0;n<e.length;)r[Jz[n+t]]=e[n++];return r}ol.basic=cl([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]);ol.defaults=cl([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",qz.emptyArray,null]);ol.long=cl([0,0,0,1,1],7);ol.mapKey=cl([0,0,0,5,5,0,0,0,1,1,0,2],2);ol.packed=cl([1,5,0,0,0,5,5,0,0,0,1,1,0])});var ua=N((zae,MR)=>{"use strict";MR.exports=Hn;var Tf=as();((Hn.prototype=Object.create(Tf.prototype)).constructor=Hn).className="Field";var PR=xr(),DR=is(),_t=Dt(),Iy,Vz=/^required|optional|repeated$/;Hn.fromJSON=function(t,n){return new Hn(t,n.id,n.type,n.rule,n.extend,n.options,n.comment)};function Hn(e,t,n,r,i,a,s){if(_t.isObject(r)?(s=i,a=r,r=i=void 0):_t.isObject(i)&&(s=a,a=i,i=void 0),Tf.call(this,e,a),!_t.isInteger(t)||t<0)throw TypeError("id must be a non-negative integer");if(!_t.isString(n))throw TypeError("type must be a string");if(r!==void 0&&!Vz.test(r=r.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(i!==void 0&&!_t.isString(i))throw TypeError("extend must be a string");r==="proto3_optional"&&(r="optional"),this.rule=r&&r!=="optional"?r:void 0,this.type=n,this.id=t,this.extend=i||void 0,this.required=r==="required",this.optional=!this.required,this.repeated=r==="repeated",this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=_t.Long?DR.long[n]!==void 0:!1,this.bytes=n==="bytes",this.resolvedType=null,this.extensionField=null,this.declaringField=null,this._packed=null,this.comment=s}Object.defineProperty(Hn.prototype,"packed",{get:function(){return this._packed===null&&(this._packed=this.getOption("packed")!==!1),this._packed}});Hn.prototype.setOption=function(t,n,r){return t==="packed"&&(this._packed=null),Tf.prototype.setOption.call(this,t,n,r)};Hn.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return _t.toObject(["rule",this.rule!=="optional"&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",n?this.comment:void 0])};Hn.prototype.resolve=function(){if(this.resolved)return this;if((this.typeDefault=DR.defaults[this.type])===void 0?(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof Iy?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]):this.options&&this.options.proto3_optional&&(this.typeDefault=null),this.options&&this.options.default!=null&&(this.typeDefault=this.options.default,this.resolvedType instanceof PR&&typeof this.typeDefault=="string"&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&((this.options.packed===!0||this.options.packed!==void 0&&this.resolvedType&&!(this.resolvedType instanceof PR))&&delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=_t.Long.fromNumber(this.typeDefault,this.type.charAt(0)==="u"),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&typeof this.typeDefault=="string"){var t;_t.base64.test(this.typeDefault)?_t.base64.decode(this.typeDefault,t=_t.newBuffer(_t.base64.length(this.typeDefault)),0):_t.utf8.write(this.typeDefault,t=_t.newBuffer(_t.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=_t.emptyObject:this.repeated?this.defaultValue=_t.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof Iy&&(this.parent.ctor.prototype[this.name]=this.defaultValue),Tf.prototype.resolve.call(this)};Hn.d=function(t,n,r,i){return typeof n=="function"?n=_t.decorateType(n).name:n&&typeof n=="object"&&(n=_t.decorateEnum(n).name),function(s,o){_t.decorateType(s.constructor).add(new Hn(o,t,n,r,{default:i}))}};Hn._configure=function(t){Iy=t}});var Hc=N((Gae,QR)=>{"use strict";QR.exports=Zn;var Rf=as();((Zn.prototype=Object.create(Rf.prototype)).constructor=Zn).className="OneOf";var FR=ua(),Nf=Dt();function Zn(e,t,n,r){if(Array.isArray(t)||(n=t,t=void 0),Rf.call(this,e,n),!(t===void 0||Array.isArray(t)))throw TypeError("fieldNames must be an Array");this.oneof=t||[],this.fieldsArray=[],this.comment=r}Zn.fromJSON=function(t,n){return new Zn(t,n.oneof,n.options,n.comment)};Zn.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return Nf.toObject(["options",this.options,"oneof",this.oneof,"comment",n?this.comment:void 0])};function LR(e){if(e.parent)for(var t=0;t<e.fieldsArray.length;++t)e.fieldsArray[t].parent||e.parent.add(e.fieldsArray[t])}Zn.prototype.add=function(t){if(!(t instanceof FR))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,LR(this),this};Zn.prototype.remove=function(t){if(!(t instanceof FR))throw TypeError("field must be a Field");var n=this.fieldsArray.indexOf(t);if(n<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(n,1),n=this.oneof.indexOf(t.name),n>-1&&this.oneof.splice(n,1),t.partOf=null,this};Zn.prototype.onAdd=function(t){Rf.prototype.onAdd.call(this,t);for(var n=this,r=0;r<this.oneof.length;++r){var i=t.get(this.oneof[r]);i&&!i.partOf&&(i.partOf=n,n.fieldsArray.push(i))}LR(this)};Zn.prototype.onRemove=function(t){for(var n=0,r;n<this.fieldsArray.length;++n)(r=this.fieldsArray[n]).parent&&r.parent.remove(r);Rf.prototype.onRemove.call(this,t)};Zn.d=function(){for(var t=new Array(arguments.length),n=0;n<arguments.length;)t[n]=arguments[n++];return function(i,a){Nf.decorateType(i.constructor).add(new Zn(a,t)),Object.defineProperty(i,a,{get:Nf.oneOfGetter(t),set:Nf.oneOfSetter(t)})}}});var Yc=N((Wae,VR)=>{"use strict";VR.exports=Me;var Sy=as();((Me.prototype=Object.create(Sy.prototype)).constructor=Me).className="Namespace";var UR=ua(),kf=Dt(),zz=Hc(),Zc,ul,Xc;Me.fromJSON=function(t,n){return new Me(t,n.options).addJSON(n.nested)};function qR(e,t){if(e&&e.length){for(var n={},r=0;r<e.length;++r)n[e[r].name]=e[r].toJSON(t);return n}}Me.arrayToJSON=qR;Me.isReservedId=function(t,n){if(t){for(var r=0;r<t.length;++r)if(typeof t[r]!="string"&&t[r][0]<=n&&t[r][1]>n)return!0}return!1};Me.isReservedName=function(t,n){if(t){for(var r=0;r<t.length;++r)if(t[r]===n)return!0}return!1};function Me(e,t){Sy.call(this,e,t),this.nested=void 0,this._nestedArray=null}function JR(e){return e._nestedArray=null,e}Object.defineProperty(Me.prototype,"nestedArray",{get:function(){return this._nestedArray||(this._nestedArray=kf.toArray(this.nested))}});Me.prototype.toJSON=function(t){return kf.toObject(["options",this.options,"nested",qR(this.nestedArray,t)])};Me.prototype.addJSON=function(t){var n=this;if(t)for(var r=Object.keys(t),i=0,a;i<r.length;++i)a=t[r[i]],n.add((a.fields!==void 0?Zc.fromJSON:a.values!==void 0?Xc.fromJSON:a.methods!==void 0?ul.fromJSON:a.id!==void 0?UR.fromJSON:Me.fromJSON)(r[i],a));return this};Me.prototype.get=function(t){return this.nested&&this.nested[t]||null};Me.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof Xc)return this.nested[t].values;throw Error("no such enum: "+t)};Me.prototype.add=function(t){if(!(t instanceof UR&&t.extend!==void 0||t instanceof Zc||t instanceof zz||t instanceof Xc||t instanceof ul||t instanceof Me))throw TypeError("object must be a valid nested object");if(!this.nested)this.nested={};else{var n=this.get(t.name);if(n)if(n instanceof Me&&t instanceof Me&&!(n instanceof Zc||n instanceof ul)){for(var r=n.nestedArray,i=0;i<r.length;++i)t.add(r[i]);this.remove(n),this.nested||(this.nested={}),t.setOptions(n.options,!0)}else throw Error("duplicate name '"+t.name+"' in "+this)}return this.nested[t.name]=t,t.onAdd(this),JR(this)};Me.prototype.remove=function(t){if(!(t instanceof Sy))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),JR(this)};Me.prototype.define=function(t,n){if(kf.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&t[0]==="")throw Error("path must be relative");for(var r=this;t.length>0;){var i=t.shift();if(r.nested&&r.nested[i]){if(r=r.nested[i],!(r instanceof Me))throw Error("path conflicts with non-namespace objects")}else r.add(r=new Me(i))}return n&&r.addJSON(n),r};Me.prototype.resolveAll=function(){for(var t=this.nestedArray,n=0;n<t.length;)t[n]instanceof Me?t[n++].resolveAll():t[n++].resolve();return this.resolve()};Me.prototype.lookup=function(t,n,r){if(typeof n=="boolean"?(r=n,n=void 0):n&&!Array.isArray(n)&&(n=[n]),kf.isString(t)&&t.length){if(t===".")return this.root;t=t.split(".")}else if(!t.length)return this;if(t[0]==="")return this.root.lookup(t.slice(1),n);var i=this.get(t[0]);if(i){if(t.length===1){if(!n||n.indexOf(i.constructor)>-1)return i}else if(i instanceof Me&&(i=i.lookup(t.slice(1),n,!0)))return i}else for(var a=0;a<this.nestedArray.length;++a)if(this._nestedArray[a]instanceof Me&&(i=this._nestedArray[a].lookup(t,n,!0)))return i;return this.parent===null||r?null:this.parent.lookup(t,n)};Me.prototype.lookupType=function(t){var n=this.lookup(t,[Zc]);if(!n)throw Error("no such type: "+t);return n};Me.prototype.lookupEnum=function(t){var n=this.lookup(t,[Xc]);if(!n)throw Error("no such Enum '"+t+"' in "+this);return n};Me.prototype.lookupTypeOrEnum=function(t){var n=this.lookup(t,[Zc,Xc]);if(!n)throw Error("no such Type or Enum '"+t+"' in "+this);return n};Me.prototype.lookupService=function(t){var n=this.lookup(t,[ul]);if(!n)throw Error("no such Service '"+t+"' in "+this);return n};Me._configure=function(e,t,n){Zc=e,ul=t,Xc=n}});var Bf=N((Hae,zR)=>{"use strict";zR.exports=Si;var xy=ua();((Si.prototype=Object.create(xy.prototype)).constructor=Si).className="MapField";var Gz=is(),ll=Dt();function Si(e,t,n,r,i,a){if(xy.call(this,e,t,r,void 0,void 0,i,a),!ll.isString(n))throw TypeError("keyType must be a string");this.keyType=n,this.resolvedKeyType=null,this.map=!0}Si.fromJSON=function(t,n){return new Si(t,n.id,n.keyType,n.type,n.options,n.comment)};Si.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return ll.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",n?this.comment:void 0])};Si.prototype.resolve=function(){if(this.resolved)return this;if(Gz.mapKey[this.keyType]===void 0)throw Error("invalid key type: "+this.keyType);return xy.prototype.resolve.call(this)};Si.d=function(t,n,r){return typeof r=="function"?r=ll.decorateType(r).name:r&&typeof r=="object"&&(r=ll.decorateEnum(r).name),function(a,s){ll.decorateType(a.constructor).add(new Si(s,t,n,r))}}});var Of=N((Zae,GR)=>{"use strict";GR.exports=ss;var Ty=as();((ss.prototype=Object.create(Ty.prototype)).constructor=ss).className="Method";var $c=Dt();function ss(e,t,n,r,i,a,s,o,c){if($c.isObject(i)?(s=i,i=a=void 0):$c.isObject(a)&&(s=a,a=void 0),!(t===void 0||$c.isString(t)))throw TypeError("type must be a string");if(!$c.isString(n))throw TypeError("requestType must be a string");if(!$c.isString(r))throw TypeError("responseType must be a string");Ty.call(this,e,s),this.type=t||"rpc",this.requestType=n,this.requestStream=i?!0:void 0,this.responseType=r,this.responseStream=a?!0:void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=o,this.parsedOptions=c}ss.fromJSON=function(t,n){return new ss(t,n.type,n.requestType,n.responseType,n.requestStream,n.responseStream,n.options,n.comment,n.parsedOptions)};ss.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return $c.toObject(["type",this.type!=="rpc"&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",n?this.comment:void 0,"parsedOptions",this.parsedOptions])};ss.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),Ty.prototype.resolve.call(this))}});var Pf=N((Xae,HR)=>{"use strict";HR.exports=Xn;var la=Yc();((Xn.prototype=Object.create(la.prototype)).constructor=Xn).className="Service";var Ny=Of(),dl=Dt(),Wz=uA();function Xn(e,t){la.call(this,e,t),this.methods={},this._methodsArray=null}Xn.fromJSON=function(t,n){var r=new Xn(t,n.options);if(n.methods)for(var i=Object.keys(n.methods),a=0;a<i.length;++a)r.add(Ny.fromJSON(i[a],n.methods[i[a]]));return n.nested&&r.addJSON(n.nested),r.comment=n.comment,r};Xn.prototype.toJSON=function(t){var n=la.prototype.toJSON.call(this,t),r=t?!!t.keepComments:!1;return dl.toObject(["options",n&&n.options||void 0,"methods",la.arrayToJSON(this.methodsArray,t)||{},"nested",n&&n.nested||void 0,"comment",r?this.comment:void 0])};Object.defineProperty(Xn.prototype,"methodsArray",{get:function(){return this._methodsArray||(this._methodsArray=dl.toArray(this.methods))}});function WR(e){return e._methodsArray=null,e}Xn.prototype.get=function(t){return this.methods[t]||la.prototype.get.call(this,t)};Xn.prototype.resolveAll=function(){for(var t=this.methodsArray,n=0;n<t.length;++n)t[n].resolve();return la.prototype.resolve.call(this)};Xn.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof Ny?(this.methods[t.name]=t,t.parent=this,WR(this)):la.prototype.add.call(this,t)};Xn.prototype.remove=function(t){if(t instanceof Ny){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,WR(this)}return la.prototype.remove.call(this,t)};Xn.prototype.create=function(t,n,r){for(var i=new Wz.Service(t,n,r),a=0,s;a<this.methodsArray.length;++a){var o=dl.lcFirst((s=this._methodsArray[a]).resolve().name).replace(/[^$\w_]/g,"");i[o]=dl.codegen(["r","c"],dl.isReserved(o)?o+"_":o)("return this.rpcCall(m,q,s,r,c)")({m:s,q:s.resolvedRequestType.ctor,s:s.resolvedResponseType.ctor})}return i}});var Df=N((Yae,ZR)=>{"use strict";ZR.exports=jr;var Hz=zr();function jr(e){if(e)for(var t=Object.keys(e),n=0;n<t.length;++n)this[t[n]]=e[t[n]]}jr.create=function(t){return this.$type.create(t)};jr.encode=function(t,n){return this.$type.encode(t,n)};jr.encodeDelimited=function(t,n){return this.$type.encodeDelimited(t,n)};jr.decode=function(t){return this.$type.decode(t)};jr.decodeDelimited=function(t){return this.$type.decodeDelimited(t)};jr.verify=function(t){return this.$type.verify(t)};jr.fromObject=function(t){return this.$type.fromObject(t)};jr.toObject=function(t,n){return this.$type.toObject(t,n)};jr.prototype.toJSON=function(){return this.$type.toObject(this,Hz.toJSONOptions)}});var Ry=N(($ae,YR)=>{"use strict";YR.exports=Yz;var Zz=xr(),xi=is(),XR=Dt();function Xz(e){return"missing required '"+e.name+"'"}function Yz(e){var t=XR.codegen(["r","l"],e.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(e.fieldsArray.filter(function(o){return o.map}).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");e.group&&t("if((t&7)===4)")("break"),t("switch(t>>>3){");for(var n=0;n<e.fieldsArray.length;++n){var r=e._fieldsArray[n].resolve(),i=r.resolvedType instanceof Zz?"int32":r.type,a="m"+XR.safeProp(r.name);t("case %i: {",r.id),r.map?(t("if(%s===util.emptyObject)",a)("%s={}",a)("var c2 = r.uint32()+r.pos"),xi.defaults[r.keyType]!==void 0?t("k=%j",xi.defaults[r.keyType]):t("k=null"),xi.defaults[i]!==void 0?t("value=%j",xi.defaults[i]):t("value=null"),t("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",r.keyType)("case 2:"),xi.basic[i]===void 0?t("value=types[%i].decode(r,r.uint32())",n):t("value=r.%s()",i),t("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),xi.long[r.keyType]!==void 0?t('%s[typeof k==="object"?util.longToHash(k):k]=value',a):t("%s[k]=value",a)):r.repeated?(t("if(!(%s&&%s.length))",a,a)("%s=[]",a),xi.packed[i]!==void 0&&t("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",a,i)("}else"),xi.basic[i]===void 0?t(r.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",a,n):t("%s.push(r.%s())",a,i)):xi.basic[i]===void 0?t(r.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",a,n):t("%s=r.%s()",a,i),t("break")("}")}for(t("default:")("r.skipType(t&7)")("break")("}")("}"),n=0;n<e._fieldsArray.length;++n){var s=e._fieldsArray[n];s.required&&t("if(!m.hasOwnProperty(%j))",s.name)("throw util.ProtocolError(%j,{instance:m})",Xz(s))}return t("return m")}});var Oy=N((Kae,$R)=>{"use strict";$R.exports=jz;var $z=xr(),ky=Dt();function Yn(e,t){return e.name+": "+t+(e.repeated&&t!=="array"?"[]":e.map&&t!=="object"?"{k:"+e.keyType+"}":"")+" expected"}function By(e,t,n,r){if(t.resolvedType)if(t.resolvedType instanceof $z){e("switch(%s){",r)("default:")("return%j",Yn(t,"enum value"));for(var i=Object.keys(t.resolvedType.values),a=0;a<i.length;++a)e("case %i:",t.resolvedType.values[i[a]]);e("break")("}")}else e("{")("var e=types[%i].verify(%s);",n,r)("if(e)")("return%j+e",t.name+".")("}");else switch(t.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.isInteger(%s))",r)("return%j",Yn(t,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",r,r,r,r)("return%j",Yn(t,"integer|Long"));break;case"float":case"double":e('if(typeof %s!=="number")',r)("return%j",Yn(t,"number"));break;case"bool":e('if(typeof %s!=="boolean")',r)("return%j",Yn(t,"boolean"));break;case"string":e("if(!util.isString(%s))",r)("return%j",Yn(t,"string"));break;case"bytes":e('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',r,r,r)("return%j",Yn(t,"buffer"));break}return e}function Kz(e,t,n){switch(t.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":e("if(!util.key32Re.test(%s))",n)("return%j",Yn(t,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":e("if(!util.key64Re.test(%s))",n)("return%j",Yn(t,"integer|Long key"));break;case"bool":e("if(!util.key2Re.test(%s))",n)("return%j",Yn(t,"boolean key"));break}return e}function jz(e){var t=ky.codegen(["m"],e.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),n=e.oneofsArray,r={};n.length&&t("var p={}");for(var i=0;i<e.fieldsArray.length;++i){var a=e._fieldsArray[i].resolve(),s="m"+ky.safeProp(a.name);if(a.optional&&t("if(%s!=null&&m.hasOwnProperty(%j)){",s,a.name),a.map)t("if(!util.isObject(%s))",s)("return%j",Yn(a,"object"))("var k=Object.keys(%s)",s)("for(var i=0;i<k.length;++i){"),Kz(t,a,"k[i]"),By(t,a,i,s+"[k[i]]")("}");else if(a.repeated)t("if(!Array.isArray(%s))",s)("return%j",Yn(a,"array"))("for(var i=0;i<%s.length;++i){",s),By(t,a,i,s+"[i]")("}");else{if(a.partOf){var o=ky.safeProp(a.partOf.name);r[a.partOf.name]===1&&t("if(p%s===1)",o)("return%j",a.partOf.name+": multiple values"),r[a.partOf.name]=1,t("p%s=1",o)}By(t,a,i,s)}a.optional&&t("}")}return t("return null")}});var My=N(jR=>{"use strict";var KR=jR,fl=xr(),ei=Dt();function Py(e,t,n,r){var i=!1;if(t.resolvedType)if(t.resolvedType instanceof fl){e("switch(d%s){",r);for(var a=t.resolvedType.values,s=Object.keys(a),o=0;o<s.length;++o)a[s[o]]===t.typeDefault&&!i&&(e("default:")('if(typeof(d%s)==="number"){m%s=d%s;break}',r,r,r),t.repeated||e("break"),i=!0),e("case%j:",s[o])("case %i:",a[s[o]])("m%s=%j",r,a[s[o]])("break");e("}")}else e('if(typeof d%s!=="object")',r)("throw TypeError(%j)",t.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",r,n,r);else{var c=!1;switch(t.type){case"double":case"float":e("m%s=Number(d%s)",r,r);break;case"uint32":case"fixed32":e("m%s=d%s>>>0",r,r);break;case"int32":case"sint32":case"sfixed32":e("m%s=d%s|0",r,r);break;case"uint64":c=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",r,r,c)('else if(typeof d%s==="string")',r)("m%s=parseInt(d%s,10)",r,r)('else if(typeof d%s==="number")',r)("m%s=d%s",r,r)('else if(typeof d%s==="object")',r)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",r,r,r,c?"true":"");break;case"bytes":e('if(typeof d%s==="string")',r)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",r,r,r)("else if(d%s.length >= 0)",r)("m%s=d%s",r,r);break;case"string":e("m%s=String(d%s)",r,r);break;case"bool":e("m%s=Boolean(d%s)",r,r);break}}return e}KR.fromObject=function(t){var n=t.fieldsArray,r=ei.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!n.length)return r("return new this.ctor");r("var m=new this.ctor");for(var i=0;i<n.length;++i){var a=n[i].resolve(),s=ei.safeProp(a.name);a.map?(r("if(d%s){",s)('if(typeof d%s!=="object")',s)("throw TypeError(%j)",a.fullName+": object expected")("m%s={}",s)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",s),Py(r,a,i,s+"[ks[i]]")("}")("}")):a.repeated?(r("if(d%s){",s)("if(!Array.isArray(d%s))",s)("throw TypeError(%j)",a.fullName+": array expected")("m%s=[]",s)("for(var i=0;i<d%s.length;++i){",s),Py(r,a,i,s+"[i]")("}")("}")):(a.resolvedType instanceof fl||r("if(d%s!=null){",s),Py(r,a,i,s),a.resolvedType instanceof fl||r("}"))}return r("return m")};function Dy(e,t,n,r){if(t.resolvedType)t.resolvedType instanceof fl?e("d%s=o.enums===String?(types[%i].values[m%s]===undefined?m%s:types[%i].values[m%s]):m%s",r,n,r,r,n,r,r):e("d%s=types[%i].toObject(m%s,o)",r,n,r);else{var i=!1;switch(t.type){case"double":case"float":e("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",r,r,r,r);break;case"uint64":i=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":e('if(typeof m%s==="number")',r)("d%s=o.longs===String?String(m%s):m%s",r,r,r)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",r,r,r,r,i?"true":"",r);break;case"bytes":e("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",r,r,r,r,r);break;default:e("d%s=m%s",r,r);break}}return e}KR.toObject=function(t){var n=t.fieldsArray.slice().sort(ei.compareFieldsById);if(!n.length)return ei.codegen()("return {}");for(var r=ei.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),i=[],a=[],s=[],o=0;o<n.length;++o)n[o].partOf||(n[o].resolve().repeated?i:n[o].map?a:s).push(n[o]);if(i.length){for(r("if(o.arrays||o.defaults){"),o=0;o<i.length;++o)r("d%s=[]",ei.safeProp(i[o].name));r("}")}if(a.length){for(r("if(o.objects||o.defaults){"),o=0;o<a.length;++o)r("d%s={}",ei.safeProp(a[o].name));r("}")}if(s.length){for(r("if(o.defaults){"),o=0;o<s.length;++o){var c=s[o],u=ei.safeProp(c.name);if(c.resolvedType instanceof fl)r("d%s=o.enums===String?%j:%j",u,c.resolvedType.valuesById[c.typeDefault],c.typeDefault);else if(c.long)r("if(util.Long){")("var n=new util.Long(%i,%i,%j)",c.typeDefault.low,c.typeDefault.high,c.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",u)("}else")("d%s=o.longs===String?%j:%i",u,c.typeDefault.toString(),c.typeDefault.toNumber());else if(c.bytes){var d="["+Array.prototype.slice.call(c.typeDefault).join(",")+"]";r("if(o.bytes===String)d%s=%j",u,String.fromCharCode.apply(String,c.typeDefault))("else{")("d%s=%s",u,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",u,u)("}")}else r("d%s=%j",u,c.typeDefault)}r("}")}var p=!1;for(o=0;o<n.length;++o){var c=n[o],h=t._fieldsArray.indexOf(c),u=ei.safeProp(c.name);c.map?(p||(p=!0,r("var ks2")),r("if(m%s&&(ks2=Object.keys(m%s)).length){",u,u)("d%s={}",u)("for(var j=0;j<ks2.length;++j){"),Dy(r,c,h,u+"[ks2[j]]")("}")):c.repeated?(r("if(m%s&&m%s.length){",u,u)("d%s=[]",u)("for(var j=0;j<m%s.length;++j){",u),Dy(r,c,h,u+"[j]")("}")):(r("if(m%s!=null&&m.hasOwnProperty(%j)){",u,c.name),Dy(r,c,h,u),c.partOf&&r("if(o.oneofs)")("d%s=%j",ei.safeProp(c.partOf.name),c.name)),r("}")}return r("return d")}});var Fy=N(e2=>{"use strict";var eG=e2,tG=Df();eG[".google.protobuf.Any"]={fromObject:function(e){if(e&&e["@type"]){var t=e["@type"].substring(e["@type"].lastIndexOf("/")+1),n=this.lookup(t);if(n){var r=e["@type"].charAt(0)==="."?e["@type"].slice(1):e["@type"];return r.indexOf("/")===-1&&(r="/"+r),this.create({type_url:r,value:n.encode(n.fromObject(e)).finish()})}}return this.fromObject(e)},toObject:function(e,t){var n="type.googleapis.com/",r="",i="";if(t&&t.json&&e.type_url&&e.value){i=e.type_url.substring(e.type_url.lastIndexOf("/")+1),r=e.type_url.substring(0,e.type_url.lastIndexOf("/")+1);var a=this.lookup(i);a&&(e=a.decode(e.value))}if(!(e instanceof this.ctor)&&e instanceof tG){var s=e.$type.toObject(e,t),o=e.$type.fullName[0]==="."?e.$type.fullName.slice(1):e.$type.fullName;return r===""&&(r=n),i=r+o,s["@type"]=i,s}return this.toObject(e,t)}}});var Lf=N((tse,n2)=>{"use strict";n2.exports=Ye;var Tr=Yc();((Ye.prototype=Object.create(Tr.prototype)).constructor=Ye).className="Type";var nG=xr(),Uy=Hc(),Mf=ua(),rG=Bf(),iG=Pf(),Ly=Df(),Qy=Jd(),aG=Ud(),Xt=Dt(),sG=qy(),oG=Ry(),cG=Oy(),t2=My(),uG=Fy();function Ye(e,t){Tr.call(this,e,t),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this._fieldsById=null,this._fieldsArray=null,this._oneofsArray=null,this._ctor=null}Object.defineProperties(Ye.prototype,{fieldsById:{get:function(){if(this._fieldsById)return this._fieldsById;this._fieldsById={};for(var e=Object.keys(this.fields),t=0;t<e.length;++t){var n=this.fields[e[t]],r=n.id;if(this._fieldsById[r])throw Error("duplicate id "+r+" in "+this);this._fieldsById[r]=n}return this._fieldsById}},fieldsArray:{get:function(){return this._fieldsArray||(this._fieldsArray=Xt.toArray(this.fields))}},oneofsArray:{get:function(){return this._oneofsArray||(this._oneofsArray=Xt.toArray(this.oneofs))}},ctor:{get:function(){return this._ctor||(this.ctor=Ye.generateConstructor(this)())},set:function(e){var t=e.prototype;t instanceof Ly||((e.prototype=new Ly).constructor=e,Xt.merge(e.prototype,t)),e.$type=e.prototype.$type=this,Xt.merge(e,Ly,!0),this._ctor=e;for(var n=0;n<this.fieldsArray.length;++n)this._fieldsArray[n].resolve();var r={};for(n=0;n<this.oneofsArray.length;++n)r[this._oneofsArray[n].resolve().name]={get:Xt.oneOfGetter(this._oneofsArray[n].oneof),set:Xt.oneOfSetter(this._oneofsArray[n].oneof)};n&&Object.defineProperties(e.prototype,r)}}});Ye.generateConstructor=function(t){for(var n=Xt.codegen(["p"],t.name),r=0,i;r<t.fieldsArray.length;++r)(i=t._fieldsArray[r]).map?n("this%s={}",Xt.safeProp(i.name)):i.repeated&&n("this%s=[]",Xt.safeProp(i.name));return n("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")};function Ff(e){return e._fieldsById=e._fieldsArray=e._oneofsArray=null,delete e.encode,delete e.decode,delete e.verify,e}Ye.fromJSON=function(t,n){var r=new Ye(t,n.options);r.extensions=n.extensions,r.reserved=n.reserved;for(var i=Object.keys(n.fields),a=0;a<i.length;++a)r.add((typeof n.fields[i[a]].keyType<"u"?rG.fromJSON:Mf.fromJSON)(i[a],n.fields[i[a]]));if(n.oneofs)for(i=Object.keys(n.oneofs),a=0;a<i.length;++a)r.add(Uy.fromJSON(i[a],n.oneofs[i[a]]));if(n.nested)for(i=Object.keys(n.nested),a=0;a<i.length;++a){var s=n.nested[i[a]];r.add((s.id!==void 0?Mf.fromJSON:s.fields!==void 0?Ye.fromJSON:s.values!==void 0?nG.fromJSON:s.methods!==void 0?iG.fromJSON:Tr.fromJSON)(i[a],s))}return n.extensions&&n.extensions.length&&(r.extensions=n.extensions),n.reserved&&n.reserved.length&&(r.reserved=n.reserved),n.group&&(r.group=!0),n.comment&&(r.comment=n.comment),r};Ye.prototype.toJSON=function(t){var n=Tr.prototype.toJSON.call(this,t),r=t?!!t.keepComments:!1;return Xt.toObject(["options",n&&n.options||void 0,"oneofs",Tr.arrayToJSON(this.oneofsArray,t),"fields",Tr.arrayToJSON(this.fieldsArray.filter(function(i){return!i.declaringField}),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",n&&n.nested||void 0,"comment",r?this.comment:void 0])};Ye.prototype.resolveAll=function(){for(var t=this.fieldsArray,n=0;n<t.length;)t[n++].resolve();var r=this.oneofsArray;for(n=0;n<r.length;)r[n++].resolve();return Tr.prototype.resolveAll.call(this)};Ye.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null};Ye.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof Mf&&t.extend===void 0){if(this._fieldsById?this._fieldsById[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),Ff(this)}return t instanceof Uy?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),Ff(this)):Tr.prototype.add.call(this,t)};Ye.prototype.remove=function(t){if(t instanceof Mf&&t.extend===void 0){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),Ff(this)}if(t instanceof Uy){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),Ff(this)}return Tr.prototype.remove.call(this,t)};Ye.prototype.isReservedId=function(t){return Tr.isReservedId(this.reserved,t)};Ye.prototype.isReservedName=function(t){return Tr.isReservedName(this.reserved,t)};Ye.prototype.create=function(t){return new this.ctor(t)};Ye.prototype.setup=function(){for(var t=this.fullName,n=[],r=0;r<this.fieldsArray.length;++r)n.push(this._fieldsArray[r].resolve().resolvedType);this.encode=sG(this)({Writer:aG,types:n,util:Xt}),this.decode=oG(this)({Reader:Qy,types:n,util:Xt}),this.verify=cG(this)({types:n,util:Xt}),this.fromObject=t2.fromObject(this)({types:n,util:Xt}),this.toObject=t2.toObject(this)({types:n,util:Xt});var i=uG[t];if(i){var a=Object.create(this);a.fromObject=this.fromObject,this.fromObject=i.fromObject.bind(a),a.toObject=this.toObject,this.toObject=i.toObject.bind(a)}return this};Ye.prototype.encode=function(t,n){return this.setup().encode(t,n)};Ye.prototype.encodeDelimited=function(t,n){return this.encode(t,n&&n.len?n.fork():n).ldelim()};Ye.prototype.decode=function(t,n){return this.setup().decode(t,n)};Ye.prototype.decodeDelimited=function(t){return t instanceof Qy||(t=Qy.create(t)),this.decode(t,t.uint32())};Ye.prototype.verify=function(t){return this.setup().verify(t)};Ye.prototype.fromObject=function(t){return this.setup().fromObject(t)};Ye.prototype.toObject=function(t,n){return this.setup().toObject(t,n)};Ye.d=function(t){return function(r){Xt.decorateType(r,t)}}});var qf=N((nse,o2)=>{"use strict";o2.exports=xn;var Uf=Yc();((xn.prototype=Object.create(Uf.prototype)).constructor=xn).className="Root";var Vy=ua(),i2=xr(),lG=Hc(),da=Dt(),a2,Jy,pl;function xn(e){Uf.call(this,"",e),this.deferred=[],this.files=[]}xn.fromJSON=function(t,n){return n||(n=new xn),t.options&&n.setOptions(t.options),n.addJSON(t.nested)};xn.prototype.resolvePath=da.path.resolve;xn.prototype.fetch=da.fetch;function s2(){}xn.prototype.load=function e(t,n,r){typeof n=="function"&&(r=n,n=void 0);var i=this;if(!r)return da.asPromise(e,i,t,n);var a=r===s2;function s(_,w){if(r){if(a)throw _;var A=r;r=null,A(_,w)}}function o(_){var w=_.lastIndexOf("google/protobuf/");if(w>-1){var A=_.substring(w);if(A in pl)return A}return null}function c(_,w){try{if(da.isString(w)&&w.charAt(0)==="{"&&(w=JSON.parse(w)),!da.isString(w))i.setOptions(w.options).addJSON(w.nested);else{Jy.filename=_;var A=Jy(w,i,n),S,b=0;if(A.imports)for(;b<A.imports.length;++b)(S=o(A.imports[b])||i.resolvePath(_,A.imports[b]))&&u(S);if(A.weakImports)for(b=0;b<A.weakImports.length;++b)(S=o(A.weakImports[b])||i.resolvePath(_,A.weakImports[b]))&&u(S,!0)}}catch(T){s(T)}!a&&!d&&s(null,i)}function u(_,w){if(_=o(_)||_,!(i.files.indexOf(_)>-1)){if(i.files.push(_),_ in pl){a?c(_,pl[_]):(++d,setTimeout(function(){--d,c(_,pl[_])}));return}if(a){var A;try{A=da.fs.readFileSync(_).toString("utf8")}catch(S){w||s(S);return}c(_,A)}else++d,i.fetch(_,function(S,b){if(--d,!!r){if(S){w?d||s(null,i):s(S);return}c(_,b)}})}}var d=0;da.isString(t)&&(t=[t]);for(var p=0,h;p<t.length;++p)(h=i.resolvePath("",t[p]))&&u(h);if(a)return i;d||s(null,i)};xn.prototype.loadSync=function(t,n){if(!da.isNode)throw Error("not supported");return this.load(t,n,s2)};xn.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map(function(t){return"'extend "+t.extend+"' in "+t.parent.fullName}).join(", "));return Uf.prototype.resolveAll.call(this)};var Qf=/^[A-Z]/;function r2(e,t){var n=t.parent.lookup(t.extend);if(n){var r=new Vy(t.fullName,t.id,t.type,t.rule,void 0,t.options);return n.get(r.name)||(r.declaringField=t,t.extensionField=r,n.add(r)),!0}return!1}xn.prototype._handleAdd=function(t){if(t instanceof Vy)t.extend!==void 0&&!t.extensionField&&(r2(this,t)||this.deferred.push(t));else if(t instanceof i2)Qf.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof lG)){if(t instanceof a2)for(var n=0;n<this.deferred.length;)r2(this,this.deferred[n])?this.deferred.splice(n,1):++n;for(var r=0;r<t.nestedArray.length;++r)this._handleAdd(t._nestedArray[r]);Qf.test(t.name)&&(t.parent[t.name]=t)}};xn.prototype._handleRemove=function(t){if(t instanceof Vy){if(t.extend!==void 0)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var n=this.deferred.indexOf(t);n>-1&&this.deferred.splice(n,1)}}else if(t instanceof i2)Qf.test(t.name)&&delete t.parent[t.name];else if(t instanceof Uf){for(var r=0;r<t.nestedArray.length;++r)this._handleRemove(t._nestedArray[r]);Qf.test(t.name)&&delete t.parent[t.name]}};xn._configure=function(e,t,n){a2=e,Jy=t,pl=n}});var Dt=N((rse,u2)=>{"use strict";var mt=u2.exports=zr(),c2=lA(),zy,Gy;mt.codegen=xR();mt.fetch=NR();mt.path=BR();mt.fs=mt.inquire("fs");mt.toArray=function(t){if(t){for(var n=Object.keys(t),r=new Array(n.length),i=0;i<n.length;)r[i]=t[n[i++]];return r}return[]};mt.toObject=function(t){for(var n={},r=0;r<t.length;){var i=t[r++],a=t[r++];a!==void 0&&(n[i]=a)}return n};var dG=/\\/g,fG=/"/g;mt.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)};mt.safeProp=function(t){return!/^[$\w_]+$/.test(t)||mt.isReserved(t)?'["'+t.replace(dG,"\\\\").replace(fG,'\\"')+'"]':"."+t};mt.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var pG=/_([a-z])/g;mt.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(pG,function(n,r){return r.toUpperCase()})};mt.compareFieldsById=function(t,n){return t.id-n.id};mt.decorateType=function(t,n){if(t.$type)return n&&t.$type.name!==n&&(mt.decorateRoot.remove(t.$type),t.$type.name=n,mt.decorateRoot.add(t.$type)),t.$type;zy||(zy=Lf());var r=new zy(n||t.name);return mt.decorateRoot.add(r),r.ctor=t,Object.defineProperty(t,"$type",{value:r,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:r,enumerable:!1}),r};var hG=0;mt.decorateEnum=function(t){if(t.$type)return t.$type;Gy||(Gy=xr());var n=new Gy("Enum"+hG++,t);return mt.decorateRoot.add(n),Object.defineProperty(t,"$type",{value:n,enumerable:!1}),n};mt.setProperty=function(t,n,r){function i(a,s,o){var c=s.shift();if(c==="__proto__"||c==="prototype")return a;if(s.length>0)a[c]=i(a[c]||{},s,o);else{var u=a[c];u&&(o=[].concat(u).concat(o)),a[c]=o}return a}if(typeof t!="object")throw TypeError("dst must be an object");if(!n)throw TypeError("path must be specified");return n=n.split("."),i(t,n,r)};Object.defineProperty(mt,"decorateRoot",{get:function(){return c2.decorated||(c2.decorated=new(qf()))}})});var as=N((ise,l2)=>{"use strict";l2.exports=Tn;Tn.className="ReflectionObject";var Jf=Dt(),Vf;function Tn(e,t){if(!Jf.isString(e))throw TypeError("name must be a string");if(t&&!Jf.isObject(t))throw TypeError("options must be an object");this.options=t,this.parsedOptions=null,this.name=e,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(Tn.prototype,{root:{get:function(){for(var e=this;e.parent!==null;)e=e.parent;return e}},fullName:{get:function(){for(var e=[this.name],t=this.parent;t;)e.unshift(t.name),t=t.parent;return e.join(".")}}});Tn.prototype.toJSON=function(){throw Error()};Tn.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var n=t.root;n instanceof Vf&&n._handleAdd(this)};Tn.prototype.onRemove=function(t){var n=t.root;n instanceof Vf&&n._handleRemove(this),this.parent=null,this.resolved=!1};Tn.prototype.resolve=function(){return this.resolved?this:(this.root instanceof Vf&&(this.resolved=!0),this)};Tn.prototype.getOption=function(t){if(this.options)return this.options[t]};Tn.prototype.setOption=function(t,n,r){return(!r||!this.options||this.options[t]===void 0)&&((this.options||(this.options={}))[t]=n),this};Tn.prototype.setParsedOption=function(t,n,r){this.parsedOptions||(this.parsedOptions=[]);var i=this.parsedOptions;if(r){var a=i.find(function(c){return Object.prototype.hasOwnProperty.call(c,t)});if(a){var s=a[t];Jf.setProperty(s,r,n)}else a={},a[t]=Jf.setProperty({},r,n),i.push(a)}else{var o={};o[t]=n,i.push(o)}return this};Tn.prototype.setOptions=function(t,n){if(t)for(var r=Object.keys(t),i=0;i<r.length;++i)this.setOption(r[i],t[r[i]],n);return this};Tn.prototype.toString=function(){var t=this.constructor.className,n=this.fullName;return n.length?t+" "+n:t};Tn._configure=function(e){Vf=e}});var xr=N((ase,p2)=>{"use strict";p2.exports=ti;var d2=as();((ti.prototype=Object.create(d2.prototype)).constructor=ti).className="Enum";var f2=Yc(),zf=Dt();function ti(e,t,n,r,i,a){if(d2.call(this,e,n),t&&typeof t!="object")throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=r,this.comments=i||{},this.valuesOptions=a,this.reserved=void 0,t)for(var s=Object.keys(t),o=0;o<s.length;++o)typeof t[s[o]]=="number"&&(this.valuesById[this.values[s[o]]=t[s[o]]]=s[o])}ti.fromJSON=function(t,n){var r=new ti(t,n.values,n.options,n.comment,n.comments);return r.reserved=n.reserved,r};ti.prototype.toJSON=function(t){var n=t?!!t.keepComments:!1;return zf.toObject(["options",this.options,"valuesOptions",this.valuesOptions,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",n?this.comment:void 0,"comments",n?this.comments:void 0])};ti.prototype.add=function(t,n,r,i){if(!zf.isString(t))throw TypeError("name must be a string");if(!zf.isInteger(n))throw TypeError("id must be an integer");if(this.values[t]!==void 0)throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(n))throw Error("id "+n+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(this.valuesById[n]!==void 0){if(!(this.options&&this.options.allow_alias))throw Error("duplicate id "+n+" in "+this);this.values[t]=n}else this.valuesById[this.values[t]=n]=t;return i&&(this.valuesOptions===void 0&&(this.valuesOptions={}),this.valuesOptions[t]=i||null),this.comments[t]=r||null,this};ti.prototype.remove=function(t){if(!zf.isString(t))throw TypeError("name must be a string");var n=this.values[t];if(n==null)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[n],delete this.values[t],delete this.comments[t],this.valuesOptions&&delete this.valuesOptions[t],this};ti.prototype.isReservedId=function(t){return f2.isReservedId(this.reserved,t)};ti.prototype.isReservedName=function(t){return f2.isReservedName(this.reserved,t)}});var qy=N((sse,m2)=>{"use strict";m2.exports=gG;var mG=xr(),Wy=is(),Hy=Dt();function h2(e,t,n,r){return t.resolvedType.group?e("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",n,r,(t.id<<3|3)>>>0,(t.id<<3|4)>>>0):e("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",n,r,(t.id<<3|2)>>>0)}function gG(e){for(var t=Hy.codegen(["m","w"],e.name+"$encode")("if(!w)")("w=Writer.create()"),n,r,i=e.fieldsArray.slice().sort(Hy.compareFieldsById),n=0;n<i.length;++n){var a=i[n].resolve(),s=e._fieldsArray.indexOf(a),o=a.resolvedType instanceof mG?"int32":a.type,c=Wy.basic[o];r="m"+Hy.safeProp(a.name),a.map?(t("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",r,a.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",r)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(a.id<<3|2)>>>0,8|Wy.mapKey[a.keyType],a.keyType),c===void 0?t("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",s,r):t(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|c,o,r),t("}")("}")):a.repeated?(t("if(%s!=null&&%s.length){",r,r),a.packed&&Wy.packed[o]!==void 0?t("w.uint32(%i).fork()",(a.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",r)("w.%s(%s[i])",o,r)("w.ldelim()"):(t("for(var i=0;i<%s.length;++i)",r),c===void 0?h2(t,a,s,r+"[i]"):t("w.uint32(%i).%s(%s[i])",(a.id<<3|c)>>>0,o,r)),t("}")):(a.optional&&t("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",r,a.name),c===void 0?h2(t,a,s,r):t("w.uint32(%i).%s(%s)",(a.id<<3|c)>>>0,o,r))}return t("return w")}});var _2=N((ose,g2)=>{"use strict";var Ne=g2.exports=dA();Ne.build="light";function _G(e,t,n){return typeof t=="function"?(n=t,t=new Ne.Root):t||(t=new Ne.Root),t.load(e,n)}Ne.load=_G;function AG(e,t){return t||(t=new Ne.Root),t.loadSync(e)}Ne.loadSync=AG;Ne.encoder=qy();Ne.decoder=Ry();Ne.verifier=Oy();Ne.converter=My();Ne.ReflectionObject=as();Ne.Namespace=Yc();Ne.Root=qf();Ne.Enum=xr();Ne.Type=Lf();Ne.Field=ua();Ne.OneOf=Hc();Ne.MapField=Bf();Ne.Service=Pf();Ne.Method=Of();Ne.Message=Df();Ne.wrappers=Fy();Ne.types=is();Ne.util=Dt();Ne.ReflectionObject._configure(Ne.Root);Ne.Namespace._configure(Ne.Type,Ne.Service,Ne.Enum);Ne.Root._configure(Ne.Type);Ne.Field._configure(Ne.Type)});var Xy=N((cse,v2)=>{"use strict";v2.exports=y2;var Zy=/[\s{}=;:[\],'"()<>]/g,yG=/(?:"([^"\\]*(?:\\.[^"\\]*)*)")/g,vG=/(?:'([^'\\]*(?:\\.[^'\\]*)*)')/g,wG=/^ *[*/]+ */,bG=/^\s*\*?\/*/,EG=/\n/g,CG=/\s/,IG=/\\(.?)/g,SG={0:"\0",r:"\r",n:`
11
+ `,t:" "};function A2(e){return e.replace(IG,function(t,n){switch(n){case"\\":case"":return n;default:return SG[n]||""}})}y2.unescape=A2;function y2(e,t){e=e.toString();var n=0,r=e.length,i=1,a=0,s={},o=[],c=null;function u(O){return Error("illegal "+O+" (line "+i+")")}function d(){var O=c==="'"?vG:yG;O.lastIndex=n-1;var z=O.exec(e);if(!z)throw u("string");return n=O.lastIndex,S(c),c=null,A2(z[1])}function p(O){return e.charAt(O)}function h(O,z,Q){var V={type:e.charAt(O++),lineEmpty:!1,leading:Q},Z;t?Z=2:Z=3;var fe=O-Z,ne;do if(--fe<0||(ne=e.charAt(fe))===`
12
+ `){V.lineEmpty=!0;break}while(ne===" "||ne===" ");for(var k=e.substring(O,z).split(EG),pe=0;pe<k.length;++pe)k[pe]=k[pe].replace(t?bG:wG,"").trim();V.text=k.join(`
13
+ `).trim(),s[i]=V,a=i}function _(O){var z=w(O),Q=e.substring(O,z),V=/^\s*\/\//.test(Q);return V}function w(O){for(var z=O;z<r&&p(z)!==`
14
+ `;)z++;return z}function A(){if(o.length>0)return o.shift();if(c)return d();var O,z,Q,V,Z,fe=n===0;do{if(n===r)return null;for(O=!1;CG.test(Q=p(n));)if(Q===`
15
+ `&&(fe=!0,++i),++n===r)return null;if(p(n)==="/"){if(++n===r)throw u("comment");if(p(n)==="/")if(t){if(V=n,Z=!1,_(n-1)){Z=!0;do if(n=w(n),n===r||(n++,!fe))break;while(_(n))}else n=Math.min(r,w(n)+1);Z&&(h(V,n,fe),fe=!0),i++,O=!0}else{for(Z=p(V=n+1)==="/";p(++n)!==`
16
+ `;)if(n===r)return null;++n,Z&&(h(V,n-1,fe),fe=!0),++i,O=!0}else if((Q=p(n))==="*"){V=n+1,Z=t||p(V)==="*";do{if(Q===`
17
+ `&&++i,++n===r)throw u("comment");z=Q,Q=p(n)}while(z!=="*"||Q!=="/");++n,Z&&(h(V,n-2,fe),fe=!0),O=!0}else return"/"}}while(O);var ne=n;Zy.lastIndex=0;var k=Zy.test(p(ne++));if(!k)for(;ne<r&&!Zy.test(p(ne));)++ne;var pe=e.substring(n,n=ne);return(pe==='"'||pe==="'")&&(c=pe),pe}function S(O){o.push(O)}function b(){if(!o.length){var O=A();if(O===null)return null;S(O)}return o[0]}function T(O,z){var Q=b(),V=Q===O;if(V)return A(),!0;if(!z)throw u("token '"+Q+"', '"+O+"' expected");return!1}function B(O){var z=null,Q;return O===void 0?(Q=s[i-1],delete s[i-1],Q&&(t||Q.type==="*"||Q.lineEmpty)&&(z=Q.leading?Q.text:null)):(a<O&&b(),Q=s[O],delete s[O],Q&&!Q.lineEmpty&&(t||Q.type==="/")&&(z=Q.leading?null:Q.text)),z}return Object.defineProperty({next:A,peek:b,push:S,skip:T,cmnt:B},"line",{get:function(){return i}})}});var S2=N((use,I2)=>{"use strict";I2.exports=Ti;Ti.filename=null;Ti.defaults={keepCase:!1};var xG=Xy(),w2=qf(),b2=Lf(),E2=ua(),TG=Bf(),C2=Hc(),NG=xr(),RG=Pf(),kG=Of(),Yy=is(),$y=Dt(),BG=/^[1-9][0-9]*$/,OG=/^-?[1-9][0-9]*$/,PG=/^0[x][0-9a-fA-F]+$/,DG=/^-?0[x][0-9a-fA-F]+$/,MG=/^0[0-7]+$/,FG=/^-?0[0-7]+$/,LG=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/,ni=/^[a-zA-Z_][a-zA-Z_0-9]*$/,ri=/^(?:\.?[a-zA-Z_][a-zA-Z_0-9]*)(?:\.[a-zA-Z_][a-zA-Z_0-9]*)*$/,QG=/^(?:\.[a-zA-Z_][a-zA-Z_0-9]*)+$/;function Ti(e,t,n){t instanceof w2||(n=t,t=new w2),n||(n=Ti.defaults);var r=n.preferTrailingComment||!1,i=xG(e,n.alternateCommentMode||!1),a=i.next,s=i.push,o=i.peek,c=i.skip,u=i.cmnt,d=!0,p,h,_,w,A=!1,S=t,b=n.keepCase?function(U){return U}:$y.camelCase;function T(U,q,H){var ee=Ti.filename;return H||(Ti.filename=null),Error("illegal "+(q||"token")+" '"+U+"' ("+(ee?ee+", ":"")+"line "+i.line+")")}function B(){var U=[],q;do{if((q=a())!=='"'&&q!=="'")throw T(q);U.push(a()),c(q),q=o()}while(q==='"'||q==="'");return U.join("")}function O(U){var q=a();switch(q){case"'":case'"':return s(q),B();case"true":case"TRUE":return!0;case"false":case"FALSE":return!1}try{return Q(q,!0)}catch{if(U&&ri.test(q))return q;throw T(q,"value")}}function z(U,q){var H,ee;do q&&((H=o())==='"'||H==="'")?U.push(B()):U.push([ee=V(a()),c("to",!0)?V(a()):ee]);while(c(",",!0));var K={options:void 0};K.setOption=function(he,He){this.options===void 0&&(this.options={}),this.options[he]=He},pe(K,function(He){if(He==="option")ce(K,He),c(";");else throw T(He)},function(){qe(K)})}function Q(U,q){var H=1;switch(U.charAt(0)==="-"&&(H=-1,U=U.substring(1)),U){case"inf":case"INF":case"Inf":return H*(1/0);case"nan":case"NAN":case"Nan":case"NaN":return NaN;case"0":return 0}if(BG.test(U))return H*parseInt(U,10);if(PG.test(U))return H*parseInt(U,16);if(MG.test(U))return H*parseInt(U,8);if(LG.test(U))return H*parseFloat(U);throw T(U,"number",q)}function V(U,q){switch(U){case"max":case"MAX":case"Max":return 536870911;case"0":return 0}if(!q&&U.charAt(0)==="-")throw T(U,"id");if(OG.test(U))return parseInt(U,10);if(DG.test(U))return parseInt(U,16);if(FG.test(U))return parseInt(U,8);throw T(U,"id")}function Z(){if(p!==void 0)throw T("package");if(p=a(),!ri.test(p))throw T(p,"name");S=S.define(p),c(";")}function fe(){var U=o(),q;switch(U){case"weak":q=_||(_=[]),a();break;case"public":a();default:q=h||(h=[]);break}U=B(),c(";"),q.push(U)}function ne(){if(c("="),w=B(),A=w==="proto3",!A&&w!=="proto2")throw T(w,"syntax");c(";")}function k(U,q){switch(q){case"option":return ce(U,q),c(";"),!0;case"message":return M(U,q),!0;case"enum":return re(U,q),!0;case"service":return Je(U,q),!0;case"extend":return Yt(U,q),!0}return!1}function pe(U,q,H){var ee=i.line;if(U&&(typeof U.comment!="string"&&(U.comment=u()),U.filename=Ti.filename),c("{",!0)){for(var K;(K=a())!=="}";)q(K);c(";",!0)}else H&&H(),c(";"),U&&(typeof U.comment!="string"||r)&&(U.comment=u(ee)||U.comment)}function M(U,q){if(!ni.test(q=a()))throw T(q,"type name");var H=new b2(q);pe(H,function(K){if(!k(H,K))switch(K){case"map":J(H,K);break;case"required":case"repeated":y(H,K);break;case"optional":A?y(H,"proto3_optional"):y(H,"optional");break;case"oneof":Y(H,K);break;case"extensions":z(H.extensions||(H.extensions=[]));break;case"reserved":z(H.reserved||(H.reserved=[]),!0);break;default:if(!A||!ri.test(K))throw T(K);s(K),y(H,"optional");break}}),U.add(H)}function y(U,q,H){var ee=a();if(ee==="group"){R(U,q);return}for(;ee.endsWith(".")||o().startsWith(".");)ee+=a();if(!ri.test(ee))throw T(ee,"type");var K=a();if(!ni.test(K))throw T(K,"name");K=b(K),c("=");var he=new E2(K,V(a()),ee,q,H);if(pe(he,function(_n){if(_n==="option")ce(he,_n),c(";");else throw T(_n)},function(){qe(he)}),q==="proto3_optional"){var He=new C2("_"+K);he.setOption("proto3_optional",!0),He.add(he),U.add(He)}else U.add(he);!A&&he.repeated&&(Yy.packed[ee]!==void 0||Yy.basic[ee]===void 0)&&he.setOption("packed",!1,!0)}function R(U,q){var H=a();if(!ni.test(H))throw T(H,"name");var ee=$y.lcFirst(H);H===ee&&(H=$y.ucFirst(H)),c("=");var K=V(a()),he=new b2(H);he.group=!0;var He=new E2(ee,K,H,q);He.filename=Ti.filename,pe(he,function(_n){switch(_n){case"option":ce(he,_n),c(";");break;case"required":case"repeated":y(he,_n);break;case"optional":A?y(he,"proto3_optional"):y(he,"optional");break;case"message":M(he,_n);break;case"enum":re(he,_n);break;default:throw T(_n)}}),U.add(he).add(He)}function J(U){c("<");var q=a();if(Yy.mapKey[q]===void 0)throw T(q,"type");c(",");var H=a();if(!ri.test(H))throw T(H,"type");c(">");var ee=a();if(!ni.test(ee))throw T(ee,"name");c("=");var K=new TG(b(ee),V(a()),q,H);pe(K,function(He){if(He==="option")ce(K,He),c(";");else throw T(He)},function(){qe(K)}),U.add(K)}function Y(U,q){if(!ni.test(q=a()))throw T(q,"name");var H=new C2(b(q));pe(H,function(K){K==="option"?(ce(H,K),c(";")):(s(K),y(H,"optional"))}),U.add(H)}function re(U,q){if(!ni.test(q=a()))throw T(q,"name");var H=new NG(q);pe(H,function(K){switch(K){case"option":ce(H,K),c(";");break;case"reserved":z(H.reserved||(H.reserved=[]),!0);break;default:ae(H,K)}}),U.add(H)}function ae(U,q){if(!ni.test(q))throw T(q,"name");c("=");var H=V(a(),!0),ee={options:void 0};ee.setOption=function(K,he){this.options===void 0&&(this.options={}),this.options[K]=he},pe(ee,function(he){if(he==="option")ce(ee,he),c(";");else throw T(he)},function(){qe(ee)}),U.add(q,H,ee.comment,ee.options)}function ce(U,q){var H=c("(",!0);if(!ri.test(q=a()))throw T(q,"name");var ee=q,K=ee,he;H&&(c(")"),ee="("+ee+")",K=ee,q=o(),QG.test(q)&&(he=q.slice(1),ee+=q,a())),c("=");var He=Ee(U,ee);Fe(U,K,He,he)}function Ee(U,q){if(c("{",!0)){for(var H={};!c("}",!0);){if(!ni.test(gt=a()))throw T(gt,"name");if(gt===null)throw T(gt,"end of input");var ee,K=gt;if(c(":",!0),o()==="{")ee=Ee(U,q+"."+gt);else if(o()==="["){ee=[];var he;if(c("[",!0)){do he=O(!0),ee.push(he);while(c(",",!0));c("]"),typeof he<"u"&&Ce(U,q+"."+gt,he)}}else ee=O(!0),Ce(U,q+"."+gt,ee);var He=H[K];He&&(ee=[].concat(He).concat(ee)),H[K]=ee,c(",",!0),c(";",!0)}return H}var tr=O(!0);return Ce(U,q,tr),tr}function Ce(U,q,H){U.setOption&&U.setOption(q,H)}function Fe(U,q,H,ee){U.setParsedOption&&U.setParsedOption(q,H,ee)}function qe(U){if(c("[",!0)){do ce(U,"option");while(c(",",!0));c("]")}return U}function Je(U,q){if(!ni.test(q=a()))throw T(q,"service name");var H=new RG(q);pe(H,function(K){if(!k(H,K))if(K==="rpc")ot(H,K);else throw T(K)}),U.add(H)}function ot(U,q){var H=u(),ee=q;if(!ni.test(q=a()))throw T(q,"name");var K=q,he,He,tr,_n;if(c("("),c("stream",!0)&&(He=!0),!ri.test(q=a())||(he=q,c(")"),c("returns"),c("("),c("stream",!0)&&(_n=!0),!ri.test(q=a())))throw T(q);tr=q,c(")");var Jl=new kG(K,ee,he,tr,He,_n);Jl.comment=H,pe(Jl,function(_h){if(_h==="option")ce(Jl,_h),c(";");else throw T(_h)}),U.add(Jl)}function Yt(U,q){if(!ri.test(q=a()))throw T(q,"reference");var H=q;pe(null,function(K){switch(K){case"required":case"repeated":y(U,K,H);break;case"optional":A?y(U,"proto3_optional",H):y(U,"optional",H);break;default:if(!A||!ri.test(K))throw T(K);s(K),y(U,"optional",H);break}})}for(var gt;(gt=a())!==null;)switch(gt){case"package":if(!d)throw T(gt);Z();break;case"import":if(!d)throw T(gt);fe();break;case"syntax":if(!d)throw T(gt);ne();break;case"option":ce(S,gt),c(";");break;default:if(k(S,gt)){d=!1;continue}throw T(gt)}return Ti.filename=null,{package:p,imports:h,weakImports:_,syntax:w,root:t}}});var N2=N((lse,T2)=>{"use strict";T2.exports=Nr;var UG=/\/|\./;function Nr(e,t){UG.test(e)||(e="google/protobuf/"+e+".proto",t={nested:{google:{nested:{protobuf:{nested:t}}}}}),Nr[e]=t}Nr("any",{Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}}});var x2;Nr("duration",{Duration:x2={fields:{seconds:{type:"int64",id:1},nanos:{type:"int32",id:2}}}});Nr("timestamp",{Timestamp:x2});Nr("empty",{Empty:{fields:{}}});Nr("struct",{Struct:{fields:{fields:{keyType:"string",type:"Value",id:1}}},Value:{oneofs:{kind:{oneof:["nullValue","numberValue","stringValue","boolValue","structValue","listValue"]}},fields:{nullValue:{type:"NullValue",id:1},numberValue:{type:"double",id:2},stringValue:{type:"string",id:3},boolValue:{type:"bool",id:4},structValue:{type:"Struct",id:5},listValue:{type:"ListValue",id:6}}},NullValue:{values:{NULL_VALUE:0}},ListValue:{fields:{values:{rule:"repeated",type:"Value",id:1}}}});Nr("wrappers",{DoubleValue:{fields:{value:{type:"double",id:1}}},FloatValue:{fields:{value:{type:"float",id:1}}},Int64Value:{fields:{value:{type:"int64",id:1}}},UInt64Value:{fields:{value:{type:"uint64",id:1}}},Int32Value:{fields:{value:{type:"int32",id:1}}},UInt32Value:{fields:{value:{type:"uint32",id:1}}},BoolValue:{fields:{value:{type:"bool",id:1}}},StringValue:{fields:{value:{type:"string",id:1}}},BytesValue:{fields:{value:{type:"bytes",id:1}}}});Nr("field_mask",{FieldMask:{fields:{paths:{rule:"repeated",type:"string",id:1}}}});Nr.get=function(t){return Nr[t]||null}});var k2=N((dse,R2)=>{"use strict";var fa=R2.exports=_2();fa.build="full";fa.tokenize=Xy();fa.parse=S2();fa.common=N2();fa.Root._configure(fa.Type,fa.parse,fa.common)});var Gf=N((fse,B2)=>{"use strict";B2.exports=k2()});var Ky=N((pse,qG)=>{qG.exports={nested:{google:{nested:{protobuf:{nested:{FileDescriptorSet:{fields:{file:{rule:"repeated",type:"FileDescriptorProto",id:1}}},FileDescriptorProto:{fields:{name:{type:"string",id:1},package:{type:"string",id:2},dependency:{rule:"repeated",type:"string",id:3},publicDependency:{rule:"repeated",type:"int32",id:10,options:{packed:!1}},weakDependency:{rule:"repeated",type:"int32",id:11,options:{packed:!1}},messageType:{rule:"repeated",type:"DescriptorProto",id:4},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:5},service:{rule:"repeated",type:"ServiceDescriptorProto",id:6},extension:{rule:"repeated",type:"FieldDescriptorProto",id:7},options:{type:"FileOptions",id:8},sourceCodeInfo:{type:"SourceCodeInfo",id:9},syntax:{type:"string",id:12}}},DescriptorProto:{fields:{name:{type:"string",id:1},field:{rule:"repeated",type:"FieldDescriptorProto",id:2},extension:{rule:"repeated",type:"FieldDescriptorProto",id:6},nestedType:{rule:"repeated",type:"DescriptorProto",id:3},enumType:{rule:"repeated",type:"EnumDescriptorProto",id:4},extensionRange:{rule:"repeated",type:"ExtensionRange",id:5},oneofDecl:{rule:"repeated",type:"OneofDescriptorProto",id:8},options:{type:"MessageOptions",id:7},reservedRange:{rule:"repeated",type:"ReservedRange",id:9},reservedName:{rule:"repeated",type:"string",id:10}},nested:{ExtensionRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}},ReservedRange:{fields:{start:{type:"int32",id:1},end:{type:"int32",id:2}}}}},FieldDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:3},label:{type:"Label",id:4},type:{type:"Type",id:5},typeName:{type:"string",id:6},extendee:{type:"string",id:2},defaultValue:{type:"string",id:7},oneofIndex:{type:"int32",id:9},jsonName:{type:"string",id:10},options:{type:"FieldOptions",id:8}},nested:{Type:{values:{TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Label:{values:{LABEL_OPTIONAL:1,LABEL_REQUIRED:2,LABEL_REPEATED:3}}}},OneofDescriptorProto:{fields:{name:{type:"string",id:1},options:{type:"OneofOptions",id:2}}},EnumDescriptorProto:{fields:{name:{type:"string",id:1},value:{rule:"repeated",type:"EnumValueDescriptorProto",id:2},options:{type:"EnumOptions",id:3}}},EnumValueDescriptorProto:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{type:"EnumValueOptions",id:3}}},ServiceDescriptorProto:{fields:{name:{type:"string",id:1},method:{rule:"repeated",type:"MethodDescriptorProto",id:2},options:{type:"ServiceOptions",id:3}}},MethodDescriptorProto:{fields:{name:{type:"string",id:1},inputType:{type:"string",id:2},outputType:{type:"string",id:3},options:{type:"MethodOptions",id:4},clientStreaming:{type:"bool",id:5},serverStreaming:{type:"bool",id:6}}},FileOptions:{fields:{javaPackage:{type:"string",id:1},javaOuterClassname:{type:"string",id:8},javaMultipleFiles:{type:"bool",id:10},javaGenerateEqualsAndHash:{type:"bool",id:20,options:{deprecated:!0}},javaStringCheckUtf8:{type:"bool",id:27},optimizeFor:{type:"OptimizeMode",id:9,options:{default:"SPEED"}},goPackage:{type:"string",id:11},ccGenericServices:{type:"bool",id:16},javaGenericServices:{type:"bool",id:17},pyGenericServices:{type:"bool",id:18},deprecated:{type:"bool",id:23},ccEnableArenas:{type:"bool",id:31},objcClassPrefix:{type:"string",id:36},csharpNamespace:{type:"string",id:37},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[38,38]],nested:{OptimizeMode:{values:{SPEED:1,CODE_SIZE:2,LITE_RUNTIME:3}}}},MessageOptions:{fields:{messageSetWireFormat:{type:"bool",id:1},noStandardDescriptorAccessor:{type:"bool",id:2},deprecated:{type:"bool",id:3},mapEntry:{type:"bool",id:7},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[8,8]]},FieldOptions:{fields:{ctype:{type:"CType",id:1,options:{default:"STRING"}},packed:{type:"bool",id:2},jstype:{type:"JSType",id:6,options:{default:"JS_NORMAL"}},lazy:{type:"bool",id:5},deprecated:{type:"bool",id:3},weak:{type:"bool",id:10},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]],reserved:[[4,4]],nested:{CType:{values:{STRING:0,CORD:1,STRING_PIECE:2}},JSType:{values:{JS_NORMAL:0,JS_STRING:1,JS_NUMBER:2}}}},OneofOptions:{fields:{uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumOptions:{fields:{allowAlias:{type:"bool",id:2},deprecated:{type:"bool",id:3},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},EnumValueOptions:{fields:{deprecated:{type:"bool",id:1},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},ServiceOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},MethodOptions:{fields:{deprecated:{type:"bool",id:33},uninterpretedOption:{rule:"repeated",type:"UninterpretedOption",id:999}},extensions:[[1e3,536870911]]},UninterpretedOption:{fields:{name:{rule:"repeated",type:"NamePart",id:2},identifierValue:{type:"string",id:3},positiveIntValue:{type:"uint64",id:4},negativeIntValue:{type:"int64",id:5},doubleValue:{type:"double",id:6},stringValue:{type:"bytes",id:7},aggregateValue:{type:"string",id:8}},nested:{NamePart:{fields:{namePart:{rule:"required",type:"string",id:1},isExtension:{rule:"required",type:"bool",id:2}}}}},SourceCodeInfo:{fields:{location:{rule:"repeated",type:"Location",id:1}},nested:{Location:{fields:{path:{rule:"repeated",type:"int32",id:1},span:{rule:"repeated",type:"int32",id:2},leadingComments:{type:"string",id:3},trailingComments:{type:"string",id:4},leadingDetachedComments:{rule:"repeated",type:"string",id:6}}}}},GeneratedCodeInfo:{fields:{annotation:{rule:"repeated",type:"Annotation",id:1}},nested:{Annotation:{fields:{path:{rule:"repeated",type:"int32",id:1},sourceFile:{type:"string",id:2},begin:{type:"int32",id:3},end:{type:"int32",id:4}}}}}}}}}}}});var F2=N((Se,M2)=>{"use strict";var en=Gf();M2.exports=Se=en.descriptor=en.Root.fromJSON(Ky()).lookup(".google.protobuf");var O2=en.Namespace,hl=en.Root,Ni=en.Enum,pa=en.Type,ha=en.Field,JG=en.MapField,Wf=en.OneOf,ml=en.Service,Hf=en.Method;hl.fromDescriptor=function(t){typeof t.length=="number"&&(t=Se.FileDescriptorSet.decode(t));var n=new hl;if(t.file)for(var r,i,a=0,s;a<t.file.length;++a){if(i=n,(r=t.file[a]).package&&r.package.length&&(i=n.define(r.package)),r.name&&r.name.length&&n.files.push(i.filename=r.name),r.messageType)for(s=0;s<r.messageType.length;++s)i.add(pa.fromDescriptor(r.messageType[s],r.syntax));if(r.enumType)for(s=0;s<r.enumType.length;++s)i.add(Ni.fromDescriptor(r.enumType[s]));if(r.extension)for(s=0;s<r.extension.length;++s)i.add(ha.fromDescriptor(r.extension[s]));if(r.service)for(s=0;s<r.service.length;++s)i.add(ml.fromDescriptor(r.service[s]));var o=Kc(r.options,Se.FileOptions);if(o){var c=Object.keys(o);for(s=0;s<c.length;++s)i.setOption(c[s],o[c[s]])}}return n};hl.prototype.toDescriptor=function(t){var n=Se.FileDescriptorSet.create();return P2(this,n.file,t),n};function P2(e,t,n){var r=Se.FileDescriptorProto.create({name:e.filename||(e.fullName.substring(1).replace(/\./g,"_")||"root")+".proto"});n&&(r.syntax=n),e instanceof hl||(r.package=e.fullName.substring(1));for(var i=0,a;i<e.nestedArray.length;++i)(a=e._nestedArray[i])instanceof pa?r.messageType.push(a.toDescriptor(n)):a instanceof Ni?r.enumType.push(a.toDescriptor()):a instanceof ha?r.extension.push(a.toDescriptor(n)):a instanceof ml?r.service.push(a.toDescriptor()):a instanceof O2&&P2(a,t,n);r.options=jc(e.options,Se.FileOptions),r.messageType.length+r.enumType.length+r.extension.length+r.service.length&&t.push(r)}var VG=0;pa.fromDescriptor=function(t,n){typeof t.length=="number"&&(t=Se.DescriptorProto.decode(t));var r=new pa(t.name.length?t.name:"Type"+VG++,Kc(t.options,Se.MessageOptions)),i;if(t.oneofDecl)for(i=0;i<t.oneofDecl.length;++i)r.add(Wf.fromDescriptor(t.oneofDecl[i]));if(t.field)for(i=0;i<t.field.length;++i){var a=ha.fromDescriptor(t.field[i],n);r.add(a),t.field[i].hasOwnProperty("oneofIndex")&&r.oneofsArray[t.field[i].oneofIndex].add(a)}if(t.extension)for(i=0;i<t.extension.length;++i)r.add(ha.fromDescriptor(t.extension[i],n));if(t.nestedType)for(i=0;i<t.nestedType.length;++i)r.add(pa.fromDescriptor(t.nestedType[i],n)),t.nestedType[i].options&&t.nestedType[i].options.mapEntry&&r.setOption("map_entry",!0);if(t.enumType)for(i=0;i<t.enumType.length;++i)r.add(Ni.fromDescriptor(t.enumType[i]));if(t.extensionRange&&t.extensionRange.length)for(r.extensions=[],i=0;i<t.extensionRange.length;++i)r.extensions.push([t.extensionRange[i].start,t.extensionRange[i].end]);if(t.reservedRange&&t.reservedRange.length||t.reservedName&&t.reservedName.length){if(r.reserved=[],t.reservedRange)for(i=0;i<t.reservedRange.length;++i)r.reserved.push([t.reservedRange[i].start,t.reservedRange[i].end]);if(t.reservedName)for(i=0;i<t.reservedName.length;++i)r.reserved.push(t.reservedName[i])}return r};pa.prototype.toDescriptor=function(t){var n=Se.DescriptorProto.create({name:this.name}),r;for(r=0;r<this.fieldsArray.length;++r){var i;if(n.field.push(i=this._fieldsArray[r].toDescriptor(t)),this._fieldsArray[r]instanceof JG){var a=jy(this._fieldsArray[r].keyType,this._fieldsArray[r].resolvedKeyType),s=jy(this._fieldsArray[r].type,this._fieldsArray[r].resolvedType),o=s===11||s===14?this._fieldsArray[r].resolvedType&&D2(this.parent,this._fieldsArray[r].resolvedType)||this._fieldsArray[r].type:void 0;n.nestedType.push(Se.DescriptorProto.create({name:i.typeName,field:[Se.FieldDescriptorProto.create({name:"key",number:1,label:1,type:a}),Se.FieldDescriptorProto.create({name:"value",number:2,label:1,type:s,typeName:o})],options:Se.MessageOptions.create({mapEntry:!0})}))}}for(r=0;r<this.oneofsArray.length;++r)n.oneofDecl.push(this._oneofsArray[r].toDescriptor());for(r=0;r<this.nestedArray.length;++r)this._nestedArray[r]instanceof ha?n.field.push(this._nestedArray[r].toDescriptor(t)):this._nestedArray[r]instanceof pa?n.nestedType.push(this._nestedArray[r].toDescriptor(t)):this._nestedArray[r]instanceof Ni&&n.enumType.push(this._nestedArray[r].toDescriptor());if(this.extensions)for(r=0;r<this.extensions.length;++r)n.extensionRange.push(Se.DescriptorProto.ExtensionRange.create({start:this.extensions[r][0],end:this.extensions[r][1]}));if(this.reserved)for(r=0;r<this.reserved.length;++r)typeof this.reserved[r]=="string"?n.reservedName.push(this.reserved[r]):n.reservedRange.push(Se.DescriptorProto.ReservedRange.create({start:this.reserved[r][0],end:this.reserved[r][1]}));return n.options=jc(this.options,Se.MessageOptions),n};var zG=/^(?![eE])[0-9]*(?:\.[0-9]*)?(?:[eE][+-]?[0-9]+)?$/;ha.fromDescriptor=function(t,n){if(typeof t.length=="number"&&(t=Se.DescriptorProto.decode(t)),typeof t.number!="number")throw Error("missing field id");var r;t.typeName&&t.typeName.length?r=t.typeName:r=XG(t.type);var i;switch(t.label){case 1:i=void 0;break;case 2:i="required";break;case 3:i="repeated";break;default:throw Error("illegal label: "+t.label)}var a=t.extendee;t.extendee!==void 0&&(a=a.length?a:void 0);var s=new ha(t.name.length?t.name:"field"+t.number,t.number,r,i,a);if(s.options=Kc(t.options,Se.FieldOptions),t.defaultValue&&t.defaultValue.length){var o=t.defaultValue;switch(o){case"true":case"TRUE":o=!0;break;case"false":case"FALSE":o=!1;break;default:var c=zG.exec(o);c&&(o=parseInt(o));break}s.setOption("default",o)}return YG(t.type)&&(n==="proto3"?t.options&&!t.options.packed&&s.setOption("packed",!1):t.options&&t.options.packed||s.setOption("packed",!1)),s};ha.prototype.toDescriptor=function(t){var n=Se.FieldDescriptorProto.create({name:this.name,number:this.id});if(this.map)n.type=11,n.typeName=en.util.ucFirst(this.name),n.label=3;else{switch(n.type=jy(this.type,this.resolve().resolvedType)){case 10:case 11:case 14:n.typeName=this.resolvedType?D2(this.parent,this.resolvedType):this.type;break}switch(this.rule){case"repeated":n.label=3;break;case"required":n.label=2;break;default:n.label=1;break}}if(n.extendee=this.extensionField?this.extensionField.parent.fullName:this.extend,this.partOf&&(n.oneofIndex=this.parent.oneofsArray.indexOf(this.partOf))<0)throw Error("missing oneof");return this.options&&(n.options=jc(this.options,Se.FieldOptions),this.options.default!=null&&(n.defaultValue=String(this.options.default))),t==="proto3"?this.packed||((n.options||(n.options=Se.FieldOptions.create())).packed=!1):this.packed&&((n.options||(n.options=Se.FieldOptions.create())).packed=!0),n};var GG=0;Ni.fromDescriptor=function(t){typeof t.length=="number"&&(t=Se.EnumDescriptorProto.decode(t));var n={};if(t.value)for(var r=0;r<t.value.length;++r){var i=t.value[r].name,a=t.value[r].number||0;n[i&&i.length?i:"NAME"+a]=a}return new Ni(t.name&&t.name.length?t.name:"Enum"+GG++,n,Kc(t.options,Se.EnumOptions))};Ni.prototype.toDescriptor=function(){for(var t=[],n=0,r=Object.keys(this.values);n<r.length;++n)t.push(Se.EnumValueDescriptorProto.create({name:r[n],number:this.values[r[n]]}));return Se.EnumDescriptorProto.create({name:this.name,value:t,options:jc(this.options,Se.EnumOptions)})};var WG=0;Wf.fromDescriptor=function(t){return typeof t.length=="number"&&(t=Se.OneofDescriptorProto.decode(t)),new Wf(t.name&&t.name.length?t.name:"oneof"+WG++)};Wf.prototype.toDescriptor=function(){return Se.OneofDescriptorProto.create({name:this.name})};var HG=0;ml.fromDescriptor=function(t){typeof t.length=="number"&&(t=Se.ServiceDescriptorProto.decode(t));var n=new ml(t.name&&t.name.length?t.name:"Service"+HG++,Kc(t.options,Se.ServiceOptions));if(t.method)for(var r=0;r<t.method.length;++r)n.add(Hf.fromDescriptor(t.method[r]));return n};ml.prototype.toDescriptor=function(){for(var t=[],n=0;n<this.methodsArray.length;++n)t.push(this._methodsArray[n].toDescriptor());return Se.ServiceDescriptorProto.create({name:this.name,method:t,options:jc(this.options,Se.ServiceOptions)})};var ZG=0;Hf.fromDescriptor=function(t){return typeof t.length=="number"&&(t=Se.MethodDescriptorProto.decode(t)),new Hf(t.name&&t.name.length?t.name:"Method"+ZG++,"rpc",t.inputType,t.outputType,!!t.clientStreaming,!!t.serverStreaming,Kc(t.options,Se.MethodOptions))};Hf.prototype.toDescriptor=function(){return Se.MethodDescriptorProto.create({name:this.name,inputType:this.resolvedRequestType?this.resolvedRequestType.fullName:this.requestType,outputType:this.resolvedResponseType?this.resolvedResponseType.fullName:this.responseType,clientStreaming:this.requestStream,serverStreaming:this.responseStream,options:jc(this.options,Se.MethodOptions)})};function XG(e){switch(e){case 1:return"double";case 2:return"float";case 3:return"int64";case 4:return"uint64";case 5:return"int32";case 6:return"fixed64";case 7:return"fixed32";case 8:return"bool";case 9:return"string";case 12:return"bytes";case 13:return"uint32";case 15:return"sfixed32";case 16:return"sfixed64";case 17:return"sint32";case 18:return"sint64"}throw Error("illegal type: "+e)}function YG(e){switch(e){case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:case 13:case 14:case 15:case 16:case 17:case 18:return!0}return!1}function jy(e,t){switch(e){case"double":return 1;case"float":return 2;case"int64":return 3;case"uint64":return 4;case"int32":return 5;case"fixed64":return 6;case"fixed32":return 7;case"bool":return 8;case"string":return 9;case"bytes":return 12;case"uint32":return 13;case"sfixed32":return 15;case"sfixed64":return 16;case"sint32":return 17;case"sint64":return 18}if(t instanceof Ni)return 14;if(t instanceof pa)return t.group?10:11;throw Error("illegal type: "+e)}function Kc(e,t){if(e){for(var n=[],r=0,i,a,s;r<t.fieldsArray.length;++r)(a=(i=t._fieldsArray[r]).name)!=="uninterpretedOption"&&e.hasOwnProperty(a)&&(s=e[a],i.resolvedType instanceof Ni&&typeof s=="number"&&i.resolvedType.valuesById[s]!==void 0&&(s=i.resolvedType.valuesById[s]),n.push($G(a),s));return n.length?en.util.toObject(n):void 0}}function jc(e,t){if(e){for(var n=[],r=0,i=Object.keys(e),a,s;r<i.length;++r)if(s=e[a=i[r]],a!=="default"){var o=t.fields[a];!o&&!(o=t.fields[a=en.util.camelCase(a)])||n.push(a,s)}return n.length?t.fromObject(en.util.toObject(n)):void 0}}function D2(e,t){var n=e.fullName.split("."),r=t.fullName.split("."),i=0,a=0,s=r.length-1;if(!(e instanceof hl)&&t instanceof O2)for(;i<n.length&&a<s&&n[i]===r[a];){var o=t.lookup(n[i++],!0);if(o!==null&&o!==t)break;++a}else for(;i<n.length&&a<s&&n[i]===r[a];++i,++a);return r.slice(a).join(".")}function $G(e){return e.substring(0,1)+e.substring(1).replace(/([A-Z])(?=[a-z]|$)/g,function(t,n){return"_"+n.toLowerCase()})}});var L2=N((hse,KG)=>{KG.exports={nested:{google:{nested:{protobuf:{nested:{Api:{fields:{name:{type:"string",id:1},methods:{rule:"repeated",type:"Method",id:2},options:{rule:"repeated",type:"Option",id:3},version:{type:"string",id:4},sourceContext:{type:"SourceContext",id:5},mixins:{rule:"repeated",type:"Mixin",id:6},syntax:{type:"Syntax",id:7}}},Method:{fields:{name:{type:"string",id:1},requestTypeUrl:{type:"string",id:2},requestStreaming:{type:"bool",id:3},responseTypeUrl:{type:"string",id:4},responseStreaming:{type:"bool",id:5},options:{rule:"repeated",type:"Option",id:6},syntax:{type:"Syntax",id:7}}},Mixin:{fields:{name:{type:"string",id:1},root:{type:"string",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}}}}}}}}});var Q2=N((mse,jG)=>{jG.exports={nested:{google:{nested:{protobuf:{nested:{SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var U2=N((gse,e8)=>{e8.exports={nested:{google:{nested:{protobuf:{nested:{Type:{fields:{name:{type:"string",id:1},fields:{rule:"repeated",type:"Field",id:2},oneofs:{rule:"repeated",type:"string",id:3},options:{rule:"repeated",type:"Option",id:4},sourceContext:{type:"SourceContext",id:5},syntax:{type:"Syntax",id:6}}},Field:{fields:{kind:{type:"Kind",id:1},cardinality:{type:"Cardinality",id:2},number:{type:"int32",id:3},name:{type:"string",id:4},typeUrl:{type:"string",id:6},oneofIndex:{type:"int32",id:7},packed:{type:"bool",id:8},options:{rule:"repeated",type:"Option",id:9},jsonName:{type:"string",id:10},defaultValue:{type:"string",id:11}},nested:{Kind:{values:{TYPE_UNKNOWN:0,TYPE_DOUBLE:1,TYPE_FLOAT:2,TYPE_INT64:3,TYPE_UINT64:4,TYPE_INT32:5,TYPE_FIXED64:6,TYPE_FIXED32:7,TYPE_BOOL:8,TYPE_STRING:9,TYPE_GROUP:10,TYPE_MESSAGE:11,TYPE_BYTES:12,TYPE_UINT32:13,TYPE_ENUM:14,TYPE_SFIXED32:15,TYPE_SFIXED64:16,TYPE_SINT32:17,TYPE_SINT64:18}},Cardinality:{values:{CARDINALITY_UNKNOWN:0,CARDINALITY_OPTIONAL:1,CARDINALITY_REQUIRED:2,CARDINALITY_REPEATED:3}}}},Enum:{fields:{name:{type:"string",id:1},enumvalue:{rule:"repeated",type:"EnumValue",id:2},options:{rule:"repeated",type:"Option",id:3},sourceContext:{type:"SourceContext",id:4},syntax:{type:"Syntax",id:5}}},EnumValue:{fields:{name:{type:"string",id:1},number:{type:"int32",id:2},options:{rule:"repeated",type:"Option",id:3}}},Option:{fields:{name:{type:"string",id:1},value:{type:"Any",id:2}}},Syntax:{values:{SYNTAX_PROTO2:0,SYNTAX_PROTO3:1}},Any:{fields:{type_url:{type:"string",id:1},value:{type:"bytes",id:2}}},SourceContext:{fields:{fileName:{type:"string",id:1}}}}}}}}}});var z2=N(ma=>{"use strict";Object.defineProperty(ma,"__esModule",{value:!0});ma.addCommonProtos=ma.loadProtosWithOptionsSync=ma.loadProtosWithOptions=void 0;var q2=Ae("fs"),J2=Ae("path"),eu=Gf();function V2(e,t){let n=e.resolvePath;e.resolvePath=(r,i)=>{if(J2.isAbsolute(i))return i;for(let a of t){let s=J2.join(a,i);try{return q2.accessSync(s,q2.constants.R_OK),s}catch{continue}}return process.emitWarning(`${i} not found in any of the include paths ${t}`),n(r,i)}}async function t8(e,t){let n=new eu.Root;if(t=t||{},t.includeDirs){if(!Array.isArray(t.includeDirs))return Promise.reject(new Error("The includeDirs option must be an array"));V2(n,t.includeDirs)}let r=await n.load(e,t);return r.resolveAll(),r}ma.loadProtosWithOptions=t8;function n8(e,t){let n=new eu.Root;if(t=t||{},t.includeDirs){if(!Array.isArray(t.includeDirs))throw new Error("The includeDirs option must be an array");V2(n,t.includeDirs)}let r=n.loadSync(e,t);return r.resolveAll(),r}ma.loadProtosWithOptionsSync=n8;function r8(){let e=L2(),t=Ky(),n=Q2(),r=U2();eu.common("api",e.nested.google.nested.protobuf.nested),eu.common("descriptor",t.nested.google.nested.protobuf.nested),eu.common("source_context",n.nested.google.nested.protobuf.nested),eu.common("type",r.nested.google.nested.protobuf.nested)}ma.addCommonProtos=r8});var H2=N((W2,ev)=>{var G2=function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.default=void 0;var t=null;try{t=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function n(M,y,R){this.low=M|0,this.high=y|0,this.unsigned=!!R}n.prototype.__isLong__,Object.defineProperty(n.prototype,"__isLong__",{value:!0});function r(M){return(M&&M.__isLong__)===!0}function i(M){var y=Math.clz32(M&-M);return M?31-y:y}n.isLong=r;var a={},s={};function o(M,y){var R,J,Y;return y?(M>>>=0,(Y=0<=M&&M<256)&&(J=s[M],J)?J:(R=u(M,0,!0),Y&&(s[M]=R),R)):(M|=0,(Y=-128<=M&&M<128)&&(J=a[M],J)?J:(R=u(M,M<0?-1:0,!1),Y&&(a[M]=R),R))}n.fromInt=o;function c(M,y){if(isNaN(M))return y?O:B;if(y){if(M<0)return O;if(M>=S)return fe}else{if(M<=-b)return ne;if(M+1>=b)return Z}return M<0?c(-M,y).neg():u(M%A|0,M/A|0,y)}n.fromNumber=c;function u(M,y,R){return new n(M,y,R)}n.fromBits=u;var d=Math.pow;function p(M,y,R){if(M.length===0)throw Error("empty string");if(typeof y=="number"?(R=y,y=!1):y=!!y,M==="NaN"||M==="Infinity"||M==="+Infinity"||M==="-Infinity")return y?O:B;if(R=R||10,R<2||36<R)throw RangeError("radix");var J;if((J=M.indexOf("-"))>0)throw Error("interior hyphen");if(J===0)return p(M.substring(1),y,R).neg();for(var Y=c(d(R,8)),re=B,ae=0;ae<M.length;ae+=8){var ce=Math.min(8,M.length-ae),Ee=parseInt(M.substring(ae,ae+ce),R);if(ce<8){var Ce=c(d(R,ce));re=re.mul(Ce).add(c(Ee))}else re=re.mul(Y),re=re.add(c(Ee))}return re.unsigned=y,re}n.fromString=p;function h(M,y){return typeof M=="number"?c(M,y):typeof M=="string"?p(M,y):u(M.low,M.high,typeof y=="boolean"?y:M.unsigned)}n.fromValue=h;var _=65536,w=1<<24,A=_*_,S=A*A,b=S/2,T=o(w),B=o(0);n.ZERO=B;var O=o(0,!0);n.UZERO=O;var z=o(1);n.ONE=z;var Q=o(1,!0);n.UONE=Q;var V=o(-1);n.NEG_ONE=V;var Z=u(-1,2147483647,!1);n.MAX_VALUE=Z;var fe=u(-1,-1,!0);n.MAX_UNSIGNED_VALUE=fe;var ne=u(0,-2147483648,!1);n.MIN_VALUE=ne;var k=n.prototype;k.toInt=function(){return this.unsigned?this.low>>>0:this.low},k.toNumber=function(){return this.unsigned?(this.high>>>0)*A+(this.low>>>0):this.high*A+(this.low>>>0)},k.toString=function(y){if(y=y||10,y<2||36<y)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(ne)){var R=c(y),J=this.div(R),Y=J.mul(R).sub(this);return J.toString(y)+Y.toInt().toString(y)}else return"-"+this.neg().toString(y);for(var re=c(d(y,6),this.unsigned),ae=this,ce="";;){var Ee=ae.div(re),Ce=ae.sub(Ee.mul(re)).toInt()>>>0,Fe=Ce.toString(y);if(ae=Ee,ae.isZero())return Fe+ce;for(;Fe.length<6;)Fe="0"+Fe;ce=""+Fe+ce}},k.getHighBits=function(){return this.high},k.getHighBitsUnsigned=function(){return this.high>>>0},k.getLowBits=function(){return this.low},k.getLowBitsUnsigned=function(){return this.low>>>0},k.getNumBitsAbs=function(){if(this.isNegative())return this.eq(ne)?64:this.neg().getNumBitsAbs();for(var y=this.high!=0?this.high:this.low,R=31;R>0&&!(y&1<<R);R--);return this.high!=0?R+33:R+1},k.isZero=function(){return this.high===0&&this.low===0},k.eqz=k.isZero,k.isNegative=function(){return!this.unsigned&&this.high<0},k.isPositive=function(){return this.unsigned||this.high>=0},k.isOdd=function(){return(this.low&1)===1},k.isEven=function(){return(this.low&1)===0},k.equals=function(y){return r(y)||(y=h(y)),this.unsigned!==y.unsigned&&this.high>>>31===1&&y.high>>>31===1?!1:this.high===y.high&&this.low===y.low},k.eq=k.equals,k.notEquals=function(y){return!this.eq(y)},k.neq=k.notEquals,k.ne=k.notEquals,k.lessThan=function(y){return this.comp(y)<0},k.lt=k.lessThan,k.lessThanOrEqual=function(y){return this.comp(y)<=0},k.lte=k.lessThanOrEqual,k.le=k.lessThanOrEqual,k.greaterThan=function(y){return this.comp(y)>0},k.gt=k.greaterThan,k.greaterThanOrEqual=function(y){return this.comp(y)>=0},k.gte=k.greaterThanOrEqual,k.ge=k.greaterThanOrEqual,k.compare=function(y){if(r(y)||(y=h(y)),this.eq(y))return 0;var R=this.isNegative(),J=y.isNegative();return R&&!J?-1:!R&&J?1:this.unsigned?y.high>>>0>this.high>>>0||y.high===this.high&&y.low>>>0>this.low>>>0?-1:1:this.sub(y).isNegative()?-1:1},k.comp=k.compare,k.negate=function(){return!this.unsigned&&this.eq(ne)?ne:this.not().add(z)},k.neg=k.negate,k.add=function(y){r(y)||(y=h(y));var R=this.high>>>16,J=this.high&65535,Y=this.low>>>16,re=this.low&65535,ae=y.high>>>16,ce=y.high&65535,Ee=y.low>>>16,Ce=y.low&65535,Fe=0,qe=0,Je=0,ot=0;return ot+=re+Ce,Je+=ot>>>16,ot&=65535,Je+=Y+Ee,qe+=Je>>>16,Je&=65535,qe+=J+ce,Fe+=qe>>>16,qe&=65535,Fe+=R+ae,Fe&=65535,u(Je<<16|ot,Fe<<16|qe,this.unsigned)},k.subtract=function(y){return r(y)||(y=h(y)),this.add(y.neg())},k.sub=k.subtract,k.multiply=function(y){if(this.isZero())return this;if(r(y)||(y=h(y)),t){var R=t.mul(this.low,this.high,y.low,y.high);return u(R,t.get_high(),this.unsigned)}if(y.isZero())return this.unsigned?O:B;if(this.eq(ne))return y.isOdd()?ne:B;if(y.eq(ne))return this.isOdd()?ne:B;if(this.isNegative())return y.isNegative()?this.neg().mul(y.neg()):this.neg().mul(y).neg();if(y.isNegative())return this.mul(y.neg()).neg();if(this.lt(T)&&y.lt(T))return c(this.toNumber()*y.toNumber(),this.unsigned);var J=this.high>>>16,Y=this.high&65535,re=this.low>>>16,ae=this.low&65535,ce=y.high>>>16,Ee=y.high&65535,Ce=y.low>>>16,Fe=y.low&65535,qe=0,Je=0,ot=0,Yt=0;return Yt+=ae*Fe,ot+=Yt>>>16,Yt&=65535,ot+=re*Fe,Je+=ot>>>16,ot&=65535,ot+=ae*Ce,Je+=ot>>>16,ot&=65535,Je+=Y*Fe,qe+=Je>>>16,Je&=65535,Je+=re*Ce,qe+=Je>>>16,Je&=65535,Je+=ae*Ee,qe+=Je>>>16,Je&=65535,qe+=J*Fe+Y*Ce+re*Ee+ae*ce,qe&=65535,u(ot<<16|Yt,qe<<16|Je,this.unsigned)},k.mul=k.multiply,k.divide=function(y){if(r(y)||(y=h(y)),y.isZero())throw Error("division by zero");if(t){if(!this.unsigned&&this.high===-2147483648&&y.low===-1&&y.high===-1)return this;var R=(this.unsigned?t.div_u:t.div_s)(this.low,this.high,y.low,y.high);return u(R,t.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?O:B;var J,Y,re;if(this.unsigned){if(y.unsigned||(y=y.toUnsigned()),y.gt(this))return O;if(y.gt(this.shru(1)))return Q;re=O}else{if(this.eq(ne)){if(y.eq(z)||y.eq(V))return ne;if(y.eq(ne))return z;var ae=this.shr(1);return J=ae.div(y).shl(1),J.eq(B)?y.isNegative()?z:V:(Y=this.sub(y.mul(J)),re=J.add(Y.div(y)),re)}else if(y.eq(ne))return this.unsigned?O:B;if(this.isNegative())return y.isNegative()?this.neg().div(y.neg()):this.neg().div(y).neg();if(y.isNegative())return this.div(y.neg()).neg();re=B}for(Y=this;Y.gte(y);){J=Math.max(1,Math.floor(Y.toNumber()/y.toNumber()));for(var ce=Math.ceil(Math.log(J)/Math.LN2),Ee=ce<=48?1:d(2,ce-48),Ce=c(J),Fe=Ce.mul(y);Fe.isNegative()||Fe.gt(Y);)J-=Ee,Ce=c(J,this.unsigned),Fe=Ce.mul(y);Ce.isZero()&&(Ce=z),re=re.add(Ce),Y=Y.sub(Fe)}return re},k.div=k.divide,k.modulo=function(y){if(r(y)||(y=h(y)),t){var R=(this.unsigned?t.rem_u:t.rem_s)(this.low,this.high,y.low,y.high);return u(R,t.get_high(),this.unsigned)}return this.sub(this.div(y).mul(y))},k.mod=k.modulo,k.rem=k.modulo,k.not=function(){return u(~this.low,~this.high,this.unsigned)},k.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32},k.clz=k.countLeadingZeros,k.countTrailingZeros=function(){return this.low?i(this.low):i(this.high)+32},k.ctz=k.countTrailingZeros,k.and=function(y){return r(y)||(y=h(y)),u(this.low&y.low,this.high&y.high,this.unsigned)},k.or=function(y){return r(y)||(y=h(y)),u(this.low|y.low,this.high|y.high,this.unsigned)},k.xor=function(y){return r(y)||(y=h(y)),u(this.low^y.low,this.high^y.high,this.unsigned)},k.shiftLeft=function(y){return r(y)&&(y=y.toInt()),(y&=63)===0?this:y<32?u(this.low<<y,this.high<<y|this.low>>>32-y,this.unsigned):u(0,this.low<<y-32,this.unsigned)},k.shl=k.shiftLeft,k.shiftRight=function(y){return r(y)&&(y=y.toInt()),(y&=63)===0?this:y<32?u(this.low>>>y|this.high<<32-y,this.high>>y,this.unsigned):u(this.high>>y-32,this.high>=0?0:-1,this.unsigned)},k.shr=k.shiftRight,k.shiftRightUnsigned=function(y){return r(y)&&(y=y.toInt()),(y&=63)===0?this:y<32?u(this.low>>>y|this.high<<32-y,this.high>>>y,this.unsigned):y===32?u(this.high,0,this.unsigned):u(this.high>>>y-32,0,this.unsigned)},k.shru=k.shiftRightUnsigned,k.shr_u=k.shiftRightUnsigned,k.rotateLeft=function(y){var R;return r(y)&&(y=y.toInt()),(y&=63)===0?this:y===32?u(this.high,this.low,this.unsigned):y<32?(R=32-y,u(this.low<<y|this.high>>>R,this.high<<y|this.low>>>R,this.unsigned)):(y-=32,R=32-y,u(this.high<<y|this.low>>>R,this.low<<y|this.high>>>R,this.unsigned))},k.rotl=k.rotateLeft,k.rotateRight=function(y){var R;return r(y)&&(y=y.toInt()),(y&=63)===0?this:y===32?u(this.high,this.low,this.unsigned):y<32?(R=32-y,u(this.high<<R|this.low>>>y,this.low<<R|this.high>>>y,this.unsigned)):(y-=32,R=32-y,u(this.low<<R|this.high>>>y,this.high<<R|this.low>>>y,this.unsigned))},k.rotr=k.rotateRight,k.toSigned=function(){return this.unsigned?u(this.low,this.high,!1):this},k.toUnsigned=function(){return this.unsigned?this:u(this.low,this.high,!0)},k.toBytes=function(y){return y?this.toBytesLE():this.toBytesBE()},k.toBytesLE=function(){var y=this.high,R=this.low;return[R&255,R>>>8&255,R>>>16&255,R>>>24,y&255,y>>>8&255,y>>>16&255,y>>>24]},k.toBytesBE=function(){var y=this.high,R=this.low;return[y>>>24,y>>>16&255,y>>>8&255,y&255,R>>>24,R>>>16&255,R>>>8&255,R&255]},n.fromBytes=function(y,R,J){return J?n.fromBytesLE(y,R):n.fromBytesBE(y,R)},n.fromBytesLE=function(y,R){return new n(y[0]|y[1]<<8|y[2]<<16|y[3]<<24,y[4]|y[5]<<8|y[6]<<16|y[7]<<24,R)},n.fromBytesBE=function(y,R){return new n(y[4]<<24|y[5]<<16|y[6]<<8|y[7],y[0]<<24|y[1]<<16|y[2]<<8|y[3],R)};var pe=n;return e.default=pe,"default"in e?e.default:e}({});typeof define=="function"&&define.amd?define([],function(){return G2}):typeof ev=="object"&&typeof W2=="object"&&(ev.exports=G2)});var ek=N(Et=>{"use strict";Object.defineProperty(Et,"__esModule",{value:!0});Et.loadFileDescriptorSetFromObject=Et.loadFileDescriptorSetFromBuffer=Et.fromJSON=Et.loadSync=Et.load=Et.IdempotencyLevel=Et.isAnyExtension=Et.Long=void 0;var i8=IR(),ii=Gf(),nv=F2(),rv=z2(),a8=H2();Et.Long=a8;function s8(e){return"@type"in e&&typeof e["@type"]=="string"}Et.isAnyExtension=s8;var Y2;(function(e){e.IDEMPOTENCY_UNKNOWN="IDEMPOTENCY_UNKNOWN",e.NO_SIDE_EFFECTS="NO_SIDE_EFFECTS",e.IDEMPOTENT="IDEMPOTENT"})(Y2=Et.IdempotencyLevel||(Et.IdempotencyLevel={}));var $2={longs:String,enums:String,bytes:String,defaults:!0,oneofs:!0,json:!0};function o8(e,t){return e===""?t:e+"."+t}function c8(e){return e instanceof ii.Service||e instanceof ii.Type||e instanceof ii.Enum}function u8(e){return e instanceof ii.Namespace||e instanceof ii.Root}function K2(e,t){let n=o8(t,e.name);return c8(e)?[[n,e]]:u8(e)&&typeof e.nested<"u"?Object.keys(e.nested).map(r=>K2(e.nested[r],n)).reduce((r,i)=>r.concat(i),[]):[]}function Z2(e,t){return function(r){return e.toObject(e.decode(r),t)}}function X2(e){return function(n){if(Array.isArray(n))throw new Error(`Failed to serialize message: expected object with ${e.name} structure, got array instead`);let r=e.fromObject(n);return e.encode(r).finish()}}function l8(e){return(e||[]).reduce((t,n)=>{for(let[r,i]of Object.entries(n))switch(r){case"uninterpreted_option":t.uninterpreted_option.push(n.uninterpreted_option);break;default:t[r]=i}return t},{deprecated:!1,idempotency_level:Y2.IDEMPOTENCY_UNKNOWN,uninterpreted_option:[]})}function d8(e,t,n,r){let i=e.resolvedRequestType,a=e.resolvedResponseType;return{path:"/"+t+"/"+e.name,requestStream:!!e.requestStream,responseStream:!!e.responseStream,requestSerialize:X2(i),requestDeserialize:Z2(i,n),responseSerialize:X2(a),responseDeserialize:Z2(a,n),originalName:i8(e.name),requestType:tv(i,r),responseType:tv(a,r),options:l8(e.parsedOptions)}}function f8(e,t,n,r){let i={};for(let a of e.methodsArray)i[a.name]=d8(a,t,n,r);return i}function tv(e,t){let n=e.toDescriptor("proto3");return{format:"Protocol Buffer 3 DescriptorProto",type:n.$type.toObject(n,$2),fileDescriptorProtos:t}}function p8(e,t){let n=e.toDescriptor("proto3");return{format:"Protocol Buffer 3 EnumDescriptorProto",type:n.$type.toObject(n,$2),fileDescriptorProtos:t}}function h8(e,t,n,r){if(e instanceof ii.Service)return f8(e,t,n,r);if(e instanceof ii.Type)return tv(e,r);if(e instanceof ii.Enum)return p8(e,r);throw new Error("Type mismatch in reflection object handling")}function Zf(e,t){let n={};e.resolveAll();let i=e.toDescriptor("proto3").file.map(a=>Buffer.from(nv.FileDescriptorProto.encode(a).finish()));for(let[a,s]of K2(e,""))n[a]=h8(s,a,t,i);return n}function j2(e,t){t=t||{};let n=ii.Root.fromDescriptor(e);return n.resolveAll(),Zf(n,t)}function m8(e,t){return(0,rv.loadProtosWithOptions)(e,t).then(n=>Zf(n,t))}Et.load=m8;function g8(e,t){let n=(0,rv.loadProtosWithOptionsSync)(e,t);return Zf(n,t)}Et.loadSync=g8;function _8(e,t){t=t||{};let n=ii.Root.fromJSON(e);return n.resolveAll(),Zf(n,t)}Et.fromJSON=_8;function A8(e,t){let n=nv.FileDescriptorSet.decode(e);return j2(n,t)}Et.loadFileDescriptorSetFromBuffer=A8;function y8(e,t){let n=nv.FileDescriptorSet.fromObject(e);return j2(n,t)}Et.loadFileDescriptorSetFromObject=y8;(0,rv.addCommonProtos)()});var cs=N(Ue=>{"use strict";Object.defineProperty(Ue,"__esModule",{value:!0});Ue.setup=Ue.getChannelzServiceDefinition=Ue.getChannelzHandlers=Ue.unregisterChannelzRef=Ue.registerChannelzSocket=Ue.registerChannelzServer=Ue.registerChannelzSubchannel=Ue.registerChannelzChannel=Ue.ChannelzCallTrackerStub=Ue.ChannelzCallTracker=Ue.ChannelzChildrenTrackerStub=Ue.ChannelzChildrenTracker=Ue.ChannelzTrace=Ue.ChannelzTraceStub=void 0;var tk=Ae("net"),os=(HN(),nr(WN)),gl=Vn(),_l=Pe(),v8=Ir(),w8=wf(),b8=gy();function iv(e){return{channel_id:e.id,name:e.name}}function uv(e){return{subchannel_id:e.id,name:e.name}}function E8(e){return{server_id:e.id}}function Kf(e){return{socket_id:e.id,name:e.name}}var nk=32,lv=100,av=class{constructor(){this.events=[],this.creationTimestamp=new Date,this.eventsLogged=0}addTrace(){}getTraceMessage(){return{creation_timestamp:ai(this.creationTimestamp),num_events_logged:this.eventsLogged,events:[]}}};Ue.ChannelzTraceStub=av;var sv=class{constructor(){this.events=[],this.eventsLogged=0,this.creationTimestamp=new Date}addTrace(t,n,r){let i=new Date;this.events.push({description:n,severity:t,timestamp:i,childChannel:r?.kind==="channel"?r:void 0,childSubchannel:r?.kind==="subchannel"?r:void 0}),this.events.length>=nk*2&&(this.events=this.events.slice(nk)),this.eventsLogged+=1}getTraceMessage(){return{creation_timestamp:ai(this.creationTimestamp),num_events_logged:this.eventsLogged,events:this.events.map(t=>({description:t.description,severity:t.severity,timestamp:ai(t.timestamp),channel_ref:t.childChannel?iv(t.childChannel):null,subchannel_ref:t.childSubchannel?uv(t.childSubchannel):null}))}}};Ue.ChannelzTrace=sv;var Yf=class{constructor(){this.channelChildren=new os.OrderedMap,this.subchannelChildren=new os.OrderedMap,this.socketChildren=new os.OrderedMap,this.trackerMap={channel:this.channelChildren,subchannel:this.subchannelChildren,socket:this.socketChildren}}refChild(t){let n=this.trackerMap[t.kind],r=n.find(t.id);r.equals(n.end())?n.setElement(t.id,{ref:t,count:1},r):r.pointer[1].count+=1}unrefChild(t){let n=this.trackerMap[t.kind],r=n.getElementByKey(t.id);r!==void 0&&(r.count-=1,r.count===0&&n.eraseElementByKey(t.id))}getChildLists(){return{channels:this.channelChildren,subchannels:this.subchannelChildren,sockets:this.socketChildren}}};Ue.ChannelzChildrenTracker=Yf;var ov=class extends Yf{refChild(){}unrefChild(){}};Ue.ChannelzChildrenTrackerStub=ov;var $f=class{constructor(){this.callsStarted=0,this.callsSucceeded=0,this.callsFailed=0,this.lastCallStartedTimestamp=null}addCallStarted(){this.callsStarted+=1,this.lastCallStartedTimestamp=new Date}addCallSucceeded(){this.callsSucceeded+=1}addCallFailed(){this.callsFailed+=1}};Ue.ChannelzCallTracker=$f;var cv=class extends $f{addCallStarted(){}addCallSucceeded(){}addCallFailed(){}};Ue.ChannelzCallTrackerStub=cv;var Ri={channel:new os.OrderedMap,subchannel:new os.OrderedMap,server:new os.OrderedMap,socket:new os.OrderedMap},jf=e=>{let t=1;function n(){return t++}let r=Ri[e];return(i,a,s)=>{let o=n(),c={id:o,name:i,kind:e};return s&&r.setElement(o,{ref:c,getInfo:a}),c}};Ue.registerChannelzChannel=jf("channel");Ue.registerChannelzSubchannel=jf("subchannel");Ue.registerChannelzServer=jf("server");Ue.registerChannelzSocket=jf("socket");function C8(e){Ri[e.kind].eraseElementByKey(e.id)}Ue.unregisterChannelzRef=C8;function I8(e){let t=Number.parseInt(e,16);return[t/256|0,t%256]}function rk(e){if(e==="")return[];let t=e.split(":").map(r=>I8(r));return[].concat(...t)}function S8(e){if((0,tk.isIPv4)(e))return Buffer.from(Uint8Array.from(e.split(".").map(t=>Number.parseInt(t))));if((0,tk.isIPv6)(e)){let t,n,r=e.indexOf("::");r===-1?(t=e,n=""):(t=e.substring(0,r),n=e.substring(r+2));let i=Buffer.from(rk(t)),a=Buffer.from(rk(n)),s=Buffer.alloc(16-i.length-a.length,0);return Buffer.concat([i,s,a])}else return null}function ak(e){switch(e){case gl.ConnectivityState.CONNECTING:return{state:"CONNECTING"};case gl.ConnectivityState.IDLE:return{state:"IDLE"};case gl.ConnectivityState.READY:return{state:"READY"};case gl.ConnectivityState.SHUTDOWN:return{state:"SHUTDOWN"};case gl.ConnectivityState.TRANSIENT_FAILURE:return{state:"TRANSIENT_FAILURE"};default:return{state:"UNKNOWN"}}}function ai(e){if(!e)return null;let t=e.getTime();return{seconds:t/1e3|0,nanos:t%1e3*1e6}}function sk(e){let t=e.getInfo(),n=[],r=[];return t.children.channels.forEach(i=>{n.push(iv(i[1].ref))}),t.children.subchannels.forEach(i=>{r.push(uv(i[1].ref))}),{ref:iv(e.ref),data:{target:t.target,state:ak(t.state),calls_started:t.callTracker.callsStarted,calls_succeeded:t.callTracker.callsSucceeded,calls_failed:t.callTracker.callsFailed,last_call_started_timestamp:ai(t.callTracker.lastCallStartedTimestamp),trace:t.trace.getTraceMessage()},channel_ref:n,subchannel_ref:r}}function x8(e,t){let n=parseInt(e.request.channel_id,10),r=Ri.channel.getElementByKey(n);if(r===void 0){t({code:_l.Status.NOT_FOUND,details:"No channel data found for id "+n});return}t(null,{channel:sk(r)})}function T8(e,t){let n=parseInt(e.request.max_results,10)||lv,r=[],i=parseInt(e.request.start_channel_id,10),a=Ri.channel,s;for(s=a.lowerBound(i);!s.equals(a.end())&&r.length<n;s=s.next())r.push(sk(s.pointer[1]));t(null,{channel:r,end:s.equals(a.end())})}function ok(e){let t=e.getInfo(),n=[];return t.listenerChildren.sockets.forEach(r=>{n.push(Kf(r[1].ref))}),{ref:E8(e.ref),data:{calls_started:t.callTracker.callsStarted,calls_succeeded:t.callTracker.callsSucceeded,calls_failed:t.callTracker.callsFailed,last_call_started_timestamp:ai(t.callTracker.lastCallStartedTimestamp),trace:t.trace.getTraceMessage()},listen_socket:n}}function N8(e,t){let n=parseInt(e.request.server_id,10),i=Ri.server.getElementByKey(n);if(i===void 0){t({code:_l.Status.NOT_FOUND,details:"No server data found for id "+n});return}t(null,{server:ok(i)})}function R8(e,t){let n=parseInt(e.request.max_results,10)||lv,r=parseInt(e.request.start_server_id,10),i=Ri.server,a=[],s;for(s=i.lowerBound(r);!s.equals(i.end())&&a.length<n;s=s.next())a.push(ok(s.pointer[1]));t(null,{server:a,end:s.equals(i.end())})}function k8(e,t){let n=parseInt(e.request.subchannel_id,10),r=Ri.subchannel.getElementByKey(n);if(r===void 0){t({code:_l.Status.NOT_FOUND,details:"No subchannel data found for id "+n});return}let i=r.getInfo(),a=[];i.children.sockets.forEach(o=>{a.push(Kf(o[1].ref))});let s={ref:uv(r.ref),data:{target:i.target,state:ak(i.state),calls_started:i.callTracker.callsStarted,calls_succeeded:i.callTracker.callsSucceeded,calls_failed:i.callTracker.callsFailed,last_call_started_timestamp:ai(i.callTracker.lastCallStartedTimestamp),trace:i.trace.getTraceMessage()},socket_ref:a};t(null,{subchannel:s})}function ik(e){var t;return(0,v8.isTcpSubchannelAddress)(e)?{address:"tcpip_address",tcpip_address:{ip_address:(t=S8(e.host))!==null&&t!==void 0?t:void 0,port:e.port}}:{address:"uds_address",uds_address:{filename:e.path}}}function B8(e,t){var n,r,i,a,s;let o=parseInt(e.request.socket_id,10),c=Ri.socket.getElementByKey(o);if(c===void 0){t({code:_l.Status.NOT_FOUND,details:"No socket data found for id "+o});return}let u=c.getInfo(),d=u.security?{model:"tls",tls:{cipher_suite:u.security.cipherSuiteStandardName?"standard_name":"other_name",standard_name:(n=u.security.cipherSuiteStandardName)!==null&&n!==void 0?n:void 0,other_name:(r=u.security.cipherSuiteOtherName)!==null&&r!==void 0?r:void 0,local_certificate:(i=u.security.localCertificate)!==null&&i!==void 0?i:void 0,remote_certificate:(a=u.security.remoteCertificate)!==null&&a!==void 0?a:void 0}}:null,p={ref:Kf(c.ref),local:u.localAddress?ik(u.localAddress):null,remote:u.remoteAddress?ik(u.remoteAddress):null,remote_name:(s=u.remoteName)!==null&&s!==void 0?s:void 0,security:d,data:{keep_alives_sent:u.keepAlivesSent,streams_started:u.streamsStarted,streams_succeeded:u.streamsSucceeded,streams_failed:u.streamsFailed,last_local_stream_created_timestamp:ai(u.lastLocalStreamCreatedTimestamp),last_remote_stream_created_timestamp:ai(u.lastRemoteStreamCreatedTimestamp),messages_received:u.messagesReceived,messages_sent:u.messagesSent,last_message_received_timestamp:ai(u.lastMessageReceivedTimestamp),last_message_sent_timestamp:ai(u.lastMessageSentTimestamp),local_flow_control_window:u.localFlowControlWindow?{value:u.localFlowControlWindow}:null,remote_flow_control_window:u.remoteFlowControlWindow?{value:u.remoteFlowControlWindow}:null}};t(null,{socket:p})}function O8(e,t){let n=parseInt(e.request.server_id,10),r=Ri.server.getElementByKey(n);if(r===void 0){t({code:_l.Status.NOT_FOUND,details:"No server data found for id "+n});return}let i=parseInt(e.request.start_socket_id,10),a=parseInt(e.request.max_results,10)||lv,o=r.getInfo().sessionChildren.sockets,c=[],u;for(u=o.lowerBound(i);!u.equals(o.end())&&c.length<a;u=u.next())c.push(Kf(u.pointer[1].ref));t(null,{socket_ref:c,end:u.equals(o.end())})}function ck(){return{GetChannel:x8,GetTopChannels:T8,GetServer:N8,GetServers:R8,GetSubchannel:k8,GetSocket:B8,GetServerSockets:O8}}Ue.getChannelzHandlers=ck;var Xf=null;function uk(){if(Xf)return Xf;let e=ek().loadSync,t=e("channelz.proto",{keepCase:!0,longs:String,enums:String,defaults:!0,oneofs:!0,includeDirs:[`${__dirname}/../../proto`]});return Xf=(0,b8.loadPackageDefinition)(t).grpc.channelz.v1.Channelz.service,Xf}Ue.getChannelzServiceDefinition=uk;function P8(){(0,w8.registerAdminService)(uk,ck)}Ue.setup=P8});var lk=N(tp=>{"use strict";Object.defineProperty(tp,"__esModule",{value:!0});tp.Subchannel=void 0;var $e=Vn(),D8=ju(),dv=it(),ep=Pe(),M8=Sn(),F8=Ir(),si=cs(),L8="subchannel",Q8=~(1<<31),fv=class{constructor(t,n,r,i,a){var s;this.channelTarget=t,this.subchannelAddress=n,this.options=r,this.credentials=i,this.connector=a,this.connectivityState=$e.ConnectivityState.IDLE,this.transport=null,this.continueConnecting=!1,this.stateListeners=new Set,this.refcount=0,this.channelzEnabled=!0;let o={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoffTimeout=new D8.BackoffTimeout(()=>{this.handleBackoffTimer()},o),this.backoffTimeout.unref(),this.subchannelAddressString=(0,F8.subchannelAddressToString)(n),this.keepaliveTime=(s=r["grpc.keepalive_time_ms"])!==null&&s!==void 0?s:-1,r["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new si.ChannelzTraceStub,this.callTracker=new si.ChannelzCallTrackerStub,this.childrenTracker=new si.ChannelzChildrenTrackerStub,this.streamTracker=new si.ChannelzCallTrackerStub):(this.channelzTrace=new si.ChannelzTrace,this.callTracker=new si.ChannelzCallTracker,this.childrenTracker=new si.ChannelzChildrenTracker,this.streamTracker=new si.ChannelzCallTracker),this.channelzRef=(0,si.registerChannelzSubchannel)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Subchannel created"),this.trace("Subchannel constructed with options "+JSON.stringify(r,void 0,2))}getChannelzInfo(){return{state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists(),target:this.subchannelAddressString}}trace(t){dv.trace(ep.LogVerbosity.DEBUG,L8,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}refTrace(t){dv.trace(ep.LogVerbosity.DEBUG,"subchannel_refcount","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}handleBackoffTimer(){this.continueConnecting?this.transitionToState([$e.ConnectivityState.TRANSIENT_FAILURE],$e.ConnectivityState.CONNECTING):this.transitionToState([$e.ConnectivityState.TRANSIENT_FAILURE],$e.ConnectivityState.IDLE)}startBackoff(){this.backoffTimeout.runOnce()}stopBackoff(){this.backoffTimeout.stop(),this.backoffTimeout.reset()}startConnectingInternal(){let t=this.options;if(t["grpc.keepalive_time_ms"]){let n=Math.min(this.keepaliveTime,Q8);t=Object.assign(Object.assign({},t),{"grpc.keepalive_time_ms":n})}this.connector.connect(this.subchannelAddress,this.credentials,t).then(n=>{this.transitionToState([$e.ConnectivityState.CONNECTING],$e.ConnectivityState.READY)?(this.transport=n,this.channelzEnabled&&this.childrenTracker.refChild(n.getChannelzRef()),n.addDisconnectListener(r=>{this.transitionToState([$e.ConnectivityState.READY],$e.ConnectivityState.IDLE),r&&this.keepaliveTime>0&&(this.keepaliveTime*=2,dv.log(ep.LogVerbosity.ERROR,`Connection to ${(0,M8.uriToString)(this.channelTarget)} at ${this.subchannelAddressString} rejected by server because of excess pings. Increasing ping interval to ${this.keepaliveTime} ms`))})):n.shutdown()},n=>{this.transitionToState([$e.ConnectivityState.CONNECTING],$e.ConnectivityState.TRANSIENT_FAILURE,`${n}`)})}transitionToState(t,n,r){var i,a;if(t.indexOf(this.connectivityState)===-1)return!1;this.trace($e.ConnectivityState[this.connectivityState]+" -> "+$e.ConnectivityState[n]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+$e.ConnectivityState[n]);let s=this.connectivityState;switch(this.connectivityState=n,n){case $e.ConnectivityState.READY:this.stopBackoff();break;case $e.ConnectivityState.CONNECTING:this.startBackoff(),this.startConnectingInternal(),this.continueConnecting=!1;break;case $e.ConnectivityState.TRANSIENT_FAILURE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(i=this.transport)===null||i===void 0||i.shutdown(),this.transport=null,this.backoffTimeout.isRunning()||process.nextTick(()=>{this.handleBackoffTimer()});break;case $e.ConnectivityState.IDLE:this.channelzEnabled&&this.transport&&this.childrenTracker.unrefChild(this.transport.getChannelzRef()),(a=this.transport)===null||a===void 0||a.shutdown(),this.transport=null;break;default:throw new Error(`Invalid state: unknown ConnectivityState ${n}`)}for(let o of this.stateListeners)o(this,s,n,this.keepaliveTime,r);return!0}ref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount+1)),this.refcount+=1}unref(){this.refTrace("refcount "+this.refcount+" -> "+(this.refcount-1)),this.refcount-=1,this.refcount===0&&(this.channelzTrace.addTrace("CT_INFO","Shutting down"),(0,si.unregisterChannelzRef)(this.channelzRef),process.nextTick(()=>{this.transitionToState([$e.ConnectivityState.CONNECTING,$e.ConnectivityState.READY],$e.ConnectivityState.IDLE)}))}unrefIfOneRef(){return this.refcount===1?(this.unref(),!0):!1}createCall(t,n,r,i){if(!this.transport)throw new Error("Cannot create call, subchannel not READY");let a;return this.channelzEnabled?(this.callTracker.addCallStarted(),this.streamTracker.addCallStarted(),a={onCallEnd:s=>{s.code===ep.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()}}):a={},this.transport.createCall(t,n,r,i,a)}startConnecting(){process.nextTick(()=>{this.transitionToState([$e.ConnectivityState.IDLE],$e.ConnectivityState.CONNECTING)||this.connectivityState===$e.ConnectivityState.TRANSIENT_FAILURE&&(this.continueConnecting=!0)})}getConnectivityState(){return this.connectivityState}addConnectivityStateListener(t){this.stateListeners.add(t)}removeConnectivityStateListener(t){this.stateListeners.delete(t)}resetBackoff(){process.nextTick(()=>{this.backoffTimeout.reset(),this.transitionToState([$e.ConnectivityState.TRANSIENT_FAILURE],$e.ConnectivityState.CONNECTING)})}getAddress(){return this.subchannelAddressString}getChannelzRef(){return this.channelzRef}isHealthy(){return!0}addHealthStateWatcher(t){}removeHealthStateWatcher(t){}getRealSubchannel(){return this}realSubchannelEquals(t){return t.getRealSubchannel()===this}throttleKeepalive(t){t>this.keepaliveTime&&(this.keepaliveTime=t)}};tp.Subchannel=fv});var gv=N(Aa=>{"use strict";Object.defineProperty(Aa,"__esModule",{value:!0});Aa.setup=Aa.DEFAULT_PORT=void 0;var dk=$r(),pk=Ae("dns"),hk=Ae("util"),U8=qA(),pv=Pe(),hv=jt(),q8=it(),J8=Pe(),ga=Sn(),fk=Ae("net"),V8=ju(),z8="dns_resolver";function _a(e){q8.trace(J8.LogVerbosity.DEBUG,z8,e)}Aa.DEFAULT_PORT=443;var G8=3e4,W8=hk.promisify(pk.resolveTxt),H8=hk.promisify(pk.lookup),mv=class{constructor(t,n,r){var i,a,s;this.target=t,this.listener=n,this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.continueResolving=!1,this.isNextResolutionTimerRunning=!1,this.isServiceConfigEnabled=!0,this.returnedIpResult=!1,_a("Resolver constructed for target "+(0,ga.uriToString)(t));let o=(0,ga.splitHostPort)(t.path);o===null?(this.ipResult=null,this.dnsHostname=null,this.port=null):(0,fk.isIPv4)(o.host)||(0,fk.isIPv6)(o.host)?(this.ipResult=[{addresses:[{host:o.host,port:(i=o.port)!==null&&i!==void 0?i:Aa.DEFAULT_PORT}]}],this.dnsHostname=null,this.port=null):(this.ipResult=null,this.dnsHostname=o.host,this.port=(a=o.port)!==null&&a!==void 0?a:Aa.DEFAULT_PORT),this.percentage=Math.random()*100,r["grpc.service_config_disable_resolution"]===1&&(this.isServiceConfigEnabled=!1),this.defaultResolutionError={code:pv.Status.UNAVAILABLE,details:`Name resolution failed for target ${(0,ga.uriToString)(this.target)}`,metadata:new hv.Metadata};let c={initialDelay:r["grpc.initial_reconnect_backoff_ms"],maxDelay:r["grpc.max_reconnect_backoff_ms"]};this.backoff=new V8.BackoffTimeout(()=>{this.continueResolving&&this.startResolutionWithBackoff()},c),this.backoff.unref(),this.minTimeBetweenResolutionsMs=(s=r["grpc.dns_min_time_between_resolutions_ms"])!==null&&s!==void 0?s:G8,this.nextResolutionTimer=setTimeout(()=>{},0),clearTimeout(this.nextResolutionTimer)}startResolution(){if(this.ipResult!==null){this.returnedIpResult||(_a("Returning IP address for target "+(0,ga.uriToString)(this.target)),setImmediate(()=>{this.listener.onSuccessfulResolution(this.ipResult,null,null,null,{})}),this.returnedIpResult=!0),this.backoff.stop(),this.backoff.reset(),this.stopNextResolutionTimer();return}if(this.dnsHostname===null)_a("Failed to parse DNS address "+(0,ga.uriToString)(this.target)),setImmediate(()=>{this.listener.onError({code:pv.Status.UNAVAILABLE,details:`Failed to parse DNS address ${(0,ga.uriToString)(this.target)}`,metadata:new hv.Metadata})}),this.stopNextResolutionTimer();else{if(this.pendingLookupPromise!==null)return;_a("Looking up DNS hostname "+this.dnsHostname),this.latestLookupResult=null;let t=this.dnsHostname;this.pendingLookupPromise=H8(t,{all:!0}),this.pendingLookupPromise.then(n=>{if(this.pendingLookupPromise===null)return;this.pendingLookupPromise=null,this.backoff.reset(),this.backoff.stop();let r=n.map(a=>({host:a.address,port:+this.port}));this.latestLookupResult=r.map(a=>({addresses:[a]}));let i="["+r.map(a=>a.host+":"+a.port).join(",")+"]";if(_a("Resolved addresses for target "+(0,ga.uriToString)(this.target)+": "+i),this.latestLookupResult.length===0){this.listener.onError(this.defaultResolutionError);return}this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})},n=>{this.pendingLookupPromise!==null&&(_a("Resolution error for target "+(0,ga.uriToString)(this.target)+": "+n.message),this.pendingLookupPromise=null,this.stopNextResolutionTimer(),this.listener.onError(this.defaultResolutionError))}),this.isServiceConfigEnabled&&this.pendingTxtPromise===null&&(this.pendingTxtPromise=W8(t),this.pendingTxtPromise.then(n=>{if(this.pendingTxtPromise!==null){this.pendingTxtPromise=null;try{this.latestServiceConfig=(0,U8.extractAndSelectServiceConfig)(n,this.percentage)}catch(r){this.latestServiceConfigError={code:pv.Status.UNAVAILABLE,details:`Parsing service config failed with error ${r.message}`,metadata:new hv.Metadata}}this.latestLookupResult!==null&&this.listener.onSuccessfulResolution(this.latestLookupResult,this.latestServiceConfig,this.latestServiceConfigError,null,{})}},n=>{}))}}startNextResolutionTimer(){var t,n;clearTimeout(this.nextResolutionTimer),this.nextResolutionTimer=setTimeout(()=>{this.stopNextResolutionTimer(),this.continueResolving&&this.startResolutionWithBackoff()},this.minTimeBetweenResolutionsMs),(n=(t=this.nextResolutionTimer).unref)===null||n===void 0||n.call(t),this.isNextResolutionTimerRunning=!0}stopNextResolutionTimer(){clearTimeout(this.nextResolutionTimer),this.isNextResolutionTimerRunning=!1}startResolutionWithBackoff(){this.pendingLookupPromise===null&&(this.continueResolving=!1,this.backoff.runOnce(),this.startNextResolutionTimer(),this.startResolution())}updateResolution(){this.pendingLookupPromise===null&&(this.isNextResolutionTimerRunning||this.backoff.isRunning()?(this.isNextResolutionTimerRunning?_a('resolution update delayed by "min time between resolutions" rate limit'):_a("resolution update delayed by backoff timer until "+this.backoff.getEndTime().toISOString()),this.continueResolving=!0):this.startResolutionWithBackoff())}destroy(){this.continueResolving=!1,this.backoff.reset(),this.backoff.stop(),this.stopNextResolutionTimer(),this.pendingLookupPromise=null,this.pendingTxtPromise=null,this.latestLookupResult=null,this.latestServiceConfig=null,this.latestServiceConfigError=null,this.returnedIpResult=!1}static getDefaultAuthority(t){return t.path}};function Z8(){(0,dk.registerResolver)("dns",mv),(0,dk.registerDefaultScheme)("dns")}Aa.setup=Z8});var _v=N(ru=>{"use strict";Object.defineProperty(ru,"__esModule",{value:!0});ru.getProxiedConnection=ru.mapProxyName=void 0;var Al=it(),tu=Pe(),X8=$r(),Y8=Ae("http"),$8=Ae("tls"),K8=it(),mk=Ir(),nu=Sn(),j8=Ae("url"),eW=gv(),tW="proxy";function ya(e){K8.trace(tu.LogVerbosity.DEBUG,tW,e)}function nW(){let e="",t="";if(process.env.grpc_proxy)t="grpc_proxy",e=process.env.grpc_proxy;else if(process.env.https_proxy)t="https_proxy",e=process.env.https_proxy;else if(process.env.http_proxy)t="http_proxy",e=process.env.http_proxy;else return{};let n;try{n=new j8.URL(e)}catch{return(0,Al.log)(tu.LogVerbosity.ERROR,`cannot parse value of "${t}" env var`),{}}if(n.protocol!=="http:")return(0,Al.log)(tu.LogVerbosity.ERROR,`"${n.protocol}" scheme not supported in proxy URI`),{};let r=null;n.username&&(n.password?((0,Al.log)(tu.LogVerbosity.INFO,"userinfo found in proxy URI"),r=decodeURIComponent(`${n.username}:${n.password}`)):r=n.username);let i=n.hostname,a=n.port;a===""&&(a="80");let s={address:`${i}:${a}`};return r&&(s.creds=r),ya("Proxy server "+s.address+" set by environment variable "+t),s}function rW(){let e=process.env.no_grpc_proxy,t="no_grpc_proxy";return e||(e=process.env.no_proxy,t="no_proxy"),e?(ya("No proxy server list set by environment variable "+t),e.split(",")):[]}function iW(e,t){var n;let r={target:e,extraOptions:{}};if(((n=t["grpc.enable_http_proxy"])!==null&&n!==void 0?n:1)===0||e.scheme==="unix")return r;let i=nW();if(!i.address)return r;let a=(0,nu.splitHostPort)(e.path);if(!a)return r;let s=a.host;for(let c of rW())if(c===s)return ya("Not using proxy for target in no_proxy list: "+(0,nu.uriToString)(e)),r;let o={"grpc.http_connect_target":(0,nu.uriToString)(e)};return i.creds&&(o["grpc.http_connect_creds"]=i.creds),{target:{scheme:"dns",path:i.address},extraOptions:o}}ru.mapProxyName=iW;function aW(e,t,n){var r;if(!("grpc.http_connect_target"in t))return Promise.resolve({});let i=t["grpc.http_connect_target"],a=(0,nu.parseUri)(i);if(a===null)return Promise.resolve({});let s=(0,nu.splitHostPort)(a.path);if(s===null)return Promise.resolve({});let o=`${s.host}:${(r=s.port)!==null&&r!==void 0?r:eW.DEFAULT_PORT}`,c={method:"CONNECT",path:o},u={Host:o};(0,mk.isTcpSubchannelAddress)(e)?(c.host=e.host,c.port=e.port):c.socketPath=e.path,"grpc.http_connect_creds"in t&&(u["Proxy-Authorization"]="Basic "+Buffer.from(t["grpc.http_connect_creds"]).toString("base64")),c.headers=u;let d=(0,mk.subchannelAddressToString)(e);return ya("Using proxy "+d+" to connect to "+c.path),new Promise((p,h)=>{let _=Y8.request(c);_.once("connect",(w,A,S)=>{var b;if(_.removeAllListeners(),A.removeAllListeners(),w.statusCode===200)if(ya("Successfully connected to "+c.path+" through proxy "+d),S.length>0&&A.unshift(S),"secureContext"in n){let T=(0,X8.getDefaultAuthority)(a),B=(0,nu.splitHostPort)(T),O=(b=B?.host)!==null&&b!==void 0?b:T,z=$8.connect(Object.assign({host:O,servername:O,socket:A},n),()=>{ya("Successfully established a TLS connection to "+c.path+" through proxy "+d),p({socket:z,realTarget:a})});z.on("error",Q=>{ya("Failed to establish a TLS connection to "+c.path+" through proxy "+d+" with error "+Q.message),h()})}else ya("Successfully established a plaintext connection to "+c.path+" through proxy "+d),p({socket:A,realTarget:a});else(0,Al.log)(tu.LogVerbosity.ERROR,"Failed to connect to "+c.path+" through proxy "+d+" with status "+w.statusCode),h()}),_.once("error",w=>{_.removeAllListeners(),(0,Al.log)(tu.LogVerbosity.ERROR,"Failed to connect to proxy "+d+" with error "+w.message),h()}),_.end()})}ru.getProxiedConnection=aW});var yv=N(np=>{"use strict";Object.defineProperty(np,"__esModule",{value:!0});np.StreamDecoder=void 0;var oi;(function(e){e[e.NO_DATA=0]="NO_DATA",e[e.READING_SIZE=1]="READING_SIZE",e[e.READING_MESSAGE=2]="READING_MESSAGE"})(oi||(oi={}));var Av=class{constructor(t){this.maxReadMessageLength=t,this.readState=oi.NO_DATA,this.readCompressFlag=Buffer.alloc(1),this.readPartialSize=Buffer.alloc(4),this.readSizeRemaining=4,this.readMessageSize=0,this.readPartialMessage=[],this.readMessageRemaining=0}write(t){let n=0,r,i=[];for(;n<t.length;)switch(this.readState){case oi.NO_DATA:this.readCompressFlag=t.slice(n,n+1),n+=1,this.readState=oi.READING_SIZE,this.readPartialSize.fill(0),this.readSizeRemaining=4,this.readMessageSize=0,this.readMessageRemaining=0,this.readPartialMessage=[];break;case oi.READING_SIZE:if(r=Math.min(t.length-n,this.readSizeRemaining),t.copy(this.readPartialSize,4-this.readSizeRemaining,n,n+r),this.readSizeRemaining-=r,n+=r,this.readSizeRemaining===0){if(this.readMessageSize=this.readPartialSize.readUInt32BE(0),this.maxReadMessageLength!==-1&&this.readMessageSize>this.maxReadMessageLength)throw new Error(`Received message larger than max (${this.readMessageSize} vs ${this.maxReadMessageLength})`);if(this.readMessageRemaining=this.readMessageSize,this.readMessageRemaining>0)this.readState=oi.READING_MESSAGE;else{let a=Buffer.concat([this.readCompressFlag,this.readPartialSize],5);this.readState=oi.NO_DATA,i.push(a)}}break;case oi.READING_MESSAGE:if(r=Math.min(t.length-n,this.readMessageRemaining),this.readPartialMessage.push(t.slice(n,n+r)),this.readMessageRemaining-=r,n+=r,this.readMessageRemaining===0){let a=[this.readCompressFlag,this.readPartialSize].concat(this.readPartialMessage),s=Buffer.concat(a,this.readMessageSize+5);this.readState=oi.NO_DATA,i.push(s)}break;default:throw new Error("Unexpected read state")}return i}};np.StreamDecoder=Av});var _k=N(rp=>{"use strict";Object.defineProperty(rp,"__esModule",{value:!0});rp.Http2SubchannelCall=void 0;var ki=Ae("http2"),sW=Ae("os"),We=Pe(),Bi=jt(),oW=yv(),cW=it(),uW=Pe(),lW="subchannel_call";function dW(e){for(let[t,n]of Object.entries(sW.constants.errno))if(n===e)return t;return"Unknown system error "+e}function gk(e){let t=`Received HTTP status code ${e}`,n;switch(e){case 400:n=We.Status.INTERNAL;break;case 401:n=We.Status.UNAUTHENTICATED;break;case 403:n=We.Status.PERMISSION_DENIED;break;case 404:n=We.Status.UNIMPLEMENTED;break;case 429:case 502:case 503:case 504:n=We.Status.UNAVAILABLE;break;default:n=We.Status.UNKNOWN}return{code:n,details:t,metadata:new Bi.Metadata}}var vv=class{constructor(t,n,r,i,a){var s;this.http2Stream=t,this.callEventTracker=n,this.listener=r,this.transport=i,this.callId=a,this.isReadFilterPending=!1,this.isPushPending=!1,this.canPush=!1,this.readsClosed=!1,this.statusOutput=!1,this.unpushedReadMessages=[],this.finalStatus=null,this.internalError=null,this.serverEndedCall=!1;let o=(s=i.getOptions()["grpc.max_receive_message_length"])!==null&&s!==void 0?s:We.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH;this.decoder=new oW.StreamDecoder(o),t.on("response",(c,u)=>{let d="";for(let p of Object.keys(c))d+=" "+p+": "+c[p]+`
18
+ `;if(this.trace(`Received server headers:
19
+ `+d),this.httpStatusCode=c[":status"],u&ki.constants.NGHTTP2_FLAG_END_STREAM)this.handleTrailers(c);else{let p;try{p=Bi.Metadata.fromHttp2Headers(c)}catch(h){this.endCall({code:We.Status.UNKNOWN,details:h.message,metadata:new Bi.Metadata});return}this.listener.onReceiveMetadata(p)}}),t.on("trailers",c=>{this.handleTrailers(c)}),t.on("data",c=>{if(this.statusOutput)return;this.trace("receive HTTP/2 data frame of length "+c.length);let u;try{u=this.decoder.write(c)}catch(d){this.cancelWithStatus(We.Status.RESOURCE_EXHAUSTED,d.message);return}for(let d of u)this.trace("parsed message of length "+d.length),this.callEventTracker.addMessageReceived(),this.tryPush(d)}),t.on("end",()=>{this.readsClosed=!0,this.maybeOutputStatus()}),t.on("close",()=>{this.serverEndedCall=!0,process.nextTick(()=>{var c;if(this.trace("HTTP/2 stream closed with code "+t.rstCode),((c=this.finalStatus)===null||c===void 0?void 0:c.code)===We.Status.OK)return;let u,d="";switch(t.rstCode){case ki.constants.NGHTTP2_NO_ERROR:if(this.finalStatus!==null)return;if(this.httpStatusCode&&this.httpStatusCode!==200){let p=gk(this.httpStatusCode);u=p.code,d=p.details}else u=We.Status.INTERNAL,d=`Received RST_STREAM with code ${t.rstCode} (Call ended without gRPC status)`;break;case ki.constants.NGHTTP2_REFUSED_STREAM:u=We.Status.UNAVAILABLE,d="Stream refused by server";break;case ki.constants.NGHTTP2_CANCEL:u=We.Status.CANCELLED,d="Call cancelled";break;case ki.constants.NGHTTP2_ENHANCE_YOUR_CALM:u=We.Status.RESOURCE_EXHAUSTED,d="Bandwidth exhausted or memory limit exceeded";break;case ki.constants.NGHTTP2_INADEQUATE_SECURITY:u=We.Status.PERMISSION_DENIED,d="Protocol not secure enough";break;case ki.constants.NGHTTP2_INTERNAL_ERROR:u=We.Status.INTERNAL,this.internalError===null?d=`Received RST_STREAM with code ${t.rstCode} (Internal server error)`:this.internalError.code==="ECONNRESET"||this.internalError.code==="ETIMEDOUT"?(u=We.Status.UNAVAILABLE,d=this.internalError.message):d=`Received RST_STREAM with code ${t.rstCode} triggered by internal client error: ${this.internalError.message}`;break;default:u=We.Status.INTERNAL,d=`Received RST_STREAM with code ${t.rstCode}`}this.endCall({code:u,details:d,metadata:new Bi.Metadata,rstCode:t.rstCode})})}),t.on("error",c=>{c.code!=="ERR_HTTP2_STREAM_ERROR"&&(this.trace("Node error event: message="+c.message+" code="+c.code+" errno="+dW(c.errno)+" syscall="+c.syscall),this.internalError=c),this.callEventTracker.onStreamEnd(!1)})}getDeadlineInfo(){return[`remote_addr=${this.getPeer()}`]}onDisconnect(){this.endCall({code:We.Status.UNAVAILABLE,details:"Connection dropped",metadata:new Bi.Metadata})}outputStatus(){this.statusOutput||(this.statusOutput=!0,this.trace("ended with status: code="+this.finalStatus.code+' details="'+this.finalStatus.details+'"'),this.callEventTracker.onCallEnd(this.finalStatus),process.nextTick(()=>{this.listener.onReceiveStatus(this.finalStatus)}),this.http2Stream.resume())}trace(t){cW.trace(uW.LogVerbosity.DEBUG,lW,"["+this.callId+"] "+t)}endCall(t){(this.finalStatus===null||this.finalStatus.code===We.Status.OK)&&(this.finalStatus=t,this.maybeOutputStatus()),this.destroyHttp2Stream()}maybeOutputStatus(){this.finalStatus!==null&&(this.finalStatus.code!==We.Status.OK||this.readsClosed&&this.unpushedReadMessages.length===0&&!this.isReadFilterPending&&!this.isPushPending)&&this.outputStatus()}push(t){this.trace("pushing to reader message of length "+(t instanceof Buffer?t.length:null)),this.canPush=!1,this.isPushPending=!0,process.nextTick(()=>{this.isPushPending=!1,!this.statusOutput&&(this.listener.onReceiveMessage(t),this.maybeOutputStatus())})}tryPush(t){this.canPush?(this.http2Stream.pause(),this.push(t)):(this.trace("unpushedReadMessages.push message of length "+t.length),this.unpushedReadMessages.push(t))}handleTrailers(t){this.serverEndedCall=!0,this.callEventTracker.onStreamEnd(!0);let n="";for(let s of Object.keys(t))n+=" "+s+": "+t[s]+`
20
+ `;this.trace(`Received server trailers:
21
+ `+n);let r;try{r=Bi.Metadata.fromHttp2Headers(t)}catch{r=new Bi.Metadata}let i=r.getMap(),a;if(typeof i["grpc-status"]=="string"){let s=Number(i["grpc-status"]);this.trace("received status code "+s+" from server"),r.remove("grpc-status");let o="";if(typeof i["grpc-message"]=="string"){try{o=decodeURI(i["grpc-message"])}catch{o=i["grpc-message"]}r.remove("grpc-message"),this.trace('received status details string "'+o+'" from server')}a={code:s,details:o,metadata:r}}else this.httpStatusCode?(a=gk(this.httpStatusCode),a.metadata=r):a={code:We.Status.UNKNOWN,details:"No status information received",metadata:r};this.endCall(a)}destroyHttp2Stream(){var t;if(!this.http2Stream.destroyed)if(this.serverEndedCall)this.http2Stream.end();else{let n;((t=this.finalStatus)===null||t===void 0?void 0:t.code)===We.Status.OK?n=ki.constants.NGHTTP2_NO_ERROR:n=ki.constants.NGHTTP2_CANCEL,this.trace("close http2 stream with code "+n),this.http2Stream.close(n)}}cancelWithStatus(t,n){this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),this.endCall({code:t,details:n,metadata:new Bi.Metadata})}getStatus(){return this.finalStatus}getPeer(){return this.transport.getPeerName()}getCallNumber(){return this.callId}startRead(){if(this.finalStatus!==null&&this.finalStatus.code!==We.Status.OK){this.readsClosed=!0,this.maybeOutputStatus();return}if(this.canPush=!0,this.unpushedReadMessages.length>0){let t=this.unpushedReadMessages.shift();this.push(t);return}this.http2Stream.resume()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length);let r=i=>{process.nextTick(()=>{var a;let s=We.Status.UNAVAILABLE;i?.code==="ERR_STREAM_WRITE_AFTER_END"&&(s=We.Status.INTERNAL),i&&this.cancelWithStatus(s,`Write error: ${i.message}`),(a=t.callback)===null||a===void 0||a.call(t)})};this.trace("sending data chunk of length "+n.length),this.callEventTracker.addMessageSent();try{this.http2Stream.write(n,r)}catch(i){this.endCall({code:We.Status.UNAVAILABLE,details:`Write failed with error ${i.message}`,metadata:new Bi.Metadata})}}halfClose(){this.trace("end() called"),this.trace("calling end() on HTTP/2 stream"),this.http2Stream.end()}};rp.Http2SubchannelCall=vv});var wv=N(ip=>{"use strict";Object.defineProperty(ip,"__esModule",{value:!0});ip.getNextCallNumber=void 0;var fW=0;function pW(){return fW++}ip.getNextCallNumber=pW});var vk=N(op=>{"use strict";Object.defineProperty(op,"__esModule",{value:!0});op.Http2SubchannelConnector=void 0;var Iv=Ae("http2"),Ak=Ae("tls"),ap=cs(),yl=Pe(),hW=_v(),au=it(),yk=$r(),sp=Ir(),iu=Sn(),mW=Ae("net"),gW=_k(),_W=wv(),bv="transport",AW="transport_flowctrl",yW=RA().version,{HTTP2_HEADER_AUTHORITY:vW,HTTP2_HEADER_CONTENT_TYPE:wW,HTTP2_HEADER_METHOD:bW,HTTP2_HEADER_PATH:EW,HTTP2_HEADER_TE:CW,HTTP2_HEADER_USER_AGENT:IW}=Iv.constants,SW=2e4,xW=Buffer.from("too_many_pings","ascii"),Ev=class{constructor(t,n,r,i){this.session=t,this.options=r,this.remoteName=i,this.keepaliveTimer=null,this.pendingSendKeepalivePing=!1,this.activeCalls=new Set,this.disconnectListeners=[],this.disconnectHandled=!1,this.channelzEnabled=!0,this.keepalivesSent=0,this.messagesSent=0,this.messagesReceived=0,this.lastMessageSentTimestamp=null,this.lastMessageReceivedTimestamp=null,this.subchannelAddressString=(0,sp.subchannelAddressToString)(n),r["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.streamTracker=new ap.ChannelzCallTrackerStub):this.streamTracker=new ap.ChannelzCallTracker,this.channelzRef=(0,ap.registerChannelzSocket)(this.subchannelAddressString,()=>this.getChannelzInfo(),this.channelzEnabled),this.userAgent=[r["grpc.primary_user_agent"],`grpc-node-js/${yW}`,r["grpc.secondary_user_agent"]].filter(a=>a).join(" "),"grpc.keepalive_time_ms"in r?this.keepaliveTimeMs=r["grpc.keepalive_time_ms"]:this.keepaliveTimeMs=-1,"grpc.keepalive_timeout_ms"in r?this.keepaliveTimeoutMs=r["grpc.keepalive_timeout_ms"]:this.keepaliveTimeoutMs=SW,"grpc.keepalive_permit_without_calls"in r?this.keepaliveWithoutCalls=r["grpc.keepalive_permit_without_calls"]===1:this.keepaliveWithoutCalls=!1,t.once("close",()=>{this.trace("session closed"),this.handleDisconnect()}),t.once("goaway",(a,s,o)=>{let c=!1;a===Iv.constants.NGHTTP2_ENHANCE_YOUR_CALM&&o&&o.equals(xW)&&(c=!0),this.trace("connection closed by GOAWAY with code "+a+" and data "+o?.toString()),this.reportDisconnectToOwner(c)}),t.once("error",a=>{this.trace("connection closed with error "+a.message)}),au.isTracerEnabled(bv)&&(t.on("remoteSettings",a=>{this.trace("new settings received"+(this.session!==t?" on the old connection":"")+": "+JSON.stringify(a))}),t.on("localSettings",a=>{this.trace("local settings acknowledged by remote"+(this.session!==t?" on the old connection":"")+": "+JSON.stringify(a))})),this.keepaliveWithoutCalls&&this.maybeStartKeepalivePingTimer()}getChannelzInfo(){var t,n,r;let i=this.session.socket,a=i.remoteAddress?(0,sp.stringToSubchannelAddress)(i.remoteAddress,i.remotePort):null,s=i.localAddress?(0,sp.stringToSubchannelAddress)(i.localAddress,i.localPort):null,o;if(this.session.encrypted){let u=i,d=u.getCipher(),p=u.getCertificate(),h=u.getPeerCertificate();o={cipherSuiteStandardName:(t=d.standardName)!==null&&t!==void 0?t:null,cipherSuiteOtherName:d.standardName?null:d.name,localCertificate:p&&"raw"in p?p.raw:null,remoteCertificate:h&&"raw"in h?h.raw:null}}else o=null;return{remoteAddress:a,localAddress:s,security:o,remoteName:this.remoteName,streamsStarted:this.streamTracker.callsStarted,streamsSucceeded:this.streamTracker.callsSucceeded,streamsFailed:this.streamTracker.callsFailed,messagesSent:this.messagesSent,messagesReceived:this.messagesReceived,keepAlivesSent:this.keepalivesSent,lastLocalStreamCreatedTimestamp:this.streamTracker.lastCallStartedTimestamp,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:this.lastMessageSentTimestamp,lastMessageReceivedTimestamp:this.lastMessageReceivedTimestamp,localFlowControlWindow:(n=this.session.state.localWindowSize)!==null&&n!==void 0?n:null,remoteFlowControlWindow:(r=this.session.state.remoteWindowSize)!==null&&r!==void 0?r:null}}trace(t){au.trace(yl.LogVerbosity.DEBUG,bv,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}keepaliveTrace(t){au.trace(yl.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}flowControlTrace(t){au.trace(yl.LogVerbosity.DEBUG,AW,"("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}internalsTrace(t){au.trace(yl.LogVerbosity.DEBUG,"transport_internals","("+this.channelzRef.id+") "+this.subchannelAddressString+" "+t)}reportDisconnectToOwner(t){this.disconnectHandled||(this.disconnectHandled=!0,this.disconnectListeners.forEach(n=>n(t)))}handleDisconnect(){this.clearKeepaliveTimeout(),this.reportDisconnectToOwner(!1),setImmediate(()=>{for(let t of this.activeCalls)t.onDisconnect();this.session.destroy()})}addDisconnectListener(t){this.disconnectListeners.push(t)}canSendPing(){return!this.session.destroyed&&this.keepaliveTimeMs>0&&(this.keepaliveWithoutCalls||this.activeCalls.size>0)}maybeSendPing(){var t,n;if(!this.canSendPing()){this.pendingSendKeepalivePing=!0;return}if(this.keepaliveTimer){console.error("keepaliveTimeout is not null");return}this.channelzEnabled&&(this.keepalivesSent+=1),this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.keepaliveTrace("Ping timeout passed without response"),this.handleDisconnect()},this.keepaliveTimeoutMs),(n=(t=this.keepaliveTimer).unref)===null||n===void 0||n.call(t);let r="";try{this.session.ping((a,s,o)=>{this.clearKeepaliveTimeout(),a?(this.keepaliveTrace("Ping failed with error "+a.message),this.handleDisconnect()):(this.keepaliveTrace("Received ping response"),this.maybeStartKeepalivePingTimer())})||(r="Ping returned false")}catch(i){r=(i instanceof Error?i.message:"")||"Unknown error"}r&&(this.keepaliveTrace("Ping send failed: "+r),this.handleDisconnect())}maybeStartKeepalivePingTimer(){var t,n;this.canSendPing()&&(this.pendingSendKeepalivePing?(this.pendingSendKeepalivePing=!1,this.maybeSendPing()):this.keepaliveTimer||(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),this.keepaliveTimer=setTimeout(()=>{this.keepaliveTimer=null,this.maybeSendPing()},this.keepaliveTimeMs),(n=(t=this.keepaliveTimer).unref)===null||n===void 0||n.call(t)))}clearKeepaliveTimeout(){this.keepaliveTimer&&(clearTimeout(this.keepaliveTimer),this.keepaliveTimer=null)}removeActiveCall(t){this.activeCalls.delete(t),this.activeCalls.size===0&&this.session.unref()}addActiveCall(t){this.activeCalls.add(t),this.activeCalls.size===1&&(this.session.ref(),this.keepaliveWithoutCalls||this.maybeStartKeepalivePingTimer())}createCall(t,n,r,i,a){let s=t.toHttp2Headers();s[vW]=n,s[IW]=this.userAgent,s[wW]="application/grpc",s[bW]="POST",s[EW]=r,s[CW]="trailers";let o;try{o=this.session.request(s)}catch(d){throw this.handleDisconnect(),d}this.flowControlTrace("local window size: "+this.session.state.localWindowSize+" remote window size: "+this.session.state.remoteWindowSize),this.internalsTrace("session.closed="+this.session.closed+" session.destroyed="+this.session.destroyed+" session.socket.destroyed="+this.session.socket.destroyed);let c,u;return this.channelzEnabled?(this.streamTracker.addCallStarted(),c={addMessageSent:()=>{var d;this.messagesSent+=1,this.lastMessageSentTimestamp=new Date,(d=a.addMessageSent)===null||d===void 0||d.call(a)},addMessageReceived:()=>{var d;this.messagesReceived+=1,this.lastMessageReceivedTimestamp=new Date,(d=a.addMessageReceived)===null||d===void 0||d.call(a)},onCallEnd:d=>{var p;(p=a.onCallEnd)===null||p===void 0||p.call(a,d),this.removeActiveCall(u)},onStreamEnd:d=>{var p;d?this.streamTracker.addCallSucceeded():this.streamTracker.addCallFailed(),(p=a.onStreamEnd)===null||p===void 0||p.call(a,d)}}):c={addMessageSent:()=>{var d;(d=a.addMessageSent)===null||d===void 0||d.call(a)},addMessageReceived:()=>{var d;(d=a.addMessageReceived)===null||d===void 0||d.call(a)},onCallEnd:d=>{var p;(p=a.onCallEnd)===null||p===void 0||p.call(a,d),this.removeActiveCall(u)},onStreamEnd:d=>{var p;(p=a.onStreamEnd)===null||p===void 0||p.call(a,d)}},u=new gW.Http2SubchannelCall(o,c,i,this,(0,_W.getNextCallNumber)()),this.addActiveCall(u),u}getChannelzRef(){return this.channelzRef}getPeerName(){return this.subchannelAddressString}getOptions(){return this.options}shutdown(){this.session.close(),(0,ap.unregisterChannelzRef)(this.channelzRef)}},Cv=class{constructor(t){this.channelTarget=t,this.session=null,this.isShutdown=!1}trace(t){au.trace(yl.LogVerbosity.DEBUG,bv,(0,iu.uriToString)(this.channelTarget)+" "+t)}createSession(t,n,r,i){return this.isShutdown?Promise.reject():new Promise((a,s)=>{var o,c,u,d;let p;i.realTarget?(p=(0,iu.uriToString)(i.realTarget),this.trace("creating HTTP/2 session through proxy to "+(0,iu.uriToString)(i.realTarget))):(p=null,this.trace("creating HTTP/2 session to "+(0,sp.subchannelAddressToString)(t)));let h=(0,yk.getDefaultAuthority)((o=i.realTarget)!==null&&o!==void 0?o:this.channelTarget),_=n._getConnectionOptions()||{};_.maxSendHeaderBlockLength=Number.MAX_SAFE_INTEGER,"grpc-node.max_session_memory"in r?_.maxSessionMemory=r["grpc-node.max_session_memory"]:_.maxSessionMemory=Number.MAX_SAFE_INTEGER;let w="http://";if("secureContext"in _){if(w="https://",r["grpc.ssl_target_name_override"]){let b=r["grpc.ssl_target_name_override"],T=(c=_.checkServerIdentity)!==null&&c!==void 0?c:Ak.checkServerIdentity;_.checkServerIdentity=(B,O)=>T(b,O),_.servername=b}else{let b=(d=(u=(0,iu.splitHostPort)(h))===null||u===void 0?void 0:u.host)!==null&&d!==void 0?d:"localhost";_.servername=b}i.socket&&(_.createConnection=(b,T)=>i.socket)}else _.createConnection=(b,T)=>i.socket?i.socket:mW.connect(t);_=Object.assign(Object.assign(Object.assign({},_),t),{enableTrace:r["grpc-node.tls_enable_trace"]===1});let A=Iv.connect(w+h,_);this.session=A;let S="Failed to connect";A.unref(),A.once("connect",()=>{A.removeAllListeners(),a(new Ev(A,t,r,p)),this.session=null}),A.once("close",()=>{this.session=null,setImmediate(()=>{s(`${S} (${new Date().toISOString()})`)})}),A.once("error",b=>{S=b.message,this.trace("connection failed with error "+S)})})}connect(t,n,r){var i,a,s;if(this.isShutdown)return Promise.reject();let o=n._getConnectionOptions()||{};if("secureContext"in o){if(o.ALPNProtocols=["h2"],r["grpc.ssl_target_name_override"]){let c=r["grpc.ssl_target_name_override"],u=(i=o.checkServerIdentity)!==null&&i!==void 0?i:Ak.checkServerIdentity;o.checkServerIdentity=(d,p)=>u(c,p),o.servername=c}else if("grpc.http_connect_target"in r){let c=(0,yk.getDefaultAuthority)((a=(0,iu.parseUri)(r["grpc.http_connect_target"]))!==null&&a!==void 0?a:{path:"localhost"}),u=(0,iu.splitHostPort)(c);o.servername=(s=u?.host)!==null&&s!==void 0?s:c}r["grpc-node.tls_enable_trace"]&&(o.enableTrace=!0)}return(0,hW.getProxiedConnection)(t,r,o).then(c=>this.createSession(t,n,r,c))}shutdown(){var t;this.isShutdown=!0,(t=this.session)===null||t===void 0||t.close(),this.session=null}};op.Http2SubchannelConnector=Cv});var wk=N(su=>{"use strict";Object.defineProperty(su,"__esModule",{value:!0});su.getSubchannelPool=su.SubchannelPool=void 0;var TW=qN(),NW=lk(),RW=Ir(),kW=Sn(),BW=vk(),OW=1e4,vl=class{constructor(){this.pool=Object.create(null),this.cleanupTimer=null}unrefUnusedSubchannels(){let t=!0;for(let n in this.pool){let i=this.pool[n].filter(a=>!a.subchannel.unrefIfOneRef());i.length>0&&(t=!1),this.pool[n]=i}t&&this.cleanupTimer!==null&&(clearInterval(this.cleanupTimer),this.cleanupTimer=null)}ensureCleanupTask(){var t,n;this.cleanupTimer===null&&(this.cleanupTimer=setInterval(()=>{this.unrefUnusedSubchannels()},OW),(n=(t=this.cleanupTimer).unref)===null||n===void 0||n.call(t))}getOrCreateSubchannel(t,n,r,i){this.ensureCleanupTask();let a=(0,kW.uriToString)(t);if(a in this.pool){let o=this.pool[a];for(let c of o)if((0,RW.subchannelAddressEqual)(n,c.subchannelAddress)&&(0,TW.channelOptionsEqual)(r,c.channelArguments)&&i._equals(c.channelCredentials))return c.subchannel}let s=new NW.Subchannel(t,n,r,i,new BW.Http2SubchannelConnector(t));return a in this.pool||(this.pool[a]=[]),this.pool[a].push({subchannelAddress:n,channelArguments:r,channelCredentials:i,subchannel:s}),s.ref(),s}};su.SubchannelPool=vl;var PW=new vl;function DW(e){return e?PW:new vl}su.getSubchannelPool=DW});var Sv=N(ou=>{"use strict";Object.defineProperty(ou,"__esModule",{value:!0});ou.FilterStackFactory=ou.FilterStack=void 0;var cp=class{constructor(t){this.filters=t}sendMetadata(t){let n=t;for(let r=0;r<this.filters.length;r++)n=this.filters[r].sendMetadata(n);return n}receiveMetadata(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveMetadata(n);return n}sendMessage(t){let n=t;for(let r=0;r<this.filters.length;r++)n=this.filters[r].sendMessage(n);return n}receiveMessage(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveMessage(n);return n}receiveTrailers(t){let n=t;for(let r=this.filters.length-1;r>=0;r--)n=this.filters[r].receiveTrailers(n);return n}push(t){this.filters.unshift(...t)}getFilters(){return this.filters}};ou.FilterStack=cp;var wl=class{constructor(t){this.factories=t}push(t){this.factories.unshift(...t)}clone(){return new wl([...this.factories])}createFilter(){return new cp(this.factories.map(t=>t.createFilter()))}};ou.FilterStackFactory=wl});var xv=N(up=>{"use strict";Object.defineProperty(up,"__esModule",{value:!0});up.CompressionAlgorithms=void 0;var bk;(function(e){e[e.identity=0]="identity",e[e.deflate=1]="deflate",e[e.gzip=2]="gzip"})(bk||(up.CompressionAlgorithms=bk={}))});var Nv=N(lp=>{"use strict";Object.defineProperty(lp,"__esModule",{value:!0});lp.BaseFilter=void 0;var Tv=class{async sendMetadata(t){return t}receiveMetadata(t){return t}async sendMessage(t){return t}async receiveMessage(t){return t}receiveTrailers(t){return t}};lp.BaseFilter=Tv});var Ik=N(lu=>{"use strict";Object.defineProperty(lu,"__esModule",{value:!0});lu.CompressionFilterFactory=lu.CompressionFilter=void 0;var dp=Ae("zlib"),Ck=xv(),cu=Pe(),MW=Nv(),FW=it(),LW=e=>typeof e=="number"&&typeof Ck.CompressionAlgorithms[e]=="string",uu=class{async writeMessage(t,n){let r=t;n&&(r=await this.compressMessage(r));let i=Buffer.allocUnsafe(r.length+5);return i.writeUInt8(n?1:0,0),i.writeUInt32BE(r.length,1),r.copy(i,5),i}async readMessage(t){let n=t.readUInt8(0)===1,r=t.slice(5);return n&&(r=await this.decompressMessage(r)),r}},us=class extends uu{async compressMessage(t){return t}async writeMessage(t,n){let r=Buffer.allocUnsafe(t.length+5);return r.writeUInt8(0,0),r.writeUInt32BE(t.length,1),t.copy(r,5),r}decompressMessage(t){return Promise.reject(new Error('Received compressed message but "grpc-encoding" header was identity'))}},Rv=class extends uu{constructor(t){super(),this.maxRecvMessageLength=t}compressMessage(t){return new Promise((n,r)=>{dp.deflate(t,(i,a)=>{i?r(i):n(a)})})}decompressMessage(t){return new Promise((n,r)=>{let i=0,a=[],s=dp.createInflate();s.on("data",o=>{a.push(o),i+=o.byteLength,this.maxRecvMessageLength!==-1&&i>this.maxRecvMessageLength&&(s.destroy(),r({code:cu.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),s.on("end",()=>{n(Buffer.concat(a))}),s.write(t),s.end()})}},kv=class extends uu{constructor(t){super(),this.maxRecvMessageLength=t}compressMessage(t){return new Promise((n,r)=>{dp.gzip(t,(i,a)=>{i?r(i):n(a)})})}decompressMessage(t){return new Promise((n,r)=>{let i=0,a=[],s=dp.createGunzip();s.on("data",o=>{a.push(o),i+=o.byteLength,this.maxRecvMessageLength!==-1&&i>this.maxRecvMessageLength&&(s.destroy(),r({code:cu.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxRecvMessageLength}`}))}),s.on("end",()=>{n(Buffer.concat(a))}),s.write(t),s.end()})}},Bv=class extends uu{constructor(t){super(),this.compressionName=t}compressMessage(t){return Promise.reject(new Error(`Received message compressed with unsupported compression method ${this.compressionName}`))}decompressMessage(t){return Promise.reject(new Error(`Compression method not supported: ${this.compressionName}`))}};function Ek(e,t){switch(e){case"identity":return new us;case"deflate":return new Rv(t);case"gzip":return new kv(t);default:return new Bv(e)}}var fp=class extends MW.BaseFilter{constructor(t,n){var r,i,a;super(),this.sharedFilterConfig=n,this.sendCompression=new us,this.receiveCompression=new us,this.currentCompressionAlgorithm="identity";let s=t["grpc.default_compression_algorithm"];if(this.maxReceiveMessageLength=(r=t["grpc.max_receive_message_length"])!==null&&r!==void 0?r:cu.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.maxSendMessageLength=(i=t["grpc.max_send_message_length"])!==null&&i!==void 0?i:cu.DEFAULT_MAX_SEND_MESSAGE_LENGTH,s!==void 0)if(LW(s)){let o=Ck.CompressionAlgorithms[s],c=(a=n.serverSupportedEncodingHeader)===null||a===void 0?void 0:a.split(",");(!c||c.includes(o))&&(this.currentCompressionAlgorithm=o,this.sendCompression=Ek(this.currentCompressionAlgorithm,-1))}else FW.log(cu.LogVerbosity.ERROR,`Invalid value provided for grpc.default_compression_algorithm option: ${s}`)}async sendMetadata(t){let n=await t;return n.set("grpc-accept-encoding","identity,deflate,gzip"),n.set("accept-encoding","identity"),this.currentCompressionAlgorithm==="identity"?n.remove("grpc-encoding"):n.set("grpc-encoding",this.currentCompressionAlgorithm),n}receiveMetadata(t){let n=t.get("grpc-encoding");if(n.length>0){let i=n[0];typeof i=="string"&&(this.receiveCompression=Ek(i,this.maxReceiveMessageLength))}t.remove("grpc-encoding");let r=t.get("grpc-accept-encoding")[0];return r&&(this.sharedFilterConfig.serverSupportedEncodingHeader=r,r.split(",").includes(this.currentCompressionAlgorithm)||(this.sendCompression=new us,this.currentCompressionAlgorithm="identity")),t.remove("grpc-accept-encoding"),t}async sendMessage(t){var n;let r=await t;if(this.maxSendMessageLength!==-1&&r.message.length>this.maxSendMessageLength)throw{code:cu.Status.RESOURCE_EXHAUSTED,details:`Attempted to send message with a size larger than ${this.maxSendMessageLength}`};let i;return this.sendCompression instanceof us?i=!1:i=(((n=r.flags)!==null&&n!==void 0?n:0)&2)===0,{message:await this.sendCompression.writeMessage(r.message,i),flags:r.flags}}async receiveMessage(t){return this.receiveCompression.readMessage(await t)}};lu.CompressionFilter=fp;var Ov=class{constructor(t,n){this.options=n,this.sharedFilterConfig={}}createFilter(){return new fp(this.options,this.sharedFilterConfig)}};lu.CompressionFilterFactory=Ov});var bl=N($n=>{"use strict";Object.defineProperty($n,"__esModule",{value:!0});$n.formatDateDifference=$n.deadlineToString=$n.getRelativeTimeout=$n.getDeadlineTimeoutString=$n.minDeadline=void 0;function QW(...e){let t=1/0;for(let n of e){let r=n instanceof Date?n.getTime():n;r<t&&(t=r)}return t}$n.minDeadline=QW;var UW=[["m",1],["S",1e3],["M",60*1e3],["H",60*60*1e3]];function qW(e){let t=new Date().getTime();e instanceof Date&&(e=e.getTime());let n=Math.max(e-t,0);for(let[r,i]of UW){let a=n/i;if(a<1e8)return String(Math.ceil(a))+r}throw new Error("Deadline is too far in the future")}$n.getDeadlineTimeoutString=qW;var JW=2147483647;function VW(e){let t=e instanceof Date?e.getTime():e,n=new Date().getTime(),r=t-n;return r<0?0:r>JW?1/0:r}$n.getRelativeTimeout=VW;function zW(e){if(e instanceof Date)return e.toISOString();{let t=new Date(e);return Number.isNaN(t.getTime())?""+e:t.toISOString()}}$n.deadlineToString=zW;function GW(e,t){return((t.getTime()-e.getTime())/1e3).toFixed(3)+"s"}$n.formatDateDifference=GW});var hp=N(pp=>{"use strict";Object.defineProperty(pp,"__esModule",{value:!0});pp.restrictControlPlaneStatusCode=void 0;var ci=Pe(),WW=[ci.Status.OK,ci.Status.INVALID_ARGUMENT,ci.Status.NOT_FOUND,ci.Status.ALREADY_EXISTS,ci.Status.FAILED_PRECONDITION,ci.Status.ABORTED,ci.Status.OUT_OF_RANGE,ci.Status.DATA_LOSS];function HW(e,t){return WW.includes(e)?{code:ci.Status.INTERNAL,details:`Invalid status from control plane: ${e} ${ci.Status[e]} ${t}`}:{code:e,details:t}}pp.restrictControlPlaneStatusCode=HW});var Tk=N(_p=>{"use strict";Object.defineProperty(_p,"__esModule",{value:!0});_p.LoadBalancingCall=void 0;var Sk=Vn(),mp=Pe(),xk=bl(),gp=jt(),El=oa(),ZW=Sn(),XW=it(),Pv=hp(),YW=Ae("http2"),$W="load_balancing_call",Dv=class{constructor(t,n,r,i,a,s,o){var c,u;this.channel=t,this.callConfig=n,this.methodName=r,this.host=i,this.credentials=a,this.deadline=s,this.callNumber=o,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.metadata=null,this.listener=null,this.onCallEnded=null,this.childStartTime=null;let d=this.methodName.split("/"),p="";d.length>=2&&(p=d[1]);let h=(u=(c=(0,ZW.splitHostPort)(this.host))===null||c===void 0?void 0:c.host)!==null&&u!==void 0?u:"localhost";this.serviceUrl=`https://${h}/${p}`,this.startTime=new Date}getDeadlineInfo(){var t,n;let r=[];return this.childStartTime?(this.childStartTime>this.startTime&&(!((t=this.metadata)===null||t===void 0)&&t.getOptions().waitForReady&&r.push("wait_for_ready"),r.push(`LB pick: ${(0,xk.formatDateDifference)(this.startTime,this.childStartTime)}`)),r.push(...this.child.getDeadlineInfo()),r):(!((n=this.metadata)===null||n===void 0)&&n.getOptions().waitForReady&&r.push("wait_for_ready"),r.push("Waiting for LB pick"),r)}trace(t){XW.trace(mp.LogVerbosity.DEBUG,$W,"["+this.callNumber+"] "+t)}outputStatus(t,n){var r,i;if(!this.ended){this.ended=!0,this.trace("ended with status: code="+t.code+' details="'+t.details+'" start time='+this.startTime.toISOString());let a=Object.assign(Object.assign({},t),{progress:n});(r=this.listener)===null||r===void 0||r.onReceiveStatus(a),(i=this.onCallEnded)===null||i===void 0||i.call(this,a.code)}}doPick(){var t,n;if(this.ended)return;if(!this.metadata)throw new Error("doPick called before start");this.trace("Pick called");let r=this.metadata.clone(),i=this.channel.doPick(r,this.callConfig.pickInformation),a=i.subchannel?"("+i.subchannel.getChannelzRef().id+") "+i.subchannel.getAddress():""+i.subchannel;switch(this.trace("Pick result: "+El.PickResultType[i.pickResultType]+" subchannel: "+a+" status: "+((t=i.status)===null||t===void 0?void 0:t.code)+" "+((n=i.status)===null||n===void 0?void 0:n.details)),i.pickResultType){case El.PickResultType.COMPLETE:this.credentials.generateMetadata({service_url:this.serviceUrl}).then(c=>{var u,d,p;if(this.ended){this.trace("Credentials metadata generation finished after call ended");return}if(r.merge(c),r.get("authorization").length>1&&this.outputStatus({code:mp.Status.INTERNAL,details:'"authorization" metadata cannot have multiple values',metadata:new gp.Metadata},"PROCESSED"),i.subchannel.getConnectivityState()!==Sk.ConnectivityState.READY){this.trace("Picked subchannel "+a+" has state "+Sk.ConnectivityState[i.subchannel.getConnectivityState()]+" after getting credentials metadata. Retrying pick"),this.doPick();return}this.deadline!==1/0&&r.set("grpc-timeout",(0,xk.getDeadlineTimeoutString)(this.deadline));try{this.child=i.subchannel.getRealSubchannel().createCall(r,this.host,this.methodName,{onReceiveMetadata:h=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(h)},onReceiveMessage:h=>{this.trace("Received message"),this.listener.onReceiveMessage(h)},onReceiveStatus:h=>{this.trace("Received status"),h.rstCode===YW.constants.NGHTTP2_REFUSED_STREAM?this.outputStatus(h,"REFUSED"):this.outputStatus(h,"PROCESSED")}}),this.childStartTime=new Date}catch(h){this.trace("Failed to start call on picked subchannel "+a+" with error "+h.message),this.outputStatus({code:mp.Status.INTERNAL,details:"Failed to start HTTP/2 stream with error "+h.message,metadata:new gp.Metadata},"NOT_STARTED");return}(d=(u=this.callConfig).onCommitted)===null||d===void 0||d.call(u),(p=i.onCallStarted)===null||p===void 0||p.call(i),this.onCallEnded=i.onCallEnded,this.trace("Created child call ["+this.child.getCallNumber()+"]"),this.readPending&&this.child.startRead(),this.pendingMessage&&this.child.sendMessageWithContext(this.pendingMessage.context,this.pendingMessage.message),this.pendingHalfClose&&this.child.halfClose()},c=>{let{code:u,details:d}=(0,Pv.restrictControlPlaneStatusCode)(typeof c.code=="number"?c.code:mp.Status.UNKNOWN,`Getting metadata from plugin failed with error: ${c.message}`);this.outputStatus({code:u,details:d,metadata:new gp.Metadata},"PROCESSED")});break;case El.PickResultType.DROP:let{code:s,details:o}=(0,Pv.restrictControlPlaneStatusCode)(i.status.code,i.status.details);setImmediate(()=>{this.outputStatus({code:s,details:o,metadata:i.status.metadata},"DROP")});break;case El.PickResultType.TRANSIENT_FAILURE:if(this.metadata.getOptions().waitForReady)this.channel.queueCallForPick(this);else{let{code:c,details:u}=(0,Pv.restrictControlPlaneStatusCode)(i.status.code,i.status.details);setImmediate(()=>{this.outputStatus({code:c,details:u,metadata:i.status.metadata},"PROCESSED")})}break;case El.PickResultType.QUEUE:this.channel.queueCallForPick(this)}}cancelWithStatus(t,n){var r;this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),(r=this.child)===null||r===void 0||r.cancelWithStatus(t,n),this.outputStatus({code:t,details:n,metadata:new gp.Metadata},"PROCESSED")}getPeer(){var t,n;return(n=(t=this.child)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:this.channel.getTarget()}start(t,n){this.trace("start called"),this.listener=n,this.metadata=t,this.doPick()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length),this.child?this.child.sendMessageWithContext(t,n):this.pendingMessage={context:t,message:n}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(t){throw new Error("Method not implemented.")}getCallNumber(){return this.callNumber}};_p.LoadBalancingCall=Dv});var Rk=N(Ap=>{"use strict";Object.defineProperty(Ap,"__esModule",{value:!0});Ap.ResolvingCall=void 0;var ls=Pe(),ds=bl(),Nk=jt(),KW=it(),jW=hp(),eH="resolving_call",Mv=class{constructor(t,n,r,i,a,s){this.channel=t,this.method=n,this.filterStackFactory=i,this.credentials=a,this.callNumber=s,this.child=null,this.readPending=!1,this.pendingMessage=null,this.pendingHalfClose=!1,this.ended=!1,this.readFilterPending=!1,this.writeFilterPending=!1,this.pendingChildStatus=null,this.metadata=null,this.listener=null,this.statusWatchers=[],this.deadlineTimer=setTimeout(()=>{},0),this.filterStack=null,this.deadlineStartTime=null,this.configReceivedTime=null,this.childStartTime=null,this.deadline=r.deadline,this.host=r.host,r.parentCall&&(r.flags&ls.Propagate.CANCELLATION&&r.parentCall.on("cancelled",()=>{this.cancelWithStatus(ls.Status.CANCELLED,"Cancelled by parent call")}),r.flags&ls.Propagate.DEADLINE&&(this.trace("Propagating deadline from parent: "+r.parentCall.getDeadline()),this.deadline=(0,ds.minDeadline)(this.deadline,r.parentCall.getDeadline()))),this.trace("Created"),this.runDeadlineTimer()}trace(t){KW.trace(ls.LogVerbosity.DEBUG,eH,"["+this.callNumber+"] "+t)}runDeadlineTimer(){clearTimeout(this.deadlineTimer),this.deadlineStartTime=new Date,this.trace("Deadline: "+(0,ds.deadlineToString)(this.deadline));let t=(0,ds.getRelativeTimeout)(this.deadline);if(t!==1/0){this.trace("Deadline will be reached in "+t+"ms");let n=()=>{if(!this.deadlineStartTime){this.cancelWithStatus(ls.Status.DEADLINE_EXCEEDED,"Deadline exceeded");return}let r=[],i=new Date;r.push(`Deadline exceeded after ${(0,ds.formatDateDifference)(this.deadlineStartTime,i)}`),this.configReceivedTime?(this.configReceivedTime>this.deadlineStartTime&&r.push(`name resolution: ${(0,ds.formatDateDifference)(this.deadlineStartTime,this.configReceivedTime)}`),this.childStartTime?this.childStartTime>this.configReceivedTime&&r.push(`metadata filters: ${(0,ds.formatDateDifference)(this.configReceivedTime,this.childStartTime)}`):r.push("waiting for metadata filters")):r.push("waiting for name resolution"),this.child&&r.push(...this.child.getDeadlineInfo()),this.cancelWithStatus(ls.Status.DEADLINE_EXCEEDED,r.join(","))};t<=0?process.nextTick(n):this.deadlineTimer=setTimeout(n,t)}}outputStatus(t){if(!this.ended){this.ended=!0,this.filterStack||(this.filterStack=this.filterStackFactory.createFilter()),clearTimeout(this.deadlineTimer);let n=this.filterStack.receiveTrailers(t);this.trace("ended with status: code="+n.code+' details="'+n.details+'"'),this.statusWatchers.forEach(r=>r(n)),process.nextTick(()=>{var r;(r=this.listener)===null||r===void 0||r.onReceiveStatus(n)})}}sendMessageOnChild(t,n){if(!this.child)throw new Error("sendMessageonChild called with child not populated");let r=this.child;this.writeFilterPending=!0,this.filterStack.sendMessage(Promise.resolve({message:n,flags:t.flags})).then(i=>{this.writeFilterPending=!1,r.sendMessageWithContext(t,i.message),this.pendingHalfClose&&r.halfClose()},i=>{this.cancelWithStatus(i.code,i.details)})}getConfig(){if(this.ended)return;if(!this.metadata||!this.listener)throw new Error("getConfig called before start");let t=this.channel.getConfig(this.method,this.metadata);if(t.type==="NONE"){this.channel.queueCallForConfig(this);return}else if(t.type==="ERROR"){this.metadata.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(t.error);return}this.configReceivedTime=new Date;let n=t.config;if(n.status!==ls.Status.OK){let{code:r,details:i}=(0,jW.restrictControlPlaneStatusCode)(n.status,"Failed to route call to method "+this.method);this.outputStatus({code:r,details:i,metadata:new Nk.Metadata});return}if(n.methodConfig.timeout){let r=new Date;r.setSeconds(r.getSeconds()+n.methodConfig.timeout.seconds),r.setMilliseconds(r.getMilliseconds()+n.methodConfig.timeout.nanos/1e6),this.deadline=(0,ds.minDeadline)(this.deadline,r),this.runDeadlineTimer()}this.filterStackFactory.push(n.dynamicFilterFactories),this.filterStack=this.filterStackFactory.createFilter(),this.filterStack.sendMetadata(Promise.resolve(this.metadata)).then(r=>{this.child=this.channel.createInnerCall(n,this.method,this.host,this.credentials,this.deadline),this.trace("Created child ["+this.child.getCallNumber()+"]"),this.childStartTime=new Date,this.child.start(r,{onReceiveMetadata:i=>{this.trace("Received metadata"),this.listener.onReceiveMetadata(this.filterStack.receiveMetadata(i))},onReceiveMessage:i=>{this.trace("Received message"),this.readFilterPending=!0,this.filterStack.receiveMessage(i).then(a=>{this.trace("Finished filtering received message"),this.readFilterPending=!1,this.listener.onReceiveMessage(a),this.pendingChildStatus&&this.outputStatus(this.pendingChildStatus)},a=>{this.cancelWithStatus(a.code,a.details)})},onReceiveStatus:i=>{this.trace("Received status"),this.readFilterPending?this.pendingChildStatus=i:this.outputStatus(i)}}),this.readPending&&this.child.startRead(),this.pendingMessage?this.sendMessageOnChild(this.pendingMessage.context,this.pendingMessage.message):this.pendingHalfClose&&this.child.halfClose()},r=>{this.outputStatus(r)})}reportResolverError(t){var n;!((n=this.metadata)===null||n===void 0)&&n.getOptions().waitForReady?this.channel.queueCallForConfig(this):this.outputStatus(t)}cancelWithStatus(t,n){var r;this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),(r=this.child)===null||r===void 0||r.cancelWithStatus(t,n),this.outputStatus({code:t,details:n,metadata:new Nk.Metadata})}getPeer(){var t,n;return(n=(t=this.child)===null||t===void 0?void 0:t.getPeer())!==null&&n!==void 0?n:this.channel.getTarget()}start(t,n){this.trace("start called"),this.metadata=t.clone(),this.listener=n,this.getConfig()}sendMessageWithContext(t,n){this.trace("write() called with message of length "+n.length),this.child?this.sendMessageOnChild(t,n):this.pendingMessage={context:t,message:n}}startRead(){this.trace("startRead called"),this.child?this.child.startRead():this.readPending=!0}halfClose(){this.trace("halfClose called"),this.child&&!this.writeFilterPending?this.child.halfClose():this.pendingHalfClose=!0}setCredentials(t){this.credentials=this.credentials.compose(t)}addStatusWatcher(t){this.statusWatchers.push(t)}getCallNumber(){return this.callNumber}};Ap.ResolvingCall=Mv});var kk=N(va=>{"use strict";Object.defineProperty(va,"__esModule",{value:!0});va.RetryingCall=va.MessageBufferTracker=va.RetryThrottler=void 0;var yp=Pe(),tH=bl(),nH=jt(),rH=it(),iH="retrying_call",Lv=class{constructor(t,n,r){this.maxTokens=t,this.tokenRatio=n,r?this.tokens=r.tokens*(t/r.maxTokens):this.tokens=t}addCallSucceeded(){this.tokens=Math.max(this.tokens+this.tokenRatio,this.maxTokens)}addCallFailed(){this.tokens=Math.min(this.tokens-1,0)}canRetryCall(){return this.tokens>this.maxTokens/2}};va.RetryThrottler=Lv;var Qv=class{constructor(t,n){this.totalLimit=t,this.limitPerCall=n,this.totalAllocated=0,this.allocatedPerCall=new Map}allocate(t,n){var r;let i=(r=this.allocatedPerCall.get(n))!==null&&r!==void 0?r:0;return this.limitPerCall-i<t||this.totalLimit-this.totalAllocated<t?!1:(this.allocatedPerCall.set(n,i+t),this.totalAllocated+=t,!0)}free(t,n){var r;if(this.totalAllocated<t)throw new Error(`Invalid buffer allocation state: call ${n} freed ${t} > total allocated ${this.totalAllocated}`);this.totalAllocated-=t;let i=(r=this.allocatedPerCall.get(n))!==null&&r!==void 0?r:0;if(i<t)throw new Error(`Invalid buffer allocation state: call ${n} freed ${t} > allocated for call ${i}`);this.allocatedPerCall.set(n,i-t)}freeAll(t){var n;let r=(n=this.allocatedPerCall.get(t))!==null&&n!==void 0?n:0;if(this.totalAllocated<r)throw new Error(`Invalid buffer allocation state: call ${t} allocated ${r} > total allocated ${this.totalAllocated}`);this.totalAllocated-=r,this.allocatedPerCall.delete(t)}};va.MessageBufferTracker=Qv;var Fv="grpc-previous-rpc-attempts",Uv=class{constructor(t,n,r,i,a,s,o,c,u){if(this.channel=t,this.callConfig=n,this.methodName=r,this.host=i,this.credentials=a,this.deadline=s,this.callNumber=o,this.bufferTracker=c,this.retryThrottler=u,this.listener=null,this.initialMetadata=null,this.underlyingCalls=[],this.writeBuffer=[],this.writeBufferOffset=0,this.readStarted=!1,this.transparentRetryUsed=!1,this.attempts=0,this.hedgingTimer=null,this.committedCallIndex=null,this.initialRetryBackoffSec=0,this.nextRetryBackoffSec=0,n.methodConfig.retryPolicy){this.state="RETRY";let d=n.methodConfig.retryPolicy;this.nextRetryBackoffSec=this.initialRetryBackoffSec=Number(d.initialBackoff.substring(0,d.initialBackoff.length-1))}else n.methodConfig.hedgingPolicy?this.state="HEDGING":this.state="TRANSPARENT_ONLY";this.startTime=new Date}getDeadlineInfo(){if(this.underlyingCalls.length===0)return[];let t=[],n=this.underlyingCalls[this.underlyingCalls.length-1];return this.underlyingCalls.length>1&&t.push(`previous attempts: ${this.underlyingCalls.length-1}`),n.startTime>this.startTime&&t.push(`time to current attempt start: ${(0,tH.formatDateDifference)(this.startTime,n.startTime)}`),t.push(...n.call.getDeadlineInfo()),t}getCallNumber(){return this.callNumber}trace(t){rH.trace(yp.LogVerbosity.DEBUG,iH,"["+this.callNumber+"] "+t)}reportStatus(t){this.trace("ended with status: code="+t.code+' details="'+t.details+'" start time='+this.startTime.toISOString()),this.bufferTracker.freeAll(this.callNumber),this.writeBufferOffset=this.writeBufferOffset+this.writeBuffer.length,this.writeBuffer=[],process.nextTick(()=>{var n;(n=this.listener)===null||n===void 0||n.onReceiveStatus({code:t.code,details:t.details,metadata:t.metadata})})}cancelWithStatus(t,n){this.trace("cancelWithStatus code: "+t+' details: "'+n+'"'),this.reportStatus({code:t,details:n,metadata:new nH.Metadata});for(let{call:r}of this.underlyingCalls)r.cancelWithStatus(t,n)}getPeer(){return this.committedCallIndex!==null?this.underlyingCalls[this.committedCallIndex].call.getPeer():"unknown"}getBufferEntry(t){var n;return(n=this.writeBuffer[t-this.writeBufferOffset])!==null&&n!==void 0?n:{entryType:"FREED",allocated:!1}}getNextBufferIndex(){return this.writeBufferOffset+this.writeBuffer.length}clearSentMessages(){if(this.state!=="COMMITTED")return;let t=this.underlyingCalls[this.committedCallIndex].nextMessageToSend;for(let n=this.writeBufferOffset;n<t;n++){let r=this.getBufferEntry(n);r.allocated&&this.bufferTracker.free(r.message.message.length,this.callNumber)}this.writeBuffer=this.writeBuffer.slice(t-this.writeBufferOffset),this.writeBufferOffset=t}commitCall(t){if(this.state!=="COMMITTED"&&this.underlyingCalls[t].state!=="COMPLETED"){this.trace("Committing call ["+this.underlyingCalls[t].call.getCallNumber()+"] at index "+t),this.state="COMMITTED",this.committedCallIndex=t;for(let n=0;n<this.underlyingCalls.length;n++)n!==t&&this.underlyingCalls[n].state!=="COMPLETED"&&(this.underlyingCalls[n].state="COMPLETED",this.underlyingCalls[n].call.cancelWithStatus(yp.Status.CANCELLED,"Discarded in favor of other hedged attempt"));this.clearSentMessages()}}commitCallWithMostMessages(){if(this.state==="COMMITTED")return;let t=-1,n=-1;for(let[r,i]of this.underlyingCalls.entries())i.state==="ACTIVE"&&i.nextMessageToSend>t&&(t=i.nextMessageToSend,n=r);n===-1?this.state="TRANSPARENT_ONLY":this.commitCall(n)}isStatusCodeInList(t,n){return t.some(r=>r===n||r.toString().toLowerCase()===yp.Status[n].toLowerCase())}getNextRetryBackoffMs(){var t;let n=(t=this.callConfig)===null||t===void 0?void 0:t.methodConfig.retryPolicy;if(!n)return 0;let r=Math.random()*this.nextRetryBackoffSec*1e3,i=Number(n.maxBackoff.substring(0,n.maxBackoff.length-1));return this.nextRetryBackoffSec=Math.min(this.nextRetryBackoffSec*n.backoffMultiplier,i),r}maybeRetryCall(t,n){if(this.state!=="RETRY"){n(!1);return}let r=this.callConfig.methodConfig.retryPolicy;if(this.attempts>=Math.min(r.maxAttempts,5)){n(!1);return}let i;if(t===null)i=this.getNextRetryBackoffMs();else if(t<0){this.state="TRANSPARENT_ONLY",n(!1);return}else i=t,this.nextRetryBackoffSec=this.initialRetryBackoffSec;setTimeout(()=>{var a,s;if(this.state!=="RETRY"){n(!1);return}(!((s=(a=this.retryThrottler)===null||a===void 0?void 0:a.canRetryCall())!==null&&s!==void 0)||s)&&(n(!0),this.attempts+=1,this.startNewAttempt())},i)}countActiveCalls(){let t=0;for(let n of this.underlyingCalls)n?.state==="ACTIVE"&&(t+=1);return t}handleProcessedStatus(t,n,r){var i,a,s;switch(this.state){case"COMMITTED":case"TRANSPARENT_ONLY":this.commitCall(n),this.reportStatus(t);break;case"HEDGING":if(this.isStatusCodeInList((i=this.callConfig.methodConfig.hedgingPolicy.nonFatalStatusCodes)!==null&&i!==void 0?i:[],t.code)){(a=this.retryThrottler)===null||a===void 0||a.addCallFailed();let o;if(r===null)o=0;else if(r<0){this.state="TRANSPARENT_ONLY",this.commitCall(n),this.reportStatus(t);return}else o=r;setTimeout(()=>{this.maybeStartHedgingAttempt(),this.countActiveCalls()===0&&(this.commitCall(n),this.reportStatus(t))},o)}else this.commitCall(n),this.reportStatus(t);break;case"RETRY":this.isStatusCodeInList(this.callConfig.methodConfig.retryPolicy.retryableStatusCodes,t.code)?((s=this.retryThrottler)===null||s===void 0||s.addCallFailed(),this.maybeRetryCall(r,o=>{o||(this.commitCall(n),this.reportStatus(t))})):(this.commitCall(n),this.reportStatus(t));break}}getPushback(t){let n=t.get("grpc-retry-pushback-ms");if(n.length===0)return null;try{return parseInt(n[0])}catch{return-1}}handleChildStatus(t,n){var r;if(this.underlyingCalls[n].state==="COMPLETED")return;if(this.trace("state="+this.state+" handling status with progress "+t.progress+" from child ["+this.underlyingCalls[n].call.getCallNumber()+"] in state "+this.underlyingCalls[n].state),this.underlyingCalls[n].state="COMPLETED",t.code===yp.Status.OK){(r=this.retryThrottler)===null||r===void 0||r.addCallSucceeded(),this.commitCall(n),this.reportStatus(t);return}if(this.state==="COMMITTED"){this.reportStatus(t);return}let i=this.getPushback(t.metadata);switch(t.progress){case"NOT_STARTED":this.startNewAttempt();break;case"REFUSED":this.transparentRetryUsed?this.handleProcessedStatus(t,n,i):(this.transparentRetryUsed=!0,this.startNewAttempt());break;case"DROP":this.commitCall(n),this.reportStatus(t);break;case"PROCESSED":this.handleProcessedStatus(t,n,i);break}}maybeStartHedgingAttempt(){if(this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let t=this.callConfig.methodConfig.hedgingPolicy;this.attempts>=Math.min(t.maxAttempts,5)||(this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer())}maybeStartHedgingTimer(){var t,n,r;if(this.hedgingTimer&&clearTimeout(this.hedgingTimer),this.state!=="HEDGING"||!this.callConfig.methodConfig.hedgingPolicy)return;let i=this.callConfig.methodConfig.hedgingPolicy;if(this.attempts>=Math.min(i.maxAttempts,5))return;let a=(t=i.hedgingDelay)!==null&&t!==void 0?t:"0s",s=Number(a.substring(0,a.length-1));this.hedgingTimer=setTimeout(()=>{this.maybeStartHedgingAttempt()},s*1e3),(r=(n=this.hedgingTimer).unref)===null||r===void 0||r.call(n)}startNewAttempt(){let t=this.channel.createLoadBalancingCall(this.callConfig,this.methodName,this.host,this.credentials,this.deadline);this.trace("Created child call ["+t.getCallNumber()+"] for attempt "+this.attempts);let n=this.underlyingCalls.length;this.underlyingCalls.push({state:"ACTIVE",call:t,nextMessageToSend:0,startTime:new Date});let r=this.attempts-1,i=this.initialMetadata.clone();r>0&&i.set(Fv,`${r}`);let a=!1;t.start(i,{onReceiveMetadata:s=>{this.trace("Received metadata from child ["+t.getCallNumber()+"]"),this.commitCall(n),a=!0,r>0&&s.set(Fv,`${r}`),this.underlyingCalls[n].state==="ACTIVE"&&this.listener.onReceiveMetadata(s)},onReceiveMessage:s=>{this.trace("Received message from child ["+t.getCallNumber()+"]"),this.commitCall(n),this.underlyingCalls[n].state==="ACTIVE"&&this.listener.onReceiveMessage(s)},onReceiveStatus:s=>{this.trace("Received status from child ["+t.getCallNumber()+"]"),!a&&r>0&&s.metadata.set(Fv,`${r}`),this.handleChildStatus(s,n)}}),this.sendNextChildMessage(n),this.readStarted&&t.startRead()}start(t,n){this.trace("start called"),this.listener=n,this.initialMetadata=t,this.attempts+=1,this.startNewAttempt(),this.maybeStartHedgingTimer()}handleChildWriteCompleted(t){var n,r;let i=this.underlyingCalls[t],a=i.nextMessageToSend;(r=(n=this.getBufferEntry(a)).callback)===null||r===void 0||r.call(n),this.clearSentMessages(),i.nextMessageToSend+=1,this.sendNextChildMessage(t)}sendNextChildMessage(t){let n=this.underlyingCalls[t];if(n.state!=="COMPLETED"&&this.getBufferEntry(n.nextMessageToSend)){let r=this.getBufferEntry(n.nextMessageToSend);switch(r.entryType){case"MESSAGE":n.call.sendMessageWithContext({callback:i=>{this.handleChildWriteCompleted(t)}},r.message.message);break;case"HALF_CLOSE":n.nextMessageToSend+=1,n.call.halfClose();break;case"FREED":break}}}sendMessageWithContext(t,n){var r;this.trace("write() called with message of length "+n.length);let i={message:n,flags:t.flags},a=this.getNextBufferIndex(),s={entryType:"MESSAGE",message:i,allocated:this.bufferTracker.allocate(n.length,this.callNumber)};if(this.writeBuffer.push(s),s.allocated){(r=t.callback)===null||r===void 0||r.call(t);for(let[o,c]of this.underlyingCalls.entries())c.state==="ACTIVE"&&c.nextMessageToSend===a&&c.call.sendMessageWithContext({callback:u=>{this.handleChildWriteCompleted(o)}},n)}else{if(this.commitCallWithMostMessages(),this.committedCallIndex===null)return;let o=this.underlyingCalls[this.committedCallIndex];s.callback=t.callback,o.state==="ACTIVE"&&o.nextMessageToSend===a&&o.call.sendMessageWithContext({callback:c=>{this.handleChildWriteCompleted(this.committedCallIndex)}},n)}}startRead(){this.trace("startRead called"),this.readStarted=!0;for(let t of this.underlyingCalls)t?.state==="ACTIVE"&&t.call.startRead()}halfClose(){this.trace("halfClose called");let t=this.getNextBufferIndex();this.writeBuffer.push({entryType:"HALF_CLOSE",allocated:!1});for(let n of this.underlyingCalls)n?.state==="ACTIVE"&&n.nextMessageToSend===t&&(n.nextMessageToSend+=1,n.call.halfClose())}setCredentials(t){throw new Error("Method not implemented.")}getMethod(){return this.methodName}getHost(){return this.host}};va.RetryingCall=Uv});var wp=N(vp=>{"use strict";Object.defineProperty(vp,"__esModule",{value:!0});vp.BaseSubchannelWrapper=void 0;var qv=class{constructor(t){this.child=t,this.healthy=!0,this.healthListeners=new Set,t.addHealthStateWatcher(n=>{this.healthy&&this.updateHealthListeners()})}updateHealthListeners(){for(let t of this.healthListeners)t(this.isHealthy())}getConnectivityState(){return this.child.getConnectivityState()}addConnectivityStateListener(t){this.child.addConnectivityStateListener(t)}removeConnectivityStateListener(t){this.child.removeConnectivityStateListener(t)}startConnecting(){this.child.startConnecting()}getAddress(){return this.child.getAddress()}throttleKeepalive(t){this.child.throttleKeepalive(t)}ref(){this.child.ref()}unref(){this.child.unref()}getChannelzRef(){return this.child.getChannelzRef()}isHealthy(){return this.healthy&&this.child.isHealthy()}addHealthStateWatcher(t){this.healthListeners.add(t)}removeHealthStateWatcher(t){this.healthListeners.delete(t)}setHealthy(t){t!==this.healthy&&(this.healthy=t,this.child.isHealthy()&&this.updateHealthListeners())}getRealSubchannel(){return this.child.getRealSubchannel()}realSubchannelEquals(t){return this.getRealSubchannel()===t.getRealSubchannel()}};vp.BaseSubchannelWrapper=qv});var Pk=N(Cp=>{"use strict";Object.defineProperty(Cp,"__esModule",{value:!0});Cp.InternalChannel=void 0;var aH=df(),sH=UN(),oH=wk(),Bk=oa(),Cl=Pe(),cH=Sv(),uH=Ik(),Ok=$r(),Jv=it(),lH=_v(),bp=Sn(),ui=Vn(),Il=cs(),dH=Tk(),fH=bl(),pH=Rk(),Vv=wv(),hH=hp(),zv=kk(),mH=wp(),gH=2147483647,_H=1e3,AH=30*60*1e3,Ep=new Map,yH=1<<24,vH=1<<20,Gv=class extends mH.BaseSubchannelWrapper{constructor(t,n){super(t),this.channel=n,this.refCount=0,this.subchannelStateListener=(r,i,a,s)=>{n.throttleKeepalive(s)},t.addConnectivityStateListener(this.subchannelStateListener)}ref(){this.child.ref(),this.refCount+=1}unref(){this.child.unref(),this.refCount-=1,this.refCount<=0&&(this.child.removeConnectivityStateListener(this.subchannelStateListener),this.channel.removeWrappedSubchannel(this))}},Wv=class{constructor(t,n,r){var i,a,s,o,c,u,d,p;if(this.credentials=n,this.options=r,this.connectivityState=ui.ConnectivityState.IDLE,this.currentPicker=new Bk.UnavailablePicker,this.configSelectionQueue=[],this.pickQueue=[],this.connectivityStateWatchers=[],this.configSelector=null,this.currentResolutionError=null,this.wrappedSubchannels=new Set,this.callCount=0,this.idleTimer=null,this.channelzEnabled=!0,this.callTracker=new Il.ChannelzCallTracker,this.childrenTracker=new Il.ChannelzChildrenTracker,this.randomChannelId=Math.floor(Math.random()*Number.MAX_SAFE_INTEGER),typeof t!="string")throw new TypeError("Channel target must be a string");if(!(n instanceof aH.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(r&&typeof r!="object")throw new TypeError("Channel options must be an object");this.originalTarget=t;let h=(0,bp.parseUri)(t);if(h===null)throw new Error(`Could not parse target name "${t}"`);let _=(0,Ok.mapUriDefaultScheme)(h);if(_===null)throw new Error(`Could not find a default scheme for target name "${t}"`);this.callRefTimer=setInterval(()=>{},gH),(a=(i=this.callRefTimer).unref)===null||a===void 0||a.call(i),this.options["grpc.enable_channelz"]===0&&(this.channelzEnabled=!1),this.channelzTrace=new Il.ChannelzTrace,this.channelzRef=(0,Il.registerChannelzChannel)(t,()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Channel created"),this.options["grpc.default_authority"]?this.defaultAuthority=this.options["grpc.default_authority"]:this.defaultAuthority=(0,Ok.getDefaultAuthority)(_);let w=(0,lH.mapProxyName)(_,r);this.target=w.target,this.options=Object.assign({},this.options,w.extraOptions),this.subchannelPool=(0,oH.getSubchannelPool)(((s=r["grpc.use_local_subchannel_pool"])!==null&&s!==void 0?s:0)===0),this.retryBufferTracker=new zv.MessageBufferTracker((o=r["grpc.retry_buffer_size"])!==null&&o!==void 0?o:yH,(c=r["grpc.per_rpc_retry_buffer_size"])!==null&&c!==void 0?c:vH),this.keepaliveTime=(u=r["grpc.keepalive_time_ms"])!==null&&u!==void 0?u:-1,this.idleTimeoutMs=Math.max((d=r["grpc.client_idle_timeout_ms"])!==null&&d!==void 0?d:AH,_H);let A={createSubchannel:(b,T)=>{let B=this.subchannelPool.getOrCreateSubchannel(this.target,b,Object.assign({},this.options,T),this.credentials);B.throttleKeepalive(this.keepaliveTime),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Created subchannel or used existing subchannel",B.getChannelzRef());let O=new Gv(B,this);return this.wrappedSubchannels.add(O),O},updateState:(b,T)=>{this.currentPicker=T;let B=this.pickQueue.slice();this.pickQueue=[],B.length>0&&this.callRefTimerUnref();for(let O of B)O.doPick();this.updateState(b)},requestReresolution:()=>{throw new Error("Resolving load balancer should never call requestReresolution")},addChannelzChild:b=>{this.channelzEnabled&&this.childrenTracker.refChild(b)},removeChannelzChild:b=>{this.channelzEnabled&&this.childrenTracker.unrefChild(b)}};this.resolvingLoadBalancer=new sH.ResolvingLoadBalancer(this.target,A,r,(b,T)=>{b.retryThrottling?Ep.set(this.getTarget(),new zv.RetryThrottler(b.retryThrottling.maxTokens,b.retryThrottling.tokenRatio,Ep.get(this.getTarget()))):Ep.delete(this.getTarget()),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Address resolution succeeded"),this.configSelector=T,this.currentResolutionError=null,process.nextTick(()=>{let B=this.configSelectionQueue;this.configSelectionQueue=[],B.length>0&&this.callRefTimerUnref();for(let O of B)O.getConfig()})},b=>{this.channelzEnabled&&this.channelzTrace.addTrace("CT_WARNING","Address resolution failed with code "+b.code+' and details "'+b.details+'"'),this.configSelectionQueue.length>0&&this.trace("Name resolution failed with calls queued for config selection"),this.configSelector===null&&(this.currentResolutionError=Object.assign(Object.assign({},(0,hH.restrictControlPlaneStatusCode)(b.code,b.details)),{metadata:b.metadata}));let T=this.configSelectionQueue;this.configSelectionQueue=[],T.length>0&&this.callRefTimerUnref();for(let B of T)B.reportResolverError(b)}),this.filterStackFactory=new cH.FilterStackFactory([new uH.CompressionFilterFactory(this,this.options)]),this.trace("Channel constructed with options "+JSON.stringify(r,void 0,2));let S=new Error;(0,Jv.trace)(Cl.LogVerbosity.DEBUG,"channel_stacktrace","("+this.channelzRef.id+`) Channel constructed
22
+ `+((p=S.stack)===null||p===void 0?void 0:p.substring(S.stack.indexOf(`
23
+ `)+1))),this.lastActivityTimestamp=new Date}getChannelzInfo(){return{target:this.originalTarget,state:this.connectivityState,trace:this.channelzTrace,callTracker:this.callTracker,children:this.childrenTracker.getChildLists()}}trace(t,n){(0,Jv.trace)(n??Cl.LogVerbosity.DEBUG,"channel","("+this.channelzRef.id+") "+(0,bp.uriToString)(this.target)+" "+t)}callRefTimerRef(){var t,n,r,i;!((n=(t=this.callRefTimer).hasRef)===null||n===void 0)&&n.call(t)||(this.trace("callRefTimer.ref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(i=(r=this.callRefTimer).ref)===null||i===void 0||i.call(r))}callRefTimerUnref(){var t,n;(!this.callRefTimer.hasRef||this.callRefTimer.hasRef())&&(this.trace("callRefTimer.unref | configSelectionQueue.length="+this.configSelectionQueue.length+" pickQueue.length="+this.pickQueue.length),(n=(t=this.callRefTimer).unref)===null||n===void 0||n.call(t))}removeConnectivityStateWatcher(t){let n=this.connectivityStateWatchers.findIndex(r=>r===t);n>=0&&this.connectivityStateWatchers.splice(n,1)}updateState(t){(0,Jv.trace)(Cl.LogVerbosity.DEBUG,"connectivity_state","("+this.channelzRef.id+") "+(0,bp.uriToString)(this.target)+" "+ui.ConnectivityState[this.connectivityState]+" -> "+ui.ConnectivityState[t]),this.channelzEnabled&&this.channelzTrace.addTrace("CT_INFO","Connectivity state change to "+ui.ConnectivityState[t]),this.connectivityState=t;let n=this.connectivityStateWatchers.slice();for(let r of n)t!==r.currentState&&(r.timer&&clearTimeout(r.timer),this.removeConnectivityStateWatcher(r),r.callback());t!==ui.ConnectivityState.TRANSIENT_FAILURE&&(this.currentResolutionError=null)}throttleKeepalive(t){if(t>this.keepaliveTime){this.keepaliveTime=t;for(let n of this.wrappedSubchannels)n.throttleKeepalive(t)}}removeWrappedSubchannel(t){this.wrappedSubchannels.delete(t)}doPick(t,n){return this.currentPicker.pick({metadata:t,extraPickInfo:n})}queueCallForPick(t){this.pickQueue.push(t),this.callRefTimerRef()}getConfig(t,n){return this.resolvingLoadBalancer.exitIdle(),this.configSelector?{type:"SUCCESS",config:this.configSelector(t,n,this.randomChannelId)}:this.currentResolutionError?{type:"ERROR",error:this.currentResolutionError}:{type:"NONE"}}queueCallForConfig(t){this.configSelectionQueue.push(t),this.callRefTimerRef()}enterIdle(){this.resolvingLoadBalancer.destroy(),this.updateState(ui.ConnectivityState.IDLE),this.currentPicker=new Bk.QueuePicker(this.resolvingLoadBalancer),this.idleTimer&&(clearTimeout(this.idleTimer),this.idleTimer=null)}startIdleTimeout(t){var n,r;this.idleTimer=setTimeout(()=>{if(this.callCount>0){this.startIdleTimeout(this.idleTimeoutMs);return}let a=new Date().valueOf()-this.lastActivityTimestamp.valueOf();a>=this.idleTimeoutMs?(this.trace("Idle timer triggered after "+this.idleTimeoutMs+"ms of inactivity"),this.enterIdle()):this.startIdleTimeout(this.idleTimeoutMs-a)},t),(r=(n=this.idleTimer).unref)===null||r===void 0||r.call(n)}maybeStartIdleTimer(){this.connectivityState!==ui.ConnectivityState.SHUTDOWN&&!this.idleTimer&&this.startIdleTimeout(this.idleTimeoutMs)}onCallStart(){this.channelzEnabled&&this.callTracker.addCallStarted(),this.callCount+=1}onCallEnd(t){this.channelzEnabled&&(t.code===Cl.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()),this.callCount-=1,this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()}createLoadBalancingCall(t,n,r,i,a){let s=(0,Vv.getNextCallNumber)();return this.trace("createLoadBalancingCall ["+s+'] method="'+n+'"'),new dH.LoadBalancingCall(this,t,n,r,i,a,s)}createRetryingCall(t,n,r,i,a){let s=(0,Vv.getNextCallNumber)();return this.trace("createRetryingCall ["+s+'] method="'+n+'"'),new zv.RetryingCall(this,t,n,r,i,a,s,this.retryBufferTracker,Ep.get(this.getTarget()))}createInnerCall(t,n,r,i,a){return this.options["grpc.enable_retries"]===0?this.createLoadBalancingCall(t,n,r,i,a):this.createRetryingCall(t,n,r,i,a)}createResolvingCall(t,n,r,i,a){let s=(0,Vv.getNextCallNumber)();this.trace("createResolvingCall ["+s+'] method="'+t+'", deadline='+(0,fH.deadlineToString)(n));let o={deadline:n,flags:a??Cl.Propagate.DEFAULTS,host:r??this.defaultAuthority,parentCall:i},c=new pH.ResolvingCall(this,t,o,this.filterStackFactory.clone(),this.credentials._getCallCredentials(),s);return this.onCallStart(),c.addStatusWatcher(u=>{this.onCallEnd(u)}),c}close(){this.resolvingLoadBalancer.destroy(),this.updateState(ui.ConnectivityState.SHUTDOWN),clearInterval(this.callRefTimer),this.idleTimer&&clearTimeout(this.idleTimer),this.channelzEnabled&&(0,Il.unregisterChannelzRef)(this.channelzRef),this.subchannelPool.unrefUnusedSubchannels()}getTarget(){return(0,bp.uriToString)(this.target)}getConnectivityState(t){let n=this.connectivityState;return t&&(this.resolvingLoadBalancer.exitIdle(),this.lastActivityTimestamp=new Date,this.maybeStartIdleTimer()),n}watchConnectivityState(t,n,r){if(this.connectivityState===ui.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");let i=null;if(n!==1/0){let s=n instanceof Date?n:new Date(n),o=new Date;if(n===-1/0||s<=o){process.nextTick(r,new Error("Deadline passed without connectivity state change"));return}i=setTimeout(()=>{this.removeConnectivityStateWatcher(a),r(new Error("Deadline passed without connectivity state change"))},s.getTime()-o.getTime())}let a={currentState:t,callback:r,timer:i};this.connectivityStateWatchers.push(a)}getChannelzRef(){return this.channelzRef}createCall(t,n,r,i,a){if(typeof t!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof n=="number"||n instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");if(this.connectivityState===ui.ConnectivityState.SHUTDOWN)throw new Error("Channel has been shut down");return this.createResolvingCall(t,n,r,i,a)}};Cp.InternalChannel=Wv});var hy=N(Ip=>{"use strict";Object.defineProperty(Ip,"__esModule",{value:!0});Ip.ChannelImplementation=void 0;var wH=df(),bH=Pk(),Hv=class{constructor(t,n,r){if(typeof t!="string")throw new TypeError("Channel target must be a string");if(!(n instanceof wH.ChannelCredentials))throw new TypeError("Channel credentials must be a ChannelCredentials object");if(r&&typeof r!="object")throw new TypeError("Channel options must be an object");this.internalChannel=new bH.InternalChannel(t,n,r)}close(){this.internalChannel.close()}getTarget(){return this.internalChannel.getTarget()}getConnectivityState(t){return this.internalChannel.getConnectivityState(t)}watchConnectivityState(t,n,r){this.internalChannel.watchConnectivityState(t,n,r)}getChannelzRef(){return this.internalChannel.getChannelzRef()}createCall(t,n,r,i,a){if(typeof t!="string")throw new TypeError("Channel#createCall: method must be a string");if(!(typeof n=="number"||n instanceof Date))throw new TypeError("Channel#createCall: deadline must be a number or Date");return this.internalChannel.createCall(t,n,r,i,a)}};Ip.ChannelImplementation=Hv});var Mk=N(Kn=>{"use strict";Object.defineProperty(Kn,"__esModule",{value:!0});Kn.ServerDuplexStreamImpl=Kn.ServerWritableStreamImpl=Kn.ServerReadableStreamImpl=Kn.ServerUnaryCallImpl=Kn.serverErrorToStatus=void 0;var EH=Ae("events"),Kv=Ae("stream"),jv=Pe(),Dk=jt();function ew(e,t){var n;let r={code:jv.Status.UNKNOWN,details:"message"in e?e.message:"Unknown Error",metadata:(n=t??e.metadata)!==null&&n!==void 0?n:null};return"code"in e&&typeof e.code=="number"&&Number.isInteger(e.code)&&(r.code=e.code,"details"in e&&typeof e.details=="string"&&(r.details=e.details)),r}Kn.serverErrorToStatus=ew;var Zv=class extends EH.EventEmitter{constructor(t,n,r,i){super(),this.path=t,this.call=n,this.metadata=r,this.request=i,this.cancelled=!1}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};Kn.ServerUnaryCallImpl=Zv;var Xv=class extends Kv.Readable{constructor(t,n,r){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.cancelled=!1}_read(t){this.call.startRead()}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}};Kn.ServerReadableStreamImpl=Xv;var Yv=class extends Kv.Writable{constructor(t,n,r,i){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.request=i,this.pendingStatus={code:jv.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new Dk.Metadata,this.on("error",a=>{this.pendingStatus=ew(a),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_write(t,n,r){this.call.sendMessage(t,r)}_final(t){var n;t(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(n=this.pendingStatus.metadata)!==null&&n!==void 0?n:this.trailingMetadata}))}end(t){return t&&(this.trailingMetadata=t),super.end()}};Kn.ServerWritableStreamImpl=Yv;var $v=class extends Kv.Duplex{constructor(t,n,r){super({objectMode:!0}),this.path=t,this.call=n,this.metadata=r,this.pendingStatus={code:jv.Status.OK,details:"OK"},this.cancelled=!1,this.trailingMetadata=new Dk.Metadata,this.on("error",i=>{this.pendingStatus=ew(i),this.end()})}getPeer(){return this.call.getPeer()}sendMetadata(t){this.call.sendMetadata(t)}getDeadline(){return this.call.getDeadline()}getPath(){return this.path}_read(t){this.call.startRead()}_write(t,n,r){this.call.sendMessage(t,r)}_final(t){var n;t(null),this.call.sendStatus(Object.assign(Object.assign({},this.pendingStatus),{metadata:(n=this.pendingStatus.metadata)!==null&&n!==void 0?n:this.trailingMetadata}))}end(t){return t&&(this.trailingMetadata=t),super.end()}};Kn.ServerDuplexStreamImpl=$v});var tw=N(Sp=>{"use strict";Object.defineProperty(Sp,"__esModule",{value:!0});Sp.ServerCredentials=void 0;var Fk=QA(),Sl=class{static createInsecure(){return new xl}static createSsl(t,n,r=!1){var i;if(t!==null&&!Buffer.isBuffer(t))throw new TypeError("rootCerts must be null or a Buffer");if(!Array.isArray(n))throw new TypeError("keyCertPairs must be an array");if(typeof r!="boolean")throw new TypeError("checkClientCertificate must be a boolean");let a=[],s=[];for(let o=0;o<n.length;o++){let c=n[o];if(c===null||typeof c!="object")throw new TypeError(`keyCertPair[${o}] must be an object`);if(!Buffer.isBuffer(c.private_key))throw new TypeError(`keyCertPair[${o}].private_key must be a Buffer`);if(!Buffer.isBuffer(c.cert_chain))throw new TypeError(`keyCertPair[${o}].cert_chain must be a Buffer`);a.push(c.cert_chain),s.push(c.private_key)}return new Tl({ca:(i=t??(0,Fk.getDefaultRootsData)())!==null&&i!==void 0?i:void 0,cert:a,key:s,requestCert:r,ciphers:Fk.CIPHER_SUITES})}};Sp.ServerCredentials=Sl;var xl=class extends Sl{_isSecure(){return!1}_getSettings(){return null}_equals(t){return t instanceof xl}},Tl=class extends Sl{constructor(t){super(),this.options=t}_isSecure(){return!0}_getSettings(){return this.options}_equals(t){if(this===t)return!0;if(!(t instanceof Tl))return!1;if(Buffer.isBuffer(this.options.ca)&&Buffer.isBuffer(t.options.ca)){if(!this.options.ca.equals(t.options.ca))return!1}else if(this.options.ca!==t.options.ca)return!1;if(Array.isArray(this.options.cert)&&Array.isArray(t.options.cert)){if(this.options.cert.length!==t.options.cert.length)return!1;for(let n=0;n<this.options.cert.length;n++){let r=this.options.cert[n],i=t.options.cert[n];if(Buffer.isBuffer(r)&&Buffer.isBuffer(i)){if(!r.equals(i))return!1}else if(r!==i)return!1}}else if(this.options.cert!==t.options.cert)return!1;if(Array.isArray(this.options.key)&&Array.isArray(t.options.key)){if(this.options.key.length!==t.options.key.length)return!1;for(let n=0;n<this.options.key.length;n++){let r=this.options.key[n],i=t.options.key[n];if(Buffer.isBuffer(r)&&Buffer.isBuffer(i)){if(!r.equals(i))return!1}else if(r!==i)return!1}}else if(this.options.key!==t.options.key)return!1;return this.options.requestCert===t.options.requestCert}}});var cw=N(gn=>{"use strict";Object.defineProperty(gn,"__esModule",{value:!0});gn.getServerInterceptingCall=gn.BaseServerInterceptingCall=gn.ServerInterceptingCall=gn.ResponderBuilder=gn.isInterceptingServerListener=gn.ServerListenerBuilder=void 0;var Lk=jt(),mn=Pe(),du=Ae("http2"),Qk=sf(),Uk=Ae("zlib"),CH=yv(),zk=it(),Gk="server_call";function fs(e){zk.trace(mn.LogVerbosity.DEBUG,Gk,e)}var rw=class{constructor(){this.metadata=void 0,this.message=void 0,this.halfClose=void 0,this.cancel=void 0}withOnReceiveMetadata(t){return this.metadata=t,this}withOnReceiveMessage(t){return this.message=t,this}withOnReceiveHalfClose(t){return this.halfClose=t,this}withOnCancel(t){return this.cancel=t,this}build(){return{onReceiveMetadata:this.metadata,onReceiveMessage:this.message,onReceiveHalfClose:this.halfClose,onCancel:this.cancel}}};gn.ServerListenerBuilder=rw;function IH(e){return e.onReceiveMetadata!==void 0&&e.onReceiveMetadata.length===1}gn.isInterceptingServerListener=IH;var iw=class{constructor(t,n){this.listener=t,this.nextListener=n,this.cancelled=!1,this.processingMetadata=!1,this.hasPendingMessage=!1,this.pendingMessage=null,this.processingMessage=!1,this.hasPendingHalfClose=!1}processPendingMessage(){this.hasPendingMessage&&(this.nextListener.onReceiveMessage(this.pendingMessage),this.pendingMessage=null,this.hasPendingMessage=!1)}processPendingHalfClose(){this.hasPendingHalfClose&&(this.nextListener.onReceiveHalfClose(),this.hasPendingHalfClose=!1)}onReceiveMetadata(t){this.cancelled||(this.processingMetadata=!0,this.listener.onReceiveMetadata(t,n=>{this.processingMetadata=!1,!this.cancelled&&(this.nextListener.onReceiveMetadata(n),this.processPendingMessage(),this.processPendingHalfClose())}))}onReceiveMessage(t){this.cancelled||(this.processingMessage=!0,this.listener.onReceiveMessage(t,n=>{this.processingMessage=!1,!this.cancelled&&(this.processingMetadata?(this.pendingMessage=n,this.hasPendingMessage=!0):(this.nextListener.onReceiveMessage(n),this.processPendingHalfClose()))}))}onReceiveHalfClose(){this.cancelled||this.listener.onReceiveHalfClose(()=>{this.cancelled||(this.processingMetadata||this.processingMessage?this.hasPendingHalfClose=!0:this.nextListener.onReceiveHalfClose())})}onCancel(){this.cancelled=!0,this.listener.onCancel(),this.nextListener.onCancel()}},aw=class{constructor(){this.start=void 0,this.metadata=void 0,this.message=void 0,this.status=void 0}withStart(t){return this.start=t,this}withSendMetadata(t){return this.metadata=t,this}withSendMessage(t){return this.message=t,this}withSendStatus(t){return this.status=t,this}build(){return{start:this.start,sendMetadata:this.metadata,sendMessage:this.message,sendStatus:this.status}}};gn.ResponderBuilder=aw;var xp={onReceiveMetadata:(e,t)=>{t(e)},onReceiveMessage:(e,t)=>{t(e)},onReceiveHalfClose:e=>{e()},onCancel:()=>{}},Tp={start:e=>{e()},sendMetadata:(e,t)=>{t(e)},sendMessage:(e,t)=>{t(e)},sendStatus:(e,t)=>{t(e)}},sw=class{constructor(t,n){var r,i,a,s;this.nextCall=t,this.processingMetadata=!1,this.processingMessage=!1,this.pendingMessage=null,this.pendingMessageCallback=null,this.pendingStatus=null,this.responder={start:(r=n?.start)!==null&&r!==void 0?r:Tp.start,sendMetadata:(i=n?.sendMetadata)!==null&&i!==void 0?i:Tp.sendMetadata,sendMessage:(a=n?.sendMessage)!==null&&a!==void 0?a:Tp.sendMessage,sendStatus:(s=n?.sendStatus)!==null&&s!==void 0?s:Tp.sendStatus}}processPendingMessage(){this.pendingMessageCallback&&(this.nextCall.sendMessage(this.pendingMessage,this.pendingMessageCallback),this.pendingMessage=null,this.pendingMessageCallback=null)}processPendingStatus(){this.pendingStatus&&(this.nextCall.sendStatus(this.pendingStatus),this.pendingStatus=null)}start(t){this.responder.start(n=>{var r,i,a,s;let o={onReceiveMetadata:(r=n?.onReceiveMetadata)!==null&&r!==void 0?r:xp.onReceiveMetadata,onReceiveMessage:(i=n?.onReceiveMessage)!==null&&i!==void 0?i:xp.onReceiveMessage,onReceiveHalfClose:(a=n?.onReceiveHalfClose)!==null&&a!==void 0?a:xp.onReceiveHalfClose,onCancel:(s=n?.onCancel)!==null&&s!==void 0?s:xp.onCancel},c=new iw(o,t);this.nextCall.start(c)})}sendMetadata(t){this.processingMetadata=!0,this.responder.sendMetadata(t,n=>{this.processingMetadata=!1,this.nextCall.sendMetadata(n),this.processPendingMessage(),this.processPendingStatus()})}sendMessage(t,n){this.processingMessage=!0,this.responder.sendMessage(t,r=>{this.processingMessage=!1,this.processingMetadata?(this.pendingMessage=r,this.pendingMessageCallback=n):this.nextCall.sendMessage(r,n)})}sendStatus(t){this.responder.sendStatus(t,n=>{this.processingMetadata||this.processingMessage?this.pendingStatus=n:this.nextCall.sendStatus(n)})}startRead(){this.nextCall.startRead()}getPeer(){return this.nextCall.getPeer()}getDeadline(){return this.nextCall.getDeadline()}};gn.ServerInterceptingCall=sw;var Wk="grpc-accept-encoding",ow="grpc-encoding",qk="grpc-message",Jk="grpc-status",nw="grpc-timeout",SH=/(\d{1,8})\s*([HMSmun])/,xH={H:36e5,M:6e4,S:1e3,m:1,u:.001,n:1e-6},TH={[Wk]:"identity,deflate,gzip",[ow]:"identity"},Vk={[du.constants.HTTP2_HEADER_STATUS]:du.constants.HTTP_STATUS_OK,[du.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},NH={waitForTrailers:!0},Np=class{constructor(t,n,r,i,a){this.stream=t,this.callEventTracker=r,this.handler=i,this.listener=null,this.deadlineTimer=null,this.deadline=1/0,this.maxSendMessageSize=mn.DEFAULT_MAX_SEND_MESSAGE_LENGTH,this.maxReceiveMessageSize=mn.DEFAULT_MAX_RECEIVE_MESSAGE_LENGTH,this.cancelled=!1,this.metadataSent=!1,this.wantTrailers=!1,this.cancelNotified=!1,this.incomingEncoding="identity",this.readQueue=[],this.isReadPending=!1,this.receivedHalfClose=!1,this.streamEnded=!1,this.stream.once("error",u=>{}),this.stream.once("close",()=>{var u;fs("Request to method "+((u=this.handler)===null||u===void 0?void 0:u.path)+" stream closed with rstCode "+this.stream.rstCode),this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!1),this.callEventTracker.onCallEnd({code:mn.Status.CANCELLED,details:"Stream closed before sending status",metadata:null})),this.notifyOnCancel()}),this.stream.on("data",u=>{this.handleDataFrame(u)}),this.stream.pause(),this.stream.on("end",()=>{this.handleEndEvent()}),"grpc.max_send_message_length"in a&&(this.maxSendMessageSize=a["grpc.max_send_message_length"]),"grpc.max_receive_message_length"in a&&(this.maxReceiveMessageSize=a["grpc.max_receive_message_length"]),this.decoder=new CH.StreamDecoder(this.maxReceiveMessageSize);let s=Lk.Metadata.fromHttp2Headers(n);zk.isTracerEnabled(Gk)&&fs("Request to "+this.handler.path+" received headers "+JSON.stringify(s.toJSON()));let o=s.get(nw);o.length>0&&this.handleTimeoutHeader(o[0]);let c=s.get(ow);c.length>0&&(this.incomingEncoding=c[0]),s.remove(nw),s.remove(ow),s.remove(Wk),s.remove(du.constants.HTTP2_HEADER_ACCEPT_ENCODING),s.remove(du.constants.HTTP2_HEADER_TE),s.remove(du.constants.HTTP2_HEADER_CONTENT_TYPE),this.metadata=s}handleTimeoutHeader(t){let n=t.toString().match(SH);if(n===null){let a={code:mn.Status.INTERNAL,details:`Invalid ${nw} value "${t}"`,metadata:null};process.nextTick(()=>{this.sendStatus(a)});return}let r=+n[1]*xH[n[2]]|0,i=new Date;this.deadline=i.setMilliseconds(i.getMilliseconds()+r),this.deadlineTimer=setTimeout(()=>{let a={code:mn.Status.DEADLINE_EXCEEDED,details:"Deadline exceeded",metadata:null};this.sendStatus(a)},r)}checkCancelled(){return!this.cancelled&&(this.stream.destroyed||this.stream.closed)&&(this.notifyOnCancel(),this.cancelled=!0),this.cancelled}notifyOnCancel(){this.cancelNotified||(this.cancelNotified=!0,this.cancelled=!0,process.nextTick(()=>{var t;(t=this.listener)===null||t===void 0||t.onCancel()}),this.deadlineTimer&&clearTimeout(this.deadlineTimer),this.stream.resume())}maybeSendMetadata(){this.metadataSent||this.sendMetadata(new Lk.Metadata)}serializeMessage(t){let n=this.handler.serialize(t),r=n.byteLength,i=Buffer.allocUnsafe(r+5);return i.writeUInt8(0,0),i.writeUInt32BE(r,1),n.copy(i,5),i}decompressMessage(t,n){let r=t.subarray(5);if(n==="identity")return r;if(n==="deflate"||n==="gzip"){let i;return n==="deflate"?i=Uk.createInflate():i=Uk.createGunzip(),new Promise((a,s)=>{let o=0,c=[];i.on("data",u=>{c.push(u),o+=u.byteLength,this.maxReceiveMessageSize!==-1&&o>this.maxReceiveMessageSize&&(i.destroy(),s({code:mn.Status.RESOURCE_EXHAUSTED,details:`Received message that decompresses to a size larger than ${this.maxReceiveMessageSize}`}))}),i.on("end",()=>{a(Buffer.concat(c))}),i.write(r),i.end()})}else return Promise.reject({code:mn.Status.UNIMPLEMENTED,details:`Received message compressed with unsupported encoding "${n}"`})}async decompressAndMaybePush(t){if(t.type!=="COMPRESSED")throw new Error(`Invalid queue entry type: ${t.type}`);let r=t.compressedMessage.readUInt8(0)===1?this.incomingEncoding:"identity",i;try{i=await this.decompressMessage(t.compressedMessage,r)}catch(a){this.sendStatus(a);return}try{t.parsedMessage=this.handler.deserialize(i)}catch(a){this.sendStatus({code:mn.Status.INTERNAL,details:`Error deserializing request: ${a.message}`});return}t.type="READABLE",this.maybePushNextMessage()}maybePushNextMessage(){if(this.listener&&this.isReadPending&&this.readQueue.length>0&&this.readQueue[0].type!=="COMPRESSED"){this.isReadPending=!1;let t=this.readQueue.shift();t.type==="READABLE"?this.listener.onReceiveMessage(t.parsedMessage):this.listener.onReceiveHalfClose()}}handleDataFrame(t){var n;if(this.checkCancelled())return;fs("Request to "+this.handler.path+" received data frame of size "+t.length);let r;try{r=this.decoder.write(t)}catch(i){this.sendStatus({code:mn.Status.RESOURCE_EXHAUSTED,details:i.message});return}for(let i of r){this.stream.pause();let a={type:"COMPRESSED",compressedMessage:i,parsedMessage:null};this.readQueue.push(a),this.decompressAndMaybePush(a),(n=this.callEventTracker)===null||n===void 0||n.addMessageReceived()}}handleEndEvent(){this.readQueue.push({type:"HALF_CLOSE",compressedMessage:null,parsedMessage:null}),this.receivedHalfClose=!0,this.maybePushNextMessage()}start(t){fs("Request to "+this.handler.path+" start called"),!this.checkCancelled()&&(this.listener=t,t.onReceiveMetadata(this.metadata))}sendMetadata(t){if(this.checkCancelled()||this.metadataSent)return;this.metadataSent=!0;let n=t?t.toHttp2Headers():null,r=Object.assign(Object.assign(Object.assign({},Vk),TH),n);this.stream.respond(r,NH)}sendMessage(t,n){if(this.checkCancelled())return;let r;try{r=this.serializeMessage(t)}catch(i){this.sendStatus({code:mn.Status.INTERNAL,details:`Error serializing response: ${(0,Qk.getErrorMessage)(i)}`,metadata:null});return}if(this.maxSendMessageSize!==-1&&r.length-5>this.maxSendMessageSize){this.sendStatus({code:mn.Status.RESOURCE_EXHAUSTED,details:`Sent message larger than max (${r.length} vs. ${this.maxSendMessageSize})`,metadata:null});return}this.maybeSendMetadata(),fs("Request to "+this.handler.path+" sent data frame of size "+r.length),this.stream.write(r,i=>{var a;if(i){this.sendStatus({code:mn.Status.INTERNAL,details:`Error writing message: ${(0,Qk.getErrorMessage)(i)}`,metadata:null});return}(a=this.callEventTracker)===null||a===void 0||a.addMessageSent(),n()})}sendStatus(t){var n,r;if(!this.checkCancelled())if(fs("Request to method "+((n=this.handler)===null||n===void 0?void 0:n.path)+" ended with status code: "+mn.Status[t.code]+" details: "+t.details),this.metadataSent)this.wantTrailers?this.notifyOnCancel():(this.wantTrailers=!0,this.stream.once("wantTrailers",()=>{var i;this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(t));let a=Object.assign({[Jk]:t.code,[qk]:encodeURI(t.details)},(i=t.metadata)===null||i===void 0?void 0:i.toHttp2Headers());this.stream.sendTrailers(a),this.notifyOnCancel()}),this.stream.end());else{this.callEventTracker&&!this.streamEnded&&(this.streamEnded=!0,this.callEventTracker.onStreamEnd(!0),this.callEventTracker.onCallEnd(t));let i=Object.assign(Object.assign({[Jk]:t.code,[qk]:encodeURI(t.details)},Vk),(r=t.metadata)===null||r===void 0?void 0:r.toHttp2Headers());this.stream.respond(i,{endStream:!0}),this.notifyOnCancel()}}startRead(){fs("Request to "+this.handler.path+" startRead called"),!this.checkCancelled()&&(this.isReadPending=!0,this.readQueue.length===0?this.receivedHalfClose||this.stream.resume():this.maybePushNextMessage())}getPeer(){var t;let n=(t=this.stream.session)===null||t===void 0?void 0:t.socket;return n?.remoteAddress?n.remotePort?`${n.remoteAddress}:${n.remotePort}`:n.remoteAddress:"unknown"}getDeadline(){return this.deadline}};gn.BaseServerInterceptingCall=Np;function RH(e,t,n,r,i,a){let s={path:i.path,requestStream:i.type==="clientStream"||i.type==="bidi",responseStream:i.type==="serverStream"||i.type==="bidi",requestDeserialize:i.deserialize,responseSerialize:i.serialize},o=new Np(t,n,r,i,a);return e.reduce((c,u)=>u(s,c),o)}gn.getServerInterceptingCall=RH});var Kk=N(ba=>{"use strict";var kH=ba&&ba.__runInitializers||function(e,t,n){for(var r=arguments.length>2,i=0;i<t.length;i++)n=r?t[i].call(e,n):t[i].call(e);return r?n:void 0},BH=ba&&ba.__esDecorate||function(e,t,n,r,i,a){function s(b){if(b!==void 0&&typeof b!="function")throw new TypeError("Function expected");return b}for(var o=r.kind,c=o==="getter"?"get":o==="setter"?"set":"value",u=!t&&e?r.static?e:e.prototype:null,d=t||(u?Object.getOwnPropertyDescriptor(u,r.name):{}),p,h=!1,_=n.length-1;_>=0;_--){var w={};for(var A in r)w[A]=A==="access"?{}:r[A];for(var A in r.access)w.access[A]=r.access[A];w.addInitializer=function(b){if(h)throw new TypeError("Cannot add initializers after decoration has completed");a.push(s(b||null))};var S=(0,n[_])(o==="accessor"?{get:d.get,set:d.set}:d[c],w);if(o==="accessor"){if(S===void 0)continue;if(S===null||typeof S!="object")throw new TypeError("Object expected");(p=s(S.get))&&(d.get=p),(p=s(S.set))&&(d.set=p),(p=s(S.init))&&i.unshift(p)}else(p=s(S))&&(o==="field"?i.unshift(p):d[c]=p)}u&&Object.defineProperty(u,r.name,d),h=!0};Object.defineProperty(ba,"__esModule",{value:!0});ba.Server=void 0;var Nn=Ae("http2"),OH=Ae("util"),Ct=Pe(),pu=Mk(),PH=tw(),Hk=$r(),Rp=it(),wa=Ir(),Rr=Sn(),qt=cs(),Zk=cw(),fu=~(1<<31),uw=~(1<<31),DH=2e4,Xk=~(1<<31),{HTTP2_HEADER_PATH:Yk}=Nn.constants,MH="server",$k=Buffer.from("max_age");function FH(){}function LH(e){return function(t,n){return OH.deprecate(t,e)}}function lw(e){return{code:Ct.Status.UNIMPLEMENTED,details:`The server does not implement the method ${e}`}}function QH(e,t){let n=lw(t);switch(e){case"unary":return(r,i)=>{i(n,null)};case"clientStream":return(r,i)=>{i(n,null)};case"serverStream":return r=>{r.emit("error",n)};case"bidi":return r=>{r.emit("error",n)};default:throw new Error(`Invalid handlerType ${e}`)}}var UH=(()=>{var e;let t=[],n;return e=class{constructor(i){var a,s,o,c,u,d;this.boundPorts=(kH(this,t),new Map),this.http2Servers=new Map,this.sessionIdleTimeouts=new Map,this.handlers=new Map,this.sessions=new Map,this.started=!1,this.shutdown=!1,this.serverAddressString="null",this.channelzEnabled=!0,this.options=i??{},this.options["grpc.enable_channelz"]===0?(this.channelzEnabled=!1,this.channelzTrace=new qt.ChannelzTraceStub,this.callTracker=new qt.ChannelzCallTrackerStub,this.listenerChildrenTracker=new qt.ChannelzChildrenTrackerStub,this.sessionChildrenTracker=new qt.ChannelzChildrenTrackerStub):(this.channelzTrace=new qt.ChannelzTrace,this.callTracker=new qt.ChannelzCallTracker,this.listenerChildrenTracker=new qt.ChannelzChildrenTracker,this.sessionChildrenTracker=new qt.ChannelzChildrenTracker),this.channelzRef=(0,qt.registerChannelzServer)("server",()=>this.getChannelzInfo(),this.channelzEnabled),this.channelzTrace.addTrace("CT_INFO","Server created"),this.maxConnectionAgeMs=(a=this.options["grpc.max_connection_age_ms"])!==null&&a!==void 0?a:fu,this.maxConnectionAgeGraceMs=(s=this.options["grpc.max_connection_age_grace_ms"])!==null&&s!==void 0?s:fu,this.keepaliveTimeMs=(o=this.options["grpc.keepalive_time_ms"])!==null&&o!==void 0?o:uw,this.keepaliveTimeoutMs=(c=this.options["grpc.keepalive_timeout_ms"])!==null&&c!==void 0?c:DH,this.sessionIdleTimeout=(u=this.options["grpc.max_connection_idle_ms"])!==null&&u!==void 0?u:Xk,this.commonServerOptions={maxSendHeaderBlockLength:Number.MAX_SAFE_INTEGER},"grpc-node.max_session_memory"in this.options?this.commonServerOptions.maxSessionMemory=this.options["grpc-node.max_session_memory"]:this.commonServerOptions.maxSessionMemory=Number.MAX_SAFE_INTEGER,"grpc.max_concurrent_streams"in this.options&&(this.commonServerOptions.settings={maxConcurrentStreams:this.options["grpc.max_concurrent_streams"]}),this.interceptors=(d=this.options.interceptors)!==null&&d!==void 0?d:[],this.trace("Server constructed")}getChannelzInfo(){return{trace:this.channelzTrace,callTracker:this.callTracker,listenerChildren:this.listenerChildrenTracker.getChildLists(),sessionChildren:this.sessionChildrenTracker.getChildLists()}}getChannelzSessionInfo(i){var a,s,o;let c=this.sessions.get(i),u=i.socket,d=u.remoteAddress?(0,wa.stringToSubchannelAddress)(u.remoteAddress,u.remotePort):null,p=u.localAddress?(0,wa.stringToSubchannelAddress)(u.localAddress,u.localPort):null,h;if(i.encrypted){let w=u,A=w.getCipher(),S=w.getCertificate(),b=w.getPeerCertificate();h={cipherSuiteStandardName:(a=A.standardName)!==null&&a!==void 0?a:null,cipherSuiteOtherName:A.standardName?null:A.name,localCertificate:S&&"raw"in S?S.raw:null,remoteCertificate:b&&"raw"in b?b.raw:null}}else h=null;return{remoteAddress:d,localAddress:p,security:h,remoteName:null,streamsStarted:c.streamTracker.callsStarted,streamsSucceeded:c.streamTracker.callsSucceeded,streamsFailed:c.streamTracker.callsFailed,messagesSent:c.messagesSent,messagesReceived:c.messagesReceived,keepAlivesSent:c.keepAlivesSent,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:c.streamTracker.lastCallStartedTimestamp,lastMessageSentTimestamp:c.lastMessageSentTimestamp,lastMessageReceivedTimestamp:c.lastMessageReceivedTimestamp,localFlowControlWindow:(s=i.state.localWindowSize)!==null&&s!==void 0?s:null,remoteFlowControlWindow:(o=i.state.remoteWindowSize)!==null&&o!==void 0?o:null}}trace(i){Rp.trace(Ct.LogVerbosity.DEBUG,MH,"("+this.channelzRef.id+") "+i)}keepaliveTrace(i){Rp.trace(Ct.LogVerbosity.DEBUG,"keepalive","("+this.channelzRef.id+") "+i)}addProtoService(){throw new Error("Not implemented. Use addService() instead")}addService(i,a){if(i===null||typeof i!="object"||a===null||typeof a!="object")throw new Error("addService() requires two objects as arguments");let s=Object.keys(i);if(s.length===0)throw new Error("Cannot add an empty service to a server");s.forEach(o=>{let c=i[o],u;c.requestStream?c.responseStream?u="bidi":u="clientStream":c.responseStream?u="serverStream":u="unary";let d=a[o],p;if(d===void 0&&typeof c.originalName=="string"&&(d=a[c.originalName]),d!==void 0?p=d.bind(a):p=QH(u,o),this.register(c.path,p,c.responseSerialize,c.requestDeserialize,u)===!1)throw new Error(`Method handler for ${c.path} already provided.`)})}removeService(i){if(i===null||typeof i!="object")throw new Error("removeService() requires object as argument");Object.keys(i).forEach(s=>{let o=i[s];this.unregister(o.path)})}bind(i,a){throw new Error("Not implemented. Use bindAsync() instead")}registerListenerToChannelz(i){return(0,qt.registerChannelzSocket)((0,wa.subchannelAddressToString)(i),()=>({localAddress:i,remoteAddress:null,security:null,remoteName:null,streamsStarted:0,streamsSucceeded:0,streamsFailed:0,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastLocalStreamCreatedTimestamp:null,lastRemoteStreamCreatedTimestamp:null,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null,localFlowControlWindow:null,remoteFlowControlWindow:null}),this.channelzEnabled)}createHttp2Server(i){let a;if(i._isSecure()){let s=Object.assign(this.commonServerOptions,i._getSettings());s.enableTrace=this.options["grpc-node.tls_enable_trace"]===1,a=Nn.createSecureServer(s),a.on("secureConnection",o=>{o.on("error",c=>{this.trace("An incoming TLS connection closed with error: "+c.message)})})}else a=Nn.createServer(this.commonServerOptions);return a.setTimeout(0,FH),this._setupHandlers(a),a}bindOneAddress(i,a){this.trace("Attempting to bind "+(0,wa.subchannelAddressToString)(i));let s=this.createHttp2Server(a.credentials);return new Promise((o,c)=>{let u=d=>{this.trace("Failed to bind "+(0,wa.subchannelAddressToString)(i)+" with error "+d.message),o({port:"port"in i?i.port:1,error:d.message})};s.once("error",u),s.listen(i,()=>{let d=s.address(),p;typeof d=="string"?p={path:d}:p={host:d.address,port:d.port};let h=this.registerListenerToChannelz(p);this.listenerChildrenTracker.refChild(h),this.http2Servers.set(s,{channelzRef:h,sessions:new Set}),a.listeningServers.add(s),this.trace("Successfully bound "+(0,wa.subchannelAddressToString)(p)),o({port:"port"in p?p.port:1}),s.removeListener("error",u)})})}async bindManyPorts(i,a){if(i.length===0)return{count:0,port:0,errors:[]};if((0,wa.isTcpSubchannelAddress)(i[0])&&i[0].port===0){let s=await this.bindOneAddress(i[0],a);if(s.error){let o=await this.bindManyPorts(i.slice(1),a);return Object.assign(Object.assign({},o),{errors:[s.error,...o.errors]})}else{let o=i.slice(1).map(d=>(0,wa.isTcpSubchannelAddress)(d)?{host:d.host,port:s.port}:d),c=await Promise.all(o.map(d=>this.bindOneAddress(d,a))),u=[s,...c];return{count:u.filter(d=>d.error===void 0).length,port:s.port,errors:u.filter(d=>d.error).map(d=>d.error)}}}else{let s=await Promise.all(i.map(o=>this.bindOneAddress(o,a)));return{count:s.filter(o=>o.error===void 0).length,port:s[0].port,errors:s.filter(o=>o.error).map(o=>o.error)}}}async bindAddressList(i,a){let s=await this.bindManyPorts(i,a);if(s.count>0)return s.count<i.length&&Rp.log(Ct.LogVerbosity.INFO,`WARNING Only ${s.count} addresses added out of total ${i.length} resolved`),s.port;{let o=`No address added out of total ${i.length} resolved`;throw Rp.log(Ct.LogVerbosity.ERROR,o),new Error(`${o} errors: [${s.errors.join(",")}]`)}}resolvePort(i){return new Promise((a,s)=>{let o={onSuccessfulResolution:(u,d,p)=>{o.onSuccessfulResolution=()=>{};let h=[].concat(...u.map(_=>_.addresses));if(h.length===0){s(new Error(`No addresses resolved for port ${i}`));return}a(h)},onError:u=>{s(new Error(u.details))}};(0,Hk.createResolver)(i,o,this.options).updateResolution()})}async bindPort(i,a){let s=await this.resolvePort(i);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");let o=await this.bindAddressList(s,a);if(a.cancelled)throw this.completeUnbind(a),new Error("bindAsync operation cancelled by unbind call");return o}normalizePort(i){let a=(0,Rr.parseUri)(i);if(a===null)throw new Error(`Could not parse port "${i}"`);let s=(0,Hk.mapUriDefaultScheme)(a);if(s===null)throw new Error(`Could not get a default scheme for port "${i}"`);return s}bindAsync(i,a,s){if(this.shutdown)throw new Error("bindAsync called after shutdown");if(typeof i!="string")throw new TypeError("port must be a string");if(a===null||!(a instanceof PH.ServerCredentials))throw new TypeError("creds must be a ServerCredentials object");if(typeof s!="function")throw new TypeError("callback must be a function");this.trace("bindAsync port="+i);let o=this.normalizePort(i),c=(h,_)=>{process.nextTick(()=>s(h,_))},u=this.boundPorts.get((0,Rr.uriToString)(o));if(u){if(!a._equals(u.credentials)){c(new Error(`${i} already bound with incompatible credentials`),0);return}u.cancelled=!1,u.completionPromise?u.completionPromise.then(h=>s(null,h),h=>s(h,0)):c(null,u.portNumber);return}u={mapKey:(0,Rr.uriToString)(o),originalUri:o,completionPromise:null,cancelled:!1,portNumber:0,credentials:a,listeningServers:new Set};let d=(0,Rr.splitHostPort)(o.path),p=this.bindPort(o,u);u.completionPromise=p,d?.port===0?p.then(h=>{let _={scheme:o.scheme,authority:o.authority,path:(0,Rr.combineHostPort)({host:d.host,port:h})};u.mapKey=(0,Rr.uriToString)(_),u.completionPromise=null,u.portNumber=h,this.boundPorts.set(u.mapKey,u),s(null,h)},h=>{s(h,0)}):(this.boundPorts.set(u.mapKey,u),p.then(h=>{u.completionPromise=null,u.portNumber=h,s(null,h)},h=>{s(h,0)}))}closeServer(i,a){this.trace("Closing server with address "+JSON.stringify(i.address()));let s=this.http2Servers.get(i);i.close(()=>{s&&(this.listenerChildrenTracker.unrefChild(s.channelzRef),(0,qt.unregisterChannelzRef)(s.channelzRef)),this.http2Servers.delete(i),a?.()})}closeSession(i,a){var s;this.trace("Closing session initiated by "+((s=i.socket)===null||s===void 0?void 0:s.remoteAddress));let o=this.sessions.get(i),c=()=>{o&&(this.sessionChildrenTracker.unrefChild(o.ref),(0,qt.unregisterChannelzRef)(o.ref)),a?.()};i.closed?queueMicrotask(c):i.close(c)}completeUnbind(i){for(let a of i.listeningServers){let s=this.http2Servers.get(a);if(this.closeServer(a,()=>{i.listeningServers.delete(a)}),s)for(let o of s.sessions)this.closeSession(o)}this.boundPorts.delete(i.mapKey)}unbind(i){this.trace("unbind port="+i);let a=this.normalizePort(i),s=(0,Rr.splitHostPort)(a.path);if(s?.port===0)throw new Error("Cannot unbind port 0");let o=this.boundPorts.get((0,Rr.uriToString)(a));o&&(this.trace("unbinding "+o.mapKey+" originally bound as "+(0,Rr.uriToString)(o.originalUri)),o.completionPromise?o.cancelled=!0:this.completeUnbind(o))}drain(i,a){var s,o;this.trace("drain port="+i+" graceTimeMs="+a);let c=this.normalizePort(i),u=(0,Rr.splitHostPort)(c.path);if(u?.port===0)throw new Error("Cannot drain port 0");let d=this.boundPorts.get((0,Rr.uriToString)(c));if(!d)return;let p=new Set;for(let h of d.listeningServers){let _=this.http2Servers.get(h);if(_)for(let w of _.sessions)p.add(w),this.closeSession(w,()=>{p.delete(w)})}(o=(s=setTimeout(()=>{for(let h of p)h.destroy(Nn.constants.NGHTTP2_CANCEL)},a)).unref)===null||o===void 0||o.call(s)}forceShutdown(){for(let i of this.boundPorts.values())i.cancelled=!0;this.boundPorts.clear();for(let i of this.http2Servers.keys())this.closeServer(i);this.sessions.forEach((i,a)=>{this.closeSession(a),a.destroy(Nn.constants.NGHTTP2_CANCEL)}),this.sessions.clear(),(0,qt.unregisterChannelzRef)(this.channelzRef),this.shutdown=!0}register(i,a,s,o,c){return this.handlers.has(i)?!1:(this.handlers.set(i,{func:a,serialize:s,deserialize:o,type:c,path:i}),!0)}unregister(i){return this.handlers.delete(i)}start(){if(this.http2Servers.size===0||[...this.http2Servers.keys()].every(i=>!i.listening))throw new Error("server must be bound in order to start");if(this.started===!0)throw new Error("server is already started");this.started=!0}tryShutdown(i){var a;let s=u=>{(0,qt.unregisterChannelzRef)(this.channelzRef),i(u)},o=0;function c(){o--,o===0&&s()}this.shutdown=!0;for(let[u,d]of this.http2Servers.entries()){o++;let p=d.channelzRef.name;this.trace("Waiting for server "+p+" to close"),this.closeServer(u,()=>{this.trace("Server "+p+" finished closing"),c()});for(let h of d.sessions.keys()){o++;let _=(a=h.socket)===null||a===void 0?void 0:a.remoteAddress;this.trace("Waiting for session "+_+" to close"),this.closeSession(h,()=>{this.trace("Session "+_+" finished closing"),c()})}}o===0&&s()}addHttp2Port(){throw new Error("Not yet implemented")}getChannelzRef(){return this.channelzRef}_verifyContentType(i,a){let s=a[Nn.constants.HTTP2_HEADER_CONTENT_TYPE];return typeof s!="string"||!s.startsWith("application/grpc")?(i.respond({[Nn.constants.HTTP2_HEADER_STATUS]:Nn.constants.HTTP_STATUS_UNSUPPORTED_MEDIA_TYPE},{endStream:!0}),!1):!0}_retrieveHandler(i){this.trace("Received call to method "+i+" at address "+this.serverAddressString);let a=this.handlers.get(i);return a===void 0?(this.trace("No handler registered for method "+i+". Sending UNIMPLEMENTED status."),null):a}_respondWithError(i,a,s=null){var o,c;let u=Object.assign({"grpc-status":(o=i.code)!==null&&o!==void 0?o:Ct.Status.INTERNAL,"grpc-message":i.details,[Nn.constants.HTTP2_HEADER_STATUS]:Nn.constants.HTTP_STATUS_OK,[Nn.constants.HTTP2_HEADER_CONTENT_TYPE]:"application/grpc+proto"},(c=i.metadata)===null||c===void 0?void 0:c.toHttp2Headers());a.respond(u,{endStream:!0}),this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed()}_channelzHandler(i,a){this.onStreamOpened(i);let s=this.sessions.get(i.session);if(this.callTracker.addCallStarted(),s?.streamTracker.addCallStarted(),!this._verifyContentType(i,a)){this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed();return}let o=a[Yk],c=this._retrieveHandler(o);if(!c){this._respondWithError(lw(o),i,s);return}let u={addMessageSent:()=>{s&&(s.messagesSent+=1,s.lastMessageSentTimestamp=new Date)},addMessageReceived:()=>{s&&(s.messagesReceived+=1,s.lastMessageReceivedTimestamp=new Date)},onCallEnd:p=>{p.code===Ct.Status.OK?this.callTracker.addCallSucceeded():this.callTracker.addCallFailed()},onStreamEnd:p=>{s&&(p?s.streamTracker.addCallSucceeded():s.streamTracker.addCallFailed())}},d=(0,Zk.getServerInterceptingCall)(this.interceptors,i,a,u,c,this.options);this._runHandlerForCall(d,c)||(this.callTracker.addCallFailed(),s?.streamTracker.addCallFailed(),d.sendStatus({code:Ct.Status.INTERNAL,details:`Unknown handler type: ${c.type}`}))}_streamHandler(i,a){if(this.onStreamOpened(i),this._verifyContentType(i,a)!==!0)return;let s=a[Yk],o=this._retrieveHandler(s);if(!o){this._respondWithError(lw(s),i,null);return}let c=(0,Zk.getServerInterceptingCall)(this.interceptors,i,a,null,o,this.options);this._runHandlerForCall(c,o)||c.sendStatus({code:Ct.Status.INTERNAL,details:`Unknown handler type: ${o.type}`})}_runHandlerForCall(i,a){let{type:s}=a;if(s==="unary")qH(i,a);else if(s==="clientStream")JH(i,a);else if(s==="serverStream")VH(i,a);else if(s==="bidi")zH(i,a);else return!1;return!0}_setupHandlers(i){if(i===null)return;let a=i.address(),s="null";a&&(typeof a=="string"?s=a:s=a.address+":"+a.port),this.serverAddressString=s;let o=this.channelzEnabled?this._channelzHandler:this._streamHandler,c=this.channelzEnabled?this._channelzSessionHandler(i):this._sessionHandler(i);i.on("stream",o.bind(this)),i.on("session",c)}_sessionHandler(i){return a=>{var s,o;(s=this.http2Servers.get(i))===null||s===void 0||s.sessions.add(a);let c=null,u=null,d=null,p=!1,h=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==fu){let b=this.maxConnectionAgeMs/10,T=Math.random()*b*2-b;c=setTimeout(()=>{var B,O;p=!0,this.trace("Connection dropped by max connection age: "+((B=a.socket)===null||B===void 0?void 0:B.remoteAddress));try{a.goaway(Nn.constants.NGHTTP2_NO_ERROR,~(1<<31),$k)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==fu&&(u=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(O=u.unref)===null||O===void 0||O.call(u))},this.maxConnectionAgeMs+T),(o=c.unref)===null||o===void 0||o.call(c)}let _=()=>{d&&(clearTimeout(d),d=null)},w=()=>!a.destroyed&&this.keepaliveTimeMs<uw&&this.keepaliveTimeMs>0,A,S=()=>{var b;w()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),d=setTimeout(()=>{_(),A()},this.keepaliveTimeMs),(b=d.unref)===null||b===void 0||b.call(d))};A=()=>{var b;if(!w())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let T="";try{a.ping((O,z,Q)=>{_(),O?(this.keepaliveTrace("Ping failed with error: "+O.message),p=!0,a.close()):(this.keepaliveTrace("Received ping response"),S())})||(T="Ping returned false")}catch(B){T=(B instanceof Error?B.message:"")||"Unknown error"}if(T){this.keepaliveTrace("Ping send failed: "+T),this.trace("Connection dropped due to ping send error: "+T),p=!0,a.close();return}d=setTimeout(()=>{_(),this.keepaliveTrace("Ping timeout passed without response"),this.trace("Connection dropped by keepalive timeout"),p=!0,a.close()},this.keepaliveTimeoutMs),(b=d.unref)===null||b===void 0||b.call(d)},S(),a.on("close",()=>{var b,T;p||this.trace(`Connection dropped by client ${(b=a.socket)===null||b===void 0?void 0:b.remoteAddress}`),c&&clearTimeout(c),u&&clearTimeout(u),_(),h!==null&&(clearTimeout(h.timeout),this.sessionIdleTimeouts.delete(a)),(T=this.http2Servers.get(i))===null||T===void 0||T.sessions.delete(a)})}}_channelzSessionHandler(i){return a=>{var s,o,c,u;let d=(0,qt.registerChannelzSocket)((o=(s=a.socket)===null||s===void 0?void 0:s.remoteAddress)!==null&&o!==void 0?o:"unknown",this.getChannelzSessionInfo.bind(this,a),this.channelzEnabled),p={ref:d,streamTracker:new qt.ChannelzCallTracker,messagesSent:0,messagesReceived:0,keepAlivesSent:0,lastMessageSentTimestamp:null,lastMessageReceivedTimestamp:null};(c=this.http2Servers.get(i))===null||c===void 0||c.sessions.add(a),this.sessions.set(a,p);let h=`${a.socket.remoteAddress}:${a.socket.remotePort}`;this.channelzTrace.addTrace("CT_INFO","Connection established by client "+h),this.trace("Connection established by client "+h),this.sessionChildrenTracker.refChild(d);let _=null,w=null,A=null,S=!1,b=this.enableIdleTimeout(a);if(this.maxConnectionAgeMs!==fu){let Q=this.maxConnectionAgeMs/10,V=Math.random()*Q*2-Q;_=setTimeout(()=>{var Z;S=!0,this.channelzTrace.addTrace("CT_INFO","Connection dropped by max connection age from "+h);try{a.goaway(Nn.constants.NGHTTP2_NO_ERROR,~(1<<31),$k)}catch{a.destroy();return}a.close(),this.maxConnectionAgeGraceMs!==fu&&(w=setTimeout(()=>{a.destroy()},this.maxConnectionAgeGraceMs),(Z=w.unref)===null||Z===void 0||Z.call(w))},this.maxConnectionAgeMs+V),(u=_.unref)===null||u===void 0||u.call(_)}let T=()=>{A&&(clearTimeout(A),A=null)},B=()=>!a.destroyed&&this.keepaliveTimeMs<uw&&this.keepaliveTimeMs>0,O,z=()=>{var Q;B()&&(this.keepaliveTrace("Starting keepalive timer for "+this.keepaliveTimeMs+"ms"),A=setTimeout(()=>{T(),O()},this.keepaliveTimeMs),(Q=A.unref)===null||Q===void 0||Q.call(A))};O=()=>{var Q;if(!B())return;this.keepaliveTrace("Sending ping with timeout "+this.keepaliveTimeoutMs+"ms");let V="";try{a.ping((fe,ne,k)=>{T(),fe?(this.keepaliveTrace("Ping failed with error: "+fe.message),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to error of a ping frame "+fe.message+" return in "+ne),S=!0,a.close()):(this.keepaliveTrace("Received ping response"),z())})||(V="Ping returned false")}catch(Z){V=(Z instanceof Error?Z.message:"")||"Unknown error"}if(V){this.keepaliveTrace("Ping send failed: "+V),this.channelzTrace.addTrace("CT_INFO","Connection dropped due to ping send error: "+V),S=!0,a.close();return}p.keepAlivesSent+=1,A=setTimeout(()=>{T(),this.keepaliveTrace("Ping timeout passed without response"),this.channelzTrace.addTrace("CT_INFO","Connection dropped by keepalive timeout from "+h),S=!0,a.close()},this.keepaliveTimeoutMs),(Q=A.unref)===null||Q===void 0||Q.call(A)},z(),a.on("close",()=>{var Q;S||this.channelzTrace.addTrace("CT_INFO","Connection dropped by client "+h),this.sessionChildrenTracker.unrefChild(d),(0,qt.unregisterChannelzRef)(d),_&&clearTimeout(_),w&&clearTimeout(w),T(),b!==null&&(clearTimeout(b.timeout),this.sessionIdleTimeouts.delete(a)),(Q=this.http2Servers.get(i))===null||Q===void 0||Q.sessions.delete(a),this.sessions.delete(a)})}}enableIdleTimeout(i){var a,s;if(this.sessionIdleTimeout>=Xk)return null;let o={activeStreams:0,lastIdle:Date.now(),onClose:this.onStreamClose.bind(this,i),timeout:setTimeout(this.onIdleTimeout,this.sessionIdleTimeout,this,i)};(s=(a=o.timeout).unref)===null||s===void 0||s.call(a),this.sessionIdleTimeouts.set(i,o);let{socket:c}=i;return this.trace("Enable idle timeout for "+c.remoteAddress+":"+c.remotePort),o}onIdleTimeout(i,a){let{socket:s}=a,o=i.sessionIdleTimeouts.get(a);o!==void 0&&o.activeStreams===0&&Date.now()-o.lastIdle>=i.sessionIdleTimeout&&(i.trace("Session idle timeout triggered for "+s?.remoteAddress+":"+s?.remotePort+" last idle at "+o.lastIdle),i.closeSession(a))}onStreamOpened(i){let a=i.session,s=this.sessionIdleTimeouts.get(a);s&&(s.activeStreams+=1,i.once("close",s.onClose))}onStreamClose(i){var a,s;let o=this.sessionIdleTimeouts.get(i);o&&(o.activeStreams-=1,o.activeStreams===0&&(o.lastIdle=Date.now(),o.timeout.refresh(),this.trace("Session onStreamClose"+((a=i.socket)===null||a===void 0?void 0:a.remoteAddress)+":"+((s=i.socket)===null||s===void 0?void 0:s.remotePort)+" at "+o.lastIdle)))}},(()=>{let r=typeof Symbol=="function"&&Symbol.metadata?Object.create(null):void 0;n=[LH("Calling start() is no longer necessary. It can be safely omitted.")],BH(e,null,n,{kind:"method",name:"start",static:!1,private:!1,access:{has:i=>"start"in i,get:i=>i.start},metadata:r},null,t),r&&Object.defineProperty(e,Symbol.metadata,{enumerable:!0,configurable:!0,writable:!0,value:r})})(),e})();ba.Server=UH;async function qH(e,t){let n;function r(s,o,c,u){if(s){e.sendStatus((0,pu.serverErrorToStatus)(s,c));return}e.sendMessage(o,()=>{e.sendStatus({code:Ct.Status.OK,details:"OK",metadata:c??null})})}let i,a=null;e.start({onReceiveMetadata(s){i=s,e.startRead()},onReceiveMessage(s){if(a){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${t.path}`,metadata:null});return}a=s,e.startRead()},onReceiveHalfClose(){if(!a){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${t.path}`,metadata:null});return}n=new pu.ServerWritableStreamImpl(t.path,e,i,a);try{t.func(n,r)}catch(s){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${s.message}`,metadata:null})}},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"))}})}function JH(e,t){let n;function r(i,a,s,o){if(i){e.sendStatus((0,pu.serverErrorToStatus)(i,s));return}e.sendMessage(a,()=>{e.sendStatus({code:Ct.Status.OK,details:"OK",metadata:s??null})})}e.start({onReceiveMetadata(i){n=new pu.ServerDuplexStreamImpl(t.path,e,i);try{t.func(n,r)}catch(a){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onReceiveMessage(i){n.push(i)},onReceiveHalfClose(){n.push(null)},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}function VH(e,t){let n,r,i=null;e.start({onReceiveMetadata(a){r=a,e.startRead()},onReceiveMessage(a){if(i){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received a second request message for server streaming method ${t.path}`,metadata:null});return}i=a,e.startRead()},onReceiveHalfClose(){if(!i){e.sendStatus({code:Ct.Status.UNIMPLEMENTED,details:`Received no request message for server streaming method ${t.path}`,metadata:null});return}n=new pu.ServerWritableStreamImpl(t.path,e,r,i);try{t.func(n)}catch(a){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${a.message}`,metadata:null})}},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}function zH(e,t){let n;e.start({onReceiveMetadata(r){n=new pu.ServerDuplexStreamImpl(t.path,e,r);try{t.func(n)}catch(i){e.sendStatus({code:Ct.Status.UNKNOWN,details:`Server method handler threw error ${i.message}`,metadata:null})}},onReceiveMessage(r){n.push(r)},onReceiveHalfClose(){n.push(null)},onCancel(){n&&(n.cancelled=!0,n.emit("cancelled","cancelled"),n.destroy())}})}});var jk=N(kp=>{"use strict";Object.defineProperty(kp,"__esModule",{value:!0});kp.StatusBuilder=void 0;var dw=class{constructor(){this.code=null,this.details=null,this.metadata=null}withCode(t){return this.code=t,this}withDetails(t){return this.details=t,this}withMetadata(t){return this.metadata=t,this}build(){let t={};return this.code!==null&&(t.code=this.code),this.details!==null&&(t.details=this.details),this.metadata!==null&&(t.metadata=this.metadata),t}};kp.StatusBuilder=dw});var fw=N(Ea=>{"use strict";Object.defineProperty(Ea,"__esModule",{value:!0});Ea.isDuration=Ea.durationToMs=Ea.msToDuration=void 0;function GH(e){return{seconds:e/1e3|0,nanos:e%1e3*1e6|0}}Ea.msToDuration=GH;function WH(e){return e.seconds*1e3+e.nanos/1e6|0}Ea.durationToMs=WH;function HH(e){return typeof e.seconds=="number"&&typeof e.nanos=="number"}Ea.isDuration=HH});var Bp=N(jn=>{"use strict";Object.defineProperty(jn,"__esModule",{value:!0});jn.setup=jn.LeafLoadBalancer=jn.PickFirstLoadBalancer=jn.shuffled=jn.PickFirstLoadBalancingConfig=void 0;var hw=ts(),It=Vn(),hu=oa(),ZH=it(),XH=Pe(),eB=Ir(),tB=Ae("net"),YH="pick_first";function pw(e){ZH.trace(XH.LogVerbosity.DEBUG,YH,e)}var Nl="pick_first",$H=250,Ca=class{constructor(t){this.shuffleAddressList=t}getLoadBalancerName(){return Nl}toJsonObject(){return{[Nl]:{shuffleAddressList:this.shuffleAddressList}}}getShuffleAddressList(){return this.shuffleAddressList}static createFromJson(t){if("shuffleAddressList"in t&&typeof t.shuffleAddressList!="boolean")throw new Error("pick_first config field shuffleAddressList must be a boolean if provided");return new Ca(t.shuffleAddressList===!0)}};jn.PickFirstLoadBalancingConfig=Ca;var mw=class{constructor(t){this.subchannel=t}pick(t){return{pickResultType:hu.PickResultType.COMPLETE,subchannel:this.subchannel,status:null,onCallStarted:null,onCallEnded:null}}};function nB(e){let t=e.slice();for(let n=t.length-1;n>1;n--){let r=Math.floor(Math.random()*(n+1)),i=t[n];t[n]=t[r],t[r]=i}return t}jn.shuffled=nB;function KH(e){let t=[],n=[],r=[],i=(0,eB.isTcpSubchannelAddress)(e[0])&&(0,tB.isIPv6)(e[0].host);for(let o of e)(0,eB.isTcpSubchannelAddress)(o)&&(0,tB.isIPv6)(o.host)?n.push(o):r.push(o);let a=i?n:r,s=i?r:n;for(let o=0;o<Math.max(a.length,s.length);o++)o<a.length&&t.push(a[o]),o<s.length&&t.push(s[o]);return t}var rB="grpc-node.internal.pick-first.report_health_status",Rl=class{constructor(t,n){this.channelControlHelper=t,this.children=[],this.currentState=It.ConnectivityState.IDLE,this.currentSubchannelIndex=0,this.currentPick=null,this.subchannelStateListener=(r,i,a,s,o)=>{this.onSubchannelStateUpdate(r,i,a,o)},this.pickedSubchannelHealthListener=()=>this.calculateAndReportNewState(),this.triedAllSubchannels=!1,this.stickyTransientFailureMode=!1,this.requestedResolutionSinceLastUpdate=!1,this.lastError=null,this.latestAddressList=null,this.connectionDelayTimeout=setTimeout(()=>{},0),clearTimeout(this.connectionDelayTimeout),this.reportHealthStatus=n[rB]}allChildrenHaveReportedTF(){return this.children.every(t=>t.hasReportedTransientFailure)}calculateAndReportNewState(){this.currentPick?this.reportHealthStatus&&!this.currentPick.isHealthy()?this.updateState(It.ConnectivityState.TRANSIENT_FAILURE,new hu.UnavailablePicker({details:`Picked subchannel ${this.currentPick.getAddress()} is unhealthy`})):this.updateState(It.ConnectivityState.READY,new mw(this.currentPick)):this.children.length===0?this.updateState(It.ConnectivityState.IDLE,new hu.QueuePicker(this)):this.stickyTransientFailureMode?this.updateState(It.ConnectivityState.TRANSIENT_FAILURE,new hu.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(It.ConnectivityState.CONNECTING,new hu.QueuePicker(this))}requestReresolution(){this.requestedResolutionSinceLastUpdate=!0,this.channelControlHelper.requestReresolution()}maybeEnterStickyTransientFailureMode(){if(this.allChildrenHaveReportedTF()&&(this.requestedResolutionSinceLastUpdate||this.requestReresolution(),!this.stickyTransientFailureMode)){this.stickyTransientFailureMode=!0;for(let{subchannel:t}of this.children)t.startConnecting();this.calculateAndReportNewState()}}removeCurrentPick(){if(this.currentPick!==null){let t=this.currentPick;this.currentPick=null,t.unref(),t.removeConnectivityStateListener(this.subchannelStateListener),this.channelControlHelper.removeChannelzChild(t.getChannelzRef()),this.reportHealthStatus&&t.removeHealthStateWatcher(this.pickedSubchannelHealthListener)}}onSubchannelStateUpdate(t,n,r,i){var a;if(!((a=this.currentPick)===null||a===void 0)&&a.realSubchannelEquals(t)){r!==It.ConnectivityState.READY&&(this.removeCurrentPick(),this.calculateAndReportNewState(),this.requestReresolution());return}for(let[s,o]of this.children.entries())if(t.realSubchannelEquals(o.subchannel)){r===It.ConnectivityState.READY&&this.pickSubchannel(o.subchannel),r===It.ConnectivityState.TRANSIENT_FAILURE&&(o.hasReportedTransientFailure=!0,i&&(this.lastError=i),this.maybeEnterStickyTransientFailureMode(),s===this.currentSubchannelIndex&&this.startNextSubchannelConnecting(s+1)),o.subchannel.startConnecting();return}}startNextSubchannelConnecting(t){if(clearTimeout(this.connectionDelayTimeout),!this.triedAllSubchannels){for(let[n,r]of this.children.entries())if(n>=t){let i=r.subchannel.getConnectivityState();if(i===It.ConnectivityState.IDLE||i===It.ConnectivityState.CONNECTING){this.startConnecting(n);return}}this.triedAllSubchannels=!0,this.maybeEnterStickyTransientFailureMode()}}startConnecting(t){var n,r;clearTimeout(this.connectionDelayTimeout),this.currentSubchannelIndex=t,this.children[t].subchannel.getConnectivityState()===It.ConnectivityState.IDLE&&(pw("Start connecting to subchannel with address "+this.children[t].subchannel.getAddress()),process.nextTick(()=>{var i;(i=this.children[t])===null||i===void 0||i.subchannel.startConnecting()})),this.connectionDelayTimeout=setTimeout(()=>{this.startNextSubchannelConnecting(t+1)},$H),(r=(n=this.connectionDelayTimeout).unref)===null||r===void 0||r.call(n)}pickSubchannel(t){this.currentPick&&t.realSubchannelEquals(this.currentPick)||(pw("Pick subchannel with address "+t.getAddress()),this.stickyTransientFailureMode=!1,this.removeCurrentPick(),this.currentPick=t,t.ref(),this.reportHealthStatus&&t.addHealthStateWatcher(this.pickedSubchannelHealthListener),this.channelControlHelper.addChannelzChild(t.getChannelzRef()),this.resetSubchannelList(),clearTimeout(this.connectionDelayTimeout),this.calculateAndReportNewState())}updateState(t,n){pw(It.ConnectivityState[this.currentState]+" -> "+It.ConnectivityState[t]),this.currentState=t,this.channelControlHelper.updateState(t,n)}resetSubchannelList(){for(let t of this.children)this.currentPick&&t.subchannel.realSubchannelEquals(this.currentPick)||t.subchannel.removeConnectivityStateListener(this.subchannelStateListener),t.subchannel.unref(),this.channelControlHelper.removeChannelzChild(t.subchannel.getChannelzRef());this.currentSubchannelIndex=0,this.children=[],this.triedAllSubchannels=!1,this.requestedResolutionSinceLastUpdate=!1}connectToAddressList(t){let n=t.map(r=>({subchannel:this.channelControlHelper.createSubchannel(r,{}),hasReportedTransientFailure:!1}));for(let{subchannel:r}of n)r.ref(),this.channelControlHelper.addChannelzChild(r.getChannelzRef());this.resetSubchannelList(),this.children=n;for(let{subchannel:r}of this.children)if(r.addConnectivityStateListener(this.subchannelStateListener),r.getConnectivityState()===It.ConnectivityState.READY){this.pickSubchannel(r);return}for(let r of this.children)r.subchannel.getConnectivityState()===It.ConnectivityState.TRANSIENT_FAILURE&&(r.hasReportedTransientFailure=!0);this.startNextSubchannelConnecting(0),this.calculateAndReportNewState()}updateAddressList(t,n){if(!(n instanceof Ca))return;n.getShuffleAddressList()&&(t=nB(t));let r=[].concat(...t.map(a=>a.addresses));if(r.length===0)throw new Error("No addresses in endpoint list passed to pick_first");let i=KH(r);this.latestAddressList=i,this.connectToAddressList(i)}exitIdle(){this.currentState===It.ConnectivityState.IDLE&&this.latestAddressList&&this.connectToAddressList(this.latestAddressList)}resetBackoff(){}destroy(){this.resetSubchannelList(),this.removeCurrentPick()}getTypeName(){return Nl}};jn.PickFirstLoadBalancer=Rl;var jH=new Ca(!1),gw=class{constructor(t,n,r){this.endpoint=t,this.latestState=It.ConnectivityState.IDLE;let i=(0,hw.createChildChannelControlHelper)(n,{updateState:(a,s)=>{this.latestState=a,this.latestPicker=s,n.updateState(a,s)}});this.pickFirstBalancer=new Rl(i,Object.assign(Object.assign({},r),{[rB]:!0})),this.latestPicker=new hu.QueuePicker(this.pickFirstBalancer)}startConnecting(){this.pickFirstBalancer.updateAddressList([this.endpoint],jH)}updateEndpoint(t){this.endpoint=t,this.latestState!==It.ConnectivityState.IDLE&&this.startConnecting()}getConnectivityState(){return this.latestState}getPicker(){return this.latestPicker}getEndpoint(){return this.endpoint}exitIdle(){this.pickFirstBalancer.exitIdle()}destroy(){this.pickFirstBalancer.destroy()}};jn.LeafLoadBalancer=gw;function e5(){(0,hw.registerLoadBalancerType)(Nl,Rl,Ca),(0,hw.registerDefaultLoadBalancerType)(Nl)}jn.setup=e5});var Aw=N(de=>{"use strict";Object.defineProperty(de,"__esModule",{value:!0});de.BaseSubchannelWrapper=de.registerAdminService=de.FilterStackFactory=de.BaseFilter=de.PickResultType=de.QueuePicker=de.UnavailablePicker=de.ChildLoadBalancerHandler=de.EndpointMap=de.endpointHasAddress=de.endpointToString=de.subchannelAddressToString=de.LeafLoadBalancer=de.isLoadBalancerNameRegistered=de.parseLoadBalancingConfig=de.selectLbConfigFromList=de.registerLoadBalancerType=de.createChildChannelControlHelper=de.BackoffTimeout=de.durationToMs=de.uriToString=de.createResolver=de.registerResolver=de.log=de.trace=void 0;var iB=it();Object.defineProperty(de,"trace",{enumerable:!0,get:function(){return iB.trace}});Object.defineProperty(de,"log",{enumerable:!0,get:function(){return iB.log}});var aB=$r();Object.defineProperty(de,"registerResolver",{enumerable:!0,get:function(){return aB.registerResolver}});Object.defineProperty(de,"createResolver",{enumerable:!0,get:function(){return aB.createResolver}});var t5=Sn();Object.defineProperty(de,"uriToString",{enumerable:!0,get:function(){return t5.uriToString}});var n5=fw();Object.defineProperty(de,"durationToMs",{enumerable:!0,get:function(){return n5.durationToMs}});var r5=ju();Object.defineProperty(de,"BackoffTimeout",{enumerable:!0,get:function(){return r5.BackoffTimeout}});var kl=ts();Object.defineProperty(de,"createChildChannelControlHelper",{enumerable:!0,get:function(){return kl.createChildChannelControlHelper}});Object.defineProperty(de,"registerLoadBalancerType",{enumerable:!0,get:function(){return kl.registerLoadBalancerType}});Object.defineProperty(de,"selectLbConfigFromList",{enumerable:!0,get:function(){return kl.selectLbConfigFromList}});Object.defineProperty(de,"parseLoadBalancingConfig",{enumerable:!0,get:function(){return kl.parseLoadBalancingConfig}});Object.defineProperty(de,"isLoadBalancerNameRegistered",{enumerable:!0,get:function(){return kl.isLoadBalancerNameRegistered}});var i5=Bp();Object.defineProperty(de,"LeafLoadBalancer",{enumerable:!0,get:function(){return i5.LeafLoadBalancer}});var Op=Ir();Object.defineProperty(de,"subchannelAddressToString",{enumerable:!0,get:function(){return Op.subchannelAddressToString}});Object.defineProperty(de,"endpointToString",{enumerable:!0,get:function(){return Op.endpointToString}});Object.defineProperty(de,"endpointHasAddress",{enumerable:!0,get:function(){return Op.endpointHasAddress}});Object.defineProperty(de,"EndpointMap",{enumerable:!0,get:function(){return Op.EndpointMap}});var a5=Af();Object.defineProperty(de,"ChildLoadBalancerHandler",{enumerable:!0,get:function(){return a5.ChildLoadBalancerHandler}});var _w=oa();Object.defineProperty(de,"UnavailablePicker",{enumerable:!0,get:function(){return _w.UnavailablePicker}});Object.defineProperty(de,"QueuePicker",{enumerable:!0,get:function(){return _w.QueuePicker}});Object.defineProperty(de,"PickResultType",{enumerable:!0,get:function(){return _w.PickResultType}});var s5=Nv();Object.defineProperty(de,"BaseFilter",{enumerable:!0,get:function(){return s5.BaseFilter}});var o5=Sv();Object.defineProperty(de,"FilterStackFactory",{enumerable:!0,get:function(){return o5.FilterStackFactory}});var c5=wf();Object.defineProperty(de,"registerAdminService",{enumerable:!0,get:function(){return c5.registerAdminService}});var u5=wp();Object.defineProperty(de,"BaseSubchannelWrapper",{enumerable:!0,get:function(){return u5.BaseSubchannelWrapper}})});var sB=N(Pp=>{"use strict";Object.defineProperty(Pp,"__esModule",{value:!0});Pp.setup=void 0;var l5=$r(),yw=class{constructor(t,n,r){this.listener=n,this.hasReturnedResult=!1,this.endpoints=[];let i;t.authority===""?i="/"+t.path:i=t.path,this.endpoints=[{addresses:[{path:i}]}]}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(this.listener.onSuccessfulResolution,this.endpoints,null,null,null,{}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(t){return"localhost"}};function d5(){(0,l5.registerResolver)("unix",yw)}Pp.setup=d5});var dB=N(Fp=>{"use strict";Object.defineProperty(Fp,"__esModule",{value:!0});Fp.setup=void 0;var oB=Ae("net"),Dp=Pe(),vw=jt(),cB=$r(),uB=Sn(),f5=it(),p5="ip_resolver";function lB(e){f5.trace(Dp.LogVerbosity.DEBUG,p5,e)}var ww="ipv4",bw="ipv6",h5=443,Mp=class{constructor(t,n,r){var i;this.listener=n,this.endpoints=[],this.error=null,this.hasReturnedResult=!1,lB("Resolver constructed for target "+(0,uB.uriToString)(t));let a=[];if(!(t.scheme===ww||t.scheme===bw)){this.error={code:Dp.Status.UNAVAILABLE,details:`Unrecognized scheme ${t.scheme} in IP resolver`,metadata:new vw.Metadata};return}let s=t.path.split(",");for(let o of s){let c=(0,uB.splitHostPort)(o);if(c===null){this.error={code:Dp.Status.UNAVAILABLE,details:`Failed to parse ${t.scheme} address ${o}`,metadata:new vw.Metadata};return}if(t.scheme===ww&&!(0,oB.isIPv4)(c.host)||t.scheme===bw&&!(0,oB.isIPv6)(c.host)){this.error={code:Dp.Status.UNAVAILABLE,details:`Failed to parse ${t.scheme} address ${o}`,metadata:new vw.Metadata};return}a.push({host:c.host,port:(i=c.port)!==null&&i!==void 0?i:h5})}this.endpoints=a.map(o=>({addresses:[o]})),lB("Parsed "+t.scheme+" address list "+a)}updateResolution(){this.hasReturnedResult||(this.hasReturnedResult=!0,process.nextTick(()=>{this.error?this.listener.onError(this.error):this.listener.onSuccessfulResolution(this.endpoints,null,null,null,{})}))}destroy(){this.hasReturnedResult=!1}static getDefaultAuthority(t){return t.path.split(",")[0]}};function m5(){(0,cB.registerResolver)(ww,Mp),(0,cB.registerResolver)(bw,Mp)}Fp.setup=m5});var mB=N(mu=>{"use strict";Object.defineProperty(mu,"__esModule",{value:!0});mu.setup=mu.RoundRobinLoadBalancer=void 0;var hB=ts(),Rn=Vn(),Ew=oa(),g5=it(),_5=Pe(),fB=Ir(),A5=Bp(),y5="round_robin";function pB(e){g5.trace(_5.LogVerbosity.DEBUG,y5,e)}var Lp="round_robin",Bl=class{getLoadBalancerName(){return Lp}constructor(){}toJsonObject(){return{[Lp]:{}}}static createFromJson(t){return new Bl}},Cw=class{constructor(t,n=0){this.children=t,this.nextIndex=n}pick(t){let n=this.children[this.nextIndex].picker;return this.nextIndex=(this.nextIndex+1)%this.children.length,n.pick(t)}peekNextEndpoint(){return this.children[this.nextIndex].endpoint}},Qp=class{constructor(t,n){this.channelControlHelper=t,this.options=n,this.children=[],this.currentState=Rn.ConnectivityState.IDLE,this.currentReadyPicker=null,this.updatesPaused=!1,this.lastError=null,this.childChannelControlHelper=(0,hB.createChildChannelControlHelper)(t,{updateState:(r,i)=>{this.calculateAndUpdateState()}})}countChildrenWithState(t){return this.children.filter(n=>n.getConnectivityState()===t).length}calculateAndUpdateState(){if(!this.updatesPaused){if(this.countChildrenWithState(Rn.ConnectivityState.READY)>0){let t=this.children.filter(r=>r.getConnectivityState()===Rn.ConnectivityState.READY),n=0;if(this.currentReadyPicker!==null){let r=this.currentReadyPicker.peekNextEndpoint();n=t.findIndex(i=>(0,fB.endpointEqual)(i.getEndpoint(),r)),n<0&&(n=0)}this.updateState(Rn.ConnectivityState.READY,new Cw(t.map(r=>({endpoint:r.getEndpoint(),picker:r.getPicker()})),n))}else this.countChildrenWithState(Rn.ConnectivityState.CONNECTING)>0?this.updateState(Rn.ConnectivityState.CONNECTING,new Ew.QueuePicker(this)):this.countChildrenWithState(Rn.ConnectivityState.TRANSIENT_FAILURE)>0?this.updateState(Rn.ConnectivityState.TRANSIENT_FAILURE,new Ew.UnavailablePicker({details:`No connection established. Last error: ${this.lastError}`})):this.updateState(Rn.ConnectivityState.IDLE,new Ew.QueuePicker(this));for(let t of this.children)t.getConnectivityState()===Rn.ConnectivityState.IDLE&&t.exitIdle()}}updateState(t,n){pB(Rn.ConnectivityState[this.currentState]+" -> "+Rn.ConnectivityState[t]),t===Rn.ConnectivityState.READY?this.currentReadyPicker=n:this.currentReadyPicker=null,this.currentState=t,this.channelControlHelper.updateState(t,n)}resetSubchannelList(){for(let t of this.children)t.destroy()}updateAddressList(t,n){this.resetSubchannelList(),pB("Connect to endpoint list "+t.map(fB.endpointToString)),this.updatesPaused=!0,this.children=t.map(r=>new A5.LeafLoadBalancer(r,this.childChannelControlHelper,this.options));for(let r of this.children)r.startConnecting();this.updatesPaused=!1,this.calculateAndUpdateState()}exitIdle(){}resetBackoff(){}destroy(){this.resetSubchannelList()}getTypeName(){return Lp}};mu.RoundRobinLoadBalancer=Qp;function v5(){(0,hB.registerLoadBalancerType)(Lp,Qp,Bl)}mu.setup=v5});var AB=N(Ia=>{"use strict";var Iw;Object.defineProperty(Ia,"__esModule",{value:!0});Ia.setup=Ia.OutlierDetectionLoadBalancer=Ia.OutlierDetectionLoadBalancingConfig=void 0;var w5=Vn(),gB=Pe(),ps=fw(),_B=Aw(),b5=ts(),E5=Af(),C5=oa(),Sw=Ir(),I5=wp(),S5=it(),x5="outlier_detection";function Jt(e){S5.trace(gB.LogVerbosity.DEBUG,x5,e)}var Bw="outlier_detection",T5=((Iw=process.env.GRPC_EXPERIMENTAL_ENABLE_OUTLIER_DETECTION)!==null&&Iw!==void 0?Iw:"true")==="true",N5={stdev_factor:1900,enforcement_percentage:100,minimum_hosts:5,request_volume:100},R5={threshold:85,enforcement_percentage:100,minimum_hosts:5,request_volume:50};function gu(e,t,n,r){if(t in e&&e[t]!==void 0&&typeof e[t]!==n){let i=r?`${r}.${t}`:t;throw new Error(`outlier detection config ${i} parse error: expected ${n}, got ${typeof e[t]}`)}}function xw(e,t,n){let r=n?`${n}.${t}`:t;if(t in e&&e[t]!==void 0){if(!(0,ps.isDuration)(e[t]))throw new Error(`outlier detection config ${r} parse error: expected Duration, got ${typeof e[t]}`);if(!(e[t].seconds>=0&&e[t].seconds<=315576e6&&e[t].nanos>=0&&e[t].nanos<=999999999))throw new Error(`outlier detection config ${r} parse error: values out of range for non-negative Duaration`)}}function Up(e,t,n){let r=n?`${n}.${t}`:t;if(gu(e,t,"number",n),t in e&&e[t]!==void 0&&!(e[t]>=0&&e[t]<=100))throw new Error(`outlier detection config ${r} parse error: value out of range for percentage (0-100)`)}var hs=class{constructor(t,n,r,i,a,s,o){if(this.childPolicy=o,o.getLoadBalancerName()==="pick_first")throw new Error("outlier_detection LB policy cannot have a pick_first child policy");this.intervalMs=t??1e4,this.baseEjectionTimeMs=n??3e4,this.maxEjectionTimeMs=r??3e5,this.maxEjectionPercent=i??10,this.successRateEjection=a?Object.assign(Object.assign({},N5),a):null,this.failurePercentageEjection=s?Object.assign(Object.assign({},R5),s):null}getLoadBalancerName(){return Bw}toJsonObject(){var t,n;return{outlier_detection:{interval:(0,ps.msToDuration)(this.intervalMs),base_ejection_time:(0,ps.msToDuration)(this.baseEjectionTimeMs),max_ejection_time:(0,ps.msToDuration)(this.maxEjectionTimeMs),max_ejection_percent:this.maxEjectionPercent,success_rate_ejection:(t=this.successRateEjection)!==null&&t!==void 0?t:void 0,failure_percentage_ejection:(n=this.failurePercentageEjection)!==null&&n!==void 0?n:void 0,child_policy:[this.childPolicy.toJsonObject()]}}}getIntervalMs(){return this.intervalMs}getBaseEjectionTimeMs(){return this.baseEjectionTimeMs}getMaxEjectionTimeMs(){return this.maxEjectionTimeMs}getMaxEjectionPercent(){return this.maxEjectionPercent}getSuccessRateEjectionConfig(){return this.successRateEjection}getFailurePercentageEjectionConfig(){return this.failurePercentageEjection}getChildPolicy(){return this.childPolicy}static createFromJson(t){var n;if(xw(t,"interval"),xw(t,"base_ejection_time"),xw(t,"max_ejection_time"),Up(t,"max_ejection_percent"),"success_rate_ejection"in t&&t.success_rate_ejection!==void 0){if(typeof t.success_rate_ejection!="object")throw new Error("outlier detection config success_rate_ejection must be an object");gu(t.success_rate_ejection,"stdev_factor","number","success_rate_ejection"),Up(t.success_rate_ejection,"enforcement_percentage","success_rate_ejection"),gu(t.success_rate_ejection,"minimum_hosts","number","success_rate_ejection"),gu(t.success_rate_ejection,"request_volume","number","success_rate_ejection")}if("failure_percentage_ejection"in t&&t.failure_percentage_ejection!==void 0){if(typeof t.failure_percentage_ejection!="object")throw new Error("outlier detection config failure_percentage_ejection must be an object");Up(t.failure_percentage_ejection,"threshold","failure_percentage_ejection"),Up(t.failure_percentage_ejection,"enforcement_percentage","failure_percentage_ejection"),gu(t.failure_percentage_ejection,"minimum_hosts","number","failure_percentage_ejection"),gu(t.failure_percentage_ejection,"request_volume","number","failure_percentage_ejection")}if(!("child_policy"in t)||!Array.isArray(t.child_policy))throw new Error("outlier detection config child_policy must be an array");let r=(0,b5.selectLbConfigFromList)(t.child_policy);if(!r)throw new Error("outlier detection config child_policy: no valid recognized policy found");return new hs(t.interval?(0,ps.durationToMs)(t.interval):null,t.base_ejection_time?(0,ps.durationToMs)(t.base_ejection_time):null,t.max_ejection_time?(0,ps.durationToMs)(t.max_ejection_time):null,(n=t.max_ejection_percent)!==null&&n!==void 0?n:null,t.success_rate_ejection,t.failure_percentage_ejection,r)}};Ia.OutlierDetectionLoadBalancingConfig=hs;var Nw=class extends I5.BaseSubchannelWrapper{constructor(t,n){super(t),this.mapEntry=n,this.refCount=0}ref(){this.child.ref(),this.refCount+=1}unref(){if(this.child.unref(),this.refCount-=1,this.refCount<=0&&this.mapEntry){let t=this.mapEntry.subchannelWrappers.indexOf(this);t>=0&&this.mapEntry.subchannelWrappers.splice(t,1)}}eject(){this.setHealthy(!1)}uneject(){this.setHealthy(!0)}getMapEntry(){return this.mapEntry}getWrappedSubchannel(){return this.child}};function Tw(){return{success:0,failure:0}}var Rw=class{constructor(){this.activeBucket=Tw(),this.inactiveBucket=Tw()}addSuccess(){this.activeBucket.success+=1}addFailure(){this.activeBucket.failure+=1}switchBuckets(){this.inactiveBucket=this.activeBucket,this.activeBucket=Tw()}getLastSuccesses(){return this.inactiveBucket.success}getLastFailures(){return this.inactiveBucket.failure}},kw=class{constructor(t,n){this.wrappedPicker=t,this.countCalls=n}pick(t){let n=this.wrappedPicker.pick(t);if(n.pickResultType===C5.PickResultType.COMPLETE){let r=n.subchannel,i=r.getMapEntry();if(i){let a=n.onCallEnded;return this.countCalls&&(a=s=>{var o;s===gB.Status.OK?i.counter.addSuccess():i.counter.addFailure(),(o=n.onCallEnded)===null||o===void 0||o.call(n,s)}),Object.assign(Object.assign({},n),{subchannel:r.getWrappedSubchannel(),onCallEnded:a})}else return Object.assign(Object.assign({},n),{subchannel:r.getWrappedSubchannel()})}else return n}},qp=class{constructor(t,n){this.entryMap=new Sw.EndpointMap,this.latestConfig=null,this.timerStartTime=null,this.childBalancer=new E5.ChildLoadBalancerHandler((0,_B.createChildChannelControlHelper)(t,{createSubchannel:(r,i)=>{let a=t.createSubchannel(r,i),s=this.entryMap.getForSubchannelAddress(r),o=new Nw(a,s);return s?.currentEjectionTimestamp!==null&&o.eject(),s?.subchannelWrappers.push(o),o},updateState:(r,i)=>{r===w5.ConnectivityState.READY?t.updateState(r,new kw(i,this.isCountingEnabled())):t.updateState(r,i)}}),n),this.ejectionTimer=setInterval(()=>{},0),clearInterval(this.ejectionTimer)}isCountingEnabled(){return this.latestConfig!==null&&(this.latestConfig.getSuccessRateEjectionConfig()!==null||this.latestConfig.getFailurePercentageEjectionConfig()!==null)}getCurrentEjectionPercent(){let t=0;for(let n of this.entryMap.values())n.currentEjectionTimestamp!==null&&(t+=1);return t*100/this.entryMap.size}runSuccessRateCheck(t){if(!this.latestConfig)return;let n=this.latestConfig.getSuccessRateEjectionConfig();if(!n)return;Jt("Running success rate check");let r=n.request_volume,i=0,a=[];for(let[p,h]of this.entryMap.entries()){let _=h.counter.getLastSuccesses(),w=h.counter.getLastFailures();Jt("Stats for "+(0,Sw.endpointToString)(p)+": successes="+_+" failures="+w+" targetRequestVolume="+r),_+w>=r&&(i+=1,a.push(_/(_+w)))}if(Jt("Found "+i+" success rate candidates; currentEjectionPercent="+this.getCurrentEjectionPercent()+" successRates=["+a+"]"),i<n.minimum_hosts)return;let s=a.reduce((p,h)=>p+h)/a.length,o=0;for(let p of a){let h=p-s;o+=h*h}let c=o/a.length,u=Math.sqrt(c),d=s-u*(n.stdev_factor/1e3);Jt("stdev="+u+" ejectionThreshold="+d);for(let[p,h]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let _=h.counter.getLastSuccesses(),w=h.counter.getLastFailures();if(_+w<r)continue;let A=_/(_+w);if(Jt("Checking candidate "+p+" successRate="+A),A<d){let S=Math.random()*100;Jt("Candidate "+p+" randomNumber="+S+" enforcement_percentage="+n.enforcement_percentage),S<n.enforcement_percentage&&(Jt("Ejecting candidate "+p),this.eject(h,t))}}}runFailurePercentageCheck(t){if(!this.latestConfig)return;let n=this.latestConfig.getFailurePercentageEjectionConfig();if(!n)return;Jt("Running failure percentage check. threshold="+n.threshold+" request volume threshold="+n.request_volume);let r=0;for(let i of this.entryMap.values()){let a=i.counter.getLastSuccesses(),s=i.counter.getLastFailures();a+s>=n.request_volume&&(r+=1)}if(!(r<n.minimum_hosts))for(let[i,a]of this.entryMap.entries()){if(this.getCurrentEjectionPercent()>=this.latestConfig.getMaxEjectionPercent())break;let s=a.counter.getLastSuccesses(),o=a.counter.getLastFailures();if(Jt("Candidate successes="+s+" failures="+o),s+o<n.request_volume)continue;if(o*100/(o+s)>n.threshold){let u=Math.random()*100;Jt("Candidate "+i+" randomNumber="+u+" enforcement_percentage="+n.enforcement_percentage),u<n.enforcement_percentage&&(Jt("Ejecting candidate "+i),this.eject(a,t))}}}eject(t,n){t.currentEjectionTimestamp=new Date,t.ejectionTimeMultiplier+=1;for(let r of t.subchannelWrappers)r.eject()}uneject(t){t.currentEjectionTimestamp=null;for(let n of t.subchannelWrappers)n.uneject()}switchAllBuckets(){for(let t of this.entryMap.values())t.counter.switchBuckets()}startTimer(t){var n,r;this.ejectionTimer=setTimeout(()=>this.runChecks(),t),(r=(n=this.ejectionTimer).unref)===null||r===void 0||r.call(n)}runChecks(){let t=new Date;if(Jt("Ejection timer running"),this.switchAllBuckets(),!!this.latestConfig){this.timerStartTime=t,this.startTimer(this.latestConfig.getIntervalMs()),this.runSuccessRateCheck(t),this.runFailurePercentageCheck(t);for(let[n,r]of this.entryMap.entries())if(r.currentEjectionTimestamp===null)r.ejectionTimeMultiplier>0&&(r.ejectionTimeMultiplier-=1);else{let i=this.latestConfig.getBaseEjectionTimeMs(),a=this.latestConfig.getMaxEjectionTimeMs(),s=new Date(r.currentEjectionTimestamp.getTime());s.setMilliseconds(s.getMilliseconds()+Math.min(i*r.ejectionTimeMultiplier,Math.max(i,a))),s<new Date&&(Jt("Unejecting "+n),this.uneject(r))}}}updateAddressList(t,n,r){if(!(n instanceof hs))return;for(let a of t)this.entryMap.has(a)||(Jt("Adding map entry for "+(0,Sw.endpointToString)(a)),this.entryMap.set(a,{counter:new Rw,currentEjectionTimestamp:null,ejectionTimeMultiplier:0,subchannelWrappers:[]}));this.entryMap.deleteMissing(t);let i=n.getChildPolicy();if(this.childBalancer.updateAddressList(t,i,r),n.getSuccessRateEjectionConfig()||n.getFailurePercentageEjectionConfig())if(this.timerStartTime){Jt("Previous timer existed. Replacing timer"),clearTimeout(this.ejectionTimer);let a=n.getIntervalMs()-(new Date().getTime()-this.timerStartTime.getTime());this.startTimer(a)}else Jt("Starting new timer"),this.timerStartTime=new Date,this.startTimer(n.getIntervalMs()),this.switchAllBuckets();else{Jt("Counting disabled. Cancelling timer."),this.timerStartTime=null,clearTimeout(this.ejectionTimer);for(let a of this.entryMap.values())this.uneject(a),a.ejectionTimeMultiplier=0}this.latestConfig=n}exitIdle(){this.childBalancer.exitIdle()}resetBackoff(){this.childBalancer.resetBackoff()}destroy(){clearTimeout(this.ejectionTimer),this.childBalancer.destroy()}getTypeName(){return Bw}};Ia.OutlierDetectionLoadBalancer=qp;function k5(){T5&&(0,_B.registerLoadBalancerType)(Bw,qp,hs)}Ia.setup=k5});var Sa=N(X=>{"use strict";Object.defineProperty(X,"__esModule",{value:!0});X.experimental=X.ServerInterceptingCall=X.ResponderBuilder=X.ServerListenerBuilder=X.addAdminServicesToServer=X.getChannelzHandlers=X.getChannelzServiceDefinition=X.InterceptorConfigurationError=X.InterceptingCall=X.RequesterBuilder=X.ListenerBuilder=X.StatusBuilder=X.getClientChannel=X.ServerCredentials=X.Server=X.setLogVerbosity=X.setLogger=X.load=X.loadObject=X.CallCredentials=X.ChannelCredentials=X.waitForClientReady=X.closeClient=X.Channel=X.makeGenericClientConstructor=X.makeClientConstructor=X.loadPackageDefinition=X.Client=X.compressionAlgorithms=X.propagate=X.connectivityState=X.status=X.logVerbosity=X.Metadata=X.credentials=void 0;var Jp=FA();Object.defineProperty(X,"CallCredentials",{enumerable:!0,get:function(){return Jp.CallCredentials}});var B5=hy();Object.defineProperty(X,"Channel",{enumerable:!0,get:function(){return B5.ChannelImplementation}});var O5=xv();Object.defineProperty(X,"compressionAlgorithms",{enumerable:!0,get:function(){return O5.CompressionAlgorithms}});var P5=Vn();Object.defineProperty(X,"connectivityState",{enumerable:!0,get:function(){return P5.ConnectivityState}});var Vp=df();Object.defineProperty(X,"ChannelCredentials",{enumerable:!0,get:function(){return Vp.ChannelCredentials}});var yB=py();Object.defineProperty(X,"Client",{enumerable:!0,get:function(){return yB.Client}});var Ow=Pe();Object.defineProperty(X,"logVerbosity",{enumerable:!0,get:function(){return Ow.LogVerbosity}});Object.defineProperty(X,"status",{enumerable:!0,get:function(){return Ow.Status}});Object.defineProperty(X,"propagate",{enumerable:!0,get:function(){return Ow.Propagate}});var vB=it(),Pw=gy();Object.defineProperty(X,"loadPackageDefinition",{enumerable:!0,get:function(){return Pw.loadPackageDefinition}});Object.defineProperty(X,"makeClientConstructor",{enumerable:!0,get:function(){return Pw.makeClientConstructor}});Object.defineProperty(X,"makeGenericClientConstructor",{enumerable:!0,get:function(){return Pw.makeClientConstructor}});var D5=jt();Object.defineProperty(X,"Metadata",{enumerable:!0,get:function(){return D5.Metadata}});var M5=Kk();Object.defineProperty(X,"Server",{enumerable:!0,get:function(){return M5.Server}});var F5=tw();Object.defineProperty(X,"ServerCredentials",{enumerable:!0,get:function(){return F5.ServerCredentials}});var L5=jk();Object.defineProperty(X,"StatusBuilder",{enumerable:!0,get:function(){return L5.StatusBuilder}});X.credentials={combineChannelCredentials:(e,...t)=>t.reduce((n,r)=>n.compose(r),e),combineCallCredentials:(e,...t)=>t.reduce((n,r)=>n.compose(r),e),createInsecure:Vp.ChannelCredentials.createInsecure,createSsl:Vp.ChannelCredentials.createSsl,createFromSecureContext:Vp.ChannelCredentials.createFromSecureContext,createFromMetadataGenerator:Jp.CallCredentials.createFromMetadataGenerator,createFromGoogleCredential:Jp.CallCredentials.createFromGoogleCredential,createEmpty:Jp.CallCredentials.createEmpty};var Q5=e=>e.close();X.closeClient=Q5;var U5=(e,t,n)=>e.waitForReady(t,n);X.waitForClientReady=U5;var q5=(e,t)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};X.loadObject=q5;var J5=(e,t,n)=>{throw new Error("Not available in this library. Use @grpc/proto-loader and loadPackageDefinition instead")};X.load=J5;var V5=e=>{vB.setLogger(e)};X.setLogger=V5;var z5=e=>{vB.setLoggerVerbosity(e)};X.setLogVerbosity=z5;var G5=e=>yB.Client.prototype.getChannel.call(e);X.getClientChannel=G5;var zp=ly();Object.defineProperty(X,"ListenerBuilder",{enumerable:!0,get:function(){return zp.ListenerBuilder}});Object.defineProperty(X,"RequesterBuilder",{enumerable:!0,get:function(){return zp.RequesterBuilder}});Object.defineProperty(X,"InterceptingCall",{enumerable:!0,get:function(){return zp.InterceptingCall}});Object.defineProperty(X,"InterceptorConfigurationError",{enumerable:!0,get:function(){return zp.InterceptorConfigurationError}});var wB=cs();Object.defineProperty(X,"getChannelzServiceDefinition",{enumerable:!0,get:function(){return wB.getChannelzServiceDefinition}});Object.defineProperty(X,"getChannelzHandlers",{enumerable:!0,get:function(){return wB.getChannelzHandlers}});var W5=wf();Object.defineProperty(X,"addAdminServicesToServer",{enumerable:!0,get:function(){return W5.addAdminServicesToServer}});var Dw=cw();Object.defineProperty(X,"ServerListenerBuilder",{enumerable:!0,get:function(){return Dw.ServerListenerBuilder}});Object.defineProperty(X,"ResponderBuilder",{enumerable:!0,get:function(){return Dw.ResponderBuilder}});Object.defineProperty(X,"ServerInterceptingCall",{enumerable:!0,get:function(){return Dw.ServerInterceptingCall}});var H5=Aw();X.experimental=H5;var Z5=gv(),X5=sB(),Y5=dB(),$5=Bp(),K5=mB(),j5=AB(),e7=cs();Z5.setup(),X5.setup(),Y5.setup(),$5.setup(),K5.setup(),j5.setup(),e7.setup()});var bB=N(_u=>{"use strict";Object.defineProperty(_u,"__esModule",{value:!0});_u.isGrpcJsServiceDefinition=_u.fromGrpcJsServiceDefinition=void 0;function t7(e){let t={};for(let[n,r]of Object.entries(e))t[n]={path:r.path,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:i=>r.requestDeserialize(Buffer.from(i)),requestSerialize:r.requestSerialize,responseDeserialize:i=>r.responseDeserialize(Buffer.from(i)),responseSerialize:r.responseSerialize,options:{}};return t}_u.fromGrpcJsServiceDefinition=t7;function n7(e){return Object.values(e).every(t=>typeof t=="object"&&t!=null&&typeof t.path=="string")}_u.isGrpcJsServiceDefinition=n7});var EB=N(Au=>{"use strict";Object.defineProperty(Au,"__esModule",{value:!0});Au.isTsProtoServiceDefinition=Au.fromTsProtoServiceDefinition=void 0;function r7(e){let t={};for(let[n,r]of Object.entries(e.methods)){let i=r.requestType.encode,a=r.requestType.fromPartial,s=r.responseType.encode,o=r.responseType.fromPartial;t[n]={path:`/${e.fullName}/${r.name}`,requestStream:r.requestStream,responseStream:r.responseStream,requestDeserialize:r.requestType.decode,requestSerialize:a!=null?c=>i(a(c)).finish():c=>i(c).finish(),responseDeserialize:r.responseType.decode,responseSerialize:o!=null?c=>s(o(c)).finish():c=>s(c).finish(),options:r.options}}return t}Au.fromTsProtoServiceDefinition=r7;function i7(e){return"name"in e&&"fullName"in e&&"methods"in e}Au.isTsProtoServiceDefinition=i7});var ms=N(xa=>{"use strict";Object.defineProperty(xa,"__esModule",{value:!0});xa.toGrpcJsMethodDefinition=xa.toGrpcJsServiceDefinition=xa.normalizeServiceDefinition=void 0;var CB=bB(),IB=EB();function a7(e){return(0,CB.isGrpcJsServiceDefinition)(e)?(0,CB.fromGrpcJsServiceDefinition)(e):(0,IB.isTsProtoServiceDefinition)(e)?(0,IB.fromTsProtoServiceDefinition)(e):e}xa.normalizeServiceDefinition=a7;function s7(e){let t={};for(let[n,r]of Object.entries(e))t[n]=SB(r);return t}xa.toGrpcJsServiceDefinition=s7;function SB(e){return{path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,requestDeserialize:e.requestDeserialize,requestSerialize:t=>Buffer.from(e.requestSerialize(t)),responseDeserialize:e.responseDeserialize,responseSerialize:t=>Buffer.from(e.responseSerialize(t))}}xa.toGrpcJsMethodDefinition=SB});function kn(e){return typeof e=="object"&&e!==null&&e.name==="AbortError"}function o7(e){if(e.aborted)throw new tn}function Mw(e){if(kn(e))throw e}function gs(e){if(!kn(e))throw e}var tn,Oi=ct(()=>{tn=class extends Error{constructor(){super("The operation has been aborted"),this.message="The operation has been aborted",this.name="AbortError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(this,this.constructor)}}});function kr(e,t){return new Promise((n,r)=>{if(e.aborted){r(new tn);return}let i,a=!1;function s(){a||(a=!0,i?.())}let o=t(c=>{n(c),s()},c=>{r(c),s()});if(!a){let c=()=>{let u=o();u==null?r(new tn):u.then(()=>{r(new tn)},d=>{r(d)}),s()};e.addEventListener("abort",c),i=()=>{e.removeEventListener("abort",c)}}})}var _s=ct(()=>{Oi()});function c7(e,t){if(e.aborted){let n=()=>{};t.then(n,n)}return kr(e,(n,r)=>(t.then(n,r),()=>{}))}var xB=ct(()=>{_s()});function Ol(e,t){return kr(e,n=>{let r=typeof t=="number"?t:t.getTime()-Date.now(),i=setTimeout(n,r);return()=>{clearTimeout(i)}})}var Gp=ct(()=>{_s()});function u7(e){return kr(e,()=>()=>{})}var TB=ct(()=>{_s()});function l7(e,t,n,r){return kr(e,i=>{let a,s=!1;return a=d7(t,n,(...c)=>{i(c.length>1?c:c[0]),s=!0,a?.()},r),s&&a(),()=>{s=!0,a?.()}})}function d7(e,t,n,r){if(h7(e))return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n,r);if(p7(e))return e.on(t,n),()=>e.off(t,n);if(f7(e))return e.addListener(t,n),()=>e.removeListener(t,n);throw new Error("Invalid event target")}function f7(e){return yu(e.addListener)&&yu(e.removeListener)}function p7(e){return yu(e.on)&&yu(e.off)}function h7(e){return yu(e.addEventListener)&&yu(e.removeEventListener)}var yu,NB=ct(()=>{_s();yu=e=>typeof e=="function"});function m7(e,t){return new Promise((n,r)=>{if(e.aborted){r(new tn);return}let i=new AbortController,a=t(i.signal);if(a.length===0){n([]);return}let s=()=>{i.abort()};e.addEventListener("abort",s);let o,c=new Array(a.length),u=0;function d(){u+=1,u===a.length&&(e.removeEventListener("abort",s),o!=null?r(o.reason):n(c))}for(let[p,h]of a.entries())h.then(_=>{c[p]=_,d()},_=>{i.abort(),(o==null||!kn(_)&&kn(o.reason))&&(o={reason:_}),d()})})}var RB=ct(()=>{Oi()});function g7(e,t){return new Promise((n,r)=>{if(e.aborted){r(new tn);return}let i=new AbortController,a=t(i.signal),s=()=>{i.abort()};e.addEventListener("abort",s);let o=0;function c(d){i.abort(),o+=1,o===a.length&&(e.removeEventListener("abort",s),d.status==="fulfilled"?n(d.value):r(d.reason))}let u;for(let d of a)d.then(p=>{u==null&&(u={status:"fulfilled",value:p}),c(u)},p=>{(u==null||!kn(p)&&(u.status==="fulfilled"||kn(u.reason)))&&(u={status:"rejected",reason:p}),c(u)})})}var kB=ct(()=>{Oi()});async function _7(e,t,n={}){let{baseMs:r=1e3,maxDelayMs:i=3e4,onError:a,maxAttempts:s=1/0}=n,o=0,c=()=>{o=-1};for(;;)try{return await t(e,o,c)}catch(u){if(Mw(u),o>=s)throw u;let d;if(o===-1)d=0;else{let p=Math.min(i,Math.pow(2,o)*r);d=Math.round(p*(1+Math.random())/2)}a&&a(u,o,d),d!==0&&await Ol(e,d),o+=1}}var BB=ct(()=>{Gp();Oi()});function A7(e,t){if(e.aborted)return Promise.reject(new tn);let n=[],r=new AbortController,i=r.signal,a=()=>{r.abort()};e.addEventListener("abort",a);let s=()=>{e.removeEventListener("abort",a)},o=new Set,c=()=>{for(let p of o)p.abort()};i.addEventListener("abort",c);let u=()=>{i.removeEventListener("abort",c)},d=new Promise((p,h)=>{let _,w;A(S=>t(S,{defer(b){n.push(b)},fork:A})).join().then(S=>{r.abort(),_={value:S}},S=>{r.abort(),(!kn(S)||w==null)&&(w={error:S})});function A(S){if(i.aborted)return{abort(){},async join(){throw new tn}};let b=new AbortController,T=b.signal,B=S(T),O={abort(){b.abort()},join:()=>B};return o.add(O),B.catch(gs).catch(z=>{w={error:z},r.abort()}).finally(()=>{o.delete(O),o.size===0&&(w!=null?h(w.error):p(_.value))}),O}});return d=d.finally(()=>{s(),u();let p=Promise.resolve();for(let h=n.length-1;h>=0;h--)p=p.finally(n[h]);return p}),d}var OB=ct(()=>{Oi()});function y7(e){let t=new AbortController,n=e(t.signal).catch(gs);return()=>(t.abort(),n)}var PB=ct(()=>{Oi()});function v7(e,t,n={}){let{baseMs:r=1e3,onError:i,maxAttempts:a=1/0}=n;return kr(e,(s,o)=>{let c=new AbortController,u=!1,d=new Map;function p(w){c.abort(),d.clear(),s(w)}function h(w,A){if(d.delete(A),u&&d.size===0){o(w);return}if(!kn(w)&&i)try{i(w,A)}catch(S){c.abort(),d.clear(),o(S)}}async function _(w){for(let A=0;;A++){let S=t(w,A);if(d.set(A,S),S.then(p,B=>h(B,A)),A+1>=a)break;let b=Math.pow(2,A)*r,T=Math.round(b*(1+Math.random())/2);await Ol(w,T)}u=!0}return _(c.signal).catch(gs),()=>{c.abort()}})}var DB=ct(()=>{Oi();Gp();_s()});var Ta={};Vl(Ta,{AbortError:()=>tn,abortable:()=>c7,all:()=>m7,catchAbortError:()=>gs,delay:()=>Ol,execute:()=>kr,forever:()=>u7,isAbortError:()=>kn,proactiveRetry:()=>v7,race:()=>g7,rethrowAbortError:()=>Mw,retry:()=>_7,run:()=>y7,spawn:()=>A7,throwIfAborted:()=>o7,waitForEvent:()=>l7});var Na=ct(()=>{xB();Oi();Gp();_s();TB();NB();RB();kB();BB();OB();PB();DB()});var li=N(er=>{"use strict";var w7=er&&er.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),b7=er&&er.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),E7=er&&er.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&w7(t,e,n);return b7(t,e),t};Object.defineProperty(er,"__esModule",{value:!0});er.convertMetadataFromGrpcJs=er.convertMetadataToGrpcJs=void 0;var C7=E7(Sa()),I7=qn();function S7(e){let t=new C7.Metadata;for(let[n,r]of e)for(let i of r)t.add(n,typeof i=="string"?i:Buffer.from(i));return t}er.convertMetadataToGrpcJs=S7;function x7(e){let t=(0,I7.Metadata)();for(let n of Object.keys(e.getMap())){let r=e.get(n);t.set(n,r)}return t}er.convertMetadataFromGrpcJs=x7});var Pi=N(Wp=>{"use strict";Object.defineProperty(Wp,"__esModule",{value:!0});Wp.isAsyncIterable=void 0;function T7(e){return e!=null&&Symbol.asyncIterator in e}Wp.isAsyncIterable=T7});var Pl=N(Hp=>{"use strict";Object.defineProperty(Hp,"__esModule",{value:!0});Hp.readableToAsyncIterable=void 0;var MB=!1;function N7(e){if(MB)return!0;let t=e&&typeof e=="object"&&"errored"in e&&"errorEmitted"in e&&"endEmitted"in e&&"closeEmitted"in e&&typeof e.errorEmitted=="boolean"&&typeof e.endEmitted=="boolean"&&typeof e.closeEmitted=="boolean";return MB=t,t}async function*R7(e){let t=FB;function n(c){this===e?(t(),t=FB):t=c}let r=e._readableState;if(!N7(r))throw new Error("nice-grpc: _readableState members incompatible");let i=r.errored,a=r.errorEmitted,s=r.endEmitted,o=r.closeEmitted;for(e.on("readable",n).on("error",function(c){i=c,a=!0,n.call(this)}).on("end",function(){s=!0,n.call(this)}).on("close",function(){o=!0,n.call(this)});;){let c=e.destroyed?null:e.read();if(c!==null)yield c;else{if(a)throw i;if(s)break;if(o)break;await new Promise(n)}}}Hp.readableToAsyncIterable=R7;var FB=()=>{}});var Dl=N(Zp=>{"use strict";Object.defineProperty(Zp,"__esModule",{value:!0});Zp.createCallContext=void 0;var LB=qn(),QB=li();function k7(e){let t=new AbortController,n={signal:t.signal,cancel(){t.abort()}},r=(0,LB.Metadata)(),i=(0,LB.Metadata)();e.cancelled?(n.cancel?.(),n.cancel=void 0):(e.on("close",()=>{n.cancel=void 0}),e.on("finish",()=>{n.cancel=void 0}),e.on("cancelled",()=>{n.cancel?.(),n.cancel=void 0}));let a=!1;return{context:{metadata:(0,QB.convertMetadataFromGrpcJs)(e.metadata),peer:e.getPeer(),header:r,sendHeader(){a||(e.sendMetadata((0,QB.convertMetadataToGrpcJs)(r)),a=!0)},trailer:i,signal:n.signal},maybeCancel:n}}Zp.createCallContext=k7});var Ml=N(Xp=>{"use strict";Object.defineProperty(Xp,"__esModule",{value:!0});Xp.createErrorStatusObject=void 0;var UB=Sa(),B7=(Na(),nr(Ta)),O7=qn();function P7(e,t,n){return t instanceof O7.ServerError?{code:t.code,details:t.details,metadata:n}:(0,B7.isAbortError)(t)?{code:UB.status.CANCELLED,details:"The operation was cancelled",metadata:n}:(process.emitWarning(`${e}: Uncaught error in server implementation method. Server methods should only throw ServerError or AbortError. ${t instanceof Error?t.stack:t}`),{code:UB.status.UNKNOWN,details:"Unknown server error occurred",metadata:n})}Xp.createErrorStatusObject=P7});var VB=N(Yp=>{"use strict";Object.defineProperty(Yp,"__esModule",{value:!0});Yp.createBidiStreamingMethodHandler=void 0;var qB=(Na(),nr(Ta)),JB=li(),D7=Pi(),M7=Pl(),F7=Dl(),L7=Ml();function Q7(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if(!(0,D7.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");yield*t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!0,request:s,responseStream:!0,next:i},o);return s=>{let{context:o,maybeCancel:c}=(0,F7.createCallContext)(s);Promise.resolve().then(async()=>{let d=a((0,M7.readableToAsyncIterable)(s),o)[Symbol.asyncIterator]();try{let p=await d.next();for(;;){if(!p.done){try{o.sendHeader(),s.write(p.value)||await(0,qB.waitForEvent)(o.signal,s,"drain")}catch(h){p=(0,qB.isAbortError)(h)?await d.return():await d.throw(h);continue}p=await d.next();continue}if(p.value!=null){p=await d.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method"));continue}break}}finally{c.cancel=void 0,o.sendHeader()}}).then(()=>{s.end((0,JB.convertMetadataToGrpcJs)(o.trailer))},u=>{s.emit("error",(0,L7.createErrorStatusObject)(e.path,u,(0,JB.convertMetadataToGrpcJs)(o.trailer)))})}}Yp.createBidiStreamingMethodHandler=Q7});var GB=N($p=>{"use strict";Object.defineProperty($p,"__esModule",{value:!0});$p.createClientStreamingMethodHandler=void 0;var zB=li(),U7=Pi(),q7=Pl(),J7=Dl(),V7=Ml();function z7(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if(!(0,U7.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");return await t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!0,request:s,responseStream:!1,next:i},o);return(s,o)=>{let{context:c,maybeCancel:u}=(0,J7.createCallContext)(s);Promise.resolve().then(async()=>{let p=a((0,q7.readableToAsyncIterable)(s),c)[Symbol.asyncIterator]();try{let h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return h.value}}finally{u.cancel=void 0,c.sendHeader()}}).then(d=>{o(null,d,(0,zB.convertMetadataToGrpcJs)(c.trailer))},d=>{o((0,V7.createErrorStatusObject)(e.path,d,(0,zB.convertMetadataToGrpcJs)(c.trailer)))})}}$p.createClientStreamingMethodHandler=z7});var ZB=N(Kp=>{"use strict";Object.defineProperty(Kp,"__esModule",{value:!0});Kp.createServerStreamingMethodHandler=void 0;var WB=(Na(),nr(Ta)),HB=li(),G7=Pi(),W7=Dl(),H7=Ml();function Z7(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if((0,G7.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");yield*t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!1,request:s,responseStream:!0,next:i},o);return s=>{let{context:o,maybeCancel:c}=(0,W7.createCallContext)(s);Promise.resolve().then(async()=>{let d=a(s.request,o)[Symbol.asyncIterator]();try{let p=await d.next();for(;;){if(!p.done){try{o.sendHeader(),s.write(p.value)||await(0,WB.waitForEvent)(o.signal,s,"drain")}catch(h){p=(0,WB.isAbortError)(h)?await d.return():await d.throw(h);continue}p=await d.next();continue}if(p.value!=null){p=await d.throw(new Error("A middleware returned a message, but expected to return void for server streaming method"));continue}break}}finally{c.cancel=void 0,o.sendHeader()}}).then(()=>{s.end((0,HB.convertMetadataToGrpcJs)(o.trailer))},u=>{s.emit("error",(0,H7.createErrorStatusObject)(e.path,u,(0,HB.convertMetadataToGrpcJs)(o.trailer)))})}}Kp.createServerStreamingMethodHandler=Z7});var YB=N(jp=>{"use strict";Object.defineProperty(jp,"__esModule",{value:!0});jp.createUnaryMethodHandler=void 0;var XB=li(),X7=Pi(),Y7=Dl(),$7=Ml();function K7(e,t,n){let r={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*i(s,o){if((0,X7.isAsyncIterable)(s))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");return await t(s,o)}let a=n==null?i:(s,o)=>n({method:r,requestStream:!1,request:s,responseStream:!1,next:i},o);return(s,o)=>{let{context:c,maybeCancel:u}=(0,Y7.createCallContext)(s);Promise.resolve().then(async()=>{let p=a(s.request,c)[Symbol.asyncIterator]();try{let h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return h.value}}finally{u.cancel=void 0,c.sendHeader()}}).then(d=>{o(null,d,(0,XB.convertMetadataToGrpcJs)(c.trailer))},d=>{o((0,$7.createErrorStatusObject)(e.path,d,(0,XB.convertMetadataToGrpcJs)(c.trailer)))})}}jp.createUnaryMethodHandler=K7});var t1=N(eh=>{"use strict";Object.defineProperty(eh,"__esModule",{value:!0});eh.createServer=void 0;var $B=Sa(),KB=qn(),jB=ms(),j7=VB(),e9=GB(),t9=ZB(),n9=YB();function r9(e={}){return e1(e)}eh.createServer=r9;function e1(e,t){let n=[],r;function i(a){return{with(s){return i(a==null?s:(0,KB.composeServerMiddleware)(a,s))},add(s,o){if(r!=null)throw new Error("server.add() must be used before listen()");n.push({definition:(0,jB.normalizeServiceDefinition)(s),middleware:a,implementation:o})}}}return{use(a){if(r!=null)throw new Error("server.use() must be used before listen()");if(n.length>0)throw new Error("server.use() must be used before adding any services");return e1(e,t==null?a:(0,KB.composeServerMiddleware)(t,a))},...i(t),async listen(a,s){if(r!=null)throw new Error("server.listen() has already been called");r=new $B.Server(e);for(let{definition:c,middleware:u,implementation:d}of n){let p={};for(let[h,_]of Object.entries(c)){let w=d[h].bind(d);_.requestStream?_.responseStream?p[h]=(0,j7.createBidiStreamingMethodHandler)(_,w,u):p[h]=(0,e9.createClientStreamingMethodHandler)(_,w,u):_.responseStream?p[h]=(0,t9.createServerStreamingMethodHandler)(_,w,u):p[h]=(0,n9.createUnaryMethodHandler)(_,w,u)}r.addService((0,jB.toGrpcJsServiceDefinition)(c),p)}let o=await new Promise((c,u)=>{r.bindAsync(a,s??$B.ServerCredentials.createInsecure(),(d,p)=>{d!=null?(r=void 0,u(d)):c(p)})});return r.start(),o},async shutdown(){r!=null&&(await new Promise((a,s)=>{r.tryShutdown(o=>{o!=null?s(o):a()})}),r=void 0)},forceShutdown(){r!=null&&(r.forceShutdown(),r=void 0)}}}});var r1=N(n1=>{"use strict";Object.defineProperty(n1,"__esModule",{value:!0})});var i1=N(vu=>{"use strict";Object.defineProperty(vu,"__esModule",{value:!0});vu.waitForChannelReady=vu.createChannel=void 0;var th=Sa(),i9=new Set(["http","https"]);function a9(e,t,n={}){let r=/^(?:([^:]+):\/\/)?(.*?)(?::(\d+))?$/.exec(e);if(r==null)throw new Error(`Invalid address: '${e}'`);let[,i,a,s]=r,o=!i||i9.has(i),c=t?._isSecure()||i?.includes("https");t??(t=c?th.ChannelCredentials.createSsl():th.ChannelCredentials.createInsecure()),s??(s=c?"443":"80");let u=o?`${a}:${s}`:e;return new th.Channel(u,t,n)}vu.createChannel=a9;async function s9(e,t){for(;;){let n=e.getConnectivityState(!0);if(n===th.connectivityState.READY)return;await new Promise((r,i)=>{e.watchConnectivityState(n,t,a=>{a!=null?i(a):r()})})}}vu.waitForChannelReady=s9});var Fl=N(nh=>{"use strict";Object.defineProperty(nh,"__esModule",{value:!0});nh.wrapClientError=void 0;var o9=qn(),c9=Sa();function u9(e,t){return l9(e)?new o9.ClientError(t,e.code,e.details):e}nh.wrapClientError=u9;function l9(e){return typeof e=="object"&&e!==null&&typeof e.code=="number"&&typeof e.details=="string"&&e.metadata instanceof c9.Metadata}});var a1=N(ih=>{"use strict";Object.defineProperty(ih,"__esModule",{value:!0});ih.createBidiStreamingMethod=void 0;var rh=(Na(),nr(Ta)),d9=qn(),f9=ms(),Fw=li(),p9=Pi(),h9=Pl(),m9=Fl();function g9(e,t,n,r){let i=(0,f9.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if(!(0,p9.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for bidirectional streaming method");let{metadata:d=(0,d9.Metadata)(),onHeader:p,onTrailer:h}=u,_=u.signal??new AbortController().signal,w=new AbortController,A=t.makeBidiStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,Fw.convertMetadataToGrpcJs)(d));A.on("metadata",T=>{p?.((0,Fw.convertMetadataFromGrpcJs)(T))}),A.on("status",T=>{h?.((0,Fw.convertMetadataFromGrpcJs)(T.metadata))});let S;_9(w.signal,c,A).then(()=>{A.end()},T=>{(0,rh.isAbortError)(T)||(S=T,A.cancel())});let b=()=>{w.abort(),A.cancel()};_.addEventListener("abort",b);try{yield*(0,h9.readableToAsyncIterable)(A)}catch(T){throw(0,m9.wrapClientError)(T,e.path)}finally{if(w.abort(),_.removeEventListener("abort",b),(0,rh.throwIfAborted)(_),A.cancel(),S)throw S}}let o=n==null?s:(c,u)=>n({method:a,requestStream:!0,request:c,responseStream:!0,next:s},u);return(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let h=await p.next();return h.done&&h.value!=null?await p.throw(new Error("A middleware returned a message, but expected to return void for bidirectional streaming method")):h},return(){return p.return()},throw(h){return p.throw(h)}}}}}}ih.createBidiStreamingMethod=g9;async function _9(e,t,n){for await(let r of t)(0,rh.throwIfAborted)(e),n.write(r)||await(0,rh.waitForEvent)(e,n,"drain")}});var s1=N(sh=>{"use strict";Object.defineProperty(sh,"__esModule",{value:!0});sh.createClientStreamingMethod=void 0;var ah=(Na(),nr(Ta)),A9=qn(),y9=ms(),Lw=li(),v9=Pi(),w9=Fl();function b9(e,t,n,r){let i=(0,y9.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if(!(0,v9.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for client streaming method");let{metadata:d=(0,A9.Metadata)(),signal:p=new AbortController().signal,onHeader:h,onTrailer:_}=u;return await(0,ah.execute)(p,(w,A)=>{let S=new AbortController,b=t.makeClientStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,(0,Lw.convertMetadataToGrpcJs)(d),(T,B)=>{S.abort(),T!=null?A((0,w9.wrapClientError)(T,e.path)):w(B)});return b.on("metadata",T=>{h?.((0,Lw.convertMetadataFromGrpcJs)(T))}),b.on("status",T=>{_?.((0,Lw.convertMetadataFromGrpcJs)(T.metadata))}),E9(S.signal,c,b).then(()=>{b.end()},T=>{(0,ah.isAbortError)(T)||(A(T),b.cancel())}),()=>{S.abort(),b.cancel()}})}let o=n==null?s:(c,u)=>n({method:a,requestStream:!0,request:c,responseStream:!1,next:s},u);return async(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator](),h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for client streaming method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for client streaming method"));continue}return h.value}}}sh.createClientStreamingMethod=b9;async function E9(e,t,n){for await(let r of t)(0,ah.throwIfAborted)(e),n.write(r)||await(0,ah.waitForEvent)(e,n,"drain")}});var o1=N(oh=>{"use strict";Object.defineProperty(oh,"__esModule",{value:!0});oh.createServerStreamingMethod=void 0;var C9=(Na(),nr(Ta)),I9=qn(),S9=ms(),Qw=li(),x9=Pi(),T9=Pl(),N9=Fl();function R9(e,t,n,r){let i=(0,S9.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if((0,x9.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for server streaming method");let{metadata:d=(0,I9.Metadata)(),onHeader:p,onTrailer:h}=u,_=u.signal??new AbortController().signal,w=t.makeServerStreamRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,Qw.convertMetadataToGrpcJs)(d));w.on("metadata",S=>{p?.((0,Qw.convertMetadataFromGrpcJs)(S))}),w.on("status",S=>{h?.((0,Qw.convertMetadataFromGrpcJs)(S.metadata))});let A=()=>{w.cancel()};_.addEventListener("abort",A);try{yield*(0,T9.readableToAsyncIterable)(w)}catch(S){throw(0,N9.wrapClientError)(S,e.path)}finally{_.removeEventListener("abort",A),(0,C9.throwIfAborted)(_),w.cancel()}}let o=n==null?s:(c,u)=>n({method:a,requestStream:!1,request:c,responseStream:!0,next:s},u);return(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator]();return{[Symbol.asyncIterator](){return{async next(){let h=await p.next();return h.done&&h.value!=null?await p.throw(new Error("A middleware returned a message, but expected to return void for server streaming method")):h},return(){return p.return()},throw(h){return p.throw(h)}}}}}}oh.createServerStreamingMethod=R9});var c1=N(ch=>{"use strict";Object.defineProperty(ch,"__esModule",{value:!0});ch.createUnaryMethod=void 0;var k9=(Na(),nr(Ta)),B9=qn(),O9=ms(),Uw=li(),P9=Pi(),D9=Fl();function M9(e,t,n,r){let i=(0,O9.toGrpcJsMethodDefinition)(e),a={path:e.path,requestStream:e.requestStream,responseStream:e.responseStream,options:e.options};async function*s(c,u){if((0,P9.isAsyncIterable)(c))throw new Error("A middleware passed invalid request to next(): expected a single message for unary method");let{metadata:d=(0,B9.Metadata)(),signal:p=new AbortController().signal,onHeader:h,onTrailer:_}=u;return await(0,k9.execute)(p,(w,A)=>{let S=t.makeUnaryRequest(i.path,i.requestSerialize,i.responseDeserialize,c,(0,Uw.convertMetadataToGrpcJs)(d),(b,T)=>{b!=null?A((0,D9.wrapClientError)(b,e.path)):w(T)});return S.on("metadata",b=>{h?.((0,Uw.convertMetadataFromGrpcJs)(b))}),S.on("status",b=>{_?.((0,Uw.convertMetadataFromGrpcJs)(b.metadata))}),()=>{S.cancel()}})}let o=n==null?s:(c,u)=>n({method:a,requestStream:!1,request:c,responseStream:!1,next:s},u);return async(c,u)=>{let p=o(c,{...r,...u})[Symbol.asyncIterator](),h=await p.next();for(;;){if(!h.done){h=await p.throw(new Error("A middleware yielded a message, but expected to only return a message for unary method"));continue}if(h.value==null){h=await p.throw(new Error("A middleware returned void, but expected to return a message for unary method"));continue}return h.value}}}ch.createUnaryMethod=M9});var d1=N(wu=>{"use strict";Object.defineProperty(wu,"__esModule",{value:!0});wu.createClient=wu.createClientFactory=void 0;var F9=Sa(),L9=qn(),Q9=ms(),U9=a1(),q9=s1(),J9=o1(),V9=c1();function u1(){return l1()}wu.createClientFactory=u1;function z9(e,t,n){return u1().create(e,t,n)}wu.createClient=z9;function l1(e){return{use(t){return l1(e==null?t:(0,L9.composeClientMiddleware)(e,t))},create(t,n,r={}){let i=(0,F9.makeClientConstructor)({},""),a=new i("",null,{channelOverride:n}),s={},o=Object.entries((0,Q9.normalizeServiceDefinition)(t));for(let[c,u]of o){let d={...r["*"],...r[c]};u.requestStream?u.responseStream?s[c]=(0,U9.createBidiStreamingMethod)(u,a,e,d):s[c]=(0,q9.createClientStreamingMethod)(u,a,e,d):u.responseStream?s[c]=(0,J9.createServerStreamingMethod)(u,a,e,d):s[c]=(0,V9.createUnaryMethod)(u,a,e,d)}return s}}}});var p1=N(f1=>{"use strict";Object.defineProperty(f1,"__esModule",{value:!0})});var g1=N(St=>{"use strict";var G9=St&&St.__createBinding||(Object.create?function(e,t,n,r){r===void 0&&(r=n);var i=Object.getOwnPropertyDescriptor(t,n);(!i||("get"in i?!t.__esModule:i.writable||i.configurable))&&(i={enumerable:!0,get:function(){return t[n]}}),Object.defineProperty(e,r,i)}:function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]}),Ll=St&&St.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&G9(t,e,n)};Object.defineProperty(St,"__esModule",{value:!0});St.ChannelCredentials=St.Channel=St.waitForChannelReady=St.createChannel=void 0;Ll(qn(),St);Ll(t1(),St);Ll(r1(),St);var h1=i1();Object.defineProperty(St,"createChannel",{enumerable:!0,get:function(){return h1.createChannel}});Object.defineProperty(St,"waitForChannelReady",{enumerable:!0,get:function(){return h1.waitForChannelReady}});var m1=Sa();Object.defineProperty(St,"Channel",{enumerable:!0,get:function(){return m1.Channel}});Object.defineProperty(St,"ChannelCredentials",{enumerable:!0,get:function(){return m1.ChannelCredentials}});Ll(d1(),St);Ll(p1(),St)});v1();Hl();jw();function ab(e,t,n,r,i,a){let s=e[t++]^n[r++],o=e[t++]^n[r++],c=e[t++]^n[r++],u=e[t++]^n[r++],d=e[t++]^n[r++],p=e[t++]^n[r++],h=e[t++]^n[r++],_=e[t++]^n[r++],w=e[t++]^n[r++],A=e[t++]^n[r++],S=e[t++]^n[r++],b=e[t++]^n[r++],T=e[t++]^n[r++],B=e[t++]^n[r++],O=e[t++]^n[r++],z=e[t++]^n[r++],Q=s,V=o,Z=c,fe=u,ne=d,k=p,pe=h,M=_,y=w,R=A,J=S,Y=b,re=T,ae=B,ce=O,Ee=z;for(let Ce=0;Ce<8;Ce+=2)ne^=Re(Q+re|0,7),y^=Re(ne+Q|0,9),re^=Re(y+ne|0,13),Q^=Re(re+y|0,18),R^=Re(k+V|0,7),ae^=Re(R+k|0,9),V^=Re(ae+R|0,13),k^=Re(V+ae|0,18),ce^=Re(J+pe|0,7),Z^=Re(ce+J|0,9),pe^=Re(Z+ce|0,13),J^=Re(pe+Z|0,18),fe^=Re(Ee+Y|0,7),M^=Re(fe+Ee|0,9),Y^=Re(M+fe|0,13),Ee^=Re(Y+M|0,18),V^=Re(Q+fe|0,7),Z^=Re(V+Q|0,9),fe^=Re(Z+V|0,13),Q^=Re(fe+Z|0,18),pe^=Re(k+ne|0,7),M^=Re(pe+k|0,9),ne^=Re(M+pe|0,13),k^=Re(ne+M|0,18),Y^=Re(J+R|0,7),y^=Re(Y+J|0,9),R^=Re(y+Y|0,13),J^=Re(R+y|0,18),re^=Re(Ee+ce|0,7),ae^=Re(re+Ee|0,9),ce^=Re(ae+re|0,13),Ee^=Re(ce+ae|0,18);i[a++]=s+Q|0,i[a++]=o+V|0,i[a++]=c+Z|0,i[a++]=u+fe|0,i[a++]=d+ne|0,i[a++]=p+k|0,i[a++]=h+pe|0,i[a++]=_+M|0,i[a++]=w+y|0,i[a++]=A+R|0,i[a++]=S+J|0,i[a++]=b+Y|0,i[a++]=T+re|0,i[a++]=B+ae|0,i[a++]=O+ce|0,i[a++]=z+Ee|0}function bh(e,t,n,r,i){let a=r+0,s=r+16*i;for(let o=0;o<16;o++)n[s+o]=e[t+(2*i-1)*16+o];for(let o=0;o<i;o++,a+=16,t+=16)ab(n,s,e,t,n,a),o>0&&(s+=16),ab(n,a,e,t+=16,n,s)}function x1(e,t,n){let r=$w({dkLen:32,asyncTick:10,maxmem:1073742848},n),{N:i,r:a,p:s,dkLen:o,asyncTick:c,maxmem:u,onProgress:d}=r;if(Ra(i),Ra(a),Ra(s),Ra(o),Ra(c),Ra(u),d!==void 0&&typeof d!="function")throw new Error("progressCb should be function");let p=128*a,h=p/4;if(i<=1||i&i-1||i>=2**(p/8)||i>2**32)throw new Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(s<0||s>(2**32-1)*32/p)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(o<0||o>(2**32-1)*32)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let _=p*(i+s);if(_>u)throw new Error(`Scrypt: parameters too large, ${_} (128 * r * (N + p)) > ${u} (maxmem)`);let w=wh(di,e,t,{c:1,dkLen:p*s}),A=Wl(w),S=Wl(new Uint8Array(p*i)),b=Wl(new Uint8Array(p)),T=()=>{};if(d){let B=2*i*s,O=Math.max(Math.floor(B/1e4),1),z=0;T=()=>{z++,d&&(!(z%O)||z===B)&&d(z/B)}}return{N:i,r:a,p:s,dkLen:o,blockSize32:h,V:S,B32:A,B:w,tmp:b,blockMixCb:T,asyncTick:c}}function T1(e,t,n,r,i){let a=wh(di,e,n,{c:1,dkLen:t});return n.fill(0),r.fill(0),i.fill(0),a}function sb(e,t,n){let{N:r,r:i,p:a,dkLen:s,blockSize32:o,V:c,B32:u,B:d,tmp:p,blockMixCb:h}=x1(e,t,n);yh||vh(u);for(let _=0;_<a;_++){let w=o*_;for(let A=0;A<o;A++)c[A]=u[w+A];for(let A=0,S=0;A<r-1;A++)bh(c,S,c,S+=o,i),h();bh(c,(r-1)*o,u,w,i),h();for(let A=0;A<r;A++){let S=u[w+o-16]%r;for(let b=0;b<o;b++)p[b]=u[w+b]^c[S*o+b];bh(p,0,u,w,i),h()}}return yh||vh(u),T1(e,s,d,c,p)}b1();import ob from"crypto";import{pbkdf2Sync as B1}from"crypto";import O1 from"crypto";import lb from"crypto";import{createHmac as L1}from"crypto";import{randomUUID as U1}from"crypto";var N1=e=>{let{password:t,salt:n,n:r,p:i,r:a,dklen:s}=e;return sb(t,n,{N:r,r:a,p:i,dkLen:s})},R1=e=>tb(e);function k1(e){let t=D(e,"data");return nb(t)}var Iu=(e,t="base64")=>Uint8Array.from(Buffer.from(e,t));function cb(e,t,n,r,i){let a=D(e,"password"),s=D(t,"salt");return L(B1(a,s,n,r,i))}var Eh=e=>Uint8Array.from(O1.randomBytes(e)),Zl=(e,t="base64")=>Buffer.from(e).toString(t),ub="aes-256-ctr",Ch=(e,t)=>{let n=Iu(String(e).normalize("NFKC"),"utf-8"),r=cb(n,t,1e5,32,"sha256");return D(r)},P1=async(e,t)=>{let n=Eh(16),r=Eh(32),i=Ch(e,r),a=Uint8Array.from(Buffer.from(JSON.stringify(t),"utf-8")),s=await ob.createCipheriv(ub,i,n),o=s.update(a);return o=Buffer.concat([o,s.final()]),{data:Zl(o),iv:Zl(n),salt:Zl(r)}},D1=async(e,t)=>{let n=Iu(t.iv),r=Iu(t.salt),i=Ch(e,r),a=Iu(t.data),s=await ob.createDecipheriv(ub,i,n),o=s.update(a),c=Buffer.concat([o,s.final()]),u=Buffer.from(c).toString("utf-8");try{return JSON.parse(u)}catch{throw new v(x.INVALID_CREDENTIALS,"Invalid credentials.")}};async function M1(e,t,n){let r=await lb.createCipheriv("aes-128-ctr",t.subarray(0,16),n),i=Buffer.concat([r.update(e),r.final()]);return new Uint8Array(i)}async function F1(e,t,n){let r=lb.createDecipheriv("aes-128-ctr",t.subarray(0,16),n),i=await Buffer.concat([r.update(e),r.final()]);return new Uint8Array(i)}function Q1(e,t,n){let r=D(t,"key"),i=D(n,"data");return L(L1(e,r).update(i).digest())}var q1=()=>U1(),J1={bufferFromString:Iu,stringFromBuffer:Zl,decrypt:D1,encrypt:P1,keyFromPassword:Ch,randomBytes:Eh,scrypt:N1,keccak256:R1,decryptJsonWalletData:F1,encryptJsonWalletData:M1,computeHmac:Q1,pbkdf2:cb,ripemd160:k1,randomUUID:q1},V1=J1,{bufferFromString:ir,decrypt:db,encrypt:fb,keyFromPassword:kZ,randomBytes:Mt,stringFromBuffer:bs,scrypt:Ih,keccak256:Sh,decryptJsonWalletData:pb,encryptJsonWalletData:hb,computeHmac:Xl,pbkdf2:mb,ripemd160:gb,randomUUID:_b}=V1;Hl();function tt(e){return L(di(D(e)))}function an(e){return tt(e)}function Ab(e){let t=BigInt(e),n=new ArrayBuffer(8),r=new DataView(n);return r.setBigUint64(0,t,!1),new Uint8Array(r.buffer)}function yb(e){return an(ir(e,"utf-8"))}var z1=Object.defineProperty,G1=(e,t,n)=>t in e?z1(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Rh=(e,t,n)=>(G1(e,typeof t!="symbol"?t+"":t,n),n),ge=class{name;type;encodedLength;constructor(e,t,n){this.name=e,this.type=t,this.encodedLength=n}},W1="u8",H1="u16",Z1="u32",X1="u64",Y1="u256",$1="raw untyped ptr",K1="raw untyped slice",j1="bool",eO="b256",tO="struct std::b512::B512",Yl="enum std::option::Option",nO="struct std::vec::Vec",rO="struct std::bytes::Bytes",iO="struct std::string::String",aO="str",xu="()",bb=/^enum (std::option::)?Option$/m,Eb=/str\[(?<length>[0-9]+)\]/,xh=/\[(?<item>[\w\s\\[\]]+);\s*(?<length>[0-9]+)\]/,Cb=/struct.+/,Ib=/^enum.+$/,sO=/^\((?<items>.*)\)$/,oO=/^generic.+$/,cO=/([^\s]+)$/m,Is="1",ue=8,ar=32,Oa=ar+2,Ba=ar,$l=ar,Th=ar,uO=ar,lO=ue*4,dO=ue*2,Sb=2**32-1,kh=({maxInputs:e})=>ar+Ba+e*(Ba+ue)+ue,Bh=ue+ue+ue+ue+ue+ue+ue+ue+ar,QZ=ue+lO+ue+Th+ue+Ba+dO+ue+ue+ue+ue,UZ=ue+Th+Th+ue+uO+ue+ue+ue+ue+ue,vb=e=>e instanceof Uint8Array,Ss=e=>{let t=Array.isArray(e)?e:Object.values(e);for(let n of t)if(n.type===Yl||"coder"in n&&n.coder.type===Yl||"coders"in n&&Ss(n.coders))return!0;return!1},Ie=class extends ge{coder;length;#e;constructor(e,t){super("array",`[${e.type}; ${t}]`,t*e.encodedLength),this.coder=e,this.length=t,this.#e=Ss([e])}encode(e){if(!Array.isArray(e))throw new v(x.ENCODE_ERROR,"Expected array value.");if(this.length!==e.length)throw new v(x.ENCODE_ERROR,"Types/values length mismatch.");return ie(Array.from(e).map(t=>this.coder.encode(t)))}decode(e,t){if(!this.#e&&e.length<this.encodedLength||e.length>Sb)throw new v(x.DECODE_ERROR,"Invalid array data size.");let n=t;return[Array(this.length).fill(0).map(()=>{let i;return[i,n]=this.coder.decode(e,n),i}),n]}},te=class extends ge{constructor(){super("b256","b256",ue*4)}encode(e){let t;try{t=D(e)}catch{throw new v(x.ENCODE_ERROR,`Invalid ${this.type}.`)}if(t.length!==this.encodedLength)throw new v(x.ENCODE_ERROR,`Invalid ${this.type}.`);return t}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid b256 data size.");let n=e.slice(t,t+this.encodedLength);if(I(n).isZero()&&(n=new Uint8Array(32)),n.length!==this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid b256 byte data size.");return[ys(n,32),t+32]}},fO=class extends ge{constructor(){super("b512","struct B512",ue*8)}encode(e){let t;try{t=D(e)}catch{throw new v(x.ENCODE_ERROR,`Invalid ${this.type}.`)}if(t.length!==this.encodedLength)throw new v(x.ENCODE_ERROR,`Invalid ${this.type}.`);return t}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid b512 data size.");let n=e.slice(t,t+this.encodedLength);if(I(n).isZero()&&(n=new Uint8Array(64)),n.length!==this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid b512 byte data size.");return[ys(n,this.encodedLength),t+this.encodedLength]}},pO={u64:ue,u256:ue*4},$=class extends ge{constructor(e){super("bigNumber",e,pO[e])}encode(e){let t;try{t=rn(e,this.encodedLength)}catch{throw new v(x.ENCODE_ERROR,`Invalid ${this.type}.`)}return t}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,`Invalid ${this.type} data size.`);let n=e.slice(t,t+this.encodedLength);if(n=n.slice(0,this.encodedLength),n.length!==this.encodedLength)throw new v(x.DECODE_ERROR,`Invalid ${this.type} byte data size.`);return[I(n),t+this.encodedLength]}},hO=class extends ge{options;constructor(e={padToWordSize:!1}){let t=e.padToWordSize?ue:1;super("boolean","boolean",t),this.options=e}encode(e){if(!(e===!0||e===!1))throw new v(x.ENCODE_ERROR,"Invalid boolean value.");return rn(e?1:0,this.encodedLength)}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid boolean data size.");let n=I(e.slice(t,t+this.encodedLength));if(n.isZero())return[!1,t+this.encodedLength];if(!n.eq(I(1)))throw new v(x.DECODE_ERROR,"Invalid boolean value.");return[!0,t+this.encodedLength]}},xb=class extends ge{constructor(){super("struct","struct Bytes",ue)}encode(e){let t=e instanceof Uint8Array?e:new Uint8Array(e),n=new $("u64").encode(t.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<ue)throw new v(x.DECODE_ERROR,"Invalid byte data size.");let n=t+ue,r=e.slice(t,n),i=I(new $("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new v(x.DECODE_ERROR,"Invalid bytes byte data size.");return[a,n+i]}};Rh(xb,"memorySize",1);var Tb=class extends ge{name;coders;#e;#n;#t;constructor(e,t){let n=new $("u64"),r=Object.values(t).reduce((i,a)=>Math.min(i,a.encodedLength),0);super(`enum ${e}`,`enum ${e}`,n.encodedLength+r),this.name=e,this.coders=t,this.#e=n,this.#n=r,this.#t=!(bb.test(this.type)||Ss(t))}#r(e){return this.type!==Yl&&e.type===xu}#i(e){let t=this.coders[e],n=t.encode([]),r=Object.keys(this.coders).indexOf(e),i=new Uint8Array(this.#n-t.encodedLength);return ie([this.#e.encode(r),i,n])}encode(e){if(typeof e=="string"&&this.coders[e])return this.#i(e);let[t,...n]=Object.keys(e);if(!t)throw new v(x.INVALID_DECODE_VALUE,"A field for the case must be provided.");if(n.length!==0)throw new v(x.INVALID_DECODE_VALUE,"Only one field must be provided.");let r=this.coders[t],i=Object.keys(this.coders).indexOf(t);if(i===-1){let s=Object.keys(this.coders).map(o=>`'${o}'`).join(", ");throw new v(x.INVALID_DECODE_VALUE,`Invalid case '${t}'. Valid cases: ${s}.`)}let a=r.encode(e[t]);return new Uint8Array([...this.#e.encode(i),...a])}#a(e,t){return[e,t]}decode(e,t){if(this.#t&&e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid enum data size.");let n=new $("u64").decode(e,t)[0],r=On(n),i=Object.keys(this.coders)[r];if(!i)throw new v(x.INVALID_DECODE_VALUE,`Invalid caseIndex "${r}". Valid cases: ${Object.keys(this.coders)}.`);let a=this.coders[i],s=t+this.#e.encodedLength;if(this.#t&&e.length<s+a.encodedLength)throw new v(x.DECODE_ERROR,"Invalid enum data size.");let[o,c]=a.decode(e,s);return this.#r(this.coders[i])?this.#a(i,c):[{[i]:o},c]}},mO=e=>{switch(e){case"u8":return 1;case"u16":return 2;case"u32":return 4;default:throw new v(x.TYPE_NOT_SUPPORTED,`Invalid number type: ${e}`)}},W=class extends ge{baseType;options;constructor(e,t={padToWordSize:!1}){let n=t.padToWordSize?ue:mO(e);super("number",e,n),this.baseType=e,this.options=t}encode(e){let t;try{t=rn(e)}catch{throw new v(x.ENCODE_ERROR,`Invalid ${this.baseType}.`)}if(t.length>this.encodedLength)throw new v(x.ENCODE_ERROR,`Invalid ${this.baseType}, too many bytes.`);return rn(t,this.encodedLength)}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid number data size.");let n=e.slice(t,t+this.encodedLength);if(n.length!==this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid number byte data size.");return[On(n),t+this.encodedLength]}},Nb=class extends Tb{encode(e){return super.encode(this.toSwayOption(e))}toSwayOption(e){return e!==void 0?{Some:e}:{None:[]}}decode(e,t){let[n,r]=super.decode(e,t);return[this.toOption(n),r]}toOption(e){if(e&&"Some"in e)return e.Some}},gO=class extends ge{constructor(){super("raw untyped slice","raw untyped slice",ue)}encode(e){if(!Array.isArray(e))throw new v(x.ENCODE_ERROR,"Expected array value.");let n=new Ie(new W("u8"),e.length).encode(e),r=new $("u64").encode(n.length);return new Uint8Array([...r,...n])}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid raw slice data size.");let n=t+ue,r=e.slice(t,n),i=I(new $("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new v(x.DECODE_ERROR,"Invalid raw slice byte data size.");let s=new Ie(new W("u8"),i),[o]=s.decode(a,0);return[o,n+i]}},Oh=class extends ge{constructor(){super("struct","struct String",ue)}encode(e){let t=Br(e),n=new $("u64").encode(e.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid std string data size.");let n=t+ue,r=e.slice(t,n),i=I(new $("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new v(x.DECODE_ERROR,"Invalid std string byte data size.");return[ws(a),n+i]}};Rh(Oh,"memorySize",1);var Rb=class extends ge{constructor(){super("strSlice","str",ue)}encode(e){let t=Br(e),n=new $("u64").encode(e.length);return new Uint8Array([...n,...t])}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid string slice data size.");let n=t+ue,r=e.slice(t,n),i=I(new $("u64").decode(r,0)[0]).toNumber(),a=e.slice(n,n+i);if(a.length!==i)throw new v(x.DECODE_ERROR,"Invalid string slice byte data size.");return[ws(a),n+i]}};Rh(Rb,"memorySize",1);var _O=class extends ge{constructor(e){super("string",`str[${e}]`,e)}encode(e){if(e.length!==this.encodedLength)throw new v(x.ENCODE_ERROR,"Value length mismatch during encode.");return Br(e)}decode(e,t){if(e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid string data size.");let n=e.slice(t,t+this.encodedLength);if(n.length!==this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid string byte data size.");return[ws(n),t+this.encodedLength]}},xs=class extends ge{name;coders;#e;constructor(e,t){let n=Object.values(t).reduce((r,i)=>r+i.encodedLength,0);super("struct",`struct ${e}`,n),this.name=e,this.coders=t,this.#e=Ss(t)}encode(e){return vs(Object.keys(this.coders).map(t=>{let n=this.coders[t],r=e[t];if(!(n instanceof Nb)&&r==null)throw new v(x.ENCODE_ERROR,`Invalid ${this.type}. Field "${t}" not present.`);return n.encode(r)}))}decode(e,t){if(!this.#e&&e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid struct data size.");let n=t;return[Object.keys(this.coders).reduce((i,a)=>{let s=this.coders[a],o;return[o,n]=s.decode(e,n),i[a]=o,i},{}),n]}},kb=class extends ge{coders;#e;constructor(e){let t=e.reduce((n,r)=>n+r.encodedLength,0);super("tuple",`(${e.map(n=>n.type).join(", ")})`,t),this.coders=e,this.#e=Ss(e)}encode(e){if(this.coders.length!==e.length)throw new v(x.ENCODE_ERROR,"Types/values length mismatch.");return vs(this.coders.map((t,n)=>t.encode(e[n])))}decode(e,t){if(!this.#e&&e.length<this.encodedLength)throw new v(x.DECODE_ERROR,"Invalid tuple data size.");let n=t;return[this.coders.map(i=>{let a;return[a,n]=i.decode(e,n),a}),n]}},AO=class extends ge{coder;#e;constructor(e){super("struct","struct Vec",ue),this.coder=e,this.#e=Ss([e])}encode(e){if(!Array.isArray(e)&&!vb(e))throw new v(x.ENCODE_ERROR,"Expected array value, or a Uint8Array. You can use arrayify to convert a value to a Uint8Array.");let t=new $("u64");if(vb(e))return new Uint8Array([...t.encode(e.length),...e]);let n=e.map(i=>this.coder.encode(i)),r=t.encode(e.length);return new Uint8Array([...r,...vs(n)])}decode(e,t){if(!this.#e&&e.length<this.encodedLength||e.length>Sb)throw new v(x.DECODE_ERROR,"Invalid vec data size.");let n=t+ue,r=e.slice(t,n),i=I(new $("u64").decode(r,0)[0]).toNumber(),a=i*this.coder.encodedLength,s=e.slice(n,n+a);if(!this.#e&&s.length!==a)throw new v(x.DECODE_ERROR,"Invalid vec byte data size.");let o=n,c=[];for(let u=0;u<i;u++){let[d,p]=this.coder.decode(e,o);c.push(d),o=p}return[c,o]}},Bb=e=>{switch(e){case void 0:case Is:return Is;default:throw new v(x.UNSUPPORTED_ENCODING_VERSION,`Encoding version '${e}' is unsupported.`)}},Su=(e,t)=>{let n=e.types.find(r=>r.typeId===t);if(!n)throw new v(x.TYPE_NOT_FOUND,`Type with typeId '${t}' doesn't exist in the ABI.`);return n},yO=(e,t)=>t.filter(n=>Su(e,n.type).type!==xu),vO=e=>{let t=e.find(r=>r.name==="buf"),n=t?.originalTypeArguments?.[0];if(!t||!n)throw new v(x.INVALID_COMPONENT,"The Vec type provided is missing or has a malformed 'buf' component.");return n},Di=class{abi;name;type;originalTypeArguments;components;constructor(e,t){this.abi=e,this.name=t.name;let n=Su(e,t.type);if(n.type.length>256)throw new v(x.INVALID_COMPONENT,`The provided ABI type is too long: ${n.type}.`);this.type=n.type,this.originalTypeArguments=t.typeArguments,this.components=Di.getResolvedGenericComponents(e,t,n.components,n.typeParameters??Di.getImplicitGenericTypeParameters(e,n.components))}static getResolvedGenericComponents(e,t,n,r){if(n===null)return null;if(r===null||r.length===0)return n.map(s=>new Di(e,s));let i=r.reduce((s,o,c)=>{let u={...s};return u[o]=structuredClone(t.typeArguments?.[c]),u},{});return this.resolveGenericArgTypes(e,n,i).map(s=>new Di(e,s))}static resolveGenericArgTypes(e,t,n){return t.map(r=>{if(n[r.type]!==void 0)return{...n[r.type],name:r.name};if(r.typeArguments)return{...structuredClone(r),typeArguments:this.resolveGenericArgTypes(e,r.typeArguments,n)};let i=Su(e,r.type),a=this.getImplicitGenericTypeParameters(e,i.components);return a&&a.length>0?{...structuredClone(r),typeArguments:a.map(s=>n[s])}:r})}static getImplicitGenericTypeParameters(e,t,n){if(!Array.isArray(t))return null;let r=n??[];return t.forEach(i=>{let a=Su(e,i.type);if(oO.test(a.type)){r.push(a.typeId);return}Array.isArray(i.typeArguments)&&this.getImplicitGenericTypeParameters(e,i.typeArguments,r)}),r.length>0?r:null}getSignature(){let e=this.getArgSignaturePrefix(),t=this.getArgSignatureContent();return`${e}${t}`}getArgSignaturePrefix(){return Cb.test(this.type)?"s":xh.test(this.type)?"a":Ib.test(this.type)?"e":""}getArgSignatureContent(){if(this.type==="raw untyped ptr")return"rawptr";if(this.type==="raw untyped slice")return"rawslice";let e=Eb.exec(this.type)?.groups;if(e)return`str[${e.length}]`;if(this.components===null)return this.type;let t=xh.exec(this.type)?.groups;if(t)return`[${this.components[0].getSignature()};${t.length}]`;let n=this.originalTypeArguments!==null?`<${this.originalTypeArguments.map(i=>new Di(this.abi,i).getSignature()).join(",")}>`:"",r=`(${this.components.map(i=>i.getSignature()).join(",")})`;return`${n}${r}`}},wO=class extends ge{constructor(){super("void",xu,0)}encode(e){return new Uint8Array([])}decode(e,t){return[void 0,t]}};function wb(e,t){let{getCoder:n}=t;return e.reduce((r,i)=>{let a=r;return a[i.name]=n(i,t),a},{})}var Es=(e,t)=>{switch(e.type){case W1:case H1:case Z1:return new W(e.type);case X1:case $1:return new $("u64");case Y1:return new $("u256");case K1:return new gO;case j1:return new hO;case eO:return new te;case tO:return new fO;case rO:return new xb;case iO:return new Oh;case aO:return new Rb;case xu:return new wO;default:break}let n=Eb.exec(e.type)?.groups;if(n){let u=parseInt(n.length,10);return new _O(u)}let r=e.components,i=xh.exec(e.type)?.groups;if(i){let u=parseInt(i.length,10),d=r[0];if(!d)throw new v(x.INVALID_COMPONENT,"The provided Array type is missing an item of 'component'.");let p=Es(d);return new Ie(p,u)}if(e.type===nO){let u=vO(r),d=new Di(e.abi,u),p=Es(d,{encoding:Is});return new AO(p)}let a=e.type.match(cO)?.[0];if(Cb.test(e.type)&&a){let u=wb(r,{getCoder:Es});return new xs(a,u)}if(Ib.test(e.type)&&a){let u=wb(r,{getCoder:Es});return e.type===Yl?new Nb(a,u):new Tb(a,u)}if(sO.exec(e.type)?.groups){let u=r.map(d=>Es(d,{encoding:Is}));return new kb(u)}throw new v(x.CODER_NOT_FOUND,`Coder not found: ${JSON.stringify(e)}.`)};function bO(e=Is){switch(e){case Is:return Es;default:throw new v(x.UNSUPPORTED_ENCODING_VERSION,`Encoding version ${e} is unsupported.`)}}var ka=class{static getCoder(e,t,n={padToWordSize:!1}){let r=new Di(e,t);return bO(n.encoding)(r,n)}static encode(e,t,n,r){return this.getCoder(e,t,r).encode(n)}static decode(e,t,n,r,i){return this.getCoder(e,t,i).decode(n,r)}},EO=e=>{let{jsonAbi:t,inputs:n}=e,r=!1;return n.reduceRight((i,a)=>{let s=Su(t,a.type);return r=r||s.type!==xu&&!bb.test(s.type),[{...a,isOptional:!r},...i]},[])},CO=(e,t)=>{if(e.length>=t.length)return e;let n=e.slice();return n.length=t.length,n.fill(void 0,e.length),n},Nh=class{signature;selector;selectorBytes;encoding;name;jsonFn;attributes;jsonAbiOld;jsonFnOld;constructor(e,t){this.jsonFn=t,this.jsonAbiOld=e,this.jsonFnOld=e.functions.find(n=>n.name===t.name),this.name=t.name,this.signature=Nh.getSignature(this.jsonAbiOld,this.jsonFnOld),this.selector=Nh.getFunctionSelector(this.signature),this.selectorBytes=new Oh().encode(this.name),this.encoding=Bb(e.encoding),this.attributes=this.jsonFn.attributes??[]}static getSignature(e,t){let n=t.inputs.map(r=>new Di(e,r).getSignature());return`${t.name}(${n.join(",")})`}static getFunctionSelector(e){let t=tt(ir(e,"utf-8"));return I(t.slice(0,10)).toHex(8)}encodeArguments(e){let n=EO({jsonAbi:this.jsonAbiOld,inputs:this.jsonFnOld.inputs}).filter(a=>!a.isOptional).length;if(e.length<n)throw new v(x.ABI_TYPES_AND_VALUES_MISMATCH,`Invalid number of arguments. Expected a minimum of ${n} arguments, received ${e.length}`);let r=this.jsonFnOld.inputs.map(a=>ka.getCoder(this.jsonAbiOld,a,{encoding:this.encoding})),i=CO(e,this.jsonFn.inputs);return new kb(r).encode(i)}decodeArguments(e){let t=D(e),n=yO(this.jsonAbiOld,this.jsonFnOld.inputs);if(n.length===0){if(t.length===0)return;throw new v(x.DECODE_ERROR,`Types/values length mismatch during decode. ${JSON.stringify({count:{types:this.jsonFn.inputs.length,nonVoidInputs:n.length,values:t.length},value:{args:this.jsonFn.inputs,nonVoidInputs:n,values:t}})}`)}return this.jsonFnOld.inputs.reduce((i,a)=>{let s=ka.getCoder(this.jsonAbiOld,a,{encoding:this.encoding}),[o,c]=s.decode(t,i.offset);return{decoded:[...i.decoded,o],offset:i.offset+c}},{decoded:[],offset:0}).decoded}decodeOutput(e){let t=D(e);return ka.getCoder(this.jsonAbiOld,this.jsonFnOld.output,{encoding:this.encoding}).decode(t,0)}isReadOnly(){return!this.attributes.find(t=>t.name==="storage")?.arguments?.includes("write")}},IO=(e,t)=>e.find(n=>n.concreteTypeId===t),Ph=(e,t)=>e.concreteTypes.find(n=>n.concreteTypeId===t);function Dh(e,t,n){let r=Ph(e,n);if(r.metadataTypeId!==void 0)return r.metadataTypeId;let i=IO(t,n);return i?i.typeId:(t.push({typeId:t.length,type:r.type,components:Mh(r.components),concreteTypeId:n,typeParameters:r.typeParameters??null,originalConcreteTypeId:r?.concreteTypeId}),t.length-1)}function Ob(e,t,n){return n.typeArguments?.map(r=>{let i=Ph(e,r);return{name:"",type:isNaN(r)?Dh(e,t,r):r,typeArguments:Ob(e,t,i)}})??null}function Cs(e,t,n,r){let i=Dh(e,t,n),a=Ph(e,n);return{name:r??"",type:i,typeArguments:Ob(e,t,a)}}function Mh(e,t,n){return n?.map(r=>{let{typeId:i,name:a,typeArguments:s}=r,o=isNaN(i)?Dh(e,t,i):i;return{name:a,type:o,typeArguments:Mh(e,t,s)}})??null}function SO(e){if(!e.specVersion)return e;let t=[];e.metadataTypes.forEach(s=>{let o={typeId:s.metadataTypeId,type:s.type,components:s.components??(s.type==="()"?[]:null),typeParameters:s.typeParameters??null};t.push(o)}),t.forEach(s=>{s.components=Mh(e,t,s.components)});let n=e.functions.map(s=>{let o=s.inputs.map(({concreteTypeId:u,name:d})=>Cs(e,t,u,d)),c=Cs(e,t,s.output,"");return{...s,inputs:o,output:c}}),r=e.configurables.map(s=>({name:s.name,configurableType:Cs(e,t,s.concreteTypeId),offset:s.offset})),i=e.loggedTypes.map(s=>({logId:s.logId,loggedType:Cs(e,t,s.concreteTypeId)}));return{encoding:e.encodingVersion,types:t,functions:n,loggedTypes:i,messagesTypes:e.messagesTypes,configurables:r}}var Dn=class{functions;configurables;jsonAbi;encoding;jsonAbiOld;constructor(e){this.jsonAbi=e,this.encoding=Bb(e.encodingVersion),this.jsonAbiOld=SO(e),this.functions=Object.fromEntries(this.jsonAbi.functions.map(t=>[t.name,new Nh(this.jsonAbiOld,t)])),this.configurables=Object.fromEntries(this.jsonAbi.configurables.map(t=>[t.name,t]))}getFunction(e){let t=Object.values(this.functions).find(n=>n.name===e||n.signature===e||n.selector===e);if(t!==void 0)return t;throw new v(x.FUNCTION_NOT_FOUND,`function ${e} not found: ${JSON.stringify(t)}.`)}decodeFunctionResult(e,t){return(typeof e=="string"?this.getFunction(e):e).decodeOutput(t)}decodeLog(e,t){let n=this.jsonAbiOld.loggedTypes.find(r=>r.logId===t);if(!n)throw new v(x.LOG_TYPE_NOT_FOUND,`Log type with logId '${t}' doesn't exist in the ABI.`);return ka.decode(this.jsonAbiOld,n.loggedType,D(e),0,{encoding:this.encoding})}encodeConfigurable(e,t){let n=this.jsonAbiOld.configurables.find(r=>r.name===e);if(!n)throw new v(x.CONFIGURABLE_NOT_FOUND,`A configurable with the '${e}' was not found in the ABI.`);return ka.encode(this.jsonAbiOld,n.configurableType,t,{encoding:this.encoding})}encodeType(e,t){let n=Cs(this.jsonAbi,this.jsonAbiOld.types,e,"");return ka.encode(this.jsonAbiOld,n,t,{encoding:this.encoding})}decodeType(e,t){let n=Cs(this.jsonAbi,this.jsonAbiOld.types,e,"");return ka.decode(this.jsonAbiOld,n,t,0,{encoding:this.encoding})}};var Pb=class{},Kl=class{},xO=class{},Db=class extends xO{};var Rs=Bn(Qb(),1);Hl();var nd="fuel";function Uh(e){return Rs.bech32m.decode(e)}function ed(e){return Rs.bech32m.encode(nd,Rs.bech32m.toWords(D(L(e))))}function td(e){return typeof e=="string"&&e.indexOf(nd+1)===0&&Uh(e).prefix===nd}function Lh(e){return e.length===66&&/(0x)[0-9a-f]{64}$/i.test(e)}function Ub(e){return e.length===130&&/(0x)[0-9a-f]{128}$/i.test(e)}function Qh(e){return e.length===42&&/(0x)[0-9a-f]{40}$/i.test(e)}function qh(e){return new Uint8Array(Rs.bech32m.fromWords(Uh(e).words))}function qb(e){if(!td(e))throw new v(v.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`);return L(qh(e))}function kO(e){let{words:t}=Uh(e);return Rs.bech32m.encode(nd,t)}var Pa=e=>e instanceof Kl?e.address:e instanceof Db?e.id:e,BO=()=>L(Mt(32)),OO=e=>{let t;try{if(!Lh(e))throw new v(v.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`);t=qh(ed(e)),t=L(t.fill(0,0,12))}catch{throw new v(v.CODES.PARSE_FAILED,`Cannot generate EVM Address B256 from: ${e}.`)}return t},PO=e=>{if(!Qh(e))throw new v(v.CODES.INVALID_EVM_ADDRESS,"Invalid EVM address format.");return e.replace("0x","0x000000000000000000000000")},se=class extends Pb{bech32Address;constructor(e){if(super(),this.bech32Address=kO(e),!td(this.bech32Address))throw new v(v.CODES.INVALID_BECH32_ADDRESS,`Invalid Bech32 Address: ${e}.`)}toAddress(){return this.bech32Address}toB256(){return qb(this.bech32Address)}toBytes(){return qh(this.bech32Address)}toHexString(){return this.toB256()}toString(){return this.bech32Address}toJSON(){return this.bech32Address}toEvmAddress(){let e=qb(this.bech32Address);return{bits:OO(e)}}toAssetId(){return{bits:this.toB256()}}valueOf(){return this.bech32Address}equals(e){return this.bech32Address===e.bech32Address}static fromPublicKey(e){if(!Ub(e))throw new v(v.CODES.INVALID_PUBLIC_KEY,`Invalid Public Key: ${e}.`);let t=L(di(D(e)));return new se(ed(t))}static fromB256(e){if(!Lh(e))throw new v(v.CODES.INVALID_B256_ADDRESS,`Invalid B256 Address: ${e}.`);return new se(ed(e))}static fromRandom(){return this.fromB256(BO())}static fromString(e){return td(e)?new se(e):this.fromB256(e)}static fromAddressOrString(e){return typeof e=="string"?this.fromString(e):e}static fromDynamicInput(e){if(typeof e!="string"&&"toB256"in e)return se.fromB256(e.toB256());if(Ub(e))return se.fromPublicKey(e);if(td(e))return new se(e);if(Lh(e))return se.fromB256(e);if(Qh(e))return se.fromEvmAddress(e);throw new v(v.CODES.PARSE_FAILED,"Unknown address format: only 'Bech32', 'B256', or 'Public Key (512)' are supported.")}static fromEvmAddress(e){if(!Qh(e))throw new v(v.CODES.INVALID_EVM_ADDRESS,`Invalid Evm Address: ${e}.`);let t=PO(e);return new se(ed(t))}};var je=class extends ge{length;#e;constructor(e){let t=(8-e%8)%8,n=e+t;super("ByteArray",`[u64; ${n/4}]`,n),this.length=e,this.#e=t}encode(e){let t=[],n=D(e);return t.push(n),this.#e&&t.push(new Uint8Array(this.#e)),ie(t)}decode(e,t){let n,r=t;[n,r]=[L(e.slice(r,r+this.length)),r+this.length];let i=n;return this.#e&&([n,r]=[null,r+this.#e]),[i,r]}},Mi=class extends xs{constructor(){super("TxPointer",{blockHeight:new W("u32",{padToWordSize:!0}),txIndex:new W("u16",{padToWordSize:!0})})}static decodeFromGqlScalar(e){if(e.length!==12)throw new v(x.DECODE_ERROR,`Invalid TxPointer scalar string length ${e.length}. It must have length 12.`);let[t,n]=[e.substring(0,8),e.substring(8)];return{blockHeight:parseInt(t,16),txIndex:parseInt(n,16)}}},ye=(e=>(e[e.Coin=0]="Coin",e[e.Contract=1]="Contract",e[e.Message=2]="Message",e))(ye||{}),Jb=class extends ge{constructor(){super("InputCoin","struct InputCoin",0)}encode(e){let t=[];return t.push(new te().encode(e.txID)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputIndex)),t.push(new te().encode(e.owner)),t.push(new $("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),t.push(new Mi().encode(e.txPointer)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new $("u64").encode(e.predicateGasUsed)),t.push(new $("u64").encode(e.predicateLength)),t.push(new $("u64").encode(e.predicateDataLength)),t.push(new je(e.predicateLength.toNumber()).encode(e.predicate)),t.push(new je(e.predicateDataLength.toNumber()).encode(e.predicateData)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new te().decode(e,r);let s=n;[n,r]=new $("u64").decode(e,r);let o=n;[n,r]=new te().decode(e,r);let c=n;[n,r]=new Mi().decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=Number(n);[n,r]=new $("u64").decode(e,r);let p=n;[n,r]=new $("u64").decode(e,r);let h=n;[n,r]=new $("u64").decode(e,r);let _=n;[n,r]=new je(h.toNumber()).decode(e,r);let w=n;return[n,r]=new je(_.toNumber()).decode(e,r),[{type:0,txID:i,outputIndex:a,owner:s,amount:o,assetId:c,txPointer:u,witnessIndex:d,predicateGasUsed:p,predicateLength:h,predicateDataLength:_,predicate:w,predicateData:n},r]}},rd=class extends ge{constructor(){super("InputContract","struct InputContract",0)}encode(e){let t=[];return t.push(new te().encode(e.txID)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputIndex)),t.push(new te().encode(e.balanceRoot)),t.push(new te().encode(e.stateRoot)),t.push(new Mi().encode(e.txPointer)),t.push(new te().encode(e.contractID)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new te().decode(e,r);let s=n;[n,r]=new te().decode(e,r);let o=n;[n,r]=new Mi().decode(e,r);let c=n;return[n,r]=new te().decode(e,r),[{type:1,txID:i,outputIndex:a,balanceRoot:s,stateRoot:o,txPointer:c,contractID:n},r]}},Or=class extends ge{constructor(){super("InputMessage","struct InputMessage",0)}static getMessageId(e){let t=[];return t.push(new je(32).encode(e.sender)),t.push(new je(32).encode(e.recipient)),t.push(new je(32).encode(e.nonce)),t.push(new $("u64").encode(e.amount)),t.push(D(e.data||"0x")),tt(ie(t))}static encodeData(e){let t=D(e||"0x"),n=t.length;return new je(n).encode(t)}encode(e){let t=[],n=Or.encodeData(e.data);return t.push(new je(32).encode(e.sender)),t.push(new je(32).encode(e.recipient)),t.push(new $("u64").encode(e.amount)),t.push(new je(32).encode(e.nonce)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new $("u64").encode(e.predicateGasUsed)),t.push(new $("u64").encode(n.length)),t.push(new $("u64").encode(e.predicateLength)),t.push(new $("u64").encode(e.predicateDataLength)),t.push(new je(n.length).encode(n)),t.push(new je(e.predicateLength.toNumber()).encode(e.predicate)),t.push(new je(e.predicateDataLength.toNumber()).encode(e.predicateData)),ie(t)}static decodeData(e){let t=D(e),n=t.length,[r]=new je(n).decode(t,0);return D(r)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new $("u64").decode(e,r);let s=n;[n,r]=new te().decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=Number(n);[n,r]=new $("u64").decode(e,r);let u=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new $("u64").decode(e,r);let p=n;[n,r]=new $("u64").decode(e,r);let h=n;[n,r]=new je(d).decode(e,r);let _=n;[n,r]=new je(p.toNumber()).decode(e,r);let w=n;return[n,r]=new je(h.toNumber()).decode(e,r),[{type:2,sender:i,recipient:a,amount:s,witnessIndex:c,nonce:o,predicateGasUsed:u,dataLength:d,predicateLength:p,predicateDataLength:h,data:_,predicate:w,predicateData:n},r]}},Pr=class extends ge{constructor(){super("Input","struct Input",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(n){case 0:{t.push(new Jb().encode(e));break}case 1:{t.push(new rd().encode(e));break}case 2:{t.push(new Or().encode(e));break}default:throw new v(x.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${n}.`)}return ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new Jb().decode(e,r),[n,r];case 1:return[n,r]=new rd().decode(e,r),[n,r];case 2:return[n,r]=new Or().decode(e,r),[n,r];default:throw new v(x.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${i}.`)}}},ve=(e=>(e[e.Coin=0]="Coin",e[e.Contract=1]="Contract",e[e.Change=2]="Change",e[e.Variable=3]="Variable",e[e.ContractCreated=4]="ContractCreated",e))(ve||{}),Vb=class extends ge{constructor(){super("OutputCoin","struct OutputCoin",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new $("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new $("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:0,to:i,amount:a,assetId:n},r]}},id=class extends ge{constructor(){super("OutputContract","struct OutputContract",0)}encode(e){let t=[];return t.push(new W("u8",{padToWordSize:!0}).encode(e.inputIndex)),t.push(new te().encode(e.balanceRoot)),t.push(new te().encode(e.stateRoot)),ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:1,inputIndex:i,balanceRoot:a,stateRoot:n},r]}},zb=class extends ge{constructor(){super("OutputChange","struct OutputChange",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new $("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new $("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:2,to:i,amount:a,assetId:n},r]}},Gb=class extends ge{constructor(){super("OutputVariable","struct OutputVariable",0)}encode(e){let t=[];return t.push(new te().encode(e.to)),t.push(new $("u64").encode(e.amount)),t.push(new te().encode(e.assetId)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new $("u64").decode(e,r);let a=n;return[n,r]=new te().decode(e,r),[{type:3,to:i,amount:a,assetId:n},r]}},Wb=class extends ge{constructor(){super("OutputContractCreated","struct OutputContractCreated",0)}encode(e){let t=[];return t.push(new te().encode(e.contractId)),t.push(new te().encode(e.stateRoot)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;return[n,r]=new te().decode(e,r),[{type:4,contractId:i,stateRoot:n},r]}},Dr=class extends ge{constructor(){super("Output"," struct Output",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(n){case 0:{t.push(new Vb().encode(e));break}case 1:{t.push(new id().encode(e));break}case 2:{t.push(new zb().encode(e));break}case 3:{t.push(new Gb().encode(e));break}case 4:{t.push(new Wb().encode(e));break}default:throw new v(x.INVALID_TRANSACTION_OUTPUT,`Invalid transaction output type: ${n}.`)}return ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new Vb().decode(e,r),[n,r];case 1:return[n,r]=new id().decode(e,r),[n,r];case 2:return[n,r]=new zb().decode(e,r),[n,r];case 3:return[n,r]=new Gb().decode(e,r),[n,r];case 4:return[n,r]=new Wb().decode(e,r),[n,r];default:throw new v(x.INVALID_TRANSACTION_OUTPUT,`Invalid transaction output type: ${i}.`)}}},sn=(e=>(e[e.Tip=1]="Tip",e[e.WitnessLimit=2]="WitnessLimit",e[e.Maturity=4]="Maturity",e[e.MaxFee=8]="MaxFee",e))(sn||{}),DO=e=>e.sort((t,n)=>t.type-n.type);function MO(e){let t=new Set;e.forEach(n=>{if(t.has(n.type))throw new v(x.DUPLICATED_POLICY,"Duplicate policy type found: 8");t.add(n.type)})}var Mr=class extends ge{constructor(){super("Policies","array Policy",0)}encode(e){MO(e);let t=DO(e),n=[];return t.forEach(({data:r,type:i})=>{switch(i){case 8:case 1:case 2:n.push(new $("u64").encode(r));break;case 4:n.push(new W("u32",{padToWordSize:!0}).encode(r));break;default:throw new v(x.INVALID_POLICY_TYPE,`Invalid policy type: ${i}`)}}),ie(n)}decode(e,t,n){let r=t,i=[];if(n&1){let[a,s]=new $("u64").decode(e,r);r=s,i.push({type:1,data:a})}if(n&2){let[a,s]=new $("u64").decode(e,r);r=s,i.push({type:2,data:a})}if(n&4){let[a,s]=new W("u32",{padToWordSize:!0}).decode(e,r);r=s,i.push({type:4,data:a})}if(n&8){let[a,s]=new $("u64").decode(e,r);r=s,i.push({type:8,data:a})}return[i,r]}},le=(e=>(e[e.Call=0]="Call",e[e.Return=1]="Return",e[e.ReturnData=2]="ReturnData",e[e.Panic=3]="Panic",e[e.Revert=4]="Revert",e[e.Log=5]="Log",e[e.LogData=6]="LogData",e[e.Transfer=7]="Transfer",e[e.TransferOut=8]="TransferOut",e[e.ScriptResult=9]="ScriptResult",e[e.MessageOut=10]="MessageOut",e[e.Mint=11]="Mint",e[e.Burn=12]="Burn",e))(le||{});var Jh=(e,t)=>{let n=D(e),r=D(t);return tt(ie([n,r]))};var Hb=class extends xs{constructor(){super("StorageSlot",{key:new te,value:new te})}},Zb=class extends ge{constructor(){super("UpgradePurpose","UpgradePurpose",0)}encode(e){let t=[],{type:n}=e;switch(t.push(new W("u8",{padToWordSize:!0}).encode(n)),n){case 0:{let r=e.data;t.push(new W("u16",{padToWordSize:!0}).encode(r.witnessIndex)),t.push(new te().encode(r.checksum));break}case 1:{let r=e.data;t.push(new te().encode(r.bytecodeRoot));break}default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${n}`)}return ie(t)}decode(e,t){let n=t,r;[r,n]=new W("u8",{padToWordSize:!0}).decode(e,n);let i=r;switch(i){case 0:{[r,n]=new W("u16",{padToWordSize:!0}).decode(e,n);let a=r;return[r,n]=new te().decode(e,n),[{type:i,data:{witnessIndex:a,checksum:r}},n]}case 1:return[r,n]=new te().decode(e,n),[{type:i,data:{bytecodeRoot:r}},n];default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${i}`)}}},Fr=class extends ge{constructor(){super("Witness","unknown",0)}encode(e){let t=[];return t.push(new W("u32",{padToWordSize:!0}).encode(e.dataLength)),t.push(new je(e.dataLength).encode(e.data)),ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let i=n;return[n,r]=new je(i).decode(e,r),[{dataLength:i,data:n},r]}},Ve=(e=>(e[e.Script=0]="Script",e[e.Create=1]="Create",e[e.Mint=2]="Mint",e[e.Upgrade=3]="Upgrade",e[e.Upload=4]="Upload",e[e.Blob=5]="Blob",e))(Ve||{}),Xb=class extends ge{constructor(){super("TransactionScript","struct TransactionScript",0)}encode(e){let t=[];return t.push(new $("u64").encode(e.scriptGasLimit)),t.push(new te().encode(e.receiptsRoot)),t.push(new $("u64").encode(e.scriptLength)),t.push(new $("u64").encode(e.scriptDataLength)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new je(e.scriptLength.toNumber()).encode(e.script)),t.push(new je(e.scriptDataLength.toNumber()).encode(e.scriptData)),t.push(new Mr().encode(e.policies)),t.push(new Ie(new Pr,e.inputsCount).encode(e.inputs)),t.push(new Ie(new Dr,e.outputsCount).encode(e.outputs)),t.push(new Ie(new Fr,e.witnessesCount).encode(e.witnesses)),ie(t)}decode(e,t){let n,r=t;[n,r]=new $("u64").decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new $("u64").decode(e,r);let s=n;[n,r]=new $("u64").decode(e,r);let o=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let p=n;[n,r]=new je(s.toNumber()).decode(e,r);let h=n;[n,r]=new je(o.toNumber()).decode(e,r);let _=n;[n,r]=new Mr().decode(e,r,c);let w=n;[n,r]=new Ie(new Pr,u).decode(e,r);let A=n;[n,r]=new Ie(new Dr,d).decode(e,r);let S=n;return[n,r]=new Ie(new Fr,p).decode(e,r),[{type:0,scriptGasLimit:i,scriptLength:s,scriptDataLength:o,policyTypes:c,inputsCount:u,outputsCount:d,witnessesCount:p,receiptsRoot:a,script:h,scriptData:_,policies:w,inputs:A,outputs:S,witnesses:n},r]}},Yb=class extends ge{constructor(){super("TransactionCreate","struct TransactionCreate",0)}encode(e){let t=[];return t.push(new W("u16",{padToWordSize:!0}).encode(e.bytecodeWitnessIndex)),t.push(new te().encode(e.salt)),t.push(new $("u64").encode(e.storageSlotsCount)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new Ie(new Hb,e.storageSlotsCount.toNumber()).encode(e.storageSlots)),t.push(new Mr().encode(e.policies)),t.push(new Ie(new Pr,e.inputsCount).encode(e.inputs)),t.push(new Ie(new Dr,e.outputsCount).encode(e.outputs)),t.push(new Ie(new Fr,e.witnessesCount).encode(e.witnesses)),ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let i=n;[n,r]=new te().decode(e,r);let a=n;[n,r]=new $("u64").decode(e,r);let s=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new Ie(new Hb,s.toNumber()).decode(e,r);let p=n;[n,r]=new Mr().decode(e,r,o);let h=n;[n,r]=new Ie(new Pr,c).decode(e,r);let _=n;[n,r]=new Ie(new Dr,u).decode(e,r);let w=n;return[n,r]=new Ie(new Fr,d).decode(e,r),[{type:1,bytecodeWitnessIndex:i,policyTypes:o,storageSlotsCount:s,inputsCount:c,outputsCount:u,witnessesCount:d,salt:a,policies:h,storageSlots:p,inputs:_,outputs:w,witnesses:n},r]}},$b=class extends ge{constructor(){super("TransactionMint","struct TransactionMint",0)}encode(e){let t=[];return t.push(new Mi().encode(e.txPointer)),t.push(new rd().encode(e.inputContract)),t.push(new id().encode(e.outputContract)),t.push(new $("u64").encode(e.mintAmount)),t.push(new te().encode(e.mintAssetId)),t.push(new $("u64").encode(e.gasPrice)),ie(t)}decode(e,t){let n,r=t;[n,r]=new Mi().decode(e,r);let i=n;[n,r]=new rd().decode(e,r);let a=n;[n,r]=new id().decode(e,r);let s=n;[n,r]=new $("u64").decode(e,r);let o=n;[n,r]=new te().decode(e,r);let c=n;return[n,r]=new $("u64").decode(e,r),[{type:2,txPointer:i,inputContract:a,outputContract:s,mintAmount:o,mintAssetId:c,gasPrice:n},r]}},Kb=class extends ge{constructor(){super("TransactionUpgrade","struct TransactionUpgrade",0)}encode(e){let t=[];return t.push(new Zb().encode(e.upgradePurpose)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new Mr().encode(e.policies)),t.push(new Ie(new Pr,e.inputsCount).encode(e.inputs)),t.push(new Ie(new Dr,e.outputsCount).encode(e.outputs)),t.push(new Ie(new Fr,e.witnessesCount).encode(e.witnesses)),ie(t)}decode(e,t){let n,r=t;[n,r]=new Zb().decode(e,r);let i=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new Mr().decode(e,r,a);let u=n;[n,r]=new Ie(new Pr,s).decode(e,r);let d=n;[n,r]=new Ie(new Dr,o).decode(e,r);let p=n;return[n,r]=new Ie(new Fr,c).decode(e,r),[{type:3,upgradePurpose:i,policyTypes:a,inputsCount:s,outputsCount:o,witnessesCount:c,policies:u,inputs:d,outputs:p,witnesses:n},r]}},jb=class extends ge{constructor(){super("TransactionUpload","struct TransactionUpload",0)}encode(e){let t=[];return t.push(new te().encode(e.root)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new W("u16",{padToWordSize:!0}).encode(e.subsectionIndex)),t.push(new W("u16",{padToWordSize:!0}).encode(e.subsectionsNumber)),t.push(new W("u16",{padToWordSize:!0}).encode(e.proofSetCount)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new Ie(new te,e.proofSetCount).encode(e.proofSet)),t.push(new Mr().encode(e.policies)),t.push(new Ie(new Pr,e.inputsCount).encode(e.inputs)),t.push(new Ie(new Dr,e.outputsCount).encode(e.outputs)),t.push(new Ie(new Fr,e.witnessesCount).encode(e.witnesses)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let d=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let p=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let h=n;[n,r]=new Ie(new te,c).decode(e,r);let _=n;[n,r]=new Mr().decode(e,r,u);let w=n;[n,r]=new Ie(new Pr,d).decode(e,r);let A=n;[n,r]=new Ie(new Dr,p).decode(e,r);let S=n;return[n,r]=new Ie(new Fr,h).decode(e,r),[{type:4,root:i,witnessIndex:a,subsectionIndex:s,subsectionsNumber:o,proofSetCount:c,policyTypes:u,inputsCount:d,outputsCount:p,witnessesCount:h,proofSet:_,policies:w,inputs:A,outputs:S,witnesses:n},r]}},eE=class extends ge{constructor(){super("TransactionBlob","struct TransactionBlob",0)}encode(e){let t=[];return t.push(new te().encode(e.blobId)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessIndex)),t.push(new W("u32",{padToWordSize:!0}).encode(e.policyTypes)),t.push(new W("u16",{padToWordSize:!0}).encode(e.inputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.outputsCount)),t.push(new W("u16",{padToWordSize:!0}).encode(e.witnessesCount)),t.push(new Mr().encode(e.policies)),t.push(new Ie(new Pr,e.inputsCount).encode(e.inputs)),t.push(new Ie(new Dr,e.outputsCount).encode(e.outputs)),t.push(new Ie(new Fr,e.witnessesCount).encode(e.witnesses)),ie(t)}decode(e,t){let n,r=t;[n,r]=new te().decode(e,r);let i=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let a=n;[n,r]=new W("u32",{padToWordSize:!0}).decode(e,r);let s=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let o=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let c=n;[n,r]=new W("u16",{padToWordSize:!0}).decode(e,r);let u=n;[n,r]=new Mr().decode(e,r,s);let d=n;[n,r]=new Ie(new Pr,o).decode(e,r);let p=n;[n,r]=new Ie(new Dr,c).decode(e,r);let h=n;return[n,r]=new Ie(new Fr,u).decode(e,r),[{type:5,blobId:i,witnessIndex:a,policyTypes:s,inputsCount:o,outputsCount:c,witnessesCount:u,policies:d,inputs:p,outputs:h,witnesses:n},r]}},An=class extends ge{constructor(){super("Transaction","struct Transaction",0)}encode(e){let t=[];t.push(new W("u8",{padToWordSize:!0}).encode(e.type));let{type:n}=e;switch(e.type){case 0:{t.push(new Xb().encode(e));break}case 1:{t.push(new Yb().encode(e));break}case 2:{t.push(new $b().encode(e));break}case 3:{t.push(new Kb().encode(e));break}case 4:{t.push(new jb().encode(e));break}case 5:{t.push(new eE().encode(e));break}default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${n}`)}return ie(t)}decode(e,t){let n,r=t;[n,r]=new W("u8",{padToWordSize:!0}).decode(e,r);let i=n;switch(i){case 0:return[n,r]=new Xb().decode(e,r),[n,r];case 1:return[n,r]=new Yb().decode(e,r),[n,r];case 2:return[n,r]=new $b().decode(e,r),[n,r];case 3:return[n,r]=new Kb().decode(e,r),[n,r];case 4:return[n,r]=new jb().decode(e,r),[n,r];case 5:return[n,r]=new eE().decode(e,r),[n,r];default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${i}`)}}};Os();var AC=Bn(cm(),1);var ku=function(){return ku=Object.assign||function(t){for(var n,r=1,i=arguments.length;r<i;r++){n=arguments[r];for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(t[a]=n[a])}return t},ku.apply(this,arguments)};var Ad=new Map,fm=new Map,s0=!0,yd=!1;function o0(e){return e.replace(/[\s,]+/g," ").trim()}function yP(e){return o0(e.source.body.substring(e.start,e.end))}function vP(e){var t=new Set,n=[];return e.definitions.forEach(function(r){if(r.kind==="FragmentDefinition"){var i=r.name.value,a=yP(r.loc),s=fm.get(i);s&&!s.has(a)?s0&&console.warn("Warning: fragment with name "+i+` already exists.
24
+ graphql-tag enforces all fragment names across your application to be unique; read more about
25
+ this in the docs: http://dev.apollodata.com/core/fragments.html#unique-names`):s||fm.set(i,s=new Set),s.add(a),t.has(a)||(t.add(a),n.push(r))}else n.push(r)}),ku(ku({},e),{definitions:n})}function wP(e){var t=new Set(e.definitions);t.forEach(function(r){r.loc&&delete r.loc,Object.keys(r).forEach(function(i){var a=r[i];a&&typeof a=="object"&&t.add(a)})});var n=e.loc;return n&&(delete n.startToken,delete n.endToken),e}function bP(e){var t=o0(e);if(!Ad.has(t)){var n=rb(e,{experimentalFragmentVariables:yd,allowLegacyFragmentVariables:yd});if(!n||n.kind!=="Document")throw new Error("Not a valid GraphQL document.");Ad.set(t,wP(vP(n)))}return Ad.get(t)}function Ls(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];typeof e=="string"&&(e=[e]);var r=e[0];return t.forEach(function(i,a){i&&i.kind==="Document"?r+=i.loc.source.body:r+=i,r+=e[a+1]}),bP(r)}function EP(){Ad.clear(),fm.clear()}function CP(){s0=!1}function IP(){yd=!0}function SP(){yd=!1}var Bu={gql:Ls,resetCaches:EP,disableFragmentWarnings:CP,enableExperimentalFragmentVariables:IP,disableExperimentalFragmentVariables:SP};(function(e){e.gql=Bu.gql,e.resetCaches=Bu.resetCaches,e.disableFragmentWarnings=Bu.disableFragmentWarnings,e.enableExperimentalFragmentVariables=Bu.enableExperimentalFragmentVariables,e.disableExperimentalFragmentVariables=Bu.disableExperimentalFragmentVariables})(Ls||(Ls={}));Ls.default=Ls;var j=Ls;var Te="0x0000000000000000000000000000000000000000000000000000000000000000";var H$=1024*1024*1024,Z$=1024*1024*1024;var X$=1024*1024,Y$=1024*1024,c0="0xffffffffffff0000",vd="0xffffffffffff0001",u0="0xffffffffffff0003",l0="0xffffffffffff0004",d0="0xffffffffffff0005";var f0=["UnknownPanicReason","Revert","OutOfGas","TransactionValidity","MemoryOverflow","ArithmeticOverflow","ContractNotFound","MemoryOwnership","NotEnoughBalance","ExpectedInternalContext","AssetIdNotFound","InputNotFound","OutputNotFound","WitnessNotFound","TransactionMaturity","InvalidMetadataIdentifier","MalformedCallStructure","ReservedRegisterNotWritable","InvalidFlags","InvalidImmediateValue","ExpectedCoinInput","EcalError","MemoryWriteOverlap","ContractNotInInputs","InternalBalanceOverflow","ContractMaxSize","ExpectedUnallocatedStack","MaxStaticContractsReached","TransferAmountCannotBeZero","ExpectedOutputVariable","ExpectedParentInternalContext","PredicateReturnedNonOne","ContractIdAlreadyDeployed","ContractMismatch","MessageDataTooLong","ArithmeticError","ContractInstructionNotAllowed","TransferZeroCoins","InvalidInstruction","MemoryNotExecutable","PolicyIsNotSet","PolicyNotFound","TooManyReceipts","BalanceOverflow","InvalidBlockHeight","TooManySlots","ExpectedNestedCaller","MemoryGrowthOverlap","UninitalizedMemoryAccess","OverridingConsensusParameters","UnknownStateTransactionBytecodeRoot","OverridingStateTransactionBytecode","BytecodeAlreadyUploaded","ThePartIsNotSequentiallyConnected","BlobIdAlreadyUploaded","BlobNotFound","GasCostNotDefined"],p0="https://docs.rs/fuel-asm/latest/fuel_asm/enum.PanicReason.html";var $t=Bn(Du(),1);j0();import{EventEmitter as p6}from"events";var p4="0xe3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",h4=class{left;right;parent;hash;data;index;constructor(e,t,n,r,i,a=0){this.left=e,this.right=t,this.parent=n,this.hash=r,this.data=i,this.index=a}},eC=h4;function m4(e){return an("0x00".concat(e.slice(2)))}function g4(e,t){return an("0x01".concat(e.slice(2)).concat(t.slice(2)))}function __(e){if(!e.length)return p4;let t=[];for(let a=0;a<e.length;a+=1){let s=m4(e[a]);t.push(new eC(-1,-1,-1,s,e[a]))}let n=t,r=t.length+1>>1,i=t.length&1;for(;;){let a=0;for(;a<r-i;a+=1){let s=a<<1,o=g4(n[s].hash,n[s+1].hash);t[a]=new eC(n[s].index,n[s+1].index,-1,o,"")}if(i===1&&(t[a]=n[a<<1]),r===1)break;i=r&1,r=r+1>>1,n=t}return t[0].hash}var _4="0x00",tC="0x01";function A4(e,t){let n="0x00".concat(e.slice(2)).concat(an(t).slice(2));return[an(n),n]}function Xs(e,t){let n="0x01".concat(e.slice(2)).concat(t.slice(2));return[an(n),n]}function m_(e){let t=tC.length;return["0x".concat(e.slice(t,t+64)),"0x".concat(e.slice(t+64))]}function y4(e){let t=tC.length;return["0x".concat(e.slice(t,t+64)),"0x".concat(e.slice(t+64))]}function g_(e){return e.slice(0,4)===_4}var v4=class{SideNodes;NonMembershipLeafData;BitMask;NumSideNodes;SiblingData;constructor(e,t,n,r,i){this.SideNodes=e,this.NonMembershipLeafData=t,this.BitMask=n,this.NumSideNodes=r,this.SiblingData=i}},w4=v4,b4=class{SideNodes;NonMembershipLeafData;SiblingData;constructor(e,t,n){this.SideNodes=e,this.NonMembershipLeafData=t,this.SiblingData=n}},E4=b4,wn="0x0000000000000000000000000000000000000000000000000000000000000000",gi=256;function Ys(e,t){let n=e.slice(2),r="0x".concat(n.slice(Math.floor(t/8)*2,Math.floor(t/8)*2+2));return(Number(r)&1<<8-1-t%8)>0?1:0}function C4(e){let t=0,n=e.length-1,r=e;for(;t<n;)[r[t],r[n]]=[r[n],r[t]],t+=1,n-=1;return r}function I4(e,t){let n=0;for(let r=0;r<gi&&Ys(e,r)===Ys(t,r);r+=1)n+=1;return n}function S4(e){let t=[],n=[],r;for(let a=0;a<e.SideNodes.length;a+=1)r=e.SideNodes[a],r===wn?t.push(0):(n.push(r),t.push(1));return new w4(n,e.NonMembershipLeafData,t,e.SideNodes.length,e.SiblingData)}var nC=class{ms;root;constructor(){let e={};this.ms=e,this.root=wn,this.ms[this.root]=wn}get(e){return this.ms[e]}set(e,t){this.ms[e]=t}setRoot(e){this.root=e}sideNodesForRoot(e,t){let n=[];if(t===wn)return[n,wn,"",""];let r=this.get(t);if(g_(r))return[n,t,r,""];let i,a,s="",o="";for(let u=0;u<gi;u+=1){if([i,a]=y4(r),Ys(e,u)===1?(o=i,s=a):(o=a,s=i),n.push(o),s===wn){r="";break}if(r=this.get(s),g_(r))break}let c=this.get(o);return[C4(n),s,r,c]}deleteWithSideNodes(e,t,n,r){if(n===wn)return this.root;let[i]=m_(r);if(i!==e)return this.root;let a="",s="",o="",c="",u=!1;for(let d=0;d<t.length;d+=1)if(t[d]!==""){if(o=t[d],s==="")if(c=this.get(o),g_(c)){a=o,s=o;continue}else s=wn,u=!0;!u&&o===wn||(u||(u=!0),Ys(e,t.length-1-d)===1?[a,s]=Xs(o,s):[a,s]=Xs(s,o),this.set(a,s),s=a)}return a===""&&(a=wn),a}updateWithSideNodes(e,t,n,r,i){let a,s;this.set(an(t),t),[a,s]=A4(e,t),this.set(a,s),s=a;let o;if(r===wn)o=gi;else{let[c]=m_(i);o=I4(e,c)}o!==gi&&(Ys(e,o)===1?[a,s]=Xs(r,s):[a,s]=Xs(s,r),this.set(a,s),s=a);for(let c=0;c<gi;c+=1){let u,d=gi-n.length;if(c-d<0||n[c-d]==="")if(o!==gi&&o>gi-1-c)u=wn;else continue;else u=n[c-d];Ys(e,gi-1-c)===1?[a,s]=Xs(u,s):[a,s]=Xs(s,u),this.set(a,s),s=a}return a}update(e,t){let[n,r,i]=this.sideNodesForRoot(e,this.root),a=this.updateWithSideNodes(e,t,n,r,i);this.setRoot(a)}delete(e){let[t,n,r]=this.sideNodesForRoot(e,this.root),i=this.deleteWithSideNodes(e,t,n,r);this.setRoot(i)}prove(e){let[t,n,r,i]=this.sideNodesForRoot(e,this.root),a=[];for(let c=0;c<t.length;c+=1)t[c]!==""&&a.push(t[c]);let s="";if(n!==wn){let[c]=m_(r);c!==e&&(s=r)}return new E4(a,s,i)}proveCompacted(e){let t=this.prove(e);return S4(t)}};import{EventEmitter as _6}from"events";var x4=Object.defineProperty,T4=(e,t,n)=>t in e?x4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,nt=(e,t,n)=>(T4(e,typeof t!="symbol"?t+"":t,n),n),R_=(e,t,n)=>{if(!t.has(e))throw TypeError("Cannot "+n)},Ke=(e,t,n)=>(R_(e,t,"read from private field"),n?n.call(e):t.get(e)),Gi=(e,t,n)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,n)},or=(e,t,n,r)=>(R_(e,t,"write to private field"),r?r.call(e,n):t.set(e,n),n),b_=(e,t,n)=>(R_(e,t,"access private method"),n),Rd=e=>{let t,n,r;Array.isArray(e)?(n=e[0],t=e[1],r=e[2]??void 0):(n=e.amount,t=e.assetId,r=e.max??void 0);let i=I(n);return{assetId:L(t),amount:i.lt(1)?I(1):i,max:r?I(r):void 0}},N4=e=>{let{amount:t,assetId:n}=e,r=[...e.coinQuantities],i=r.findIndex(a=>a.assetId===n);return i!==-1?r[i].amount=r[i].amount.add(t):r.push({assetId:n,amount:t}),r},yC=j`
26
+ fragment SubmittedStatusFragment on SubmittedStatus {
27
+ type: __typename
28
+ time
29
+ }
30
+ `,k_=j`
31
+ fragment receiptFragment on Receipt {
32
+ id
33
+ pc
34
+ is
35
+ to
36
+ toAddress
37
+ amount
38
+ assetId
39
+ gas
40
+ param1
41
+ param2
42
+ val
43
+ ptr
44
+ digest
45
+ reason
46
+ ra
47
+ rb
48
+ rc
49
+ rd
50
+ len
51
+ receiptType
52
+ result
53
+ gasUsed
54
+ data
55
+ sender
56
+ recipient
57
+ nonce
58
+ contractId
59
+ subId
60
+ }
61
+ `,vC=j`
62
+ fragment SuccessStatusFragment on SuccessStatus {
63
+ type: __typename
64
+ block {
65
+ id
66
+ }
67
+ time
68
+ programState {
69
+ returnType
70
+ data
71
+ }
72
+ receipts {
73
+ ...receiptFragment
74
+ }
75
+ totalGas
76
+ totalFee
77
+ }
78
+ ${k_}`,R4=j`
79
+ fragment malleableTransactionFieldsFragment on Transaction {
80
+ receiptsRoot
81
+ inputs {
82
+ type: __typename
83
+ ... on InputCoin {
84
+ txPointer
85
+ }
86
+ ... on InputContract {
87
+ txPointer
88
+ }
89
+ }
90
+ outputs {
91
+ type: __typename
92
+ ... on CoinOutput {
93
+ to
94
+ amount
95
+ assetId
96
+ }
97
+ ... on ContractOutput {
98
+ inputIndex
99
+ balanceRoot
100
+ stateRoot
101
+ }
102
+ ... on ChangeOutput {
103
+ to
104
+ amount
105
+ assetId
106
+ }
107
+ ... on VariableOutput {
108
+ to
109
+ amount
110
+ assetId
111
+ }
112
+ ... on ContractCreated {
113
+ contract
114
+ stateRoot
115
+ }
116
+ }
117
+ }
118
+ `,wC=j`
119
+ fragment FailureStatusFragment on FailureStatus {
120
+ type: __typename
121
+ block {
122
+ id
123
+ }
124
+ totalGas
125
+ totalFee
126
+ time
127
+ reason
128
+ receipts {
129
+ ...receiptFragment
130
+ }
131
+ }
132
+ ${k_}`,bC=j`
133
+ fragment SqueezedOutStatusFragment on SqueezedOutStatus {
134
+ type: __typename
135
+ reason
136
+ }
137
+ `,B_=j`
138
+ fragment transactionStatusSubscriptionFragment on TransactionStatus {
139
+ ... on SubmittedStatus {
140
+ ...SubmittedStatusFragment
141
+ }
142
+ ... on SuccessStatus {
143
+ ...SuccessStatusFragment
144
+ transaction {
145
+ ...malleableTransactionFieldsFragment
146
+ }
147
+ }
148
+ ... on FailureStatus {
149
+ ...FailureStatusFragment
150
+ transaction {
151
+ ...malleableTransactionFieldsFragment
152
+ }
153
+ }
154
+ ... on SqueezedOutStatus {
155
+ ...SqueezedOutStatusFragment
156
+ }
157
+ }
158
+ ${yC}
159
+ ${vC}
160
+ ${R4}
161
+ ${wC}
162
+ ${bC}`,k4=j`
163
+ fragment transactionStatusFragment on TransactionStatus {
164
+ ... on SubmittedStatus {
165
+ ...SubmittedStatusFragment
166
+ }
167
+ ... on SuccessStatus {
168
+ ...SuccessStatusFragment
169
+ }
170
+ ... on FailureStatus {
171
+ ...FailureStatusFragment
172
+ }
173
+ ... on SqueezedOutStatus {
174
+ ...SqueezedOutStatusFragment
175
+ }
176
+ }
177
+ ${yC}
178
+ ${vC}
179
+ ${wC}
180
+ ${bC}`,Uu=j`
181
+ fragment transactionFragment on Transaction {
182
+ id
183
+ rawPayload
184
+ status {
185
+ ...transactionStatusFragment
186
+ }
187
+ }
188
+ ${k4}`,B4=j`
189
+ fragment inputEstimatePredicatesFragment on Input {
190
+ ... on InputCoin {
191
+ predicateGasUsed
192
+ }
193
+ ... on InputMessage {
194
+ predicateGasUsed
195
+ }
196
+ }
197
+ `,O4=j`
198
+ fragment transactionEstimatePredicatesFragment on Transaction {
199
+ inputs {
200
+ ...inputEstimatePredicatesFragment
201
+ }
202
+ }
203
+ ${B4}`,P4=j`
204
+ fragment dryRunFailureStatusFragment on DryRunFailureStatus {
205
+ type: __typename
206
+ totalGas
207
+ totalFee
208
+ reason
209
+ programState {
210
+ returnType
211
+ data
212
+ }
213
+ }
214
+ `,D4=j`
215
+ fragment dryRunSuccessStatusFragment on DryRunSuccessStatus {
216
+ type: __typename
217
+ totalGas
218
+ totalFee
219
+ programState {
220
+ returnType
221
+ data
222
+ }
223
+ }
224
+ `,M4=j`
225
+ fragment dryRunTransactionStatusFragment on DryRunTransactionStatus {
226
+ ... on DryRunFailureStatus {
227
+ ...dryRunFailureStatusFragment
228
+ }
229
+ ... on DryRunSuccessStatus {
230
+ ...dryRunSuccessStatusFragment
231
+ }
232
+ }
233
+ ${P4}
234
+ ${D4}`,F4=j`
235
+ fragment dryRunTransactionExecutionStatusFragment on DryRunTransactionExecutionStatus {
236
+ id
237
+ status {
238
+ ...dryRunTransactionStatusFragment
239
+ }
240
+ receipts {
241
+ ...receiptFragment
242
+ }
243
+ }
244
+ ${M4}
245
+ ${k_}`,O_=j`
246
+ fragment coinFragment on Coin {
247
+ type: __typename
248
+ utxoId
249
+ owner
250
+ amount
251
+ assetId
252
+ blockCreated
253
+ txCreatedIdx
254
+ }
255
+ `,L4=j`
256
+ fragment messageCoinFragment on MessageCoin {
257
+ type: __typename
258
+ sender
259
+ recipient
260
+ nonce
261
+ amount
262
+ assetId
263
+ daHeight
264
+ }
265
+ `,EC=j`
266
+ fragment messageFragment on Message {
267
+ amount
268
+ sender
269
+ recipient
270
+ data
271
+ nonce
272
+ daHeight
273
+ }
274
+ `,Q4=j`
275
+ fragment messageProofFragment on MessageProof {
276
+ messageProof {
277
+ proofSet
278
+ proofIndex
279
+ }
280
+ blockProof {
281
+ proofSet
282
+ proofIndex
283
+ }
284
+ messageBlockHeader {
285
+ version
286
+ id
287
+ daHeight
288
+ consensusParametersVersion
289
+ stateTransitionBytecodeVersion
290
+ transactionsCount
291
+ messageReceiptCount
292
+ transactionsRoot
293
+ messageOutboxRoot
294
+ eventInboxRoot
295
+ height
296
+ prevRoot
297
+ time
298
+ applicationHash
299
+ }
300
+ commitBlockHeader {
301
+ version
302
+ id
303
+ daHeight
304
+ consensusParametersVersion
305
+ stateTransitionBytecodeVersion
306
+ transactionsCount
307
+ messageReceiptCount
308
+ transactionsRoot
309
+ messageOutboxRoot
310
+ eventInboxRoot
311
+ height
312
+ prevRoot
313
+ time
314
+ applicationHash
315
+ }
316
+ sender
317
+ recipient
318
+ nonce
319
+ amount
320
+ data
321
+ }
322
+ `,CC=j`
323
+ fragment balanceFragment on Balance {
324
+ owner
325
+ amount
326
+ assetId
327
+ }
328
+ `,kd=j`
329
+ fragment blockFragment on Block {
330
+ id
331
+ height
332
+ header {
333
+ time
334
+ daHeight
335
+ stateTransitionBytecodeVersion
336
+ transactionsCount
337
+ transactionsRoot
338
+ messageOutboxRoot
339
+ eventInboxRoot
340
+ prevRoot
341
+ applicationHash
342
+ }
343
+ transactions {
344
+ id
345
+ }
346
+ }
347
+ `,U4=j`
348
+ fragment TxParametersFragment on TxParameters {
349
+ version
350
+ maxInputs
351
+ maxOutputs
352
+ maxWitnesses
353
+ maxGasPerTx
354
+ maxSize
355
+ maxBytecodeSubsections
356
+ }
357
+ `,q4=j`
358
+ fragment PredicateParametersFragment on PredicateParameters {
359
+ version
360
+ maxPredicateLength
361
+ maxPredicateDataLength
362
+ maxGasPerPredicate
363
+ maxMessageDataLength
364
+ }
365
+ `,J4=j`
366
+ fragment ScriptParametersFragment on ScriptParameters {
367
+ version
368
+ maxScriptLength
369
+ maxScriptDataLength
370
+ }
371
+ `,V4=j`
372
+ fragment ContractParametersFragment on ContractParameters {
373
+ version
374
+ contractMaxSize
375
+ maxStorageSlots
376
+ }
377
+ `,z4=j`
378
+ fragment FeeParametersFragment on FeeParameters {
379
+ version
380
+ gasPriceFactor
381
+ gasPerByte
382
+ }
383
+ `,G4=j`
384
+ fragment DependentCostFragment on DependentCost {
385
+ ... on LightOperation {
386
+ type: __typename
387
+ base
388
+ unitsPerGas
389
+ }
390
+ ... on HeavyOperation {
391
+ type: __typename
392
+ base
393
+ gasPerUnit
394
+ }
395
+ }
396
+ `,W4=j`
397
+ fragment GasCostsFragment on GasCosts {
398
+ version
399
+ add
400
+ addi
401
+ aloc
402
+ and
403
+ andi
404
+ bal
405
+ bhei
406
+ bhsh
407
+ burn
408
+ cb
409
+ cfei
410
+ cfsi
411
+ div
412
+ divi
413
+ ecr1
414
+ eck1
415
+ ed19
416
+ eq
417
+ exp
418
+ expi
419
+ flag
420
+ gm
421
+ gt
422
+ gtf
423
+ ji
424
+ jmp
425
+ jne
426
+ jnei
427
+ jnzi
428
+ jmpf
429
+ jmpb
430
+ jnzf
431
+ jnzb
432
+ jnef
433
+ jneb
434
+ lb
435
+ log
436
+ lt
437
+ lw
438
+ mint
439
+ mlog
440
+ modOp
441
+ modi
442
+ moveOp
443
+ movi
444
+ mroo
445
+ mul
446
+ muli
447
+ mldv
448
+ noop
449
+ not
450
+ or
451
+ ori
452
+ poph
453
+ popl
454
+ pshh
455
+ pshl
456
+ ret
457
+ rvrt
458
+ sb
459
+ sll
460
+ slli
461
+ srl
462
+ srli
463
+ srw
464
+ sub
465
+ subi
466
+ sw
467
+ sww
468
+ time
469
+ tr
470
+ tro
471
+ wdcm
472
+ wqcm
473
+ wdop
474
+ wqop
475
+ wdml
476
+ wqml
477
+ wddv
478
+ wqdv
479
+ wdmd
480
+ wqmd
481
+ wdam
482
+ wqam
483
+ wdmm
484
+ wqmm
485
+ xor
486
+ xori
487
+ alocDependentCost {
488
+ ...DependentCostFragment
489
+ }
490
+ bldd {
491
+ ...DependentCostFragment
492
+ }
493
+ bsiz {
494
+ ...DependentCostFragment
495
+ }
496
+ cfe {
497
+ ...DependentCostFragment
498
+ }
499
+ cfeiDependentCost {
500
+ ...DependentCostFragment
501
+ }
502
+ call {
503
+ ...DependentCostFragment
504
+ }
505
+ ccp {
506
+ ...DependentCostFragment
507
+ }
508
+ croo {
509
+ ...DependentCostFragment
510
+ }
511
+ csiz {
512
+ ...DependentCostFragment
513
+ }
514
+ ed19DependentCost {
515
+ ...DependentCostFragment
516
+ }
517
+ k256 {
518
+ ...DependentCostFragment
519
+ }
520
+ ldc {
521
+ ...DependentCostFragment
522
+ }
523
+ logd {
524
+ ...DependentCostFragment
525
+ }
526
+ mcl {
527
+ ...DependentCostFragment
528
+ }
529
+ mcli {
530
+ ...DependentCostFragment
531
+ }
532
+ mcp {
533
+ ...DependentCostFragment
534
+ }
535
+ mcpi {
536
+ ...DependentCostFragment
537
+ }
538
+ meq {
539
+ ...DependentCostFragment
540
+ }
541
+ retd {
542
+ ...DependentCostFragment
543
+ }
544
+ s256 {
545
+ ...DependentCostFragment
546
+ }
547
+ scwq {
548
+ ...DependentCostFragment
549
+ }
550
+ smo {
551
+ ...DependentCostFragment
552
+ }
553
+ srwq {
554
+ ...DependentCostFragment
555
+ }
556
+ swwq {
557
+ ...DependentCostFragment
558
+ }
559
+ contractRoot {
560
+ ...DependentCostFragment
561
+ }
562
+ stateRoot {
563
+ ...DependentCostFragment
564
+ }
565
+ vmInitialization {
566
+ ...DependentCostFragment
567
+ }
568
+ newStoragePerByte
569
+ }
570
+ ${G4}`,H4=j`
571
+ fragment consensusParametersFragment on ConsensusParameters {
572
+ version
573
+ txParams {
574
+ ...TxParametersFragment
575
+ }
576
+ predicateParams {
577
+ ...PredicateParametersFragment
578
+ }
579
+ scriptParams {
580
+ ...ScriptParametersFragment
581
+ }
582
+ contractParams {
583
+ ...ContractParametersFragment
584
+ }
585
+ feeParams {
586
+ ...FeeParametersFragment
587
+ }
588
+ gasCosts {
589
+ ...GasCostsFragment
590
+ }
591
+ baseAssetId
592
+ chainId
593
+ }
594
+ ${U4}
595
+ ${q4}
596
+ ${J4}
597
+ ${V4}
598
+ ${z4}
599
+ ${W4}`,Z4=j`
600
+ fragment chainInfoFragment on ChainInfo {
601
+ name
602
+ latestBlock {
603
+ ...blockFragment
604
+ }
605
+ daHeight
606
+ consensusParameters {
607
+ ...consensusParametersFragment
608
+ }
609
+ }
610
+ ${kd}
611
+ ${H4}`,X4=j`
612
+ fragment contractBalanceFragment on ContractBalance {
613
+ contract
614
+ amount
615
+ assetId
616
+ }
617
+ `,eo=j`
618
+ fragment pageInfoFragment on PageInfo {
619
+ hasPreviousPage
620
+ hasNextPage
621
+ startCursor
622
+ endCursor
623
+ }
624
+ `,Y4=j`
625
+ fragment nodeInfoFragment on NodeInfo {
626
+ utxoValidation
627
+ vmBacktrace
628
+ maxTx
629
+ maxDepth
630
+ nodeVersion
631
+ }
632
+ `,$4=j`
633
+ fragment relayedTransactionStatusFragment on RelayedTransactionStatus {
634
+ ... on RelayedTransactionFailed {
635
+ blockHeight
636
+ failure
637
+ }
638
+ }
639
+ `,K4=j`
640
+ query getVersion {
641
+ nodeInfo {
642
+ nodeVersion
643
+ }
644
+ }
645
+ `,j4=j`
646
+ query getNodeInfo {
647
+ nodeInfo {
648
+ ...nodeInfoFragment
649
+ }
650
+ }
651
+ ${Y4}`,eQ=j`
652
+ query getChain {
653
+ chain {
654
+ ...chainInfoFragment
655
+ }
656
+ }
657
+ ${Z4}`,tQ=j`
658
+ query getTransaction($transactionId: TransactionId!) {
659
+ transaction(id: $transactionId) {
660
+ ...transactionFragment
661
+ }
662
+ }
663
+ ${Uu}`,nQ=j`
664
+ query getTransactionWithReceipts($transactionId: TransactionId!) {
665
+ transaction(id: $transactionId) {
666
+ ...transactionFragment
667
+ }
668
+ }
669
+ ${Uu}`,rQ=j`
670
+ query getTransactions($after: String, $before: String, $first: Int, $last: Int) {
671
+ transactions(after: $after, before: $before, first: $first, last: $last) {
672
+ edges {
673
+ node {
674
+ ...transactionFragment
675
+ }
676
+ }
677
+ pageInfo {
678
+ ...pageInfoFragment
679
+ }
680
+ }
681
+ }
682
+ ${Uu}
683
+ ${eo}`,iQ=j`
684
+ query getTransactionsByOwner($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
685
+ transactionsByOwner(
686
+ owner: $owner
687
+ after: $after
688
+ before: $before
689
+ first: $first
690
+ last: $last
691
+ ) {
692
+ pageInfo {
693
+ ...pageInfoFragment
694
+ }
695
+ edges {
696
+ node {
697
+ ...transactionFragment
698
+ }
699
+ }
700
+ }
701
+ }
702
+ ${eo}
703
+ ${Uu}`,aQ=j`
704
+ query estimatePredicates($encodedTransaction: HexString!) {
705
+ estimatePredicates(tx: $encodedTransaction) {
706
+ ...transactionEstimatePredicatesFragment
707
+ }
708
+ }
709
+ ${O4}`,sQ=j`
710
+ query getBlock($blockId: BlockId, $height: U32) {
711
+ block(id: $blockId, height: $height) {
712
+ ...blockFragment
713
+ }
714
+ }
715
+ ${kd}`,oQ=j`
716
+ query getBlockWithTransactions($blockId: BlockId, $blockHeight: U32) {
717
+ block(id: $blockId, height: $blockHeight) {
718
+ ...blockFragment
719
+ transactions {
720
+ ...transactionFragment
721
+ }
722
+ }
723
+ }
724
+ ${kd}
725
+ ${Uu}`,cQ=j`
726
+ query getBlocks($after: String, $before: String, $first: Int, $last: Int) {
727
+ blocks(after: $after, before: $before, first: $first, last: $last) {
728
+ pageInfo {
729
+ ...pageInfoFragment
730
+ }
731
+ edges {
732
+ node {
733
+ ...blockFragment
734
+ }
735
+ }
736
+ }
737
+ }
738
+ ${eo}
739
+ ${kd}`,uQ=j`
740
+ query getCoin($coinId: UtxoId!) {
741
+ coin(utxoId: $coinId) {
742
+ ...coinFragment
743
+ }
744
+ }
745
+ ${O_}`,lQ=j`
746
+ query getCoins($filter: CoinFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
747
+ coins(
748
+ filter: $filter
749
+ after: $after
750
+ before: $before
751
+ first: $first
752
+ last: $last
753
+ ) {
754
+ pageInfo {
755
+ ...pageInfoFragment
756
+ }
757
+ edges {
758
+ node {
759
+ ...coinFragment
760
+ }
761
+ }
762
+ }
763
+ }
764
+ ${eo}
765
+ ${O_}`,dQ=j`
766
+ query getCoinsToSpend($owner: Address!, $queryPerAsset: [SpendQueryElementInput!]!, $excludedIds: ExcludeInput) {
767
+ coinsToSpend(
768
+ owner: $owner
769
+ queryPerAsset: $queryPerAsset
770
+ excludedIds: $excludedIds
771
+ ) {
772
+ ...coinFragment
773
+ ...messageCoinFragment
774
+ }
775
+ }
776
+ ${O_}
777
+ ${L4}`,fQ=j`
778
+ query getContract($contractId: ContractId!) {
779
+ contract(id: $contractId) {
780
+ bytecode
781
+ id
782
+ }
783
+ }
784
+ `,pQ=j`
785
+ query getContractBalance($contract: ContractId!, $asset: AssetId!) {
786
+ contractBalance(contract: $contract, asset: $asset) {
787
+ ...contractBalanceFragment
788
+ }
789
+ }
790
+ ${X4}`,hQ=j`
791
+ query getBalance($owner: Address!, $assetId: AssetId!) {
792
+ balance(owner: $owner, assetId: $assetId) {
793
+ ...balanceFragment
794
+ }
795
+ }
796
+ ${CC}`,mQ=j`
797
+ query getLatestGasPrice {
798
+ latestGasPrice {
799
+ gasPrice
800
+ }
801
+ }
802
+ `,gQ=j`
803
+ query estimateGasPrice($blockHorizon: U32!) {
804
+ estimateGasPrice(blockHorizon: $blockHorizon) {
805
+ gasPrice
806
+ }
807
+ }
808
+ `,_Q=j`
809
+ query getBalances($filter: BalanceFilterInput!, $after: String, $before: String, $first: Int, $last: Int) {
810
+ balances(
811
+ filter: $filter
812
+ after: $after
813
+ before: $before
814
+ first: $first
815
+ last: $last
816
+ ) {
817
+ pageInfo {
818
+ ...pageInfoFragment
819
+ }
820
+ edges {
821
+ node {
822
+ ...balanceFragment
823
+ }
824
+ }
825
+ }
826
+ }
827
+ ${eo}
828
+ ${CC}`,AQ=j`
829
+ query getMessages($owner: Address!, $after: String, $before: String, $first: Int, $last: Int) {
830
+ messages(
831
+ owner: $owner
832
+ after: $after
833
+ before: $before
834
+ first: $first
835
+ last: $last
836
+ ) {
837
+ pageInfo {
838
+ ...pageInfoFragment
839
+ }
840
+ edges {
841
+ node {
842
+ ...messageFragment
843
+ }
844
+ }
845
+ }
846
+ }
847
+ ${eo}
848
+ ${EC}`,yQ=j`
849
+ query getMessageProof($transactionId: TransactionId!, $nonce: Nonce!, $commitBlockId: BlockId, $commitBlockHeight: U32) {
850
+ messageProof(
851
+ transactionId: $transactionId
852
+ nonce: $nonce
853
+ commitBlockId: $commitBlockId
854
+ commitBlockHeight: $commitBlockHeight
855
+ ) {
856
+ ...messageProofFragment
857
+ }
858
+ }
859
+ ${Q4}`,vQ=j`
860
+ query getMessageStatus($nonce: Nonce!) {
861
+ messageStatus(nonce: $nonce) {
862
+ state
863
+ }
864
+ }
865
+ `,wQ=j`
866
+ query getRelayedTransactionStatus($relayedTransactionId: RelayedTransactionId!) {
867
+ relayedTransactionStatus(id: $relayedTransactionId) {
868
+ ...relayedTransactionStatusFragment
869
+ }
870
+ }
871
+ ${$4}`,bQ=j`
872
+ mutation dryRun($encodedTransactions: [HexString!]!, $utxoValidation: Boolean, $gasPrice: U64) {
873
+ dryRun(
874
+ txs: $encodedTransactions
875
+ utxoValidation: $utxoValidation
876
+ gasPrice: $gasPrice
877
+ ) {
878
+ ...dryRunTransactionExecutionStatusFragment
879
+ }
880
+ }
881
+ ${F4}`,EQ=j`
882
+ mutation submit($encodedTransaction: HexString!) {
883
+ submit(tx: $encodedTransaction) {
884
+ id
885
+ }
886
+ }
887
+ `,CQ=j`
888
+ mutation produceBlocks($startTimestamp: Tai64Timestamp, $blocksToProduce: U32!) {
889
+ produceBlocks(
890
+ blocksToProduce: $blocksToProduce
891
+ startTimestamp: $startTimestamp
892
+ )
893
+ }
894
+ `,IQ=j`
895
+ query getMessageByNonce($nonce: Nonce!) {
896
+ message(nonce: $nonce) {
897
+ ...messageFragment
898
+ }
899
+ }
900
+ ${EC}`,SQ=j`
901
+ subscription submitAndAwait($encodedTransaction: HexString!) {
902
+ submitAndAwait(tx: $encodedTransaction) {
903
+ ...transactionStatusSubscriptionFragment
904
+ }
905
+ }
906
+ ${B_}`,xQ=j`
907
+ subscription submitAndAwaitStatus($encodedTransaction: HexString!) {
908
+ submitAndAwaitStatus(tx: $encodedTransaction) {
909
+ ...transactionStatusSubscriptionFragment
910
+ }
911
+ }
912
+ ${B_}`,TQ=j`
913
+ subscription statusChange($transactionId: TransactionId!) {
914
+ statusChange(id: $transactionId) {
915
+ ...transactionStatusSubscriptionFragment
916
+ }
917
+ }
918
+ ${B_}`;function NQ(e){return{getVersion(t,n){return e(K4,t,n)},getNodeInfo(t,n){return e(j4,t,n)},getChain(t,n){return e(eQ,t,n)},getTransaction(t,n){return e(tQ,t,n)},getTransactionWithReceipts(t,n){return e(nQ,t,n)},getTransactions(t,n){return e(rQ,t,n)},getTransactionsByOwner(t,n){return e(iQ,t,n)},estimatePredicates(t,n){return e(aQ,t,n)},getBlock(t,n){return e(sQ,t,n)},getBlockWithTransactions(t,n){return e(oQ,t,n)},getBlocks(t,n){return e(cQ,t,n)},getCoin(t,n){return e(uQ,t,n)},getCoins(t,n){return e(lQ,t,n)},getCoinsToSpend(t,n){return e(dQ,t,n)},getContract(t,n){return e(fQ,t,n)},getContractBalance(t,n){return e(pQ,t,n)},getBalance(t,n){return e(hQ,t,n)},getLatestGasPrice(t,n){return e(mQ,t,n)},estimateGasPrice(t,n){return e(gQ,t,n)},getBalances(t,n){return e(_Q,t,n)},getMessages(t,n){return e(AQ,t,n)},getMessageProof(t,n){return e(yQ,t,n)},getMessageStatus(t,n){return e(vQ,t,n)},getRelayedTransactionStatus(t,n){return e(wQ,t,n)},dryRun(t,n){return e(bQ,t,n)},submit(t,n){return e(EQ,t,n)},produceBlocks(t,n){return e(CQ,t,n)},getMessageByNonce(t,n){return e(IQ,t,n)},submitAndAwait(t,n){return e(SQ,t,n)},submitAndAwaitStatus(t,n){return e(xQ,t,n)},statusChange(t,n){return e(TQ,t,n)}}}var Sd=class{constructor(e){this.stream=e}static async create(e){let{url:t,query:n,variables:r,fetchFn:i}=e,a=await i(`${t}-sub`,{method:"POST",body:JSON.stringify({query:ib(n),variables:r}),headers:{"Content-Type":"application/json",Accept:"text/event-stream"}}),[s,o]=a.body.tee().map(c=>c.getReader());return await new Sd(s).next(),new Sd(o)}events=[];parsingLeftover="";async next(){for(;;){if(this.events.length>0){let{data:s,errors:o}=this.events.shift();if(Array.isArray(o))throw new v(v.CODES.INVALID_REQUEST,o.map(c=>c.message).join(`
919
+
920
+ `));return{value:s,done:!1}}let{value:e,done:t}=await this.stream.read();if(t)return{value:e,done:t};let n=Sd.textDecoder.decode(e).replace(`:keep-alive-text
921
+
922
+ `,"");if(n==="")continue;let r=`${this.parsingLeftover}${n}`,i=/data:.*\n\n/g,a=[...r.matchAll(i)].flatMap(s=>s);a.forEach(s=>{try{this.events.push(JSON.parse(s.replace(/^data:/,"")))}catch{throw new v(x.STREAM_PARSING_ERROR,`Error while parsing stream data response: ${r}`)}}),this.parsingLeftover=r.replace(a.join(),"")}}return(){return Promise.resolve({done:!0,value:void 0})}[Symbol.asyncIterator](){return this}},IC=Sd;nt(IC,"textDecoder",new TextDecoder);var Ji=new Map,rC=class{ttl;constructor(e){if(this.ttl=e,typeof e!="number"||this.ttl<=0)throw new v(x.INVALID_TTL,`Invalid TTL: ${this.ttl}. Use a value greater than zero.`)}set(e,t){let n=Date.now(),r=Ji.get(e)||{utxos:new Set,messages:new Set,timestamp:n};t.utxos.forEach(i=>r.utxos.add(L(i))),t.messages.forEach(i=>r.messages.add(L(i))),Ji.set(e,r)}unset(e){Ji.delete(e)}getActiveData(){let e={utxos:[],messages:[]},t=Date.now();return Ji.forEach((n,r)=>{t-n.timestamp<this.ttl?(e.utxos.push(...n.utxos),e.messages.push(...n.messages)):Ji.delete(r)}),e}isCached(e){let t=Date.now();for(let[n,r]of Ji.entries())if(t-r.timestamp>this.ttl)Ji.delete(n);else if(r.utxos.has(e)||r.messages.has(e))return!0;return!1}clear(){Ji.clear()}},RQ=e=>{let{type:t}=e;switch(e.type){case ye.Coin:{let n=D(e.predicate??"0x"),r=D(e.predicateData??"0x");return{type:ye.Coin,txID:L(D(e.id).slice(0,ar)),outputIndex:On(D(e.id).slice(ar,Oa)),owner:L(e.owner),amount:I(e.amount),assetId:L(e.assetId),txPointer:{blockHeight:On(D(e.txPointer).slice(0,8)),txIndex:On(D(e.txPointer).slice(8,16))},witnessIndex:e.witnessIndex,predicateGasUsed:I(e.predicateGasUsed),predicateLength:I(n.length),predicateDataLength:I(r.length),predicate:L(n),predicateData:L(r)}}case ye.Contract:return{type:ye.Contract,txID:Te,outputIndex:0,balanceRoot:Te,stateRoot:Te,txPointer:{blockHeight:On(D(e.txPointer).slice(0,8)),txIndex:On(D(e.txPointer).slice(8,16))},contractID:L(e.contractId)};case ye.Message:{let n=D(e.predicate??"0x"),r=D(e.predicateData??"0x"),i=D(e.data??"0x");return{type:ye.Message,sender:L(e.sender),recipient:L(e.recipient),amount:I(e.amount),nonce:L(e.nonce),witnessIndex:e.witnessIndex,predicateGasUsed:I(e.predicateGasUsed),predicateLength:I(n.length),predicateDataLength:I(r.length),predicate:L(n),predicateData:L(r),data:L(i),dataLength:i.length}}default:throw new v(x.INVALID_TRANSACTION_INPUT,`Invalid transaction input type: ${t}.`)}},kQ=e=>{let{type:t}=e;switch(t){case ve.Coin:return{type:ve.Coin,to:L(e.to),amount:I(e.amount),assetId:L(e.assetId)};case ve.Contract:return{type:ve.Contract,inputIndex:e.inputIndex,balanceRoot:Te,stateRoot:Te};case ve.Change:return{type:ve.Change,to:L(e.to),amount:I(0),assetId:L(e.assetId)};case ve.Variable:return{type:ve.Variable,to:Te,amount:I(0),assetId:Te};case ve.ContractCreated:return{type:ve.ContractCreated,contractId:L(e.contractId),stateRoot:L(e.stateRoot)};default:throw new v(x.INVALID_TRANSACTION_INPUT,`Invalid transaction output type: ${t}.`)}},iC=e=>!("data"in e);var BQ=e=>"id"in e;var OQ=e=>e.type===le.Revert&&e.val.toString("hex")===vd,PQ=e=>e.type===le.Panic&&e.contractId!=="0x0000000000000000000000000000000000000000000000000000000000000000",aC=e=>e.reduce((t,n)=>(OQ(n)&&t.missingOutputVariables.push(n),PQ(n)&&t.missingOutputContractIds.push(n),t),{missingOutputVariables:[],missingOutputContractIds:[]}),Ze=e=>e||Te;function DQ(e){let{receiptType:t}=e;switch(t){case"CALL":return{type:le.Call,from:Ze(e.id||e.contractId),to:Ze(e?.to),amount:I(e.amount),assetId:Ze(e.assetId),gas:I(e.gas),param1:I(e.param1),param2:I(e.param2),pc:I(e.pc),is:I(e.is)};case"RETURN":return{type:le.Return,id:Ze(e.id||e.contractId),val:I(e.val),pc:I(e.pc),is:I(e.is)};case"RETURN_DATA":return{type:le.ReturnData,id:Ze(e.id||e.contractId),ptr:I(e.ptr),len:I(e.len),digest:Ze(e.digest),pc:I(e.pc),is:I(e.is)};case"PANIC":return{type:le.Panic,id:Ze(e.id),reason:I(e.reason),pc:I(e.pc),is:I(e.is),contractId:Ze(e.contractId)};case"REVERT":return{type:le.Revert,id:Ze(e.id||e.contractId),val:I(e.ra),pc:I(e.pc),is:I(e.is)};case"LOG":return{type:le.Log,id:Ze(e.id||e.contractId),val0:I(e.ra),val1:I(e.rb),val2:I(e.rc),val3:I(e.rd),pc:I(e.pc),is:I(e.is)};case"LOG_DATA":return{type:le.LogData,id:Ze(e.id||e.contractId),val0:I(e.ra),val1:I(e.rb),ptr:I(e.ptr),len:I(e.len),digest:Ze(e.digest),pc:I(e.pc),is:I(e.is)};case"TRANSFER":return{type:le.Transfer,from:Ze(e.id||e.contractId),to:Ze(e.toAddress||e?.to),amount:I(e.amount),assetId:Ze(e.assetId),pc:I(e.pc),is:I(e.is)};case"TRANSFER_OUT":return{type:le.TransferOut,from:Ze(e.id||e.contractId),to:Ze(e.toAddress||e.to),amount:I(e.amount),assetId:Ze(e.assetId),pc:I(e.pc),is:I(e.is)};case"SCRIPT_RESULT":return{type:le.ScriptResult,result:I(e.result),gasUsed:I(e.gasUsed)};case"MESSAGE_OUT":{let n=Ze(e.sender),r=Ze(e.recipient),i=Ze(e.nonce),a=I(e.amount),s=e.data?D(e.data):Uint8Array.from([]),o=Ze(e.digest),c=Or.getMessageId({sender:n,recipient:r,nonce:i,amount:a,data:L(s)});return{type:le.MessageOut,sender:n,recipient:r,amount:a,nonce:i,data:s,digest:o,messageId:c}}case"MINT":{let n=Ze(e.id||e.contractId),r=Ze(e.subId),i=Jh(n,r);return{type:le.Mint,subId:r,contractId:n,assetId:i,val:I(e.val),pc:I(e.pc),is:I(e.is)}}case"BURN":{let n=Ze(e.id||e.contractId),r=Ze(e.subId),i=Jh(n,r);return{type:le.Burn,subId:r,contractId:n,assetId:i,val:I(e.val),pc:I(e.pc),is:I(e.is)}}default:throw new v(x.INVALID_RECEIPT_TYPE,`Invalid receipt type: ${t}.`)}}var qu=e=>e.filter(r=>r.type===le.ScriptResult).reduce((r,i)=>r.add(i.gasUsed),I(0));function Jr(e,t){let n=I(t.base),r=I(0);return"unitsPerGas"in t?r=I(e).div(I(t.unitsPerGas)):r=I(e).mul(I(t.gasPerUnit)),n.add(r)}function MQ(e,t,n){let r=[],i=e.filter(o=>{if("owner"in o||"sender"in o){if("predicate"in o&&o.predicate&&o.predicate!=="0x")return!0;if(!r.includes(o.witnessIndex))return r.push(o.witnessIndex),!0}return!1}),a=Jr(t,n.vmInitialization);return i.reduce((o,c)=>"predicate"in c&&c.predicate&&c.predicate!=="0x"?o.add(a.add(Jr(D(c.predicate).length,n.contractRoot)).add(I(c.predicateGasUsed))):o.add(n.ecr1),I(0))}function SC(e){let{gasCosts:t,gasPerByte:n,inputs:r,metadataGas:i,txBytesSize:a}=e,s=Jr(a,t.vmInitialization),o=I(a).mul(n),c=MQ(r,a,t);return s.add(o).add(c).add(i).maxU64()}function P_(e){let{gasPerByte:t,witnessesLength:n,witnessLimit:r,minGas:i,gasLimit:a=I(0),maxGasPerTx:s}=e,o=I(0);r?.gt(0)&&r.gte(n)&&(o=I(r).sub(n).mul(t));let c=o.add(i).add(a);return c.gte(s)?s:c}function xC({gasCosts:e,stateRootSize:t,txBytesSize:n,contractBytesSize:r}){let i=Jr(r,e.contractRoot),a=Jr(t,e.stateRoot),s=Jr(n,e.s256),o=I(4+32+32+32),c=Jr(o,e.s256);return i.add(a).add(s).add(c).maxU64()}function TC({gasCosts:e,txBytesSize:t}){return Jr(t,e.s256)}function FQ({gasCosts:e,txBytesSize:t,witnessBytesSize:n}){let r=Jr(t,e.s256),i=Jr(n,e.s256);return r.add(i)}var xd=e=>{let{gas:t,gasPrice:n,priceFactor:r,tip:i}=e;return t.mul(n).div(r).add(I(i))};function E_(e){return Object.keys(e).forEach(t=>{switch(e[t]?.constructor.name){case"Uint8Array":e[t]=L(e[t]);break;case"Array":e[t]=E_(e[t]);break;case"BN":e[t]=e[t].toHex();break;case"Address":e[t]=e[t].toB256();break;case"Object":e[t]=E_(e[t]);break;default:break}}),e}function LQ(e){return E_(at(e))}var QQ=(e,t)=>{let n=`The transaction reverted with reason: "${e}".`;return f0.includes(e)&&(n=`${n}
923
+
924
+ You can read more about this error at:
925
+
926
+ ${p0}#variant.${e}`),new v(x.SCRIPT_REVERTED,n,{...t,reason:e})},Mu=e=>JSON.stringify(e,null,2),UQ=(e,t,n)=>{let r="The transaction reverted with an unknown reason.",i=e.find(({type:s})=>s===le.Revert),a="";if(i){let s=I(i.val).toHex(),o=t[t.length-1],c=t[t.length-2];switch(s){case c0:{a="require",r=`The transaction reverted because a "require" statement has thrown ${t.length?Mu(o):"an error."}.`;break}case u0:{let u=t.length>=2?` comparing ${Mu(o)} and ${Mu(c)}.`:".";a="assert_eq",r=`The transaction reverted because of an "assert_eq" statement${u}`;break}case d0:{let u=t.length>=2?` comparing ${Mu(c)} and ${Mu(o)}.`:".";a="assert_ne",r=`The transaction reverted because of an "assert_ne" statement${u}`;break}case l0:a="assert",r='The transaction reverted because an "assert" statement failed to evaluate to true.';break;case vd:a="MissingOutputChange",r=`The transaction reverted because it's missing an "OutputChange".`;break;default:throw new v(x.UNKNOWN,`The transaction reverted with an unknown reason: ${i.val}`,{...n,reason:"unknown"})}}return new v(x.SCRIPT_REVERTED,r,{...n,reason:a})},Bd=e=>{let{receipts:t,statusReason:n,logs:r}=e,i=t.some(({type:o})=>o===le.Panic),a=t.some(({type:o})=>o===le.Revert),s={logs:r,receipts:t,panic:i,revert:a,reason:""};return i?QQ(n,s):UQ(t,r,s)};var qQ=class extends Error{constructor(e){super(),this.index=e,this.message=`Witness at index "${e}" was not found`}name="NoWitnessAtIndexError"};var to=e=>e.type===ye.Coin,D_=e=>e.type===ye.Message,NC=e=>e.type===ye.Message&&I(e.data).isZero(),JQ=e=>to(e)||D_(e),Lu=e=>to(e)||NC(e),RC=e=>to(e)?e.owner:e.recipient,VQ=(e,t)=>RC(e)===t.toB256(),zQ=(e,t,n)=>e.filter(Lu).reduce((r,i)=>to(i)&&i.assetId===t||D_(i)&&t===n?r.add(i.amount):r,I(0));var GQ=(e,t)=>e.reduce((n,r)=>(to(r)&&r.owner===t.toB256()?n.utxos.push(r.id):D_(r)&&r.recipient===t.toB256()&&n.messages.push(r.nonce),n),{utxos:[],messages:[]}),WQ=e=>{let t=D(e);return{data:L(t),dataLength:t.length}},Od=class{tip;maturity;maxFee;witnessLimit;inputs=[];outputs=[];witnesses=[];constructor({tip:e,maturity:t,maxFee:n,witnessLimit:r,inputs:i,outputs:a,witnesses:s}={}){this.tip=e?I(e):void 0,this.maturity=t&&t>0?t:void 0,this.witnessLimit=Pn(r)?I(r):void 0,this.maxFee=I(n),this.inputs=i??[],this.outputs=a??[],this.witnesses=s??[]}static getPolicyMeta(e){let t=0,n=[],{tip:r,witnessLimit:i,maturity:a}=e;return I(r).gt(0)&&(t+=sn.Tip,n.push({data:I(r),type:sn.Tip})),Pn(i)&&I(i).gte(0)&&(t+=sn.WitnessLimit,n.push({data:I(i),type:sn.WitnessLimit})),a&&a>0&&(t+=sn.Maturity,n.push({data:a,type:sn.Maturity})),t+=sn.MaxFee,n.push({data:e.maxFee,type:sn.MaxFee}),{policyTypes:t,policies:n}}getBaseTransaction(){let e=this.inputs?.map(RQ)??[],t=this.outputs?.map(kQ)??[],n=this.witnesses?.map(WQ)??[],{policyTypes:r,policies:i}=Od.getPolicyMeta(this);return{policyTypes:r,inputs:e,outputs:t,policies:i,witnesses:n,inputsCount:e.length,outputsCount:t.length,witnessesCount:n.length}}toTransactionBytes(){return new An().encode(this.toTransaction())}pushInput(e){return this.inputs.push(e),this.inputs.length-1}pushOutput(e){return this.outputs.push(e),this.outputs.length-1}addWitness(e){return this.witnesses.push(e),this.witnesses.length-1}addEmptyWitness(){return this.addWitness(ie([Te,Te])),this.witnesses.length-1}updateWitnessByOwner(e,t){let n=se.fromAddressOrString(e),r=this.getCoinInputWitnessIndexByOwner(n);typeof r=="number"&&this.updateWitness(r,t)}updateWitness(e,t){if(!this.witnesses[e])throw new qQ(e);this.witnesses[e]=t}async addAccountWitnesses(e){let t=Array.isArray(e)?e:[e];return await Promise.all(t.map(async n=>{this.addWitness(await n.signTransaction(this))})),this}getCoinInputs(){return this.inputs.filter(e=>e.type===ye.Coin)}getCoinOutputs(){return this.outputs.filter(e=>e.type===ve.Coin)}getChangeOutputs(){return this.outputs.filter(e=>e.type===ve.Change)}getCoinInputWitnessIndexByOwner(e){let t=Pa(e);return this.inputs.find(r=>{switch(r.type){case ye.Coin:return L(r.owner)===t.toB256();case ye.Message:return L(r.recipient)===t.toB256();default:return!1}})?.witnessIndex}addCoinInput(e){let{assetId:t,owner:n,amount:r,id:i,predicate:a,predicateData:s}=e,o;e.predicate?o=0:(o=this.getCoinInputWitnessIndexByOwner(n),typeof o!="number"&&(o=this.addEmptyWitness()));let c={id:i,type:ye.Coin,owner:n.toB256(),amount:r,assetId:t,txPointer:"0x00000000000000000000000000000000",witnessIndex:o,predicate:a,predicateData:s};this.pushInput(c),this.addChangeOutput(n,t)}addMessageInput(e){let{recipient:t,sender:n,amount:r,predicate:i,nonce:a,predicateData:s}=e,o;e.predicate?o=0:(o=this.getCoinInputWitnessIndexByOwner(t),typeof o!="number"&&(o=this.addEmptyWitness()));let c={nonce:a,type:ye.Message,sender:n.toB256(),recipient:t.toB256(),data:iC(e)?"0x":e.data,amount:r,witnessIndex:o,predicate:i,predicateData:s};this.pushInput(c),iC(e)&&this.addChangeOutput(t,e.assetId)}addResource(e){return BQ(e)?this.addCoinInput(e):this.addMessageInput(e),this}addResources(e){return e.forEach(t=>this.addResource(t)),this}addCoinOutput(e,t,n){return this.pushOutput({type:ve.Coin,to:Pa(e).toB256(),amount:t,assetId:n}),this}addCoinOutputs(e,t){return t.map(Rd).forEach(n=>{this.pushOutput({type:ve.Coin,to:Pa(e).toB256(),amount:n.amount,assetId:n.assetId})}),this}addChangeOutput(e,t){this.getChangeOutputs().find(r=>L(r.assetId)===t)||this.pushOutput({type:ve.Change,to:Pa(e).toB256(),assetId:t})}byteSize(){return this.toTransactionBytes().length}metadataGas(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Not implemented")}calculateMinGas(e){let{consensusParameters:t}=e,{gasCosts:n,feeParameters:{gasPerByte:r}}=t;return SC({gasPerByte:r,gasCosts:n,inputs:this.inputs,txBytesSize:this.byteSize(),metadataGas:this.metadataGas(n)})}calculateMaxGas(e,t){let{consensusParameters:n}=e,{feeParameters:{gasPerByte:r},txParameters:{maxGasPerTx:i}}=n,a=this.toTransaction().witnesses.reduce((s,o)=>s+o.dataLength,0);return P_({gasPerByte:r,minGas:t,witnessesLength:a,witnessLimit:this.witnessLimit,maxGasPerTx:i})}fundWithFakeUtxos(e,t,n){let r=a=>this.inputs.find(s=>"assetId"in s?s.assetId===a:!1),i=(a,s)=>{let o=r(a),c=s;a===t&&(c=I("1000000000000000000")),o&&"assetId"in o?(o.id=L(Mt(Oa)),o.amount=c):this.addResources([{id:L(Mt(Oa)),amount:c,assetId:a,owner:n||se.fromRandom(),blockCreated:I(1),txCreatedIdx:I(1)}])};return i(t,I(1e11)),e.forEach(a=>i(a.assetId,a.amount)),this}getCoinOutputsQuantities(){return this.getCoinOutputs().map(({amount:t,assetId:n})=>({amount:I(t),assetId:n.toString()}))}toJSON(){return LQ(this)}removeWitness(e){this.witnesses.splice(e,1),this.adjustWitnessIndexes(e)}adjustWitnessIndexes(e){this.inputs.filter(Lu).forEach(t=>{t.witnessIndex>e&&(t.witnessIndex-=1)})}updatePredicateGasUsed(e){let t=e.filter(JQ);this.inputs.filter(Lu).forEach(n=>{let r=RC(n),i=t.find(a=>VQ(a,se.fromString(String(r))));i&&"predicateGasUsed"in i&&I(i.predicateGasUsed).gt(0)&&(n.predicateGasUsed=i.predicateGasUsed)})}byteLength(){return this.toTransactionBytes().byteLength}};function M_(e,t){let n=e.toTransaction();n.type===Ve.Script&&(n.receiptsRoot=Te),n.inputs=n.inputs.map(a=>{let s=at(a);switch(s.type){case ye.Coin:return s.txPointer={blockHeight:0,txIndex:0},s.predicateGasUsed=I(0),s;case ye.Message:return s.predicateGasUsed=I(0),s;case ye.Contract:return s.txPointer={blockHeight:0,txIndex:0},s.txID=Te,s.outputIndex=0,s.balanceRoot=Te,s.stateRoot=Te,s;default:return s}}),n.outputs=n.outputs.map(a=>{let s=at(a);switch(s.type){case ve.Contract:return s.balanceRoot=Te,s.stateRoot=Te,s;case ve.Change:return s.amount=I(0),s;case ve.Variable:return s.to=Te,s.amount=I(0),s.assetId=Te,s;default:return s}}),n.witnessesCount=0,n.witnesses=[];let r=Ab(t),i=ie([r,new An().encode(n)]);return tt(i)}var C_=class extends Od{static from(e){return new this(at(e))}type=Ve.Blob;blobId;witnessIndex;constructor({witnessIndex:e,blobId:t,...n}){super(n),this.blobId=t,this.witnessIndex=e??0}toTransaction(){let e=this.getBaseTransaction(),{witnessIndex:t,blobId:n}=this;return{type:Ve.Blob,...e,blobId:n,witnessIndex:t}}getTransactionId(e){return M_(this,e)}metadataGas(e){return FQ({gasCosts:e,txBytesSize:this.byteSize(),witnessBytesSize:this.witnesses[this.witnessIndex].length})}},HQ=e=>{let t=new Uint8Array(32);return t.set(D(e)),t},ZQ=e=>{let t,n;return Array.isArray(e)?(t=e[0],n=e[1]):(t=e.key,n=e.value),{key:L(t),value:L(HQ(n))}},I_=class extends Od{static from(e){return new this(at(e))}type=Ve.Create;bytecodeWitnessIndex;salt;storageSlots;constructor({bytecodeWitnessIndex:e,salt:t,storageSlots:n,...r}){super(r),this.bytecodeWitnessIndex=e??0,this.salt=L(t??Te),this.storageSlots=[...n??[]]}toTransaction(){let e=this.getBaseTransaction(),t=this.bytecodeWitnessIndex,n=this.storageSlots?.map(ZQ)??[];return{type:Ve.Create,...e,bytecodeWitnessIndex:t,storageSlotsCount:I(n.length),salt:this.salt?L(this.salt):Te,storageSlots:n}}getContractCreatedOutputs(){return this.outputs.filter(e=>e.type===ve.ContractCreated)}getTransactionId(e){return M_(this,e)}addContractCreatedOutput(e,t){this.pushOutput({type:ve.ContractCreated,contractId:e,stateRoot:t})}metadataGas(e){return xC({contractBytesSize:I(D(this.witnesses[this.bytecodeWitnessIndex]||"0x").length),gasCosts:e,stateRootSize:this.storageSlots.length,txBytesSize:this.byteSize()})}},sC={bytes:D("0x24000000"),encodeScriptData:()=>new Uint8Array(0)},XQ={bytes:D("0x5040C0105D44C0064C40001124000000"),encodeScriptData:()=>new Uint8Array(0)},Wi=class extends Od{static from(e){return new this(at(e))}type=Ve.Script;gasLimit;script;scriptData;abis;constructor({script:e,scriptData:t,gasLimit:n,...r}={}){super(r),this.gasLimit=I(n),this.script=D(e??sC.bytes),this.scriptData=D(t??sC.encodeScriptData()),this.abis=r.abis}toTransaction(){let e=D(this.script??"0x"),t=D(this.scriptData??"0x");return{type:Ve.Script,scriptGasLimit:this.gasLimit,...super.getBaseTransaction(),scriptLength:I(e.length),scriptDataLength:I(t.length),receiptsRoot:Te,script:L(e),scriptData:L(t)}}getContractInputs(){return this.inputs.filter(e=>e.type===ye.Contract)}getContractOutputs(){return this.outputs.filter(e=>e.type===ve.Contract)}getVariableOutputs(){return this.outputs.filter(e=>e.type===ve.Variable)}setScript(e,t){this.scriptData=e.encodeScriptData(t),this.script=e.bytes}addVariableOutputs(e=1){let t=e;for(;t;)this.pushOutput({type:ve.Variable}),t-=1;return this.outputs.length-1}calculateMaxGas(e,t){let{consensusParameters:n}=e,{feeParameters:{gasPerByte:r},txParameters:{maxGasPerTx:i}}=n,a=this.toTransaction().witnesses.reduce((s,o)=>s+o.dataLength,0);return P_({gasPerByte:r,minGas:t,witnessesLength:a,witnessLimit:this.witnessLimit,gasLimit:this.gasLimit,maxGasPerTx:i})}addContractInputAndOutput(e){let t=Pa(e);if(this.getContractInputs().find(r=>r.contractId===t.toB256()))return this;let n=super.pushInput({type:ye.Contract,contractId:t.toB256(),txPointer:"0x00000000000000000000000000000000"});return this.pushOutput({type:ve.Contract,inputIndex:n}),this}getTransactionId(e){return M_(this,e)}setData(e,t){let n=new Dn(e);return this.scriptData=n.functions.main.encodeArguments(t),this}metadataGas(e){return TC({gasCosts:e,txBytesSize:this.byteSize()})}},Fn=e=>{if(e instanceof Wi||e instanceof I_||e instanceof C_)return e;let{type:t}=e;switch(e.type){case Ve.Script:return Wi.from(e);case Ve.Create:return I_.from(e);case Ve.Blob:return C_.from(e);default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${t}.`)}},Va=e=>e.type===Ve.Script,YQ=e=>e.type===Ve.Create;var $Q=e=>{let{gasPrice:t,rawPayload:n,tip:r,totalFee:i,consensusParameters:{gasCosts:a,feeParams:s,maxGasPerTx:o}}=e;if(i)return i;let c=I(s.gasPerByte),u=I(s.gasPriceFactor),d=D(n),[p]=new An().decode(d,0),{type:h,witnesses:_,inputs:w,policies:A}=p,S=I(0),b=I(0);if(h!==Ve.Create&&h!==Ve.Script)return I(0);if(h===Ve.Create){let{bytecodeWitnessIndex:V,storageSlots:Z}=p,fe=I(D(_[V].data).length);S=xC({contractBytesSize:fe,gasCosts:a,stateRootSize:Z.length||0,txBytesSize:d.length})}else{let{scriptGasLimit:V}=p;V&&(b=V),S=TC({gasCosts:a,txBytesSize:d.length})}let T=SC({gasCosts:a,gasPerByte:I(c),inputs:w,metadataGas:S,txBytesSize:d.length}),B=A.find(V=>V.type===sn.WitnessLimit)?.data,O=_.reduce((V,Z)=>V+Z.dataLength,0),z=P_({gasPerByte:c,minGas:T,witnessesLength:O,gasLimit:b,witnessLimit:B,maxGasPerTx:o});return xd({gasPrice:t,gas:z,priceFactor:u,tip:r})},KQ=({abi:e,receipt:t})=>{let n=new Dn(e),r=t.param1.toHex(8),i=n.getFunction(r),a=i.jsonFn.inputs,s=t.param2.toHex(),o,c=i.decodeArguments(s);return c&&(o=a.reduce((d,p,h)=>{let _=c[h],w=p.name;return w?{...d,[w]:JSON.parse(JSON.stringify(_))}:d},{})),{functionSignature:i.signature,functionName:i.name,argumentsProvided:o,...t.amount?.isZero()?{}:{amount:t.amount,assetId:t.assetId}}};function jQ(e,t){return e.filter(n=>t.includes(n.type))}function F_(e,t){return e.filter(n=>n.type===t)}function eU(e){return F_(e,ye.Coin)}function tU(e){return F_(e,ye.Message)}function kC(e){return jQ(e,[ye.Coin,ye.Message])}function oC(e){return e.type===ye.Coin}function nU(e){return F_(e,ye.Contract)}function rU(e,t){return eU(e).find(r=>r.assetId===t)}function iU(e,t){let n=new Map;return kC(e).forEach(r=>{let i=oC(r)?r.assetId:t,a=oC(r)?r.owner:r.recipient,s=n.get(i);s||(s=new Map,n.set(i,s));let o=s.get(a);o||(o=new rr(0),s.set(a,o)),s.set(a,o.add(r.amount))}),n}function aU(e){return tU(e)?.[0]}function BC(e,t,n=!1){let r=rU(e,t);if(r)return r;if(n)return aU(e)}function sU(e,t){if(t==null)return;let n=e?.[t];if(n){if(n.type!==ye.Contract)throw new v(x.INVALID_TRANSACTION_INPUT,"Contract input should be of type 'contract'.");return n}}function L_(e){return e.type===ye.Coin?e.owner.toString():e.type===ye.Message?e.recipient.toString():""}function Pd(e,t){return e.filter(n=>n.type===t)}function oU(e){return Pd(e,ve.ContractCreated)}function OC(e){return Pd(e,ve.Coin)}function cU(e){return Pd(e,ve.Change)}function uU(e){return Pd(e,ve.Contract)}function Td(e,t){return(e??[]).filter(n=>n.type===t)}function PC(e){switch(e){case Ve.Mint:return"Mint";case Ve.Create:return"Create";case Ve.Script:return"Script";case Ve.Blob:return"Blob";default:throw new v(x.UNSUPPORTED_TRANSACTION_TYPE,`Unsupported transaction type: ${e}.`)}}function no(e,t){return PC(e)===t}function lU(e){return no(e,"Mint")}function DC(e){return no(e,"Create")}function MC(e){return no(e,"Script")}function dU(e){return no(e,"Upgrade")}function fU(e){return no(e,"Upload")}function pU(e){return no(e,"Blob")}function hU(e){return Td(e,le.Call)}function mU(e){return Td(e,le.MessageOut)}function gU(e,t){let n=e.assetsSent||[],r=t.assetsSent||[],i=new Map;return n.forEach(a=>{i.set(a.assetId,{...a})}),r.forEach(a=>{let s=i.get(a.assetId);s?s.amount=I(s.amount).add(a.amount):i.set(a.assetId,{...a})}),Array.from(i.values())}function _U(e,t){return e.name===t.name&&e.from?.address===t.from?.address&&e.to?.address===t.to?.address&&e.from?.type===t.from?.type&&e.to?.type===t.to?.type}function AU(e,t){return t.assetsSent?.length?e.assetsSent?.length?gU(e,t):t.assetsSent:e.assetsSent}function yU(e,t){return t.calls?.length?[...e.calls||[],...t.calls]:e.calls}function vU(e,t){return{...e,assetsSent:AU(e,t),calls:yU(e,t)}}function Qu(e,t){let n=e.findIndex(r=>_U(r,t));return n===-1?[...e,t]:e.map((r,i)=>i===n?vU(r,t):r)}function wU({inputs:e,receipts:t,baseAssetId:n}){return mU(t).reduce((a,s)=>{let o=BC(e,n,!0);if(o){let c=L_(o);return Qu(a,{name:"Withdraw from Fuel",from:{type:1,address:c},to:{type:1,address:s.recipient.toString(),chain:"ethereum"},assetsSent:[{amount:s.amount,assetId:n}]})}return a},[])}function bU(e,t,n,r,i){let a=t?.[e.contractID];return a?[KQ({abi:a,receipt:n,rawPayload:r,maxInputs:i})]:[]}function EU(e){return e.amount?.isZero()?void 0:[{amount:e.amount,assetId:e.assetId}]}function CU(e,t,n,r,i,a,s){let o=e.assetId===Te?s:e.assetId,c=BC(n,o,o===s);if(!c)return[];let u=L_(c),d=bU(t,r,e,i,a);return[{name:"Contract call",from:{type:1,address:u},to:{type:0,address:e.to},assetsSent:EU(e),calls:d}]}function IU({inputs:e,outputs:t,receipts:n,abiMap:r,rawPayload:i,maxInputs:a,baseAssetId:s}){let o=hU(n);return uU(t).flatMap(u=>{let d=sU(e,u.inputIndex);return d?o.filter(p=>p.to===d.contractID).flatMap(p=>CU(p,d,e,r,i,a,s)):[]})}function SU(e,t,n){let{to:r,assetId:i,amount:a}=e,{from:s}=e,o=t.some(u=>u.contractID===r)?0:1;return Te===s&&(s=n.find(d=>d.assetId===i)?.to||s),{name:"Transfer asset",from:{type:t.some(u=>u.contractID===s)?0:1,address:s},to:{type:o,address:r},assetsSent:[{assetId:i.toString(),amount:a}]}}function xU({inputs:e,outputs:t,receipts:n,baseAssetId:r}){let i=[],a=OC(t),s=nU(e),o=cU(t),c=iU(e,r);a.forEach(({amount:p,assetId:h,to:_})=>{let w=c.get(h)||new Map,A,S;for(let[b,T]of w)if(S||(S=b),T.gte(p)){A=b;break}A=A||S,A&&(i=Qu(i,{name:"Transfer asset",from:{type:1,address:A},to:{type:1,address:_},assetsSent:[{assetId:h,amount:p}]}))});let u=Td(n,le.Transfer),d=Td(n,le.TransferOut);return[...u,...d].forEach(p=>{let h=SU(p,s,o);i=Qu(i,h)}),i}function TU(e){return OC(e).reduce((r,i)=>Qu(r,{name:"Pay network fee to block producer",from:{type:1,address:"Network"},to:{type:1,address:i.to.toString()},assetsSent:[{assetId:i.assetId.toString(),amount:i.amount}]}),[])}function NU({inputs:e,outputs:t}){let n=oU(t),r=kC(e)[0],i=L_(r);return n.reduce((s,o)=>Qu(s,{name:"Contract created",from:{type:1,address:i},to:{type:0,address:o?.contractId||""}}),[])}function RU({transactionType:e,inputs:t,outputs:n,receipts:r,abiMap:i,rawPayload:a,maxInputs:s,baseAssetId:o}){return DC(e)?[...NU({inputs:t,outputs:n})]:MC(e)?[...xU({inputs:t,outputs:n,receipts:r,baseAssetId:o}),...IU({inputs:t,outputs:n,receipts:r,abiMap:i,rawPayload:a,maxInputs:s,baseAssetId:o}),...wU({inputs:t,receipts:r,baseAssetId:o})]:[...TU(n)]}var $s=e=>{let t=DQ(e);switch(t.type){case le.ReturnData:return{...t,data:e.data||"0x"};case le.LogData:return{...t,data:e.data||"0x"};default:return t}},kU=e=>{let t=[];return e.forEach(n=>{n.type===le.Mint&&t.push({subId:n.subId,contractId:n.contractId,assetId:n.assetId,amount:n.val})}),t},BU=e=>{let t=[];return e.forEach(n=>{n.type===le.Burn&&t.push({subId:n.subId,contractId:n.contractId,assetId:n.assetId,amount:n.val})}),t},OU=e=>{switch(e){case"FailureStatus":return"failure";case"SuccessStatus":return"success";case"SubmittedStatus":return"submitted";case"SqueezedOutStatus":return"squeezedout";default:throw new v(x.INVALID_TRANSACTION_STATUS,`Invalid transaction status: ${e}.`)}},PU=e=>{let t,n,r,i,a,s=!1,o=!1,c=!1;if(e?.type)switch(r=OU(e.type),e.type){case"SuccessStatus":t=e.time,n=e.block.id,o=!0,i=I(e.totalFee),a=I(e.totalGas);break;case"FailureStatus":t=e.time,n=e.block.id,s=!0,i=I(e.totalFee),a=I(e.totalGas);break;case"SubmittedStatus":t=e.time,c=!0;break;default:}return{time:t,blockId:n,status:r,totalFee:i,totalGas:a,isStatusFailure:s,isStatusSuccess:o,isStatusPending:c}};function DU(e){let{id:t,receipts:n,gasPerByte:r,gasPriceFactor:i,transaction:a,transactionBytes:s,gqlTransactionStatus:o,abiMap:c={},maxInputs:u,gasCosts:d,maxGasPerTx:p,gasPrice:h,baseAssetId:_}=e,w=qu(n),A=L(s),S=RU({transactionType:a.type,inputs:a.inputs||[],outputs:a.outputs||[],receipts:n,rawPayload:A,abiMap:c,maxInputs:u,baseAssetId:_}),b=PC(a.type),T=I(a.policies?.find(R=>R.type===sn.Tip)?.data),{isStatusFailure:B,isStatusPending:O,isStatusSuccess:z,blockId:Q,status:V,time:Z,totalFee:fe}=PU(o),ne=$Q({totalFee:fe,gasPrice:h,rawPayload:A,tip:T,consensusParameters:{gasCosts:d,maxGasPerTx:p,feeParams:{gasPerByte:r,gasPriceFactor:i}}}),k=kU(n),pe=BU(n),M;return Z&&(M=zl.fromTai64(Z)),{id:t,tip:T,fee:ne,gasUsed:w,operations:S,type:b,blockId:Q,time:Z,status:V,receipts:n,mintedAssets:k,burnedAssets:pe,isTypeMint:lU(a.type),isTypeCreate:DC(a.type),isTypeScript:MC(a.type),isTypeUpgrade:dU(a.type),isTypeUpload:fU(a.type),isTypeBlob:pU(a.type),isStatusFailure:B,isStatusSuccess:z,isStatusPending:O,date:M,transaction:a}}function Dd(e,t,n={}){return e.reduce((r,i)=>{if(i.type===le.LogData||i.type===le.Log){let a=new Dn(n[i.id]||t),s=i.type===le.Log?new $("u64").encode(i.val0):i.data,[o]=a.decodeLog(s,i.val1.toString());r.push(o)}return r},[])}function MU(e){return e.map(t=>{let n="amount"in t?{...t,amount:I(t.amount)}:t;switch(n.type){case"CoinOutput":return{...n,type:ve.Coin};case"ContractOutput":return{...n,type:ve.Contract,inputIndex:parseInt(n.inputIndex,10)};case"ChangeOutput":return{...n,type:ve.Change};case"VariableOutput":return{...n,type:ve.Variable};case"ContractCreated":return{...n,type:ve.ContractCreated,contractId:n.contract};default:return Xw(n)}})}var S_=class{constructor(e,t,n,r){this.submitTxSubscription=r,this.id=typeof e=="string"?e:e.getTransactionId(t.getChainId()),this.provider=t,this.abis=n,this.request=typeof e=="string"?void 0:e}id;provider;gasUsed=I(0);gqlTransaction;request;status;abis;static async create(e,t,n){let r=new S_(e,t,n);return await r.fetch(),r}applyMalleableSubscriptionFields(e){let t=this.status;if(!t)return;let n=e;(t.type==="SuccessStatus"||t.type==="FailureStatus")&&(n.inputs=n.inputs.map((r,i)=>{if("txPointer"in r){let a=t.transaction.inputs?.[i];return{...r,txPointer:Mi.decodeFromGqlScalar(a.txPointer)}}return r}),n.outputs=MU(t.transaction.outputs),"receiptsRoot"in t.transaction&&(n.receiptsRoot=t.transaction.receiptsRoot))}async getTransaction(){if(this.request){let t=this.request.toTransaction();return this.applyMalleableSubscriptionFields(t),{tx:t,bytes:this.request.toTransactionBytes()}}let e=this.gqlTransaction??await this.fetch();return{tx:this.decodeTransaction(e),bytes:D(e.rawPayload)}}getReceipts(){let e=this.status??this.gqlTransaction?.status;switch(e?.type){case"SuccessStatus":case"FailureStatus":return e.receipts.map($s);default:return[]}}async fetch(){let e=await this.provider.operations.getTransactionWithReceipts({transactionId:this.id});if(!e.transaction){let t=await this.provider.operations.statusChange({transactionId:this.id});for await(let{statusChange:n}of t)if(n){this.status=n;break}return this.fetch()}return this.gqlTransaction=e.transaction,e.transaction}decodeTransaction(e){return new An().decode(D(e.rawPayload),0)?.[0]}async getTransactionSummary(e){let{tx:t,bytes:n}=await this.getTransaction(),{gasPerByte:r,gasPriceFactor:i,gasCosts:a,maxGasPerTx:s}=this.provider.getGasConfig(),o=await this.provider.getLatestGasPrice(),c=this.provider.getChain().consensusParameters.txParameters.maxInputs,u=this.provider.getBaseAssetId();return DU({id:this.id,receipts:this.getReceipts(),transaction:t,transactionBytes:n,gqlTransactionStatus:this.status??this.gqlTransaction?.status,gasPerByte:r,gasPriceFactor:i,abiMap:e,maxInputs:c,gasCosts:a,maxGasPerTx:s,gasPrice:o,baseAssetId:u})}async waitForStatusChange(){let e=this.gqlTransaction?.status?.type;if(e&&e!=="SubmittedStatus")return;let t=this.submitTxSubscription??await this.provider.operations.statusChange({transactionId:this.id});for await(let n of t){let r="statusChange"in n?n.statusChange:n.submitAndAwaitStatus;if(this.status=r,r.type==="SqueezedOutStatus")throw this.unsetResourceCache(),new v(x.TRANSACTION_SQUEEZED_OUT,`Transaction Squeezed Out with reason: ${r.reason}`);if(r.type!=="SubmittedStatus")break}}async assembleResult(e){let t=await this.getTransactionSummary(e),n={...t},r=[];this.abis&&(r=Dd(t.receipts,this.abis.main,this.abis.otherContractsAbis),n.logs=r);let{receipts:i}=n,a=this.status??this.gqlTransaction?.status;if(a?.type==="FailureStatus"){this.unsetResourceCache();let{reason:s}=a;throw Bd({receipts:i,statusReason:s,logs:r})}return n}async waitForResult(e){return await this.waitForStatusChange(),this.assembleResult(e)}async wait(e){return this.waitForResult(e)}unsetResourceCache(){this.provider.cache?.unset(this.id)}};function FU(e,t){let n=e.baseDelay??150;switch(e.backoff){case"linear":return n*t;case"fixed":return n;case"exponential":default:return 2**(t-1)*n}}function FC(e,t,n=0){return t===void 0?e:async(...r)=>{try{return await e(...r)}catch(i){let a=i;if(a.cause?.code!=="ECONNREFUSED")throw a;let s=n+1;if(s>t.maxRetries)throw a;let o=FU(t,s);return await Hw(o),FC(e,t,s)(...r)}}}var LU=(e,t)=>{switch(e){case"not enough coins to fit the target":throw new v(x.NOT_ENOUGH_FUNDS,"The account(s) sending the transaction don't have enough funds to cover the transaction.",{},t);default:throw new v(x.INVALID_REQUEST,e)}},cC=10,uC=512,QU=5,UU=2e4,qU=e=>{let{name:t,daHeight:n,consensusParameters:r,latestBlock:i}=e,{contractParams:a,feeParams:s,predicateParams:o,scriptParams:c,txParams:u,gasCosts:d,baseAssetId:p,chainId:h,version:_}=r;return{name:t,baseChainHeight:I(n),consensusParameters:{version:_,chainId:I(h),baseAssetId:p,feeParameters:{version:s.version,gasPerByte:I(s.gasPerByte),gasPriceFactor:I(s.gasPriceFactor)},contractParameters:{version:a.version,contractMaxSize:I(a.contractMaxSize),maxStorageSlots:I(a.maxStorageSlots)},txParameters:{version:u.version,maxInputs:I(u.maxInputs),maxOutputs:I(u.maxOutputs),maxWitnesses:I(u.maxWitnesses),maxGasPerTx:I(u.maxGasPerTx),maxSize:I(u.maxSize),maxBytecodeSubsections:I(u.maxBytecodeSubsections)},predicateParameters:{version:o.version,maxPredicateLength:I(o.maxPredicateLength),maxPredicateDataLength:I(o.maxPredicateDataLength),maxGasPerPredicate:I(o.maxGasPerPredicate),maxMessageDataLength:I(o.maxMessageDataLength)},scriptParameters:{version:c.version,maxScriptLength:I(c.maxScriptLength),maxScriptDataLength:I(c.maxScriptDataLength)},gasCosts:d},latestBlock:{id:i.id,height:I(i.height),time:i.header.time,transactions:i.transactions.map(w=>({id:w.id}))}}},x_,LC,Ur=class{constructor(e,t={}){this.url=e,Gi(this,x_),nt(this,"operations"),nt(this,"cache"),nt(this,"options",{timeout:void 0,resourceCacheTTL:void 0,fetch:void 0,retryOptions:void 0}),this.options={...this.options,...t},this.url=e,this.operations=this.createOperations();let{resourceCacheTTL:n}=this.options;Pn(n)?n!==-1?this.cache=new rC(n):this.cache=void 0:this.cache=new rC(UU)}static clearChainAndNodeCaches(){Ur.nodeInfoCache={},Ur.chainInfoCache={}}static getFetchFn(e){let{retryOptions:t,timeout:n}=e;return FC(async(...r)=>{let i=r[0],a=r[1],s=n?AbortSignal.timeout(n):void 0,o={...a,signal:s};return e.requestMiddleware&&(o=await e.requestMiddleware(o)),e.fetch?e.fetch(i,o,e):fetch(i,o)},t)}static extractBasicAuth(e){let t=new URL(e),n=t.username,r=t.password,i=`${t.origin}${t.pathname}`;if(!(n&&r))return{url:e,auth:void 0};let a=`Basic ${btoa(`${n}:${r}`)}`;return{url:i,auth:a}}static async create(e,t={}){let{url:n,auth:r}=this.extractBasicAuth(e),i=new Ur(n,{...t,requestMiddleware:async a=>(r&&a&&(a.headers??={},a.headers.Authorization=r),t.requestMiddleware?.(a)??a)});return await i.fetchChainAndNodeInfo(),i}getChain(){let e=Ur.chainInfoCache[this.url];if(!e)throw new v(x.CHAIN_INFO_CACHE_EMPTY,"Chain info cache is empty. Make sure you have called `Provider.create` to initialize the provider.");return e}getNode(){let e=Ur.nodeInfoCache[this.url];if(!e)throw new v(x.NODE_INFO_CACHE_EMPTY,"Node info cache is empty. Make sure you have called `Provider.create` to initialize the provider.");return e}getGasConfig(){let{txParameters:{maxGasPerTx:e},predicateParameters:{maxGasPerPredicate:t},feeParameters:{gasPriceFactor:n,gasPerByte:r},gasCosts:i}=this.getChain().consensusParameters;return{maxGasPerTx:e,maxGasPerPredicate:t,gasPriceFactor:n,gasPerByte:r,gasCosts:i}}async connect(e,t){this.url=e,this.options=t??this.options,this.operations=this.createOperations(),await this.fetchChainAndNodeInfo()}async fetchChainAndNodeInfo(){let e=await this.fetchNode();return Ur.ensureClientVersionIsSupported(e),{chain:await this.fetchChain(),nodeInfo:e}}static ensureClientVersionIsSupported(e){let{isMajorSupported:t,isMinorSupported:n,supportedVersion:r}=Ww(e.nodeVersion);(!t||!n)&&console.warn(`The Fuel Node that you are trying to connect to is using fuel-core version ${e.nodeVersion},
927
+ which is not supported by the version of the TS SDK that you are using.
928
+ Things may not work as expected.
929
+ Supported fuel-core version: ${r}.`)}createOperations(){let e=Ur.getFetchFn(this.options),t=new AC.GraphQLClient(this.url,{fetch:(i,a)=>e(i,a,this.options),responseMiddleware:i=>{if("response"in i){let a=i.response;if(Array.isArray(a?.errors))for(let s of a.errors)LU(s.message,s)}}}),n=(i,a)=>i.definitions.find(c=>c.kind==="OperationDefinition")?.operation==="subscription"?IC.create({url:this.url,query:i,fetchFn:(c,u)=>e(c,u,this.options),variables:a}):t.request(i,a),r=i=>({getBlobs(a){let s=a.blobIds.map((d,p)=>`$blobId${p}: BlobId!`).join(", "),o=a.blobIds.map((d,p)=>`blob${p}: blob(id: $blobId${p}) { id }`).join(`
930
+ `),c=a.blobIds.reduce((d,p,h)=>(d[`blobId${h}`]=p,d),{}),u=j`
931
+ query getBlobs(${s}) {
932
+ ${o}
933
+ }
934
+ `;return i(u,c)}});return{...NQ(n),...r(n)}}async getVersion(){let{nodeInfo:{nodeVersion:e}}=await this.operations.getVersion();return e}async getBlockNumber(){let{chain:e}=await this.operations.getChain();return I(e.latestBlock.height,10)}async fetchNode(){let{nodeInfo:e}=await this.operations.getNodeInfo(),t={maxDepth:I(e.maxDepth),maxTx:I(e.maxTx),nodeVersion:e.nodeVersion,utxoValidation:e.utxoValidation,vmBacktrace:e.vmBacktrace};return Ur.nodeInfoCache[this.url]=t,t}async fetchChain(){let{chain:e}=await this.operations.getChain(),t=qU(e);return Ur.chainInfoCache[this.url]=t,t}getChainId(){let{consensusParameters:{chainId:e}}=this.getChain();return e.toNumber()}getBaseAssetId(){let{consensusParameters:{baseAssetId:e}}=this.getChain();return e}validateTransaction(e,t){let{maxOutputs:n,maxInputs:r}=t.txParameters;if(I(e.inputs.length).gt(r))throw new v(x.MAX_INPUTS_EXCEEDED,"The transaction exceeds the maximum allowed number of inputs.");if(I(e.outputs.length).gt(n))throw new v(x.MAX_OUTPUTS_EXCEEDED,"The transaction exceeds the maximum allowed number of outputs.")}async sendTransaction(e,{estimateTxDependencies:t=!0}={}){let n=Fn(e);t&&await this.estimateTxDependencies(n);let{consensusParameters:r}=this.getChain();this.validateTransaction(n,r);let i=L(n.toTransactionBytes()),a;Va(n)&&(a=n.abis);let s=await this.operations.submitAndAwaitStatus({encodedTransaction:i});return b_(this,x_,LC).call(this,n.inputs,n.getTransactionId(this.getChainId())),new S_(n,this,a,s)}async dryRun(e,{utxoValidation:t,estimateTxDependencies:n=!0}={}){let r=Fn(e);if(n)return this.estimateTxDependencies(r);let i=L(r.toTransactionBytes()),{dryRun:a}=await this.operations.dryRun({encodedTransactions:i,utxoValidation:t||!1}),[{receipts:s,status:o}]=a;return{receipts:s.map($s),dryRunStatus:o}}async estimatePredicates(e){if(!!!e.inputs.find(a=>"predicate"in a&&a.predicate&&!Gh(D(a.predicate),D("0x"))&&new rr(a.predicateGasUsed).isZero()))return e;let n=L(e.toTransactionBytes()),r=await this.operations.estimatePredicates({encodedTransaction:n}),{estimatePredicates:{inputs:i}}=r;return i&&i.forEach((a,s)=>{"predicateGasUsed"in a&&I(a.predicateGasUsed).gt(0)&&(e.inputs[s].predicateGasUsed=a.predicateGasUsed)}),e}async estimateTxDependencies(e){if(YQ(e))return{receipts:[],outputVariables:0,missingContractIds:[]};let t=[],n=[],r=0,i;for(let a=0;a<cC;a++){let{dryRun:[{receipts:s,status:o}]}=await this.operations.dryRun({encodedTransactions:[L(e.toTransactionBytes())],utxoValidation:!1});t=s.map($s),i=o;let{missingOutputVariables:c,missingOutputContractIds:u}=aC(t);if((c.length!==0||u.length!==0)&&Va(e)){r+=c.length,e.addVariableOutputs(c.length),u.forEach(({contractId:h})=>{e.addContractInputAndOutput(se.fromString(h)),n.push(h)});let{maxFee:p}=await this.estimateTxGasAndFee({transactionRequest:e});e.maxFee=p}else break}return{receipts:t,outputVariables:r,missingContractIds:n,dryRunStatus:i}}async estimateMultipleTxDependencies(e){let t=e.map(()=>({receipts:[],outputVariables:0,missingContractIds:[],dryRunStatus:void 0})),n=at(e),r=new Map;n.forEach((s,o)=>{Va(s)&&r.set(o,L(s.toTransactionBytes()))});let i=Array.from(r.keys()),a=0;for(;i.length>0&&a<cC;){let s=i.map(u=>r.get(u)),o=await this.operations.dryRun({encodedTransactions:s,utxoValidation:!1}),c=[];for(let u=0;u<o.dryRun.length;u++){let d=i[u],{receipts:p,status:h}=o.dryRun[u],_=t[d];_.receipts=p.map($s),_.dryRunStatus=h;let{missingOutputVariables:w,missingOutputContractIds:A}=aC(_.receipts),S=w.length>0||A.length>0,b=n[d];if(S&&Va(b)){_.outputVariables+=w.length,b.addVariableOutputs(w.length),A.forEach(({contractId:B})=>{b.addContractInputAndOutput(se.fromString(B)),_.missingContractIds.push(B)});let{maxFee:T}=await this.estimateTxGasAndFee({transactionRequest:b});b.maxFee=T,r.set(d,L(b.toTransactionBytes())),c.push(d)}}i=c,a+=1}return t}async dryRunMultipleTransactions(e,{utxoValidation:t,estimateTxDependencies:n=!0}={}){if(n)return this.estimateMultipleTxDependencies(e);let r=e.map(s=>L(s.toTransactionBytes())),{dryRun:i}=await this.operations.dryRun({encodedTransactions:r,utxoValidation:t||!1});return i.map(({receipts:s,status:o})=>({receipts:s.map($s),dryRunStatus:o}))}async estimateTxGasAndFee(e){let{transactionRequest:t}=e,{gasPrice:n}=e,r=this.getChain(),{gasPriceFactor:i,maxGasPerTx:a}=this.getGasConfig(),s=t.calculateMinGas(r);n||(n=await this.estimateGasPrice(10));let o=xd({gasPrice:I(n),gas:s,priceFactor:i,tip:t.tip}).add(1),c=I(0);Va(t)&&(c=t.gasLimit,t.gasLimit.eq(0)&&(t.gasLimit=s,t.gasLimit=a.sub(t.calculateMaxGas(r,s)),c=t.gasLimit));let u=t.calculateMaxGas(r,s),d=xd({gasPrice:I(n),gas:u,priceFactor:i,tip:t.tip}).add(1);return{minGas:s,minFee:o,maxGas:u,maxFee:d,gasPrice:n,gasLimit:c}}async simulate(e,{estimateTxDependencies:t=!0}={}){let n=Fn(e);if(t)return this.estimateTxDependencies(n);let r=[L(n.toTransactionBytes())],{dryRun:i}=await this.operations.dryRun({encodedTransactions:r,utxoValidation:!0});return{receipts:i.map(s=>{let{id:o,receipts:c,status:u}=s,d=c.map($s);return{id:o,receipts:d,status:u}})[0].receipts}}async getTransactionCost(e,{signatureCallback:t}={}){let n=at(Fn(e)),r=n.maxFee.eq(0),i=Va(n);i&&(n.gasLimit=I(0));let a=at(n),s=0;if(t&&Va(a)){let T=a.witnesses.length;await t(a),s=a.witnesses.length-T}await this.estimatePredicates(a),n.updatePredicateGasUsed(a.inputs);let{maxFee:o,maxGas:c,minFee:u,minGas:d,gasPrice:p,gasLimit:h}=await this.estimateTxGasAndFee({transactionRequest:a}),_=[],w,A=[],S=0,b=I(0);if(n.maxFee=o,i){if(n.gasLimit=h,t&&await t(n),{receipts:_,missingContractIds:A,outputVariables:S,dryRunStatus:w}=await this.estimateTxDependencies(n),w&&"reason"in w)throw this.extractDryRunError(n,_,w);b=qu(_),n.gasLimit=b,{maxFee:o,maxGas:c,minFee:u,minGas:d,gasPrice:p}=await this.estimateTxGasAndFee({transactionRequest:n,gasPrice:p})}return{receipts:_,gasUsed:b,gasPrice:p,minGas:d,maxGas:c,minFee:u,maxFee:o,outputVariables:S,missingContractIds:A,addedSignatures:s,estimatedPredicates:n.inputs,dryRunStatus:w,updateMaxFee:r}}async getCoins(e,t,n){let r=se.fromAddressOrString(e),{coins:{edges:i,pageInfo:a}}=await this.operations.getCoins({...this.validatePaginationArgs({paginationLimit:uC,inputArgs:n}),filter:{owner:r.toB256(),assetId:t&&L(t)}});return{coins:i.map(({node:o})=>({id:o.utxoId,assetId:o.assetId,amount:I(o.amount),owner:se.fromAddressOrString(o.owner),blockCreated:I(o.blockCreated),txCreatedIdx:I(o.txCreatedIdx)})),pageInfo:a}}async getResourcesToSpend(e,t,n){let r=se.fromAddressOrString(e),i={messages:n?.messages?.map(c=>L(c))||[],utxos:n?.utxos?.map(c=>L(c))||[]};if(this.cache){let c=this.cache.getActiveData();i.messages.push(...c.messages),i.utxos.push(...c.utxos)}let a={owner:r.toB256(),queryPerAsset:t.map(Rd).map(({assetId:c,amount:u,max:d})=>({assetId:L(c),amount:u.toString(10),max:d?d.toString(10):void 0})),excludedIds:i};return(await this.operations.getCoinsToSpend(a)).coinsToSpend.flat().map(c=>{switch(c.type){case"MessageCoin":return{amount:I(c.amount),assetId:c.assetId,daHeight:I(c.daHeight),sender:se.fromAddressOrString(c.sender),recipient:se.fromAddressOrString(c.recipient),nonce:c.nonce};case"Coin":return{id:c.utxoId,amount:I(c.amount),assetId:c.assetId,owner:se.fromAddressOrString(c.owner),blockCreated:I(c.blockCreated),txCreatedIdx:I(c.txCreatedIdx)};default:return null}}).filter(c=>!!c)}async getBlobs(e){let t=await this.operations.getBlobs({blobIds:e}),n=[];return Object.keys(t).forEach(r=>{let i=t[r];n.push(i?.id??null)}),n.filter(r=>r)}async getBlock(e){let t;typeof e=="number"?t={height:I(e).toString(10)}:e==="latest"?t={height:(await this.getBlockNumber()).toString(10)}:e.length===66?t={blockId:e}:t={blockId:I(e).toString(10)};let{block:n}=await this.operations.getBlock(t);if(!n)return null;let{header:r,height:i,id:a,transactions:s}=n;return{id:a,height:I(i),time:r.time,header:{applicationHash:r.applicationHash,daHeight:I(r.daHeight),eventInboxRoot:r.eventInboxRoot,messageOutboxRoot:r.messageOutboxRoot,prevRoot:r.prevRoot,stateTransitionBytecodeVersion:r.stateTransitionBytecodeVersion,transactionsCount:r.transactionsCount,transactionsRoot:r.transactionsRoot},transactionIds:s.map(o=>o.id)}}async getBlocks(e){let{blocks:{edges:t,pageInfo:n}}=await this.operations.getBlocks({...this.validatePaginationArgs({paginationLimit:QU,inputArgs:e})});return{blocks:t.map(({node:i})=>({id:i.id,height:I(i.height),time:i.header.time,header:{applicationHash:i.header.applicationHash,daHeight:I(i.header.daHeight),eventInboxRoot:i.header.eventInboxRoot,messageOutboxRoot:i.header.messageOutboxRoot,prevRoot:i.header.prevRoot,stateTransitionBytecodeVersion:i.header.stateTransitionBytecodeVersion,transactionsCount:i.header.transactionsCount,transactionsRoot:i.header.transactionsRoot},transactionIds:i.transactions.map(a=>a.id)})),pageInfo:n}}async getBlockWithTransactions(e){let t;typeof e=="number"?t={blockHeight:I(e).toString(10)}:e==="latest"?t={blockHeight:(await this.getBlockNumber()).toString()}:t={blockId:e};let{block:n}=await this.operations.getBlockWithTransactions(t);return n?{id:n.id,height:I(n.height,10),time:n.header.time,header:{applicationHash:n.header.applicationHash,daHeight:I(n.header.daHeight),eventInboxRoot:n.header.eventInboxRoot,messageOutboxRoot:n.header.messageOutboxRoot,prevRoot:n.header.prevRoot,stateTransitionBytecodeVersion:n.header.stateTransitionBytecodeVersion,transactionsCount:n.header.transactionsCount,transactionsRoot:n.header.transactionsRoot},transactionIds:n.transactions.map(r=>r.id),transactions:n.transactions.map(r=>new An().decode(D(r.rawPayload),0)?.[0])}:null}async getTransaction(e){let{transaction:t}=await this.operations.getTransaction({transactionId:e});if(!t)return null;try{return new An().decode(D(t.rawPayload),0)?.[0]}catch(n){if(n instanceof v&&n.code===x.UNSUPPORTED_TRANSACTION_TYPE)return console.warn("Unsupported transaction type encountered"),null;throw n}}async getTransactions(e){let{transactions:{edges:t,pageInfo:n}}=await this.operations.getTransactions(e),r=new An;return{transactions:t.map(({node:{rawPayload:a}})=>{try{return r.decode(D(a),0)[0]}catch(s){if(s instanceof v&&s.code===x.UNSUPPORTED_TRANSACTION_TYPE)return console.warn("Unsupported transaction type encountered"),null;throw s}}).filter(a=>a!==null),pageInfo:n}}async getContract(e){let{contract:t}=await this.operations.getContract({contractId:e});return t||null}async getContractBalance(e,t){let{contractBalance:n}=await this.operations.getContractBalance({contract:se.fromAddressOrString(e).toB256(),asset:L(t)});return I(n.amount,10)}async getBalance(e,t){let{balance:n}=await this.operations.getBalance({owner:se.fromAddressOrString(e).toB256(),assetId:L(t)});return I(n.amount,10)}async getBalances(e){let{balances:{edges:t}}=await this.operations.getBalances({first:1e4,filter:{owner:se.fromAddressOrString(e).toB256()}});return{balances:t.map(({node:r})=>({assetId:r.assetId,amount:I(r.amount)}))}}async getMessages(e,t){let{messages:{edges:n,pageInfo:r}}=await this.operations.getMessages({...this.validatePaginationArgs({inputArgs:t,paginationLimit:uC}),owner:se.fromAddressOrString(e).toB256()});return{messages:n.map(({node:a})=>({messageId:Or.getMessageId({sender:a.sender,recipient:a.recipient,nonce:a.nonce,amount:I(a.amount),data:a.data}),sender:se.fromAddressOrString(a.sender),recipient:se.fromAddressOrString(a.recipient),nonce:a.nonce,amount:I(a.amount),data:Or.decodeData(a.data),daHeight:I(a.daHeight)})),pageInfo:r}}async getMessageProof(e,t,n,r){let i={transactionId:e,nonce:t};if(n&&r)throw new v(x.INVALID_INPUT_PARAMETERS,"commitBlockId and commitBlockHeight cannot be used together");n&&(i={...i,commitBlockId:n}),r&&(i={...i,commitBlockHeight:r.toNumber().toString()});let a=await this.operations.getMessageProof(i);if(!a.messageProof)return null;let{messageProof:s,messageBlockHeader:o,commitBlockHeader:c,blockProof:u,sender:d,recipient:p,amount:h,data:_}=a.messageProof;return{messageProof:{proofIndex:I(s.proofIndex),proofSet:s.proofSet},blockProof:{proofIndex:I(u.proofIndex),proofSet:u.proofSet},messageBlockHeader:{id:o.id,daHeight:I(o.daHeight),transactionsCount:Number(o.transactionsCount),transactionsRoot:o.transactionsRoot,height:I(o.height),prevRoot:o.prevRoot,time:o.time,applicationHash:o.applicationHash,messageReceiptCount:Number(o.messageReceiptCount),messageOutboxRoot:o.messageOutboxRoot,consensusParametersVersion:Number(o.consensusParametersVersion),eventInboxRoot:o.eventInboxRoot,stateTransitionBytecodeVersion:Number(o.stateTransitionBytecodeVersion)},commitBlockHeader:{id:c.id,daHeight:I(c.daHeight),transactionsCount:Number(c.transactionsCount),transactionsRoot:c.transactionsRoot,height:I(c.height),prevRoot:c.prevRoot,time:c.time,applicationHash:c.applicationHash,messageReceiptCount:Number(c.messageReceiptCount),messageOutboxRoot:c.messageOutboxRoot,consensusParametersVersion:Number(c.consensusParametersVersion),eventInboxRoot:c.eventInboxRoot,stateTransitionBytecodeVersion:Number(c.stateTransitionBytecodeVersion)},sender:se.fromAddressOrString(d),recipient:se.fromAddressOrString(p),nonce:t,amount:I(h),data:_}}async getLatestGasPrice(){let{latestGasPrice:e}=await this.operations.getLatestGasPrice();return I(e.gasPrice)}async estimateGasPrice(e){let{estimateGasPrice:t}=await this.operations.estimateGasPrice({blockHorizon:String(e)});return I(t.gasPrice)}async getMessageStatus(e){return(await this.operations.getMessageStatus({nonce:e})).messageStatus}async produceBlocks(e,t){let{produceBlocks:n}=await this.operations.produceBlocks({blocksToProduce:I(e).toString(10),startTimestamp:t?zl.fromUnixMilliseconds(t).toTai64():void 0});return I(n)}async getTransactionResponse(e){return new S_(e,this)}async getMessageByNonce(e){let{message:t}=await this.operations.getMessageByNonce({nonce:e});return t?{messageId:Or.getMessageId({sender:t.sender,recipient:t.recipient,nonce:t.nonce,amount:I(t.amount),data:t.data}),sender:se.fromAddressOrString(t.sender),recipient:se.fromAddressOrString(t.recipient),nonce:t.nonce,amount:I(t.amount),data:Or.decodeData(t.data),daHeight:I(t.daHeight)}:null}async getRelayedTransactionStatus(e){let{relayedTransactionStatus:t}=await this.operations.getRelayedTransactionStatus({relayedTransactionId:e});return t||null}validatePaginationArgs(e){let{paginationLimit:t,inputArgs:n={}}=e,{first:r,last:i,after:a,before:s}=n;if(a&&s)throw new v(x.INVALID_INPUT_PARAMETERS,'Pagination arguments "after" and "before" cannot be used together');if((r||0)>t||(i||0)>t)throw new v(x.INVALID_INPUT_PARAMETERS,`Pagination limit for this query cannot exceed ${t} items`);if(r&&s)throw new v(x.INVALID_INPUT_PARAMETERS,'The use of pagination argument "first" with "before" is not supported');if(i&&a)throw new v(x.INVALID_INPUT_PARAMETERS,'The use of pagination argument "last" with "after" is not supported');return!r&&!i&&(n.first=t),n}extractDryRunError(e,t,n){let r=n,i=[];return e.abis&&(i=Dd(t,e.abis.main,e.abis.otherContractsAbis)),Bd({logs:i,receipts:t,statusReason:r.reason})}},Nd=Ur;x_=new WeakSet;LC=function(e,t){if(!this.cache)return;let n=e.reduce((r,i)=>(i.type===ye.Coin?r.utxos.push(i.id):i.type===ye.Message&&r.messages.push(i.nonce),r),{utxos:[],messages:[]});this.cache.set(t,n)};nt(Nd,"chainInfoCache",{});nt(Nd,"nodeInfoCache",{});var Ed={eth:{sepolia:11155111,foundry:31337},fuel:{devnet:0,testnet:0}};var JU="/",VU=/^\/|\/$/g,zU=(e="")=>e.replace(VU,"");function GU(e,...t){let n=e!=null,r=e?.[0]==="/"&&e.length>1,i=[e,...t].filter(Boolean).map(zU);return r&&n&&i.unshift(""),i.join(JU)}function WU(e,t="./"){return e.map(n=>({...n,icon:GU(t,n.icon)}))}var HU="https://cdn.fuel.network/assets/",ZU=[{name:"Ethereum",symbol:"ETH",icon:"eth.svg",networks:[{type:"ethereum",chainId:Ed.eth.sepolia,decimals:18},{type:"ethereum",chainId:Ed.eth.foundry,decimals:18},{type:"fuel",chainId:Ed.fuel.devnet,decimals:9,assetId:"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"},{type:"fuel",chainId:Ed.fuel.testnet,decimals:9,assetId:"0xf8f8b6283d7fa5b672b530cbb84fcccb4ff8dc40f8176ef4544ddb1f1952ad07"}]}],Lee=WU(ZU,HU),lC=(...e)=>{let t={};function n({amount:r,assetId:i}){t[i]?t[i]=t[i].add(r):t[i]=r}return e.forEach(r=>r.forEach(n)),Object.entries(t).map(([r,i])=>({assetId:r,amount:i}))},XU=e=>{let{assetId:t,amountToTransfer:n,hexlifiedContractId:r}=e,a=new $("u64").encode(new rr(n).toNumber());return Uint8Array.from([...D(r),...a,...D(t)])},YU=async e=>{let t=XU(e);await $t.initWasm();let n=$t.gtf(16,0,$t.GTFArgs.ScriptData),r=$t.addi(17,16,32),i=$t.lw(18,17,0),a=$t.addi(19,17,8),s=$t.tr(16,18,19),o=$t.ret(1);return{script:Uint8Array.from([...n.to_bytes(),...r.to_bytes(),...i.to_bytes(),...a.to_bytes(),...s.to_bytes(),...o.to_bytes()]),scriptData:t}},$U=5,Q_=class extends Kl{address;_provider;_connector;constructor(e,t,n){super(),this._provider=t,this._connector=n,this.address=se.fromDynamicInput(e)}get provider(){if(!this._provider)throw new v(x.MISSING_PROVIDER,"Provider not set");return this._provider}set provider(e){this._provider=e}connect(e){return this._provider=e,this.provider}async getResourcesToSpend(e,t){return this.provider.getResourcesToSpend(this.address,e,t)}async getCoins(e,t){return this.provider.getCoins(this.address,e,t)}async getMessages(e){return this.provider.getMessages(this.address,e)}async getBalance(e){let t=e??this.provider.getBaseAssetId();return await this.provider.getBalance(this.address,t)}async getBalances(){return this.provider.getBalances(this.address)}async fund(e,t){let{addedSignatures:n,estimatedPredicates:r,requiredQuantities:i,updateMaxFee:a,gasPrice:s}=t,o=e.maxFee,c=this.provider.getBaseAssetId(),u=i.find(b=>b.assetId===c)?.amount||I(0),d=N4({amount:I(o),assetId:c,coinQuantities:i}),p={};d.forEach(({amount:b,assetId:T})=>{p[T]={required:b,owned:I(0)}}),e.inputs.filter(Lu).forEach(b=>{let B=to(b)?String(b.assetId):c;p[B]&&(p[B].owned=p[B].owned.add(b.amount))});let h=[];Object.entries(p).forEach(([b,{owned:T,required:B}])=>{T.lt(B)&&h.push({assetId:b,amount:B.sub(T)})});let _=h.length>0,w=0;for(;_&&w<$U;){let b=await this.getResourcesToSpend(h,GQ(e.inputs,this.address));e.addResources(b),e.updatePredicateGasUsed(r);let T=at(e);if(n&&Array.from({length:n}).forEach(()=>T.addEmptyWitness()),!a){_=!1;break}let{maxFee:B}=await this.provider.estimateTxGasAndFee({transactionRequest:T,gasPrice:s}),O=zQ(e.inputs.filter(Lu),c,c),z=u.add(B);O.gt(z)?_=!1:h=[{amount:z.sub(O),assetId:c}],w+=1}if(_)throw new v(x.NOT_ENOUGH_FUNDS,`The account ${this.address} does not have enough base asset funds to cover the transaction execution.`);e.updatePredicateGasUsed(r);let A=at(e);if(n&&Array.from({length:n}).forEach(()=>A.addEmptyWitness()),!a)return e;let{maxFee:S}=await this.provider.estimateTxGasAndFee({transactionRequest:A});return e.maxFee=S,e}async createTransfer(e,t,n,r={}){let i=new Wi(r);return i=this.addTransfer(i,{destination:e,amount:t,assetId:n}),i=await this.estimateAndFundTransaction(i,r),i}async transfer(e,t,n,r={}){let i=await this.createTransfer(e,t,n,r);return this.sendTransaction(i,{estimateTxDependencies:!1})}async batchTransfer(e,t={}){let n=new Wi(t);return n=this.addBatchTransfer(n,e),n=await this.estimateAndFundTransaction(n,t),this.sendTransaction(n,{estimateTxDependencies:!1})}addTransfer(e,t){let{destination:n,amount:r,assetId:i}=t;return this.validateTransferAmount(r),e.addCoinOutput(se.fromAddressOrString(n),r,i??this.provider.getBaseAssetId()),e}addBatchTransfer(e,t){let n=this.provider.getBaseAssetId();return t.forEach(({destination:r,amount:i,assetId:a})=>{this.addTransfer(e,{destination:r,amount:i,assetId:a??n})}),e}async transferToContract(e,t,n,r={}){if(I(t).lte(0))throw new v(x.INVALID_TRANSFER_AMOUNT,"Transfer amount must be a positive number.");let i=se.fromAddressOrString(e),a=n??this.provider.getBaseAssetId(),{script:s,scriptData:o}=await YU({hexlifiedContractId:i.toB256(),amountToTransfer:I(t),assetId:a}),c=new Wi({...r,script:s,scriptData:o});c.addContractInputAndOutput(i);let u=await this.getTransactionCost(c,{quantities:[{amount:I(t),assetId:String(a)}]});return c=this.validateGasLimitAndMaxFee({transactionRequest:c,gasUsed:u.gasUsed,maxFee:u.maxFee,txParams:r}),await this.fund(c,u),this.sendTransaction(c)}async withdrawToBaseLayer(e,t,n={}){let r=se.fromAddressOrString(e),i=D("0x".concat(r.toHexString().substring(2).padStart(64,"0"))),a=D("0x".concat(I(t).toHex().substring(2).padStart(16,"0"))),o={script:new Uint8Array([...D(XQ.bytes),...i,...a]),...n},c=this.provider.getBaseAssetId(),u=new Wi(o),d=[{amount:I(t),assetId:c}],p=await this.getTransactionCost(u,{quantities:d});return u=this.validateGasLimitAndMaxFee({transactionRequest:u,gasUsed:p.gasUsed,maxFee:p.maxFee,txParams:n}),await this.fund(u,p),this.sendTransaction(u)}async getTransactionCost(e,{signatureCallback:t,quantities:n=[]}={}){let r=at(Fn(e)),i=this.provider.getBaseAssetId(),a=r.getCoinOutputsQuantities(),s=lC(a,n),o=[{assetId:i,amount:I("100000000000000000")}],c=p=>r.inputs.find(h=>h.type===ye.Coin?h.assetId===p:NC(h)?i===p:!1),u=(p,h)=>{let _=c(p),w=h;_&&"amount"in _?_.amount=w:r.addResources(this.generateFakeResources([{amount:h,assetId:p}]))};return lC(s,o).forEach(({amount:p,assetId:h})=>u(h,p)),{...await this.provider.getTransactionCost(r,{signatureCallback:t}),requiredQuantities:s}}async signMessage(e){if(!this._connector)throw new v(x.MISSING_CONNECTOR,"A connector is required to sign messages.");return this._connector.signMessage(this.address.toString(),e)}async signTransaction(e){if(!this._connector)throw new v(x.MISSING_CONNECTOR,"A connector is required to sign transactions.");return this._connector.signTransaction(this.address.toString(),e)}async sendTransaction(e,{estimateTxDependencies:t=!0}={}){if(this._connector)return this.provider.getTransactionResponse(await this._connector.sendTransaction(this.address.toString(),e));let n=Fn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.sendTransaction(n,{estimateTxDependencies:!1})}async simulateTransaction(e,{estimateTxDependencies:t=!0}={}){let n=Fn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.simulate(n,{estimateTxDependencies:!1})}generateFakeResources(e){return e.map(t=>({id:L(Mt(Oa)),owner:this.address,blockCreated:I(1),txCreatedIdx:I(1),...t}))}validateTransferAmount(e){if(I(e).lte(0))throw new v(x.INVALID_TRANSFER_AMOUNT,"Transfer amount must be a positive number.")}async estimateAndFundTransaction(e,t){let n=e,r=await this.getTransactionCost(n);return n=this.validateGasLimitAndMaxFee({transactionRequest:n,gasUsed:r.gasUsed,maxFee:r.maxFee,txParams:t}),n=await this.fund(n,r),n}validateGasLimitAndMaxFee({gasUsed:e,maxFee:t,transactionRequest:n,txParams:{gasLimit:r,maxFee:i}}){let a=Fn(n);if(!Pn(r))a.gasLimit=e;else if(e.gt(r))throw new v(x.GAS_LIMIT_TOO_LOW,`Gas limit '${r}' is lower than the required: '${e}'.`);if(!Pn(i))a.maxFee=t;else if(t.gt(i))throw new v(x.MAX_FEE_TOO_LOW,`Max fee '${i}' is lower than the required: '${t}'.`);return a}},js=class{address;publicKey;compressedPublicKey;privateKey;constructor(e){typeof e=="string"&&e.match(/^[0-9a-f]*$/i)&&e.length===64&&(e=`0x${e}`);let t=rn(e,32);this.privateKey=L(t),this.publicKey=L(mi.getPublicKey(t,!1).slice(1)),this.compressedPublicKey=L(mi.getPublicKey(t,!0)),this.address=se.fromPublicKey(this.publicKey)}sign(e){let t=mi.sign(D(e),D(this.privateKey)),n=rn(`0x${t.r.toString(16)}`,32),r=rn(`0x${t.s.toString(16)}`,32);return r[0]|=(t.recovery||0)<<7,L(ie([n,r]))}addPoint(e){let t=mi.ProjectivePoint.fromHex(D(this.compressedPublicKey)),n=mi.ProjectivePoint.fromHex(D(e));return`0x${t.add(n).toHex(!0)}`}static recoverPublicKey(e,t){let n=D(t),r=n.slice(0,32),i=n.slice(32,64),a=(i[0]&128)>>7;i[0]&=127;let o=new mi.Signature(BigInt(L(r)),BigInt(L(i))).addRecoveryBit(a).recoverPublicKey(D(e)).toRawBytes(!1).slice(1);return L(o)}static recoverAddress(e,t){return se.fromPublicKey(js.recoverPublicKey(e,t))}static generatePrivateKey(e){return e?an(ie([Mt(32),D(e)])):Mt(32)}static extendPublicKey(e){let t=mi.ProjectivePoint.fromHex(D(e));return L(t.toRawBytes(!1).slice(1))}},dC=13,fC=8,pC=1,A_=32,KU=16,hC=e=>/^0x/.test(e)?e.slice(2):e;async function jU(e,t,n){let r=ir(hC(e),"hex"),i=se.fromAddressOrString(t),a=Mt(A_),s=Ih({password:ir(n),salt:a,dklen:A_,n:2**dC,r:fC,p:pC}),o=Mt(KU),c=await hb(r,s,o),u=Uint8Array.from([...s.subarray(16,32),...c]),d=Sh(u),p=bs(d,"hex"),h={id:_b(),version:3,address:hC(i.toHexString()),crypto:{cipher:"aes-128-ctr",mac:p,cipherparams:{iv:bs(o,"hex")},ciphertext:bs(c,"hex"),kdf:"scrypt",kdfparams:{dklen:A_,n:2**dC,p:pC,r:fC,salt:bs(a,"hex")}}};return JSON.stringify(h)}async function e6(e,t){let n=JSON.parse(e),{crypto:{mac:r,ciphertext:i,cipherparams:{iv:a},kdfparams:{dklen:s,n:o,r:c,p:u,salt:d}}}=n,p=ir(i,"hex"),h=ir(a,"hex"),_=ir(d,"hex"),w=ir(t),A=Ih({password:w,salt:_,n:o,p:u,r:c,dklen:s}),S=Uint8Array.from([...A.subarray(16,32),...p]),b=Sh(S),T=bs(b,"hex");if(r!==T)throw new v(x.INVALID_PASSWORD,"Failed to decrypt the keystore wallet, the provided password is incorrect.");let B=await pb(p,A,h);return L(B)}var QC=class extends Q_{signer;constructor(e,t){let n=new js(e);super(n.address,t),this.signer=()=>n}get privateKey(){return this.signer().privateKey}get publicKey(){return this.signer().publicKey}async signMessage(e){let t=await this.signer().sign(yb(e));return L(t)}async signTransaction(e){let t=Fn(e),n=this.provider.getChainId(),r=t.getTransactionId(n),i=await this.signer().sign(r);return L(i)}async populateTransactionWitnessesSignature(e){let t=Fn(e),n=await this.signTransaction(t);return t.updateWitnessByOwner(this.address,n),t}async sendTransaction(e,{estimateTxDependencies:t=!1}={}){let n=Fn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.sendTransaction(await this.populateTransactionWitnessesSignature(n),{estimateTxDependencies:!1})}async simulateTransaction(e,{estimateTxDependencies:t=!0}={}){let n=Fn(e);return t&&await this.provider.estimateTxDependencies(n),this.provider.dryRun(await this.populateTransactionWitnessesSignature(n),{utxoValidation:!0,estimateTxDependencies:!1})}async encrypt(e){return jU(this.privateKey,this.address,e)}};nt(QC,"defaultPath","m/44'/1179993420'/0'/0/0");var Cd=["abandon","ability","able","about","above","absent","absorb","abstract","absurd","abuse","access","accident","account","accuse","achieve","acid","acoustic","acquire","across","act","action","actor","actress","actual","adapt","add","addict","address","adjust","admit","adult","advance","advice","aerobic","affair","afford","afraid","again","age","agent","agree","ahead","aim","air","airport","aisle","alarm","album","alcohol","alert","alien","all","alley","allow","almost","alone","alpha","already","also","alter","always","amateur","amazing","among","amount","amused","analyst","anchor","ancient","anger","angle","angry","animal","ankle","announce","annual","another","answer","antenna","antique","anxiety","any","apart","apology","appear","apple","approve","april","arch","arctic","area","arena","argue","arm","armed","armor","army","around","arrange","arrest","arrive","arrow","art","artefact","artist","artwork","ask","aspect","assault","asset","assist","assume","asthma","athlete","atom","attack","attend","attitude","attract","auction","audit","august","aunt","author","auto","autumn","average","avocado","avoid","awake","aware","away","awesome","awful","awkward","axis","baby","bachelor","bacon","badge","bag","balance","balcony","ball","bamboo","banana","banner","bar","barely","bargain","barrel","base","basic","basket","battle","beach","bean","beauty","because","become","beef","before","begin","behave","behind","believe","below","belt","bench","benefit","best","betray","better","between","beyond","bicycle","bid","bike","bind","biology","bird","birth","bitter","black","blade","blame","blanket","blast","bleak","bless","blind","blood","blossom","blouse","blue","blur","blush","board","boat","body","boil","bomb","bone","bonus","book","boost","border","boring","borrow","boss","bottom","bounce","box","boy","bracket","brain","brand","brass","brave","bread","breeze","brick","bridge","brief","bright","bring","brisk","broccoli","broken","bronze","broom","brother","brown","brush","bubble","buddy","budget","buffalo","build","bulb","bulk","bullet","bundle","bunker","burden","burger","burst","bus","business","busy","butter","buyer","buzz","cabbage","cabin","cable","cactus","cage","cake","call","calm","camera","camp","can","canal","cancel","candy","cannon","canoe","canvas","canyon","capable","capital","captain","car","carbon","card","cargo","carpet","carry","cart","case","cash","casino","castle","casual","cat","catalog","catch","category","cattle","caught","cause","caution","cave","ceiling","celery","cement","census","century","cereal","certain","chair","chalk","champion","change","chaos","chapter","charge","chase","chat","cheap","check","cheese","chef","cherry","chest","chicken","chief","child","chimney","choice","choose","chronic","chuckle","chunk","churn","cigar","cinnamon","circle","citizen","city","civil","claim","clap","clarify","claw","clay","clean","clerk","clever","click","client","cliff","climb","clinic","clip","clock","clog","close","cloth","cloud","clown","club","clump","cluster","clutch","coach","coast","coconut","code","coffee","coil","coin","collect","color","column","combine","come","comfort","comic","common","company","concert","conduct","confirm","congress","connect","consider","control","convince","cook","cool","copper","copy","coral","core","corn","correct","cost","cotton","couch","country","couple","course","cousin","cover","coyote","crack","cradle","craft","cram","crane","crash","crater","crawl","crazy","cream","credit","creek","crew","cricket","crime","crisp","critic","crop","cross","crouch","crowd","crucial","cruel","cruise","crumble","crunch","crush","cry","crystal","cube","culture","cup","cupboard","curious","current","curtain","curve","cushion","custom","cute","cycle","dad","damage","damp","dance","danger","daring","dash","daughter","dawn","day","deal","debate","debris","decade","december","decide","decline","decorate","decrease","deer","defense","define","defy","degree","delay","deliver","demand","demise","denial","dentist","deny","depart","depend","deposit","depth","deputy","derive","describe","desert","design","desk","despair","destroy","detail","detect","develop","device","devote","diagram","dial","diamond","diary","dice","diesel","diet","differ","digital","dignity","dilemma","dinner","dinosaur","direct","dirt","disagree","discover","disease","dish","dismiss","disorder","display","distance","divert","divide","divorce","dizzy","doctor","document","dog","doll","dolphin","domain","donate","donkey","donor","door","dose","double","dove","draft","dragon","drama","drastic","draw","dream","dress","drift","drill","drink","drip","drive","drop","drum","dry","duck","dumb","dune","during","dust","dutch","duty","dwarf","dynamic","eager","eagle","early","earn","earth","easily","east","easy","echo","ecology","economy","edge","edit","educate","effort","egg","eight","either","elbow","elder","electric","elegant","element","elephant","elevator","elite","else","embark","embody","embrace","emerge","emotion","employ","empower","empty","enable","enact","end","endless","endorse","enemy","energy","enforce","engage","engine","enhance","enjoy","enlist","enough","enrich","enroll","ensure","enter","entire","entry","envelope","episode","equal","equip","era","erase","erode","erosion","error","erupt","escape","essay","essence","estate","eternal","ethics","evidence","evil","evoke","evolve","exact","example","excess","exchange","excite","exclude","excuse","execute","exercise","exhaust","exhibit","exile","exist","exit","exotic","expand","expect","expire","explain","expose","express","extend","extra","eye","eyebrow","fabric","face","faculty","fade","faint","faith","fall","false","fame","family","famous","fan","fancy","fantasy","farm","fashion","fat","fatal","father","fatigue","fault","favorite","feature","february","federal","fee","feed","feel","female","fence","festival","fetch","fever","few","fiber","fiction","field","figure","file","film","filter","final","find","fine","finger","finish","fire","firm","first","fiscal","fish","fit","fitness","fix","flag","flame","flash","flat","flavor","flee","flight","flip","float","flock","floor","flower","fluid","flush","fly","foam","focus","fog","foil","fold","follow","food","foot","force","forest","forget","fork","fortune","forum","forward","fossil","foster","found","fox","fragile","frame","frequent","fresh","friend","fringe","frog","front","frost","frown","frozen","fruit","fuel","fun","funny","furnace","fury","future","gadget","gain","galaxy","gallery","game","gap","garage","garbage","garden","garlic","garment","gas","gasp","gate","gather","gauge","gaze","general","genius","genre","gentle","genuine","gesture","ghost","giant","gift","giggle","ginger","giraffe","girl","give","glad","glance","glare","glass","glide","glimpse","globe","gloom","glory","glove","glow","glue","goat","goddess","gold","good","goose","gorilla","gospel","gossip","govern","gown","grab","grace","grain","grant","grape","grass","gravity","great","green","grid","grief","grit","grocery","group","grow","grunt","guard","guess","guide","guilt","guitar","gun","gym","habit","hair","half","hammer","hamster","hand","happy","harbor","hard","harsh","harvest","hat","have","hawk","hazard","head","health","heart","heavy","hedgehog","height","hello","helmet","help","hen","hero","hidden","high","hill","hint","hip","hire","history","hobby","hockey","hold","hole","holiday","hollow","home","honey","hood","hope","horn","horror","horse","hospital","host","hotel","hour","hover","hub","huge","human","humble","humor","hundred","hungry","hunt","hurdle","hurry","hurt","husband","hybrid","ice","icon","idea","identify","idle","ignore","ill","illegal","illness","image","imitate","immense","immune","impact","impose","improve","impulse","inch","include","income","increase","index","indicate","indoor","industry","infant","inflict","inform","inhale","inherit","initial","inject","injury","inmate","inner","innocent","input","inquiry","insane","insect","inside","inspire","install","intact","interest","into","invest","invite","involve","iron","island","isolate","issue","item","ivory","jacket","jaguar","jar","jazz","jealous","jeans","jelly","jewel","job","join","joke","journey","joy","judge","juice","jump","jungle","junior","junk","just","kangaroo","keen","keep","ketchup","key","kick","kid","kidney","kind","kingdom","kiss","kit","kitchen","kite","kitten","kiwi","knee","knife","knock","know","lab","label","labor","ladder","lady","lake","lamp","language","laptop","large","later","latin","laugh","laundry","lava","law","lawn","lawsuit","layer","lazy","leader","leaf","learn","leave","lecture","left","leg","legal","legend","leisure","lemon","lend","length","lens","leopard","lesson","letter","level","liar","liberty","library","license","life","lift","light","like","limb","limit","link","lion","liquid","list","little","live","lizard","load","loan","lobster","local","lock","logic","lonely","long","loop","lottery","loud","lounge","love","loyal","lucky","luggage","lumber","lunar","lunch","luxury","lyrics","machine","mad","magic","magnet","maid","mail","main","major","make","mammal","man","manage","mandate","mango","mansion","manual","maple","marble","march","margin","marine","market","marriage","mask","mass","master","match","material","math","matrix","matter","maximum","maze","meadow","mean","measure","meat","mechanic","medal","media","melody","melt","member","memory","mention","menu","mercy","merge","merit","merry","mesh","message","metal","method","middle","midnight","milk","million","mimic","mind","minimum","minor","minute","miracle","mirror","misery","miss","mistake","mix","mixed","mixture","mobile","model","modify","mom","moment","monitor","monkey","monster","month","moon","moral","more","morning","mosquito","mother","motion","motor","mountain","mouse","move","movie","much","muffin","mule","multiply","muscle","museum","mushroom","music","must","mutual","myself","mystery","myth","naive","name","napkin","narrow","nasty","nation","nature","near","neck","need","negative","neglect","neither","nephew","nerve","nest","net","network","neutral","never","news","next","nice","night","noble","noise","nominee","noodle","normal","north","nose","notable","note","nothing","notice","novel","now","nuclear","number","nurse","nut","oak","obey","object","oblige","obscure","observe","obtain","obvious","occur","ocean","october","odor","off","offer","office","often","oil","okay","old","olive","olympic","omit","once","one","onion","online","only","open","opera","opinion","oppose","option","orange","orbit","orchard","order","ordinary","organ","orient","original","orphan","ostrich","other","outdoor","outer","output","outside","oval","oven","over","own","owner","oxygen","oyster","ozone","pact","paddle","page","pair","palace","palm","panda","panel","panic","panther","paper","parade","parent","park","parrot","party","pass","patch","path","patient","patrol","pattern","pause","pave","payment","peace","peanut","pear","peasant","pelican","pen","penalty","pencil","people","pepper","perfect","permit","person","pet","phone","photo","phrase","physical","piano","picnic","picture","piece","pig","pigeon","pill","pilot","pink","pioneer","pipe","pistol","pitch","pizza","place","planet","plastic","plate","play","please","pledge","pluck","plug","plunge","poem","poet","point","polar","pole","police","pond","pony","pool","popular","portion","position","possible","post","potato","pottery","poverty","powder","power","practice","praise","predict","prefer","prepare","present","pretty","prevent","price","pride","primary","print","priority","prison","private","prize","problem","process","produce","profit","program","project","promote","proof","property","prosper","protect","proud","provide","public","pudding","pull","pulp","pulse","pumpkin","punch","pupil","puppy","purchase","purity","purpose","purse","push","put","puzzle","pyramid","quality","quantum","quarter","question","quick","quit","quiz","quote","rabbit","raccoon","race","rack","radar","radio","rail","rain","raise","rally","ramp","ranch","random","range","rapid","rare","rate","rather","raven","raw","razor","ready","real","reason","rebel","rebuild","recall","receive","recipe","record","recycle","reduce","reflect","reform","refuse","region","regret","regular","reject","relax","release","relief","rely","remain","remember","remind","remove","render","renew","rent","reopen","repair","repeat","replace","report","require","rescue","resemble","resist","resource","response","result","retire","retreat","return","reunion","reveal","review","reward","rhythm","rib","ribbon","rice","rich","ride","ridge","rifle","right","rigid","ring","riot","ripple","risk","ritual","rival","river","road","roast","robot","robust","rocket","romance","roof","rookie","room","rose","rotate","rough","round","route","royal","rubber","rude","rug","rule","run","runway","rural","sad","saddle","sadness","safe","sail","salad","salmon","salon","salt","salute","same","sample","sand","satisfy","satoshi","sauce","sausage","save","say","scale","scan","scare","scatter","scene","scheme","school","science","scissors","scorpion","scout","scrap","screen","script","scrub","sea","search","season","seat","second","secret","section","security","seed","seek","segment","select","sell","seminar","senior","sense","sentence","series","service","session","settle","setup","seven","shadow","shaft","shallow","share","shed","shell","sheriff","shield","shift","shine","ship","shiver","shock","shoe","shoot","shop","short","shoulder","shove","shrimp","shrug","shuffle","shy","sibling","sick","side","siege","sight","sign","silent","silk","silly","silver","similar","simple","since","sing","siren","sister","situate","six","size","skate","sketch","ski","skill","skin","skirt","skull","slab","slam","sleep","slender","slice","slide","slight","slim","slogan","slot","slow","slush","small","smart","smile","smoke","smooth","snack","snake","snap","sniff","snow","soap","soccer","social","sock","soda","soft","solar","soldier","solid","solution","solve","someone","song","soon","sorry","sort","soul","sound","soup","source","south","space","spare","spatial","spawn","speak","special","speed","spell","spend","sphere","spice","spider","spike","spin","spirit","split","spoil","sponsor","spoon","sport","spot","spray","spread","spring","spy","square","squeeze","squirrel","stable","stadium","staff","stage","stairs","stamp","stand","start","state","stay","steak","steel","stem","step","stereo","stick","still","sting","stock","stomach","stone","stool","story","stove","strategy","street","strike","strong","struggle","student","stuff","stumble","style","subject","submit","subway","success","such","sudden","suffer","sugar","suggest","suit","summer","sun","sunny","sunset","super","supply","supreme","sure","surface","surge","surprise","surround","survey","suspect","sustain","swallow","swamp","swap","swarm","swear","sweet","swift","swim","swing","switch","sword","symbol","symptom","syrup","system","table","tackle","tag","tail","talent","talk","tank","tape","target","task","taste","tattoo","taxi","teach","team","tell","ten","tenant","tennis","tent","term","test","text","thank","that","theme","then","theory","there","they","thing","this","thought","three","thrive","throw","thumb","thunder","ticket","tide","tiger","tilt","timber","time","tiny","tip","tired","tissue","title","toast","tobacco","today","toddler","toe","together","toilet","token","tomato","tomorrow","tone","tongue","tonight","tool","tooth","top","topic","topple","torch","tornado","tortoise","toss","total","tourist","toward","tower","town","toy","track","trade","traffic","tragic","train","transfer","trap","trash","travel","tray","treat","tree","trend","trial","tribe","trick","trigger","trim","trip","trophy","trouble","truck","true","truly","trumpet","trust","truth","try","tube","tuition","tumble","tuna","tunnel","turkey","turn","turtle","twelve","twenty","twice","twin","twist","two","type","typical","ugly","umbrella","unable","unaware","uncle","uncover","under","undo","unfair","unfold","unhappy","uniform","unique","unit","universe","unknown","unlock","until","unusual","unveil","update","upgrade","uphold","upon","upper","upset","urban","urge","usage","use","used","useful","useless","usual","utility","vacant","vacuum","vague","valid","valley","valve","van","vanish","vapor","various","vast","vault","vehicle","velvet","vendor","venture","venue","verb","verify","version","very","vessel","veteran","viable","vibrant","vicious","victory","video","view","village","vintage","violin","virtual","virus","visa","visit","visual","vital","vivid","vocal","voice","void","volcano","volume","vote","voyage","wage","wagon","wait","walk","wall","walnut","want","warfare","warm","warrior","wash","wasp","waste","water","wave","way","wealth","weapon","wear","weasel","weather","web","wedding","weekend","weird","welcome","west","wet","whale","what","wheat","wheel","when","where","whip","whisper","wide","width","wife","wild","will","win","window","wine","wing","wink","winner","winter","wire","wisdom","wise","wish","witness","wolf","woman","wonder","wood","wool","word","work","world","worry","worth","wrap","wreck","wrestle","wrist","write","wrong","yard","year","yellow","you","young","youth","zebra","zero","zone","zoo"];function t6(e){return(1<<e)-1}function UC(e){return(1<<e)-1<<8-e}function y_(e){return Array.isArray(e)?e:e.split(/\s+/)}function n6(e){return Array.isArray(e)?e.join(" "):e}function r6(e){let t=[0],n=11;for(let a=0;a<e.length;a+=1)n>8?(t[t.length-1]<<=8,t[t.length-1]|=e[a],n-=8):(t[t.length-1]<<=n,t[t.length-1]|=e[a]>>8-n,t.push(e[a]&t6(8-n)),n+=3);let r=e.length/4,i=D(tt(e))[0]&UC(r);return t[t.length-1]<<=r,t[t.length-1]|=i>>8-r,t}function i6(e,t){let n=Math.ceil(11*e.length/8),r=D(new Uint8Array(n)),i=0;for(let u=0;u<e.length;u+=1){let d=t.indexOf(e[u].normalize("NFKD"));if(d===-1)throw new v(x.INVALID_MNEMONIC,`Invalid mnemonic: the word '${e[u]}' is not found in the provided wordlist.`);for(let p=0;p<11;p+=1)d&1<<10-p&&(r[i>>3]|=1<<7-i%8),i+=1}let a=32*e.length/3,s=e.length/3,o=UC(s);if((D(tt(r.slice(0,a/8)))[0]&o)!==(r[r.length-1]&o))throw new v(x.INVALID_CHECKSUM,"Checksum validation failed for the provided mnemonic.");return r.slice(0,a/8)}var a6=Br("Bitcoin seed"),s6="0x0488ade4",o6="0x04358394",mC=[12,15,18,21,24];function gC(e){if(e.length!==2048)throw new v(x.INVALID_WORD_LIST,`Expected word list length of 2048, but got ${e.length}.`)}function c6(e){if(e.length%4!==0||e.length<16||e.length>32)throw new v(x.INVALID_ENTROPY,`Entropy should be between 16 and 32 bytes and a multiple of 4, but got ${e.length} bytes.`)}function v_(e){if(!mC.includes(e.length)){let t=`Invalid mnemonic size. Expected one of [${mC.join(", ")}] words, but got ${e.length}.`;throw new v(x.INVALID_MNEMONIC,t)}}var Vi=class{wordlist;constructor(e=Cd){this.wordlist=e,gC(this.wordlist)}mnemonicToEntropy(e){return Vi.mnemonicToEntropy(e,this.wordlist)}entropyToMnemonic(e){return Vi.entropyToMnemonic(e,this.wordlist)}static mnemonicToEntropy(e,t=Cd){let n=y_(e);return v_(n),L(i6(n,t))}static entropyToMnemonic(e,t=Cd){let n=D(e);return gC(t),c6(n),r6(n).map(r=>t[r]).join(" ")}static mnemonicToSeed(e,t=""){v_(y_(e));let n=Br(n6(e)),r=Br(`mnemonic${t}`);return mb(n,r,2048,64,"sha512")}static mnemonicToMasterKeys(e,t=""){let n=Vi.mnemonicToSeed(e,t);return Vi.masterKeysFromSeed(n)}static isMnemonicValid(e){let t=y_(e),n=0;try{v_(t)}catch{return!1}for(;n<t.length;){if(Vi.binarySearch(t[n])===!1)return!1;n+=1}return!0}static binarySearch(e){let t=Cd,n=0,r=t.length-1;for(;n<=r;){let i=Math.floor((n+r)/2);if(t[i]===e)return!0;e<t[i]?r=i-1:n=i+1}return!1}static masterKeysFromSeed(e){let t=D(e);if(t.length<16||t.length>64)throw new v(x.INVALID_SEED,`Seed length should be between 16 and 64 bytes, but received ${t.length} bytes.`);return D(Xl("sha512",a6,t))}static seedToExtendedKey(e,t=!1){let n=Vi.masterKeysFromSeed(e),r=D(t?o6:s6),i="0x00",a="0x00000000",s="0x00000000",o=n.slice(32),c=n.slice(0,32),u=ie([r,i,a,s,o,ie(["0x00",c])]),d=Cu(tt(tt(u)),0,4);return Gl(ie([u,d]))}static generate(e=32,t=""){let n=t?tt(ie([Mt(e),D(t)])):Mt(e);return Vi.entropyToMnemonic(n)}},U_=Vi,qC=2147483648,JC=L("0x0488ade4"),q_=L("0x0488b21e"),VC=L("0x04358394"),J_=L("0x043587cf");function _C(e){return Gl(ie([e,Cu(tt(tt(e)),0,4)]))}function u6(e=!1,t=!1){return e?t?J_:q_:t?VC:JC}function l6(e){return[q_,J_].includes(L(e.slice(0,4)))}function d6(e){return[JC,VC,q_,J_].includes(L(e.slice(0,4)))}function f6(e,t=0){let n=e.split("/");if(n.length===0||n[0]==="m"&&t!==0)throw new v(x.HD_WALLET_ERROR,`invalid path - ${e}`);return n[0]==="m"&&n.shift(),n.map(r=>~r.indexOf("'")?parseInt(r,10)+qC:parseInt(r,10))}var Ks=class{depth=0;index=0;fingerprint=L("0x00000000");parentFingerprint=L("0x00000000");privateKey;publicKey;chainCode;constructor(e){if(e.privateKey){let t=new js(e.privateKey);this.publicKey=L(t.compressedPublicKey),this.privateKey=L(e.privateKey)}else{if(!e.publicKey)throw new v(x.HD_WALLET_ERROR,"Both public and private Key cannot be missing. At least one should be provided.");this.publicKey=L(e.publicKey)}this.parentFingerprint=e.parentFingerprint||this.parentFingerprint,this.fingerprint=Cu(gb(tt(this.publicKey)),0,4),this.depth=e.depth||this.depth,this.index=e.index||this.index,this.chainCode=e.chainCode}get extendedKey(){return this.toExtendedKey()}deriveIndex(e){let t=this.privateKey&&D(this.privateKey),n=D(this.publicKey),r=D(this.chainCode),i=new Uint8Array(37);if(e&qC){if(!t)throw new v(x.HD_WALLET_ERROR,"Cannot derive a hardened index without a private Key.");i.set(t,1)}else i.set(D(this.publicKey));i.set(rn(e,4),33);let a=D(Xl("sha512",r,i)),s=a.slice(0,32),o=a.slice(32);if(t){let d="0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141",p=I(s).add(t).mod(d).toBytes(32);return new Ks({privateKey:p,chainCode:o,index:e,depth:this.depth+1,parentFingerprint:this.fingerprint})}let u=new js(L(s)).addPoint(n);return new Ks({publicKey:u,chainCode:o,index:e,depth:this.depth+1,parentFingerprint:this.fingerprint})}derivePath(e){return f6(e,this.depth).reduce((n,r)=>n.deriveIndex(r),this)}toExtendedKey(e=!1,t=!1){if(this.depth>=256)throw new v(x.HD_WALLET_ERROR,`Exceeded max depth of 255. Current depth: ${this.depth}.`);let n=u6(this.privateKey==null||e,t),r=L(Uint8Array.from([this.depth])),i=this.parentFingerprint,a=ys(this.index,4),s=this.chainCode,o=this.privateKey!=null&&!e?ie(["0x00",this.privateKey]):this.publicKey,c=D(ie([n,r,i,a,s,o]));return _C(c)}static fromSeed(e){let t=U_.masterKeysFromSeed(e);return new Ks({chainCode:D(t.slice(32)),privateKey:D(t.slice(0,32))})}static fromExtendedKey(e){let t=L(rn(Zw(e))),n=D(t),r=_C(n.slice(0,78))===e;if(n.length!==82||!d6(n))throw new v(x.HD_WALLET_ERROR,"Provided key is not a valid extended key.");if(!r)throw new v(x.HD_WALLET_ERROR,"Provided key has an invalid checksum.");let i=n[4],a=L(n.slice(5,9)),s=parseInt(L(n.slice(9,13)).substring(2),16),o=L(n.slice(13,45)),c=n.slice(45,78);if(i===0&&a!=="0x00000000"||i===0&&s!==0)throw new v(x.HD_WALLET_ERROR,"Inconsistency detected: Depth is zero but fingerprint/index is non-zero.");if(l6(n)){if(c[0]!==3)throw new v(x.HD_WALLET_ERROR,"Invalid public extended key.");return new Ks({publicKey:c,chainCode:o,index:s,depth:i,parentFingerprint:a})}if(c[0]!==0)throw new v(x.HD_WALLET_ERROR,"Invalid private extended key.");return new Ks({privateKey:c.slice(1),chainCode:o,index:s,depth:i,parentFingerprint:a})}},w_=Ks,zC=class extends Q_{unlock(e){return new ln(e,this._provider)}},ln=class extends QC{lock(){return this.signer=()=>new js("0x00"),new zC(this.address,this._provider)}static generate(e){let t=js.generatePrivateKey(e?.entropy);return new ln(t,e?.provider)}static fromSeed(e,t,n){let i=w_.fromSeed(e).derivePath(t||ln.defaultPath);return new ln(i.privateKey,n)}static fromMnemonic(e,t,n,r){let i=U_.mnemonicToSeed(e,n),s=w_.fromSeed(i).derivePath(t||ln.defaultPath);return new ln(s.privateKey,r)}static fromExtendedKey(e,t){let n=w_.fromExtendedKey(e);return new ln(n.privateKey,t)}static async fromEncryptedJson(e,t,n){let r=await e6(e,t);return new ln(r,n)}},zt=class{static fromAddress(e,t){return new zC(e,t)}static fromPrivateKey(e,t){return new ln(e,t)}};nt(zt,"generate",ln.generate);nt(zt,"fromSeed",ln.fromSeed);nt(zt,"fromMnemonic",ln.fromMnemonic);nt(zt,"fromExtendedKey",ln.fromExtendedKey);nt(zt,"fromEncryptedJson",ln.fromEncryptedJson);var h6=class{storage=new Map;async getItem(e){return await this.storage.get(e)}async setItem(e,t){await this.storage.set(e,t)}async removeItem(e){await this.storage.delete(e)}async clear(){await this.storage.clear()}},za,GC=class{constructor(e){Gi(this,za,void 0),nt(this,"pathKey","{}"),nt(this,"rootPath",`m/44'/1179993420'/${this.pathKey}'/0/0`),nt(this,"numberOfAccounts",0),or(this,za,e.secret||U_.generate()),this.rootPath=e.rootPath||this.rootPath,this.numberOfAccounts=e.numberOfAccounts||1}getDerivePath(e){return this.rootPath.includes(this.pathKey)?this.rootPath.replace(this.pathKey,String(e)):`${this.rootPath}/${e}`}serialize(){return{secret:Ke(this,za),rootPath:this.rootPath,numberOfAccounts:this.numberOfAccounts}}getAccounts(){let e=[],t=0;do{let n=zt.fromMnemonic(Ke(this,za),this.getDerivePath(t));e.push({publicKey:n.publicKey,address:n.address}),t+=1}while(t<this.numberOfAccounts);return e}addAccount(){this.numberOfAccounts+=1;let e=zt.fromMnemonic(Ke(this,za),this.getDerivePath(this.numberOfAccounts-1));return{publicKey:e.publicKey,address:e.address}}exportAccount(e){let t=0,n=se.fromAddressOrString(e);do{let r=zt.fromMnemonic(Ke(this,za),this.getDerivePath(t));if(r.address.equals(n))return r.privateKey;t+=1}while(t<this.numberOfAccounts);throw new v(x.WALLET_MANAGER_ERROR,`Account with address '${e}' not found in derived wallets.`)}getWallet(e){let t=this.exportAccount(e);return zt.fromPrivateKey(t)}};za=new WeakMap;nt(GC,"type","mnemonic");var zi,WC=class{constructor(e={}){Gi(this,zi,[]),e.secret?or(this,zi,[e.secret]):or(this,zi,e.accounts||[zt.generate().privateKey])}serialize(){return{accounts:Ke(this,zi)}}getPublicAccount(e){let t=zt.fromPrivateKey(e);return{address:t.address,publicKey:t.publicKey}}getAccounts(){return Ke(this,zi).map(e=>this.getPublicAccount(e))}addAccount(){let e=zt.generate();return Ke(this,zi).push(e.privateKey),this.getPublicAccount(e.privateKey)}exportAccount(e){let t=se.fromAddressOrString(e),n=Ke(this,zi).find(r=>zt.fromPrivateKey(r).address.equals(t));if(!n)throw new v(x.WALLET_MANAGER_ERROR,`No private key found for address '${e}'.`);return n}getWallet(e){let t=this.exportAccount(e);return zt.fromPrivateKey(t)}};zi=new WeakMap;nt(WC,"type","privateKey");var _i={invalid_vault_type:"The provided Vault type is invalid.",address_not_found:"No private key found for address the specified wallet address.",vault_not_found:"The specified vault was not found.",wallet_not_unlocked:"The wallet is currently locked.",passphrase_not_match:"The provided passphrase did not match the expected value."};function Ai(e,t){if(!e)throw new v(x.WALLET_MANAGER_ERROR,t)}var un,Ga,qr,T_,HC,N_,ZC,XC=class extends p6{constructor(e){super(),Gi(this,T_),Gi(this,N_),nt(this,"storage",new h6),nt(this,"STORAGE_KEY","WalletManager"),Gi(this,un,[]),Gi(this,Ga,""),Gi(this,qr,!0),this.storage=e?.storage||this.storage}get isLocked(){return Ke(this,qr)}exportVault(e){Ai(!Ke(this,qr),_i.wallet_not_unlocked);let t=Ke(this,un).find((n,r)=>r===e);return Ai(t,_i.vault_not_found),t.vault.serialize()}getVaults(){return Ke(this,un).map((e,t)=>({title:e.title,type:e.type,vaultId:t}))}getAccounts(){return Ke(this,un).flatMap((e,t)=>e.vault.getAccounts().map(n=>({...n,vaultId:t})))}getWallet(e){let t=se.fromAddressOrString(e),n=Ke(this,un).find(r=>r.vault.getAccounts().find(i=>i.address.equals(t)));return Ai(n,_i.address_not_found),n.vault.getWallet(t)}exportPrivateKey(e){let t=se.fromAddressOrString(e);Ai(!Ke(this,qr),_i.wallet_not_unlocked);let n=Ke(this,un).find(r=>r.vault.getAccounts().find(i=>i.address.equals(t)));return Ai(n,_i.address_not_found),n.vault.exportAccount(t)}async addAccount(e){await this.loadState();let t=Ke(this,un)[e?.vaultId||0];await Ai(t,_i.vault_not_found);let n=t.vault.addAccount();return await this.saveState(),n}async removeVault(e){Ke(this,un).splice(e,1),await this.saveState()}async addVault(e){await this.loadState();let t=this.getVaultClass(e.type),n=new t(e);or(this,un,Ke(this,un).concat({title:e.title,type:e.type,vault:n})),await this.saveState()}lock(){or(this,qr,!0),or(this,un,[]),or(this,Ga,""),this.emit("lock")}async unlock(e){or(this,Ga,e),or(this,qr,!1);try{await this.loadState(),this.emit("unlock")}catch(t){throw await this.lock(),t}}async updatePassphrase(e,t){let n=Ke(this,qr);await this.unlock(e),or(this,Ga,t),await this.saveState(),await this.loadState(),n&&await this.lock()}async loadState(){await Ai(!Ke(this,qr),_i.wallet_not_unlocked);let e=await this.storage.getItem(this.STORAGE_KEY);if(e){let t=await db(Ke(this,Ga),JSON.parse(e));or(this,un,b_(this,N_,ZC).call(this,t.vaults))}}async saveState(){await Ai(!Ke(this,qr),_i.wallet_not_unlocked);let e=await fb(Ke(this,Ga),{vaults:b_(this,T_,HC).call(this,Ke(this,un))});await this.storage.setItem(this.STORAGE_KEY,JSON.stringify(e)),this.emit("update")}getVaultClass(e){let t=XC.Vaults.find(n=>n.type===e);return Ai(t,_i.invalid_vault_type),t}},m6=XC;un=new WeakMap;Ga=new WeakMap;qr=new WeakMap;T_=new WeakSet;HC=function(e){return e.map(({title:t,type:n,vault:r})=>({title:t,type:n,data:r.serialize()}))};N_=new WeakSet;ZC=function(e){return e.map(({title:t,type:n,data:r})=>{let i=this.getVaultClass(n);return{title:t,type:n,vault:new i(r)}})};nt(m6,"Vaults",[GC,WC]);var g6=class{constructor(e){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}serialize(){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}getAccounts(){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}addAccount(){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}exportAccount(e){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}getWallet(e){throw new v(x.NOT_IMPLEMENTED,"Not implemented.")}};nt(g6,"type");var YC=(e=>(e.ping="ping",e.version="version",e.connect="connect",e.disconnect="disconnect",e.isConnected="isConnected",e.accounts="accounts",e.currentAccount="currentAccount",e.signMessage="signMessage",e.sendTransaction="sendTransaction",e.assets="assets",e.addAsset="addAsset",e.addAssets="addAssets",e.networks="networks",e.currentNetwork="currentNetwork",e.addNetwork="addNetwork",e.selectNetwork="selectNetwork",e.addABI="addABI",e.getABI="getABI",e.hasABI="hasABI",e))(YC||{}),V_=(e=>(e.connectors="connectors",e.currentConnector="currentConnector",e.connection="connection",e.accounts="accounts",e.currentAccount="currentAccount",e.networks="networks",e.currentNetwork="currentNetwork",e.assets="assets",e.abis="abis",e))(V_||{}),A6="FuelConnector",y6=class{storage;constructor(e){this.storage=e}async setItem(e,t){this.storage.setItem(e,t)}async getItem(e){return this.storage.getItem(e)}async removeItem(e){this.storage.removeItem(e)}async clear(){this.storage.clear()}},v6=class extends _6{name="";metadata={};connected=!1;installed=!1;events=V_;async ping(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async version(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async isConnected(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async accounts(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async connect(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async disconnect(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async signMessage(e,t){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async signTransaction(e,t){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async sendTransaction(e,t){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async currentAccount(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addAssets(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addAsset(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async assets(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addNetwork(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async selectNetwork(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async networks(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async currentNetwork(){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async addABI(e,t){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async getABI(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}async hasABI(e){throw new v(v.CODES.NOT_IMPLEMENTED,"Method not implemented.")}on(e,t){return super.on(e,t),this}};function w6(e,{cache:t,cacheTime:n,key:r}){return async(...i)=>{if(t[r]&&t[r]?.value)return t[r]?.value;clearTimeout(t[r]?.timeout);let a=await e(...i);return t[r]={timeout:Number(setTimeout(()=>{t[r]=null},n)),value:a},a}}function b6(){let e={};return e.promise=new Promise((t,n)=>{e.reject=n,e.resolve=t}),e}async function Id(e,t=1050){let n=new Promise((r,i)=>{setTimeout(()=>{i(new v(v.CODES.TIMEOUT_EXCEEDED,"Promise timed out"))},t)});return Promise.race([n,e])}var E6=2e3,C6=5e3,{warn:I6}=console,Fu=class extends v6{_storage=null;_connectors=[];_targetObject=null;_unsubscribes=[];_targetUnsubscribe=()=>{};_pingCache={};_currentConnector;_initializationPromise=null;constructor(e=Fu.defaultConfig){super(),this.setMaxListeners(1e3),this._connectors=e.connectors??[],this._targetObject=this.getTargetObject(e.targetObject),this._storage=e.storage===void 0?this.getStorage():e.storage,this.setupMethods(),this._initializationPromise=this.initialize()}async initialize(){try{await this.setDefaultConnector(),this._targetUnsubscribe=this.setupConnectorListener()}catch{throw new v(x.INVALID_PROVIDER,"Error initializing Fuel Connector")}}async init(){return await this._initializationPromise,this}getTargetObject(e){return e||(typeof window<"u"?window:typeof document<"u"?document:null)}getStorage(){if(typeof window<"u")return new y6(window.localStorage)}async setDefaultConnector(){let e=await this._storage?.getItem(Fu.STORAGE_KEY)||this._connectors[0]?.name;if(e)return this.selectConnector(e,{emitEvents:!1})}setupConnectorEvents(e){if(!this._currentConnector)return;let t=this._currentConnector;this._unsubscribes.map(n=>n()),this._unsubscribes=e.map(n=>{let r=(...i)=>this.emit(n,...i);return t.on(n,r),()=>t.off(n,r)})}async callMethod(e,...t){let n=await this.hasConnector();if(await this.pingConnector(),!this._currentConnector||!n)throw new v(x.MISSING_CONNECTOR,`No connector selected for calling ${e}. Use hasConnector before executing other methods.`);if(typeof this._currentConnector[e]=="function")return this._currentConnector[e](...t)}setupMethods(){Object.values(YC).forEach(e=>{this[e]=async(...t)=>this.callMethod(e,...t)})}async fetchConnectorStatus(e){let t=Date.now(),[n,r]=await Promise.allSettled([Id(e.isConnected()),Id(this.pingConnector(e))]);return t<(e._latestUpdate||0)||(e._latestUpdate=Date.now(),e.installed=r.status==="fulfilled"&&r.value,e.connected=n.status==="fulfilled"&&n.value),{installed:e.installed,connected:e.connected}}async fetchConnectorsStatus(){return Promise.all(this._connectors.map(async e=>this.fetchConnectorStatus(e)))}async pingConnector(e){let t=e||this._currentConnector;if(!t)return!1;try{return await w6(async()=>Id(t.ping()),{key:t.name,cache:this._pingCache,cacheTime:C6})()}catch{throw new v(x.INVALID_PROVIDER,"Current connector is not available.")}}setupConnectorListener=()=>{let{_targetObject:e}=this,t=A6;if(e?.on)return e.on(t,this.addConnector),()=>{e.off?.(t,this.addConnector)};if(e?.addEventListener){let n=r=>{this.addConnector(r.detail)};return e.addEventListener(t,n),()=>{e.removeEventListener?.(t,n)}}return()=>{}};addConnector=async e=>{this.getConnector(e)||this._connectors.push(e),await this.fetchConnectorStatus(e),this.emit(this.events.connectors,this._connectors),this._currentConnector||await this.selectConnector(e.name,{emitEvents:!1})};triggerConnectorEvents=async()=>{let[e,t,n]=await Promise.all([this.isConnected(),this.networks(),this.currentNetwork()]);if(this.emit(this.events.connection,e),this.emit(this.events.networks,t),this.emit(this.events.currentNetwork,n),e){let[r,i]=await Promise.all([this.accounts(),this.currentAccount()]);this.emit(this.events.accounts,r),this.emit(this.events.currentAccount,i)}};getConnector=e=>this._connectors.find(t=>{let n=typeof e=="string"?e:e.name;return t.name===n||t===e})||null;async connectors(){return await this.fetchConnectorsStatus(),this._connectors}async selectConnector(e,t={emitEvents:!0}){let n=this.getConnector(e);if(!n)return!1;if(this._currentConnector?.name===e)return!0;let{installed:r}=await this.fetchConnectorStatus(n);return r?(this._currentConnector=n,this.emit(this.events.currentConnector,n),this.setupConnectorEvents(Object.values(V_)),await this._storage?.setItem(Fu.STORAGE_KEY,n.name),t.emitEvents&&this.triggerConnectorEvents(),!0):!1}currentConnector(){return this._currentConnector}async hasConnector(){if(this._currentConnector)return!0;let e=b6();return this.once(this.events.currentConnector,()=>{e.resolve(!0)}),Id(e.promise,E6).then(()=>!0).catch(()=>!1)}async hasWallet(){return this.hasConnector()}async getProvider(e){return I6("getProvider is deprecated and is going to be removed in the future, use getWallet instead."),this._getProvider(e)}async _getProvider(e){let t;if(e&&"getTransactionResponse"in e)t=e;else if(e&&"chainId"in e&&"url"in e)t=await Nd.create(e.url);else{if(e)throw new v(x.INVALID_PROVIDER,"Provider is not valid.");{let n=await this.currentNetwork();t=await Nd.create(n.url)}}return t}async getWallet(e,t){let n=await this._getProvider(t);return new Q_(e,n,this)}unsubscribe(){this._unsubscribes.map(e=>e()),this._targetUnsubscribe(),this.removeAllListeners()}async clean(){await this._storage?.removeItem(Fu.STORAGE_KEY)}async destroy(){this.unsubscribe(),await this.clean()}},$C=Fu;nt($C,"STORAGE_KEY","fuel-current-connector");nt($C,"defaultConfig",{});var nI=Bn(Du(),1);var Qt=Bn(Du(),1);function KC(e,t){if(!e)throw new v(x.TRANSACTION_ERROR,t)}function eI(e){return e.reduce((t,n,r)=>{let{program:i,externalAbis:a}=n.getCallConfig();return r===0?(t.main=i.interface.jsonAbi,t.otherContractsAbis={}):t.otherContractsAbis[i.id.toB256()]=i.interface.jsonAbi,t.otherContractsAbis={...t.otherContractsAbis,...a},t},{})}var tI=(e,t,n)=>{if(!t)return[];let{main:r,otherContractsAbis:i}=eI(n);return Dd(e,r,i)},G_=class{#e;constructor(...e){this.#e=e||[]}entries(){return this.#e}push(...e){this.#e.push(...e)}concat(e){return this.#e.concat(e)}extend(e){this.#e.push(...e)}toBytes(){return ie(this.#e.reduce((e,t)=>(e.push(t.to_bytes()),e),[]))}toHex(){return L(this.toBytes())}toString(){return`Program:
935
+ ${JSON.stringify(this.#e,null,2)}`}byteLength(){return this.toBytes().byteLength}},S6=e=>Bh+kh({maxInputs:e}),xne=ue+Ba+$l+ue+ue;function x6(e){let t=[...e.receipts],n,r;if(t.forEach(a=>{a.type===le.ScriptResult?n=a:(a.type===le.Return||a.type===le.ReturnData||a.type===le.Revert)&&(r=a)}),!n||!r)throw new v(x.SCRIPT_REVERTED,"Transaction reverted.");return{code:n.result,gasUsed:n.gasUsed,receipts:t,scriptResultReceipt:n,returnReceipt:r,callResult:e}}function W_(e,t,n=[]){try{let r=x6(e);return t(r)}catch(r){if(r.code===x.SCRIPT_REVERTED){let i=e?.dryRunStatus?.reason;throw Bd({logs:n,receipts:e.receipts,statusReason:i})}throw r}}function T6(e,t,n){return W_(e,r=>{if(r.returnReceipt.type===le.Revert)throw new v(x.SCRIPT_REVERTED,`Script Reverted. Logs: ${JSON.stringify(n)}`);if(r.returnReceipt.type!==le.Return&&r.returnReceipt.type!==le.ReturnData){let{type:a}=r.returnReceipt;throw new v(x.SCRIPT_REVERTED,`Script Return Type [${a}] Invalid. Logs: ${JSON.stringify({logs:n,receipt:r.returnReceipt})}`)}let i;return r.returnReceipt.type===le.Return&&(i=r.returnReceipt.val),r.returnReceipt.type===le.ReturnData&&(i=t.func.decodeOutput(r.returnReceipt.data)[0]),i},n)}var Ju=class{bytes;scriptDataEncoder;scriptResultDecoder;constructor(e,t,n){this.bytes=D(e),this.scriptDataEncoder=t,this.scriptResultDecoder=n}static getScriptDataOffsetWithScriptBytes(e,t){return kh({maxInputs:t})+Bh+e}getScriptDataOffset(e){return Ju.getScriptDataOffsetWithScriptBytes(this.bytes.length,e)}encodeScriptData(e){let t=this.scriptDataEncoder(e);return ArrayBuffer.isView(t)?t:(this.bytes=D(t.script),t.data)}decodeCallResult(e,t=[]){return W_(e,this.scriptResultDecoder,t)}},rI={assetIdOffset:0,amountOffset:0,gasForwardedOffset:0,callDataOffset:0},N6=Te,iI=({callDataOffset:e,gasForwardedOffset:t,amountOffset:n,assetIdOffset:r})=>{let i=new G_(Qt.movi(16,e),Qt.movi(17,n),Qt.lw(17,17,0),Qt.movi(18,r));return t?i.push(Qt.movi(19,t),Qt.lw(19,19,0),Qt.call(16,17,18,19)):i.push(Qt.call(16,17,18,Qt.RegId.cgas().to_u8())),i};function jC(e){if(!e.length)return new Uint8Array;let t=new G_;for(let n=0;n<e.length;n+=1)t.extend(iI(e[n]).entries());return t.push(Qt.ret(1)),t.toBytes()}var R6=e=>e===le.Return||e===le.ReturnData,k6=(e,t)=>e.find(({type:n,from:r,to:i})=>n===le.Call&&r===N6&&i===t),B6=e=>t=>{if(On(t.code)!==0)throw new v(x.SCRIPT_REVERTED,"Transaction reverted.");let n=k6(t.receipts,e.toB256()),r=I(n?.is);return t.receipts.filter(({type:a})=>R6(a)).flatMap(a=>r.eq(I(a.is))?a.type===le.Return?[new $("u64").encode(a.val)]:a.type===le.ReturnData?[D(a.data)]:[new Uint8Array]:[])},O6=(e,t,n=[])=>W_(e,B6(t),n),P6=e=>e.reduce((t,n)=>{let r={...rI};return n.gas&&(r.gasForwardedOffset=1),t+iI(r).byteLength()},Qt.Instruction.size()),D6=(e,t)=>new Ju(jC(new Array(e.length).fill(rI)),n=>{let r=n.length;if(r===0)return{data:new Uint8Array,script:new Uint8Array};let i=P6(n),a=(8-i%8)%8,s=i+a,o=S6(t.toNumber())+s,c=[],u=o,d=[];for(let _=0;_<r;_+=1){let w=n[_],A=u,S=A+ue,b=S+Ba,T=b+$l+ue+ue,B=T+w.fnSelectorBytes.byteLength,O=D(w.data),z=0;d.push(new $("u64").encode(w.amount||0)),d.push(new te().encode(w.assetId?.toString()||Te)),d.push(w.contractId.toBytes()),d.push(new $("u64").encode(T)),d.push(new $("u64").encode(B)),d.push(w.fnSelectorBytes),d.push(O),w.gas&&(d.push(new $("u64").encode(w.gas)),z=B+O.byteLength);let Q={amountOffset:A,assetIdOffset:S,gasForwardedOffset:z,callDataOffset:b};c.push(Q),u=o+ie(d).byteLength}let p=jC(c);return{data:ie(d),script:p}},()=>[new Uint8Array]),aI=(e,t,n,r)=>{let i=e[0]?.getCallConfig();if(e.length===1&&i&&"bytes"in i.program)return T6({receipts:t},i,r);let s=O6({receipts:t},(i?.program).id,r).map((o,c)=>{let{func:u}=e[c].getCallConfig();return u.decodeOutput(o)?.[0]});return n?s:s?.[0]},M6=async e=>{let{funcScope:t,isMultiCall:n,program:r,transactionResponse:i}=e,a=await i.waitForResult(),{receipts:s}=a,o=Array.isArray(t)?t:[t],c=o[0]?.getCallConfig(),u=tI(s,c,o),d=aI(o,s,n,u),p=qu(s);return{isMultiCall:n,functionScopes:o,value:d,program:r,transactionResult:a,transactionResponse:i,transactionId:i.id,logs:u,gasUsed:p}},z_=e=>{let{funcScopes:t,callResult:n,isMultiCall:r}=e,{receipts:i}=n,a=Array.isArray(t)?t:[t],s=a[0]?.getCallConfig(),o=tI(i,s,a),c=aI(a,i,r,o),u=qu(i);return{functionScopes:a,callResult:n,isMultiCall:r,gasUsed:u,value:c}};function F6(e){let{program:t,args:n,forward:r,func:i,callParameters:a,externalAbis:s}=e.getCallConfig(),o=i.encodeArguments(n);return{contractId:t.id,fnSelectorBytes:i.selectorBytes,data:o,assetId:r?.assetId,amount:r?.amount,gas:a?.gasLimit,externalContractsAbis:s}}var sI=class{transactionRequest;program;functionInvocationScopes=[];txParameters;requiredCoins=[];isMultiCall=!1;hasCallParamsGasLimit=!1;externalAbis={};addSignersCallback;constructor(e,t){this.program=e,this.isMultiCall=t,this.transactionRequest=new Wi}get calls(){if(!this.getProvider().getChain())throw new v(v.CODES.CHAIN_INFO_CACHE_EMPTY,"Provider chain info cache is empty. Please make sure to initialize the `Provider` properly by running `await Provider.create()``");return this.functionInvocationScopes.map(n=>F6(n))}updateScriptRequest(){let e=this.getProvider(),{consensusParameters:{txParameters:{maxInputs:t}}}=e.getChain(),n=D6(this.functionInvocationScopes,t);this.transactionRequest.setScript(n,this.calls)}updateContractInputAndOutput(){this.calls.forEach(t=>{t.contractId&&this.transactionRequest.addContractInputAndOutput(t.contractId),t.externalContractsAbis&&Object.keys(t.externalContractsAbis).forEach(n=>this.transactionRequest.addContractInputAndOutput(se.fromB256(n)))})}getRequiredCoins(){return this.calls.map(t=>({assetId:String(t.assetId),amount:I(t.amount||0)})).filter(({assetId:t,amount:n})=>t&&!I(n).isZero())}updateRequiredCoins(){let e=this.getRequiredCoins(),t=(n,{assetId:r,amount:i})=>{let a=n.get(r)?.amount||I(0);return n.set(r,{assetId:String(r),amount:a.add(i)})};this.requiredCoins=Array.from(e.reduce(t,new Map).values())}addCall(e){return this.addCalls([e]),this}addCalls(e){return this.functionInvocationScopes.push(...e),this.updateContractInputAndOutput(),this.updateRequiredCoins(),this}async prepareTransaction(){await nI.initWasm(),this.updateScriptRequest(),this.updateRequiredCoins(),this.checkGasLimitTotal(),this.transactionRequest.type===Ve.Script&&(this.transactionRequest.abis=eI(this.functionInvocationScopes))}checkGasLimitTotal(){let e=this.calls.reduce((t,n)=>t.add(n.gas||0),I(0));if(this.transactionRequest.gasLimit.eq(0))this.transactionRequest.gasLimit=e;else if(e.gt(this.transactionRequest.gasLimit))throw new v(x.TRANSACTION_ERROR,"Transaction's gasLimit must be equal to or greater than the combined forwarded gas of all calls.")}async getTransactionCost(){let e=at(await this.getTransactionRequest());return(this.program.account??zt.generate({provider:this.getProvider()})).getTransactionCost(e,{quantities:this.getRequiredCoins(),signatureCallback:this.addSignersCallback})}async fundWithRequiredCoins(){let e=await this.getTransactionRequest();e=at(e);let t=await this.getTransactionCost(),{gasUsed:n,missingContractIds:r,outputVariables:i,maxFee:a}=t;return this.setDefaultTxParams(e,n,a),e.inputs=e.inputs.filter(s=>s.type!==ye.Coin),r.forEach(s=>{e.addContractInputAndOutput(se.fromString(s))}),e.addVariableOutputs(i),await this.program.account?.fund(e,t),this.addSignersCallback&&await this.addSignersCallback(e),e}txParams(e){this.txParameters=e;let t=this.transactionRequest;return t.tip=I(e.tip||t.tip),t.gasLimit=I(e.gasLimit||t.gasLimit),t.maxFee=e.maxFee?I(e.maxFee):t.maxFee,t.witnessLimit=e.witnessLimit?I(e.witnessLimit):t.witnessLimit,t.maturity=e.maturity||t.maturity,t.addVariableOutputs(this.txParameters?.variableOutputs||0),this}addContracts(e){return e.forEach(t=>{this.transactionRequest.addContractInputAndOutput(t.id),this.externalAbis[t.id.toB256()]=t.interface.jsonAbi}),this}addTransfer(e){let{amount:t,destination:n,assetId:r}=e,i=this.getProvider().getBaseAssetId();return this.transactionRequest=this.transactionRequest.addCoinOutput(se.fromAddressOrString(n),t,r||i),this}addBatchTransfer(e){let t=this.getProvider().getBaseAssetId();return e.forEach(({destination:n,amount:r,assetId:i})=>{this.transactionRequest=this.transactionRequest.addCoinOutput(se.fromAddressOrString(n),r,i||t)}),this}addSigners(e){return this.addSignersCallback=async t=>t.addAccountWitnesses(e),this}async getTransactionRequest(){return await this.prepareTransaction(),this.transactionRequest}async call(){KC(this.program.account,"Wallet is required!");let e=await this.fundWithRequiredCoins(),t=await this.program.account.sendTransaction(e,{estimateTxDependencies:!1});return{transactionId:t.id,waitForResult:async()=>M6({funcScope:this.functionInvocationScopes,isMultiCall:this.isMultiCall,program:this.program,transactionResponse:t})}}async simulate(){if(KC(this.program.account,"Wallet is required!"),!("populateTransactionWitnessesSignature"in this.program.account))throw new v(x.ABI_MAIN_METHOD_MISSING,"An unlocked wallet is required to simulate a contract call.");let e=await this.fundWithRequiredCoins(),t=await this.program.account.simulateTransaction(e,{estimateTxDependencies:!1});return z_({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}async dryRun(){let{receipts:e}=await this.getTransactionCost(),t={receipts:e};return z_({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}async get(){let{receipts:e}=await this.getTransactionCost(),t={receipts:e};return z_({funcScopes:this.functionInvocationScopes,callResult:t,isMultiCall:this.isMultiCall})}getProvider(){return this.program.provider}async getTransactionId(e){let t=e??await this.getProvider().getChainId();return(await this.getTransactionRequest()).getTransactionId(t)}setDefaultTxParams(e,t,n){let r=Pn(this.txParameters?.gasLimit)||this.hasCallParamsGasLimit,i=Pn(this.txParameters?.maxFee),{gasLimit:a,maxFee:s}=e;if(!r)e.gasLimit=t;else if(a.lt(t))throw new v(x.GAS_LIMIT_TOO_LOW,`Gas limit '${a}' is lower than the required: '${t}'.`);if(!i)e.maxFee=n;else if(n.gt(s))throw new v(x.MAX_FEE_TOO_LOW,`Max fee '${s}' is lower than the required: '${n}'.`)}},oI=class extends sI{func;callParameters;forward;args;constructor(e,t,n){super(e,!1),this.func=t,this.args=n||[],this.setArguments(...n),super.addCall(this)}getCallConfig(){return{func:this.func,program:this.program,callParameters:this.callParameters,txParameters:this.txParameters,forward:this.forward,args:this.args,externalAbis:this.externalAbis}}setArguments(...e){return this.args=e||[],this}callParams(e){if(!this.hasCallParamsGasLimit&&e?.gasLimit!==void 0&&(this.hasCallParamsGasLimit=!0),this.callParameters=e,e?.forward){if(!this.func.attributes.find(t=>t.name==="payable"))throw new v(x.TRANSACTION_ERROR,`The target function ${this.func.name} cannot accept forwarded funds as it's not marked as 'payable'.`);this.forward=Rd(e.forward)}return this.setArguments(...this.args),this.updateRequiredCoins(),this}},L6=class extends sI{constructor(e,t){super(e,!0),this.addCalls(t)}addCall(e){return super.addCalls([e])}addCalls(e){return super.addCalls(e)}},Q6=class{id;provider;interface;account;functions={};constructor(e,t,n){this.interface=t instanceof Dn?t:new Dn(t),this.id=se.fromAddressOrString(e),n&&"provider"in n?(this.provider=n.provider,this.account=n):(this.provider=n,this.account=null),Object.keys(this.interface.functions).forEach(r=>{let i=this.interface.getFunction(r);Object.defineProperty(this.functions,i.name,{value:this.buildFunction(i),writable:!1})})}buildFunction(e){return(()=>{let t=(...n)=>new oI(this,e,n);return Object.defineProperty(t,"isReadOnly",{value:()=>e.isReadOnly(),writable:!1}),t})()}multiCall(e){return new L6(this,e)}getBalance(e){return this.provider.getContractBalance(this.id,e)}};var Wne=new Ju("0x24000000",()=>new Uint8Array(0),()=>{});var Vr=Bn(Du(),1);var U6=Object.defineProperty,q6=(e,t)=>{for(var n in t)U6(e,n,{get:t[n],enumerable:!0})};var J6={};q6(J6,{getContractId:()=>z6,getContractRoot:()=>cI,getContractStorageRoot:()=>V6,hexlifyWithPrefix:()=>G6});var cI=e=>{let n=D(e),r=Ah(n,16384);return __(r.map(i=>L(i)))},V6=e=>{let t=new nC;return e.forEach(({key:n,value:r})=>t.update(tt(n),r)),t.root},z6=(e,t,n)=>{let r=cI(D(e));return tt(ie(["0x4655454C",t,r,n]))},G6=e=>L(e.startsWith("0x")?e:`0x${e}`);BigInt.prototype.asBigDecimal=function(){return new Vt(this.toString())};BigInt.prototype.scaleDown=function(e){return H_(this,e)};rr.prototype.asBigDecimal=function(){return new Vt(this.toString(10))};rr.prototype.scaleDown=function(e){return H_(BigInt(this.toString(10)),e)};function H_(e,t){let n=new Vt(10).pow(Number(t));return e.asBigDecimal().dividedBy(n)}var Ln=null;try{Ln=new WebAssembly.Instance(new WebAssembly.Module(new Uint8Array([0,97,115,109,1,0,0,0,1,13,2,96,0,1,127,96,4,127,127,127,127,1,127,3,7,6,0,1,1,1,1,1,6,6,1,127,1,65,0,11,7,50,6,3,109,117,108,0,1,5,100,105,118,95,115,0,2,5,100,105,118,95,117,0,3,5,114,101,109,95,115,0,4,5,114,101,109,95,117,0,5,8,103,101,116,95,104,105,103,104,0,0,10,191,1,6,4,0,35,0,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,126,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,127,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,128,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,129,34,4,66,32,135,167,36,0,32,4,167,11,36,1,1,126,32,0,173,32,1,173,66,32,134,132,32,2,173,32,3,173,66,32,134,132,130,34,4,66,32,135,167,36,0,32,4,167,11])),{}).exports}catch{}function Xe(e,t,n){this.low=e|0,this.high=t|0,this.unsigned=!!n}Xe.prototype.__isLong__;Object.defineProperty(Xe.prototype,"__isLong__",{value:!0});function Gt(e){return(e&&e.__isLong__)===!0}function uI(e){var t=Math.clz32(e&-e);return e?31-t:t}Xe.isLong=Gt;var lI={},dI={};function Wa(e,t){var n,r,i;return t?(e>>>=0,(i=0<=e&&e<256)&&(r=dI[e],r)?r:(n=De(e,0,!0),i&&(dI[e]=n),n)):(e|=0,(i=-128<=e&&e<128)&&(r=lI[e],r)?r:(n=De(e,e<0?-1:0,!1),i&&(lI[e]=n),n))}Xe.fromInt=Wa;function Qn(e,t){if(isNaN(e))return t?yi:cr;if(t){if(e<0)return yi;if(e>=mI)return AI}else{if(e<=-pI)return dn;if(e+1>=pI)return _I}return e<0?Qn(-e,t).neg():De(e%io|0,e/io|0,t)}Xe.fromNumber=Qn;function De(e,t,n){return new Xe(e,t,n)}Xe.fromBits=De;var Md=Math.pow;function X_(e,t,n){if(e.length===0)throw Error("empty string");if(typeof t=="number"?(n=t,t=!1):t=!!t,e==="NaN"||e==="Infinity"||e==="+Infinity"||e==="-Infinity")return t?yi:cr;if(n=n||10,n<2||36<n)throw RangeError("radix");var r;if((r=e.indexOf("-"))>0)throw Error("interior hyphen");if(r===0)return X_(e.substring(1),t,n).neg();for(var i=Qn(Md(n,8)),a=cr,s=0;s<e.length;s+=8){var o=Math.min(8,e.length-s),c=parseInt(e.substring(s,s+o),n);if(o<8){var u=Qn(Md(n,o));a=a.mul(u).add(Qn(c))}else a=a.mul(i),a=a.add(Qn(c))}return a.unsigned=t,a}Xe.fromString=X_;function ur(e,t){return typeof e=="number"?Qn(e,t):typeof e=="string"?X_(e,t):De(e.low,e.high,typeof t=="boolean"?t:e.unsigned)}Xe.fromValue=ur;var fI=65536,W6=1<<24,io=fI*fI,mI=io*io,pI=mI/2,hI=Wa(W6),cr=Wa(0);Xe.ZERO=cr;var yi=Wa(0,!0);Xe.UZERO=yi;var ro=Wa(1);Xe.ONE=ro;var gI=Wa(1,!0);Xe.UONE=gI;var Z_=Wa(-1);Xe.NEG_ONE=Z_;var _I=De(-1,2147483647,!1);Xe.MAX_VALUE=_I;var AI=De(-1,-1,!0);Xe.MAX_UNSIGNED_VALUE=AI;var dn=De(0,-2147483648,!1);Xe.MIN_VALUE=dn;var G=Xe.prototype;G.toInt=function(){return this.unsigned?this.low>>>0:this.low};G.toNumber=function(){return this.unsigned?(this.high>>>0)*io+(this.low>>>0):this.high*io+(this.low>>>0)};G.toString=function(t){if(t=t||10,t<2||36<t)throw RangeError("radix");if(this.isZero())return"0";if(this.isNegative())if(this.eq(dn)){var n=Qn(t),r=this.div(n),i=r.mul(n).sub(this);return r.toString(t)+i.toInt().toString(t)}else return"-"+this.neg().toString(t);for(var a=Qn(Md(t,6),this.unsigned),s=this,o="";;){var c=s.div(a),u=s.sub(c.mul(a)).toInt()>>>0,d=u.toString(t);if(s=c,s.isZero())return d+o;for(;d.length<6;)d="0"+d;o=""+d+o}};G.getHighBits=function(){return this.high};G.getHighBitsUnsigned=function(){return this.high>>>0};G.getLowBits=function(){return this.low};G.getLowBitsUnsigned=function(){return this.low>>>0};G.getNumBitsAbs=function(){if(this.isNegative())return this.eq(dn)?64:this.neg().getNumBitsAbs();for(var t=this.high!=0?this.high:this.low,n=31;n>0&&!(t&1<<n);n--);return this.high!=0?n+33:n+1};G.isZero=function(){return this.high===0&&this.low===0};G.eqz=G.isZero;G.isNegative=function(){return!this.unsigned&&this.high<0};G.isPositive=function(){return this.unsigned||this.high>=0};G.isOdd=function(){return(this.low&1)===1};G.isEven=function(){return(this.low&1)===0};G.equals=function(t){return Gt(t)||(t=ur(t)),this.unsigned!==t.unsigned&&this.high>>>31===1&&t.high>>>31===1?!1:this.high===t.high&&this.low===t.low};G.eq=G.equals;G.notEquals=function(t){return!this.eq(t)};G.neq=G.notEquals;G.ne=G.notEquals;G.lessThan=function(t){return this.comp(t)<0};G.lt=G.lessThan;G.lessThanOrEqual=function(t){return this.comp(t)<=0};G.lte=G.lessThanOrEqual;G.le=G.lessThanOrEqual;G.greaterThan=function(t){return this.comp(t)>0};G.gt=G.greaterThan;G.greaterThanOrEqual=function(t){return this.comp(t)>=0};G.gte=G.greaterThanOrEqual;G.ge=G.greaterThanOrEqual;G.compare=function(t){if(Gt(t)||(t=ur(t)),this.eq(t))return 0;var n=this.isNegative(),r=t.isNegative();return n&&!r?-1:!n&&r?1:this.unsigned?t.high>>>0>this.high>>>0||t.high===this.high&&t.low>>>0>this.low>>>0?-1:1:this.sub(t).isNegative()?-1:1};G.comp=G.compare;G.negate=function(){return!this.unsigned&&this.eq(dn)?dn:this.not().add(ro)};G.neg=G.negate;G.add=function(t){Gt(t)||(t=ur(t));var n=this.high>>>16,r=this.high&65535,i=this.low>>>16,a=this.low&65535,s=t.high>>>16,o=t.high&65535,c=t.low>>>16,u=t.low&65535,d=0,p=0,h=0,_=0;return _+=a+u,h+=_>>>16,_&=65535,h+=i+c,p+=h>>>16,h&=65535,p+=r+o,d+=p>>>16,p&=65535,d+=n+s,d&=65535,De(h<<16|_,d<<16|p,this.unsigned)};G.subtract=function(t){return Gt(t)||(t=ur(t)),this.add(t.neg())};G.sub=G.subtract;G.multiply=function(t){if(this.isZero())return this;if(Gt(t)||(t=ur(t)),Ln){var n=Ln.mul(this.low,this.high,t.low,t.high);return De(n,Ln.get_high(),this.unsigned)}if(t.isZero())return this.unsigned?yi:cr;if(this.eq(dn))return t.isOdd()?dn:cr;if(t.eq(dn))return this.isOdd()?dn:cr;if(this.isNegative())return t.isNegative()?this.neg().mul(t.neg()):this.neg().mul(t).neg();if(t.isNegative())return this.mul(t.neg()).neg();if(this.lt(hI)&&t.lt(hI))return Qn(this.toNumber()*t.toNumber(),this.unsigned);var r=this.high>>>16,i=this.high&65535,a=this.low>>>16,s=this.low&65535,o=t.high>>>16,c=t.high&65535,u=t.low>>>16,d=t.low&65535,p=0,h=0,_=0,w=0;return w+=s*d,_+=w>>>16,w&=65535,_+=a*d,h+=_>>>16,_&=65535,_+=s*u,h+=_>>>16,_&=65535,h+=i*d,p+=h>>>16,h&=65535,h+=a*u,p+=h>>>16,h&=65535,h+=s*c,p+=h>>>16,h&=65535,p+=r*d+i*u+a*c+s*o,p&=65535,De(_<<16|w,p<<16|h,this.unsigned)};G.mul=G.multiply;G.divide=function(t){if(Gt(t)||(t=ur(t)),t.isZero())throw Error("division by zero");if(Ln){if(!this.unsigned&&this.high===-2147483648&&t.low===-1&&t.high===-1)return this;var n=(this.unsigned?Ln.div_u:Ln.div_s)(this.low,this.high,t.low,t.high);return De(n,Ln.get_high(),this.unsigned)}if(this.isZero())return this.unsigned?yi:cr;var r,i,a;if(this.unsigned){if(t.unsigned||(t=t.toUnsigned()),t.gt(this))return yi;if(t.gt(this.shru(1)))return gI;a=yi}else{if(this.eq(dn)){if(t.eq(ro)||t.eq(Z_))return dn;if(t.eq(dn))return ro;var s=this.shr(1);return r=s.div(t).shl(1),r.eq(cr)?t.isNegative()?ro:Z_:(i=this.sub(t.mul(r)),a=r.add(i.div(t)),a)}else if(t.eq(dn))return this.unsigned?yi:cr;if(this.isNegative())return t.isNegative()?this.neg().div(t.neg()):this.neg().div(t).neg();if(t.isNegative())return this.div(t.neg()).neg();a=cr}for(i=this;i.gte(t);){r=Math.max(1,Math.floor(i.toNumber()/t.toNumber()));for(var o=Math.ceil(Math.log(r)/Math.LN2),c=o<=48?1:Md(2,o-48),u=Qn(r),d=u.mul(t);d.isNegative()||d.gt(i);)r-=c,u=Qn(r,this.unsigned),d=u.mul(t);u.isZero()&&(u=ro),a=a.add(u),i=i.sub(d)}return a};G.div=G.divide;G.modulo=function(t){if(Gt(t)||(t=ur(t)),Ln){var n=(this.unsigned?Ln.rem_u:Ln.rem_s)(this.low,this.high,t.low,t.high);return De(n,Ln.get_high(),this.unsigned)}return this.sub(this.div(t).mul(t))};G.mod=G.modulo;G.rem=G.modulo;G.not=function(){return De(~this.low,~this.high,this.unsigned)};G.countLeadingZeros=function(){return this.high?Math.clz32(this.high):Math.clz32(this.low)+32};G.clz=G.countLeadingZeros;G.countTrailingZeros=function(){return this.low?uI(this.low):uI(this.high)+32};G.ctz=G.countTrailingZeros;G.and=function(t){return Gt(t)||(t=ur(t)),De(this.low&t.low,this.high&t.high,this.unsigned)};G.or=function(t){return Gt(t)||(t=ur(t)),De(this.low|t.low,this.high|t.high,this.unsigned)};G.xor=function(t){return Gt(t)||(t=ur(t)),De(this.low^t.low,this.high^t.high,this.unsigned)};G.shiftLeft=function(t){return Gt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low<<t,this.high<<t|this.low>>>32-t,this.unsigned):De(0,this.low<<t-32,this.unsigned)};G.shl=G.shiftLeft;G.shiftRight=function(t){return Gt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low>>>t|this.high<<32-t,this.high>>t,this.unsigned):De(this.high>>t-32,this.high>=0?0:-1,this.unsigned)};G.shr=G.shiftRight;G.shiftRightUnsigned=function(t){return Gt(t)&&(t=t.toInt()),(t&=63)===0?this:t<32?De(this.low>>>t|this.high<<32-t,this.high>>>t,this.unsigned):t===32?De(this.high,0,this.unsigned):De(this.high>>>t-32,0,this.unsigned)};G.shru=G.shiftRightUnsigned;G.shr_u=G.shiftRightUnsigned;G.rotateLeft=function(t){var n;return Gt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?De(this.high,this.low,this.unsigned):t<32?(n=32-t,De(this.low<<t|this.high>>>n,this.high<<t|this.low>>>n,this.unsigned)):(t-=32,n=32-t,De(this.high<<t|this.low>>>n,this.low<<t|this.high>>>n,this.unsigned))};G.rotl=G.rotateLeft;G.rotateRight=function(t){var n;return Gt(t)&&(t=t.toInt()),(t&=63)===0?this:t===32?De(this.high,this.low,this.unsigned):t<32?(n=32-t,De(this.high<<n|this.low>>>t,this.low<<n|this.high>>>t,this.unsigned)):(t-=32,n=32-t,De(this.low<<n|this.high>>>t,this.high<<n|this.low>>>t,this.unsigned))};G.rotr=G.rotateRight;G.toSigned=function(){return this.unsigned?De(this.low,this.high,!1):this};G.toUnsigned=function(){return this.unsigned?this:De(this.low,this.high,!0)};G.toBytes=function(t){return t?this.toBytesLE():this.toBytesBE()};G.toBytesLE=function(){var t=this.high,n=this.low;return[n&255,n>>>8&255,n>>>16&255,n>>>24,t&255,t>>>8&255,t>>>16&255,t>>>24]};G.toBytesBE=function(){var t=this.high,n=this.low;return[t>>>24,t>>>16&255,t>>>8&255,t&255,n>>>24,n>>>16&255,n>>>8&255,n&255]};Xe.fromBytes=function(t,n,r){return r?Xe.fromBytesLE(t,n):Xe.fromBytesBE(t,n)};Xe.fromBytesLE=function(t,n){return new Xe(t[0]|t[1]<<8|t[2]<<16|t[3]<<24,t[4]|t[5]<<8|t[6]<<16|t[7]<<24,n)};Xe.fromBytesBE=function(t,n){return new Xe(t[4]<<24|t[5]<<16|t[6]<<8|t[7],t[0]<<24|t[1]<<16|t[2]<<8|t[3],n)};var vi=Xe;var g=Bn(so(),1);var Vd=Bn(so(),1);function lS(){return{}}var Wu={encode(e,t=Vd.default.Writer.create()){return t},decode(e,t){let n=e instanceof Vd.default.Reader?e:Vd.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=lS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return Wu.fromPartial(e??{})},fromPartial(e){return lS()}};var bn=Bn(so(),1),Xa;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Xa||(Xa={}));function nq(e){switch(e){case 0:case"NULL_VALUE":return Xa.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return Xa.UNRECOGNIZED}}function rq(e){switch(e){case Xa.NULL_VALUE:return"NULL_VALUE";case Xa.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function fA(){return{fields:{}}}var P={encode(e,t=bn.default.Writer.create()){return Object.entries(e.fields).forEach(([n,r])=>{r!==void 0&&mA.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof bn.default.Reader?e:bn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=fA();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=mA.decode(n,n.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:fS(e.fields)?Object.entries(e.fields).reduce((t,[n,r])=>(t[n]=r,t),{}):{}}},toJSON(e){let t={};if(e.fields){let n=Object.entries(e.fields);n.length>0&&(t.fields={},n.forEach(([r,i])=>{t.fields[r]=i}))}return t},create(e){return P.fromPartial(e??{})},fromPartial(e){let t=fA();return t.fields=Object.entries(e.fields??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=i),n),{}),t},wrap(e){let t=fA();if(e!==void 0)for(let n of Object.keys(e))t.fields[n]=e[n];return t},unwrap(e){let t={};if(e.fields)for(let n of Object.keys(e.fields))t[n]=e.fields[n];return t}};function dS(){return{key:"",value:void 0}}var mA={encode(e,t=bn.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&wi.encode(wi.wrap(e.value),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof bn.default.Reader?e:bn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=dS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=wi.unwrap(wi.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:oo(e.key)?globalThis.String(e.key):"",value:oo(e?.value)?e.value:void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=e.value),t},create(e){return mA.fromPartial(e??{})},fromPartial(e){let t=dS();return t.key=e.key??"",t.value=e.value??void 0,t}};function pA(){return{nullValue:void 0,numberValue:void 0,stringValue:void 0,boolValue:void 0,structValue:void 0,listValue:void 0}}var wi={encode(e,t=bn.default.Writer.create()){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.numberValue!==void 0&&t.uint32(17).double(e.numberValue),e.stringValue!==void 0&&t.uint32(26).string(e.stringValue),e.boolValue!==void 0&&t.uint32(32).bool(e.boolValue),e.structValue!==void 0&&P.encode(P.wrap(e.structValue),t.uint32(42).fork()).ldelim(),e.listValue!==void 0&&Wr.encode(Wr.wrap(e.listValue),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof bn.default.Reader?e:bn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=pA();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.nullValue=n.int32();continue;case 2:if(a!==17)break;i.numberValue=n.double();continue;case 3:if(a!==26)break;i.stringValue=n.string();continue;case 4:if(a!==32)break;i.boolValue=n.bool();continue;case 5:if(a!==42)break;i.structValue=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.listValue=Wr.unwrap(Wr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{nullValue:oo(e.nullValue)?nq(e.nullValue):void 0,numberValue:oo(e.numberValue)?globalThis.Number(e.numberValue):void 0,stringValue:oo(e.stringValue)?globalThis.String(e.stringValue):void 0,boolValue:oo(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,structValue:fS(e.structValue)?e.structValue:void 0,listValue:globalThis.Array.isArray(e.listValue)?[...e.listValue]:void 0}},toJSON(e){let t={};return e.nullValue!==void 0&&(t.nullValue=rq(e.nullValue)),e.numberValue!==void 0&&(t.numberValue=e.numberValue),e.stringValue!==void 0&&(t.stringValue=e.stringValue),e.boolValue!==void 0&&(t.boolValue=e.boolValue),e.structValue!==void 0&&(t.structValue=e.structValue),e.listValue!==void 0&&(t.listValue=e.listValue),t},create(e){return wi.fromPartial(e??{})},fromPartial(e){let t=pA();return t.nullValue=e.nullValue??void 0,t.numberValue=e.numberValue??void 0,t.stringValue=e.stringValue??void 0,t.boolValue=e.boolValue??void 0,t.structValue=e.structValue??void 0,t.listValue=e.listValue??void 0,t},wrap(e){let t=pA();if(e===null)t.nullValue=Xa.NULL_VALUE;else if(typeof e=="boolean")t.boolValue=e;else if(typeof e=="number")t.numberValue=e;else if(typeof e=="string")t.stringValue=e;else if(globalThis.Array.isArray(e))t.listValue=e;else if(typeof e=="object")t.structValue=e;else if(typeof e<"u")throw new globalThis.Error("Unsupported any value type: "+typeof e);return t},unwrap(e){if(e.stringValue!==void 0)return e.stringValue;if(e?.numberValue!==void 0)return e.numberValue;if(e?.boolValue!==void 0)return e.boolValue;if(e?.structValue!==void 0)return e.structValue;if(e?.listValue!==void 0)return e.listValue;if(e?.nullValue!==void 0)return null}};function hA(){return{values:[]}}var Wr={encode(e,t=bn.default.Writer.create()){for(let n of e.values)wi.encode(wi.wrap(n),t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof bn.default.Reader?e:bn.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=hA();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.values.push(wi.unwrap(wi.decode(n,n.uint32())));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?[...e.values]:[]}},toJSON(e){let t={};return e.values?.length&&(t.values=e.values),t},create(e){return Wr.fromPartial(e??{})},fromPartial(e){let t=hA();return t.values=e.values?.map(n=>n)||[],t},wrap(e){let t=hA();return t.values=e??[],t},unwrap(e){return e?.hasOwnProperty("values")&&globalThis.Array.isArray(e.values)?e.values:e}};function fS(e){return typeof e=="object"&&e!==null}function oo(e){return e!=null}var Ya=Bn(so(),1);function pS(){return{seconds:BigInt("0"),nanos:0}}var Oe={encode(e,t=Ya.default.Writer.create()){if(e.seconds!==BigInt("0")){if(BigInt.asIntN(64,e.seconds)!==e.seconds)throw new globalThis.Error("value provided for field message.seconds of type int64 too large");t.uint32(8).int64(e.seconds.toString())}return e.nanos!==0&&t.uint32(16).int32(e.nanos),t},decode(e,t){let n=e instanceof Ya.default.Reader?e:Ya.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=pS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.seconds=iq(n.int64());continue;case 2:if(a!==16)break;i.nanos=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{seconds:hS(e.seconds)?BigInt(e.seconds):BigInt("0"),nanos:hS(e.nanos)?globalThis.Number(e.nanos):0}},toJSON(e){let t={};return e.seconds!==BigInt("0")&&(t.seconds=e.seconds.toString()),e.nanos!==0&&(t.nanos=Math.round(e.nanos)),t},create(e){return Oe.fromPartial(e??{})},fromPartial(e){let t=pS();return t.seconds=e.seconds??BigInt("0"),t.nanos=e.nanos??0,t}};function iq(e){return BigInt(e.toString())}Ya.default.util.Long!==vi&&(Ya.default.util.Long=vi,Ya.default.configure());function hS(e){return e!=null}var Le=Bn(so(),1);var mS;(function(e){e[e.FREE=0]="FREE",e[e.DEV=1]="DEV",e[e.PRO=2]="PRO",e[e.ENTERPRISE=3]="ENTERPRISE",e[e.ANONYMOUS=16]="ANONYMOUS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(mS||(mS={}));var gS;(function(e){e[e.ORG_MEMBER=0]="ORG_MEMBER",e[e.ORG_ADMIN=1]="ORG_ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(gS||(gS={}));var _S;(function(e){e[e.AND=0]="AND",e[e.OR=1]="OR",e[e.THEN=2]="THEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(_S||(_S={}));var AS;(function(e){e[e.READ=0]="READ",e[e.WRITE=1]="WRITE",e[e.ADMIN=2]="ADMIN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(AS||(AS={}));var yS;(function(e){e[e.GENERAL=0]="GENERAL",e[e.PROCESSOR_UPLOAD_FAILED=101]="PROCESSOR_UPLOAD_FAILED",e[e.PROCESSOR_UPLOAD_SUCCESS=102]="PROCESSOR_UPLOAD_SUCCESS",e[e.PROCESSOR_OBSOLETED=103]="PROCESSOR_OBSOLETED",e[e.PROCESSOR_STOPPED=104]="PROCESSOR_STOPPED",e[e.PROCESSOR_ACTIVATED=105]="PROCESSOR_ACTIVATED",e[e.PROCESSOR_GENERAL=106]="PROCESSOR_GENERAL",e[e.PROCESSOR_ERROR=107]="PROCESSOR_ERROR",e[e.EXPORT_TASK_FAILED=201]="EXPORT_TASK_FAILED",e[e.EXPORT_TASK_SUCCESS=202]="EXPORT_TASK_SUCCESS",e[e.BILLING_INVOICE=301]="BILLING_INVOICE",e[e.BILLING_PAYMENT=302]="BILLING_PAYMENT",e[e.BILLING_SUBSCRIPTION=303]="BILLING_SUBSCRIPTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(yS||(yS={}));var vS;(function(e){e[e.PENDING=0]="PENDING",e[e.SET_USERNAME=1]="SET_USERNAME",e[e.BANNED=9]="BANNED",e[e.ACTIVE=10]="ACTIVE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(vS||(vS={}));var wS;(function(e){e[e.PUBLIC=0]="PUBLIC",e[e.PRIVATE=1]="PRIVATE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(wS||(wS={}));var bS;(function(e){e[e.SENTIO=0]="SENTIO",e[e.SUBGRAPH=1]="SUBGRAPH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(bS||(bS={}));var ES;(function(e){e[e.AVG=0]="AVG",e[e.SUM=1]="SUM",e[e.MIN=2]="MIN",e[e.MAX=3]="MAX",e[e.COUNT=4]="COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(ES||(ES={}));var CS;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.EXISTS=9]="EXISTS",e[e.NOT_EXISTS=10]="NOT_EXISTS",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.CONTAINS=11]="CONTAINS",e[e.NOT_CONTAINS=12]="NOT_CONTAINS",e[e.IN_COHORTS=13]="IN_COHORTS",e[e.NOT_IN_COHORTS=14]="NOT_IN_COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(CS||(CS={}));var IS;(function(e){e[e.EVENTS=0]="EVENTS",e[e.COHORTS=1]="COHORTS",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(IS||(IS={}));var SS;(function(e){e[e.SUM=0]="SUM",e[e.CUMULATIVE_SUM=6]="CUMULATIVE_SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.CUMULATIVE_DISTINCT_COUNT=9]="CUMULATIVE_DISTINCT_COUNT",e[e.CUMULATIVE_COUNT=12]="CUMULATIVE_COUNT",e[e.LAST=7]="LAST",e[e.CUMULATIVE_LAST=10]="CUMULATIVE_LAST",e[e.FIRST=8]="FIRST",e[e.CUMULATIVE_FIRST=11]="CUMULATIVE_FIRST",e[e.PERCENTILE_25TH=20]="PERCENTILE_25TH",e[e.PERCENTILE_75TH=21]="PERCENTILE_75TH",e[e.PERCENTILE_90TH=22]="PERCENTILE_90TH",e[e.PERCENTILE_95TH=23]="PERCENTILE_95TH",e[e.PERCENTILE_99TH=24]="PERCENTILE_99TH",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(SS||(SS={}));var xS;(function(e){e[e.EQ=0]="EQ",e[e.NEQ=1]="NEQ",e[e.GT=2]="GT",e[e.GTE=3]="GTE",e[e.LT=4]="LT",e[e.LTE=5]="LTE",e[e.BETWEEN=7]="BETWEEN",e[e.NOT_BETWEEN=8]="NOT_BETWEEN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(xS||(xS={}));var TS;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.LAST=6]="LAST",e[e.FIRST=7]="FIRST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(TS||(TS={}));var NS;(function(e){e[e.PROCESSOR=0]="PROCESSOR",e[e.UI=1]="UI",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(NS||(NS={}));var RS;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.EMAIL=1]="EMAIL",e[e.SLACK=2]="SLACK",e[e.TELEGRAM=3]="TELEGRAM",e[e.WEBHOOK=4]="WEBHOOK",e[e.DISCORD=5]="DISCORD",e[e.PAGERDUTY=6]="PAGERDUTY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(RS||(RS={}));var kS;(function(e){e[e.STRING=0]="STRING",e[e.NUMBER=1]="NUMBER",e[e.BOOLEAN=2]="BOOLEAN",e[e.LIST=3]="LIST",e[e.TIME=4]="TIME",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(kS||(kS={}));var BS;(function(e){e[e.OnOrAfter=0]="OnOrAfter",e[e.On=1]="On",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(BS||(BS={}));var OS;(function(e){e[e.Disable=0]="Disable",e[e.FirstInTimeRange=1]="FirstInTimeRange",e[e.FirstInGlobal=2]="FirstInGlobal",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(OS||(OS={}));var PS;(function(e){e[e.Day=0]="Day",e[e.Week=1]="Week",e[e.Month=2]="Month",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(PS||(PS={}));var DS;(function(e){e[e.SUM=0]="SUM",e[e.AVG=1]="AVG",e[e.MEDIAN=2]="MEDIAN",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.DISTINCT_COUNT=5]="DISTINCT_COUNT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(DS||(DS={}));var wt;(function(e){e[e.NULL_VALUE=0]="NULL_VALUE",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(wt||(wt={}));function aq(e){switch(e){case 0:case"NULL_VALUE":return wt.NULL_VALUE;case-1:case"UNRECOGNIZED":default:return wt.UNRECOGNIZED}}function sq(e){switch(e){case wt.NULL_VALUE:return"NULL_VALUE";case wt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function MS(){return{symbol:void 0,address:void 0}}var Xi={encode(e,t=Le.default.Writer.create()){return e.symbol!==void 0&&t.uint32(10).string(e.symbol),e.address!==void 0&&co.encode(e.address,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=MS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.symbol=n.string();continue;case 2:if(a!==18)break;i.address=co.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{symbol:lt(e.symbol)?globalThis.String(e.symbol):void 0,address:lt(e.address)?co.fromJSON(e.address):void 0}},toJSON(e){let t={};return e.symbol!==void 0&&(t.symbol=e.symbol),e.address!==void 0&&(t.address=co.toJSON(e.address)),t},create(e){return Xi.fromPartial(e??{})},fromPartial(e){let t=MS();return t.symbol=e.symbol??void 0,t.address=e.address!==void 0&&e.address!==null?co.fromPartial(e.address):void 0,t}};function FS(){return{address:"",chain:""}}var co={encode(e,t=Le.default.Writer.create()){return e.address!==""&&t.uint32(10).string(e.address),e.chain!==""&&t.uint32(18).string(e.chain),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=FS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 2:if(a!==18)break;i.chain=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:lt(e.address)?globalThis.String(e.address):"",chain:lt(e.chain)?globalThis.String(e.chain):""}},toJSON(e){let t={};return e.address!==""&&(t.address=e.address),e.chain!==""&&(t.chain=e.chain),t},create(e){return co.fromPartial(e??{})},fromPartial(e){let t=FS();return t.address=e.address??"",t.chain=e.chain??"",t}};function LS(){return{nullValue:void 0,intValue:void 0,floatValue:void 0,bytesValue:void 0,boolValue:void 0,stringValue:void 0,timestampValue:void 0,bigintValue:void 0,bigdecimalValue:void 0,listValue:void 0,structValue:void 0}}var me={encode(e,t=Le.default.Writer.create()){return e.nullValue!==void 0&&t.uint32(8).int32(e.nullValue),e.intValue!==void 0&&t.uint32(16).int32(e.intValue),e.floatValue!==void 0&&t.uint32(25).double(e.floatValue),e.bytesValue!==void 0&&t.uint32(34).bytes(e.bytesValue),e.boolValue!==void 0&&t.uint32(40).bool(e.boolValue),e.stringValue!==void 0&&t.uint32(50).string(e.stringValue),e.timestampValue!==void 0&&Oe.encode(oq(e.timestampValue),t.uint32(58).fork()).ldelim(),e.bigintValue!==void 0&&Tt.encode(e.bigintValue,t.uint32(66).fork()).ldelim(),e.bigdecimalValue!==void 0&&uo.encode(e.bigdecimalValue,t.uint32(74).fork()).ldelim(),e.listValue!==void 0&&Ge.encode(e.listValue,t.uint32(82).fork()).ldelim(),e.structValue!==void 0&&rt.encode(e.structValue,t.uint32(90).fork()).ldelim(),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=LS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.nullValue=n.int32();continue;case 2:if(a!==16)break;i.intValue=n.int32();continue;case 3:if(a!==25)break;i.floatValue=n.double();continue;case 4:if(a!==34)break;i.bytesValue=n.bytes();continue;case 5:if(a!==40)break;i.boolValue=n.bool();continue;case 6:if(a!==50)break;i.stringValue=n.string();continue;case 7:if(a!==58)break;i.timestampValue=HS(Oe.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.bigintValue=Tt.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.bigdecimalValue=uo.decode(n,n.uint32());continue;case 10:if(a!==82)break;i.listValue=Ge.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.structValue=rt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{nullValue:lt(e.nullValue)?aq(e.nullValue):void 0,intValue:lt(e.intValue)?globalThis.Number(e.intValue):void 0,floatValue:lt(e.floatValue)?globalThis.Number(e.floatValue):void 0,bytesValue:lt(e.bytesValue)?GS(e.bytesValue):void 0,boolValue:lt(e.boolValue)?globalThis.Boolean(e.boolValue):void 0,stringValue:lt(e.stringValue)?globalThis.String(e.stringValue):void 0,timestampValue:lt(e.timestampValue)?cq(e.timestampValue):void 0,bigintValue:lt(e.bigintValue)?Tt.fromJSON(e.bigintValue):void 0,bigdecimalValue:lt(e.bigdecimalValue)?uo.fromJSON(e.bigdecimalValue):void 0,listValue:lt(e.listValue)?Ge.fromJSON(e.listValue):void 0,structValue:lt(e.structValue)?rt.fromJSON(e.structValue):void 0}},toJSON(e){let t={};return e.nullValue!==void 0&&(t.nullValue=sq(e.nullValue)),e.intValue!==void 0&&(t.intValue=Math.round(e.intValue)),e.floatValue!==void 0&&(t.floatValue=e.floatValue),e.bytesValue!==void 0&&(t.bytesValue=WS(e.bytesValue)),e.boolValue!==void 0&&(t.boolValue=e.boolValue),e.stringValue!==void 0&&(t.stringValue=e.stringValue),e.timestampValue!==void 0&&(t.timestampValue=e.timestampValue.toISOString()),e.bigintValue!==void 0&&(t.bigintValue=Tt.toJSON(e.bigintValue)),e.bigdecimalValue!==void 0&&(t.bigdecimalValue=uo.toJSON(e.bigdecimalValue)),e.listValue!==void 0&&(t.listValue=Ge.toJSON(e.listValue)),e.structValue!==void 0&&(t.structValue=rt.toJSON(e.structValue)),t},create(e){return me.fromPartial(e??{})},fromPartial(e){let t=LS();return t.nullValue=e.nullValue??void 0,t.intValue=e.intValue??void 0,t.floatValue=e.floatValue??void 0,t.bytesValue=e.bytesValue??void 0,t.boolValue=e.boolValue??void 0,t.stringValue=e.stringValue??void 0,t.timestampValue=e.timestampValue??void 0,t.bigintValue=e.bigintValue!==void 0&&e.bigintValue!==null?Tt.fromPartial(e.bigintValue):void 0,t.bigdecimalValue=e.bigdecimalValue!==void 0&&e.bigdecimalValue!==null?uo.fromPartial(e.bigdecimalValue):void 0,t.listValue=e.listValue!==void 0&&e.listValue!==null?Ge.fromPartial(e.listValue):void 0,t.structValue=e.structValue!==void 0&&e.structValue!==null?rt.fromPartial(e.structValue):void 0,t}};function QS(){return{fields:{}}}var rt={encode(e,t=Le.default.Writer.create()){return Object.entries(e.fields).forEach(([n,r])=>{gA.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=QS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=gA.decode(n,n.uint32());s.value!==void 0&&(i.fields[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:uq(e.fields)?Object.entries(e.fields).reduce((t,[n,r])=>(t[n]=me.fromJSON(r),t),{}):{}}},toJSON(e){let t={};if(e.fields){let n=Object.entries(e.fields);n.length>0&&(t.fields={},n.forEach(([r,i])=>{t.fields[r]=me.toJSON(i)}))}return t},create(e){return rt.fromPartial(e??{})},fromPartial(e){let t=QS();return t.fields=Object.entries(e.fields??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=me.fromPartial(i)),n),{}),t}};function US(){return{key:"",value:void 0}}var gA={encode(e,t=Le.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&me.encode(e.value,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=US();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=me.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:lt(e.key)?globalThis.String(e.key):"",value:lt(e.value)?me.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=me.toJSON(e.value)),t},create(e){return gA.fromPartial(e??{})},fromPartial(e){let t=US();return t.key=e.key??"",t.value=e.value!==void 0&&e.value!==null?me.fromPartial(e.value):void 0,t}};function qS(){return{values:[]}}var Ge={encode(e,t=Le.default.Writer.create()){for(let n of e.values)me.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=qS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.values.push(me.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{values:globalThis.Array.isArray(e?.values)?e.values.map(t=>me.fromJSON(t)):[]}},toJSON(e){let t={};return e.values?.length&&(t.values=e.values.map(n=>me.toJSON(n))),t},create(e){return Ge.fromPartial(e??{})},fromPartial(e){let t=qS();return t.values=e.values?.map(n=>me.fromPartial(n))||[],t}};function JS(){return{entities:[]}}var Yi={encode(e,t=Le.default.Writer.create()){for(let n of e.entities)rt.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=JS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entities.push(rt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(t=>rt.fromJSON(t)):[]}},toJSON(e){let t={};return e.entities?.length&&(t.entities=e.entities.map(n=>rt.toJSON(n))),t},create(e){return Yi.fromPartial(e??{})},fromPartial(e){let t=JS();return t.entities=e.entities?.map(n=>rt.fromPartial(n))||[],t}};function VS(){return{value:void 0,exp:0}}var uo={encode(e,t=Le.default.Writer.create()){return e.value!==void 0&&Tt.encode(e.value,t.uint32(10).fork()).ldelim(),e.exp!==0&&t.uint32(16).int32(e.exp),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=VS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.value=Tt.decode(n,n.uint32());continue;case 2:if(a!==16)break;i.exp=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{value:lt(e.value)?Tt.fromJSON(e.value):void 0,exp:lt(e.exp)?globalThis.Number(e.exp):0}},toJSON(e){let t={};return e.value!==void 0&&(t.value=Tt.toJSON(e.value)),e.exp!==0&&(t.exp=Math.round(e.exp)),t},create(e){return uo.fromPartial(e??{})},fromPartial(e){let t=VS();return t.value=e.value!==void 0&&e.value!==null?Tt.fromPartial(e.value):void 0,t.exp=e.exp??0,t}};function zS(){return{negative:!1,data:new Uint8Array(0)}}var Tt={encode(e,t=Le.default.Writer.create()){return e.negative!==!1&&t.uint32(8).bool(e.negative),e.data.length!==0&&t.uint32(18).bytes(e.data),t},decode(e,t){let n=e instanceof Le.default.Reader?e:Le.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=zS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.negative=n.bool();continue;case 2:if(a!==18)break;i.data=n.bytes();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{negative:lt(e.negative)?globalThis.Boolean(e.negative):!1,data:lt(e.data)?GS(e.data):new Uint8Array(0)}},toJSON(e){let t={};return e.negative!==!1&&(t.negative=e.negative),e.data.length!==0&&(t.data=WS(e.data)),t},create(e){return Tt.fromPartial(e??{})},fromPartial(e){let t=zS();return t.negative=e.negative??!1,t.data=e.data??new Uint8Array(0),t}};function GS(e){if(globalThis.Buffer)return Uint8Array.from(globalThis.Buffer.from(e,"base64"));{let t=globalThis.atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;++r)n[r]=t.charCodeAt(r);return n}}function WS(e){if(globalThis.Buffer)return globalThis.Buffer.from(e).toString("base64");{let t=[];return e.forEach(n=>{t.push(globalThis.String.fromCharCode(n))}),globalThis.btoa(t.join(""))}}function oq(e){let t=BigInt(Math.trunc(e.getTime()/1e3)),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}function HS(e){let t=(globalThis.Number(e.seconds.toString())||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function cq(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):HS(Oe.fromJSON(e))}Le.default.util.Long!==vi&&(Le.default.util.Long=vi,Le.default.configure());function uq(e){return typeof e=="object"&&e!==null}function lt(e){return e!=null}var kt;(function(e){e[e.UNKNOWN_TYPE=0]="UNKNOWN_TYPE",e[e.COUNTER=1]="COUNTER",e[e.GAUGE=2]="GAUGE",e[e.HISTOGRAM=3]="HISTOGRAM",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(kt||(kt={}));function lq(e){switch(e){case 0:case"UNKNOWN_TYPE":return kt.UNKNOWN_TYPE;case 1:case"COUNTER":return kt.COUNTER;case 2:case"GAUGE":return kt.GAUGE;case 3:case"HISTOGRAM":return kt.HISTOGRAM;case-1:case"UNRECOGNIZED":default:return kt.UNRECOGNIZED}}function dq(e){switch(e){case kt.UNKNOWN_TYPE:return"UNKNOWN_TYPE";case kt.COUNTER:return"COUNTER";case kt.GAUGE:return"GAUGE";case kt.HISTOGRAM:return"HISTOGRAM";case kt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var bt;(function(e){e[e.COUNT=0]="COUNT",e[e.SUM=1]="SUM",e[e.AVG=2]="AVG",e[e.MIN=3]="MIN",e[e.MAX=4]="MAX",e[e.LAST=5]="LAST",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(bt||(bt={}));function fq(e){switch(e){case 0:case"COUNT":return bt.COUNT;case 1:case"SUM":return bt.SUM;case 2:case"AVG":return bt.AVG;case 3:case"MIN":return bt.MIN;case 4:case"MAX":return bt.MAX;case 5:case"LAST":return bt.LAST;case-1:case"UNRECOGNIZED":default:return bt.UNRECOGNIZED}}function pq(e){switch(e){case bt.COUNT:return"COUNT";case bt.SUM:return"SUM";case bt.AVG:return"AVG";case bt.MIN:return"MIN";case bt.MAX:return"MAX";case bt.LAST:return"LAST";case bt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Zr;(function(e){e[e.ADDRESS=0]="ADDRESS",e[e.OBJECT=1]="OBJECT",e[e.WRAPPED_OBJECT=2]="WRAPPED_OBJECT",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Zr||(Zr={}));function hq(e){switch(e){case 0:case"ADDRESS":return Zr.ADDRESS;case 1:case"OBJECT":return Zr.OBJECT;case 2:case"WRAPPED_OBJECT":return Zr.WRAPPED_OBJECT;case-1:case"UNRECOGNIZED":default:return Zr.UNRECOGNIZED}}function mq(e){switch(e){case Zr.ADDRESS:return"ADDRESS";case Zr.OBJECT:return"OBJECT";case Zr.WRAPPED_OBJECT:return"WRAPPED_OBJECT";case Zr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Xr;(function(e){e[e.ERC20=0]="ERC20",e[e.ERC721=1]="ERC721",e[e.ERC1155=2]="ERC1155",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Xr||(Xr={}));function gq(e){switch(e){case 0:case"ERC20":return Xr.ERC20;case 1:case"ERC721":return Xr.ERC721;case 2:case"ERC1155":return Xr.ERC1155;case-1:case"UNRECOGNIZED":default:return Xr.UNRECOGNIZED}}function _q(e){switch(e){case Xr.ERC20:return"ERC20";case Xr.ERC721:return"ERC721";case Xr.ERC1155:return"ERC1155";case Xr.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var be;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.ETH_LOG=1]="ETH_LOG",e[e.ETH_BLOCK=2]="ETH_BLOCK",e[e.ETH_TRACE=5]="ETH_TRACE",e[e.ETH_TRANSACTION=11]="ETH_TRANSACTION",e[e.SOL_INSTRUCTION=4]="SOL_INSTRUCTION",e[e.APT_EVENT=6]="APT_EVENT",e[e.APT_CALL=7]="APT_CALL",e[e.APT_RESOURCE=8]="APT_RESOURCE",e[e.SUI_EVENT=3]="SUI_EVENT",e[e.SUI_CALL=9]="SUI_CALL",e[e.SUI_OBJECT=10]="SUI_OBJECT",e[e.SUI_OBJECT_CHANGE=12]="SUI_OBJECT_CHANGE",e[e.FUEL_CALL=13]="FUEL_CALL",e[e.FUEL_BLOCK=17]="FUEL_BLOCK",e[e.COSMOS_CALL=14]="COSMOS_CALL",e[e.STARKNET_EVENT=15]="STARKNET_EVENT",e[e.BTC_TRANSACTION=16]="BTC_TRANSACTION",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(be||(be={}));function WT(e){switch(e){case 0:case"UNKNOWN":return be.UNKNOWN;case 1:case"ETH_LOG":return be.ETH_LOG;case 2:case"ETH_BLOCK":return be.ETH_BLOCK;case 5:case"ETH_TRACE":return be.ETH_TRACE;case 11:case"ETH_TRANSACTION":return be.ETH_TRANSACTION;case 4:case"SOL_INSTRUCTION":return be.SOL_INSTRUCTION;case 6:case"APT_EVENT":return be.APT_EVENT;case 7:case"APT_CALL":return be.APT_CALL;case 8:case"APT_RESOURCE":return be.APT_RESOURCE;case 3:case"SUI_EVENT":return be.SUI_EVENT;case 9:case"SUI_CALL":return be.SUI_CALL;case 10:case"SUI_OBJECT":return be.SUI_OBJECT;case 12:case"SUI_OBJECT_CHANGE":return be.SUI_OBJECT_CHANGE;case 13:case"FUEL_CALL":return be.FUEL_CALL;case 17:case"FUEL_BLOCK":return be.FUEL_BLOCK;case 14:case"COSMOS_CALL":return be.COSMOS_CALL;case 15:case"STARKNET_EVENT":return be.STARKNET_EVENT;case 16:case"BTC_TRANSACTION":return be.BTC_TRANSACTION;case-1:case"UNRECOGNIZED":default:return be.UNRECOGNIZED}}function HT(e){switch(e){case be.UNKNOWN:return"UNKNOWN";case be.ETH_LOG:return"ETH_LOG";case be.ETH_BLOCK:return"ETH_BLOCK";case be.ETH_TRACE:return"ETH_TRACE";case be.ETH_TRANSACTION:return"ETH_TRANSACTION";case be.SOL_INSTRUCTION:return"SOL_INSTRUCTION";case be.APT_EVENT:return"APT_EVENT";case be.APT_CALL:return"APT_CALL";case be.APT_RESOURCE:return"APT_RESOURCE";case be.SUI_EVENT:return"SUI_EVENT";case be.SUI_CALL:return"SUI_CALL";case be.SUI_OBJECT:return"SUI_OBJECT";case be.SUI_OBJECT_CHANGE:return"SUI_OBJECT_CHANGE";case be.FUEL_CALL:return"FUEL_CALL";case be.FUEL_BLOCK:return"FUEL_BLOCK";case be.COSMOS_CALL:return"COSMOS_CALL";case be.STARKNET_EVENT:return"STARKNET_EVENT";case be.BTC_TRANSACTION:return"BTC_TRANSACTION";case be.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Rt;(function(e){e[e.DEBUG=0]="DEBUG",e[e.INFO=1]="INFO",e[e.WARNING=2]="WARNING",e[e.ERROR=3]="ERROR",e[e.CRITICAL=4]="CRITICAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Rt||(Rt={}));function Aq(e){switch(e){case 0:case"DEBUG":return Rt.DEBUG;case 1:case"INFO":return Rt.INFO;case 2:case"WARNING":return Rt.WARNING;case 3:case"ERROR":return Rt.ERROR;case 4:case"CRITICAL":return Rt.CRITICAL;case-1:case"UNRECOGNIZED":default:return Rt.UNRECOGNIZED}}function yq(e){switch(e){case Rt.DEBUG:return"DEBUG";case Rt.INFO:return"INFO";case Rt.WARNING:return"WARNING";case Rt.ERROR:return"ERROR";case Rt.CRITICAL:return"CRITICAL";case Rt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Ki;(function(e){e[e.AVG=0]="AVG",e[e.MEDIAN=1]="MEDIAN",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Ki||(Ki={}));function hie(e){switch(e){case 0:case"AVG":return Ki.AVG;case 1:case"MEDIAN":return Ki.MEDIAN;case-1:case"UNRECOGNIZED":default:return Ki.UNRECOGNIZED}}function mie(e){switch(e){case Ki.AVG:return"AVG";case Ki.MEDIAN:return"MEDIAN";case Ki.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var Nt;(function(e){e[e.STRING=0]="STRING",e[e.DOUBLE=1]="DOUBLE",e[e.BOOL=2]="BOOL",e[e.TIMESTAMP=3]="TIMESTAMP",e[e.BIG_INTEGER=4]="BIG_INTEGER",e[e.BIG_DECIMAL=5]="BIG_DECIMAL",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(Nt||(Nt={}));function vq(e){switch(e){case 0:case"STRING":return Nt.STRING;case 1:case"DOUBLE":return Nt.DOUBLE;case 2:case"BOOL":return Nt.BOOL;case 3:case"TIMESTAMP":return Nt.TIMESTAMP;case 4:case"BIG_INTEGER":return Nt.BIG_INTEGER;case 5:case"BIG_DECIMAL":return Nt.BIG_DECIMAL;case-1:case"UNRECOGNIZED":default:return Nt.UNRECOGNIZED}}function wq(e){switch(e){case Nt.STRING:return"STRING";case Nt.DOUBLE:return"DOUBLE";case Nt.BOOL:return"BOOL";case Nt.TIMESTAMP:return"TIMESTAMP";case Nt.BIG_INTEGER:return"BIG_INTEGER";case Nt.BIG_DECIMAL:return"BIG_DECIMAL";case Nt.UNRECOGNIZED:default:return"UNRECOGNIZED"}}var we;(function(e){e[e.EQ=0]="EQ",e[e.NE=1]="NE",e[e.GT=2]="GT",e[e.GE=3]="GE",e[e.LT=4]="LT",e[e.LE=5]="LE",e[e.IN=6]="IN",e[e.NOT_IN=7]="NOT_IN",e[e.LIKE=8]="LIKE",e[e.NOT_LIKE=9]="NOT_LIKE",e[e.HAS_ALL=10]="HAS_ALL",e[e.HAS_ANY=11]="HAS_ANY",e[e.UNRECOGNIZED=-1]="UNRECOGNIZED"})(we||(we={}));function bq(e){switch(e){case 0:case"EQ":return we.EQ;case 1:case"NE":return we.NE;case 2:case"GT":return we.GT;case 3:case"GE":return we.GE;case 4:case"LT":return we.LT;case 5:case"LE":return we.LE;case 6:case"IN":return we.IN;case 7:case"NOT_IN":return we.NOT_IN;case 8:case"LIKE":return we.LIKE;case 9:case"NOT_LIKE":return we.NOT_LIKE;case 10:case"HAS_ALL":return we.HAS_ALL;case 11:case"HAS_ANY":return we.HAS_ANY;case-1:case"UNRECOGNIZED":default:return we.UNRECOGNIZED}}function Eq(e){switch(e){case we.EQ:return"EQ";case we.NE:return"NE";case we.GT:return"GT";case we.GE:return"GE";case we.LT:return"LT";case we.LE:return"LE";case we.IN:return"IN";case we.NOT_IN:return"NOT_IN";case we.LIKE:return"LIKE";case we.NOT_LIKE:return"NOT_LIKE";case we.HAS_ALL:return"HAS_ALL";case we.HAS_ANY:return"HAS_ANY";case we.UNRECOGNIZED:default:return"UNRECOGNIZED"}}function ZS(){return{name:"",version:""}}var lo={encode(e,t=g.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.version!==""&&t.uint32(26).string(e.version),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ZS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 3:if(a!==26)break;i.version=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",version:E(e.version)?globalThis.String(e.version):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.version!==""&&(t.version=e.version),t},create(e){return lo.fromPartial(e??{})},fromPartial(e){let t=ZS();return t.name=e.name??"",t.version=e.version??"",t}};function XS(){return{sequential:!1,forceExactBlockTime:!1,processBindingTimeout:0,skipStartBlockValidation:!1,rpcRetryTimes:0}}var fo={encode(e,t=g.default.Writer.create()){return e.sequential!==!1&&t.uint32(8).bool(e.sequential),e.forceExactBlockTime!==!1&&t.uint32(16).bool(e.forceExactBlockTime),e.processBindingTimeout!==0&&t.uint32(24).int32(e.processBindingTimeout),e.skipStartBlockValidation!==!1&&t.uint32(32).bool(e.skipStartBlockValidation),e.rpcRetryTimes!==0&&t.uint32(40).int32(e.rpcRetryTimes),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=XS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.sequential=n.bool();continue;case 2:if(a!==16)break;i.forceExactBlockTime=n.bool();continue;case 3:if(a!==24)break;i.processBindingTimeout=n.int32();continue;case 4:if(a!==32)break;i.skipStartBlockValidation=n.bool();continue;case 5:if(a!==40)break;i.rpcRetryTimes=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{sequential:E(e.sequential)?globalThis.Boolean(e.sequential):!1,forceExactBlockTime:E(e.forceExactBlockTime)?globalThis.Boolean(e.forceExactBlockTime):!1,processBindingTimeout:E(e.processBindingTimeout)?globalThis.Number(e.processBindingTimeout):0,skipStartBlockValidation:E(e.skipStartBlockValidation)?globalThis.Boolean(e.skipStartBlockValidation):!1,rpcRetryTimes:E(e.rpcRetryTimes)?globalThis.Number(e.rpcRetryTimes):0}},toJSON(e){let t={};return e.sequential!==!1&&(t.sequential=e.sequential),e.forceExactBlockTime!==!1&&(t.forceExactBlockTime=e.forceExactBlockTime),e.processBindingTimeout!==0&&(t.processBindingTimeout=Math.round(e.processBindingTimeout)),e.skipStartBlockValidation!==!1&&(t.skipStartBlockValidation=e.skipStartBlockValidation),e.rpcRetryTimes!==0&&(t.rpcRetryTimes=Math.round(e.rpcRetryTimes)),t},create(e){return fo.fromPartial(e??{})},fromPartial(e){let t=XS();return t.sequential=e.sequential??!1,t.forceExactBlockTime=e.forceExactBlockTime??!1,t.processBindingTimeout=e.processBindingTimeout??0,t.skipStartBlockValidation=e.skipStartBlockValidation??!1,t.rpcRetryTimes=e.rpcRetryTimes??0,t}};function YS(){return{}}var ZT={encode(e,t=g.default.Writer.create()){return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=YS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return ZT.fromPartial(e??{})},fromPartial(e){return YS()}};function $S(){return{config:void 0,executionConfig:void 0,contractConfigs:[],templateInstances:[],accountConfigs:[],metricConfigs:[],eventTrackingConfigs:[],exportConfigs:[],eventLogConfigs:[],dbSchema:void 0}}var XT={encode(e,t=g.default.Writer.create()){e.config!==void 0&&lo.encode(e.config,t.uint32(10).fork()).ldelim(),e.executionConfig!==void 0&&fo.encode(e.executionConfig,t.uint32(74).fork()).ldelim();for(let n of e.contractConfigs)po.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.templateInstances)gr.encode(n,t.uint32(26).fork()).ldelim();for(let n of e.accountConfigs)vo.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.metricConfigs)Hr.encode(n,t.uint32(42).fork()).ldelim();for(let n of e.eventTrackingConfigs)_o.encode(n,t.uint32(50).fork()).ldelim();for(let n of e.exportConfigs)Ao.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.eventLogConfigs)bi.encode(n,t.uint32(66).fork()).ldelim();return e.dbSchema!==void 0&&ho.encode(e.dbSchema,t.uint32(82).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=$S();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.config=lo.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.executionConfig=fo.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.contractConfigs.push(po.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.templateInstances.push(gr.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.accountConfigs.push(vo.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.metricConfigs.push(Hr.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.eventTrackingConfigs.push(_o.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.exportConfigs.push(Ao.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.eventLogConfigs.push(bi.decode(n,n.uint32()));continue;case 10:if(a!==82)break;i.dbSchema=ho.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{config:E(e.config)?lo.fromJSON(e.config):void 0,executionConfig:E(e.executionConfig)?fo.fromJSON(e.executionConfig):void 0,contractConfigs:globalThis.Array.isArray(e?.contractConfigs)?e.contractConfigs.map(t=>po.fromJSON(t)):[],templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(t=>gr.fromJSON(t)):[],accountConfigs:globalThis.Array.isArray(e?.accountConfigs)?e.accountConfigs.map(t=>vo.fromJSON(t)):[],metricConfigs:globalThis.Array.isArray(e?.metricConfigs)?e.metricConfigs.map(t=>Hr.fromJSON(t)):[],eventTrackingConfigs:globalThis.Array.isArray(e?.eventTrackingConfigs)?e.eventTrackingConfigs.map(t=>_o.fromJSON(t)):[],exportConfigs:globalThis.Array.isArray(e?.exportConfigs)?e.exportConfigs.map(t=>Ao.fromJSON(t)):[],eventLogConfigs:globalThis.Array.isArray(e?.eventLogConfigs)?e.eventLogConfigs.map(t=>bi.fromJSON(t)):[],dbSchema:E(e.dbSchema)?ho.fromJSON(e.dbSchema):void 0}},toJSON(e){let t={};return e.config!==void 0&&(t.config=lo.toJSON(e.config)),e.executionConfig!==void 0&&(t.executionConfig=fo.toJSON(e.executionConfig)),e.contractConfigs?.length&&(t.contractConfigs=e.contractConfigs.map(n=>po.toJSON(n))),e.templateInstances?.length&&(t.templateInstances=e.templateInstances.map(n=>gr.toJSON(n))),e.accountConfigs?.length&&(t.accountConfigs=e.accountConfigs.map(n=>vo.toJSON(n))),e.metricConfigs?.length&&(t.metricConfigs=e.metricConfigs.map(n=>Hr.toJSON(n))),e.eventTrackingConfigs?.length&&(t.eventTrackingConfigs=e.eventTrackingConfigs.map(n=>_o.toJSON(n))),e.exportConfigs?.length&&(t.exportConfigs=e.exportConfigs.map(n=>Ao.toJSON(n))),e.eventLogConfigs?.length&&(t.eventLogConfigs=e.eventLogConfigs.map(n=>bi.toJSON(n))),e.dbSchema!==void 0&&(t.dbSchema=ho.toJSON(e.dbSchema)),t},create(e){return XT.fromPartial(e??{})},fromPartial(e){let t=$S();return t.config=e.config!==void 0&&e.config!==null?lo.fromPartial(e.config):void 0,t.executionConfig=e.executionConfig!==void 0&&e.executionConfig!==null?fo.fromPartial(e.executionConfig):void 0,t.contractConfigs=e.contractConfigs?.map(n=>po.fromPartial(n))||[],t.templateInstances=e.templateInstances?.map(n=>gr.fromPartial(n))||[],t.accountConfigs=e.accountConfigs?.map(n=>vo.fromPartial(n))||[],t.metricConfigs=e.metricConfigs?.map(n=>Hr.fromPartial(n))||[],t.eventTrackingConfigs=e.eventTrackingConfigs?.map(n=>_o.fromPartial(n))||[],t.exportConfigs=e.exportConfigs?.map(n=>Ao.fromPartial(n))||[],t.eventLogConfigs=e.eventLogConfigs?.map(n=>bi.fromPartial(n))||[],t.dbSchema=e.dbSchema!==void 0&&e.dbSchema!==null?ho.fromPartial(e.dbSchema):void 0,t}};function KS(){return{contract:void 0,intervalConfigs:[],logConfigs:[],traceConfigs:[],transactionConfig:[],moveEventConfigs:[],moveCallConfigs:[],moveResourceChangeConfigs:[],fuelCallConfigs:[],assetConfigs:[],fuelLogConfigs:[],cosmosLogConfigs:[],starknetEventConfigs:[],btcTransactionConfigs:[],instructionConfig:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),processorType:""}}var po={encode(e,t=g.default.Writer.create()){e.contract!==void 0&&mr.encode(e.contract,t.uint32(10).fork()).ldelim();for(let n of e.intervalConfigs)dt.encode(n,t.uint32(90).fork()).ldelim();for(let n of e.logConfigs)_r.encode(n,t.uint32(26).fork()).ldelim();for(let n of e.traceConfigs)bo.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.transactionConfig)Eo.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.moveEventConfigs)Bo.encode(n,t.uint32(74).fork()).ldelim();for(let n of e.moveCallConfigs)yr.encode(n,t.uint32(82).fork()).ldelim();for(let n of e.moveResourceChangeConfigs)Po.encode(n,t.uint32(98).fork()).ldelim();for(let n of e.fuelCallConfigs)Vo.encode(n,t.uint32(106).fork()).ldelim();for(let n of e.assetConfigs)Co.encode(n,t.uint32(114).fork()).ldelim();for(let n of e.fuelLogConfigs)So.encode(n,t.uint32(122).fork()).ldelim();for(let n of e.cosmosLogConfigs)xo.encode(n,t.uint32(130).fork()).ldelim();for(let n of e.starknetEventConfigs)Fo.encode(n,t.uint32(138).fork()).ldelim();for(let n of e.btcTransactionConfigs)Lo.encode(n,t.uint32(146).fork()).ldelim();if(e.instructionConfig!==void 0&&No.encode(e.instructionConfig,t.uint32(50).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(32).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");t.uint32(40).uint64(e.endBlock.toString())}return e.processorType!==""&&t.uint32(66).string(e.processorType),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=KS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.contract=mr.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.intervalConfigs.push(dt.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.logConfigs.push(_r.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.traceConfigs.push(bo.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.transactionConfig.push(Eo.decode(n,n.uint32()));continue;case 9:if(a!==74)break;i.moveEventConfigs.push(Bo.decode(n,n.uint32()));continue;case 10:if(a!==82)break;i.moveCallConfigs.push(yr.decode(n,n.uint32()));continue;case 12:if(a!==98)break;i.moveResourceChangeConfigs.push(Po.decode(n,n.uint32()));continue;case 13:if(a!==106)break;i.fuelCallConfigs.push(Vo.decode(n,n.uint32()));continue;case 14:if(a!==114)break;i.assetConfigs.push(Co.decode(n,n.uint32()));continue;case 15:if(a!==122)break;i.fuelLogConfigs.push(So.decode(n,n.uint32()));continue;case 16:if(a!==130)break;i.cosmosLogConfigs.push(xo.decode(n,n.uint32()));continue;case 17:if(a!==138)break;i.starknetEventConfigs.push(Fo.decode(n,n.uint32()));continue;case 18:if(a!==146)break;i.btcTransactionConfigs.push(Lo.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.instructionConfig=No.decode(n,n.uint32());continue;case 4:if(a!==32)break;i.startBlock=Zt(n.uint64());continue;case 5:if(a!==40)break;i.endBlock=Zt(n.uint64());continue;case 8:if(a!==66)break;i.processorType=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{contract:E(e.contract)?mr.fromJSON(e.contract):void 0,intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(t=>dt.fromJSON(t)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(t=>_r.fromJSON(t)):[],traceConfigs:globalThis.Array.isArray(e?.traceConfigs)?e.traceConfigs.map(t=>bo.fromJSON(t)):[],transactionConfig:globalThis.Array.isArray(e?.transactionConfig)?e.transactionConfig.map(t=>Eo.fromJSON(t)):[],moveEventConfigs:globalThis.Array.isArray(e?.moveEventConfigs)?e.moveEventConfigs.map(t=>Bo.fromJSON(t)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(t=>yr.fromJSON(t)):[],moveResourceChangeConfigs:globalThis.Array.isArray(e?.moveResourceChangeConfigs)?e.moveResourceChangeConfigs.map(t=>Po.fromJSON(t)):[],fuelCallConfigs:globalThis.Array.isArray(e?.fuelCallConfigs)?e.fuelCallConfigs.map(t=>Vo.fromJSON(t)):[],assetConfigs:globalThis.Array.isArray(e?.assetConfigs)?e.assetConfigs.map(t=>Co.fromJSON(t)):[],fuelLogConfigs:globalThis.Array.isArray(e?.fuelLogConfigs)?e.fuelLogConfigs.map(t=>So.fromJSON(t)):[],cosmosLogConfigs:globalThis.Array.isArray(e?.cosmosLogConfigs)?e.cosmosLogConfigs.map(t=>xo.fromJSON(t)):[],starknetEventConfigs:globalThis.Array.isArray(e?.starknetEventConfigs)?e.starknetEventConfigs.map(t=>Fo.fromJSON(t)):[],btcTransactionConfigs:globalThis.Array.isArray(e?.btcTransactionConfigs)?e.btcTransactionConfigs.map(t=>Lo.fromJSON(t)):[],instructionConfig:E(e.instructionConfig)?No.fromJSON(e.instructionConfig):void 0,startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:E(e.endBlock)?BigInt(e.endBlock):BigInt("0"),processorType:E(e.processorType)?globalThis.String(e.processorType):""}},toJSON(e){let t={};return e.contract!==void 0&&(t.contract=mr.toJSON(e.contract)),e.intervalConfigs?.length&&(t.intervalConfigs=e.intervalConfigs.map(n=>dt.toJSON(n))),e.logConfigs?.length&&(t.logConfigs=e.logConfigs.map(n=>_r.toJSON(n))),e.traceConfigs?.length&&(t.traceConfigs=e.traceConfigs.map(n=>bo.toJSON(n))),e.transactionConfig?.length&&(t.transactionConfig=e.transactionConfig.map(n=>Eo.toJSON(n))),e.moveEventConfigs?.length&&(t.moveEventConfigs=e.moveEventConfigs.map(n=>Bo.toJSON(n))),e.moveCallConfigs?.length&&(t.moveCallConfigs=e.moveCallConfigs.map(n=>yr.toJSON(n))),e.moveResourceChangeConfigs?.length&&(t.moveResourceChangeConfigs=e.moveResourceChangeConfigs.map(n=>Po.toJSON(n))),e.fuelCallConfigs?.length&&(t.fuelCallConfigs=e.fuelCallConfigs.map(n=>Vo.toJSON(n))),e.assetConfigs?.length&&(t.assetConfigs=e.assetConfigs.map(n=>Co.toJSON(n))),e.fuelLogConfigs?.length&&(t.fuelLogConfigs=e.fuelLogConfigs.map(n=>So.toJSON(n))),e.cosmosLogConfigs?.length&&(t.cosmosLogConfigs=e.cosmosLogConfigs.map(n=>xo.toJSON(n))),e.starknetEventConfigs?.length&&(t.starknetEventConfigs=e.starknetEventConfigs.map(n=>Fo.toJSON(n))),e.btcTransactionConfigs?.length&&(t.btcTransactionConfigs=e.btcTransactionConfigs.map(n=>Lo.toJSON(n))),e.instructionConfig!==void 0&&(t.instructionConfig=No.toJSON(e.instructionConfig)),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(t.endBlock=e.endBlock.toString()),e.processorType!==""&&(t.processorType=e.processorType),t},create(e){return po.fromPartial(e??{})},fromPartial(e){let t=KS();return t.contract=e.contract!==void 0&&e.contract!==null?mr.fromPartial(e.contract):void 0,t.intervalConfigs=e.intervalConfigs?.map(n=>dt.fromPartial(n))||[],t.logConfigs=e.logConfigs?.map(n=>_r.fromPartial(n))||[],t.traceConfigs=e.traceConfigs?.map(n=>bo.fromPartial(n))||[],t.transactionConfig=e.transactionConfig?.map(n=>Eo.fromPartial(n))||[],t.moveEventConfigs=e.moveEventConfigs?.map(n=>Bo.fromPartial(n))||[],t.moveCallConfigs=e.moveCallConfigs?.map(n=>yr.fromPartial(n))||[],t.moveResourceChangeConfigs=e.moveResourceChangeConfigs?.map(n=>Po.fromPartial(n))||[],t.fuelCallConfigs=e.fuelCallConfigs?.map(n=>Vo.fromPartial(n))||[],t.assetConfigs=e.assetConfigs?.map(n=>Co.fromPartial(n))||[],t.fuelLogConfigs=e.fuelLogConfigs?.map(n=>So.fromPartial(n))||[],t.cosmosLogConfigs=e.cosmosLogConfigs?.map(n=>xo.fromPartial(n))||[],t.starknetEventConfigs=e.starknetEventConfigs?.map(n=>Fo.fromPartial(n))||[],t.btcTransactionConfigs=e.btcTransactionConfigs?.map(n=>Lo.fromPartial(n))||[],t.instructionConfig=e.instructionConfig!==void 0&&e.instructionConfig!==null?No.fromPartial(e.instructionConfig):void 0,t.startBlock=e.startBlock??BigInt("0"),t.endBlock=e.endBlock??BigInt("0"),t.processorType=e.processorType??"",t}};function jS(){return{gqlSchema:""}}var ho={encode(e,t=g.default.Writer.create()){return e.gqlSchema!==""&&t.uint32(10).string(e.gqlSchema),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=jS();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.gqlSchema=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{gqlSchema:E(e.gqlSchema)?globalThis.String(e.gqlSchema):""}},toJSON(e){let t={};return e.gqlSchema!==""&&(t.gqlSchema=e.gqlSchema),t},create(e){return ho.fromPartial(e??{})},fromPartial(e){let t=jS();return t.gqlSchema=e.gqlSchema??"",t}};function ex(){return{}}var mo={encode(e,t=g.default.Writer.create()){return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ex();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{}},toJSON(e){return{}},create(e){return mo.fromPartial(e??{})},fromPartial(e){return ex()}};function tx(){return{retentionEventName:"",days:0}}var go={encode(e,t=g.default.Writer.create()){return e.retentionEventName!==""&&t.uint32(18).string(e.retentionEventName),e.days!==0&&t.uint32(24).int32(e.days),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=tx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.retentionEventName=n.string();continue;case 3:if(a!==24)break;i.days=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{retentionEventName:E(e.retentionEventName)?globalThis.String(e.retentionEventName):"",days:E(e.days)?globalThis.Number(e.days):0}},toJSON(e){let t={};return e.retentionEventName!==""&&(t.retentionEventName=e.retentionEventName),e.days!==0&&(t.days=Math.round(e.days)),t},create(e){return go.fromPartial(e??{})},fromPartial(e){let t=tx();return t.retentionEventName=e.retentionEventName??"",t.days=e.days??0,t}};function nx(){return{eventName:"",totalByDay:!1,unique:!1,totalPerEntity:void 0,distinctAggregationByDays:[],retentionConfig:void 0}}var _o={encode(e,t=g.default.Writer.create()){e.eventName!==""&&t.uint32(10).string(e.eventName),e.totalByDay!==!1&&t.uint32(16).bool(e.totalByDay),e.unique!==!1&&t.uint32(24).bool(e.unique),e.totalPerEntity!==void 0&&mo.encode(e.totalPerEntity,t.uint32(34).fork()).ldelim(),t.uint32(42).fork();for(let n of e.distinctAggregationByDays)t.int32(n);return t.ldelim(),e.retentionConfig!==void 0&&go.encode(e.retentionConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=nx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.eventName=n.string();continue;case 2:if(a!==16)break;i.totalByDay=n.bool();continue;case 3:if(a!==24)break;i.unique=n.bool();continue;case 4:if(a!==34)break;i.totalPerEntity=mo.decode(n,n.uint32());continue;case 5:if(a===40){i.distinctAggregationByDays.push(n.int32());continue}if(a===42){let s=n.uint32()+n.pos;for(;n.pos<s;)i.distinctAggregationByDays.push(n.int32());continue}break;case 6:if(a!==50)break;i.retentionConfig=go.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{eventName:E(e.eventName)?globalThis.String(e.eventName):"",totalByDay:E(e.totalByDay)?globalThis.Boolean(e.totalByDay):!1,unique:E(e.unique)?globalThis.Boolean(e.unique):!1,totalPerEntity:E(e.totalPerEntity)?mo.fromJSON(e.totalPerEntity):void 0,distinctAggregationByDays:globalThis.Array.isArray(e?.distinctAggregationByDays)?e.distinctAggregationByDays.map(t=>globalThis.Number(t)):[],retentionConfig:E(e.retentionConfig)?go.fromJSON(e.retentionConfig):void 0}},toJSON(e){let t={};return e.eventName!==""&&(t.eventName=e.eventName),e.totalByDay!==!1&&(t.totalByDay=e.totalByDay),e.unique!==!1&&(t.unique=e.unique),e.totalPerEntity!==void 0&&(t.totalPerEntity=mo.toJSON(e.totalPerEntity)),e.distinctAggregationByDays?.length&&(t.distinctAggregationByDays=e.distinctAggregationByDays.map(n=>Math.round(n))),e.retentionConfig!==void 0&&(t.retentionConfig=go.toJSON(e.retentionConfig)),t},create(e){return _o.fromPartial(e??{})},fromPartial(e){let t=nx();return t.eventName=e.eventName??"",t.totalByDay=e.totalByDay??!1,t.unique=e.unique??!1,t.totalPerEntity=e.totalPerEntity!==void 0&&e.totalPerEntity!==null?mo.fromPartial(e.totalPerEntity):void 0,t.distinctAggregationByDays=e.distinctAggregationByDays?.map(n=>n)||[],t.retentionConfig=e.retentionConfig!==void 0&&e.retentionConfig!==null?go.fromPartial(e.retentionConfig):void 0,t}};function rx(){return{name:"",channel:""}}var Ao={encode(e,t=g.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.channel!==""&&t.uint32(18).string(e.channel),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=rx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.channel=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",channel:E(e.channel)?globalThis.String(e.channel):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.channel!==""&&(t.channel=e.channel),t},create(e){return Ao.fromPartial(e??{})},fromPartial(e){let t=rx();return t.name=e.name??"",t.channel=e.channel??"",t}};function ix(){return{name:"",description:"",unit:"",sparse:!1,persistentBetweenVersion:!1,type:0,aggregationConfig:void 0}}var Hr={encode(e,t=g.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.description!==""&&t.uint32(26).string(e.description),e.unit!==""&&t.uint32(18).string(e.unit),e.sparse!==!1&&t.uint32(32).bool(e.sparse),e.persistentBetweenVersion!==!1&&t.uint32(40).bool(e.persistentBetweenVersion),e.type!==0&&t.uint32(56).int32(e.type),e.aggregationConfig!==void 0&&yo.encode(e.aggregationConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ix();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 3:if(a!==26)break;i.description=n.string();continue;case 2:if(a!==18)break;i.unit=n.string();continue;case 4:if(a!==32)break;i.sparse=n.bool();continue;case 5:if(a!==40)break;i.persistentBetweenVersion=n.bool();continue;case 7:if(a!==56)break;i.type=n.int32();continue;case 6:if(a!==50)break;i.aggregationConfig=yo.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",description:E(e.description)?globalThis.String(e.description):"",unit:E(e.unit)?globalThis.String(e.unit):"",sparse:E(e.sparse)?globalThis.Boolean(e.sparse):!1,persistentBetweenVersion:E(e.persistentBetweenVersion)?globalThis.Boolean(e.persistentBetweenVersion):!1,type:E(e.type)?lq(e.type):0,aggregationConfig:E(e.aggregationConfig)?yo.fromJSON(e.aggregationConfig):void 0}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.description!==""&&(t.description=e.description),e.unit!==""&&(t.unit=e.unit),e.sparse!==!1&&(t.sparse=e.sparse),e.persistentBetweenVersion!==!1&&(t.persistentBetweenVersion=e.persistentBetweenVersion),e.type!==0&&(t.type=dq(e.type)),e.aggregationConfig!==void 0&&(t.aggregationConfig=yo.toJSON(e.aggregationConfig)),t},create(e){return Hr.fromPartial(e??{})},fromPartial(e){let t=ix();return t.name=e.name??"",t.description=e.description??"",t.unit=e.unit??"",t.sparse=e.sparse??!1,t.persistentBetweenVersion=e.persistentBetweenVersion??!1,t.type=e.type??0,t.aggregationConfig=e.aggregationConfig!==void 0&&e.aggregationConfig!==null?yo.fromPartial(e.aggregationConfig):void 0,t}};function ax(){return{name:"",fields:[]}}var bi={encode(e,t=g.default.Writer.create()){e.name!==""&&t.uint32(10).string(e.name);for(let n of e.fields)hr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ax();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.fields.push(hr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",fields:globalThis.Array.isArray(e?.fields)?e.fields.map(t=>hr.fromJSON(t)):[]}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.fields?.length&&(t.fields=e.fields.map(n=>hr.toJSON(n))),t},create(e){return bi.fromPartial(e??{})},fromPartial(e){let t=ax();return t.name=e.name??"",t.fields=e.fields?.map(n=>hr.fromPartial(n))||[],t}};function sx(){return{fields:[]}}var $i={encode(e,t=g.default.Writer.create()){for(let n of e.fields)hr.encode(n,t.uint32(18).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=sx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.fields.push(hr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{fields:globalThis.Array.isArray(e?.fields)?e.fields.map(t=>hr.fromJSON(t)):[]}},toJSON(e){let t={};return e.fields?.length&&(t.fields=e.fields.map(n=>hr.toJSON(n))),t},create(e){return $i.fromPartial(e??{})},fromPartial(e){let t=sx();return t.fields=e.fields?.map(n=>hr.fromPartial(n))||[],t}};function ox(){return{name:"",basicType:void 0,coinType:void 0,structType:void 0}}var hr={encode(e,t=g.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.basicType!==void 0&&t.uint32(16).int32(e.basicType),e.coinType!==void 0&&Xi.encode(e.coinType,t.uint32(26).fork()).ldelim(),e.structType!==void 0&&$i.encode(e.structType,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ox();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==16)break;i.basicType=n.int32();continue;case 3:if(a!==26)break;i.coinType=Xi.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.structType=$i.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",basicType:E(e.basicType)?vq(e.basicType):void 0,coinType:E(e.coinType)?Xi.fromJSON(e.coinType):void 0,structType:E(e.structType)?$i.fromJSON(e.structType):void 0}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.basicType!==void 0&&(t.basicType=wq(e.basicType)),e.coinType!==void 0&&(t.coinType=Xi.toJSON(e.coinType)),e.structType!==void 0&&(t.structType=$i.toJSON(e.structType)),t},create(e){return hr.fromPartial(e??{})},fromPartial(e){let t=ox();return t.name=e.name??"",t.basicType=e.basicType??void 0,t.coinType=e.coinType!==void 0&&e.coinType!==null?Xi.fromPartial(e.coinType):void 0,t.structType=e.structType!==void 0&&e.structType!==null?$i.fromPartial(e.structType):void 0,t}};function cx(){return{intervalInMinutes:[],types:[],discardOrigin:!1}}var yo={encode(e,t=g.default.Writer.create()){t.uint32(10).fork();for(let n of e.intervalInMinutes)t.int32(n);t.ldelim(),t.uint32(18).fork();for(let n of e.types)t.int32(n);return t.ldelim(),e.discardOrigin!==!1&&t.uint32(24).bool(e.discardOrigin),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=cx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a===8){i.intervalInMinutes.push(n.int32());continue}if(a===10){let s=n.uint32()+n.pos;for(;n.pos<s;)i.intervalInMinutes.push(n.int32());continue}break;case 2:if(a===16){i.types.push(n.int32());continue}if(a===18){let s=n.uint32()+n.pos;for(;n.pos<s;)i.types.push(n.int32());continue}break;case 3:if(a!==24)break;i.discardOrigin=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalInMinutes:globalThis.Array.isArray(e?.intervalInMinutes)?e.intervalInMinutes.map(t=>globalThis.Number(t)):[],types:globalThis.Array.isArray(e?.types)?e.types.map(t=>fq(t)):[],discardOrigin:E(e.discardOrigin)?globalThis.Boolean(e.discardOrigin):!1}},toJSON(e){let t={};return e.intervalInMinutes?.length&&(t.intervalInMinutes=e.intervalInMinutes.map(n=>Math.round(n))),e.types?.length&&(t.types=e.types.map(n=>pq(n))),e.discardOrigin!==!1&&(t.discardOrigin=e.discardOrigin),t},create(e){return yo.fromPartial(e??{})},fromPartial(e){let t=cx();return t.intervalInMinutes=e.intervalInMinutes?.map(n=>n)||[],t.types=e.types?.map(n=>n)||[],t.discardOrigin=e.discardOrigin??!1,t}};function ux(){return{chainId:"",address:"",startBlock:BigInt("0"),intervalConfigs:[],moveIntervalConfigs:[],moveCallConfigs:[],logConfigs:[]}}var vo={encode(e,t=g.default.Writer.create()){if(e.chainId!==""&&t.uint32(10).string(e.chainId),e.address!==""&&t.uint32(18).string(e.address),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(24).uint64(e.startBlock.toString())}for(let n of e.intervalConfigs)dt.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.moveIntervalConfigs)wo.encode(n,t.uint32(58).fork()).ldelim();for(let n of e.moveCallConfigs)yr.encode(n,t.uint32(66).fork()).ldelim();for(let n of e.logConfigs)_r.encode(n,t.uint32(50).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ux();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.chainId=n.string();continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==24)break;i.startBlock=Zt(n.uint64());continue;case 4:if(a!==34)break;i.intervalConfigs.push(dt.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.moveIntervalConfigs.push(wo.decode(n,n.uint32()));continue;case 8:if(a!==66)break;i.moveCallConfigs.push(yr.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.logConfigs.push(_r.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),intervalConfigs:globalThis.Array.isArray(e?.intervalConfigs)?e.intervalConfigs.map(t=>dt.fromJSON(t)):[],moveIntervalConfigs:globalThis.Array.isArray(e?.moveIntervalConfigs)?e.moveIntervalConfigs.map(t=>wo.fromJSON(t)):[],moveCallConfigs:globalThis.Array.isArray(e?.moveCallConfigs)?e.moveCallConfigs.map(t=>yr.fromJSON(t)):[],logConfigs:globalThis.Array.isArray(e?.logConfigs)?e.logConfigs.map(t=>_r.fromJSON(t)):[]}},toJSON(e){let t={};return e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.intervalConfigs?.length&&(t.intervalConfigs=e.intervalConfigs.map(n=>dt.toJSON(n))),e.moveIntervalConfigs?.length&&(t.moveIntervalConfigs=e.moveIntervalConfigs.map(n=>wo.toJSON(n))),e.moveCallConfigs?.length&&(t.moveCallConfigs=e.moveCallConfigs.map(n=>yr.toJSON(n))),e.logConfigs?.length&&(t.logConfigs=e.logConfigs.map(n=>_r.toJSON(n))),t},create(e){return vo.fromPartial(e??{})},fromPartial(e){let t=ux();return t.chainId=e.chainId??"",t.address=e.address??"",t.startBlock=e.startBlock??BigInt("0"),t.intervalConfigs=e.intervalConfigs?.map(n=>dt.fromPartial(n))||[],t.moveIntervalConfigs=e.moveIntervalConfigs?.map(n=>wo.fromPartial(n))||[],t.moveCallConfigs=e.moveCallConfigs?.map(n=>yr.fromPartial(n))||[],t.logConfigs=e.logConfigs?.map(n=>_r.fromPartial(n))||[],t}};function lx(){return{recentInterval:0,backfillInterval:0}}var pr={encode(e,t=g.default.Writer.create()){return e.recentInterval!==0&&t.uint32(8).int32(e.recentInterval),e.backfillInterval!==0&&t.uint32(16).int32(e.backfillInterval),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=lx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.recentInterval=n.int32();continue;case 2:if(a!==16)break;i.backfillInterval=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{recentInterval:E(e.recentInterval)?globalThis.Number(e.recentInterval):0,backfillInterval:E(e.backfillInterval)?globalThis.Number(e.backfillInterval):0}},toJSON(e){let t={};return e.recentInterval!==0&&(t.recentInterval=Math.round(e.recentInterval)),e.backfillInterval!==0&&(t.backfillInterval=Math.round(e.backfillInterval)),t},create(e){return pr.fromPartial(e??{})},fromPartial(e){let t=lx();return t.recentInterval=e.recentInterval??0,t.backfillInterval=e.backfillInterval??0,t}};function dx(){return{handlerId:0,minutes:0,minutesInterval:void 0,slot:0,slotInterval:void 0,fetchConfig:void 0}}var dt={encode(e,t=g.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),e.minutes!==0&&t.uint32(16).int32(e.minutes),e.minutesInterval!==void 0&&pr.encode(e.minutesInterval,t.uint32(34).fork()).ldelim(),e.slot!==0&&t.uint32(24).int32(e.slot),e.slotInterval!==void 0&&pr.encode(e.slotInterval,t.uint32(42).fork()).ldelim(),e.fetchConfig!==void 0&&ft.encode(e.fetchConfig,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=dx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue;case 2:if(a!==16)break;i.minutes=n.int32();continue;case 4:if(a!==34)break;i.minutesInterval=pr.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.slot=n.int32();continue;case 5:if(a!==42)break;i.slotInterval=pr.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.fetchConfig=ft.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,minutes:E(e.minutes)?globalThis.Number(e.minutes):0,minutesInterval:E(e.minutesInterval)?pr.fromJSON(e.minutesInterval):void 0,slot:E(e.slot)?globalThis.Number(e.slot):0,slotInterval:E(e.slotInterval)?pr.fromJSON(e.slotInterval):void 0,fetchConfig:E(e.fetchConfig)?ft.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.minutes!==0&&(t.minutes=Math.round(e.minutes)),e.minutesInterval!==void 0&&(t.minutesInterval=pr.toJSON(e.minutesInterval)),e.slot!==0&&(t.slot=Math.round(e.slot)),e.slotInterval!==void 0&&(t.slotInterval=pr.toJSON(e.slotInterval)),e.fetchConfig!==void 0&&(t.fetchConfig=ft.toJSON(e.fetchConfig)),t},create(e){return dt.fromPartial(e??{})},fromPartial(e){let t=dx();return t.handlerId=e.handlerId??0,t.minutes=e.minutes??0,t.minutesInterval=e.minutesInterval!==void 0&&e.minutesInterval!==null?pr.fromPartial(e.minutesInterval):void 0,t.slot=e.slot??0,t.slotInterval=e.slotInterval!==void 0&&e.slotInterval!==null?pr.fromPartial(e.slotInterval):void 0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ft.fromPartial(e.fetchConfig):void 0,t}};function fx(){return{intervalConfig:void 0,type:""}}var Cq={encode(e,t=g.default.Writer.create()){return e.intervalConfig!==void 0&&dt.encode(e.intervalConfig,t.uint32(10).fork()).ldelim(),e.type!==""&&t.uint32(18).string(e.type),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=fx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.intervalConfig=dt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.type=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalConfig:E(e.intervalConfig)?dt.fromJSON(e.intervalConfig):void 0,type:E(e.type)?globalThis.String(e.type):""}},toJSON(e){let t={};return e.intervalConfig!==void 0&&(t.intervalConfig=dt.toJSON(e.intervalConfig)),e.type!==""&&(t.type=e.type),t},create(e){return Cq.fromPartial(e??{})},fromPartial(e){let t=fx();return t.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?dt.fromPartial(e.intervalConfig):void 0,t.type=e.type??"",t}};function px(){return{intervalConfig:void 0,type:"",ownerType:0,fetchConfig:void 0}}var wo={encode(e,t=g.default.Writer.create()){return e.intervalConfig!==void 0&&dt.encode(e.intervalConfig,t.uint32(10).fork()).ldelim(),e.type!==""&&t.uint32(18).string(e.type),e.ownerType!==0&&t.uint32(24).int32(e.ownerType),e.fetchConfig!==void 0&&ko.encode(e.fetchConfig,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=px();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.intervalConfig=dt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.type=n.string();continue;case 3:if(a!==24)break;i.ownerType=n.int32();continue;case 4:if(a!==34)break;i.fetchConfig=ko.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{intervalConfig:E(e.intervalConfig)?dt.fromJSON(e.intervalConfig):void 0,type:E(e.type)?globalThis.String(e.type):"",ownerType:E(e.ownerType)?hq(e.ownerType):0,fetchConfig:E(e.fetchConfig)?ko.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.intervalConfig!==void 0&&(t.intervalConfig=dt.toJSON(e.intervalConfig)),e.type!==""&&(t.type=e.type),e.ownerType!==0&&(t.ownerType=mq(e.ownerType)),e.fetchConfig!==void 0&&(t.fetchConfig=ko.toJSON(e.fetchConfig)),t},create(e){return wo.fromPartial(e??{})},fromPartial(e){let t=px();return t.intervalConfig=e.intervalConfig!==void 0&&e.intervalConfig!==null?dt.fromPartial(e.intervalConfig):void 0,t.type=e.type??"",t.ownerType=e.ownerType??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ko.fromPartial(e.fetchConfig):void 0,t}};function hx(){return{name:"",chainId:"",address:"",abi:""}}var mr={encode(e,t=g.default.Writer.create()){return e.name!==""&&t.uint32(10).string(e.name),e.chainId!==""&&t.uint32(18).string(e.chainId),e.address!==""&&t.uint32(26).string(e.address),e.abi!==""&&t.uint32(34).string(e.abi),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=hx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.name=n.string();continue;case 2:if(a!==18)break;i.chainId=n.string();continue;case 3:if(a!==26)break;i.address=n.string();continue;case 4:if(a!==34)break;i.abi=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{name:E(e.name)?globalThis.String(e.name):"",chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",abi:E(e.abi)?globalThis.String(e.abi):""}},toJSON(e){let t={};return e.name!==""&&(t.name=e.name),e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.abi!==""&&(t.abi=e.abi),t},create(e){return mr.fromPartial(e??{})},fromPartial(e){let t=hx();return t.name=e.name??"",t.chainId=e.chainId??"",t.address=e.address??"",t.abi=e.abi??"",t}};function mx(){return{contract:void 0,startBlock:BigInt("0"),endBlock:BigInt("0"),templateId:0,baseLabels:void 0}}var gr={encode(e,t=g.default.Writer.create()){if(e.contract!==void 0&&mr.encode(e.contract,t.uint32(10).fork()).ldelim(),e.startBlock!==BigInt("0")){if(BigInt.asUintN(64,e.startBlock)!==e.startBlock)throw new globalThis.Error("value provided for field message.startBlock of type uint64 too large");t.uint32(16).uint64(e.startBlock.toString())}if(e.endBlock!==BigInt("0")){if(BigInt.asUintN(64,e.endBlock)!==e.endBlock)throw new globalThis.Error("value provided for field message.endBlock of type uint64 too large");t.uint32(24).uint64(e.endBlock.toString())}return e.templateId!==0&&t.uint32(32).int32(e.templateId),e.baseLabels!==void 0&&P.encode(P.wrap(e.baseLabels),t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=mx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.contract=mr.decode(n,n.uint32());continue;case 2:if(a!==16)break;i.startBlock=Zt(n.uint64());continue;case 3:if(a!==24)break;i.endBlock=Zt(n.uint64());continue;case 4:if(a!==32)break;i.templateId=n.int32();continue;case 5:if(a!==42)break;i.baseLabels=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{contract:E(e.contract)?mr.fromJSON(e.contract):void 0,startBlock:E(e.startBlock)?BigInt(e.startBlock):BigInt("0"),endBlock:E(e.endBlock)?BigInt(e.endBlock):BigInt("0"),templateId:E(e.templateId)?globalThis.Number(e.templateId):0,baseLabels:Qe(e.baseLabels)?e.baseLabels:void 0}},toJSON(e){let t={};return e.contract!==void 0&&(t.contract=mr.toJSON(e.contract)),e.startBlock!==BigInt("0")&&(t.startBlock=e.startBlock.toString()),e.endBlock!==BigInt("0")&&(t.endBlock=e.endBlock.toString()),e.templateId!==0&&(t.templateId=Math.round(e.templateId)),e.baseLabels!==void 0&&(t.baseLabels=e.baseLabels),t},create(e){return gr.fromPartial(e??{})},fromPartial(e){let t=mx();return t.contract=e.contract!==void 0&&e.contract!==null?mr.fromPartial(e.contract):void 0,t.startBlock=e.startBlock??BigInt("0"),t.endBlock=e.endBlock??BigInt("0"),t.templateId=e.templateId??0,t.baseLabels=e.baseLabels??void 0,t}};function gx(){return{templateInstances:[]}}var YT={encode(e,t=g.default.Writer.create()){for(let n of e.templateInstances)gr.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=gx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.templateInstances.push(gr.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{templateInstances:globalThis.Array.isArray(e?.templateInstances)?e.templateInstances.map(t=>gr.fromJSON(t)):[]}},toJSON(e){let t={};return e.templateInstances?.length&&(t.templateInstances=e.templateInstances.map(n=>gr.toJSON(n))),t},create(e){return YT.fromPartial(e??{})},fromPartial(e){let t=gx();return t.templateInstances=e.templateInstances?.map(n=>gr.fromPartial(n))||[],t}};function _x(){return{handlerId:0}}var Iq={encode(e,t=g.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=_x();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Iq.fromPartial(e??{})},fromPartial(e){let t=_x();return t.handlerId=e.handlerId??0,t}};function Ax(){return{transaction:!1,transactionReceipt:!1,transactionReceiptLogs:!1,block:!1,trace:!1}}var ft={encode(e,t=g.default.Writer.create()){return e.transaction!==!1&&t.uint32(8).bool(e.transaction),e.transactionReceipt!==!1&&t.uint32(16).bool(e.transactionReceipt),e.transactionReceiptLogs!==!1&&t.uint32(40).bool(e.transactionReceiptLogs),e.block!==!1&&t.uint32(24).bool(e.block),e.trace!==!1&&t.uint32(32).bool(e.trace),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Ax();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.transaction=n.bool();continue;case 2:if(a!==16)break;i.transactionReceipt=n.bool();continue;case 5:if(a!==40)break;i.transactionReceiptLogs=n.bool();continue;case 3:if(a!==24)break;i.block=n.bool();continue;case 4:if(a!==32)break;i.trace=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:E(e.transaction)?globalThis.Boolean(e.transaction):!1,transactionReceipt:E(e.transactionReceipt)?globalThis.Boolean(e.transactionReceipt):!1,transactionReceiptLogs:E(e.transactionReceiptLogs)?globalThis.Boolean(e.transactionReceiptLogs):!1,block:E(e.block)?globalThis.Boolean(e.block):!1,trace:E(e.trace)?globalThis.Boolean(e.trace):!1}},toJSON(e){let t={};return e.transaction!==!1&&(t.transaction=e.transaction),e.transactionReceipt!==!1&&(t.transactionReceipt=e.transactionReceipt),e.transactionReceiptLogs!==!1&&(t.transactionReceiptLogs=e.transactionReceiptLogs),e.block!==!1&&(t.block=e.block),e.trace!==!1&&(t.trace=e.trace),t},create(e){return ft.fromPartial(e??{})},fromPartial(e){let t=Ax();return t.transaction=e.transaction??!1,t.transactionReceipt=e.transactionReceipt??!1,t.transactionReceiptLogs=e.transactionReceiptLogs??!1,t.block=e.block??!1,t.trace=e.trace??!1,t}};function yx(){return{signature:"",handlerId:0,fetchConfig:void 0}}var bo={encode(e,t=g.default.Writer.create()){return e.signature!==""&&t.uint32(10).string(e.signature),e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&ft.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=yx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.signature=n.string();continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=ft.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{signature:E(e.signature)?globalThis.String(e.signature):"",handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?ft.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.signature!==""&&(t.signature=e.signature),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=ft.toJSON(e.fetchConfig)),t},create(e){return bo.fromPartial(e??{})},fromPartial(e){let t=yx();return t.signature=e.signature??"",t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ft.fromPartial(e.fetchConfig):void 0,t}};function vx(){return{handlerId:0,fetchConfig:void 0}}var Eo={encode(e,t=g.default.Writer.create()){return e.handlerId!==0&&t.uint32(8).int32(e.handlerId),e.fetchConfig!==void 0&&ft.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=vx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=ft.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?ft.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=ft.toJSON(e.fetchConfig)),t},create(e){return Eo.fromPartial(e??{})},fromPartial(e){let t=vx();return t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ft.fromPartial(e.fetchConfig):void 0,t}};function wx(){return{filters:[],handlerId:0,fetchConfig:void 0}}var _r={encode(e,t=g.default.Writer.create()){for(let n of e.filters)To.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&ft.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=wx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(To.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=ft.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>To.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?ft.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>To.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=ft.toJSON(e.fetchConfig)),t},create(e){return _r.fromPartial(e??{})},fromPartial(e){let t=wx();return t.filters=e.filters?.map(n=>To.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?ft.fromPartial(e.fetchConfig):void 0,t}};function bx(){return{filters:[],handlerId:0}}var Co={encode(e,t=g.default.Writer.create()){for(let n of e.filters)Io.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=bx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Io.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Io.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Io.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Co.fromPartial(e??{})},fromPartial(e){let t=bx();return t.filters=e.filters?.map(n=>Io.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function Ex(){return{assetId:void 0,fromAddress:void 0,toAddress:void 0}}var Io={encode(e,t=g.default.Writer.create()){return e.assetId!==void 0&&t.uint32(10).string(e.assetId),e.fromAddress!==void 0&&t.uint32(18).string(e.fromAddress),e.toAddress!==void 0&&t.uint32(26).string(e.toAddress),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Ex();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.assetId=n.string();continue;case 2:if(a!==18)break;i.fromAddress=n.string();continue;case 3:if(a!==26)break;i.toAddress=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{assetId:E(e.assetId)?globalThis.String(e.assetId):void 0,fromAddress:E(e.fromAddress)?globalThis.String(e.fromAddress):void 0,toAddress:E(e.toAddress)?globalThis.String(e.toAddress):void 0}},toJSON(e){let t={};return e.assetId!==void 0&&(t.assetId=e.assetId),e.fromAddress!==void 0&&(t.fromAddress=e.fromAddress),e.toAddress!==void 0&&(t.toAddress=e.toAddress),t},create(e){return Io.fromPartial(e??{})},fromPartial(e){let t=Ex();return t.assetId=e.assetId??void 0,t.fromAddress=e.fromAddress??void 0,t.toAddress=e.toAddress??void 0,t}};function Cx(){return{logIds:[],handlerId:0}}var So={encode(e,t=g.default.Writer.create()){for(let n of e.logIds)t.uint32(10).string(n);return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Cx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.logIds.push(n.string());continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{logIds:globalThis.Array.isArray(e?.logIds)?e.logIds.map(t=>globalThis.String(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.logIds?.length&&(t.logIds=e.logIds),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return So.fromPartial(e??{})},fromPartial(e){let t=Cx();return t.logIds=e.logIds?.map(n=>n)||[],t.handlerId=e.handlerId??0,t}};function Ix(){return{logFilters:[],handlerId:0}}var xo={encode(e,t=g.default.Writer.create()){for(let n of e.logFilters)t.uint32(10).string(n);return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Ix();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.logFilters.push(n.string());continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{logFilters:globalThis.Array.isArray(e?.logFilters)?e.logFilters.map(t=>globalThis.String(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.logFilters?.length&&(t.logFilters=e.logFilters),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return xo.fromPartial(e??{})},fromPartial(e){let t=Ix();return t.logFilters=e.logFilters?.map(n=>n)||[],t.handlerId=e.handlerId??0,t}};function Sx(){return{topics:[],address:void 0,addressType:void 0}}var To={encode(e,t=g.default.Writer.create()){for(let n of e.topics)zo.encode(n,t.uint32(10).fork()).ldelim();return e.address!==void 0&&t.uint32(18).string(e.address),e.addressType!==void 0&&t.uint32(24).int32(e.addressType),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Sx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.topics.push(zo.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==24)break;i.addressType=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{topics:globalThis.Array.isArray(e?.topics)?e.topics.map(t=>zo.fromJSON(t)):[],address:E(e.address)?globalThis.String(e.address):void 0,addressType:E(e.addressType)?gq(e.addressType):void 0}},toJSON(e){let t={};return e.topics?.length&&(t.topics=e.topics.map(n=>zo.toJSON(n))),e.address!==void 0&&(t.address=e.address),e.addressType!==void 0&&(t.addressType=_q(e.addressType)),t},create(e){return To.fromPartial(e??{})},fromPartial(e){let t=Sx();return t.topics=e.topics?.map(n=>zo.fromPartial(n))||[],t.address=e.address??void 0,t.addressType=e.addressType??void 0,t}};function xx(){return{innerInstruction:!1,parsedInstruction:!1,rawDataInstruction:!1}}var No={encode(e,t=g.default.Writer.create()){return e.innerInstruction!==!1&&t.uint32(8).bool(e.innerInstruction),e.parsedInstruction!==!1&&t.uint32(16).bool(e.parsedInstruction),e.rawDataInstruction!==!1&&t.uint32(24).bool(e.rawDataInstruction),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=xx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.innerInstruction=n.bool();continue;case 2:if(a!==16)break;i.parsedInstruction=n.bool();continue;case 3:if(a!==24)break;i.rawDataInstruction=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{innerInstruction:E(e.innerInstruction)?globalThis.Boolean(e.innerInstruction):!1,parsedInstruction:E(e.parsedInstruction)?globalThis.Boolean(e.parsedInstruction):!1,rawDataInstruction:E(e.rawDataInstruction)?globalThis.Boolean(e.rawDataInstruction):!1}},toJSON(e){let t={};return e.innerInstruction!==!1&&(t.innerInstruction=e.innerInstruction),e.parsedInstruction!==!1&&(t.parsedInstruction=e.parsedInstruction),e.rawDataInstruction!==!1&&(t.rawDataInstruction=e.rawDataInstruction),t},create(e){return No.fromPartial(e??{})},fromPartial(e){let t=xx();return t.innerInstruction=e.innerInstruction??!1,t.parsedInstruction=e.parsedInstruction??!1,t.rawDataInstruction=e.rawDataInstruction??!1,t}};function Tx(){return{moveTypePrefix:""}}var Ro={encode(e,t=g.default.Writer.create()){return e.moveTypePrefix!==""&&t.uint32(10).string(e.moveTypePrefix),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Tx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.moveTypePrefix=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{moveTypePrefix:E(e.moveTypePrefix)?globalThis.String(e.moveTypePrefix):""}},toJSON(e){let t={};return e.moveTypePrefix!==""&&(t.moveTypePrefix=e.moveTypePrefix),t},create(e){return Ro.fromPartial(e??{})},fromPartial(e){let t=Tx();return t.moveTypePrefix=e.moveTypePrefix??"",t}};function Nx(){return{resourceChanges:!1,allEvents:!1,inputs:!1,resourceConfig:void 0}}var Ar={encode(e,t=g.default.Writer.create()){return e.resourceChanges!==!1&&t.uint32(8).bool(e.resourceChanges),e.allEvents!==!1&&t.uint32(16).bool(e.allEvents),e.inputs!==!1&&t.uint32(32).bool(e.inputs),e.resourceConfig!==void 0&&Ro.encode(e.resourceConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Nx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.resourceChanges=n.bool();continue;case 2:if(a!==16)break;i.allEvents=n.bool();continue;case 4:if(a!==32)break;i.inputs=n.bool();continue;case 3:if(a!==26)break;i.resourceConfig=Ro.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{resourceChanges:E(e.resourceChanges)?globalThis.Boolean(e.resourceChanges):!1,allEvents:E(e.allEvents)?globalThis.Boolean(e.allEvents):!1,inputs:E(e.inputs)?globalThis.Boolean(e.inputs):!1,resourceConfig:E(e.resourceConfig)?Ro.fromJSON(e.resourceConfig):void 0}},toJSON(e){let t={};return e.resourceChanges!==!1&&(t.resourceChanges=e.resourceChanges),e.allEvents!==!1&&(t.allEvents=e.allEvents),e.inputs!==!1&&(t.inputs=e.inputs),e.resourceConfig!==void 0&&(t.resourceConfig=Ro.toJSON(e.resourceConfig)),t},create(e){return Ar.fromPartial(e??{})},fromPartial(e){let t=Nx();return t.resourceChanges=e.resourceChanges??!1,t.allEvents=e.allEvents??!1,t.inputs=e.inputs??!1,t.resourceConfig=e.resourceConfig!==void 0&&e.resourceConfig!==null?Ro.fromPartial(e.resourceConfig):void 0,t}};function Rx(){return{owned:!1}}var ko={encode(e,t=g.default.Writer.create()){return e.owned!==!1&&t.uint32(8).bool(e.owned),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Rx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.owned=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{owned:E(e.owned)?globalThis.Boolean(e.owned):!1}},toJSON(e){let t={};return e.owned!==!1&&(t.owned=e.owned),t},create(e){return ko.fromPartial(e??{})},fromPartial(e){let t=Rx();return t.owned=e.owned??!1,t}};function kx(){return{filters:[],handlerId:0,fetchConfig:void 0}}var Bo={encode(e,t=g.default.Writer.create()){for(let n of e.filters)Oo.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Ar.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=kx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Oo.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=Ar.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Oo.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?Ar.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Oo.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=Ar.toJSON(e.fetchConfig)),t},create(e){return Bo.fromPartial(e??{})},fromPartial(e){let t=kx();return t.filters=e.filters?.map(n=>Oo.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Ar.fromPartial(e.fetchConfig):void 0,t}};function Bx(){return{type:"",account:""}}var Oo={encode(e,t=g.default.Writer.create()){return e.type!==""&&t.uint32(10).string(e.type),e.account!==""&&t.uint32(18).string(e.account),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Bx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.type=n.string();continue;case 2:if(a!==18)break;i.account=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{type:E(e.type)?globalThis.String(e.type):"",account:E(e.account)?globalThis.String(e.account):""}},toJSON(e){let t={};return e.type!==""&&(t.type=e.type),e.account!==""&&(t.account=e.account),t},create(e){return Oo.fromPartial(e??{})},fromPartial(e){let t=Bx();return t.type=e.type??"",t.account=e.account??"",t}};function Ox(){return{filters:[],handlerId:0,fetchConfig:void 0}}var yr={encode(e,t=g.default.Writer.create()){for(let n of e.filters)Do.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),e.fetchConfig!==void 0&&Ar.encode(e.fetchConfig,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Ox();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Do.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue;case 3:if(a!==26)break;i.fetchConfig=Ar.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Do.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0,fetchConfig:E(e.fetchConfig)?Ar.fromJSON(e.fetchConfig):void 0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Do.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),e.fetchConfig!==void 0&&(t.fetchConfig=Ar.toJSON(e.fetchConfig)),t},create(e){return yr.fromPartial(e??{})},fromPartial(e){let t=Ox();return t.filters=e.filters?.map(n=>Do.fromPartial(n))||[],t.handlerId=e.handlerId??0,t.fetchConfig=e.fetchConfig!==void 0&&e.fetchConfig!==null?Ar.fromPartial(e.fetchConfig):void 0,t}};function Px(){return{type:"",handlerId:0}}var Po={encode(e,t=g.default.Writer.create()){return e.type!==""&&t.uint32(10).string(e.type),e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Px();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.type=n.string();continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{type:E(e.type)?globalThis.String(e.type):"",handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.type!==""&&(t.type=e.type),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Po.fromPartial(e??{})},fromPartial(e){let t=Px();return t.type=e.type??"",t.handlerId=e.handlerId??0,t}};function Dx(){return{function:"",typeArguments:[],withTypeArguments:!1,includeFailed:!1,publicKeyPrefix:"",fromAndToAddress:void 0}}var Do={encode(e,t=g.default.Writer.create()){e.function!==""&&t.uint32(10).string(e.function);for(let n of e.typeArguments)t.uint32(18).string(n);return e.withTypeArguments!==!1&&t.uint32(24).bool(e.withTypeArguments),e.includeFailed!==!1&&t.uint32(32).bool(e.includeFailed),e.publicKeyPrefix!==""&&t.uint32(42).string(e.publicKeyPrefix),e.fromAndToAddress!==void 0&&Mo.encode(e.fromAndToAddress,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Dx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.function=n.string();continue;case 2:if(a!==18)break;i.typeArguments.push(n.string());continue;case 3:if(a!==24)break;i.withTypeArguments=n.bool();continue;case 4:if(a!==32)break;i.includeFailed=n.bool();continue;case 5:if(a!==42)break;i.publicKeyPrefix=n.string();continue;case 6:if(a!==50)break;i.fromAndToAddress=Mo.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{function:E(e.function)?globalThis.String(e.function):"",typeArguments:globalThis.Array.isArray(e?.typeArguments)?e.typeArguments.map(t=>globalThis.String(t)):[],withTypeArguments:E(e.withTypeArguments)?globalThis.Boolean(e.withTypeArguments):!1,includeFailed:E(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1,publicKeyPrefix:E(e.publicKeyPrefix)?globalThis.String(e.publicKeyPrefix):"",fromAndToAddress:E(e.fromAndToAddress)?Mo.fromJSON(e.fromAndToAddress):void 0}},toJSON(e){let t={};return e.function!==""&&(t.function=e.function),e.typeArguments?.length&&(t.typeArguments=e.typeArguments),e.withTypeArguments!==!1&&(t.withTypeArguments=e.withTypeArguments),e.includeFailed!==!1&&(t.includeFailed=e.includeFailed),e.publicKeyPrefix!==""&&(t.publicKeyPrefix=e.publicKeyPrefix),e.fromAndToAddress!==void 0&&(t.fromAndToAddress=Mo.toJSON(e.fromAndToAddress)),t},create(e){return Do.fromPartial(e??{})},fromPartial(e){let t=Dx();return t.function=e.function??"",t.typeArguments=e.typeArguments?.map(n=>n)||[],t.withTypeArguments=e.withTypeArguments??!1,t.includeFailed=e.includeFailed??!1,t.publicKeyPrefix=e.publicKeyPrefix??"",t.fromAndToAddress=e.fromAndToAddress!==void 0&&e.fromAndToAddress!==null?Mo.fromPartial(e.fromAndToAddress):void 0,t}};function Mx(){return{from:"",to:""}}var Mo={encode(e,t=g.default.Writer.create()){return e.from!==""&&t.uint32(10).string(e.from),e.to!==""&&t.uint32(18).string(e.to),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Mx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.from=n.string();continue;case 2:if(a!==18)break;i.to=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{from:E(e.from)?globalThis.String(e.from):"",to:E(e.to)?globalThis.String(e.to):""}},toJSON(e){let t={};return e.from!==""&&(t.from=e.from),e.to!==""&&(t.to=e.to),t},create(e){return Mo.fromPartial(e??{})},fromPartial(e){let t=Mx();return t.from=e.from??"",t.to=e.to??"",t}};function Fx(){return{filters:[],handlerId:0}}var Fo={encode(e,t=g.default.Writer.create()){for(let n of e.filters)qo.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Fx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(qo.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>qo.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>qo.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Fo.fromPartial(e??{})},fromPartial(e){let t=Fx();return t.filters=e.filters?.map(n=>qo.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function Lx(){return{filters:[],handlerId:0}}var Lo={encode(e,t=g.default.Writer.create()){for(let n of e.filters)vr.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Lx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(vr.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>vr.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>vr.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Lo.fromPartial(e??{})},fromPartial(e){let t=Lx();return t.filters=e.filters?.map(n=>vr.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function Qx(){return{inputFilter:void 0,outputFilter:void 0,filter:[]}}var vr={encode(e,t=g.default.Writer.create()){e.inputFilter!==void 0&&Qo.encode(e.inputFilter,t.uint32(10).fork()).ldelim(),e.outputFilter!==void 0&&Uo.encode(e.outputFilter,t.uint32(18).fork()).ldelim();for(let n of e.filter)Wt.encode(n,t.uint32(26).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Qx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.inputFilter=Qo.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.outputFilter=Uo.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.filter.push(Wt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{inputFilter:E(e.inputFilter)?Qo.fromJSON(e.inputFilter):void 0,outputFilter:E(e.outputFilter)?Uo.fromJSON(e.outputFilter):void 0,filter:globalThis.Array.isArray(e?.filter)?e.filter.map(t=>Wt.fromJSON(t)):[]}},toJSON(e){let t={};return e.inputFilter!==void 0&&(t.inputFilter=Qo.toJSON(e.inputFilter)),e.outputFilter!==void 0&&(t.outputFilter=Uo.toJSON(e.outputFilter)),e.filter?.length&&(t.filter=e.filter.map(n=>Wt.toJSON(n))),t},create(e){return vr.fromPartial(e??{})},fromPartial(e){let t=Qx();return t.inputFilter=e.inputFilter!==void 0&&e.inputFilter!==null?Qo.fromPartial(e.inputFilter):void 0,t.outputFilter=e.outputFilter!==void 0&&e.outputFilter!==null?Uo.fromPartial(e.outputFilter):void 0,t.filter=e.filter?.map(n=>Wt.fromPartial(n))||[],t}};function Ux(){return{eq:void 0,gt:void 0,gte:void 0,lt:void 0,lte:void 0,ne:void 0,prefix:void 0,contains:void 0,notContains:void 0,lengthEq:void 0,lengthGt:void 0,lengthLt:void 0,hasAny:void 0,hasAll:void 0,in:void 0}}var Ei={encode(e,t=g.default.Writer.create()){return e.eq!==void 0&&me.encode(e.eq,t.uint32(10).fork()).ldelim(),e.gt!==void 0&&me.encode(e.gt,t.uint32(18).fork()).ldelim(),e.gte!==void 0&&me.encode(e.gte,t.uint32(26).fork()).ldelim(),e.lt!==void 0&&me.encode(e.lt,t.uint32(34).fork()).ldelim(),e.lte!==void 0&&me.encode(e.lte,t.uint32(42).fork()).ldelim(),e.ne!==void 0&&me.encode(e.ne,t.uint32(50).fork()).ldelim(),e.prefix!==void 0&&t.uint32(58).string(e.prefix),e.contains!==void 0&&t.uint32(66).string(e.contains),e.notContains!==void 0&&t.uint32(74).string(e.notContains),e.lengthEq!==void 0&&t.uint32(80).int32(e.lengthEq),e.lengthGt!==void 0&&t.uint32(88).int32(e.lengthGt),e.lengthLt!==void 0&&t.uint32(96).int32(e.lengthLt),e.hasAny!==void 0&&Ge.encode(e.hasAny,t.uint32(106).fork()).ldelim(),e.hasAll!==void 0&&Ge.encode(e.hasAll,t.uint32(114).fork()).ldelim(),e.in!==void 0&&Ge.encode(e.in,t.uint32(122).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Ux();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.eq=me.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.gt=me.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.gte=me.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.lt=me.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.lte=me.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.ne=me.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.prefix=n.string();continue;case 8:if(a!==66)break;i.contains=n.string();continue;case 9:if(a!==74)break;i.notContains=n.string();continue;case 10:if(a!==80)break;i.lengthEq=n.int32();continue;case 11:if(a!==88)break;i.lengthGt=n.int32();continue;case 12:if(a!==96)break;i.lengthLt=n.int32();continue;case 13:if(a!==106)break;i.hasAny=Ge.decode(n,n.uint32());continue;case 14:if(a!==114)break;i.hasAll=Ge.decode(n,n.uint32());continue;case 15:if(a!==122)break;i.in=Ge.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{eq:E(e.eq)?me.fromJSON(e.eq):void 0,gt:E(e.gt)?me.fromJSON(e.gt):void 0,gte:E(e.gte)?me.fromJSON(e.gte):void 0,lt:E(e.lt)?me.fromJSON(e.lt):void 0,lte:E(e.lte)?me.fromJSON(e.lte):void 0,ne:E(e.ne)?me.fromJSON(e.ne):void 0,prefix:E(e.prefix)?globalThis.String(e.prefix):void 0,contains:E(e.contains)?globalThis.String(e.contains):void 0,notContains:E(e.notContains)?globalThis.String(e.notContains):void 0,lengthEq:E(e.lengthEq)?globalThis.Number(e.lengthEq):void 0,lengthGt:E(e.lengthGt)?globalThis.Number(e.lengthGt):void 0,lengthLt:E(e.lengthLt)?globalThis.Number(e.lengthLt):void 0,hasAny:E(e.hasAny)?Ge.fromJSON(e.hasAny):void 0,hasAll:E(e.hasAll)?Ge.fromJSON(e.hasAll):void 0,in:E(e.in)?Ge.fromJSON(e.in):void 0}},toJSON(e){let t={};return e.eq!==void 0&&(t.eq=me.toJSON(e.eq)),e.gt!==void 0&&(t.gt=me.toJSON(e.gt)),e.gte!==void 0&&(t.gte=me.toJSON(e.gte)),e.lt!==void 0&&(t.lt=me.toJSON(e.lt)),e.lte!==void 0&&(t.lte=me.toJSON(e.lte)),e.ne!==void 0&&(t.ne=me.toJSON(e.ne)),e.prefix!==void 0&&(t.prefix=e.prefix),e.contains!==void 0&&(t.contains=e.contains),e.notContains!==void 0&&(t.notContains=e.notContains),e.lengthEq!==void 0&&(t.lengthEq=Math.round(e.lengthEq)),e.lengthGt!==void 0&&(t.lengthGt=Math.round(e.lengthGt)),e.lengthLt!==void 0&&(t.lengthLt=Math.round(e.lengthLt)),e.hasAny!==void 0&&(t.hasAny=Ge.toJSON(e.hasAny)),e.hasAll!==void 0&&(t.hasAll=Ge.toJSON(e.hasAll)),e.in!==void 0&&(t.in=Ge.toJSON(e.in)),t},create(e){return Ei.fromPartial(e??{})},fromPartial(e){let t=Ux();return t.eq=e.eq!==void 0&&e.eq!==null?me.fromPartial(e.eq):void 0,t.gt=e.gt!==void 0&&e.gt!==null?me.fromPartial(e.gt):void 0,t.gte=e.gte!==void 0&&e.gte!==null?me.fromPartial(e.gte):void 0,t.lt=e.lt!==void 0&&e.lt!==null?me.fromPartial(e.lt):void 0,t.lte=e.lte!==void 0&&e.lte!==null?me.fromPartial(e.lte):void 0,t.ne=e.ne!==void 0&&e.ne!==null?me.fromPartial(e.ne):void 0,t.prefix=e.prefix??void 0,t.contains=e.contains??void 0,t.notContains=e.notContains??void 0,t.lengthEq=e.lengthEq??void 0,t.lengthGt=e.lengthGt??void 0,t.lengthLt=e.lengthLt??void 0,t.hasAny=e.hasAny!==void 0&&e.hasAny!==null?Ge.fromPartial(e.hasAny):void 0,t.hasAll=e.hasAll!==void 0&&e.hasAll!==null?Ge.fromPartial(e.hasAll):void 0,t.in=e.in!==void 0&&e.in!==null?Ge.fromPartial(e.in):void 0,t}};function qx(){return{conditions:{}}}var Wt={encode(e,t=g.default.Writer.create()){return Object.entries(e.conditions).forEach(([n,r])=>{_A.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=qx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=_A.decode(n,n.uint32());s.value!==void 0&&(i.conditions[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{conditions:Qe(e.conditions)?Object.entries(e.conditions).reduce((t,[n,r])=>(t[n]=Ei.fromJSON(r),t),{}):{}}},toJSON(e){let t={};if(e.conditions){let n=Object.entries(e.conditions);n.length>0&&(t.conditions={},n.forEach(([r,i])=>{t.conditions[r]=Ei.toJSON(i)}))}return t},create(e){return Wt.fromPartial(e??{})},fromPartial(e){let t=qx();return t.conditions=Object.entries(e.conditions??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=Ei.fromPartial(i)),n),{}),t}};function Jx(){return{key:"",value:void 0}}var _A={encode(e,t=g.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==void 0&&Ei.encode(e.value,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Jx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=Ei.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?Ei.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==void 0&&(t.value=Ei.toJSON(e.value)),t},create(e){return _A.fromPartial(e??{})},fromPartial(e){let t=Jx();return t.key=e.key??"",t.value=e.value!==void 0&&e.value!==null?Ei.fromPartial(e.value):void 0,t}};function Vx(){return{filters:[]}}var wr={encode(e,t=g.default.Writer.create()){for(let n of e.filters)Wt.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Vx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Wt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Wt.fromJSON(t)):[]}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Wt.toJSON(n))),t},create(e){return wr.fromPartial(e??{})},fromPartial(e){let t=Vx();return t.filters=e.filters?.map(n=>Wt.fromPartial(n))||[],t}};function zx(){return{filters:void 0,preVOut:void 0,preTransaction:void 0}}var Qo={encode(e,t=g.default.Writer.create()){return e.filters!==void 0&&wr.encode(e.filters,t.uint32(10).fork()).ldelim(),e.preVOut!==void 0&&Wt.encode(e.preVOut,t.uint32(18).fork()).ldelim(),e.preTransaction!==void 0&&vr.encode(e.preTransaction,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=zx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters=wr.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.preVOut=Wt.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.preTransaction=vr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:E(e.filters)?wr.fromJSON(e.filters):void 0,preVOut:E(e.preVOut)?Wt.fromJSON(e.preVOut):void 0,preTransaction:E(e.preTransaction)?vr.fromJSON(e.preTransaction):void 0}},toJSON(e){let t={};return e.filters!==void 0&&(t.filters=wr.toJSON(e.filters)),e.preVOut!==void 0&&(t.preVOut=Wt.toJSON(e.preVOut)),e.preTransaction!==void 0&&(t.preTransaction=vr.toJSON(e.preTransaction)),t},create(e){return Qo.fromPartial(e??{})},fromPartial(e){let t=zx();return t.filters=e.filters!==void 0&&e.filters!==null?wr.fromPartial(e.filters):void 0,t.preVOut=e.preVOut!==void 0&&e.preVOut!==null?Wt.fromPartial(e.preVOut):void 0,t.preTransaction=e.preTransaction!==void 0&&e.preTransaction!==null?vr.fromPartial(e.preTransaction):void 0,t}};function Gx(){return{filters:void 0}}var Uo={encode(e,t=g.default.Writer.create()){return e.filters!==void 0&&wr.encode(e.filters,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Gx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters=wr.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:E(e.filters)?wr.fromJSON(e.filters):void 0}},toJSON(e){let t={};return e.filters!==void 0&&(t.filters=wr.toJSON(e.filters)),t},create(e){return Uo.fromPartial(e??{})},fromPartial(e){let t=Gx();return t.filters=e.filters!==void 0&&e.filters!==null?wr.fromPartial(e.filters):void 0,t}};function Wx(){return{address:"",keys:[]}}var qo={encode(e,t=g.default.Writer.create()){e.address!==""&&t.uint32(10).string(e.address);for(let n of e.keys)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Wx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 2:if(a!==18)break;i.keys.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:E(e.address)?globalThis.String(e.address):"",keys:globalThis.Array.isArray(e?.keys)?e.keys.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.address!==""&&(t.address=e.address),e.keys?.length&&(t.keys=e.keys),t},create(e){return qo.fromPartial(e??{})},fromPartial(e){let t=Wx();return t.address=e.address??"",t.keys=e.keys?.map(n=>n)||[],t}};function Hx(){return{function:"",includeFailed:!1}}var Jo={encode(e,t=g.default.Writer.create()){return e.function!==""&&t.uint32(10).string(e.function),e.includeFailed!==!1&&t.uint32(16).bool(e.includeFailed),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Hx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.function=n.string();continue;case 2:if(a!==16)break;i.includeFailed=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{function:E(e.function)?globalThis.String(e.function):"",includeFailed:E(e.includeFailed)?globalThis.Boolean(e.includeFailed):!1}},toJSON(e){let t={};return e.function!==""&&(t.function=e.function),e.includeFailed!==!1&&(t.includeFailed=e.includeFailed),t},create(e){return Jo.fromPartial(e??{})},fromPartial(e){let t=Hx();return t.function=e.function??"",t.includeFailed=e.includeFailed??!1,t}};function Zx(){return{filters:[],handlerId:0}}var Vo={encode(e,t=g.default.Writer.create()){for(let n of e.filters)Jo.encode(n,t.uint32(10).fork()).ldelim();return e.handlerId!==0&&t.uint32(16).int32(e.handlerId),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Zx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.filters.push(Jo.decode(n,n.uint32()));continue;case 2:if(a!==16)break;i.handlerId=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Jo.fromJSON(t)):[],handlerId:E(e.handlerId)?globalThis.Number(e.handlerId):0}},toJSON(e){let t={};return e.filters?.length&&(t.filters=e.filters.map(n=>Jo.toJSON(n))),e.handlerId!==0&&(t.handlerId=Math.round(e.handlerId)),t},create(e){return Vo.fromPartial(e??{})},fromPartial(e){let t=Zx();return t.filters=e.filters?.map(n=>Jo.fromPartial(n))||[],t.handlerId=e.handlerId??0,t}};function Xx(){return{hashes:[]}}var zo={encode(e,t=g.default.Writer.create()){for(let n of e.hashes)t.uint32(10).string(n);return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Xx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.hashes.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{hashes:globalThis.Array.isArray(e?.hashes)?e.hashes.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.hashes?.length&&(t.hashes=e.hashes),t},create(e){return zo.fromPartial(e??{})},fromPartial(e){let t=Xx();return t.hashes=e.hashes?.map(n=>n)||[],t}};function Yx(){return{bindings:[]}}var $T={encode(e,t=g.default.Writer.create()){for(let n of e.bindings)Ht.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Yx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bindings.push(Ht.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(t=>Ht.fromJSON(t)):[]}},toJSON(e){let t={};return e.bindings?.length&&(t.bindings=e.bindings.map(n=>Ht.toJSON(n))),t},create(e){return $T.fromPartial(e??{})},fromPartial(e){let t=Yx();return t.bindings=e.bindings?.map(n=>Ht.fromPartial(n))||[],t}};function $x(){return{result:void 0}}var KT={encode(e,t=g.default.Writer.create()){return e.result!==void 0&&En.encode(e.result,t.uint32(10).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=$x();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.result=En.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{result:E(e.result)?En.fromJSON(e.result):void 0}},toJSON(e){let t={};return e.result!==void 0&&(t.result=En.toJSON(e.result)),t},create(e){return KT.fromPartial(e??{})},fromPartial(e){let t=$x();return t.result=e.result!==void 0&&e.result!==null?En.fromPartial(e.result):void 0,t}};function Kx(){return{processId:0,binding:void 0,dbResult:void 0}}var jT={encode(e,t=g.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.binding!==void 0&&Ht.encode(e.binding,t.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&br.encode(e.dbResult,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=Kx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.binding=Ht.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.dbResult=br.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,binding:E(e.binding)?Ht.fromJSON(e.binding):void 0,dbResult:E(e.dbResult)?br.fromJSON(e.dbResult):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.binding!==void 0&&(t.binding=Ht.toJSON(e.binding)),e.dbResult!==void 0&&(t.dbResult=br.toJSON(e.dbResult)),t},create(e){return jT.fromPartial(e??{})},fromPartial(e){let t=Kx();return t.processId=e.processId??0,t.binding=e.binding!==void 0&&e.binding!==null?Ht.fromPartial(e.binding):void 0,t.dbResult=e.dbResult!==void 0&&e.dbResult!==null?br.fromPartial(e.dbResult):void 0,t}};function jx(){return{processId:0,dbRequest:void 0,result:void 0}}var eN={encode(e,t=g.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.dbRequest!==void 0&&Er.encode(e.dbRequest,t.uint32(18).fork()).ldelim(),e.result!==void 0&&En.encode(e.result,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=jx();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.dbRequest=Er.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.result=En.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,dbRequest:E(e.dbRequest)?Er.fromJSON(e.dbRequest):void 0,result:E(e.result)?En.fromJSON(e.result):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(t.dbRequest=Er.toJSON(e.dbRequest)),e.result!==void 0&&(t.result=En.toJSON(e.result)),t},create(e){return eN.fromPartial(e??{})},fromPartial(e){let t=jx();return t.processId=e.processId??0,t.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?Er.fromPartial(e.dbRequest):void 0,t.result=e.result!==void 0&&e.result!==null?En.fromPartial(e.result):void 0,t}};function eT(){return{processId:0,bindings:void 0,dbResult:void 0}}var tN={encode(e,t=g.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.bindings!==void 0&&Go.encode(e.bindings,t.uint32(18).fork()).ldelim(),e.dbResult!==void 0&&br.encode(e.dbResult,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=eT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.bindings=Go.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.dbResult=br.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,bindings:E(e.bindings)?Go.fromJSON(e.bindings):void 0,dbResult:E(e.dbResult)?br.fromJSON(e.dbResult):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.bindings!==void 0&&(t.bindings=Go.toJSON(e.bindings)),e.dbResult!==void 0&&(t.dbResult=br.toJSON(e.dbResult)),t},create(e){return tN.fromPartial(e??{})},fromPartial(e){let t=eT();return t.processId=e.processId??0,t.bindings=e.bindings!==void 0&&e.bindings!==null?Go.fromPartial(e.bindings):void 0,t.dbResult=e.dbResult!==void 0&&e.dbResult!==null?br.fromPartial(e.dbResult):void 0,t}};function tT(){return{bindings:[]}}var Go={encode(e,t=g.default.Writer.create()){for(let n of e.bindings)Ht.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=tT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bindings.push(Ht.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bindings:globalThis.Array.isArray(e?.bindings)?e.bindings.map(t=>Ht.fromJSON(t)):[]}},toJSON(e){let t={};return e.bindings?.length&&(t.bindings=e.bindings.map(n=>Ht.toJSON(n))),t},create(e){return Go.fromPartial(e??{})},fromPartial(e){let t=tT();return t.bindings=e.bindings?.map(n=>Ht.fromPartial(n))||[],t}};function nT(){return{processId:0,dbRequest:void 0}}var nN={encode(e,t=g.default.Writer.create()){return e.processId!==0&&t.uint32(8).int32(e.processId),e.dbRequest!==void 0&&Er.encode(e.dbRequest,t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=nT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.processId=n.int32();continue;case 2:if(a!==18)break;i.dbRequest=Er.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{processId:E(e.processId)?globalThis.Number(e.processId):0,dbRequest:E(e.dbRequest)?Er.fromJSON(e.dbRequest):void 0}},toJSON(e){let t={};return e.processId!==0&&(t.processId=Math.round(e.processId)),e.dbRequest!==void 0&&(t.dbRequest=Er.toJSON(e.dbRequest)),t},create(e){return nN.fromPartial(e??{})},fromPartial(e){let t=nT();return t.processId=e.processId??0,t.dbRequest=e.dbRequest!==void 0&&e.dbRequest!==null?Er.fromPartial(e.dbRequest):void 0,t}};function rT(){return{opId:BigInt("0"),data:void 0,list:void 0,error:void 0,entities:void 0,entityList:void 0,nextCursor:void 0}}var br={encode(e,t=g.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");t.uint32(8).uint64(e.opId.toString())}return e.data!==void 0&&P.encode(P.wrap(e.data),t.uint32(18).fork()).ldelim(),e.list!==void 0&&Wr.encode(Wr.wrap(e.list),t.uint32(34).fork()).ldelim(),e.error!==void 0&&t.uint32(26).string(e.error),e.entities!==void 0&&Yi.encode(e.entities,t.uint32(50).fork()).ldelim(),e.entityList!==void 0&&Ho.encode(e.entityList,t.uint32(58).fork()).ldelim(),e.nextCursor!==void 0&&t.uint32(42).string(e.nextCursor),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=rT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.opId=Zt(n.uint64());continue;case 2:if(a!==18)break;i.data=P.unwrap(P.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.list=Wr.unwrap(Wr.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.error=n.string();continue;case 6:if(a!==50)break;i.entities=Yi.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.entityList=Ho.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.nextCursor=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{opId:E(e.opId)?BigInt(e.opId):BigInt("0"),data:Qe(e.data)?e.data:void 0,list:globalThis.Array.isArray(e.list)?[...e.list]:void 0,error:E(e.error)?globalThis.String(e.error):void 0,entities:E(e.entities)?Yi.fromJSON(e.entities):void 0,entityList:E(e.entityList)?Ho.fromJSON(e.entityList):void 0,nextCursor:E(e.nextCursor)?globalThis.String(e.nextCursor):void 0}},toJSON(e){let t={};return e.opId!==BigInt("0")&&(t.opId=e.opId.toString()),e.data!==void 0&&(t.data=e.data),e.list!==void 0&&(t.list=e.list),e.error!==void 0&&(t.error=e.error),e.entities!==void 0&&(t.entities=Yi.toJSON(e.entities)),e.entityList!==void 0&&(t.entityList=Ho.toJSON(e.entityList)),e.nextCursor!==void 0&&(t.nextCursor=e.nextCursor),t},create(e){return br.fromPartial(e??{})},fromPartial(e){let t=rT();return t.opId=e.opId??BigInt("0"),t.data=e.data??void 0,t.list=e.list??void 0,t.error=e.error??void 0,t.entities=e.entities!==void 0&&e.entities!==null?Yi.fromPartial(e.entities):void 0,t.entityList=e.entityList!==void 0&&e.entityList!==null?Ho.fromPartial(e.entityList):void 0,t.nextCursor=e.nextCursor??void 0,t}};function iT(){return{entity:"",genBlockNumber:BigInt("0"),genBlockChain:"",genBlockTime:void 0,data:void 0}}var Wo={encode(e,t=g.default.Writer.create()){if(e.entity!==""&&t.uint32(10).string(e.entity),e.genBlockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.genBlockNumber)!==e.genBlockNumber)throw new globalThis.Error("value provided for field message.genBlockNumber of type uint64 too large");t.uint32(16).uint64(e.genBlockNumber.toString())}return e.genBlockChain!==""&&t.uint32(26).string(e.genBlockChain),e.genBlockTime!==void 0&&Oe.encode(Cn(e.genBlockTime),t.uint32(34).fork()).ldelim(),e.data!==void 0&&rt.encode(e.data,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=iT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 2:if(a!==16)break;i.genBlockNumber=Zt(n.uint64());continue;case 3:if(a!==26)break;i.genBlockChain=n.string();continue;case 4:if(a!==34)break;i.genBlockTime=pn(Oe.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.data=rt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",genBlockNumber:E(e.genBlockNumber)?BigInt(e.genBlockNumber):BigInt("0"),genBlockChain:E(e.genBlockChain)?globalThis.String(e.genBlockChain):"",genBlockTime:E(e.genBlockTime)?In(e.genBlockTime):void 0,data:E(e.data)?rt.fromJSON(e.data):void 0}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.genBlockNumber!==BigInt("0")&&(t.genBlockNumber=e.genBlockNumber.toString()),e.genBlockChain!==""&&(t.genBlockChain=e.genBlockChain),e.genBlockTime!==void 0&&(t.genBlockTime=e.genBlockTime.toISOString()),e.data!==void 0&&(t.data=rt.toJSON(e.data)),t},create(e){return Wo.fromPartial(e??{})},fromPartial(e){let t=iT();return t.entity=e.entity??"",t.genBlockNumber=e.genBlockNumber??BigInt("0"),t.genBlockChain=e.genBlockChain??"",t.genBlockTime=e.genBlockTime??void 0,t.data=e.data!==void 0&&e.data!==null?rt.fromPartial(e.data):void 0,t}};function aT(){return{entities:[]}}var Ho={encode(e,t=g.default.Writer.create()){for(let n of e.entities)Wo.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=aT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entities.push(Wo.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entities:globalThis.Array.isArray(e?.entities)?e.entities.map(t=>Wo.fromJSON(t)):[]}},toJSON(e){let t={};return e.entities?.length&&(t.entities=e.entities.map(n=>Wo.toJSON(n))),t},create(e){return Ho.fromPartial(e??{})},fromPartial(e){let t=aT();return t.entities=e.entities?.map(n=>Wo.fromPartial(n))||[],t}};function sT(){return{opId:BigInt("0"),get:void 0,upsert:void 0,delete:void 0,list:void 0}}var Er={encode(e,t=g.default.Writer.create()){if(e.opId!==BigInt("0")){if(BigInt.asUintN(64,e.opId)!==e.opId)throw new globalThis.Error("value provided for field message.opId of type uint64 too large");t.uint32(8).uint64(e.opId.toString())}return e.get!==void 0&&Zo.encode(e.get,t.uint32(18).fork()).ldelim(),e.upsert!==void 0&&Yo.encode(e.upsert,t.uint32(26).fork()).ldelim(),e.delete!==void 0&&$o.encode(e.delete,t.uint32(34).fork()).ldelim(),e.list!==void 0&&Xo.encode(e.list,t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=sT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.opId=Zt(n.uint64());continue;case 2:if(a!==18)break;i.get=Zo.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.upsert=Yo.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.delete=$o.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.list=Xo.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{opId:E(e.opId)?BigInt(e.opId):BigInt("0"),get:E(e.get)?Zo.fromJSON(e.get):void 0,upsert:E(e.upsert)?Yo.fromJSON(e.upsert):void 0,delete:E(e.delete)?$o.fromJSON(e.delete):void 0,list:E(e.list)?Xo.fromJSON(e.list):void 0}},toJSON(e){let t={};return e.opId!==BigInt("0")&&(t.opId=e.opId.toString()),e.get!==void 0&&(t.get=Zo.toJSON(e.get)),e.upsert!==void 0&&(t.upsert=Yo.toJSON(e.upsert)),e.delete!==void 0&&(t.delete=$o.toJSON(e.delete)),e.list!==void 0&&(t.list=Xo.toJSON(e.list)),t},create(e){return Er.fromPartial(e??{})},fromPartial(e){let t=sT();return t.opId=e.opId??BigInt("0"),t.get=e.get!==void 0&&e.get!==null?Zo.fromPartial(e.get):void 0,t.upsert=e.upsert!==void 0&&e.upsert!==null?Yo.fromPartial(e.upsert):void 0,t.delete=e.delete!==void 0&&e.delete!==null?$o.fromPartial(e.delete):void 0,t.list=e.list!==void 0&&e.list!==null?Xo.fromPartial(e.list):void 0,t}};function oT(){return{entity:"",id:""}}var Zo={encode(e,t=g.default.Writer.create()){return e.entity!==""&&t.uint32(10).string(e.entity),e.id!==""&&t.uint32(18).string(e.id),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=oT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 2:if(a!==18)break;i.id=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",id:E(e.id)?globalThis.String(e.id):""}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.id!==""&&(t.id=e.id),t},create(e){return Zo.fromPartial(e??{})},fromPartial(e){let t=oT();return t.entity=e.entity??"",t.id=e.id??"",t}};function cT(){return{entity:"",filters:[],cursor:"",pageSize:void 0}}var Xo={encode(e,t=g.default.Writer.create()){e.entity!==""&&t.uint32(10).string(e.entity);for(let n of e.filters)Ko.encode(n,t.uint32(34).fork()).ldelim();return e.cursor!==""&&t.uint32(42).string(e.cursor),e.pageSize!==void 0&&t.uint32(48).uint32(e.pageSize),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=cT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity=n.string();continue;case 4:if(a!==34)break;i.filters.push(Ko.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.cursor=n.string();continue;case 6:if(a!==48)break;i.pageSize=n.uint32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:E(e.entity)?globalThis.String(e.entity):"",filters:globalThis.Array.isArray(e?.filters)?e.filters.map(t=>Ko.fromJSON(t)):[],cursor:E(e.cursor)?globalThis.String(e.cursor):"",pageSize:E(e.pageSize)?globalThis.Number(e.pageSize):void 0}},toJSON(e){let t={};return e.entity!==""&&(t.entity=e.entity),e.filters?.length&&(t.filters=e.filters.map(n=>Ko.toJSON(n))),e.cursor!==""&&(t.cursor=e.cursor),e.pageSize!==void 0&&(t.pageSize=Math.round(e.pageSize)),t},create(e){return Xo.fromPartial(e??{})},fromPartial(e){let t=cT();return t.entity=e.entity??"",t.filters=e.filters?.map(n=>Ko.fromPartial(n))||[],t.cursor=e.cursor??"",t.pageSize=e.pageSize??void 0,t}};function uT(){return{entity:[],id:[],data:[],entityData:[]}}var Yo={encode(e,t=g.default.Writer.create()){for(let n of e.entity)t.uint32(10).string(n);for(let n of e.id)t.uint32(18).string(n);for(let n of e.data)P.encode(P.wrap(n),t.uint32(26).fork()).ldelim();for(let n of e.entityData)rt.encode(n,t.uint32(34).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=uT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity.push(n.string());continue;case 2:if(a!==18)break;i.id.push(n.string());continue;case 3:if(a!==26)break;i.data.push(P.unwrap(P.decode(n,n.uint32())));continue;case 4:if(a!==34)break;i.entityData.push(rt.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(t=>globalThis.String(t)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(t=>globalThis.String(t)):[],data:globalThis.Array.isArray(e?.data)?[...e.data]:[],entityData:globalThis.Array.isArray(e?.entityData)?e.entityData.map(t=>rt.fromJSON(t)):[]}},toJSON(e){let t={};return e.entity?.length&&(t.entity=e.entity),e.id?.length&&(t.id=e.id),e.data?.length&&(t.data=e.data),e.entityData?.length&&(t.entityData=e.entityData.map(n=>rt.toJSON(n))),t},create(e){return Yo.fromPartial(e??{})},fromPartial(e){let t=uT();return t.entity=e.entity?.map(n=>n)||[],t.id=e.id?.map(n=>n)||[],t.data=e.data?.map(n=>n)||[],t.entityData=e.entityData?.map(n=>rt.fromPartial(n))||[],t}};function lT(){return{entity:[],id:[]}}var $o={encode(e,t=g.default.Writer.create()){for(let n of e.entity)t.uint32(10).string(n);for(let n of e.id)t.uint32(18).string(n);return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=lT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.entity.push(n.string());continue;case 2:if(a!==18)break;i.id.push(n.string());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{entity:globalThis.Array.isArray(e?.entity)?e.entity.map(t=>globalThis.String(t)):[],id:globalThis.Array.isArray(e?.id)?e.id.map(t=>globalThis.String(t)):[]}},toJSON(e){let t={};return e.entity?.length&&(t.entity=e.entity),e.id?.length&&(t.id=e.id),t},create(e){return $o.fromPartial(e??{})},fromPartial(e){let t=lT();return t.entity=e.entity?.map(n=>n)||[],t.id=e.id?.map(n=>n)||[],t}};function dT(){return{field:"",op:0,value:void 0}}var Ko={encode(e,t=g.default.Writer.create()){return e.field!==""&&t.uint32(10).string(e.field),e.op!==0&&t.uint32(16).int32(e.op),e.value!==void 0&&Ge.encode(e.value,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=dT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.field=n.string();continue;case 2:if(a!==16)break;i.op=n.int32();continue;case 3:if(a!==26)break;i.value=Ge.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{field:E(e.field)?globalThis.String(e.field):"",op:E(e.op)?bq(e.op):0,value:E(e.value)?Ge.fromJSON(e.value):void 0}},toJSON(e){let t={};return e.field!==""&&(t.field=e.field),e.op!==0&&(t.op=Eq(e.op)),e.value!==void 0&&(t.value=Ge.toJSON(e.value)),t},create(e){return Ko.fromPartial(e??{})},fromPartial(e){let t=dT();return t.field=e.field??"",t.op=e.op??0,t.value=e.value!==void 0&&e.value!==null?Ge.fromPartial(e.value):void 0,t}};function fT(){return{ethLog:void 0,ethBlock:void 0,ethTransaction:void 0,ethTrace:void 0,solInstruction:void 0,aptEvent:void 0,aptCall:void 0,aptResource:void 0,suiEvent:void 0,suiCall:void 0,suiObject:void 0,suiObjectChange:void 0,fuelCall:void 0,fuelBlock:void 0,cosmosCall:void 0,starknetEvents:void 0,btcTransaction:void 0}}var jo={encode(e,t=g.default.Writer.create()){return e.ethLog!==void 0&&ec.encode(e.ethLog,t.uint32(18).fork()).ldelim(),e.ethBlock!==void 0&&tc.encode(e.ethBlock,t.uint32(26).fork()).ldelim(),e.ethTransaction!==void 0&&nc.encode(e.ethTransaction,t.uint32(34).fork()).ldelim(),e.ethTrace!==void 0&&rc.encode(e.ethTrace,t.uint32(42).fork()).ldelim(),e.solInstruction!==void 0&&ic.encode(e.solInstruction,t.uint32(50).fork()).ldelim(),e.aptEvent!==void 0&&ac.encode(e.aptEvent,t.uint32(58).fork()).ldelim(),e.aptCall!==void 0&&sc.encode(e.aptCall,t.uint32(66).fork()).ldelim(),e.aptResource!==void 0&&oc.encode(e.aptResource,t.uint32(74).fork()).ldelim(),e.suiEvent!==void 0&&cc.encode(e.suiEvent,t.uint32(82).fork()).ldelim(),e.suiCall!==void 0&&uc.encode(e.suiCall,t.uint32(90).fork()).ldelim(),e.suiObject!==void 0&&lc.encode(e.suiObject,t.uint32(98).fork()).ldelim(),e.suiObjectChange!==void 0&&dc.encode(e.suiObjectChange,t.uint32(106).fork()).ldelim(),e.fuelCall!==void 0&&fc.encode(e.fuelCall,t.uint32(114).fork()).ldelim(),e.fuelBlock!==void 0&&pc.encode(e.fuelBlock,t.uint32(146).fork()).ldelim(),e.cosmosCall!==void 0&&hc.encode(e.cosmosCall,t.uint32(122).fork()).ldelim(),e.starknetEvents!==void 0&&mc.encode(e.starknetEvents,t.uint32(130).fork()).ldelim(),e.btcTransaction!==void 0&&gc.encode(e.btcTransaction,t.uint32(138).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=fT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.ethLog=ec.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.ethBlock=tc.decode(n,n.uint32());continue;case 4:if(a!==34)break;i.ethTransaction=nc.decode(n,n.uint32());continue;case 5:if(a!==42)break;i.ethTrace=rc.decode(n,n.uint32());continue;case 6:if(a!==50)break;i.solInstruction=ic.decode(n,n.uint32());continue;case 7:if(a!==58)break;i.aptEvent=ac.decode(n,n.uint32());continue;case 8:if(a!==66)break;i.aptCall=sc.decode(n,n.uint32());continue;case 9:if(a!==74)break;i.aptResource=oc.decode(n,n.uint32());continue;case 10:if(a!==82)break;i.suiEvent=cc.decode(n,n.uint32());continue;case 11:if(a!==90)break;i.suiCall=uc.decode(n,n.uint32());continue;case 12:if(a!==98)break;i.suiObject=lc.decode(n,n.uint32());continue;case 13:if(a!==106)break;i.suiObjectChange=dc.decode(n,n.uint32());continue;case 14:if(a!==114)break;i.fuelCall=fc.decode(n,n.uint32());continue;case 18:if(a!==146)break;i.fuelBlock=pc.decode(n,n.uint32());continue;case 15:if(a!==122)break;i.cosmosCall=hc.decode(n,n.uint32());continue;case 16:if(a!==130)break;i.starknetEvents=mc.decode(n,n.uint32());continue;case 17:if(a!==138)break;i.btcTransaction=gc.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethLog:E(e.ethLog)?ec.fromJSON(e.ethLog):void 0,ethBlock:E(e.ethBlock)?tc.fromJSON(e.ethBlock):void 0,ethTransaction:E(e.ethTransaction)?nc.fromJSON(e.ethTransaction):void 0,ethTrace:E(e.ethTrace)?rc.fromJSON(e.ethTrace):void 0,solInstruction:E(e.solInstruction)?ic.fromJSON(e.solInstruction):void 0,aptEvent:E(e.aptEvent)?ac.fromJSON(e.aptEvent):void 0,aptCall:E(e.aptCall)?sc.fromJSON(e.aptCall):void 0,aptResource:E(e.aptResource)?oc.fromJSON(e.aptResource):void 0,suiEvent:E(e.suiEvent)?cc.fromJSON(e.suiEvent):void 0,suiCall:E(e.suiCall)?uc.fromJSON(e.suiCall):void 0,suiObject:E(e.suiObject)?lc.fromJSON(e.suiObject):void 0,suiObjectChange:E(e.suiObjectChange)?dc.fromJSON(e.suiObjectChange):void 0,fuelCall:E(e.fuelCall)?fc.fromJSON(e.fuelCall):void 0,fuelBlock:E(e.fuelBlock)?pc.fromJSON(e.fuelBlock):void 0,cosmosCall:E(e.cosmosCall)?hc.fromJSON(e.cosmosCall):void 0,starknetEvents:E(e.starknetEvents)?mc.fromJSON(e.starknetEvents):void 0,btcTransaction:E(e.btcTransaction)?gc.fromJSON(e.btcTransaction):void 0}},toJSON(e){let t={};return e.ethLog!==void 0&&(t.ethLog=ec.toJSON(e.ethLog)),e.ethBlock!==void 0&&(t.ethBlock=tc.toJSON(e.ethBlock)),e.ethTransaction!==void 0&&(t.ethTransaction=nc.toJSON(e.ethTransaction)),e.ethTrace!==void 0&&(t.ethTrace=rc.toJSON(e.ethTrace)),e.solInstruction!==void 0&&(t.solInstruction=ic.toJSON(e.solInstruction)),e.aptEvent!==void 0&&(t.aptEvent=ac.toJSON(e.aptEvent)),e.aptCall!==void 0&&(t.aptCall=sc.toJSON(e.aptCall)),e.aptResource!==void 0&&(t.aptResource=oc.toJSON(e.aptResource)),e.suiEvent!==void 0&&(t.suiEvent=cc.toJSON(e.suiEvent)),e.suiCall!==void 0&&(t.suiCall=uc.toJSON(e.suiCall)),e.suiObject!==void 0&&(t.suiObject=lc.toJSON(e.suiObject)),e.suiObjectChange!==void 0&&(t.suiObjectChange=dc.toJSON(e.suiObjectChange)),e.fuelCall!==void 0&&(t.fuelCall=fc.toJSON(e.fuelCall)),e.fuelBlock!==void 0&&(t.fuelBlock=pc.toJSON(e.fuelBlock)),e.cosmosCall!==void 0&&(t.cosmosCall=hc.toJSON(e.cosmosCall)),e.starknetEvents!==void 0&&(t.starknetEvents=mc.toJSON(e.starknetEvents)),e.btcTransaction!==void 0&&(t.btcTransaction=gc.toJSON(e.btcTransaction)),t},create(e){return jo.fromPartial(e??{})},fromPartial(e){let t=fT();return t.ethLog=e.ethLog!==void 0&&e.ethLog!==null?ec.fromPartial(e.ethLog):void 0,t.ethBlock=e.ethBlock!==void 0&&e.ethBlock!==null?tc.fromPartial(e.ethBlock):void 0,t.ethTransaction=e.ethTransaction!==void 0&&e.ethTransaction!==null?nc.fromPartial(e.ethTransaction):void 0,t.ethTrace=e.ethTrace!==void 0&&e.ethTrace!==null?rc.fromPartial(e.ethTrace):void 0,t.solInstruction=e.solInstruction!==void 0&&e.solInstruction!==null?ic.fromPartial(e.solInstruction):void 0,t.aptEvent=e.aptEvent!==void 0&&e.aptEvent!==null?ac.fromPartial(e.aptEvent):void 0,t.aptCall=e.aptCall!==void 0&&e.aptCall!==null?sc.fromPartial(e.aptCall):void 0,t.aptResource=e.aptResource!==void 0&&e.aptResource!==null?oc.fromPartial(e.aptResource):void 0,t.suiEvent=e.suiEvent!==void 0&&e.suiEvent!==null?cc.fromPartial(e.suiEvent):void 0,t.suiCall=e.suiCall!==void 0&&e.suiCall!==null?uc.fromPartial(e.suiCall):void 0,t.suiObject=e.suiObject!==void 0&&e.suiObject!==null?lc.fromPartial(e.suiObject):void 0,t.suiObjectChange=e.suiObjectChange!==void 0&&e.suiObjectChange!==null?dc.fromPartial(e.suiObjectChange):void 0,t.fuelCall=e.fuelCall!==void 0&&e.fuelCall!==null?fc.fromPartial(e.fuelCall):void 0,t.fuelBlock=e.fuelBlock!==void 0&&e.fuelBlock!==null?pc.fromPartial(e.fuelBlock):void 0,t.cosmosCall=e.cosmosCall!==void 0&&e.cosmosCall!==null?hc.fromPartial(e.cosmosCall):void 0,t.starknetEvents=e.starknetEvents!==void 0&&e.starknetEvents!==null?mc.fromPartial(e.starknetEvents):void 0,t.btcTransaction=e.btcTransaction!==void 0&&e.btcTransaction!==null?gc.fromPartial(e.btcTransaction):void 0,t}};function pT(){return{log:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var ec={encode(e,t=g.default.Writer.create()){return e.log!==void 0&&P.encode(P.wrap(e.log),t.uint32(26).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(34).fork()).ldelim(),e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(42).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=pT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 3:if(a!==26)break;i.log=P.unwrap(P.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{log:Qe(e.log)?e.log:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,transaction:Qe(e.transaction)?e.transaction:void 0,transactionReceipt:Qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:Qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.log!==void 0&&(t.log=e.log),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(t.transaction=e.transaction),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),t},create(e){return ec.fromPartial(e??{})},fromPartial(e){let t=pT();return t.log=e.log??void 0,t.timestamp=e.timestamp??void 0,t.transaction=e.transaction??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t}};function hT(){return{block:void 0}}var tc={encode(e,t=g.default.Writer.create()){return e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=hT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{block:Qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),t},create(e){return tc.fromPartial(e??{})},fromPartial(e){let t=hT();return t.block=e.block??void 0,t}};function mT(){return{transaction:void 0,timestamp:void 0,transactionReceipt:void 0,block:void 0,trace:void 0}}var nc={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(42).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(26).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),e.trace!==void 0&&P.encode(P.wrap(e.trace),t.uint32(58).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=mT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue;case 7:if(a!==58)break;i.trace=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,transactionReceipt:Qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:Qe(e.block)?e.block:void 0,trace:Qe(e.trace)?e.trace:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),e.trace!==void 0&&(t.trace=e.trace),t},create(e){return nc.fromPartial(e??{})},fromPartial(e){let t=mT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t.trace=e.trace??void 0,t}};function gT(){return{trace:void 0,timestamp:void 0,transaction:void 0,transactionReceipt:void 0,block:void 0}}var rc={encode(e,t=g.default.Writer.create()){return e.trace!==void 0&&P.encode(P.wrap(e.trace),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(42).fork()).ldelim(),e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),e.transactionReceipt!==void 0&&P.encode(P.wrap(e.transactionReceipt),t.uint32(26).fork()).ldelim(),e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=gT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.trace=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 3:if(a!==26)break;i.transactionReceipt=P.unwrap(P.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{trace:Qe(e.trace)?e.trace:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,transaction:Qe(e.transaction)?e.transaction:void 0,transactionReceipt:Qe(e.transactionReceipt)?e.transactionReceipt:void 0,block:Qe(e.block)?e.block:void 0}},toJSON(e){let t={};return e.trace!==void 0&&(t.trace=e.trace),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.transaction!==void 0&&(t.transaction=e.transaction),e.transactionReceipt!==void 0&&(t.transactionReceipt=e.transactionReceipt),e.block!==void 0&&(t.block=e.block),t},create(e){return rc.fromPartial(e??{})},fromPartial(e){let t=gT();return t.trace=e.trace??void 0,t.timestamp=e.timestamp??void 0,t.transaction=e.transaction??void 0,t.transactionReceipt=e.transactionReceipt??void 0,t.block=e.block??void 0,t}};function _T(){return{instructionData:"",slot:BigInt("0"),programAccountId:"",accounts:[],parsed:void 0}}var ic={encode(e,t=g.default.Writer.create()){if(e.instructionData!==""&&t.uint32(10).string(e.instructionData),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(16).uint64(e.slot.toString())}e.programAccountId!==""&&t.uint32(26).string(e.programAccountId);for(let n of e.accounts)t.uint32(42).string(n);return e.parsed!==void 0&&P.encode(P.wrap(e.parsed),t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=_T();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.instructionData=n.string();continue;case 2:if(a!==16)break;i.slot=Zt(n.uint64());continue;case 3:if(a!==26)break;i.programAccountId=n.string();continue;case 5:if(a!==42)break;i.accounts.push(n.string());continue;case 4:if(a!==34)break;i.parsed=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{instructionData:E(e.instructionData)?globalThis.String(e.instructionData):"",slot:E(e.slot)?BigInt(e.slot):BigInt("0"),programAccountId:E(e.programAccountId)?globalThis.String(e.programAccountId):"",accounts:globalThis.Array.isArray(e?.accounts)?e.accounts.map(t=>globalThis.String(t)):[],parsed:Qe(e.parsed)?e.parsed:void 0}},toJSON(e){let t={};return e.instructionData!==""&&(t.instructionData=e.instructionData),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),e.programAccountId!==""&&(t.programAccountId=e.programAccountId),e.accounts?.length&&(t.accounts=e.accounts),e.parsed!==void 0&&(t.parsed=e.parsed),t},create(e){return ic.fromPartial(e??{})},fromPartial(e){let t=_T();return t.instructionData=e.instructionData??"",t.slot=e.slot??BigInt("0"),t.programAccountId=e.programAccountId??"",t.accounts=e.accounts?.map(n=>n)||[],t.parsed=e.parsed??void 0,t}};function AT(){return{transaction:void 0}}var ac={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=AT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),t},create(e){return ac.fromPartial(e??{})},fromPartial(e){let t=AT();return t.transaction=e.transaction??void 0,t}};function yT(){return{transaction:void 0}}var sc={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=yT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 2:if(a!==18)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),t},create(e){return sc.fromPartial(e??{})},fromPartial(e){let t=yT();return t.transaction=e.transaction??void 0,t}};function vT(){return{resources:[],version:BigInt("0"),timestampMicros:BigInt("0")}}var oc={encode(e,t=g.default.Writer.create()){for(let n of e.resources)P.encode(P.wrap(n),t.uint32(34).fork()).ldelim();if(e.version!==BigInt("0")){if(BigInt.asIntN(64,e.version)!==e.version)throw new globalThis.Error("value provided for field message.version of type int64 too large");t.uint32(16).int64(e.version.toString())}if(e.timestampMicros!==BigInt("0")){if(BigInt.asIntN(64,e.timestampMicros)!==e.timestampMicros)throw new globalThis.Error("value provided for field message.timestampMicros of type int64 too large");t.uint32(40).int64(e.timestampMicros.toString())}return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=vT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.resources.push(P.unwrap(P.decode(n,n.uint32())));continue;case 2:if(a!==16)break;i.version=Zt(n.int64());continue;case 5:if(a!==40)break;i.timestampMicros=Zt(n.int64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{resources:globalThis.Array.isArray(e?.resources)?[...e.resources]:[],version:E(e.version)?BigInt(e.version):BigInt("0"),timestampMicros:E(e.timestampMicros)?BigInt(e.timestampMicros):BigInt("0")}},toJSON(e){let t={};return e.resources?.length&&(t.resources=e.resources),e.version!==BigInt("0")&&(t.version=e.version.toString()),e.timestampMicros!==BigInt("0")&&(t.timestampMicros=e.timestampMicros.toString()),t},create(e){return oc.fromPartial(e??{})},fromPartial(e){let t=vT();return t.resources=e.resources?.map(n=>n)||[],t.version=e.version??BigInt("0"),t.timestampMicros=e.timestampMicros??BigInt("0"),t}};function wT(){return{transaction:void 0,timestamp:void 0,slot:BigInt("0")}}var cc={encode(e,t=g.default.Writer.create()){if(e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=wT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=Zt(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return cc.fromPartial(e??{})},fromPartial(e){let t=wT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function bT(){return{transaction:void 0,timestamp:void 0,slot:BigInt("0")}}var uc={encode(e,t=g.default.Writer.create()){if(e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=bT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=Zt(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return uc.fromPartial(e??{})},fromPartial(e){let t=bT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function ET(){return{objects:[],self:void 0,timestamp:void 0,slot:BigInt("0")}}var lc={encode(e,t=g.default.Writer.create()){for(let n of e.objects)P.encode(P.wrap(n),t.uint32(10).fork()).ldelim();if(e.self!==void 0&&P.encode(P.wrap(e.self),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ET();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.objects.push(P.unwrap(P.decode(n,n.uint32())));continue;case 4:if(a!==34)break;i.self=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 3:if(a!==24)break;i.slot=Zt(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{objects:globalThis.Array.isArray(e?.objects)?[...e.objects]:[],self:Qe(e.self)?e.self:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0,slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.objects?.length&&(t.objects=e.objects),e.self!==void 0&&(t.self=e.self),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return lc.fromPartial(e??{})},fromPartial(e){let t=ET();return t.objects=e.objects?.map(n=>n)||[],t.self=e.self??void 0,t.timestamp=e.timestamp??void 0,t.slot=e.slot??BigInt("0"),t}};function CT(){return{changes:[],timestamp:void 0,txDigest:"",slot:BigInt("0")}}var dc={encode(e,t=g.default.Writer.create()){for(let n of e.changes)P.encode(P.wrap(n),t.uint32(10).fork()).ldelim();if(e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),e.txDigest!==""&&t.uint32(34).string(e.txDigest),e.slot!==BigInt("0")){if(BigInt.asUintN(64,e.slot)!==e.slot)throw new globalThis.Error("value provided for field message.slot of type uint64 too large");t.uint32(24).uint64(e.slot.toString())}return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=CT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.changes.push(P.unwrap(P.decode(n,n.uint32())));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.txDigest=n.string();continue;case 3:if(a!==24)break;i.slot=Zt(n.uint64());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{changes:globalThis.Array.isArray(e?.changes)?[...e.changes]:[],timestamp:E(e.timestamp)?In(e.timestamp):void 0,txDigest:E(e.txDigest)?globalThis.String(e.txDigest):"",slot:E(e.slot)?BigInt(e.slot):BigInt("0")}},toJSON(e){let t={};return e.changes?.length&&(t.changes=e.changes),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),e.txDigest!==""&&(t.txDigest=e.txDigest),e.slot!==BigInt("0")&&(t.slot=e.slot.toString()),t},create(e){return dc.fromPartial(e??{})},fromPartial(e){let t=CT();return t.changes=e.changes?.map(n=>n)||[],t.timestamp=e.timestamp??void 0,t.txDigest=e.txDigest??"",t.slot=e.slot??BigInt("0"),t}};function IT(){return{transaction:void 0,timestamp:void 0}}var fc={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=IT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return fc.fromPartial(e??{})},fromPartial(e){let t=IT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function ST(){return{block:void 0,timestamp:void 0}}var pc={encode(e,t=g.default.Writer.create()){return e.block!==void 0&&P.encode(P.wrap(e.block),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=ST();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.block=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{block:Qe(e.block)?e.block:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0}},toJSON(e){let t={};return e.block!==void 0&&(t.block=e.block),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return pc.fromPartial(e??{})},fromPartial(e){let t=ST();return t.block=e.block??void 0,t.timestamp=e.timestamp??void 0,t}};function xT(){return{transaction:void 0,timestamp:void 0}}var hc={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=xT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return hc.fromPartial(e??{})},fromPartial(e){let t=xT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function TT(){return{result:void 0,timestamp:void 0}}var mc={encode(e,t=g.default.Writer.create()){return e.result!==void 0&&P.encode(P.wrap(e.result),t.uint32(10).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(18).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=TT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.result=P.unwrap(P.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{result:Qe(e.result)?e.result:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0}},toJSON(e){let t={};return e.result!==void 0&&(t.result=e.result),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return mc.fromPartial(e??{})},fromPartial(e){let t=TT();return t.result=e.result??void 0,t.timestamp=e.timestamp??void 0,t}};function NT(){return{transaction:void 0,timestamp:void 0}}var gc={encode(e,t=g.default.Writer.create()){return e.transaction!==void 0&&P.encode(P.wrap(e.transaction),t.uint32(34).fork()).ldelim(),e.timestamp!==void 0&&Oe.encode(Cn(e.timestamp),t.uint32(42).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=NT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 4:if(a!==34)break;i.transaction=P.unwrap(P.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.timestamp=pn(Oe.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{transaction:Qe(e.transaction)?e.transaction:void 0,timestamp:E(e.timestamp)?In(e.timestamp):void 0}},toJSON(e){let t={};return e.transaction!==void 0&&(t.transaction=e.transaction),e.timestamp!==void 0&&(t.timestamp=e.timestamp.toISOString()),t},create(e){return gc.fromPartial(e??{})},fromPartial(e){let t=NT();return t.transaction=e.transaction??void 0,t.timestamp=e.timestamp??void 0,t}};function RT(){return{data:void 0,handlerType:0,handlerIds:[]}}var Ht={encode(e,t=g.default.Writer.create()){e.data!==void 0&&jo.encode(e.data,t.uint32(10).fork()).ldelim(),e.handlerType!==0&&t.uint32(24).int32(e.handlerType),t.uint32(34).fork();for(let n of e.handlerIds)t.int32(n);return t.ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=RT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.data=jo.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.handlerType=n.int32();continue;case 4:if(a===32){i.handlerIds.push(n.int32());continue}if(a===34){let s=n.uint32()+n.pos;for(;n.pos<s;)i.handlerIds.push(n.int32());continue}break}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{data:E(e.data)?jo.fromJSON(e.data):void 0,handlerType:E(e.handlerType)?WT(e.handlerType):0,handlerIds:globalThis.Array.isArray(e?.handlerIds)?e.handlerIds.map(t=>globalThis.Number(t)):[]}},toJSON(e){let t={};return e.data!==void 0&&(t.data=jo.toJSON(e.data)),e.handlerType!==0&&(t.handlerType=HT(e.handlerType)),e.handlerIds?.length&&(t.handlerIds=e.handlerIds.map(n=>Math.round(n))),t},create(e){return Ht.fromPartial(e??{})},fromPartial(e){let t=RT();return t.data=e.data!==void 0&&e.data!==null?jo.fromPartial(e.data):void 0,t.handlerType=e.handlerType??0,t.handlerIds=e.handlerIds?.map(n=>n)||[],t}};function kT(){return{configUpdated:!1,error:void 0}}var _c={encode(e,t=g.default.Writer.create()){return e.configUpdated!==!1&&t.uint32(8).bool(e.configUpdated),e.error!==void 0&&t.uint32(18).string(e.error),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=kT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.configUpdated=n.bool();continue;case 2:if(a!==18)break;i.error=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{configUpdated:E(e.configUpdated)?globalThis.Boolean(e.configUpdated):!1,error:E(e.error)?globalThis.String(e.error):void 0}},toJSON(e){let t={};return e.configUpdated!==!1&&(t.configUpdated=e.configUpdated),e.error!==void 0&&(t.error=e.error),t},create(e){return _c.fromPartial(e??{})},fromPartial(e){let t=kT();return t.configUpdated=e.configUpdated??!1,t.error=e.error??void 0,t}};function BT(){return{gauges:[],counters:[],events:[],exports:[],states:void 0}}var En={encode(e,t=g.default.Writer.create()){for(let n of e.gauges)vc.encode(n,t.uint32(10).fork()).ldelim();for(let n of e.counters)wc.encode(n,t.uint32(18).fork()).ldelim();for(let n of e.events)bc.encode(n,t.uint32(34).fork()).ldelim();for(let n of e.exports)Ec.encode(n,t.uint32(42).fork()).ldelim();return e.states!==void 0&&_c.encode(e.states,t.uint32(50).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=BT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.gauges.push(vc.decode(n,n.uint32()));continue;case 2:if(a!==18)break;i.counters.push(wc.decode(n,n.uint32()));continue;case 4:if(a!==34)break;i.events.push(bc.decode(n,n.uint32()));continue;case 5:if(a!==42)break;i.exports.push(Ec.decode(n,n.uint32()));continue;case 6:if(a!==50)break;i.states=_c.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{gauges:globalThis.Array.isArray(e?.gauges)?e.gauges.map(t=>vc.fromJSON(t)):[],counters:globalThis.Array.isArray(e?.counters)?e.counters.map(t=>wc.fromJSON(t)):[],events:globalThis.Array.isArray(e?.events)?e.events.map(t=>bc.fromJSON(t)):[],exports:globalThis.Array.isArray(e?.exports)?e.exports.map(t=>Ec.fromJSON(t)):[],states:E(e.states)?_c.fromJSON(e.states):void 0}},toJSON(e){let t={};return e.gauges?.length&&(t.gauges=e.gauges.map(n=>vc.toJSON(n))),e.counters?.length&&(t.counters=e.counters.map(n=>wc.toJSON(n))),e.events?.length&&(t.events=e.events.map(n=>bc.toJSON(n))),e.exports?.length&&(t.exports=e.exports.map(n=>Ec.toJSON(n))),e.states!==void 0&&(t.states=_c.toJSON(e.states)),t},create(e){return En.fromPartial(e??{})},fromPartial(e){let t=BT();return t.gauges=e.gauges?.map(n=>vc.fromPartial(n))||[],t.counters=e.counters?.map(n=>wc.fromPartial(n))||[],t.events=e.events?.map(n=>bc.fromPartial(n))||[],t.exports=e.exports?.map(n=>Ec.fromPartial(n))||[],t.states=e.states!==void 0&&e.states!==null?_c.fromPartial(e.states):void 0,t}};function OT(){return{context:void 0,calldata:""}}var Ac={encode(e,t=g.default.Writer.create()){return e.context!==void 0&&yc.encode(e.context,t.uint32(10).fork()).ldelim(),e.calldata!==""&&t.uint32(18).string(e.calldata),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=OT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.context=yc.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.calldata=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{context:E(e.context)?yc.fromJSON(e.context):void 0,calldata:E(e.calldata)?globalThis.String(e.calldata):""}},toJSON(e){let t={};return e.context!==void 0&&(t.context=yc.toJSON(e.context)),e.calldata!==""&&(t.calldata=e.calldata),t},create(e){return Ac.fromPartial(e??{})},fromPartial(e){let t=OT();return t.context=e.context!==void 0&&e.context!==null?yc.fromPartial(e.context):void 0,t.calldata=e.calldata??"",t}};function PT(){return{chainId:"",address:"",blockTag:""}}var yc={encode(e,t=g.default.Writer.create()){return e.chainId!==""&&t.uint32(10).string(e.chainId),e.address!==""&&t.uint32(18).string(e.address),e.blockTag!==""&&t.uint32(26).string(e.blockTag),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=PT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.chainId=n.string();continue;case 2:if(a!==18)break;i.address=n.string();continue;case 3:if(a!==26)break;i.blockTag=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{chainId:E(e.chainId)?globalThis.String(e.chainId):"",address:E(e.address)?globalThis.String(e.address):"",blockTag:E(e.blockTag)?globalThis.String(e.blockTag):""}},toJSON(e){let t={};return e.chainId!==""&&(t.chainId=e.chainId),e.address!==""&&(t.address=e.address),e.blockTag!==""&&(t.blockTag=e.blockTag),t},create(e){return yc.fromPartial(e??{})},fromPartial(e){let t=PT();return t.chainId=e.chainId??"",t.address=e.address??"",t.blockTag=e.blockTag??"",t}};function DT(){return{ethCallParams:[]}}var Sq={encode(e,t=g.default.Writer.create()){for(let n of e.ethCallParams)Ac.encode(n,t.uint32(10).fork()).ldelim();return t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=DT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.ethCallParams.push(Ac.decode(n,n.uint32()));continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethCallParams:globalThis.Array.isArray(e?.ethCallParams)?e.ethCallParams.map(t=>Ac.fromJSON(t)):[]}},toJSON(e){let t={};return e.ethCallParams?.length&&(t.ethCallParams=e.ethCallParams.map(n=>Ac.toJSON(n))),t},create(e){return Sq.fromPartial(e??{})},fromPartial(e){let t=DT();return t.ethCallParams=e.ethCallParams?.map(n=>Ac.fromPartial(n))||[],t}};function MT(){return{ethCallResults:{}}}var xq={encode(e,t=g.default.Writer.create()){return Object.entries(e.ethCallResults).forEach(([n,r])=>{AA.encode({key:n,value:r},t.uint32(10).fork()).ldelim()}),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=MT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;let s=AA.decode(n,n.uint32());s.value!==void 0&&(i.ethCallResults[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{ethCallResults:Qe(e.ethCallResults)?Object.entries(e.ethCallResults).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){let t={};if(e.ethCallResults){let n=Object.entries(e.ethCallResults);n.length>0&&(t.ethCallResults={},n.forEach(([r,i])=>{t.ethCallResults[r]=i}))}return t},create(e){return xq.fromPartial(e??{})},fromPartial(e){let t=MT();return t.ethCallResults=Object.entries(e.ethCallResults??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function FT(){return{key:"",value:""}}var AA={encode(e,t=g.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=FT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?globalThis.String(e.value):""}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return AA.fromPartial(e??{})},fromPartial(e){let t=FT();return t.key=e.key??"",t.value=e.value??"",t}};function LT(){return{address:"",contractName:"",blockNumber:BigInt("0"),transactionHash:"",chainId:"",transactionIndex:0,logIndex:0,name:"",labels:{}}}var pt={encode(e,t=g.default.Writer.create()){if(e.address!==""&&t.uint32(10).string(e.address),e.contractName!==""&&t.uint32(74).string(e.contractName),e.blockNumber!==BigInt("0")){if(BigInt.asUintN(64,e.blockNumber)!==e.blockNumber)throw new globalThis.Error("value provided for field message.blockNumber of type uint64 too large");t.uint32(16).uint64(e.blockNumber.toString())}return e.transactionHash!==""&&t.uint32(50).string(e.transactionHash),e.chainId!==""&&t.uint32(42).string(e.chainId),e.transactionIndex!==0&&t.uint32(24).int32(e.transactionIndex),e.logIndex!==0&&t.uint32(32).int32(e.logIndex),e.name!==""&&t.uint32(82).string(e.name),Object.entries(e.labels).forEach(([n,r])=>{yA.encode({key:n,value:r},t.uint32(58).fork()).ldelim()}),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=LT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.address=n.string();continue;case 9:if(a!==74)break;i.contractName=n.string();continue;case 2:if(a!==16)break;i.blockNumber=Zt(n.uint64());continue;case 6:if(a!==50)break;i.transactionHash=n.string();continue;case 5:if(a!==42)break;i.chainId=n.string();continue;case 3:if(a!==24)break;i.transactionIndex=n.int32();continue;case 4:if(a!==32)break;i.logIndex=n.int32();continue;case 10:if(a!==82)break;i.name=n.string();continue;case 7:if(a!==58)break;let s=yA.decode(n,n.uint32());s.value!==void 0&&(i.labels[s.key]=s.value);continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{address:E(e.address)?globalThis.String(e.address):"",contractName:E(e.contractName)?globalThis.String(e.contractName):"",blockNumber:E(e.blockNumber)?BigInt(e.blockNumber):BigInt("0"),transactionHash:E(e.transactionHash)?globalThis.String(e.transactionHash):"",chainId:E(e.chainId)?globalThis.String(e.chainId):"",transactionIndex:E(e.transactionIndex)?globalThis.Number(e.transactionIndex):0,logIndex:E(e.logIndex)?globalThis.Number(e.logIndex):0,name:E(e.name)?globalThis.String(e.name):"",labels:Qe(e.labels)?Object.entries(e.labels).reduce((t,[n,r])=>(t[n]=String(r),t),{}):{}}},toJSON(e){let t={};if(e.address!==""&&(t.address=e.address),e.contractName!==""&&(t.contractName=e.contractName),e.blockNumber!==BigInt("0")&&(t.blockNumber=e.blockNumber.toString()),e.transactionHash!==""&&(t.transactionHash=e.transactionHash),e.chainId!==""&&(t.chainId=e.chainId),e.transactionIndex!==0&&(t.transactionIndex=Math.round(e.transactionIndex)),e.logIndex!==0&&(t.logIndex=Math.round(e.logIndex)),e.name!==""&&(t.name=e.name),e.labels){let n=Object.entries(e.labels);n.length>0&&(t.labels={},n.forEach(([r,i])=>{t.labels[r]=i}))}return t},create(e){return pt.fromPartial(e??{})},fromPartial(e){let t=LT();return t.address=e.address??"",t.contractName=e.contractName??"",t.blockNumber=e.blockNumber??BigInt("0"),t.transactionHash=e.transactionHash??"",t.chainId=e.chainId??"",t.transactionIndex=e.transactionIndex??0,t.logIndex=e.logIndex??0,t.name=e.name??"",t.labels=Object.entries(e.labels??{}).reduce((n,[r,i])=>(i!==void 0&&(n[r]=globalThis.String(i)),n),{}),t}};function QT(){return{key:"",value:""}}var yA={encode(e,t=g.default.Writer.create()){return e.key!==""&&t.uint32(10).string(e.key),e.value!==""&&t.uint32(18).string(e.value),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=QT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.key=n.string();continue;case 2:if(a!==18)break;i.value=n.string();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{key:E(e.key)?globalThis.String(e.key):"",value:E(e.value)?globalThis.String(e.value):""}},toJSON(e){let t={};return e.key!==""&&(t.key=e.key),e.value!==""&&(t.value=e.value),t},create(e){return yA.fromPartial(e??{})},fromPartial(e){let t=QT();return t.key=e.key??"",t.value=e.value??"",t}};function UT(){return{bigDecimal:void 0,doubleValue:void 0,bigInteger:void 0}}var Bt={encode(e,t=g.default.Writer.create()){return e.bigDecimal!==void 0&&t.uint32(10).string(e.bigDecimal),e.doubleValue!==void 0&&t.uint32(17).double(e.doubleValue),e.bigInteger!==void 0&&Tt.encode(e.bigInteger,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=UT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.bigDecimal=n.string();continue;case 2:if(a!==17)break;i.doubleValue=n.double();continue;case 3:if(a!==26)break;i.bigInteger=Tt.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{bigDecimal:E(e.bigDecimal)?globalThis.String(e.bigDecimal):void 0,doubleValue:E(e.doubleValue)?globalThis.Number(e.doubleValue):void 0,bigInteger:E(e.bigInteger)?Tt.fromJSON(e.bigInteger):void 0}},toJSON(e){let t={};return e.bigDecimal!==void 0&&(t.bigDecimal=e.bigDecimal),e.doubleValue!==void 0&&(t.doubleValue=e.doubleValue),e.bigInteger!==void 0&&(t.bigInteger=Tt.toJSON(e.bigInteger)),t},create(e){return Bt.fromPartial(e??{})},fromPartial(e){let t=UT();return t.bigDecimal=e.bigDecimal??void 0,t.doubleValue=e.doubleValue??void 0,t.bigInteger=e.bigInteger!==void 0&&e.bigInteger!==null?Tt.fromPartial(e.bigInteger):void 0,t}};function qT(){return{from:0}}var ht={encode(e,t=g.default.Writer.create()){return e.from!==0&&t.uint32(8).int32(e.from),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=qT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==8)break;i.from=n.int32();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{from:E(e.from)?WT(e.from):0}},toJSON(e){let t={};return e.from!==0&&(t.from=HT(e.from)),t},create(e){return ht.fromPartial(e??{})},fromPartial(e){let t=qT();return t.from=e.from??0,t}};function JT(){return{metadata:void 0,metricValue:void 0,runtimeInfo:void 0}}var vc={encode(e,t=g.default.Writer.create()){return e.metadata!==void 0&&pt.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&Bt.encode(e.metricValue,t.uint32(18).fork()).ldelim(),e.runtimeInfo!==void 0&&ht.encode(e.runtimeInfo,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=JT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=pt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.metricValue=Bt.decode(n,n.uint32());continue;case 3:if(a!==26)break;i.runtimeInfo=ht.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?pt.fromJSON(e.metadata):void 0,metricValue:E(e.metricValue)?Bt.fromJSON(e.metricValue):void 0,runtimeInfo:E(e.runtimeInfo)?ht.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=pt.toJSON(e.metadata)),e.metricValue!==void 0&&(t.metricValue=Bt.toJSON(e.metricValue)),e.runtimeInfo!==void 0&&(t.runtimeInfo=ht.toJSON(e.runtimeInfo)),t},create(e){return vc.fromPartial(e??{})},fromPartial(e){let t=JT();return t.metadata=e.metadata!==void 0&&e.metadata!==null?pt.fromPartial(e.metadata):void 0,t.metricValue=e.metricValue!==void 0&&e.metricValue!==null?Bt.fromPartial(e.metricValue):void 0,t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?ht.fromPartial(e.runtimeInfo):void 0,t}};function VT(){return{metadata:void 0,metricValue:void 0,add:!1,runtimeInfo:void 0}}var wc={encode(e,t=g.default.Writer.create()){return e.metadata!==void 0&&pt.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.metricValue!==void 0&&Bt.encode(e.metricValue,t.uint32(18).fork()).ldelim(),e.add!==!1&&t.uint32(24).bool(e.add),e.runtimeInfo!==void 0&&ht.encode(e.runtimeInfo,t.uint32(34).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=VT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=pt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.metricValue=Bt.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.add=n.bool();continue;case 4:if(a!==34)break;i.runtimeInfo=ht.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?pt.fromJSON(e.metadata):void 0,metricValue:E(e.metricValue)?Bt.fromJSON(e.metricValue):void 0,add:E(e.add)?globalThis.Boolean(e.add):!1,runtimeInfo:E(e.runtimeInfo)?ht.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=pt.toJSON(e.metadata)),e.metricValue!==void 0&&(t.metricValue=Bt.toJSON(e.metricValue)),e.add!==!1&&(t.add=e.add),e.runtimeInfo!==void 0&&(t.runtimeInfo=ht.toJSON(e.runtimeInfo)),t},create(e){return wc.fromPartial(e??{})},fromPartial(e){let t=VT();return t.metadata=e.metadata!==void 0&&e.metadata!==null?pt.fromPartial(e.metadata):void 0,t.metricValue=e.metricValue!==void 0&&e.metricValue!==null?Bt.fromPartial(e.metricValue):void 0,t.add=e.add??!1,t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?ht.fromPartial(e.runtimeInfo):void 0,t}};function zT(){return{metadata:void 0,distinctEntityId:"",attributes:void 0,severity:0,message:"",runtimeInfo:void 0,noMetric:!1}}var bc={encode(e,t=g.default.Writer.create()){return e.metadata!==void 0&&pt.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.distinctEntityId!==""&&t.uint32(18).string(e.distinctEntityId),e.attributes!==void 0&&P.encode(P.wrap(e.attributes),t.uint32(50).fork()).ldelim(),e.severity!==0&&t.uint32(56).int32(e.severity),e.message!==""&&t.uint32(66).string(e.message),e.runtimeInfo!==void 0&&ht.encode(e.runtimeInfo,t.uint32(42).fork()).ldelim(),e.noMetric!==!1&&t.uint32(24).bool(e.noMetric),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=zT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=pt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.distinctEntityId=n.string();continue;case 6:if(a!==50)break;i.attributes=P.unwrap(P.decode(n,n.uint32()));continue;case 7:if(a!==56)break;i.severity=n.int32();continue;case 8:if(a!==66)break;i.message=n.string();continue;case 5:if(a!==42)break;i.runtimeInfo=ht.decode(n,n.uint32());continue;case 3:if(a!==24)break;i.noMetric=n.bool();continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?pt.fromJSON(e.metadata):void 0,distinctEntityId:E(e.distinctEntityId)?globalThis.String(e.distinctEntityId):"",attributes:Qe(e.attributes)?e.attributes:void 0,severity:E(e.severity)?Aq(e.severity):0,message:E(e.message)?globalThis.String(e.message):"",runtimeInfo:E(e.runtimeInfo)?ht.fromJSON(e.runtimeInfo):void 0,noMetric:E(e.noMetric)?globalThis.Boolean(e.noMetric):!1}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=pt.toJSON(e.metadata)),e.distinctEntityId!==""&&(t.distinctEntityId=e.distinctEntityId),e.attributes!==void 0&&(t.attributes=e.attributes),e.severity!==0&&(t.severity=yq(e.severity)),e.message!==""&&(t.message=e.message),e.runtimeInfo!==void 0&&(t.runtimeInfo=ht.toJSON(e.runtimeInfo)),e.noMetric!==!1&&(t.noMetric=e.noMetric),t},create(e){return bc.fromPartial(e??{})},fromPartial(e){let t=zT();return t.metadata=e.metadata!==void 0&&e.metadata!==null?pt.fromPartial(e.metadata):void 0,t.distinctEntityId=e.distinctEntityId??"",t.attributes=e.attributes??void 0,t.severity=e.severity??0,t.message=e.message??"",t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?ht.fromPartial(e.runtimeInfo):void 0,t.noMetric=e.noMetric??!1,t}};function GT(){return{metadata:void 0,payload:"",runtimeInfo:void 0}}var Ec={encode(e,t=g.default.Writer.create()){return e.metadata!==void 0&&pt.encode(e.metadata,t.uint32(10).fork()).ldelim(),e.payload!==""&&t.uint32(18).string(e.payload),e.runtimeInfo!==void 0&&ht.encode(e.runtimeInfo,t.uint32(26).fork()).ldelim(),t},decode(e,t){let n=e instanceof g.default.Reader?e:g.default.Reader.create(e),r=t===void 0?n.len:n.pos+t,i=GT();for(;n.pos<r;){let a=n.uint32();switch(a>>>3){case 1:if(a!==10)break;i.metadata=pt.decode(n,n.uint32());continue;case 2:if(a!==18)break;i.payload=n.string();continue;case 3:if(a!==26)break;i.runtimeInfo=ht.decode(n,n.uint32());continue}if((a&7)===4||a===0)break;n.skipType(a&7)}return i},fromJSON(e){return{metadata:E(e.metadata)?pt.fromJSON(e.metadata):void 0,payload:E(e.payload)?globalThis.String(e.payload):"",runtimeInfo:E(e.runtimeInfo)?ht.fromJSON(e.runtimeInfo):void 0}},toJSON(e){let t={};return e.metadata!==void 0&&(t.metadata=pt.toJSON(e.metadata)),e.payload!==""&&(t.payload=e.payload),e.runtimeInfo!==void 0&&(t.runtimeInfo=ht.toJSON(e.runtimeInfo)),t},create(e){return Ec.fromPartial(e??{})},fromPartial(e){let t=GT();return t.metadata=e.metadata!==void 0&&e.metadata!==null?pt.fromPartial(e.metadata):void 0,t.payload=e.payload??"",t.runtimeInfo=e.runtimeInfo!==void 0&&e.runtimeInfo!==null?ht.fromPartial(e.runtimeInfo):void 0,t}},gie={name:"Processor",fullName:"processor.Processor",methods:{start:{name:"Start",requestType:YT,requestStream:!1,responseType:Wu,responseStream:!1,options:{}},stop:{name:"Stop",requestType:Wu,requestStream:!1,responseType:Wu,responseStream:!1,options:{}},getConfig:{name:"GetConfig",requestType:ZT,requestStream:!1,responseType:XT,responseStream:!1,options:{}},processBindings:{name:"ProcessBindings",requestType:$T,requestStream:!1,responseType:KT,responseStream:!1,options:{}},processBindingsStream:{name:"ProcessBindingsStream",requestType:jT,requestStream:!0,responseType:eN,responseStream:!0,options:{}},preprocessBindingsStream:{name:"PreprocessBindingsStream",requestType:tN,requestStream:!0,responseType:nN,responseStream:!0,options:{}}}};function Cn(e){let t=BigInt(Math.trunc(e.getTime()/1e3)),n=e.getTime()%1e3*1e6;return{seconds:t,nanos:n}}function pn(e){let t=(globalThis.Number(e.seconds.toString())||0)*1e3;return t+=(e.nanos||0)/1e6,new globalThis.Date(t)}function In(e){return e instanceof globalThis.Date?e:typeof e=="string"?new globalThis.Date(e):pn(Oe.fromJSON(e))}function Zt(e){return BigInt(e.toString())}g.default.util.Long!==vi&&(g.default.util.Long=vi,g.default.configure());function Qe(e){return typeof e=="object"&&e!==null}function E(e){return e!=null}var rN=":sto_bi",Tq=":sto_bd";function Nq(e){return e.slice(0,128).replace(/[^_a-zA-Z0-9]/g,"_")}function vA(e){return e==="labels"?"labels_":Nq(e)}function Rq(e){return e.length>1024?(console.warn(`${e} is exceed max length for value storage, will be truncate to 1024 characters`),e.slice(0,1024)):e}function wA(e){if(Object.keys(e).length===0)return e;let t={};for(let n in e)e[n]!==void 0?t[vA(n)]=Rq(e[n]):console.warn(`key: ${n} has empty value in attributes`);return t}function iN(e,t,n){let r;switch(typeof e){case"string":return e.slice(0,t);case"bigint":return e.toString()+rN;case"number":return e;case"function":return null;case"symbol":return null}if(Array.isArray(e))return console.warn(`Array type inside log/event payload is not currently supported and will be ignored. Path: ${n??""}`),null;if(e===Object(e)){if(e instanceof Date)return e.toISOString();if(e instanceof Vt)return e.isNaN()||!e.isFinite()?(console.error("can't submit NaN or Infinity value, will store as 0"),0):e.toString()+Tq;if(rr.isBN(e))return e.toString(10)+rN;if(e instanceof Promise)return console.error("Cannot submit promise"),null;r={};for(let[a,s]of Object.entries(e)){let o=iN(s,t,`${n??""}.${a}`);o!=null&&(r[a]=o)}}else r=e;return r}function zd(e){return iN(e,1e3)}import{MapStateStorage as Bq}from"@sentio/runtime";import{ListStateStorage as kq}from"@sentio/runtime";var bA=class extends kq{},ji=bA;nn(ji,"INSTANCE",new bA);var ea=class{static register(t){ji.INSTANCE.addValue(t)}static findEntity(t){for(let n of ji.INSTANCE.getValues())if(n.entities[t])return n.entities[t]}};var EA=class extends Bq{},Cc=EA;nn(Cc,"INSTANCE",new EA);var Gd=class{ctx;constructor(t){this.ctx=t}emit(t,n){oN(t),sN(this.ctx,t,n)}},Lie=Nt;function aN(e){let t=[];for(let[n,r]of Object.entries(e)){let i,a,s;typeof r=="number"?i=r:r.address||r.symbol?a=r:s=$i.create({fields:aN(r)}),t.push({name:n,basicType:i,coinType:a,structType:s})}return t}var Wd=class{eventName;config;constructor(t,n){this.eventName=t,this.config=n}static register(t,n){oN(t);let r=bi.create();n?.fields&&(r=bi.create({name:t,fields:aN(n.fields)}));let i=new Wd(t,r);return Cc.INSTANCE.getOrSetValue(t,i)}emit(t,n){sN(t,this.eventName,n)}};function sN(e,t,n){let{distinctId:r,severity:i,message:a,...s}=n,o={metadata:e.getMetaData(t,{}),severity:i||Rt.INFO,message:a||"",distinctEntityId:r||"",attributes:{...wA(e.baseLabels),...zd(s)},runtimeInfo:void 0,noMetric:!0};e.update({events:[o]})}function oN(e){if(ea.findEntity(e))throw new Error(`Event name ${e} is already used in the database schema`)}function Zd(e){if(typeof e=="number"){if(Number.isNaN(e))throw new Error("Cannot record NaN value");if(!Number.isFinite(e))throw new Error("Cannot record infinite value");return Number.isInteger(e)&&!Number.isSafeInteger(e)?Bt.fromPartial({bigInteger:CA(e)}):Bt.fromPartial({doubleValue:Number(e)})}if(typeof e=="bigint")return Bt.fromPartial({bigInteger:CA(e)});if(typeof e=="string")return Bt.fromPartial({bigDecimal:e});if(e.isInteger())return Bt.fromPartial({bigInteger:cN(e)});if(e.isNaN())throw new Error("Cannot record NaN value");if(!e.isFinite())throw new Error("Cannot record infinite value");return Bt.fromPartial({bigDecimal:e.toString()})}function cN(e){let t=e.isNegative();return t&&(e=e.abs()),uN(e.toString(16),t)}function Hd(e){let t=e<0;return t&&(e=-e),uN(e.toString(16),t)}function CA(e){return typeof e=="number"||typeof e=="bigint"?Hd(e):typeof e=="string"?Hd(BigInt(e)):e instanceof Vt?cN(e):Hd(e)}function uN(e,t){e.length%2===1&&(e="0"+e);let n=Buffer.from(e,"hex");return{negative:t,data:new Uint8Array(n)}}var ta=class{name;constructor(t){this.name=vA(t)}};import{MapStateStorage as Oq}from"@sentio/runtime";var IA=class{unit;description;sparse;aggregationConfig};var Xd=class extends ta{config;constructor(t,n,r){super(n),this.config=Hr.fromPartial({...r,name:this.name,type:t});let i=this.config.aggregationConfig;i&&i.intervalInMinutes.length&&(i.intervalInMinutes.length>1&&console.error("current only support one intervalInMinutes, only first interval will be used for",n),i.intervalInMinutes[0]>0&&i.types.length===0&&(i.types=[bt.SUM,bt.COUNT]))}},SA=class extends Oq{getOrRegisterMetric(t,n,r){let i=this.getOrRegister(),a=i.get(n);if(a&&a.config.type!==t)throw Error(`redefine ${n} of metric type ${t} that is previously ${a.config.type}`);return a||(t===kt.COUNTER?a=Ka._create(n,r):a=ja._create(n,r)),i.set(n,a),a}},$a=SA;nn($a,"INSTANCE",new SA);var Ka=class extends Xd{static register(t,n){return $a.INSTANCE.getOrRegisterMetric(kt.COUNTER,t,n)}static _create(t,n){return new Ka(t,n)}constructor(t,n){super(kt.COUNTER,t,Hr.fromPartial({...n,aggregationConfig:{intervalInMinutes:n?.resolutionConfig?[n?.resolutionConfig?.intervalInMinutes]:[]}}))}add(t,n,r={}){this.record(t,n,r,!0)}sub(t,n,r={}){this.record(t,n,r,!1)}record(t,n,r,i){t.update({counters:[{metadata:t.getMetaData(this.name,r),metricValue:Zd(n),add:i,runtimeInfo:void 0}]})}},Yd=class{ctx;counter;constructor(t,n){this.counter=Ka._create(t),this.ctx=n}add(t,n={}){this.counter.add(this.ctx,t,n)}sub(t,n={}){this.counter.sub(this.ctx,t,n)}},ja=class extends Xd{static register(t,n){return $a.INSTANCE.getOrRegisterMetric(kt.GAUGE,t,n)}static _create(t,n){return new ja(t,n)}constructor(t,n){super(kt.GAUGE,t,Hr.fromPartial({...n}))}record(t,n,r={}){t.update({gauges:[{metadata:t.getMetaData(this.config.name,r),metricValue:Zd(n),runtimeInfo:void 0}]})}},$d=class{gauge;ctx;constructor(t,n){this.gauge=ja._create(t),this.ctx=n}record(t,n={}){this.gauge.record(this.ctx,t,n)}},Hu=class{ctx;constructor(t){this.ctx=t}Counter(t){return new Yd(t,this.ctx)}Gauge(t){return new $d(t,this.ctx)}};var bu=Bn(g1(),1);import{mergeProcessResults as rZ,PluginManager as iZ}from"@sentio/runtime";import{PluginManager as tZ}from"@sentio/runtime";var uh=class{cache=new Map;getKey(t,n){return`${t}-${n}`}has(t,n){return this.cache.has(this.getKey(t,n))}get(t,n){return this.cache.get(this.getKey(t,n))}set(t){let n=t.data?.fields.id.stringValue;if(n){let r=this.getKey(t.entity,n),i=t.data?.fields||{};if(this.cache.has(r)){let a=this.cache.get(r)?.data?.fields||{};i=Object.assign(a,i)}this.cache.set(r,{...t,data:{fields:i}})}}delete(t,n){n&&this.cache.delete(this.getKey(t,n))}};var _1=new Error("Value is required but received null or undefined");function dce(e){let{from:t,to:n,...r}=e;return{from:i=>{if(i==null)throw _1;return t(i)},to:i=>{if(i==null||i.nullValue)throw _1;return n(i)},...r,required:!0}}function fce(e){return{from:t=>({listValue:{values:t.map(e.from)}}),to:t=>t.listValue?.values.map(e.to)||[],isArray:!0,isRelation:e.isRelation,relationName:e.relationName}}function pce(e){return{from:t=>t==null?{nullValue:wt.NULL_VALUE}:{stringValue:e[t]},to(t){return t.stringValue}}}function hce(e){return{from:t=>typeof t=="string"?{stringValue:t}:t instanceof Uint8Array?{stringValue:`0x${Buffer.from(t).toString("hex")}`}:typeof t=="object"?{stringValue:t.id.toString()}:{nullValue:wt.NULL_VALUE},to(t){return t.stringValue},isRelation:!0,relationName:e}}var W9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{stringValue:e},to(e){return e.stringValue}},H9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{intValue:Math.floor(e)},to(e){return e.intValue}},Z9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{floatValue:e},to(e){return e.floatValue}},X9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{boolValue:e},to(e){return e.boolValue}},Y9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{timestampValue:e},to(e){return e.timestampValue}},A1={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{bytesValue:e},to(e){return e.bytesValue}},$9={from(e){return typeof e=="string"?{stringValue:e}:e instanceof Uint8Array?{stringValue:`0x${Buffer.from(e).toString("hex")}`}:{nullValue:wt.NULL_VALUE}},to(e){if(e.stringValue)return e.stringValue;if(e.bytesValue)return`0x${Buffer.from(e.bytesValue).toString("hex")}`}},K9={from:e=>{if(e==null)return{nullValue:wt.NULL_VALUE};let t=(e.c||[]).map((r,i)=>i==0?r.toString():r.toString().padStart(14,"0")).join(""),n=-(t.length-(e.e??0)-1);return{bigdecimalValue:{value:lh(BigInt(t)*BigInt(e.s??1)),exp:n}}},to(e){let t=e.bigdecimalValue;if(t){let n=y1(t.value.data),r=new Vt(n.toString());return t.exp<0?r=r.dividedBy(new Vt(10).pow(-t.exp)):r=r.multipliedBy(new Vt(10).pow(t.exp)),r.multipliedBy(t.value?.negative?-1:1)}}},j9={from:e=>e==null?{nullValue:wt.NULL_VALUE}:{bigintValue:lh(e)},to(e){if(e.bigintValue){let t=y1(e.bigintValue?.data);return e.bigintValue.negative&&(t=-t),t}}};function y1(e){let t=BigInt(0);for(let n=0;n<e.length;n++)t=t*BigInt(256)+BigInt(e[n]);return t}function lh(e){let t=e<0;t&&(e=-e);let n=e.toString(16);n.length%2===1&&(n="0"+n);let r=Buffer.from(n,"hex");return{negative:t,data:new Uint8Array(r)}}var mce={BigDecimal:K9,BigInt:j9,String:W9,Boolean:X9,Uint8Array:A1,ID:$9,Bytes:A1,Int:H9,Float:Z9,Timestamp:Y9};function dh(e){return e==null?{nullValue:0}:typeof e=="boolean"?{boolValue:e}:typeof e=="string"?{stringValue:e}:typeof e=="number"?{floatValue:e}:typeof e=="bigint"?{bigintValue:lh(e)}:e instanceof Vt?eZ(e):e instanceof Date?{timestampValue:e}:e instanceof Uint8Array?{bytesValue:e}:Array.isArray(e)?{listValue:{values:e.map(t=>dh(t))}}:{nullValue:0}}function eZ(e){return{bigdecimalValue:void 0}}function fh(e){if(e==null)throw new Error("can't figure out entityName from undefined");if(typeof e=="string")return e;if(typeof e=="function")return e.entityName;if(typeof e=="object")return e.constructor.entityName;throw new Error(`can't figure out entityName from ${typeof e}`)}var Ql=class{constructor(t){this.context=t}cache=new uh;async get(t,n){let r=fh(t),i=this.cache.get(r,n);if(i)return Promise.resolve(this.newEntity(t,i));let s=await this.context.sendRequest({get:{entity:r,id:n.toString()}});if(s.entityList?.entities[0]){let o=s.entityList?.entities[0];return this.newEntity(t,o)}}async delete(t,n){let r={entity:[],id:[]},i=fh(t);if(n)if(Array.isArray(n))for(let a of n)r.entity.push(i),r.id.push(a.toString()),this.cache.delete(i,a.toString());else r.entity.push(i),r.id.push(n),this.cache.delete(i,n);else{let a=Array.isArray(t)?t:[t];for(let s of a)r.entity.push(i),r.id.push(s.id.toString()),this.cache.delete(i,n)}await this.context.sendRequest({delete:r})}async upsert(t){let n=Array.isArray(t)?t:[t],r={upsert:{entity:n.map(a=>fh(a)),id:n.map(a=>a.id.toString()),entityData:n.map(a=>a._data)}};return this.context.sendRequest(r).then(a=>{r.upsert?.entity.forEach((s,o)=>{this.cache.set({entity:s,data:r.upsert?.entityData[o],genBlockChain:"",genBlockTime:void 0,genBlockNumber:0n})})})}async*listIterator(t,n){let r;for(;;){let i=await this.listRequest(t,n||[],r);for(let a of i.entityList?.entities||[])yield this.newEntity(t,a);if(!i.nextCursor)break;r=i.nextCursor}}async*listBatched(t,n,r=100){let i;for(;;){let a=await this.listRequest(t,n||[],i,r);if(yield(a.entityList?.entities||[]).map(o=>this.newEntity(t,o)),!a.nextCursor)break;i=a.nextCursor}}async listRequest(t,n,r,i){let a=await this.context.sendRequest({list:{entity:fh(t),cursor:r,pageSize:i,filters:n?.map(s=>({field:s.field,op:nZ[s.op],value:{values:Array.isArray(s.value)?s.value.map(o=>dh(o)):[dh(s.value)]}}))||[]}},3600);return a.entityList?.entities?.forEach(s=>{this.cache.set(s)}),a}async list(t,n,r){if(r){let i=await this.listRequest(t,n||[],r.cursor,r.pageSize);return r.cursor=i.nextCursor,i.entityList?.entities.map(a=>this.newEntity(t,a))||[]}return this.fromAsync(this.listIterator(t,n??[]))}async fromAsync(t){let n=[];for await(let r of t)n.push(r);return n}newEntity(t,n){if(typeof t=="string"){let i=ea.findEntity(t);if(!i&&(i=ea.findEntity(n.entity),!i))throw new Error(`Entity ${t} not found`);t=i}let r=new t({});return r._data=n.data,r}},nZ={"=":we.EQ,"!=":we.NE,"<":we.LT,"<=":we.LE,">":we.GT,">=":we.GE,in:we.IN,"not in":we.NOT_IN,like:we.LIKE,"not like":we.NOT_LIKE,"has all":we.HAS_ALL,"has any":we.HAS_ANY};function Sce(){let e=tZ.INSTANCE.dbContextLocalStorage.getStore();if(e)return new Ql(e)}var qw=class{meter;eventLogger;_store;baseLabels;active;_res={counters:[],events:[],exports:[],gauges:[],states:{configUpdated:!1}};update(t){if(this.active)this._res=rZ([this._res,En.fromPartial(t)]);else throw new bu.ServerError(bu.Status.INTERNAL,"context not active, possible async function invoke without await")}constructor(t){this.meter=new Hu(this),this.eventLogger=new Gd(this),this.baseLabels=t||{},this.active=!0,this.initStore()}stopAndGetResult(){if(this.active)return this.active=!1,this._res;throw new bu.ServerError(bu.Status.INTERNAL,"Can't get result from same context twice")}metadataCache=new Map;getMetaData(t,n){if(Object.keys(n).length===0){let r=this.metadataCache.get(t);return r||(r={...this.baseLabels,...this.getMetaDataInternal(t,n)},this.metadataCache.set(t,r)),r}return{...this.baseLabels,...this.getMetaDataInternal(t,n)}}get store(){return this._store==null&&console.warn("Store is not set, please initialize the processor with your database schema first."),this._store}initStore(){let t=iZ.INSTANCE.dbContextLocalStorage.getStore();t&&(this._store=new Ql(t))}};import{MapStateStorage as aZ}from"@sentio/runtime";var Jw=class extends aZ{},Eu=Jw;nn(Eu,"INSTANCE",new Jw);var Ul=class extends ta{static register(t,n){let r=new Ul(t,n);return Eu.INSTANCE.getOrSetValue(t,r)}channel;constructor(t,n){super(t),this.channel=n}emit(t,n){let r={metadata:t.getMetaData(this.name,{}),payload:JSON.stringify(n),runtimeInfo:void 0};t.update({exports:[r]})}};import{MapStateStorage as sZ}from"@sentio/runtime";var zw=class extends sZ{},As=zw;nn(As,"INSTANCE",new zw);var hh=class extends ta{static register(t,n){let r=new hh(t,{...hh.DEFAULT_OPTIONS,...n});return As.INSTANCE.getOrSetValue(t,r)}options;constructor(t,n){super(t),this.options=n}trackEvent(t,n){let{distinctId:r,message:i,severity:a,...s}=n,o={message:i||"",severity:a||Rt.INFO,metadata:t.getMetaData(this.name,{}),distinctEntityId:r||"",attributes:zd(s),runtimeInfo:void 0,noMetric:!1};t.update({events:[o]})}},ph=hh;nn(ph,"DEFAULT_OPTIONS",{totalByDay:!0,unique:!0});var mh=class extends ph{static register(t,n){t?t=["user",t].join("_"):t="user";let r=new mh(t,{...mh.DEFAULT_OPTIONS,...n});return As.INSTANCE.getOrSetValue(t,r)}},Vw=mh;nn(Vw,"DEFAULT_OPTIONS",{totalByDay:!0,unique:!0,distinctByDays:[1,7,30]});import{Plugin as cZ,PluginManager as uZ}from"@sentio/runtime";import{ListStateStorage as oZ}from"@sentio/runtime";var Gw=class extends oZ{},ql=Gw;nn(ql,"INSTANCE",new Gw);var gh=class extends cZ{name="CorePlugin";async configure(t){t.templateInstances=[...ql.INSTANCE.getValues()];for(let n of $a.INSTANCE.getValues())t.metricConfigs.push({...n.config});for(let n of Cc.INSTANCE.getValues())t.eventLogConfigs.push({...n.config});for(let n of As.INSTANCE.getValues())t.eventTrackingConfigs.push({distinctAggregationByDays:n.options.distinctByDays||[],eventName:n.name,retentionConfig:void 0,totalByDay:n.options.totalByDay||!1,totalPerEntity:void 0,unique:n.options.unique||!1});for(let n of Eu.INSTANCE.getValues())t.exportConfigs.push({name:n.name,channel:n.channel});ji.INSTANCE.getValues().length>0&&(t.dbSchema={gqlSchema:ji.INSTANCE.getValues().map(n=>n.source).join(`
936
+
937
+ `)})}};uZ.INSTANCE.register(new gh);export{vi as a,so as b,Wu as c,Xa as d,nq as e,rq as f,P as g,mA as h,wi as i,Wr as j,Oe as k,wt as l,Xi as m,me as n,rt as o,Yi as p,Tt as q,kt as r,lq as s,dq as t,bt as u,fq as v,pq as w,Zr as x,hq as y,mq as z,Xr as A,gq as B,_q as C,be as D,WT as E,HT as F,Rt as G,Aq as H,yq as I,Ki as J,hie as K,mie as L,Nt as M,vq as N,wq as O,we as P,bq as Q,Eq as R,lo as S,fo as T,ZT as U,XT as V,po as W,ho as X,mo as Y,go as Z,_o as _,Ao as $,Hr as aa,bi as ba,$i as ca,hr as da,yo as ea,vo as fa,pr as ga,dt as ha,Cq as ia,wo as ja,mr as ka,gr as la,YT as ma,Iq as na,ft as oa,bo as pa,Eo as qa,_r as ra,Co as sa,Io as ta,So as ua,xo as va,To as wa,No as xa,Ro as ya,Ar as za,ko as Aa,Bo as Ba,Oo as Ca,yr as Da,Po as Ea,Do as Fa,Mo as Ga,Fo as Ha,Lo as Ia,vr as Ja,Ei as Ka,Wt as La,_A as Ma,wr as Na,Qo as Oa,Uo as Pa,qo as Qa,Jo as Ra,Vo as Sa,zo as Ta,$T as Ua,KT as Va,jT as Wa,eN as Xa,tN as Ya,Go as Za,nN as _a,br as $a,Wo as ab,Ho as bb,Er as cb,Zo as db,Xo as eb,Yo as fb,$o as gb,Ko as hb,jo as ib,ec as jb,tc as kb,nc as lb,rc as mb,ic as nb,ac as ob,sc as pb,oc as qb,cc as rb,uc as sb,lc as tb,dc as ub,fc as vb,pc as wb,hc as xb,mc as yb,gc as zb,Ht as Ab,_c as Bb,En as Cb,Ac as Db,yc as Eb,Sq as Fb,xq as Gb,AA as Hb,pt as Ib,yA as Jb,Bt as Kb,ht as Lb,vc as Mb,wc as Nb,bc as Ob,Ec as Pb,gie as Qb,$ as Rb,Dn as Sb,ye as Tb,ve as Ub,le as Vb,An as Wb,Da as Xb,sd as Yb,od as Zb,yn as _b,Bs as $b,Qi as ac,Os as bc,sE as cc,ku as dc,Lt as ec,vn as fc,eK as gc,U0 as hc,bd as ic,V0 as jc,f_ as kc,z0 as lc,mi as mc,j0 as nc,$s as oc,DU as pc,S_ as qc,Nd as rc,Q6 as sc,H_ as tc,wA as uc,ea as vc,Cc as wc,Gd as xc,Lie as yc,aN as zc,Wd as Ac,Zd as Bc,CA as Cc,IA as Dc,Ka as Ec,Yd as Fc,ja as Gc,$d as Hc,Hu as Ic,qn as Jc,Ta as Kc,Na as Lc,g1 as Mc,_1 as Nc,dce as Oc,fce as Pc,pce as Qc,hce as Rc,W9 as Sc,H9 as Tc,Z9 as Uc,X9 as Vc,Y9 as Wc,A1 as Xc,$9 as Yc,K9 as Zc,j9 as _c,y1 as $c,lh as ad,mce as bd,dh as cd,fh as dd,Ql as ed,Sce as fd,qw as gd,Ul as hd,As as id,ph as jd,Vw as kd,ql as ld,gh as md};
938
+ /*! Bundled license information:
939
+
940
+ @noble/curves/esm/abstract/utils.js:
941
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
942
+
943
+ mime-db/index.js:
944
+ (*!
945
+ * mime-db
946
+ * Copyright(c) 2014 Jonathan Ong
947
+ * Copyright(c) 2015-2022 Douglas Christopher Wilson
948
+ * MIT Licensed
949
+ *)
950
+
951
+ mime-types/index.js:
952
+ (*!
953
+ * mime-types
954
+ * Copyright(c) 2014 Jonathan Ong
955
+ * Copyright(c) 2015 Douglas Christopher Wilson
956
+ * MIT Licensed
957
+ *)
958
+
959
+ @noble/curves/esm/abstract/modular.js:
960
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
961
+
962
+ @noble/curves/esm/abstract/curve.js:
963
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
964
+
965
+ @noble/curves/esm/abstract/weierstrass.js:
966
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
967
+
968
+ @noble/curves/esm/_shortw_utils.js:
969
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
970
+
971
+ @noble/curves/esm/secp256k1.js:
972
+ (*! noble-curves - MIT License (c) 2022 Paul Miller (paulmillr.com) *)
973
+
974
+ @grpc/proto-loader/build/src/util.js:
975
+ (**
976
+ * @license
977
+ * Copyright 2018 gRPC authors.
978
+ *
979
+ * Licensed under the Apache License, Version 2.0 (the "License");
980
+ * you may not use this file except in compliance with the License.
981
+ * You may obtain a copy of the License at
982
+ *
983
+ * http://www.apache.org/licenses/LICENSE-2.0
984
+ *
985
+ * Unless required by applicable law or agreed to in writing, software
986
+ * distributed under the License is distributed on an "AS IS" BASIS,
987
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
988
+ * See the License for the specific language governing permissions and
989
+ * limitations under the License.
990
+ *
991
+ *)
992
+
993
+ long/umd/index.js:
994
+ (**
995
+ * @license
996
+ * Copyright 2009 The Closure Library Authors
997
+ * Copyright 2020 Daniel Wirtz / The long.js Authors.
998
+ *
999
+ * Licensed under the Apache License, Version 2.0 (the "License");
1000
+ * you may not use this file except in compliance with the License.
1001
+ * You may obtain a copy of the License at
1002
+ *
1003
+ * http://www.apache.org/licenses/LICENSE-2.0
1004
+ *
1005
+ * Unless required by applicable law or agreed to in writing, software
1006
+ * distributed under the License is distributed on an "AS IS" BASIS,
1007
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1008
+ * See the License for the specific language governing permissions and
1009
+ * limitations under the License.
1010
+ *
1011
+ * SPDX-License-Identifier: Apache-2.0
1012
+ *)
1013
+
1014
+ @grpc/proto-loader/build/src/index.js:
1015
+ (**
1016
+ * @license
1017
+ * Copyright 2018 gRPC authors.
1018
+ *
1019
+ * Licensed under the Apache License, Version 2.0 (the "License");
1020
+ * you may not use this file except in compliance with the License.
1021
+ * You may obtain a copy of the License at
1022
+ *
1023
+ * http://www.apache.org/licenses/LICENSE-2.0
1024
+ *
1025
+ * Unless required by applicable law or agreed to in writing, software
1026
+ * distributed under the License is distributed on an "AS IS" BASIS,
1027
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1028
+ * See the License for the specific language governing permissions and
1029
+ * limitations under the License.
1030
+ *
1031
+ *)
1032
+
1033
+ long/index.js:
1034
+ (**
1035
+ * @license
1036
+ * Copyright 2009 The Closure Library Authors
1037
+ * Copyright 2020 Daniel Wirtz / The long.js Authors.
1038
+ *
1039
+ * Licensed under the Apache License, Version 2.0 (the "License");
1040
+ * you may not use this file except in compliance with the License.
1041
+ * You may obtain a copy of the License at
1042
+ *
1043
+ * http://www.apache.org/licenses/LICENSE-2.0
1044
+ *
1045
+ * Unless required by applicable law or agreed to in writing, software
1046
+ * distributed under the License is distributed on an "AS IS" BASIS,
1047
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1048
+ * See the License for the specific language governing permissions and
1049
+ * limitations under the License.
1050
+ *
1051
+ * SPDX-License-Identifier: Apache-2.0
1052
+ *)
1053
+ */
1054
+ //# sourceMappingURL=chunk-4XDWWAOR.js.map