shogun-core 1.5.6 → 1.5.7

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 (82) hide show
  1. package/dist/browser/shogun-core.js +3 -0
  2. package/dist/browser/shogun-core.js.LICENSE.txt +22 -0
  3. package/dist/browser/shogun-core.js.map +1 -0
  4. package/dist/gundb/crypto.js +199 -0
  5. package/dist/gundb/derive.js +173 -0
  6. package/dist/gundb/errors.js +76 -0
  7. package/dist/gundb/gun-put-headers.js +87 -0
  8. package/dist/gundb/gunInstance.js +1453 -0
  9. package/dist/gundb/index.js +18 -0
  10. package/dist/gundb/rxjs-integration.js +276 -0
  11. package/dist/index.js +584 -0
  12. package/dist/plugins/base.js +44 -0
  13. package/dist/plugins/index.js +41 -0
  14. package/dist/plugins/nostr/index.js +20 -0
  15. package/dist/plugins/nostr/nostrConnector.js +406 -0
  16. package/dist/plugins/nostr/nostrConnectorPlugin.js +426 -0
  17. package/dist/plugins/nostr/nostrSigner.js +328 -0
  18. package/dist/plugins/nostr/types.js +2 -0
  19. package/dist/plugins/oauth/index.js +8 -0
  20. package/dist/plugins/oauth/oauthConnector.js +574 -0
  21. package/dist/plugins/oauth/oauthPlugin.js +315 -0
  22. package/dist/plugins/oauth/types.js +2 -0
  23. package/dist/plugins/web3/index.js +20 -0
  24. package/dist/plugins/web3/types.js +2 -0
  25. package/dist/plugins/web3/web3Connector.js +577 -0
  26. package/dist/plugins/web3/web3ConnectorPlugin.js +357 -0
  27. package/dist/plugins/web3/web3Signer.js +268 -0
  28. package/dist/plugins/webauthn/index.js +19 -0
  29. package/dist/plugins/webauthn/types.js +14 -0
  30. package/dist/plugins/webauthn/webauthn.js +484 -0
  31. package/dist/plugins/webauthn/webauthnPlugin.js +324 -0
  32. package/dist/plugins/webauthn/webauthnSigner.js +318 -0
  33. package/dist/storage/storage.js +148 -0
  34. package/dist/types/common.js +2 -0
  35. package/dist/types/events.js +40 -0
  36. package/dist/types/gundb/crypto.d.ts +99 -0
  37. package/dist/types/gundb/derive.d.ts +21 -0
  38. package/dist/types/gundb/errors.d.ts +42 -0
  39. package/dist/types/gundb/gun-put-headers.d.ts +15 -0
  40. package/dist/types/gundb/gunInstance.d.ts +333 -0
  41. package/dist/types/gundb/index.d.ts +1 -0
  42. package/dist/types/gundb/rxjs-integration.d.ts +90 -0
  43. package/dist/types/index.d.ts +215 -0
  44. package/dist/types/plugin.js +2 -0
  45. package/dist/types/plugins/base.d.ts +37 -0
  46. package/dist/types/plugins/index.d.ts +14 -0
  47. package/dist/types/plugins/nostr/index.d.ts +4 -0
  48. package/dist/types/plugins/nostr/nostrConnector.d.ts +119 -0
  49. package/dist/types/plugins/nostr/nostrConnectorPlugin.d.ts +169 -0
  50. package/dist/types/plugins/nostr/nostrSigner.d.ts +104 -0
  51. package/dist/types/plugins/nostr/types.d.ts +122 -0
  52. package/dist/types/plugins/oauth/index.d.ts +3 -0
  53. package/dist/types/plugins/oauth/oauthConnector.d.ts +99 -0
  54. package/dist/types/plugins/oauth/oauthPlugin.d.ts +90 -0
  55. package/dist/types/plugins/oauth/types.d.ts +111 -0
  56. package/dist/types/plugins/web3/index.d.ts +4 -0
  57. package/dist/types/plugins/web3/types.d.ts +107 -0
  58. package/dist/types/plugins/web3/web3Connector.d.ts +134 -0
  59. package/dist/types/plugins/web3/web3ConnectorPlugin.d.ts +161 -0
  60. package/dist/types/plugins/web3/web3Signer.d.ts +93 -0
  61. package/dist/types/plugins/webauthn/index.d.ts +3 -0
  62. package/dist/types/plugins/webauthn/types.d.ts +162 -0
  63. package/dist/types/plugins/webauthn/webauthn.d.ts +129 -0
  64. package/dist/types/plugins/webauthn/webauthnPlugin.d.ts +155 -0
  65. package/dist/types/plugins/webauthn/webauthnSigner.d.ts +90 -0
  66. package/dist/types/shogun.js +33 -0
  67. package/dist/types/storage/storage.d.ts +50 -0
  68. package/dist/types/types/common.d.ts +85 -0
  69. package/dist/types/types/events.d.ts +110 -0
  70. package/dist/types/types/plugin.d.ts +58 -0
  71. package/dist/types/types/shogun.d.ts +152 -0
  72. package/dist/types/utils/errorHandler.d.ts +121 -0
  73. package/dist/types/utils/eventEmitter.d.ts +36 -0
  74. package/dist/types/utils/logger.d.ts +46 -0
  75. package/dist/types/utils/utility.d.ts +17 -0
  76. package/dist/types/utils/validation.d.ts +27 -0
  77. package/dist/utils/errorHandler.js +229 -0
  78. package/dist/utils/eventEmitter.js +82 -0
  79. package/dist/utils/logger.js +105 -0
  80. package/dist/utils/utility.js +39 -0
  81. package/dist/utils/validation.js +72 -0
  82. package/package.json +1 -1
@@ -0,0 +1,3 @@
1
+ /*! For license information please see shogun-core.js.LICENSE.txt */
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.ShogunCore=t():e.ShogunCore=t()}(this,(()=>(()=>{var __webpack_modules__={20:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(47108),o=r(46737),s=r(56698),a=r(35359),u=r(74847),c=r(62951);function l(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hashType=t.hash,this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function f(e){o.Writable.call(this);var t=c[e];if(!t)throw new Error("Unknown message digest");this._hash=i(t.hash),this._tag=t.id,this._signType=t.sign}function h(e){return new l(e)}function d(e){return new f(e)}Object.keys(c).forEach((function(e){c[e].id=n.from(c[e].id,"hex"),c[e.toLowerCase()]=c[e]})),s(l,o.Writable),l.prototype._write=function(e,t,r){this._hash.update(e),r()},l.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},l.prototype.sign=function(e,t){this.end();var r=this._hash.digest(),n=a(r,e,this._hashType,this._signType,this._tag);return t?n.toString(t):n},s(f,o.Writable),f.prototype._write=function(e,t,r){this._hash.update(e),r()},f.prototype.update=function(e,t){return this._hash.update("string"==typeof e?n.from(e,t):e),this},f.prototype.verify=function(e,t,r){var i="string"==typeof t?n.from(t,r):t;this.end();var o=this._hash.digest();return u(i,o,e,this._signType,this._tag)},e.exports={Sign:h,Verify:d,createSign:h,createVerify:d}},189:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StructFragment=t.FunctionFragment=t.FallbackFragment=t.ConstructorFragment=t.EventFragment=t.ErrorFragment=t.NamedFragment=t.Fragment=t.ParamType=void 0;const n=r(75347),i=r(23562);function o(e){const t=new Set;return e.forEach((e=>t.add(e))),Object.freeze(t)}const s=o("external public payable override".split(" ")),a="constant external internal payable private public pure view override",u=o(a.split(" ")),c="constructor error event fallback function receive struct",l=o(c.split(" ")),f="calldata memory storage payable indexed",h=o(f.split(" ")),d=o([c,f,"tuple returns",a].join(" ").split(" ")),p={"(":"OPEN_PAREN",")":"CLOSE_PAREN","[":"OPEN_BRACKET","]":"CLOSE_BRACKET",",":"COMMA","@":"AT"},g=new RegExp("^(\\s*)"),b=new RegExp("^([0-9]+)"),y=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)"),m=new RegExp("^([a-zA-Z$_][a-zA-Z0-9$_]*)$"),v=new RegExp("^(address|bool|bytes([0-9]*)|string|u?int([0-9]*))$");class w{#e;#t;get offset(){return this.#e}get length(){return this.#t.length-this.#e}constructor(e){this.#e=0,this.#t=e.slice()}clone(){return new w(this.#t)}reset(){this.#e=0}#r(e=0,t=0){return new w(this.#t.slice(e,t).map((t=>Object.freeze(Object.assign({},t,{match:t.match-e,linkBack:t.linkBack-e,linkNext:t.linkNext-e})))))}popKeyword(e){const t=this.peek();if("KEYWORD"!==t.type||!e.has(t.text))throw new Error(`expected keyword ${t.text}`);return this.pop().text}popType(e){if(this.peek().type!==e){const t=this.peek();throw new Error(`expected ${e}; got ${t.type} ${JSON.stringify(t.text)}`)}return this.pop().text}popParen(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=this.#r(this.#e+1,e.match+1);return this.#e=e.match+1,t}popParams(){const e=this.peek();if("OPEN_PAREN"!==e.type)throw new Error("bad start");const t=[];for(;this.#e<e.match-1;){const e=this.peek().linkNext;t.push(this.#r(this.#e+1,e)),this.#e=e}return this.#e=e.match+1,t}peek(){if(this.#e>=this.#t.length)throw new Error("out-of-bounds");return this.#t[this.#e]}peekKeyword(e){const t=this.peekType("KEYWORD");return null!=t&&e.has(t)?t:null}peekType(e){if(0===this.length)return null;const t=this.peek();return t.type===e?t.text:null}pop(){const e=this.peek();return this.#e++,e}toString(){const e=[];for(let t=this.#e;t<this.#t.length;t++){const r=this.#t[t];e.push(`${r.type}:${r.text}`)}return`<TokenString ${e.join(" ")}>`}}function E(e){const t=[],r=t=>{const r=s<e.length?JSON.stringify(e[s]):"$EOI";throw new Error(`invalid token ${r} at ${s}: ${t}`)};let i=[],o=[],s=0;for(;s<e.length;){let a=e.substring(s),u=a.match(g);u&&(s+=u[1].length,a=e.substring(s));const c={depth:i.length,linkBack:-1,linkNext:-1,match:-1,type:"",text:"",offset:s,value:-1};t.push(c);let l=p[a[0]]||"";if(l){if(c.type=l,c.text=a[0],s++,"OPEN_PAREN"===l)i.push(t.length-1),o.push(t.length-1);else if("CLOSE_PAREN"==l)0===i.length&&r("no matching open bracket"),c.match=i.pop(),t[c.match].match=t.length-1,c.depth--,c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1;else if("COMMA"===l)c.linkBack=o.pop(),t[c.linkBack].linkNext=t.length-1,o.push(t.length-1);else if("OPEN_BRACKET"===l)c.type="BRACKET";else if("CLOSE_BRACKET"===l){let e=t.pop().text;if(t.length>0&&"NUMBER"===t[t.length-1].type){const r=t.pop().text;e=r+e,t[t.length-1].value=(0,n.getNumber)(r)}if(0===t.length||"BRACKET"!==t[t.length-1].type)throw new Error("missing opening bracket");t[t.length-1].text+=e}}else if(u=a.match(y),u){if(c.text=u[1],s+=c.text.length,d.has(c.text)){c.type="KEYWORD";continue}if(c.text.match(v)){c.type="TYPE";continue}c.type="ID"}else{if(u=a.match(b),!u)throw new Error(`unexpected token ${JSON.stringify(a[0])} at position ${s}`);c.text=u[1],c.type="NUMBER",s+=c.text.length}}return new w(t.map((e=>Object.freeze(e))))}function A(e,t){let r=[];for(const n in t.keys())e.has(n)&&r.push(n);if(r.length>1)throw new Error(`conflicting types: ${r.join(", ")}`)}function _(e,t){if(t.peekKeyword(l)){const r=t.pop().text;if(r!==e)throw new Error(`expected ${e}, got ${r}`)}return t.popType("ID")}function S(e,t){const r=new Set;for(;;){const n=e.peekType("KEYWORD");if(null==n||t&&!t.has(n))break;if(e.pop(),r.has(n))throw new Error(`duplicate keywords: ${JSON.stringify(n)}`);r.add(n)}return Object.freeze(r)}function P(e){let t=S(e,u);return A(t,o("constant payable nonpayable".split(" "))),A(t,o("pure view payable nonpayable".split(" "))),t.has("view")?"view":t.has("pure")?"pure":t.has("payable")?"payable":t.has("nonpayable")?"nonpayable":t.has("constant")?"view":"nonpayable"}function k(e,t){return e.popParams().map((e=>F.from(e,t)))}function O(e){if(e.peekType("AT")){if(e.pop(),e.peekType("NUMBER"))return(0,n.getBigInt)(e.pop().text);throw new Error("invalid gas")}return null}function x(e){if(e.length)throw new Error(`unexpected tokens at offset ${e.offset}: ${e.toString()}`)}const M=new RegExp(/^(.*)\[([0-9]*)\]$/);function B(e){const t=e.match(v);if((0,n.assertArgument)(t,"invalid type","type",e),"uint"===e)return"uint256";if("int"===e)return"int256";if(t[2]){const r=parseInt(t[2]);(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","type",e)}else if(t[3]){const r=parseInt(t[3]);(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid numeric width","type",e)}return e}const T={},I=Symbol.for("_ethers_internal"),C="_ParamTypeInternal",R="_ErrorInternal",N="_EventInternal",j="_ConstructorInternal",U="_FallbackInternal",L="_FunctionInternal",D="_StructInternal";class F{name;type;baseType;indexed;components;arrayLength;arrayChildren;constructor(e,t,r,i,o,s,a,u){if((0,n.assertPrivate)(e,T,"ParamType"),Object.defineProperty(this,I,{value:C}),s&&(s=Object.freeze(s.slice())),"array"===i){if(null==a||null==u)throw new Error("")}else if(null!=a||null!=u)throw new Error("");if("tuple"===i){if(null==s)throw new Error("")}else if(null!=s)throw new Error("");(0,n.defineProperties)(this,{name:t,type:r,baseType:i,indexed:o,components:s,arrayLength:a,arrayChildren:u})}format(e){if(null==e&&(e="sighash"),"json"===e){const t=this.name||"";if(this.isArray()){const e=JSON.parse(this.arrayChildren.format("json"));return e.name=t,e.type+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`,JSON.stringify(e)}const r={type:"tuple"===this.baseType?"tuple":this.type,name:t};return"boolean"==typeof this.indexed&&(r.indexed=this.indexed),this.isTuple()&&(r.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(r)}let t="";return this.isArray()?(t+=this.arrayChildren.format(e),t+=`[${this.arrayLength<0?"":String(this.arrayLength)}]`):this.isTuple()?t+="("+this.components.map((t=>t.format(e))).join("full"===e?", ":",")+")":t+=this.type,"sighash"!==e&&(!0===this.indexed&&(t+=" indexed"),"full"===e&&this.name&&(t+=" "+this.name)),t}isArray(){return"array"===this.baseType}isTuple(){return"tuple"===this.baseType}isIndexable(){return null!=this.indexed}walk(e,t){if(this.isArray()){if(!Array.isArray(e))throw new Error("invalid array value");if(-1!==this.arrayLength&&e.length!==this.arrayLength)throw new Error("array is wrong length");const r=this;return e.map((e=>r.arrayChildren.walk(e,t)))}if(this.isTuple()){if(!Array.isArray(e))throw new Error("invalid tuple value");if(e.length!==this.components.length)throw new Error("array is wrong length");const r=this;return e.map(((e,n)=>r.components[n].walk(e,t)))}return t(this.type,e)}#n(e,t,r,n){if(this.isArray()){if(!Array.isArray(t))throw new Error("invalid array value");if(-1!==this.arrayLength&&t.length!==this.arrayLength)throw new Error("array is wrong length");const i=this.arrayChildren,o=t.slice();return o.forEach(((t,n)=>{i.#n(e,t,r,(e=>{o[n]=e}))})),void n(o)}if(this.isTuple()){const i=this.components;let o;if(Array.isArray(t))o=t.slice();else{if(null==t||"object"!=typeof t)throw new Error("invalid tuple value");o=i.map((e=>{if(!e.name)throw new Error("cannot use object value with unnamed components");if(!(e.name in t))throw new Error(`missing value for component ${e.name}`);return t[e.name]}))}if(o.length!==this.components.length)throw new Error("array is wrong length");return o.forEach(((t,n)=>{i[n].#n(e,t,r,(e=>{o[n]=e}))})),void n(o)}const i=r(this.type,t);i.then?e.push(async function(){n(await i)}()):n(i)}async walkAsync(e,t){const r=[],n=[e];return this.#n(r,e,t,(e=>{n[0]=e})),r.length&&await Promise.all(r),n[0]}static from(e,t){if(F.isParamType(e))return e;if("string"==typeof e)try{return F.from(E(e),t)}catch(t){(0,n.assertArgument)(!1,"invalid param type","obj",e)}else if(e instanceof w){let r="",n="",i=null;S(e,o(["tuple"])).has("tuple")||e.peekType("OPEN_PAREN")?(n="tuple",i=e.popParams().map((e=>F.from(e))),r=`tuple(${i.map((e=>e.format())).join(",")})`):(r=B(e.popType("TYPE")),n=r);let s=null,a=null;for(;e.length&&e.peekType("BRACKET");){const t=e.pop();s=new F(T,"",r,n,null,i,a,s),a=t.value,r+=t.text,n="array",i=null}let u=null;if(S(e,h).has("indexed")){if(!t)throw new Error("");u=!0}const c=e.peekType("ID")?e.pop().text:"";if(e.length)throw new Error("leftover tokens");return new F(T,c,r,n,u,i,a,s)}const r=e.name;(0,n.assertArgument)(!r||"string"==typeof r&&r.match(m),"invalid name","obj.name",r);let i=e.indexed;null!=i&&((0,n.assertArgument)(t,"parameter cannot be indexed","obj.indexed",e.indexed),i=!!i);let s=e.type,a=s.match(M);if(a){const t=parseInt(a[2]||"-1"),n=F.from({type:a[1],components:e.components});return new F(T,r||"",s,"array",i,null,t,n)}if("tuple"===s||s.startsWith("tuple(")||s.startsWith("(")){const t=null!=e.components?e.components.map((e=>F.from(e))):null;return new F(T,r||"",s,"tuple",i,t,null,null)}return s=B(e.type),new F(T,r||"",s,s,i,null,null,null)}static isParamType(e){return e&&e[I]===C}}t.ParamType=F;class H{type;inputs;constructor(e,t,r){(0,n.assertPrivate)(e,T,"Fragment"),r=Object.freeze(r.slice()),(0,n.defineProperties)(this,{type:t,inputs:r})}static from(e){if("string"==typeof e){try{H.from(JSON.parse(e))}catch(e){}return H.from(E(e))}if(e instanceof w)switch(e.peekKeyword(l)){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return W.from(e);case"fallback":case"receive":return K.from(e);case"function":return $.from(e);case"struct":return J.from(e)}else if("object"==typeof e){switch(e.type){case"constructor":return V.from(e);case"error":return G.from(e);case"event":return W.from(e);case"fallback":case"receive":return K.from(e);case"function":return $.from(e);case"struct":return J.from(e)}(0,n.assert)(!1,`unsupported type: ${e.type}`,"UNSUPPORTED_OPERATION",{operation:"Fragment.from"})}(0,n.assertArgument)(!1,"unsupported frgament object","obj",e)}static isConstructor(e){return V.isFragment(e)}static isError(e){return G.isFragment(e)}static isEvent(e){return W.isFragment(e)}static isFunction(e){return $.isFragment(e)}static isStruct(e){return J.isFragment(e)}}t.Fragment=H;class z extends H{name;constructor(e,t,r,i){super(e,t,i),(0,n.assertArgument)("string"==typeof r&&r.match(m),"invalid identifier","name",r),i=Object.freeze(i.slice()),(0,n.defineProperties)(this,{name:r})}}function q(e,t){return"("+t.map((t=>t.format(e))).join("full"===e?", ":",")+")"}t.NamedFragment=z;class G extends z{constructor(e,t,r){super(e,"error",t,r),Object.defineProperty(this,I,{value:R})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("error"),t.push(this.name+q(e,this.inputs)),t.join(" ")}static from(e){if(G.isFragment(e))return e;if("string"==typeof e)return G.from(E(e));if(e instanceof w){const t=_("error",e),r=k(e);return x(e),new G(T,t,r)}return new G(T,e.name,e.inputs?e.inputs.map(F.from):[])}static isFragment(e){return e&&e[I]===R}}t.ErrorFragment=G;class W extends z{anonymous;constructor(e,t,r,i){super(e,"event",t,r),Object.defineProperty(this,I,{value:N}),(0,n.defineProperties)(this,{anonymous:i})}get topicHash(){return(0,i.id)(this.format("sighash"))}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("event"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&this.anonymous&&t.push("anonymous"),t.join(" ")}static getTopicHash(e,t){return t=(t||[]).map((e=>F.from(e))),new W(T,e,t,!1).topicHash}static from(e){if(W.isFragment(e))return e;if("string"==typeof e)try{return W.from(E(e))}catch(t){(0,n.assertArgument)(!1,"invalid event fragment","obj",e)}else if(e instanceof w){const t=_("event",e),r=k(e,!0),n=!!S(e,o(["anonymous"])).has("anonymous");return x(e),new W(T,t,r,n)}return new W(T,e.name,e.inputs?e.inputs.map((e=>F.from(e,!0))):[],!!e.anonymous)}static isFragment(e){return e&&e[I]===N}}t.EventFragment=W;class V extends H{payable;gas;constructor(e,t,r,i,o){super(e,t,r),Object.defineProperty(this,I,{value:j}),(0,n.defineProperties)(this,{payable:i,gas:o})}format(e){if((0,n.assert)(null!=e&&"sighash"!==e,"cannot format a constructor for sighash","UNSUPPORTED_OPERATION",{operation:"format(sighash)"}),"json"===e)return JSON.stringify({type:"constructor",stateMutability:this.payable?"payable":"undefined",payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});const t=[`constructor${q(e,this.inputs)}`];return this.payable&&t.push("payable"),null!=this.gas&&t.push(`@${this.gas.toString()}`),t.join(" ")}static from(e){if(V.isFragment(e))return e;if("string"==typeof e)try{return V.from(E(e))}catch(t){(0,n.assertArgument)(!1,"invalid constuctor fragment","obj",e)}else if(e instanceof w){S(e,o(["constructor"]));const t=k(e),r=!!S(e,s).has("payable"),n=O(e);return x(e),new V(T,"constructor",t,r,n)}return new V(T,"constructor",e.inputs?e.inputs.map(F.from):[],!!e.payable,null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[I]===j}}t.ConstructorFragment=V;class K extends H{payable;constructor(e,t,r){super(e,"fallback",t),Object.defineProperty(this,I,{value:U}),(0,n.defineProperties)(this,{payable:r})}format(e){const t=0===this.inputs.length?"receive":"fallback";if("json"===e){const e=this.payable?"payable":"nonpayable";return JSON.stringify({type:t,stateMutability:e})}return`${t}()${this.payable?" payable":""}`}static from(e){if(K.isFragment(e))return e;if("string"==typeof e)try{return K.from(E(e))}catch(t){(0,n.assertArgument)(!1,"invalid fallback fragment","obj",e)}else if(e instanceof w){const t=e.toString(),r=e.peekKeyword(o(["fallback","receive"]));if((0,n.assertArgument)(r,"type must be fallback or receive","obj",t),"receive"===e.popKeyword(o(["fallback","receive"]))){const t=k(e);return(0,n.assertArgument)(0===t.length,"receive cannot have arguments","obj.inputs",t),S(e,o(["payable"])),x(e),new K(T,[],!0)}let i=k(e);i.length?(0,n.assertArgument)(1===i.length&&"bytes"===i[0].type,"invalid fallback inputs","obj.inputs",i.map((e=>e.format("minimal"))).join(", ")):i=[F.from("bytes")];const s=P(e);if((0,n.assertArgument)("nonpayable"===s||"payable"===s,"fallback cannot be constants","obj.stateMutability",s),S(e,o(["returns"])).has("returns")){const t=k(e);(0,n.assertArgument)(1===t.length&&"bytes"===t[0].type,"invalid fallback outputs","obj.outputs",t.map((e=>e.format("minimal"))).join(", "))}return x(e),new K(T,i,"payable"===s)}if("receive"===e.type)return new K(T,[],!0);if("fallback"===e.type){const t=[F.from("bytes")],r="payable"===e.stateMutability;return new K(T,t,r)}(0,n.assertArgument)(!1,"invalid fallback description","obj",e)}static isFragment(e){return e&&e[I]===U}}t.FallbackFragment=K;class $ extends z{constant;outputs;stateMutability;payable;gas;constructor(e,t,r,i,o,s){super(e,"function",t,i),Object.defineProperty(this,I,{value:L}),o=Object.freeze(o.slice());const a="view"===r||"pure"===r,u="payable"===r;(0,n.defineProperties)(this,{constant:a,gas:s,outputs:o,payable:u,stateMutability:r})}get selector(){return(0,i.id)(this.format("sighash")).substring(0,10)}format(e){if(null==e&&(e="sighash"),"json"===e)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:null!=this.gas?this.gas:void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});const t=[];return"sighash"!==e&&t.push("function"),t.push(this.name+q(e,this.inputs)),"sighash"!==e&&("nonpayable"!==this.stateMutability&&t.push(this.stateMutability),this.outputs&&this.outputs.length&&(t.push("returns"),t.push(q(e,this.outputs))),null!=this.gas&&t.push(`@${this.gas.toString()}`)),t.join(" ")}static getSelector(e,t){return t=(t||[]).map((e=>F.from(e))),new $(T,e,"view",t,[],null).selector}static from(e){if($.isFragment(e))return e;if("string"==typeof e)try{return $.from(E(e))}catch(t){(0,n.assertArgument)(!1,"invalid function fragment","obj",e)}else if(e instanceof w){const t=_("function",e),r=k(e),n=P(e);let i=[];S(e,o(["returns"])).has("returns")&&(i=k(e));const s=O(e);return x(e),new $(T,t,n,r,i,s)}let t=e.stateMutability;return null==t&&(t="payable","boolean"==typeof e.constant?(t="view",e.constant||(t="payable","boolean"!=typeof e.payable||e.payable||(t="nonpayable"))):"boolean"!=typeof e.payable||e.payable||(t="nonpayable")),new $(T,e.name,t,e.inputs?e.inputs.map(F.from):[],e.outputs?e.outputs.map(F.from):[],null!=e.gas?e.gas:null)}static isFragment(e){return e&&e[I]===L}}t.FunctionFragment=$;class J extends z{constructor(e,t,r){super(e,"struct",t,r),Object.defineProperty(this,I,{value:D})}format(){throw new Error("@TODO")}static from(e){if("string"==typeof e)try{return J.from(E(e))}catch(t){(0,n.assertArgument)(!1,"invalid struct fragment","obj",e)}else if(e instanceof w){const t=_("struct",e),r=k(e);return x(e),new J(T,t,r)}return new J(T,e.name,e.inputs?e.inputs.map(F.from):[])}static isFragment(e){return e&&e[I]===D}}t.StructFragment=J},251:(e,t)=>{t.read=function(e,t,r,n,i){var o,s,a=8*i-n-1,u=(1<<a)-1,c=u>>1,l=-7,f=r?i-1:0,h=r?-1:1,d=e[t+f];for(f+=h,o=d&(1<<-l)-1,d>>=-l,l+=a;l>0;o=256*o+e[t+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=n;l>0;s=256*s+e[t+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?NaN:1/0*(d?-1:1);s+=Math.pow(2,n),o-=c}return(d?-1:1)*s*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(a=isNaN(t)?1:0,s=l):(s=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-s))<1&&(s--,u*=2),(t+=s+f>=1?h/u:h*Math.pow(2,1-f))*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(t*u-1)*Math.pow(2,i),s+=f):(a=t*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;e[r+d]=255&a,d+=p,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;e[r+d]=255&s,d+=p,s/=256,c-=8);e[r+d-p]|=128*g}},530:(e,t,r)=>{var n={ECB:r(52632),CBC:r(92884),CFB:r(46383),CFB8:r(86975),CFB1:r(55264),OFB:r(46843),CTR:r(63053),GCM:r(63053)},i=r(3219);for(var o in i)i[o].module=n[i[o].mode];e.exports=i},761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMapTo=void 0;var n=r(90680),i=r(10281);t.switchMapTo=function(e,t){return i.isFunction(t)?n.switchMap((function(){return e}),t):n.switchMap((function(){return e}))}},894:(e,t,r)=>{"use strict";var n=t;n.base=r(36677),n.short=r(39188),n.mont=r(30370),n.edwards=r(31298)},1126:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},1241:(e,t,r)=>{var n=r(25799),i=r(36171),o=r(3219);t.createCipher=t.Cipher=n.createCipher,t.createCipheriv=t.Cipheriv=n.createCipheriv,t.createDecipher=t.Decipher=i.createDecipher,t.createDecipheriv=t.Decipheriv=i.createDecipheriv,t.listCiphers=t.getCiphers=function(){return Object.keys(o)}},1295:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=t.ZeroHash=t.ZeroAddress=void 0;var n=r(65239);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return n.ZeroAddress}});var i=r(25255);Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return i.ZeroHash}});var o=r(79197);Object.defineProperty(t,"N",{enumerable:!0,get:function(){return o.N}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return o.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return o.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return o.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return o.MaxInt256}});var s=r(26245);Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}})},1485:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ECB=void 0;const n=r(86342);class i extends n.ModeOfOperation{constructor(e){super("ECB",e,i)}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.encrypt(e.subarray(r,r+16)),r);return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16)t.set(this.aes.decrypt(e.subarray(r,r+16)),r);return t}}t.ECB=i},1500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.makeError=t.isCallException=t.isError=void 0;const n=r(12205),i=r(8166);function o(e,t){if(null==e)return"null";if(null==t&&(t=new Set),"object"==typeof e){if(t.has(e))return"[Circular]";t.add(e)}if(Array.isArray(e))return"[ "+e.map((e=>o(e,t))).join(", ")+" ]";if(e instanceof Uint8Array){const t="0123456789abcdef";let r="0x";for(let n=0;n<e.length;n++)r+=t[e[n]>>4],r+=t[15&e[n]];return r}if("object"==typeof e&&"function"==typeof e.toJSON)return o(e.toJSON(),t);switch(typeof e){case"boolean":case"number":case"symbol":return e.toString();case"bigint":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const r=Object.keys(e);return r.sort(),"{ "+r.map((r=>`${o(r,t)}: ${o(e[r],t)}`)).join(", ")+" }"}}return"[ COULD NOT SERIALIZE ]"}function s(e,t){return e&&e.code===t}function a(e,t,r){let s,a=e;{const i=[];if(r){if("message"in r||"code"in r||"name"in r)throw new Error(`value will overwrite populated values: ${o(r)}`);for(const e in r){if("shortMessage"===e)continue;const t=r[e];i.push(e+"="+o(t))}}i.push(`code=${t}`),i.push(`version=${n.version}`),i.length&&(e+=" ("+i.join(", ")+")")}switch(t){case"INVALID_ARGUMENT":s=new TypeError(e);break;case"NUMERIC_FAULT":case"BUFFER_OVERRUN":s=new RangeError(e);break;default:s=new Error(e)}return(0,i.defineProperties)(s,{code:t}),r&&Object.assign(s,r),null==s.shortMessage&&(0,i.defineProperties)(s,{shortMessage:a}),s}function u(e,t,r,n){if(!e)throw a(t,r,n)}t.isError=s,t.isCallException=function(e){return s(e,"CALL_EXCEPTION")},t.makeError=a,t.assert=u,t.assertArgument=function(e,t,r,n){u(e,t,"INVALID_ARGUMENT",{argument:r,value:n})},t.assertArgumentCount=function(e,t,r){null==r&&(r=""),r&&(r=": "+r),u(e>=t,"missing argument"+r,"MISSING_ARGUMENT",{count:e,expectedCount:t}),u(e<=t,"too many arguments"+r,"UNEXPECTED_ARGUMENT",{count:e,expectedCount:t})};const c=["NFD","NFC","NFKD","NFKC"].reduce(((e,t)=>{try{if("test"!=="test".normalize(t))throw new Error("bad");if("NFD"===t){if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken")}e.push(t)}catch(e){}return e}),[]);t.assertNormalize=function(e){u(c.indexOf(e)>=0,"platform missing String.prototype.normalize","UNSUPPORTED_OPERATION",{operation:"String.prototype.normalize",info:{form:e}})},t.assertPrivate=function(e,t,r){if(null==r&&(r=""),e!==t){let e=r,t="new";r&&(e+=".",t+=" "+r),u(!1,`private constructor; use ${e}from* methods`,"UNSUPPORTED_OPERATION",{operation:t})}}},1636:e=>{"use strict";e.exports={rE:"6.6.1"}},1903:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=void 0;var n=r(48051),i=r(7652),o=r(17214),s=r(5717),a=r(19724);t.onErrorResumeNext=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.argsOrArgArray(e);return new n.Observable((function(e){var t=0,n=function(){if(t<r.length){var i=void 0;try{i=a.innerFrom(r[t++])}catch(e){return void n()}var u=new o.OperatorSubscriber(e,void 0,s.noop,s.noop);i.subscribe(u),u.add(n)}else e.complete()};n()}))}},2077:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.GunRxJS=void 0;const n=r(79364),i=r(92794);t.GunRxJS=class{gun;user;constructor(e){this.gun=e,this.user=e.user().recall({sessionStorage:!0})}getUser(){return this.user}getUserPub(){return this.user.is?.pub}observe(e){return new n.Observable((t=>{const r="string"==typeof e?this.gun.get(e):e,n=r.on(((e,r)=>{if(null!=e)if("object"==typeof e&&null!==e){const r=this.removeGunMeta(e);t.next(r)}else t.next(e);else t.next(null)}));return()=>{n&&"function"==typeof n&&n(),r.off()}})).pipe((0,i.distinctUntilChanged)(((e,t)=>JSON.stringify(e)===JSON.stringify(t))))}match(e,t){return new n.Observable((r=>{const n="string"==typeof e?this.gun.get(e):e,i={},o=n.map().on(((e,n)=>{if("_"===n||!e)return;if(t&&!t(e))return void(i[n]&&(delete i[n],r.next(Object.values(i))));const o="object"==typeof e?this.removeGunMeta(e):e;i[n]=o,r.next(Object.values(i))}));return()=>{o&&"function"==typeof o&&o(),n.off()}}))}put(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.put(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}set(e,t){const r="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{r.set(t,(r=>{r.err?e.error(new Error(r.err)):(e.next(t),e.complete())}))}))}once(e){const t="string"==typeof e?this.gun.get(e):e;return new n.Observable((e=>{t.once((t=>{if(null==t)return e.next(null),void e.complete();const r="object"==typeof t?this.removeGunMeta(t):t;e.next(r),e.complete()}))}))}compute(e,t){const r=e.map((e=>"string"==typeof e?this.observe(e):e));return new n.Observable((n=>{let i=new Array(e.length).fill(void 0),o=new Array(e.length).fill(!1);const s=r.map(((e,r)=>e.subscribe({next:e=>{if(i[r]=e,i.every((e=>void 0!==e)))try{const e=t(...i);n.next(e)}catch(e){n.error(e)}},error:e=>n.error(e),complete:()=>{o[r]=!0,o.every((e=>e))&&n.complete()}})));return()=>{s.forEach((e=>e.unsubscribe()))}}))}userPut(e,t){return new n.Observable((r=>{this.gun.user().get(e).put(t,(e=>{e.err?r.error(new Error(e.err)):(r.next(t),r.complete())}))}))}userGet(e){return this.observe(this.gun.user().get(e))}observeUser(e){return this.observe(this.gun.user().get(e))}removeGunMeta(e){if(!e||"object"!=typeof e)return e;const t=Array.isArray(e)?[]:{};return Object.keys(e).forEach((r=>{if("_"===r||"#"===r)return;const n=e[r];t[r]=n&&"object"==typeof n?this.removeGunMeta(n):n})),t}}},2287:(e,t,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(66225),s=r(43349),a=n.sum32,u=n.sum32_4,c=n.sum32_5,l=o.ch32,f=o.maj32,h=o.s0_256,d=o.s1_256,p=o.g0_256,g=o.g1_256,b=i.BlockHash,y=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298];function m(){if(!(this instanceof m))return new m;b.call(this),this.h=[1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225],this.k=y,this.W=new Array(64)}n.inherits(m,b),e.exports=m,m.blockSize=512,m.outSize=256,m.hmacStrength=192,m.padLength=64,m.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=u(g(r[n-2]),r[n-7],p(r[n-15]),r[n-16]);var i=this.h[0],o=this.h[1],b=this.h[2],y=this.h[3],m=this.h[4],v=this.h[5],w=this.h[6],E=this.h[7];for(s(this.k.length===r.length),n=0;n<r.length;n++){var A=c(E,d(m),l(m,v,w),this.k[n],r[n]),_=a(h(i),f(i,o,b));E=w,w=v,v=m,m=a(y,A),y=b,b=o,o=i,i=a(A,_)}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],b),this.h[3]=a(this.h[3],y),this.h[4]=a(this.h[4],m),this.h[5]=a(this.h[5],v),this.h[6]=a(this.h[6],w),this.h[7]=a(this.h[7],E)},m.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},2398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PocketProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371),a="62e1ad51b37b8e00394bda3b";class u extends s.JsonRpcProvider{applicationId;applicationSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=a),null==r&&(r=null);const s={staticNetwork:i};super(u.getRequest(i,t,r),i,s),(0,n.defineProperties)(this,{applicationId:t,applicationSecret:r})}_getProvider(e){try{return new u(e,this.applicationId,this.applicationSecret)}catch(e){}return super._getProvider(e)}static getRequest(e,t,r){null==t&&(t=a);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.gateway.pokt.network";case"goerli":return"eth-goerli.gateway.pokt.network";case"matic":return"poly-mainnet.gateway.pokt.network";case"matic-mumbai":return"polygon-mumbai-rpc.gateway.pokt.network"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v1/lb/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===a&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("PocketProvider"),!0)),o}isCommunityResource(){return this.applicationId===a}}t.PocketProvider=u},2455:(e,t,r)=>{var n,i=r(65606);n=r.g.process&&r.g.process.browser?"utf-8":r.g.process&&r.g.process.version?parseInt(i.version.split(".")[0].slice(1),10)>=6?"utf-8":"binary":"utf-8",e.exports=n},2574:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeInternals=void 0;var n=r(19724),i=r(28619),o=r(17214);t.mergeInternals=function(e,t,r,s,a,u,c,l){var f=[],h=0,d=0,p=!1,g=function(){!p||f.length||h||t.complete()},b=function(e){return h<s?y(e):f.push(e)},y=function(e){u&&t.next(e),h++;var l=!1;n.innerFrom(r(e,d++)).subscribe(o.createOperatorSubscriber(t,(function(e){null==a||a(e),u?b(e):t.next(e)}),(function(){l=!0}),void 0,(function(){if(l)try{h--;for(var e=function(){var e=f.shift();c?i.executeSchedule(t,c,(function(){return y(e)})):y(e)};f.length&&h<s;)e();g()}catch(e){t.error(e)}})))};return e.subscribe(o.createOperatorSubscriber(t,b,(function(){p=!0,g()}))),function(){null==l||l()}}},2708:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.EMPTY_OBSERVER=t.SafeSubscriber=t.Subscriber=void 0;var o=r(10281),s=r(69879),a=r(93728),u=r(32980),c=r(5717),l=r(42767),f=r(94808),h=r(12688),d=function(e){function r(r){var n=e.call(this)||this;return n.isStopped=!1,r?(n.destination=r,s.isSubscription(r)&&r.add(n)):n.destination=t.EMPTY_OBSERVER,n}return i(r,e),r.create=function(e,t,r){return new y(e,t,r)},r.prototype.next=function(e){this.isStopped?v(l.nextNotification(e),this):this._next(e)},r.prototype.error=function(e){this.isStopped?v(l.errorNotification(e),this):(this.isStopped=!0,this._error(e))},r.prototype.complete=function(){this.isStopped?v(l.COMPLETE_NOTIFICATION,this):(this.isStopped=!0,this._complete())},r.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},r.prototype._next=function(e){this.destination.next(e)},r.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},r.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},r}(s.Subscription);t.Subscriber=d;var p=Function.prototype.bind;function g(e,t){return p.call(e,t)}var b=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),y=function(e){function t(t,r,n){var i,s,u=e.call(this)||this;return o.isFunction(t)||!t?i={next:null!=t?t:void 0,error:null!=r?r:void 0,complete:null!=n?n:void 0}:u&&a.config.useDeprecatedNextContext?((s=Object.create(t)).unsubscribe=function(){return u.unsubscribe()},i={next:t.next&&g(t.next,s),error:t.error&&g(t.error,s),complete:t.complete&&g(t.complete,s)}):i=t,u.destination=new b(i),u}return i(t,e),t}(d);function m(e){a.config.useDeprecatedSynchronousErrorHandling?h.captureError(e):u.reportUnhandledError(e)}function v(e,t){var r=a.config.onStoppedNotification;r&&f.timeoutProvider.setTimeout((function(){return r(e,t)}))}t.SafeSubscriber=y,t.EMPTY_OBSERVER={closed:!0,next:c.noop,error:function(e){throw e},complete:c.noop}},2884:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observable=void 0,t.observable="function"==typeof Symbol&&Symbol.observable||"@@observable"},2955:(e,t,r)=>{"use strict";var n,i=r(65606);function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var s=r(86238),a=Symbol("lastResolve"),u=Symbol("lastReject"),c=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),h=Symbol("handlePromise"),d=Symbol("stream");function p(e,t){return{value:e,done:t}}function g(e){var t=e[a];if(null!==t){var r=e[d].read();null!==r&&(e[f]=null,e[a]=null,e[u]=null,t(p(r,!1)))}}function b(e){i.nextTick(g,e)}var y=Object.getPrototypeOf((function(){})),m=Object.setPrototypeOf((o(n={get stream(){return this[d]},next:function(){var e=this,t=this[c];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(p(void 0,!0));if(this[d].destroyed)return new Promise((function(t,r){i.nextTick((function(){e[c]?r(e[c]):t(p(void 0,!0))}))}));var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then((function(){t[l]?r(p(void 0,!0)):t[h](r,n)}),n)}}(n,this));else{var o=this[d].read();if(null!==o)return Promise.resolve(p(o,!1));r=new Promise(this[h])}return this[f]=r,r}},Symbol.asyncIterator,(function(){return this})),o(n,"return",(function(){var e=this;return new Promise((function(t,r){e[d].destroy(null,(function(e){e?r(e):t(p(void 0,!0))}))}))})),n),y);e.exports=function(e){var t,r=Object.create(m,(o(t={},d,{value:e,writable:!0}),o(t,a,{value:null,writable:!0}),o(t,u,{value:null,writable:!0}),o(t,c,{value:null,writable:!0}),o(t,l,{value:e._readableState.endEmitted,writable:!0}),o(t,h,{value:function(e,t){var n=r[d].read();n?(r[f]=null,r[a]=null,r[u]=null,e(p(n,!1))):(r[a]=e,r[u]=t)},writable:!0}),t));return r[f]=null,s(e,(function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[u];return null!==t&&(r[f]=null,r[a]=null,r[u]=null,t(e)),void(r[c]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[u]=null,n(p(void 0,!0))),r[l]=!0})),e.on("readable",b.bind(null,r)),r}},2959:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ignoreElements=void 0;var n=r(65212),i=r(17214),o=r(5717);t.ignoreElements=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,o.noop))}))}},3143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounce=void 0;var n=r(65212),i=r(5717),o=r(17214),s=r(19724);t.debounce=function(e){return n.operate((function(t,r){var n=!1,a=null,u=null,c=function(){if(null==u||u.unsubscribe(),u=null,n){n=!1;var e=a;a=null,r.next(e)}};t.subscribe(o.createOperatorSubscriber(r,(function(t){null==u||u.unsubscribe(),n=!0,a=t,u=o.createOperatorSubscriber(r,c,i.noop),s.innerFrom(e(t)).subscribe(u)}),(function(){c(),r.complete()}),void 0,(function(){a=u=null})))}))}},3219:e=>{"use strict";e.exports=JSON.parse('{"aes-128-ecb":{"cipher":"AES","key":128,"iv":0,"mode":"ECB","type":"block"},"aes-192-ecb":{"cipher":"AES","key":192,"iv":0,"mode":"ECB","type":"block"},"aes-256-ecb":{"cipher":"AES","key":256,"iv":0,"mode":"ECB","type":"block"},"aes-128-cbc":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes-192-cbc":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes-256-cbc":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes128":{"cipher":"AES","key":128,"iv":16,"mode":"CBC","type":"block"},"aes192":{"cipher":"AES","key":192,"iv":16,"mode":"CBC","type":"block"},"aes256":{"cipher":"AES","key":256,"iv":16,"mode":"CBC","type":"block"},"aes-128-cfb":{"cipher":"AES","key":128,"iv":16,"mode":"CFB","type":"stream"},"aes-192-cfb":{"cipher":"AES","key":192,"iv":16,"mode":"CFB","type":"stream"},"aes-256-cfb":{"cipher":"AES","key":256,"iv":16,"mode":"CFB","type":"stream"},"aes-128-cfb8":{"cipher":"AES","key":128,"iv":16,"mode":"CFB8","type":"stream"},"aes-192-cfb8":{"cipher":"AES","key":192,"iv":16,"mode":"CFB8","type":"stream"},"aes-256-cfb8":{"cipher":"AES","key":256,"iv":16,"mode":"CFB8","type":"stream"},"aes-128-cfb1":{"cipher":"AES","key":128,"iv":16,"mode":"CFB1","type":"stream"},"aes-192-cfb1":{"cipher":"AES","key":192,"iv":16,"mode":"CFB1","type":"stream"},"aes-256-cfb1":{"cipher":"AES","key":256,"iv":16,"mode":"CFB1","type":"stream"},"aes-128-ofb":{"cipher":"AES","key":128,"iv":16,"mode":"OFB","type":"stream"},"aes-192-ofb":{"cipher":"AES","key":192,"iv":16,"mode":"OFB","type":"stream"},"aes-256-ofb":{"cipher":"AES","key":256,"iv":16,"mode":"OFB","type":"stream"},"aes-128-ctr":{"cipher":"AES","key":128,"iv":16,"mode":"CTR","type":"stream"},"aes-192-ctr":{"cipher":"AES","key":192,"iv":16,"mode":"CTR","type":"stream"},"aes-256-ctr":{"cipher":"AES","key":256,"iv":16,"mode":"CTR","type":"stream"},"aes-128-gcm":{"cipher":"AES","key":128,"iv":12,"mode":"GCM","type":"auth"},"aes-192-gcm":{"cipher":"AES","key":192,"iv":12,"mode":"GCM","type":"auth"},"aes-256-gcm":{"cipher":"AES","key":256,"iv":12,"mode":"GCM","type":"auth"}}')},3352:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retry=void 0;var n=r(65212),i=r(17214),o=r(87699),s=r(5825),a=r(19724);t.retry=function(e){var t;void 0===e&&(e=1/0);var r=(t=e&&"object"==typeof e?e:{count:e}).count,u=void 0===r?1/0:r,c=t.delay,l=t.resetOnSuccess,f=void 0!==l&&l;return u<=0?o.identity:n.operate((function(e,t){var r,n=0,o=function(){var l=!1;r=e.subscribe(i.createOperatorSubscriber(t,(function(e){f&&(n=0),t.next(e)}),void 0,(function(e){if(n++<u){var f=function(){r?(r.unsubscribe(),r=null,o()):l=!0};if(null!=c){var h="number"==typeof c?s.timer(c):a.innerFrom(c(e,n)),d=i.createOperatorSubscriber(t,(function(){d.unsubscribe(),f()}),(function(){t.complete()}));h.subscribe(d)}else f()}else t.error(e)}))),l&&(r.unsubscribe(),r=null,o())};o()}))}},3389:(e,t,r)=>{"use strict";var n=r(43349),i=r(56698),o={};function s(e){n.equal(e.length,8,"Invalid IV length"),this.iv=new Array(8);for(var t=0;t<this.iv.length;t++)this.iv[t]=e[t]}t.instantiate=function(e){function t(t){e.call(this,t),this._cbcInit()}i(t,e);for(var r=Object.keys(o),n=0;n<r.length;n++){var s=r[n];t.prototype[s]=o[s]}return t.create=function(e){return new t(e)},t},o._cbcInit=function(){var e=new s(this.options.iv);this._cbcState=e},o._update=function(e,t,r,n){var i=this._cbcState,o=this.constructor.super_.prototype,s=i.iv;if("encrypt"===this.type){for(var a=0;a<this.blockSize;a++)s[a]^=e[t+a];for(o._update.call(this,s,0,r,n),a=0;a<this.blockSize;a++)s[a]=r[n+a]}else{for(o._update.call(this,e,t,r,n),a=0;a<this.blockSize;a++)r[n+a]^=s[a];for(a=0;a<this.blockSize;a++)s[a]=e[t+a]}}},3514:(e,t)=>{"use strict";const r=new Map([[8217,"apostrophe"],[8260,"fraction slash"],[12539,"middle dot"]]);function n(e){return function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),i=1,o=[0,1];for(let e=1;e<n;e++)o.push(i+=r());let s=r(),a=t;t+=s;let u=0,c=0;function l(){return 0==u&&(c=c<<8|e[t++],u=8),c>>--u&1}const f=2**31,h=f>>>1,d=h>>1,p=f-1;let g=0;for(let e=0;e<31;e++)g=g<<1|l();let b=[],y=0,m=f;for(;;){let e=Math.floor(((g-y+1)*i-1)/m),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e<o[n]?r=n:t=n}if(0==t)break;b.push(t);let s=y+Math.floor(m*o[t]/i),a=y+Math.floor(m*o[t+1]/i)-1;for(;0==((s^a)&h);)g=g<<1&p|l(),s=s<<1&p,a=a<<1&p|1;for(;s&~a&d;)g=g&h|g<<1&p>>>1|l(),s=s<<1^h,a=(a^h)<<1|h|1;y=s,m=1+a-s}let v=n-4;return b.map((t=>{switch(t-v){case 3:return v+65792+(e[a++]<<16|e[a++]<<8|e[a++]);case 2:return v+256+(e[a++]<<8|e[a++]);case 1:return v+e[a++];default:return t-1}}))}(function(e){let t=[];[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"].forEach(((e,r)=>t[e.charCodeAt(0)]=r));let r=e.length,n=new Uint8Array(6*r>>3);for(let i=0,o=0,s=0,a=0;i<r;i++)a=a<<6|t[e.charCodeAt(i)],s+=6,s>=8&&(n[o++]=a>>(s-=8));return n}(e)))}function i(e){return 1&e?~e>>1:e>>1}function o(e,t){let r=Array(e);for(let n=0,o=0;n<e;n++)r[n]=o+=i(t());return r}function s(e,t=0){let r=[];for(;;){let n=e(),i=e();if(!i)break;t+=n;for(let e=0;e<i;e++)r.push(t+e);t+=i+1}return r}function a(e){return c((()=>{let t=s(e);if(t.length)return t}))}function u(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(f(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(h(r,e))}return t.flat()}function c(e){let t=[];for(;;){let r=e(t.length);if(!r)break;t.push(r)}return t}function l(e,t,r){let n=Array(e).fill().map((()=>[]));for(let i=0;i<t;i++)o(e,r).forEach(((e,t)=>n[t].push(e)));return n}function f(e,t){let r=1+t(),n=t(),i=c(t);return l(i.length,1+e,t).flatMap(((e,t)=>{let[o,...s]=e;return Array(i[t]).fill().map(((e,t)=>{let i=t*n;return[o+t*r,s.map((e=>e+i))]}))}))}function h(e,t){return l(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}function d(e){return`{${function(e){return e.toString(16).toUpperCase().padStart(2,"0")}(e)}}`}function p(e){let t=[];for(let r=0,n=e.length;r<n;){let n=e.codePointAt(r);r+=n<65536?1:2,t.push(n)}return t}function g(e){let t=e.length;if(t<4096)return String.fromCodePoint(...e);let r=[];for(let n=0;n<t;)r.push(String.fromCodePoint(...e.slice(n,n+=4096)));return r.join("")}function b(e,t){let r=e.length,n=r-t.length;for(let i=0;0==n&&i<r;i++)n=e[i]-t[i];return n}const y=44032,m=4352,v=4449,w=4519;function E(e){return e>>24&255}function A(e){return 16777215&e}let _,S,P,k;function O(e){return e>=y&&e<55204}function x(e,t){if(e>=m&&e<4371&&t>=v&&t<4470)return y+588*(e-m)+28*(t-v);if(O(e)&&t>w&&t<4547&&(e-y)%28==0)return e+(t-w);{let r=k.get(e);return r&&(r=r.get(t),r)?r:-1}}function M(e){_||function(){let e=n("AEUDTAHBCFQATQDRADAAcgAgADQAFAAsABQAHwAOACQADQARAAoAFwAHABIACAAPAAUACwAFAAwABAAQAAMABwAEAAoABQAIAAIACgABAAQAFAALAAIACwABAAIAAQAHAAMAAwAEAAsADAAMAAwACgANAA0AAwAKAAkABAAdAAYAZwDSAdsDJgC0CkMB8xhZAqfoC190UGcThgBurwf7PT09Pb09AjgJum8OjDllxHYUKXAPxzq6tABAxgK8ysUvWAgMPT09PT09PSs6LT2HcgWXWwFLoSMEEEl5RFVMKvO0XQ8ExDdJMnIgsj26PTQyy8FfEQ8AY8IPAGcEbwRwBHEEcgRzBHQEdQR2BHcEeAR6BHsEfAR+BIAEgfndBQoBYgULAWIFDAFiBNcE2ATZBRAFEQUvBdALFAsVDPcNBw13DYcOMA4xDjMB4BllHI0B2grbAMDpHLkQ7QHVAPRNQQFnGRUEg0yEB2uaJF8AJpIBpob5AERSMAKNoAXqaQLUBMCzEiACnwRZEkkVsS7tANAsBG0RuAQLEPABv9HICTUBXigPZwRBApMDOwAamhtaABqEAY8KvKx3LQ4ArAB8UhwEBAVSagD8AEFZADkBIadVj2UMUgx5Il4ANQC9AxIB1BlbEPMAs30CGxlXAhwZKQIECBc6EbsCoxngzv7UzRQA8M0BawL6ZwkN7wABAD33OQRcsgLJCjMCjqUChtw/km+NAsXPAoP2BT84PwURAK0RAvptb6cApQS/OMMey5HJS84UdxpxTPkCogVFITaTOwERAK5pAvkNBOVyA7q3BKlOJSALAgUIBRcEdASpBXqzABXFSWZOawLCOqw//AolCZdvv3dSBkEQGyelEPcMMwG1ATsN7UvYBPEGOwTJH30ZGQ/NlZwIpS3dDO0m4y6hgFoj9SqDBe1L9DzdC01RaA9ZC2UJ4zpjgU4DIQENIosK3Q05CG0Q8wrJaw3lEUUHOQPVSZoApQcBCxEdNRW1JhBirAsJOXcG+xr2C48mrxMpevwF0xohBk0BKRr/AM8u54WwWjFcHE9fBgMLJSPHFKhQIA0lQLd4SBobBxUlqQKRQ3BKh1E2HpMh9jw9DWYuE1F8B/U8BRlPC4E8nkarRQ4R0j6NPUgiSUwsBDV/LC8niwnPD4UMuXxyAVkJIQmxDHETMREXN8UIOQcZLZckJxUIIUaVYJoE958D8xPRAwsFPwlBBxMDtRwtEy4VKQUNgSTXAvM21S6zAo9WgAEXBcsPJR/fEFBH4A7pCJsCZQODJesALRUhABcimwhDYwBfj9hTBS7LCMdqbCN0A2cU52ERcweRDlcHpxwzFb8c4XDIXguGCCijrwlbAXUJmQFfBOMICTVbjKAgQWdTi1gYmyBhQT9d/AIxDGUVn0S9h3gCiw9rEhsBNQFzBzkNAQJ3Ee0RaxCVCOuGBDW1M/g6JQRPIYMgEQonA09szgsnJvkM+GkBoxJiAww0PXfuZ6tgtiQX/QcZMsVBYCHxC5JPzQycGsEYQlQuGeQHvwPzGvMn6kFXBf8DowMTOk0z7gS9C2kIiwk/AEkOoxcH1xhqCnGM0AExiwG3mQNXkYMCb48GNwcLAGcLhwV55QAdAqcIowAFAM8DVwA5Aq0HnQAZAIVBAT0DJy8BIeUCjwOTCDHLAZUvAfMpBBvDDBUA9zduSgLDsQKAamaiBd1YAo4CSTUBTSUEBU5HUQOvceEA2wBLBhPfRwEVq0rLGuNDAd9vKwDHAPsABTUHBUEBzQHzbQC3AV8LMQmis7UBTekpAIMAFWsB1wKJAN0ANQB/8QFTAE0FWfkF0wJPSQERMRgrV2EBuwMfATMBDQB5BsuNpckHHwRtB9MCEBsV4QLvLge1AQMi3xPNQsUCvd5VoWACZIECYkJbTa9bNyACofcCaJgCZgkCn4Q4GwsCZjsCZiYEbgR/A38TA36SOQY5dxc5gjojIwJsHQIyNjgKAm3HAm2u74ozZ0UrAWcA3gDhAEoFB5gMjQD+C8IADbUCdy8CdqI/AnlLQwJ4uh1c20WuRtcCfD8CesgCfQkCfPAFWQUgSABIfWMkAoFtAoAAAoAFAn+uSVhKWxUXSswC0QEC0MxLJwOITwOH5kTFkTIC8qFdAwMDrkvOTC0lA89NTE2vAos/AorYwRsHHUNnBbcCjjcCjlxAl4ECjtkCjlx4UbRTNQpS1FSFApP7ApMMAOkAHFUeVa9V0AYsGymVhjLheGZFOzkCl58C77JYIagAWSUClo8ClnycAKlZrFoJgU0AOwKWtQKWTlxEXNECmcsCmWRcyl0HGQKcmznCOp0CnBYCn5sCnriKAB0PMSoPAp3xAp6SALU9YTRh7wKe0wKgbgGpAp6fHwKeTqVjyGQnJSsCJ68CJn4CoPsCoEwCot0CocQCpi8Cpc4Cp/8AfQKn8mh8aLEAA0lqHGrRAqzjAqyuAq1nAq0CAlcdAlXcArHh1wMfTmyXArK9DQKy6Bds4G1jbUhfAyXNArZcOz9ukAMpRQK4XgK5RxUCuSp3cDZw4QK9GQK72nCWAzIRAr6IcgIDM3ECvhpzInNPAsPLAsMEc4J0SzVFdOADPKcDPJoDPb8CxXwCxkcCxhCJAshpUQLIRALJTwLJLgJknQLd0nh5YXiueSVL0AMYo2cCAmH0GfOVJHsLXpJeuxECz2sCz2wvS1PS8xOfAMatAs9zASnqA04SfksFAtwnAtuKAtJPA1JcA1NfAQEDVYyAiT8AyxbtYEWCHILTgs6DjQLaxwLZ3oQQhEmnPAOGpQAvA2QOhnFZ+QBVAt9lAt64c3cC4i/tFAHzMCcB9JsB8tKHAuvzAulweQLq+QLq5AD5RwG5Au6JAuuclqqXAwLuPwOF4Jh5cOBxoQLzAwBpA44WmZMC9xMDkW4DkocC95gC+dkC+GaaHJqruzebHgOdgwL++gEbADmfHJ+zAwWNA6ZqA6bZANHFAwZqoYiiBQkDDEkCwAA/AwDhQRdTARHzA2sHl2cFAJMtK7evvdsBiZkUfxEEOQH7KQUhDp0JnwCS/SlXxQL3AZ0AtwW5AG8LbUEuFCaNLgFDAYD8AbUmAHUDDgRtACwCFgyhAAAKAj0CagPdA34EkQEgRQUhfAoABQBEABMANhICdwEABdUDa+8KxQIA9wqfJ7+xt+UBkSFBQgHpFH8RNMCJAAQAGwBaAkUChIsABjpTOpSNbQC4Oo860ACNOME63AClAOgAywE6gTo7Ofw5+Tt2iTpbO56JOm85GAFWATMBbAUvNV01njWtNWY1dTW2NcU1gjWRNdI14TWeNa017jX9NbI1wTYCNhE1xjXVNhY2JzXeNe02LjY9Ni41LSE2OjY9Njw2yTcIBJA8VzY4Nt03IDcPNsogN4k3MAoEsDxnNiQ3GTdsOo03IULUQwdC4EMLHA8PCZsobShRVQYA6X8A6bABFCnXAukBowC9BbcAbwNzBL8MDAMMAQgDAAkKCwsLCQoGBAVVBI/DvwDz9b29kaUCb0QtsRTNLt4eGBcSHAMZFhYZEhYEARAEBUEcQRxBHEEcQRxBHEEaQRxBHEFCSTxBPElISUhBNkM2QTYbNklISVmBVIgBFLWZAu0BhQCjBcEAbykBvwGJAaQcEZ0ePCklMAAhMvAIMAL54gC7Bm8EescjzQMpARQpKgDUABavAj626xQAJP0A3etzuf4NNRA7efy2Z9NQrCnC0OSyANz5BBIbJ5IFDR6miIavYS6tprjjmuKebxm5C74Q225X1pkaYYPb6f1DK4k3xMEBb9S2WMjEibTNWhsRJIA+vwNVEiXTE5iXs/wezV66oFLfp9NZGYW+Gk19J2+bCT6Ye2w6LDYdgzKMUabk595eLBCXANz9HUpWbATq9vqXVx9XDg+Pc9Xp4+bsS005SVM/BJBM4687WUuf+Uj9dEi8aDNaPxtpbDxcG1THTImUMZq4UCaaNYpsVqraNyKLJXDYsFZ/5jl7bLRtO88t7P3xZaAxhb5OdPMXqsSkp1WCieG8jXm1U99+blvLlXzPCS+M93VnJCiK+09LfaSaBAVBomyDgJua8dfUzR7ga34IvR2Nvj+A9heJ6lsl1KG4NkI1032Cnff1m1wof2B9oHJK4bi6JkEdSqeNeiuo6QoZZincoc73/TH9SXF8sCE7XyuYyW8WSgbGFCjPV0ihLKhdPs08Tx82fYAkLLc4I2wdl4apY7GU5lHRFzRWJep7Ww3wbeA3qmd59/86P4xuNaqDpygXt6M85glSBHOCGgJDnt+pN9bK7HApMguX6+06RZNjzVmcZJ+wcUrJ9//bpRNxNuKpNl9uFds+S9tdx7LaM5ZkIrPj6nIU9mnbFtVbs9s/uLgl8MVczAwet+iOEzzBlYW7RCMgE6gyNLeq6+1tIx4dpgZnd0DksJS5f+JNDpwwcPNXaaVspq1fbQajOrJgK0ofKtJ1Ne90L6VO4MOl5S886p7u6xo7OLjG8TGL+HU1JXGJgppg4nNbNJ5nlzSpuPYy21JUEcUA94PoFiZfjZue+QnyQ80ekOuZVkxx4g+cvhJfHgNl4hy1/a6+RKcKlar/J29y//EztlbVPHVUeQ1zX86eQVAjR/M3dA9w4W8LfaXp4EgM85wOWasli837PzVMOnsLzR+k3o75/lRPAJSE1xAKQzEi5v10ke+VBvRt1cwQRMd+U5mLCTGVd6XiZtgBG5cDi0w22GKcVNvHiu5LQbZEDVtz0onn7k5+heuKXVsZtSzilkLRAUmjMXEMB3J9YC50XBxPiz53SC+EhnPl9WsKCv92SM/OFFIMJZYfl0WW8tIO3UxYcwdMAj7FSmgrsZ2aAZO03BOhP1bNNZItyXYQFTpC3SG1VuPDqH9GkiCDmE+JwxyIVSO5siDErAOpEXFgjy6PQtOVDj+s6e1r8heWVvmZnTciuf4EiNZzCAd7SOMhXERIOlsHIMG399i9aLTy3m2hRLZjJVDNLS53iGIK11dPqQt0zBDyg6qc7YqkDm2M5Ve6dCWCaCbTXX2rToaIgz6+zh4lYUi/+6nqcFMAkQJKHYLK0wYk5N9szV6xihDbDDFr45lN1K4aCXBq/FitPSud9gLt5ZVn+ZqGX7cwm2z5EGMgfFpIFyhGGuDPmso6TItTMwny+7uPnLCf4W6goFQFV0oQSsc9VfMmVLcLr6ZetDZbaSFTLqnSO/bIPjA3/zAUoqgGFAEQS4IhuMzEp2I3jJzbzkk/IEmyax+rhZTwd6f+CGtwPixu8IvzACquPWPREu9ZvGkUzpRwvRRuaNN6cr0W1wWits9ICdYJ7ltbgMiSL3sTPeufgNcVqMVWFkCPDH4jG2jA0XcVgQj62Cb29v9f/z/+2KbYvIv/zzjpQAPkliaVDzNrW57TZ/ZOyZD0nlfMmAIBIAGAI0D3k/mdN4xr9v85ZbZbbqfH2jGd5hUqNZWwl5SPfoGmfElmazUIeNL1j/mkF7VNAzTq4jNt8JoQ11NQOcmhprXoxSxfRGJ9LDEOAQ+dmxAQH90iti9e2u/MoeuaGcDTHoC+xsmEeWmxEKefQuIzHbpw5Tc5cEocboAD09oipWQhtTO1wivf/O+DRe2rpl/E9wlrzBorjJsOeG1B/XPW4EaJEFdNlECEZga5ZoGRHXgYouGRuVkm8tDESiEyFNo+3s5M5puSdTyUL2llnINVHEt91XUNW4ewdMgJ4boJfEyt/iY5WXqbA+A2Fkt5Z0lutiWhe9nZIyIUjyXDC3UsaG1t+eNx6z4W/OYoTB7A6x+dNSTOi9AInctbESqm5gvOLww7OWXPrmHwVZasrl4eD113pm+JtT7JVOvnCXqdzzdTRHgJ0PiGTFYW5Gvt9R9LD6Lzfs0v/TZZHSmyVNq7viIHE6DBK7Qp07Iz55EM8SYtQvZf/obBniTWi5C2/ovHfw4VndkE5XYdjOhCMRjDeOEfXeN/CwfGduiUIfsoFeUxXeQXba7c7972XNv8w+dTjjUM0QeNAReW+J014dKAD/McQYXT7c0GQPIkn3Ll6R7gGjuiQoZD0TEeEqQpKoZ15g/0OPQI17QiSv9AUROa/V/TQN3dvLArec3RrsYlvBm1b8LWzltdugsC50lNKYLEp2a+ZZYqPejULRlOJh5zj/LVMyTDvwKhMxxwuDkxJ1QpoNI0OTWLom4Z71SNzI9TV1iXJrIu9Wcnd+MCaAw8o1jSXd94YU/1gnkrC9BUEOtQvEIQ7g0i6h+KL2JKk8Ydl7HruvgWMSAmNe+LshGhV4qnWHhO9/RIPQzY1tHRj2VqOyNsDpK0cww+56AdDC4gsWwY0XxoucIWIqs/GcwnWqlaT0KPr8mbK5U94/301i1WLt4YINTVvCFBrFZbIbY8eycOdeJ2teD5IfPLCRg7jjcFTwlMFNl9zdh/o3E/hHPwj7BWg0MU09pPrBLbrCgm54A6H+I6v27+jL5gkjWg/iYdks9jbfVP5y/n0dlgWEMlKasl7JvFZd56LfybW1eeaVO0gxTfXZwD8G4SI116yx7UKVRgui6Ya1YpixqXeNLc8IxtAwCU5IhwQgn+NqHnRaDv61CxKhOq4pOX7M6pkA+Pmpd4j1vn6ACUALoLLc4vpXci8VidLxzm7qFBe7s+quuJs6ETYmnpgS3LwSZxPIltgBDXz8M1k/W2ySNv2f9/NPhxLGK2D21dkHeSGmenRT3Yqcdl0m/h3OYr8V+lXNYGf8aCCpd4bWjE4QIPj7vUKN4Nrfs7ML6Y2OyS830JCnofg/k7lpFpt4SqZc5HGg1HCOrHvOdC8bP6FGDbE/VV0mX4IakzbdS/op+Kt3G24/8QbBV7y86sGSQ/vZzU8FXs7u6jIvwchsEP2BpIhW3G8uWNwa3HmjfH/ZjhhCWvluAcF+nMf14ClKg5hGgtPLJ98ueNAkc5Hs2WZlk2QHvfreCK1CCGO6nMZVSb99VM/ajr8WHTte9JSmkXq/i/U943HEbdzW6Re/S88dKgg8pGOLlAeNiqrcLkUR3/aClFpMXcOUP3rmETcWSfMXZE3TUOi8i+fqRnTYLflVx/Vb/6GJ7eIRZUA6k3RYR3iFSK9c4iDdNwJuZL2FKz/IK5VimcNWEqdXjSoxSgmF0UPlDoUlNrPcM7ftmA8Y9gKiqKEHuWN+AZRIwtVSxye2Kf8rM3lhJ5XcBXU9n4v0Oy1RU2M+4qM8AQPVwse8ErNSob5oFPWxuqZnVzo1qB/IBxkM3EVUKFUUlO3e51259GgNcJbCmlvrdjtoTW7rChm1wyCKzpCTwozUUEOIcWLneRLgMXh+SjGSFkAllzbGS5HK7LlfCMRNRDSvbQPjcXaenNYxCvu2Qyznz6StuxVj66SgI0T8B6/sfHAJYZaZ78thjOSIFumNWLQbeZixDCCC+v0YBtkxiBB3jefHqZ/dFHU+crbj6OvS1x/JDD7vlm7zOVPwpUC01nhxZuY/63E7g");_=new Map(a(e).flatMap(((e,t)=>e.map((e=>[e,t+1<<24]))))),S=new Set(s(e)),P=new Map,k=new Map;for(let[t,r]of u(e)){if(!S.has(t)&&2==r.length){let[e,n]=r,i=k.get(e);i||(i=new Map,k.set(e,i)),i.set(n,t)}P.set(t,r.reverse())}}();let t=[],r=[],i=!1;function o(e){let r=_.get(e);r&&(i=!0,e|=r),t.push(e)}for(let n of e)for(;;){if(n<128)t.push(n);else if(O(n)){let e=n-y,t=e%588/28|0,r=e%28;o(m+(e/588|0)),o(v+t),r>0&&o(w+r)}else{let e=P.get(n);e?r.push(...e):o(n)}if(!r.length)break;n=r.pop()}if(i&&t.length>1){let e=E(t[0]);for(let r=1;r<t.length;r++){let n=E(t[r]);if(0==n||e<=n){e=n;continue}let i=r-1;for(;;){let r=t[i+1];if(t[i+1]=t[i],t[i]=r,!i)break;if(e=E(t[--i]),e<=n)break}e=E(t[r])}}return t}function B(e){return M(e).map(A)}function T(e){return function(e){let t=[],r=[],n=-1,i=0;for(let o of e){let e=E(o),s=A(o);if(-1==n)0==e?n=s:t.push(s);else if(i>0&&i>=e)0==e?(t.push(n,...r),r.length=0,n=s):r.push(s),i=e;else{let o=x(n,s);o>=0?n=o:0==i&&0==e?(t.push(n),n=s):(r.push(s),i=e)}}return n>=0&&t.push(n,...r),t}(M(e))}const I=".",C=e=>Array.from(e);function R(e,t){return e.P.has(t)||e.Q.has(t)}class N extends Array{get is_emoji(){return!0}}let j,U,L,D,F,H,z,q,G,W,V,K;function $(){if(j)return;let e=n("AEEUdwmgDS8BxQKKAP4BOgDjATAAngDUAIMAoABoAOAAagCOAEQAhABMAHIAOwA9ACsANgAmAGIAHgAuACgAJwAXAC0AGgAjAB8ALwAUACkAEgAeAAkAGwARABkAFgA5ACgALQArADcAFQApABAAHgAiABAAGgAeABMAGAUhBe8BFxREN8sF2wC5AK5HAW8ArQkDzQCuhzc3NzcBP68NEfMABQdHBuw5BV8FYAA9MzkI9r4ZBg7QyQAWA9CeOwLNCjcCjqkChuA/lm+RAsXTAoP6ASfnEQDytQFJAjWVCkeXAOsA6godAB/cwdAUE0WlBCN/AQUCQRjFD/MRBjHxDQSJbw0jBzUAswBxme+tnIcAYwabAysG8QAjAEMMmxcDqgPKQyDXCMMxA7kUQwD3NXOrAKmFIAAfBC0D3x4BJQDBGdUFAhEgVD8JnwmQJiNWYUzrg0oAGwAUAB0AFnNcACkAFgBP9h3gPfsDOWDKneY2ChglX1UDYD30ABsAFAAdABZzIGRAnwDD8wAjAEEMzRbDqgMB2sAFYwXqAtCnAsS4AwpUJKRtFHsadUz9AMMVbwLpABM1NJEX0ZkCgYMBEyMAxRVvAukAEzUBUFAtmUwSAy4DBTER33EftQHfSwB5MxJ/AjkWKQLzL8E/cwBB6QH9LQDPDtO9ASNriQC5DQANAwCK21EFI91zHwCoL9kBqQcHBwcHKzUDowBvAQohPvU3fAQgHwCyAc8CKQMA5zMSezr7ULgFmDp/LzVQBgEGAi8FYQVgt8AFcTtlQhpCWEmfe5tmZ6IAExsDzQ8t+X8rBKtTAltbAn0jsy8Bl6utPWMDTR8Ei2kRANkDBrNHNysDBzECQWUAcwFpJ3kAiyUhAJ0BUb8AL3EfAbfNAz81KUsFWwF3YQZtAm0A+VEfAzEJDQBRSQCzAQBlAHsAM70GD/v3IZWHBwARKQAxALsjTwHZAeMPEzmXgIHwABIAGQA8AEUAQDt3gdvIEGcQZAkGTRFMdEIVEwK0D64L7REdDNkq09PgADSxB/MDWwfzA1sDWwfzB/MDWwfzA1sDWwNbA1scEvAi28gQZw9QBHUFlgWTBN4IiyZREYkHMAjaVBV0JhxPA00BBCMtSSQ7mzMTJUpMFE0LCAQ2SmyvfUADTzGzVP2QqgPTMlc5dAkGHnkSqAAyD3skNb1OhnpPcagKU0+2tYdJak5vAsY6sEAACikJm2/Dd1YGRRAfJ6kQ+ww3AbkBPw3xS9wE9QY/BM0fgRkdD9GVoAipLeEM8SbnLqWAXiP5KocF8Uv4POELUVFsD10LaQnnOmeBUgMlAREijwrhDT0IcRD3Cs1vDekRSQc9A9lJngCpBwULFR05FbkmFGKwCw05ewb/GvoLkyazEy17AAXXGiUGUQEtGwMA0y7rhbRaNVwgT2MGBwspI8sUrFAkDSlAu3hMGh8HGSWtApVDdEqLUToelyH6PEENai4XUYAH+TwJGVMLhTyiRq9FEhHWPpE9TCJNTDAEOYMsMyePCdMPiQy9fHYBXQklCbUMdRM1ERs3yQg9Bx0xlygnGQglRplgngT7owP3E9UDDwVDCUUHFwO5HDETMhUtBRGBKNsC9zbZLrcCk1aEARsFzw8pH+MQVEfkDu0InwJpA4cl7wAxFSUAGyKfCEdnAGOP3FMJLs8Iy2pwI3gDaxTrZRF3B5UOWwerHDcVwxzlcMxeD4YMKKezCV8BeQmdAWME5wgNNV+MpCBFZ1eLXBifIGVBQ14AAjUMaRWjRMGHfAKPD28SHwE5AXcHPQ0FAnsR8RFvEJkI74YINbkz/DopBFMhhyAVCisDU2zSCysm/Qz8bQGnEmYDEDRBd/Jnr2C6KBgBBx0yyUFkIfULlk/RDKAaxRhGVDIZ6AfDA/ca9yfuQVsGAwOnBxc6UTPyBMELbQiPCUMATQ6nGwfbGG4KdYzUATWPAbudA1uVhwJzkwY7Bw8Aaw+LBX3pACECqwinAAkA0wNbAD0CsQehAB0AiUUBQQMrMwEl6QKTA5cINc8BmTMB9y0EH8cMGQD7O25OAsO1AoBuZqYF4VwCkgJNOQFRKQQJUktVA7N15QDfAE8GF+NLARmvTs8e50cB43MvAMsA/wAJOQcJRQHRAfdxALsBYws1Caa3uQFR7S0AhwAZbwHbAo0A4QA5AIP1AVcAUQVd/QXXAlNNARU1HC9bZQG/AyMBNwERAH0Gz5GpzQsjBHEH1wIQHxXlAu8yB7kFAyLjE9FCyQK94lkAMhoKPAqrCqpgX2Q3CjV2PVQAEh+sPss/UgVVO1c7XDtXO1w7VztcO1c7XDtXO1wDm8Pmw+YKcF9JYe8Mqg3YRMw6TRPfYFVgNhPMLbsUxRXSJVoZQRrAJwkl6FUNDwgt12Y0CDA0eRfAAEMpbINFY4oeNApPHOtTlVT8LR8AtUumM7MNsBsZREQFS3XxYi4WEgomAmSFAmJGX1GzAV83JAKh+wJonAJmDQKfiDgfDwJmPwJmKgRyBIMDfxcDfpY5Cjl7GzmGOicnAmwhAjI6OA4CbcsCbbLzjgM3a0kvAWsA4gDlAE4JB5wMkQECD8YAEbkCdzMCdqZDAnlPRwJ4viFg30WyRvcCfEMCeswCfQ0CfPRIBEiBZygALxlJXEpfGRtK0ALRBQLQ0EsrA4hTA4fqRMmRNgLypV0HAwOyS9JMMSkH001QTbMCi0MCitzFHwshR2sJuwKOOwKOYESbhQKO3QKOYHxRuFM5AQ5S2FSJApP/ApMQAO0AIFUiVbNV1AosHymZijLleGpFPz0Cl6MC77ZYJawAXSkClpMCloCgAK1ZsFoNhVEAPwKWuQKWUlxIXNUCmc8CmWhczl0LHQKcnznGOqECnBoCn58CnryOACETNS4TAp31Ap6WALlBYThh8wKe1wKgcgGtAp6jIwKeUqljzGQrKS8CJ7MCJoICoP8CoFDbAqYzAqXSAqgDAIECp/ZogGi1AAdNaiBq1QKs5wKssgKtawKtBgJXIQJV4AKx5dsDH1JsmwKywRECsuwbbORtZ21MYwMl0QK2YD9DbpQDKUkCuGICuUsZArkue3A6cOUCvR0DLbYDMhUCvoxyBgMzdQK+HnMmc1MCw88CwwhzhnRPOUl05AM8qwEDPJ4DPcMCxYACxksCxhSNAshtVQLISALJUwLJMgJkoQLd1nh9ZXiyeSlL1AMYp2cGAmH4GfeVKHsPXpZevxUCz28Cz3AzT1fW9xejAMqxAs93AS3uA04Wfk8JAtwrAtuOAtJTA1JgA1NjAQUDVZCAjUMEzxrxZEl5A4LSg5EC2ssC2eKEFIRNp0ADhqkAMwNkEoZ1Xf0AWQLfaQLevHd7AuIz7RgB8zQrAfSfAfLWiwLr9wLpdH0DAur9AuroAP1LAb0C7o0C66CWrpcHAu5DA4XkmH1w5HGlAvMHAG0DjhqZlwL3FwORcgOSiwL3nAL53QL4apogmq+/O5siA52HAv7+AR8APZ8gAZ+3AwWRA6ZuA6bdANXJAwZuoYyiCQ0DDE0BEwEjB3EGZb1rCQC/BG/DFY8etxEAG3k9ACcDNxJRA42DAWcrJQCM8wAlAOanC6OVCLsGI6fJBgCvBRnDBvElRUYFFoAFcD9GSDNCKUK8X3kZX8QAls0FOgCQVCGbwTsuYDoZutcONxjOGJHJ/gVfBWAFXwVgBWsFYAVfBWAFXwVgBV8FYAVfBWBOHQjfjW8KCgoKbF7xMwTRA7kGN8PDAMMEr8MA70gxFroFTj5xPnhCR0K+X30/X/AAWBkzswCNBsxzzASm70aCRS4rDDMeLz49fnXfcsH5GcoscQFz13Y4HwVnBXLJycnACNdRYwgICAqEXoWTxgA7P4kACxbZBu21Kw0AjMsTAwkVAOVtJUUsJ1JCuULESUArXy9gPi9AKwnJRQYKTD9LPoA+iT54PnkCkULEUUpDX9NWV3JVEjQAc1w3A3IBE3YnX+g7QiMJb6MKaiszRCUuQrNCxDPMCcwEX9EWJzYREBEEBwIHKn6l33JCNVIfybPJtAltydPUCmhBZw/tEKsZAJOVJU1CLRuxbUHOQAo7P0s+eEJHHA8SJVRPdGM0NVrpvBoKhfUlM0JHHGUQUhEWO1xLSj8MO0ucNAqJIzVCRxv9EFsqKyA4OQgNj2nwZgp5ZNFgE2A1K3YHS2AhQQojJmC7DgpzGG1WYFUZCQYHZO9gHWCdYIVgu2BTYJlwFh8GvRbcXbG8YgtDHrMBwzPVyQonHQgkCyYBgQJ0Ajc4nVqIAwGSCsBPIgDsK3SWEtIVBa5N8gGjAo+kVwVIZwD/AEUSCDweX4ITrRQsJ8K3TwBXFDwEAB0TvzVcAtoTS20RIwDgVgZ9BBImYgA5AL4Coi8LFnezOkCnIQFjAY4KBAPh9RcGsgZSBsEAJctdsWIRu2kTkQstRw7DAcMBKgpPBGIGMDAwKCYnKTQaLg4AKRSVAFwCdl+YUZ0JdicFD3lPAdt1F9ZZKCGxuE3yBxkFVGcA/wBFEgiCBwAOLHQSjxOtQDg1z7deFRMAZ8QTAGtKb1ApIiPHADkAvgKiLy1DFtYCmBiDAlDDWNB0eo7fpaMO/aEVRRv0ATEQZBIODyMEAc8JQhCbDRgzFD4TAEMAu9YBCgCsAOkAm5I3ABwAYxvONnR+MhXJAxgKQyxL2+kkJhMbhQKDBMkSsvF0AD9BNQ6uQC7WqSQHwxEAEEIu1hkhAH2z4iQPwyJPHNWpdyYBRSpnJALzoBAEVPPsH20MxA0CCEQKRgAFyAtFAlMNwwjEDUQJRArELtapMg7DDZgJIw+TGukEIwvDFkMAqAtDEMMMBhioe+QAO3MMRAACrgnEBSPY9Q0FDnbSBoMAB8MSYxkSxAEJAPIJAAB8FWMOFtMc/HcXwxhDAC7DAvOowwAewwJdKDKHAAHDAALrFUQVwwAbwyvzpWMWv8wA/ABpAy++bcYDUKPD0KhDCwKmJ1MAAmMA5+UZwxAagwipBRL/eADfw6fDGOMCGsOjk3l6BwOpo4sAEsMOGxMAA5sAbcMOAAvDp0MJGkMDwgipnNIPAwfIqUMGAOGDAAPzABXDAAcDAAnDAGmTABrDAA7DChjDjnEWAwABYwAOcwAuUyYABsMAF8MIKQANUgC6wy4AA8MADqMq8wCyYgAcIwAB8wqpAAXOCx0V4wAHowBCwwEKAGnDAAuDAB3DAAjDCakABdIAbqcZ3QCZCCkABdIAAAFDAAfjAB2jCCkABqIACYMAGzMAbSMA5sOIAAhjAAhDABTDBAkpAAbSAOOTAAlDC6kOzPtnAAdDAG6kQFAATwAKwwwAA0MACbUDPwAHIwAZgwACE6cDAAojAApDAAoDp/MGwwAJIwADEwAQQwgAFEMAEXMAD5MADfMADcMAGRMOFiMAFUMAbqMWuwHDAMIAE0MLAGkzEgDhUwACQwAEWgAXgwUjAAbYABjDBSYBgzBaAEFNALcQBxUMegAwMngBrA0IZgJ0KxQHBREPd1N0ZzKRJwaIHAZqNT4DqQq8BwngAB4DAwt2AX56T1ocKQNXAh1GATQGC3tOxYNagkgAMQA5CQADAQEAWxLjAIOYNAEzAH7tFRk6TglSAF8NAAlYAQ+S1ACAQwQorQBiAN4dAJ1wPyeTANVzuQDX3AIeEMp9eyMgXiUAEdkBkJizKltbVVAaRMqRAAEAhyQ/SDEz6BmfVwB6ATEsOClKIRcDOF0E/832AFNt5AByAnkCRxGCOs94NjXdAwINGBonDBwPALW2AwICAgAAAAAAAAYDBQMDARrUAwAtAAAAAgEGBgYGBgYFBQUFBQUEBQYHCAkEBQUFBQQAAAICAAAAIgCNAJAAlT0A6gC7ANwApEQAwgCyAK0AqADuAKYA2gCjAOcBCAEDAMcAgQBiANIA1AEDAN4A8gCQAKkBMQDqAN8A3AsBCQ8yO9ra2tq8xuLT1tRJOB0BUgFcNU0BWgFpAWgBWwFMUUlLbhMBUxsNEAs6PhMOACcUKy0vMj5AQENDQ0RFFEYGJFdXV1dZWVhZL1pbXVxcI2NnZ2ZoZypsbnZ1eHh4eHh4enp6enp6enp6enp8fH18e2IARPIASQCaAHgAMgBm+ACOAFcAVwA3AnbvAIsABfj4AGQAk/IAnwBPAGIAZP//sACFAIUAaQBWALEAJAC2AIMCQAJDAPwA5wD+AP4A6AD/AOkA6QDoAOYALwJ7AVEBQAE+AVQBPgE+AT4BOQE4ATgBOAEcAVgXADEQCAEAUx8SHgsdHhYAjgCWAKYAUQBqIAIxAHYAbwCXAxUDJzIDIUlGTzEAkQJPAMcCVwKkAMAClgKWApYClgKWApYCiwKWApYClgKWApYClgKVApUCmAKgApcClgKWApQClAKUApQCkgKVAnUB1AKXAp8ClgKWApUeAIETBQD+DQOfAmECOh8BVBg9AuIZEjMbAU4/G1WZAXusRAFpYQEFA0FPAQYAmTEeIJdyADFoAHEANgCRA5zMk/C2jGINwjMWygIZCaXdfDILBCs5dAE7YnQBugDlhoiHhoiGiYqKhouOjIaNkI6Ij4qQipGGkoaThpSSlYaWhpeKmIaZhpqGm4aci52QnoqfhuIC4XTpAt90AIp0LHSoAIsAdHQEQwRABEIERQRDBEkERgRBBEcESQRIBEQERgRJAJ5udACrA490ALxuAQ10ANFZdHQA13QCFHQA/mJ0AP4BIQD+APwA/AD9APwDhGZ03ASMK23HAP4A/AD8AP0A/CR0dACRYnQA/gCRASEA/gCRAvQA/gCRA4RmdNwEjCttxyR0AP9idAEhAP4A/gD8APwA/QD8AP8A/AD8AP0A/AOEZnTcBIwrbcckdHQAkWJ0ASEA/gCRAP4AkQL0AP4AkQOEZnTcBIwrbcckdAJLAT50AlIBQXQCU8l0dAJfdHQDpgL0A6YDpgOnA6cDpwOnA4RmdNwEjCttxyR0dACRYnQBIQOmAJEDpgCRAvQDpgCRA4RmdNwEjCttxyR0BDh0AJEEOQCRDpU5dSgCADR03gV2CwArdAEFAM5iCnR0AF1iAAYcOgp0dACRCnQAXAEIwWZ0CnRmdHQAkWZ0CnRmdEXgAFF03gp0dEY0tlT2u3SOAQTwscwhjZZKrhYcBSfFp9XNbKiVDOD2b+cpe4/Z17mQnbtzzhaeQtE2GGj0IDNTjRUSyTxxw/RPHW/+vS7d1NfRt9z9QPZg4X7QFfhCnkvgNPIItOsC2eV6hPannZNHlZ9xrwZXIMOlu3jSoQSq78WEjwLjw1ELSlF1aBvfzwk5ZX7AUvQzjPQKbDuQ+sm4wNOp4A6AdVuRS0t1y/DZpg4R6m7FNjM9HgvW7Bi88zaMjOo6lM8wtBBdj8LP4ylv3zCXPhebMKJc066o9sF71oFW/8JXu86HJbwDID5lzw5GWLR/LhT0Qqnp2JQxNZNfcbLIzPy+YypqRm/lBmGmex+82+PisxUumSeJkALIT6rJezxMH+CTJmQtt5uwTVbL3ptmjDUQzlSIvWi8Tl7ng1NpuRn1Ng4n14Qc+3Iil7OwkvNWogLSPkn3pihIFytyIGmMhOe3n1tWsuMy9BdKyqF4Z3v2SgggTL9KVvMXPnCbRe+oOuFFP3HejBG/w9gvmfNYvg6JuWia2lcSSN1uIjBktzoIazOHPJZ7kKHPz8mRWVdW3lA8WGF9dQF6Bm673boov3BUWDU2JNcahR23GtfHKLOz/viZ+rYnZFaIznXO67CYEJ1fXuTRpZhYZkKe54xeoagkNGLs+NTZHE0rX45/XvQ2RGADX6vcAvdxIUBV27wxGm2zjZo4X3ILgAlrOFheuZ6wtsvaIj4yLY7qqawlliaIcrz2G+c3vscAnCkCuMzMmZvMfu9lLwTvfX+3cVSyPdN9ZwgDZhfjRgNJcLiJ67b9xx8JHswprbiE3v9UphotAPIgnXVIN5KmMc0piXhc6cChPnN+MRhG9adtdttQTTwSIpl8I4/j//d3sz1326qTBTpPRM/Hgh3kzqEXs8ZAk4ErQhNO8hzrQ0DLkWMA/N+91tn2MdOJnWC2FCZehkQrwzwbKOjhvZsbM95QoeL9skYyMf4srVPVJSgg7pOLUtr/n9eT99oe9nLtFRpjA9okV2Kj8h9k5HaC0oivRD8VyXkJ81tcd4fHNXPCfloIQasxsuO18/46dR2jgul/UIet2G0kRvnyONMKhHs6J26FEoqSqd+rfYjeEGwHWVDpX1fh1jBBcKGMqRepju9Y00mDVHC+Xdij/j44rKfvfjGinNs1jO/0F3jB83XCDINN/HB84axlP+3E/klktRo+vl3U/aiyMJbIodE1XSsDn6UAzIoMtUObY2+k/4gY/l+AkZJ5Sj2vQrkyLm3FoxjhDX+31UXBFf9XrAH31fFqoBmDEZvhvvpnZ87N+oZEu7U9O/nnk+QWj3x8uyoRbEnf+O5UMr9i0nHP38IF5AvzrBW8YWBUR0mIAzIvndQq9N3v/Jto3aPjPXUPl8ASdPPyAp7jENf8bk7VMM9ol9XGmlBmeDMuGqt+WzuL6CXAxXjIhCPM5vACchgMJ/8XBGLO/D1isVvGhwwHHr1DLaI5mn2Jr/b1pUD90uciDaS8cXNDzCWvNmT/PhQe5e8nTnnnkt8Ds/SIjibcum/fqDhKopxAY8AkSrPn+IGDEKOO+U3XOP6djFs2H5N9+orhOahiQk5KnEUWa+CzkVzhp8bMHRbg81qhjjXuIKbHjSLSIBKWqockGtKinY+z4/RdBUF6pcc3JmnlxVcNgrI4SEzKUZSwcD2QCyxzKve+gAmg6ZuSRkpPFa6mfThu7LJNu3H5K42uCpNvPAsoedolKV/LHe/eJ+BbaG5MG0NaSGVPRUmNFMFFSSpXEcXwbVh7UETOZZtoVNRGOIbbkig3McEtR68cG0RZAoJevWYo7Dg/lZ1CQzblWeUvVHmr8fY4Nqd9JJiH/zEX24mJviH60fAyFr0A3c4bC1j3yZU60VgJxXn8JgJXLUIsiBnmKmMYz+7yBQFBvqb2eYnuW59joZBf56/wXvWIR4R8wTmV80i1mZy+S4+BUES+hzjk0uXpC///z/IlqHZ1monzlXp8aCfhGKMti73FI1KbL1q6IKO4fuBuZ59gagjn5xU79muMpHXg6S+e+gDM/U9BKLHbl9l6o8czQKl4RUkJJiqftQG2i3BMg/TQlUYFkJDYBOOvAugYuzYSDnZbDDd/aSd9x0Oe6F+bJcHfl9+gp6L5/TgA+BdFFovbfCrQ40s5vMPw8866pNX8zyFGeFWdxIpPVp9Rg1UPOVFbFZrvaFq/YAzHQgqMWpahMYfqHpmwXfHL1/kpYmGuHFwT55mQu0dylfNuq2Oq0hTMCPwqfxnuBIPLXfci4Y1ANy+1CUipQxld/izVh16WyG2Q0CQQ9NqtAnx1HCHwDj7sYxOSB0wopZSnOzxQOcExmxrVTF2BkOthVpGfuhaGECfCJpJKpjnihY+xOT2QJxN61+9K6QSqtv2Shr82I3jgJrqBg0wELFZPjvHpvzTtaJnLK6Vb97Yn933koO/saN7fsjwNKzp4l2lJVx2orjCGzC/4ZL4zCver6aQYtC5sdoychuFE6ufOiog+VWi5UDkbmvmtah/3aArEBIi39s5ILUnlFLgilcGuz9CQshEY7fw2ouoILAYPVT/gyAIq3TFAIwVsl+ktkRz/qGfnCDGrm5gsl/l9QdvCWGsjPz3dU7XuqKfdUrr/6XIgjp4rey6AJBmCmUJMjITHVdFb5m1p+dLMCL8t55zD42cmftmLEJC0Da04YiRCVUBLLa8D071/N5UBNBXDh0LFsmhV/5B5ExOB4j3WVG/S3lfK5o+V6ELHvy6RR9n4ac+VsK4VE4yphPvV+kG9FegTBH4ZRXL2HytUHCduJazB/KykjfetYxOXTLws267aGOd+I+JhKP//+VnXmS90OD/jvLcVu0asyqcuYN1mSb6XTlCkqv1vigZPIYwNF/zpWcT1GR/6aEIRjkh0yhg4LXJfaGobYJTY4JI58KiAKgmmgAKWdl5nYCeLqavRJGQNuYuZtZFGx+IkI4w4NS2xwbetNMunOjBu/hmKCI/w7tfiiyUd//4rbTeWt4izBY8YvGIN6vyKYmP/8X8wHKCeN+WRcKM70+tXKNGyevU9H2Dg5BsljnTf8YbsJ1TmMs74Ce2XlHisleguhyeg44rQOHZuw/6HTkhnnurK2d62q6yS7210SsAIaR+jXMQA+svkrLpsUY+F30Uw89uOdGAR6vo4FIME0EfVVeHTu6eKicfhSqOeXJhbftcd08sWEnNUL1C9fnprTgd83IMut8onVUF0hvqzZfHduPjbjwEXIcoYmy+P6tcJZHmeOv6VrvEdkHDJecjHuHeWANe79VG662qTjA/HCvumVv3qL+LrOcpqGps2ZGwQdFJ7PU4iuyRlBrwfO+xnPyr47s2cXVbWzAyznDiBGjCM3ksxjjqM62GE9C8f5U38kB3VjtabKp/nRdvMESPGDG90bWRLAt1Qk5DyLuazRR1YzdC1c+hZXvAWV8xA72S4A8B67vjVhbba3MMop293FeEXpe7zItMWrJG/LOH9ByOXmYnNJfjmfuX9KbrpgLOba4nZ+fl8Gbdv/ihv+6wFGKHCYrVwmhFC0J3V2bn2tIB1wCc1CST3d3X2OyxhguXcs4sm679UngzofuSeBewMFJboIQHbUh/m2JhW2hG9DIvG2t7yZIzKBTz9wBtnNC+2pCRYhSIuQ1j8xsz5VvqnyUIthvuoyyu7fNIrg/KQUVmGQaqkqZk/Vx5b33/gsEs8yX7SC1J+NV4icz6bvIE7C5G6McBaI8rVg56q5QBJWxn/87Q1sPK4+sQa8fLU5gXo4paaq4cOcQ4wR0VBHPGjKh+UlPCbA1nLXyEUX45qZ8J7/Ln4FPJE2TdzD0Z8MLSNQiykMMmSyOCiFfy84Rq60emYB2vD09KjYwsoIpeDcBDTElBbXxND72yhd9pC/1CMid/5HUMvAL27OtcIJDzNKpRPNqPOpyt2aPGz9QWIs9hQ9LiX5s8m9hjTUu/f7MyIatjjd+tSfQ3ufZxPpmJhTaBtZtKLUcfOCUqADuO+QoH8B9v6U+P0HV1GLQmtoNFTb3s74ivZgjES0qfK+8RdGgBbcCMSy8eBvh98+et1KIFqSe1KQPyXULBMTsIYnysIwiZBJYdI20vseV+wuJkcqGemehKjaAb9L57xZm3g2zX0bZ2xk/fU+bCo7TlnbW7JuF1YdURo/2Gw7VclDG1W7LOtas2LX4upifZ/23rzpsnY/ALfRgrcWP5hYmV9VxVOQA1fZvp9F2UNU+7d7xRyVm5wiLp3/0dlV7vdw1PMiZrbDAYzIVqEjRY2YU03sJhPnlwIPcZUG5ltL6S8XCxU1eYS5cjr34veBmXAvy7yN4ZjArIG0dfD/5UpBNlX1ZPoxJOwyqRi3wQWtOzd4oNKh0LkoTm8cwqgIfKhqqGOhwo71I+zXnMemTv2B2AUzABWyFztGgGULjDDzWYwJUVBTjKCn5K2QGMK1CQT7SzziOjo+BhAmqBjzuc3xYym2eedGeOIRJVyTwDw37iCMe4g5Vbnsb5ZBdxOAnMT7HU4DHpxWGuQ7GeiY30Cpbvzss55+5Km1YsbD5ea3NI9QNYIXol5apgSu9dZ8f8xS5dtHpido5BclDuLWY4lhik0tbJa07yJhH0BOyEut/GRbYTS6RfiTYWGMCkNpfSHi7HvdiTglEVHKZXaVhezH4kkXiIvKopYAlPusftpE4a5IZwvw1x/eLvoDIh/zpo9FiQInsTb2SAkKHV42XYBjpJDg4374XiVb3ws4qM0s9eSQ5HzsMU4OZJKuopFjBM+dAZEl8RUMx5uU2N486Kr141tVsGQfGjORYMCJAMsxELeNT4RmWjRcpdTGBwcx6XN9drWqPmJzcrGrH4+DRc7+n1w3kPZwu0BkNr6hQrqgo7JTB9A5kdJ/H7P4cWBMwsmuixAzJB3yrQpnGIq90lxAXLzDCdn1LPibsRt7rHNjgQBklRgPZ8vTbjXdgXrTWQsK5MdrXXQVPp0Rinq3frzZKJ0qD6Qhc40VzAraUXlob1gvkhK3vpmHgI6FRlQZNx6eRqkp0zy4AQlX813fAPtL3jMRaitGFFjo0zmErloC+h+YYdVQ6k4F/epxAoF0BmqEoKNTt6j4vQZNQ2BoqF9Vj53TOIoNmDiu9Xp15RkIgQIGcoLpfoIbenzpGUAtqFJp5W+LLnx38jHeECTJ/navKY1NWfN0sY1T8/pB8kIH3DU3DX+u6W3YwpypBMYOhbSxGjq84RZ84fWJow8pyHqn4S/9J15EcCMsXqrfwyd9mhiu3+rEo9pPpoJkdZqHjra4NvzFwuThNKy6hao/SlLw3ZADUcUp3w3SRVfW2rhl80zOgTYnKE0Hs2qp1J6H3xqPqIkvUDRMFDYyRbsFI3M9MEyovPk8rlw7/0a81cDVLmBsR2ze2pBuKb23fbeZC0uXoIvDppfTwIDxk1Oq2dGesGc+oJXWJLGkOha3CX+DUnzgAp9HGH9RsPZN63Hn4RMA5eSVhPHO+9RcRb/IOgtW31V1Q5IPGtoxPjC+MEJbVlIMYADd9aHYWUIQKopuPOHmoqSkubnAKnzgKHqgIOfW5RdAgotN6BN+O2ZYHkuemLnvQ8U9THVrS1RtLmKbcC7PeeDsYznvqzeg6VCNwmr0Yyx1wnLjyT84BZz3EJyCptD3yeueAyDWIs0L2qs/VQ3HUyqfrja0V1LdDzqAikeWuV4sc7RLIB69jEIBjCkyZedoUHqCrOvShVzyd73OdrJW0hPOuQv2qOoHDc9xVb6Yu6uq3Xqp2ZaH46A7lzevbxQEmfrzvAYSJuZ4WDk1Hz3QX1LVdiUK0EvlAGAYlG3Md30r7dcPN63yqBCIj25prpvZP0nI4+EgWoFG95V596CurXpKRBGRjQlHCvy5Ib/iW8nZJWwrET3mgd6mEhfP4KCuaLjopWs7h+MdXFdIv8dHQJgg1xi1eYqB0uDYjxwVmri0Sv5XKut/onqapC+FQiC2C1lvYJ9MVco6yDYsS3AANUfMtvtbYI2hfwZatiSsnoUeMZd34GVjkMMKA+XnjJpXgRW2SHTZplVowPmJsvXy6w3cfO1AK2dvtZEKTkC/TY9LFiKHCG0DnrMQdGm2lzlBHM9iEYynH2UcVMhUEjsc0oDBTgo2ZSQ1gzkAHeWeBXYFjYLuuf8yzTCy7/RFR81WDjXMbq2BOH5dURnxo6oivmxL3cKzKInlZkD31nvpHB9Kk7GfcfE1t+1V64b9LtgeJGlpRFxQCAqWJ5DoY77ski8gsOEOr2uywZaoO/NGa0X0y1pNQHBi3b2SUGNpcZxDT7rLbBf1FSnQ8guxGW3W+36BW0gBje4DOz6Ba6SVk0xiKgt+q2JOFyr4SYfnu+Ic1QZYIuwHBrgzr6UvOcSCzPTOo7D6IC4ISeS7zkl4h+2VoeHpnG/uWR3+ysNgPcOIXQbv0n4mr3BwQcdKJxgPSeyuP/z1Jjg4e9nUvoXegqQVIE30EHx5GHv+FAVUNTowYDJgyFhf5IvlYmEqRif6+WN1MkEJmDcQITx9FX23a4mxy1AQRsOHO/+eImX9l8EMJI3oPWzVXxSOeHU1dUWYr2uAA7AMb+vAEZSbU3qob9ibCyXeypEMpZ6863o6QPqlqGHZkuWABSTVNd4cOh9hv3qEpSx2Zy/DJMP6cItEmiBJ5PFqQnDEIt3NrA3COlOSgz43D7gpNFNJ5MBh4oFzhDPiglC2ypsNU4ISywY2erkyb1NC3Qh/IfWj0eDgZI4/ln8WPfBsT3meTjq1Uqt1E7Zl/qftqkx6aM9KueMCekSnMrcHj1CqTWWzEzPsZGcDe3Ue4Ws+XFYVxNbOFF8ezkvQGR6ZOtOLU2lQEnMBStx47vE6Pb7AYMBRj2OOfZXfisjJnpTfSNjo6sZ6qSvNxZNmDeS7Gk3yYyCk1HtKN2UnhMIjOXUzAqDv90lx9O/q/AT1ZMnit5XQe9wmQxnE/WSH0CqZ9/2Hy+Sfmpeg8RwsHI5Z8kC8H293m/LHVVM/BA7HaTJYg5Enk7M/xWpq0192ACfBai2LA/qrCjCr6Dh1BIMzMXINBmX96MJ5Hn2nxln/RXPFhwHxUmSV0EV2V0jm86/dxxuYSU1W7sVkEbN9EzkG0QFwPhyHKyb3t+Fj5WoUUTErcazE/N6EW6Lvp0d//SDPj7EV9UdJN+Amnf3Wwk3A0SlJ9Z00yvXZ7n3z70G47Hfsow8Wq1JXcfwnA+Yxa5mFsgV464KKP4T31wqIgzFPd3eCe3j5ory5fBF2hgCFyVFrLzI9eetNXvM7oQqyFgDo4CTp/hDV9NMX9JDHQ/nyHTLvZLNLF6ftn2OxjGm8+PqOwhxnPHWipkE/8wbtyri80Sr7pMNkQGMfo4ZYK9OcCC4ESVFFbLMIvlxSoRqWie0wxqnLfcLSXMSpMMQEJYDVObYsXIQNv4TGNwjq1kvT1UOkicTrG3IaBZ3XdScS3u8sgeZPVpOLkbiF940FjbCeNRINNvDbd01EPBrTCPpm12m43ze1bBB59Ia6Ovhnur/Nvx3IxwSWol+3H2qfCJR8df6aQf4v6WiONxkK+IqT4pKQrZK/LplgDI/PJZbOep8dtbV7oCr6CgfpWa8NczOkPx81iSHbsNhVSJBOtrLIMrL31LK9TqHqAbAHe0RLmmV806kRLDLNEhUEJfm9u0sxpkL93Zgd6rw+tqBfTMi59xqXHLXSHwSbSBl0EK0+loECOPtrl+/nsaFe197di4yUgoe4jKoAJDXc6DGDjrQOoFDWZJ9HXwt8xDrQP+7aRwWKWI1GF8s8O4KzxWBBcwnl3vnl1Oez3oh6Ea1vjR7/z7DDTrFtqU2W/KAEzAuXDNZ7MY73MF216dzdSbWmUp4lcm7keJfWaMHgut9x5C9mj66Z0lJ+yhsjVvyiWrfk1lzPOTdhG15Y7gQlXtacvI7qv/XNSscDwqkgwHT/gUsD5yB7LdRRvJxQGYINn9hTpodKFVSTPrtGvyQw+HlRFXIkodErAGu9Iy1YpfSPc3jkFh5CX3lPxv7aqjE/JAfTIpEjGb/H7MO0e2vsViSW1qa/Lmi4/n4DEI3g7lYrcanspDfEpKkdV1OjSLOy0BCUqVoECaB55vs06rXl4jqmLsPsFM/7vYJ0vrBhDCm/00A/H81l1uekJ/6Lml3Hb9+NKiLqATJmDpyzfYZFHumEjC662L0Bwkxi7E9U4cQA0XMVDuMYAIeLMPgQaMVOd8fmt5SflFIfuBoszeAw7ow5gXPE2Y/yBc/7jExARUf/BxIHQBF5Sn3i61w4z5xJdCyO1F1X3+3ax+JSvMeZ7S6QSKp1Fp/sjYz6Z+VgCZzibGeEoujryfMulH7Rai5kAft9ebcW50DyJr2uo2z97mTWIu45YsSnNSMrrNUuG1XsYBtD9TDYzQffKB87vWbkM4EbPAFgoBV4GQS+vtFDUqOFAoi1nTtmIOvg38N4hT2Sn8r8clmBCXspBlMBYTnrqFJGBT3wZOzAyJDre9dHH7+x7qaaKDOB4UQALD5ecS0DE4obubQEiuJZ0EpBVpLuYcce8Aa4PYd/V4DLDAJBYKQPCWTcrEaZ5HYbJi11Gd6hjGom1ii18VHYnG28NKpkz2UKVPxlhYSp8uZr367iOmoy7zsxehW9wzcy2zG0a80PBMCRQMb32hnaHeOR8fnNDzZhaNYhkOdDsBUZ3loDMa1YP0uS0cjUP3b/6DBlqmZOeNABDsLl5BI5QJups8uxAuWJdkUB/pO6Zax6tsg7fN5mjjDgMGngO+DPcKqiHIDbFIGudxtPTIyDi9SFMKBDcfdGQRv41q1AqmxgkVfJMnP8w/Bc7N9/TR6C7mGObFqFkIEom8sKi2xYqJLTCHK7cxzaZvqODo22c3wisBCP4HeAgcRbNPAsBkNRhSmD48dHupdBRw4mIvtS5oeF6zeT1KMCyhMnmhpkFAGWnGscoNkwvQ8ZM5lE/vgTHFYL99OuNxdFBxTEDd5v2qLR8y9WkXsWgG6kZNndFG+pO/UAkOCipqIhL3hq7cRSdrCq7YhUsTocEcnaFa6nVkhnSeRYUA1YO0z5itF9Sly3VlxYDw239TJJH6f3EUfYO5lb7bcFcz8Bp7Oo8QmnsUHOz/fagVUBtKEw1iT88j+aKkv8cscKNkMxjYr8344D1kFoZ7/td1W6LCNYN594301tUGRmFjAzeRg5vyoM1F6+bJZ/Q54jN/k8SFd3DxPTYaAUsivsBfgTn7Mx8H2SpPt4GOdYRnEJOH6jHM2p6SgB0gzIRq6fHxGMmSmqaPCmlfwxiuloaVIitLGN8wie2CDWhkzLoCJcODh7KIOAqbHEvXdUxaS4TTTs07Clzj/6GmVs9kiZDerMxEnhUB6QQPlcfqkG9882RqHoLiHGBoHfQuXIsAG8GTAtao2KVwRnvvam8jo1e312GQAKWEa4sUVEAMG4G6ckcONDwRcg1e2D3+ohXgY4UAWF8wHKQMrSnzCgfFpsxh+aHXMGtPQroQasRY4U6UdG0rz1Vjbka0MekOGRZQEvqQFlxseFor8zWFgHek3v29+WqN6gaK5gZOTOMZzpQIC1201LkMCXild3vWXSc5UX9xcFYfbRPzGFa1FDcPfPB/jUEq/FeGt419CI3YmBlVoHsa4KdcwQP5ZSwHHhFJ7/Ph/Rap/4vmG91eDwPP0lDfCDRCLszTqfzM71xpmiKi2HwS4WlqvGNwtvwF5Dqpn6KTq8ax00UMPkxDcZrEEEsIvHiUXXEphdb4GB4FymlPwBz4Gperqq5pW7TQ6/yNRhW8VT5NhuP0udlxo4gILq5ZxAZk8ZGh3g4CqxJlPKY7AQxupfUcVpWT5VItp1+30UqoyP4wWsRo3olRRgkWZZ2ZN6VC3OZFeXB8NbnUrSdikNptD1QiGuKkr8EmSR/AK9Rw+FF3s5uwuPbvHGiPeFOViltMK7AUaOsq9+x9cndk3iJEE5LKZRlWJbKOZweROzmPNVPkjE3K/TyA57Rs68TkZ3MR8akKpm7cFjnjPd/DdkWjgYoKHSr5Wu5ssoBYU4acRs5g2DHxUmdq8VXOXRbunD8QN0LhgkssgahcdoYsNvuXGUK/KXD/7oFb+VGdhqIn02veuM5bLudJOc2Ky0GMaG4W/xWBxIJcL7yliJOXOpx0AkBqUgzlDczmLT4iILXDxxtRR1oZa2JWFgiAb43obrJnG/TZC2KSK2wqOzRZTXavZZFMb1f3bXvVaNaK828w9TO610gk8JNf3gMfETzXXsbcvRGCG9JWQZ6+cDPqc4466Yo2RcKH+PILeKOqtnlbInR3MmBeGG3FH10yzkybuqEC2HSQwpA0An7d9+73BkDUTm30bZmoP/RGbgFN+GrCOfADgqr0WbI1a1okpFms8iHYw9hm0zUvlEMivBRxModrbJJ+9/p3jUdQQ9BCtQdxnOGrT5dzRUmw0593/mbRSdBg0nRvRZM5/E16m7ZHmDEtWhwvfdZCZ8J8M12W0yRMszXamWfQTwIZ4ayYktrnscQuWr8idp3PjT2eF/jmtdhIfcpMnb+IfZY2FebW6UY/AK3jP4u3Tu4zE4qlnQgLFbM19EBIsNf7KhjdbqQ/D6yiDb+NlEi2SKD+ivXVUK8ib0oBo366gXkR8ZxGjpJIDcEgZPa9TcYe0TIbiPl/rPUQDu3XBJ9X/GNq3FAUsKsll57DzaGMrjcT+gctp+9MLYXCq+sqP81eVQ0r9lt+gcQfZbACRbEjvlMskztZG8gbC8Qn9tt26Q7y7nDrbZq/LEz7kR6Jc6pg3N9rVX8Y5MJrGlML9p9lU4jbTkKqCveeZUJjHB03m2KRKR2TytoFkTXOLg7keU1s1lrPMQJpoOKLuAAC+y1HlJucU6ysB5hsXhvSPPLq5J7JtnqHKZ4vYjC4Vy8153QY+6780xDuGARsGbOs1WqzH0QS765rnSKEbbKlkO8oI/VDwUd0is13tKpqILu1mDJFNy/iJAWcvDgjxvusIT+PGz3ST/J9r9Mtfd0jpaGeiLYIqXc7DiHSS8TcjFVksi66PEkxW1z6ujbLLUGNNYnzOWpH8BZGK4bCK7iR+MbIv8ncDAz1u4StN3vTTzewr9IQjk9wxFxn+6N1ddKs0vffJiS08N3a4G1SVrlZ97Q/M+8G9fe5AP6d9/Qq4WRnORVhofPIKEdCr3llspUfE0oKIIYoByBRPh+bX1HLS3JWGJRhIvE1aW4NTd8ePi4Z+kXb+Z8snYfSNcqijhAgVsx4RCM54cXUiYkjeBmmC4ajOHrChoELscJJC7+9jjMjw5BagZKlgRMiSNYz7h7vvZIoQqbtQmspc0cUk1G/73iXtSpROl5wtLgQi0mW2Ex8i3WULhcggx6E1LMVHUsdc9GHI1PH3U2Ko0PyGdn9KdVOLm7FPBui0i9a0HpA60MsewVE4z8CAt5d401Gv6zXlIT5Ybit1VIA0FCs7wtvYreru1fUyW3oLAZ/+aTnZrOcYRNVA8spoRtlRoWflsRClFcgzkqiHOrf0/SVw+EpVaFlJ0g4Kxq1MMOmiQdpMNpte8lMMQqm6cIFXlnGbfJllysKDi+0JJMotkqgIxOSQgU9dn/lWkeVf8nUm3iwX2Nl3WDw9i6AUK3vBAbZZrcJpDQ/N64AVwjT07Jef30GSSmtNu2WlW7YoyW2FlWfZFQUwk867EdLYKk9VG6JgEnBiBxkY7LMo4YLQJJlAo9l/oTvJkSARDF/XtyAzM8O2t3eT/iXa6wDN3WewNmQHdPfsxChU/KtLG2Mn8i4ZqKdSlIaBZadxJmRzVS/o4yA65RTSViq60oa395Lqw0pzY4SipwE0SXXsKV+GZraGSkr/RW08wPRvqvSUkYBMA9lPx4m24az+IHmCbXA+0faxTRE9wuGeO06DIXa6QlKJ3puIyiuAVfPr736vzo2pBirS+Vxel3TMm3JKhz9o2ZoRvaFVpIkykb0Hcm4oHFBMcNSNj7/4GJt43ogonY2Vg4nsDQIWxAcorpXACzgBqQPjYsE/VUpXpwNManEru4NwMCFPkXvMoqvoeLN3qyu/N1eWEHttMD65v19l/0kH2mR35iv/FI+yjoHJ9gPMz67af3Mq/BoWXqu3rphiWMXVkmnPSEkpGpUI2h1MThideGFEOK6YZHPwYzMBvpNC7+ZHxPb7epfefGyIB4JzO9DTNEYnDLVVHdQyvOEVefrk6Uv5kTQYVYWWdqrdcIl7yljwwIWdfQ/y+2QB3eR/qxYObuYyB4gTbo2in4PzarU1sO9nETkmj9/AoxDA+JM3GMqQtJR4jtduHtnoCLxd1gQUscHRB/MoRYIEsP2pDZ9KvHgtlk1iTbWWbHhohwFEYX7y51fUV2nuUmnoUcqnWIQAAgl9LTVX+Bc0QGNEhChxHR4YjfE51PUdGfsSFE6ck7BL3/hTf9jLq4G1IafINxOLKeAtO7quulYvH5YOBc+zX7CrMgWnW47/jfRsWnJjYYoE7xMfWV2HN2iyIqLI");const t=()=>s(e),r=()=>new Set(t()),i=(e,t)=>t.forEach((t=>e.add(t)));j=new Map(u(e)),U=r(),L=t(),D=new Set(t().map((e=>L[e]))),L=new Set(L),F=r(),H=r();let o=a(e),l=e();const f=()=>{let e=new Set;return t().forEach((t=>i(e,o[t]))),i(e,t()),e};z=c((t=>{let r=c(e).map((e=>e+96));if(r.length){let n=t>=l;return r[0]-=32,r=g(r),n&&(r=`Restricted[${r}]`),{N:r,P:f(),Q:f(),M:!e(),R:n}}})),q=r(),G=new Map;let h=t().concat(C(q)).sort(((e,t)=>e-t));h.forEach(((t,r)=>{let n=e(),i=h[r]=n?h[r-n]:{V:[],M:new Map};i.V.push(t),q.has(t)||G.set(t,i)}));for(let{V:e,M:t}of new Set(G.values())){let r=[];for(let t of e){let e=z.filter((e=>R(e,t))),n=r.find((({G:t})=>e.some((e=>t.has(e)))));n||(n={G:new Set,V:[]},r.push(n)),n.V.push(t),i(n.G,e)}let n=r.flatMap((e=>C(e.G)));for(let{G:e,V:i}of r){let r=new Set(n.filter((t=>!e.has(t))));for(let e of i)t.set(e,r)}}W=new Set;let d=new Set;const p=e=>W.has(e)?d.add(e):W.add(e);for(let e of z){for(let t of e.P)p(t);for(let t of e.Q)p(t)}for(let e of W)G.has(e)||d.has(e)||G.set(e,1);i(W,B(W)),V=function(e){let t=[],r=s(e);return function e({S:r,B:n},i,o){if(!(4&r&&o===i[i.length-1])){2&r&&(o=i[i.length-1]),1&r&&t.push(i);for(let t of n)for(let r of t.Q)e(t,[...i,r],o)}}(function t(n){return{S:e(),B:c((()=>{let n=s(e).map((e=>r[e]));if(n.length)return t(n)})),Q:n}}([]),[]),t}(e).map((e=>N.from(e))).sort(b),K=new Map;for(let e of V){let t=[K];for(let r of e){let e=t.map((e=>{let t=e.get(r);return t||(t=new Map,e.set(r,t)),t}));65039===r?t.push(...e):t=e}for(let r of t)r.V=e}}function J(e){return(X(e)?"":`${Q(Z([e]))} `)+d(e)}function Q(e){return`"${e}"‎`}function Z(e,t=1/0,r=d){let n=[];Y(e[0])&&n.push("◌"),e.length>t&&(t>>=1,e=[...e.slice(0,t),8230,...e.slice(-t)]);let i=0,o=e.length;for(let t=0;t<o;t++){let o=e[t];X(o)&&(n.push(g(e.slice(i,t))),n.push(r(o)),i=t+1)}return n.push(g(e.slice(i,o))),n.join("")}function Y(e){return $(),L.has(e)}function X(e){return $(),F.has(e)}function ee(e,t,r){let n=0;for(;;){let i=e.indexOf(t,n);if(i<0)break;e[i]=r,n=i+1}}function te(e,t,n){if(!e)return[];$();let i=0;return e.split(I).map((e=>{let o=p(e),s={input:o,offset:i};i+=o.length+1;try{let e,i=s.tokens=se(o,t,n),a=i.length;if(!a)throw new Error("empty label");let u=s.output=i.flat();if(function(e){for(let t=e.lastIndexOf(95);t>0;)if(95!==e[--t])throw new Error("underscore allowed only at start")}(u),!(s.emoji=a>1||i[0].is_emoji)&&u.every((e=>e<128)))!function(e){if(e.length>=4&&45==e[2]&&45==e[3])throw new Error(`invalid label extension: "${g(e.slice(0,4))}"`)}(u),e="ASCII";else{let t=i.flatMap((e=>e.is_emoji?[]:e));if(t.length){if(L.has(u[0]))throw oe("leading combining mark");for(let e=1;e<a;e++){let t=i[e];if(!t.is_emoji&&L.has(t[0]))throw oe(`emoji + combining mark: "${g(i[e-1])} + ${Z([t[0]])}"`)}!function(e){let t=e[0],n=r.get(t);if(n)throw oe(`leading ${n}`);let i=e.length,o=-1;for(let s=1;s<i;s++){t=e[s];let i=r.get(t);if(i){if(o==s)throw oe(`${n} + ${i}`);o=s+1,n=i}}if(o==i)throw oe(`trailing ${n}`)}(u);let n=C(new Set(t)),[o]=function(e){let t=z;for(let r of e){let e=t.filter((e=>R(e,r)));if(!e.length)throw z.some((e=>R(e,r)))?ie(t[0],r):ne(r);if(t=e,1==e.length)break}return t}(n);!function(e,t){for(let r of t)if(!R(e,r))throw ie(e,r);if(e.M){let e=B(t);for(let t=1,r=e.length;t<r;t++)if(D.has(e[t])){let n=t+1;for(let i;n<r&&D.has(i=e[n]);n++)for(let r=t;r<n;r++)if(e[r]==i)throw new Error(`duplicate non-spacing marks: ${J(i)}`);if(n-t>4)throw new Error(`excessive non-spacing marks: ${Q(Z(e.slice(t-1,n)))} (${n-t}/4)`);t=n}}}(o,t),function(e,t){let r,n=[];for(let e of t){let t=G.get(e);if(1===t)return;if(t){let n=t.M.get(e);if(r=r?r.filter((e=>n.has(e))):C(n),!r.length)return}else n.push(e)}if(r)for(let t of r)if(n.every((e=>R(t,e))))throw new Error(`whole-script confusable: ${e.N}/${t.N}`)}(o,n),e=o.N}else e="Emoji"}s.type=e}catch(e){s.error=e}return s}))}function re(e){return e.map((({input:t,error:r,output:n})=>{if(r){let n=r.message;throw new Error(1==e.length?n:`Invalid label ${Q(Z(t,63))}: ${n}`)}return g(n)})).join(I)}function ne(e){return new Error(`disallowed character: ${J(e)}`)}function ie(e,t){let r=J(t),n=z.find((e=>e.P.has(t)));return n&&(r=`${n.N} ${r}`),new Error(`illegal mixture: ${e.N} + ${r}`)}function oe(e){return new Error(`illegal placement: ${e}`)}function se(e,t,r){let n=[],i=[];for(e=e.slice().reverse();e.length;){let o=ue(e);if(o)i.length&&(n.push(t(i)),i=[]),n.push(r(o));else{let t=e.pop();if(W.has(t))i.push(t);else{let e=j.get(t);if(e)i.push(...e);else if(!U.has(t))throw ne(t)}}}return i.length&&n.push(t(i)),n}function ae(e){return e.filter((e=>65039!=e))}function ue(e,t){let r,n=K,i=e.length;for(;i&&(n=n.get(e[--i]),n);){let{V:o}=n;o&&(r=o,t&&t.push(...e.slice(i).reverse()),e.length=i)}return r}const ce="valid",le="mapped",fe="ignored";function he(e){return e==ce||e==le}function de(e){return e.some((e=>H.has(e)))}function pe(e){for(let t=0;t<e.length;t++)if(e[t].type==ce){let r=t+1;for(;r<e.length&&e[r].type==ce;)r++;e.splice(t,r-t,{type:ce,cps:e.slice(t,r).flatMap((e=>e.cps))})}return e}t.ens_beautify=function(e){let t=te(e,T,(e=>e));for(let{type:e,output:r,error:n}of t){if(n)break;"Greek"!==e&&ee(r,958,926)}return re(t)},t.ens_emoji=function(){return $(),V.map((e=>e.slice()))},t.ens_normalize=function(e){return re(te(e,T,ae))},t.ens_normalize_fragment=function(e,t){$();let r=t?B:T;return e.split(I).map((e=>g(se(p(e),r,ae).flat()))).join(I)},t.ens_split=function(e,t){return te(e,T,t?e=>e.slice():ae)},t.ens_tokenize=function e(t,{nf:r=!0}={}){$();let n=p(t).reverse(),i=[],o=[];for(;n.length;){let e=ue(n,i);if(e)o.push({type:"emoji",emoji:e.slice(),input:i,cps:ae(e)}),i=[];else{let e=n.pop();if(46==e)o.push({type:"stop",cp:e});else if(W.has(e))o.push({type:ce,cps:[e]});else if(U.has(e))o.push({type:fe,cp:e});else{let t=j.get(e);t?o.push({type:le,cp:e,cps:t.slice()}):o.push({type:"disallowed",cp:e})}}}if(r)for(let t=0,r=-1;t<o.length;t++){let n=o[t];if(he(n.type))if(de(n.cps)){let n=t+1;for(let e=n;e<o.length;e++){let{type:t,cps:r}=o[e];if(he(t)){if(!de(r))break;n=e+1}else if(t!==fe)break}r<0&&(r=t);let i=o.slice(r,n),s=i.flatMap((e=>he(e.type)?e.cps:[])),a=T(s);b(a,s)?(o.splice(r,n-r,{type:"nfc",input:s,cps:a,tokens0:pe(i),tokens:e(g(a),{nf:!1})}),t=r):t=n-1,r=-1}else r=t;else n.type!==fe&&(r=-1)}return pe(o)},t.is_combining_mark=Y,t.nfc=T,t.nfd=B,t.safe_str_from_cps=Z,t.should_escape=X},3996:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanPlugin=t.EtherscanProvider=t.ChainstackProvider=t.CloudflareProvider=t.AnkrProvider=t.BlockscoutProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.copyRequest=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=t.NonceManager=t.Network=t.MulticoinProviderPlugin=t.EnsResolver=t.getDefaultProvider=t.showThrottleMessage=t.VoidSigner=t.AbstractSigner=t.UnmanagedSubscriber=t.AbstractProvider=void 0;var n=r(38672);Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return n.AbstractProvider}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return n.UnmanagedSubscriber}});var i=r(23071);Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return i.AbstractSigner}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return i.VoidSigner}});var o=r(89973);Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return o.showThrottleMessage}});var s=r(72347);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return s.getDefaultProvider}});var a=r(41691);Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return a.EnsResolver}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return a.MulticoinProviderPlugin}});var u=r(57698);Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return u.Network}});var c=r(37215);Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return c.NonceManager}});var l=r(94491);Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}});var f=r(63807);Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return f.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return f.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return f.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return f.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return f.TransactionResponse}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return f.copyRequest}});var h=r(49902);Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return h.FallbackProvider}});var d=r(42371);Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return d.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return d.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return d.JsonRpcSigner}});var p=r(20254);Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return p.BrowserProvider}});var g=r(97841);Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return g.AlchemyProvider}});var b=r(99349);Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return b.BlockscoutProvider}});var y=r(6806);Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return y.AnkrProvider}});var m=r(42271);Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return m.CloudflareProvider}});var v=r(48907);Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return v.ChainstackProvider}});var w=r(5047);Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return w.EtherscanProvider}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return w.EtherscanPlugin}});var E=r(95855);Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return E.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return E.InfuraWebSocketProvider}});var A=r(2398);Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return A.PocketProvider}});var _=r(28817);Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return _.QuickNodeProvider}});const S=r(64584);Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return S.IpcSocketProvider}});var P=r(74945);Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return P.SocketProvider}});var k=r(50873);Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return k.WebSocketProvider}});var O=r(74945);Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return O.SocketSubscriber}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return O.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return O.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return O.SocketEventSubscriber}})},4643:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunStorage=void 0,t.ShogunStorage=class{store;isTestMode;useLocalStorage;constructor(){if(this.store=new Map,this.isTestMode=!1,this.useLocalStorage=!1,"undefined"!=typeof localStorage&&!this.isTestMode)try{localStorage.setItem("_shogun_test","_shogun_test"),localStorage.removeItem("_shogun_test"),this.useLocalStorage=!0;const e=localStorage.getItem("shogun_keypair");e&&this.store.set("keypair",JSON.parse(e))}catch(e){this.useLocalStorage=!1,this.isTestMode||console.error("localStorage not available:",e)}}async getPair(){return this.getPairSync()}getPairSync(){return this.store.get("keypair")||null}async setPair(e){if(this.store.set("keypair",e),this.useLocalStorage)try{localStorage.setItem("shogun_keypair",JSON.stringify(e))}catch(e){this.isTestMode||console.error("Error saving data to localStorage:",e)}}clearAll(){if(this.store.clear(),this.useLocalStorage)try{localStorage.removeItem("shogun_keypair")}catch(e){this.isTestMode||console.error("Error removing data from localStorage:",e)}}getItem(e){const t=this.store.get(e);return void 0!==t?JSON.stringify(t):null}setItem(e,t){try{const r=JSON.parse(t);if(this.store.set(e,r),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}catch(r){if(this.store.set(e,t),this.useLocalStorage)try{localStorage.setItem(e,t)}catch(t){this.isTestMode||console.error(`Error saving ${e} to localStorage:`,t)}}}removeItem(e){if(this.store.delete(e),this.useLocalStorage)try{localStorage.removeItem(e)}catch(t){this.isTestMode||console.error(`Error removing ${e} from localStorage:`,t)}}}},4718:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r}function f(e,t){return l(e.toString(16).padStart(2*t,"0"))}function h(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=h,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const d=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=d(e),i=d(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),u=(e=d())=>{i=a(p([0]),e),n=a(),0!==e.length&&(i=a(p([1]),e),n=a())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return h(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(c()));)u();return s(),r}};const g={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=g[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},4883:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(15717),i=r(4718),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){u(e),u(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),p=s(r,2),g=new Array(f),b=n((0,i.concatBytes)(d,e,p,s(0,1),h));g[0]=n((0,i.concatBytes)(b,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(b,g[e-1]),s(e+1,1),h];g[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:d,expand:p,DST:g}=r;u(e),c(t);const b=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),y=s.toString(2).length,m=Math.ceil((y+a)/8),v=t*h*m;let w;if("xmd"===p)w=l(e,b,v,d);else if("xof"===p)w=f(e,b,v,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=m*(r+e*h),a=w.subarray(i,i+m);t[r]=(0,n.mod)(o(a),s)}E[e]=t}return E}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},4933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebauthnPlugin=void 0;const n=r(34586),i=r(37510),o=r(43188),s=r(45628),a=r(23358);class u extends n.BasePlugin{name="webauthn";version="1.0.0";description="Provides WebAuthn authentication functionality for ShogunCore";webauthn=null;signer=null;initialize(e){super.initialize(e),this.webauthn=new i.Webauthn(e.gun),this.signer=new o.WebAuthnSigner(this.webauthn),(0,s.log)("[webauthnPlugin] WebAuthn plugin initialized with signer support")}destroy(){this.webauthn=null,this.signer=null,super.destroy(),(0,s.log)("[webauthnPlugin] WebAuthn plugin destroyed")}assertWebauthn(){if(this.assertInitialized(),!this.webauthn)throw new Error("WebAuthn module not initialized");return this.webauthn}assertSigner(){if(this.assertInitialized(),!this.signer)throw new Error("WebAuthn signer not initialized");return this.signer}isSupported(){return this.assertWebauthn().isSupported()}async generateCredentials(e,t,r=!1){return this.assertWebauthn().generateCredentials(e,t,r)}async createAccount(e,t,r=!1){return this.assertWebauthn().createAccount(e,t,r)}async authenticateUser(e,t,r){return this.assertWebauthn().authenticateUser(e,t,r)}abortAuthentication(){this.assertWebauthn().abortAuthentication()}async removeDevice(e,t,r){return this.assertWebauthn().removeDevice(e,t,r)}async createSigningCredential(e){try{return(0,s.log)(`Creating signing credential for user: ${e}`),await this.assertSigner().createSigningCredential(e)}catch(e){throw(0,s.logError)(`Error creating signing credential: ${e.message}`),e}}createAuthenticator(e){try{return(0,s.log)(`Creating authenticator for credential: ${e}`),this.assertSigner().createAuthenticator(e)}catch(e){throw(0,s.logError)(`Error creating authenticator: ${e.message}`),e}}async createDerivedKeyPair(e,t,r){try{return(0,s.log)(`Creating derived key pair for credential: ${e}`),await this.assertSigner().createDerivedKeyPair(e,t,r)}catch(e){throw(0,s.logError)(`Error creating derived key pair: ${e.message}`),e}}async signWithDerivedKeys(e,t,r,n){try{return(0,s.log)(`Signing data with derived keys for credential: ${t}`),await this.assertSigner().signWithDerivedKeys(e,t,r,n)}catch(e){throw(0,s.logError)(`Error signing with derived keys: ${e.message}`),e}}getSigningCredential(e){return this.assertSigner().getCredential(e)}listSigningCredentials(){return this.assertSigner().listCredentials()}removeSigningCredential(e){return this.assertSigner().removeCredential(e)}async createGunUserFromSigningCredential(e,t){try{const r=this.assertInitialized();return(0,s.log)(`Creating Gun user from signing credential: ${e}`),await this.assertSigner().createGunUser(e,t,r.gun)}catch(e){throw(0,s.logError)(`Error creating Gun user from signing credential: ${e.message}`),e}}getGunUserPubFromSigningCredential(e){return this.assertSigner().getGunUserPub(e)}getHashedCredentialId(e){return this.assertSigner().getHashedCredentialId(e)}async verifyConsistency(e,t,r){try{return(0,s.log)(`Verifying consistency for credential: ${e}`),await this.assertSigner().verifyConsistency(e,t,r)}catch(e){return(0,s.logError)(`Error verifying consistency: ${e.message}`),{consistent:!1}}}async setupConsistentOneshotSigning(e){try{(0,s.log)(`Setting up consistent oneshot signing for: ${e}`);const t=await this.createSigningCredential(e);return{credential:t,authenticator:this.createAuthenticator(t.id),gunUser:await this.createGunUserFromSigningCredential(t.id,e),pub:t.pub,hashedCredentialId:t.hashedCredentialId}}catch(e){throw(0,s.logError)(`Error setting up consistent oneshot signing: ${e.message}`),e}}async login(e){(0,s.log)("[webauthnPlugin] Login with WebAuthn");try{const t=this.assertInitialized();if((0,s.log)(`Attempting WebAuthn login for user: ${e}`),!e)throw new Error("Username required for WebAuthn login");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!0);if(!r?.success)throw new Error(r?.error||"WebAuthn verification failed");t.setAuthMethod("webauthn");const n=await t.login(e,"",r.key);return n.success?((0,s.log)(`WebAuthn login completed successfully for user: ${e}`),{...n}):n}catch(e){return(0,s.logError)(`Error during WebAuthn login: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_LOGIN_ERROR",e.message||"Error during WebAuthn login",e),{success:!1,error:e.message||"Error during WebAuthn login"}}}async signUp(e){(0,s.log)("[webauthnPlugin] Sign up with WebAuthn");try{const t=this.assertInitialized();if((0,s.log)(`Attempting WebAuthn registration for user: ${e}`),!e)throw new Error("Username required for WebAuthn registration");if(!this.isSupported())throw new Error("WebAuthn is not supported by this browser");const r=await this.generateCredentials(e,null,!1);if(!r?.success)throw new Error(r?.error||"Unable to generate WebAuthn credentials");t.setAuthMethod("webauthn");const n=await t.signUp(e,"","",r.key);return n.success?((0,s.log)(`WebAuthn signup completed successfully for user: ${e}`),{...n}):n}catch(e){return(0,s.logError)(`Error during WebAuthn registration: ${e}`),a.ErrorHandler.handle(a.ErrorType.WEBAUTHN,"WEBAUTHN_SIGNUP_ERROR",e.message||"Error during WebAuthn registration",e),{success:!1,error:e.message||"Error during WebAuthn registration"}}}}t.WebauthnPlugin=u},4934:(e,t,r)=>{var n=r(53209);e.exports=m,m.simpleSieve=b,m.fermatTest=y;var i=r(39404),o=new i(24),s=new(r(52244)),a=new i(1),u=new i(2),c=new i(5),l=(new i(16),new i(8),new i(10)),f=new i(3),h=(new i(7),new i(11)),d=new i(4),p=(new i(12),null);function g(){if(null!==p)return p;var e=[];e[0]=2;for(var t=1,r=3;r<1048576;r+=2){for(var n=Math.ceil(Math.sqrt(r)),i=0;i<t&&e[i]<=n&&r%e[i]!==0;i++);t!==i&&e[i]<=n||(e[t++]=r)}return p=e,e}function b(e){for(var t=g(),r=0;r<t.length;r++)if(0===e.modn(t[r]))return 0===e.cmpn(t[r]);return!0}function y(e){var t=i.mont(e);return 0===u.toRed(t).redPow(e.subn(1)).fromRed().cmpn(1)}function m(e,t){if(e<16)return new i(2===t||5===t?[140,123]:[140,39]);var r,p;for(t=new i(t);;){for(r=new i(n(Math.ceil(e/8)));r.bitLength()>e;)r.ishrn(1);if(r.isEven()&&r.iadd(a),r.testn(1)||r.iadd(u),t.cmp(u)){if(!t.cmp(c))for(;r.mod(l).cmp(f);)r.iadd(d)}else for(;r.mod(o).cmp(h);)r.iadd(d);if(b(p=r.shrn(1))&&b(r)&&y(p)&&y(r)&&s.test(p)&&s.test(r))return r}}},5047:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EtherscanProvider=t.EtherscanPlugin=void 0;const n=r(8456),i=r(49288),o=r(77778),s=r(75347),a=r(38672),u=r(57698),c=r(94491),l=r(89973),f="org.ethers.plugins.provider.Etherscan";class h extends c.NetworkPlugin{baseUrl;constructor(e){super(f),(0,s.defineProperties)(this,{baseUrl:e})}clone(){return new h(this.baseUrl)}}t.EtherscanPlugin=h;const d=["enableCcipRead"];let p=1;class g extends a.AbstractProvider{network;apiKey;#i;constructor(e,t){const r=null!=t?t:null;super();const n=u.Network.from(e);this.#i=n.getPlugin(f),(0,s.defineProperties)(this,{apiKey:r,network:n})}getBaseUrl(){if(this.#i)return this.#i.baseUrl;switch(this.network.name){case"mainnet":return"https://api.etherscan.io";case"goerli":return"https://api-goerli.etherscan.io";case"sepolia":return"https://api-sepolia.etherscan.io";case"holesky":return"https://api-holesky.etherscan.io";case"arbitrum":return"https://api.arbiscan.io";case"arbitrum-goerli":return"https://api-goerli.arbiscan.io";case"base":return"https://api.basescan.org";case"base-sepolia":return"https://api-sepolia.basescan.org";case"bnb":return"https://api.bscscan.com";case"bnbt":return"https://api-testnet.bscscan.com";case"matic":return"https://api.polygonscan.com";case"matic-amoy":return"https://api-amoy.polygonscan.com";case"matic-mumbai":return"https://api-testnet.polygonscan.com";case"optimism":return"https://api-optimistic.etherscan.io";case"optimism-goerli":return"https://api-goerli-optimistic.etherscan.io"}(0,s.assertArgument)(!1,"unsupported network","network",this.network)}getUrl(e,t){let r=Object.keys(t).reduce(((e,r)=>{const n=t[r];return null!=n&&(e+=`&${r}=${n}`),e}),"");return this.apiKey&&(r+=`&apikey=${this.apiKey}`),`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}&module=${e}${r}`}getPostUrl(){return`https://api.etherscan.io/v2/api?chainid=${this.network.chainId}`}getPostData(e,t){return t.module=e,t.apikey=this.apiKey,t.chainid=this.network.chainId,t}async detectNetwork(){return this.network}async fetch(e,t,r){const n=p++,i=r?this.getPostUrl():this.getUrl(e,t),o=r?this.getPostData(e,t):null;this.emit("debug",{action:"sendRequest",id:n,url:i,payload:o});const a=new s.FetchRequest(i);a.setThrottleParams({slotInterval:1e3}),a.retryFunc=(e,t,r)=>(this.isCommunityResource()&&(0,l.showThrottleMessage)("Etherscan"),Promise.resolve(!0)),a.processFunc=async(t,r)=>{const i=r.hasBody()?JSON.parse((0,s.toUtf8String)(r.body)):{},o=("string"==typeof i.result?i.result:"").toLowerCase().indexOf("rate limit")>=0;return"proxy"===e?i&&0==i.status&&"NOTOK"==i.message&&o&&(this.emit("debug",{action:"receiveError",id:n,reason:"proxy-NOTOK",error:i}),r.throwThrottleError(i.result,2e3)):o&&(this.emit("debug",{action:"receiveError",id:n,reason:"null result",error:i.result}),r.throwThrottleError(i.result,2e3)),r},o&&(a.setHeader("content-type","application/x-www-form-urlencoded; charset=UTF-8"),a.body=Object.keys(o).map((e=>`${e}=${o[e]}`)).join("&"));const u=await a.send();try{u.assertOk()}catch(e){this.emit("debug",{action:"receiveError",id:n,error:e,reason:"assertOk"}),(0,s.assert)(!1,"response error","SERVER_ERROR",{request:a,response:u})}u.hasBody()||(this.emit("debug",{action:"receiveError",id:n,error:"missing body",reason:"null body"}),(0,s.assert)(!1,"missing response","SERVER_ERROR",{request:a,response:u}));const c=JSON.parse((0,s.toUtf8String)(u.body));return"proxy"===e?("2.0"!=c.jsonrpc&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"invalid JSON-RPC"}),(0,s.assert)(!1,"invalid JSON-RPC response (missing jsonrpc='2.0')","SERVER_ERROR",{request:a,response:u,info:{result:c}})),c.error&&(this.emit("debug",{action:"receiveError",id:n,result:c,reason:"JSON-RPC error"}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):0!=c.status||"No records found"!==c.message&&"No transactions found"!==c.message?((1!=c.status||"string"==typeof c.message&&!c.message.match(/^OK/))&&(this.emit("debug",{action:"receiveError",id:n,result:c}),(0,s.assert)(!1,"error response","SERVER_ERROR",{request:a,response:u,info:{result:c}})),this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result):(this.emit("debug",{action:"receiveRequest",id:n,result:c}),c.result)}_getTransactionPostData(e){const t={};for(let r in e){if(d.indexOf(r)>=0)continue;if(null==e[r])continue;let n=e[r];if(!("type"===r&&0===n||"blockTag"===r&&"latest"===n)){if({type:!0,gasLimit:!0,gasPrice:!0,maxFeePerGs:!0,maxPriorityFeePerGas:!0,nonce:!0,value:!0}[r])n=(0,s.toQuantity)(n);else if("accessList"===r)n="["+(0,o.accessListify)(n).map((e=>`{address:"${e.address}",storageKeys:["${e.storageKeys.join('","')}"]}`)).join(",")+"]";else if("blobVersionedHashes"===r){if(0===n.length)continue;(0,s.assert)(!1,"Etherscan API does not support blobVersionedHashes","UNSUPPORTED_OPERATION",{operation:"_getTransactionPostData",info:{transaction:e}})}else n=(0,s.hexlify)(n);t[r]=n}}return t}_checkError(e,t,r){let i="";if((0,s.isError)(t,"SERVER_ERROR")){try{i=t.info.result.error.message}catch(e){}if(!i)try{i=t.info.message}catch(e){}}if("estimateGas"===e.method&&!i.match(/revert/i)&&i.match(/insufficient funds/i)&&(0,s.assert)(!1,"insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.transaction}),("call"===e.method||"estimateGas"===e.method)&&i.match(/execution reverted/i)){let r="";try{r=t.info.result.error.data}catch(t){}const i=n.AbiCoder.getBuiltinCallException(e.method,e.transaction,r);throw i.info={request:e,error:t},i}if(i&&"broadcastTransaction"===e.method){const t=o.Transaction.from(e.signedTransaction);i.match(/replacement/i)&&i.match(/underpriced/i)&&(0,s.assert)(!1,"replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t}),i.match(/insufficient funds/)&&(0,s.assert)(!1,"insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t}),i.match(/same hash was already imported|transaction nonce is too low|nonce too low/)&&(0,s.assert)(!1,"nonce has already been used","NONCE_EXPIRED",{transaction:t})}throw t}async _detectNetwork(){return this.network}async _perform(e){switch(e.method){case"chainId":return this.network.chainId;case"getBlockNumber":return this.fetch("proxy",{action:"eth_blockNumber"});case"getGasPrice":return this.fetch("proxy",{action:"eth_gasPrice"});case"getPriorityFee":if("mainnet"===this.network.name)return"1000000000";if("optimism"===this.network.name)return"1000000";throw new Error("fallback onto the AbstractProvider default");case"getBalance":return this.fetch("account",{action:"balance",address:e.address,tag:e.blockTag});case"getTransactionCount":return this.fetch("proxy",{action:"eth_getTransactionCount",address:e.address,tag:e.blockTag});case"getCode":return this.fetch("proxy",{action:"eth_getCode",address:e.address,tag:e.blockTag});case"getStorage":return this.fetch("proxy",{action:"eth_getStorageAt",address:e.address,position:e.position,tag:e.blockTag});case"broadcastTransaction":return this.fetch("proxy",{action:"eth_sendRawTransaction",hex:e.signedTransaction},!0).catch((t=>this._checkError(e,t,e.signedTransaction)));case"getBlock":if("blockTag"in e)return this.fetch("proxy",{action:"eth_getBlockByNumber",tag:e.blockTag,boolean:e.includeTransactions?"true":"false"});(0,s.assert)(!1,"getBlock by blockHash not supported by Etherscan","UNSUPPORTED_OPERATION",{operation:"getBlock(blockHash)"});case"getTransaction":return this.fetch("proxy",{action:"eth_getTransactionByHash",txhash:e.hash});case"getTransactionReceipt":return this.fetch("proxy",{action:"eth_getTransactionReceipt",txhash:e.hash});case"call":{if("latest"!==e.blockTag)throw new Error("EtherscanProvider does not support blockTag for call");const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_call";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}case"estimateGas":{const t=this._getTransactionPostData(e.transaction);t.module="proxy",t.action="eth_estimateGas";try{return await this.fetch("proxy",t,!0)}catch(t){return this._checkError(e,t,e.transaction)}}}return super._perform(e)}async getNetwork(){return this.network}async getEtherPrice(){return"mainnet"!==this.network.name?0:parseFloat((await this.fetch("stats",{action:"ethprice"})).ethusd)}async getContract(e){let t=this._getAddress(e);var r;(r=t)&&"function"==typeof r.then&&(t=await t);try{const e=await this.fetch("contract",{action:"getabi",address:t}),r=JSON.parse(e);return new i.Contract(t,r,this)}catch(e){return null}}isCommunityResource(){return null==this.apiKey}}t.EtherscanProvider=g},5128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.groupBy=void 0;var n=r(48051),i=r(19724),o=r(76808),s=r(65212),a=r(17214);t.groupBy=function(e,t,r,u){return s.operate((function(s,c){var l;t&&"function"!=typeof t?(r=t.duration,l=t.element,u=t.connector):l=t;var f=new Map,h=function(e){f.forEach(e),e(c)},d=function(e){return h((function(t){return t.error(e)}))},p=0,g=!1,b=new a.OperatorSubscriber(c,(function(t){try{var s=e(t),h=f.get(s);if(!h){f.set(s,h=u?u():new o.Subject);var y=(v=s,w=h,(E=new n.Observable((function(e){p++;var t=w.subscribe(e);return function(){t.unsubscribe(),0===--p&&g&&b.unsubscribe()}}))).key=v,E);if(c.next(y),r){var m=a.createOperatorSubscriber(h,(function(){h.complete(),null==m||m.unsubscribe()}),void 0,void 0,(function(){return f.delete(s)}));b.add(i.innerFrom(r(y)).subscribe(m))}}h.next(l?l(t):t)}catch(e){d(e)}var v,w,E}),(function(){return h((function(e){return e.complete()}))}),d,(function(){return f.clear()}),(function(){return g=!0,0===p}));s.subscribe(b)}))}},5130:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncSubject=void 0;var o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t._value=null,t._hasValue=!1,t._isComplete=!1,t}return i(t,e),t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t._hasValue,i=t._value,o=t.thrownError,s=t.isStopped,a=t._isComplete;r?e.error(o):(s||a)&&(n&&e.next(i),e.complete())},t.prototype.next=function(e){this.isStopped||(this._value=e,this._hasValue=!0)},t.prototype.complete=function(){var t=this,r=t._hasValue,n=t._value;t._isComplete||(this._isComplete=!0,r&&e.prototype.next.call(this,n),e.prototype.complete.call(this))},t}(r(76808).Subject);t.AsyncSubject=o},5307:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthPlugin=t.OAuthConnector=t.NostrConnectorPlugin=t.NostrConnector=t.Web3ConnectorPlugin=t.Web3Connector=t.WebauthnPlugin=t.Webauthn=t.BasePlugin=void 0;var o=r(34586);Object.defineProperty(t,"BasePlugin",{enumerable:!0,get:function(){return o.BasePlugin}});var s=r(37510);Object.defineProperty(t,"Webauthn",{enumerable:!0,get:function(){return s.Webauthn}});var a=r(4933);Object.defineProperty(t,"WebauthnPlugin",{enumerable:!0,get:function(){return a.WebauthnPlugin}});var u=r(48089);Object.defineProperty(t,"Web3Connector",{enumerable:!0,get:function(){return u.Web3Connector}});var c=r(48098);Object.defineProperty(t,"Web3ConnectorPlugin",{enumerable:!0,get:function(){return c.Web3ConnectorPlugin}});var l=r(37897);Object.defineProperty(t,"NostrConnector",{enumerable:!0,get:function(){return l.NostrConnector}});var f=r(48050);Object.defineProperty(t,"NostrConnectorPlugin",{enumerable:!0,get:function(){return f.NostrConnectorPlugin}});var h=r(17665);Object.defineProperty(t,"OAuthConnector",{enumerable:!0,get:function(){return h.OAuthConnector}});var d=r(78371);Object.defineProperty(t,"OAuthPlugin",{enumerable:!0,get:function(){return d.OAuthPlugin}}),i(r(1126),t)},5362:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zipAll=void 0;var n=r(11415),i=r(80719);t.zipAll=function(e){return i.joinAllInternals(n.zip,e)}},5455:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.subscribeOn=void 0;var n=r(65212);t.subscribeOn=function(e,t){return void 0===t&&(t=0),n.operate((function(r,n){n.add(e.schedule((function(){return r.subscribe(n)}),t))}))}},5567:(e,t,r)=>{e.exports=r(37007).EventEmitter},5717:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.noop=void 0,t.noop=function(){}},5797:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delay=void 0;var n=r(62326),i=r(72885),o=r(5825);t.delay=function(e,t){void 0===t&&(t=n.asyncScheduler);var r=o.timer(e,t);return i.delayWhen((function(){return r}))}},5825:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timer=void 0;var n=r(48051),i=r(62326),o=r(68596),s=r(85345);t.timer=function(e,t,r){void 0===e&&(e=0),void 0===r&&(r=i.async);var a=-1;return null!=t&&(o.isScheduler(t)?r=t:a=t),new n.Observable((function(t){var n=s.isValidDate(e)?+e-r.now():e;n<0&&(n=0);var i=0;return r.schedule((function(){t.closed||(t.next(i++),0<=a?this.schedule(void 0,a):t.complete())}),n)}))}},6427:(e,t,r)=>{"use strict";var n=r(88393).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},6526:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractEventPayload=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.UndecodedEventLog=t.EventLog=void 0;const n=r(63807),i=r(75347);class o extends n.Log{interface;fragment;args;constructor(e,t,r){super(e,e.provider);const n=t.decodeEventLog(r,e.data,e.topics);(0,i.defineProperties)(this,{args:n,fragment:r,interface:t})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}t.EventLog=o;class s extends n.Log{error;constructor(e,t){super(e,e.provider),(0,i.defineProperties)(this,{error:t})}}t.UndecodedEventLog=s;class a extends n.TransactionReceipt{#o;constructor(e,t,r){super(r,t),this.#o=e}get logs(){return super.logs.map((e=>{const t=e.topics.length?this.#o.getEvent(e.topics[0]):null;if(t)try{return new o(e,this.#o,t)}catch(t){return new s(e,t)}return e}))}}t.ContractTransactionReceipt=a;class u extends n.TransactionResponse{#o;constructor(e,t,r){super(r,t),this.#o=e}async wait(e,t){const r=await super.wait(e,t);return null==r?null:new a(this.#o,this.provider,r)}}t.ContractTransactionResponse=u;class c extends i.EventPayload{log;constructor(e,t,r,n){super(e,t,r),(0,i.defineProperties)(this,{log:n})}async getBlock(){return await this.log.getBlock()}async getTransaction(){return await this.log.getTransaction()}async getTransactionReceipt(){return await this.log.getTransactionReceipt()}}t.ContractUnknownEventPayload=c,t.ContractEventPayload=class extends c{constructor(e,t,r,n,s){super(e,t,r,new o(s,e.interface,n));const a=e.interface.decodeEventLog(n,this.log.data,this.log.topics);(0,i.defineProperties)(this,{args:a,fragment:n})}get eventName(){return this.fragment.name}get eventSignature(){return this.fragment.format()}}},6677:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.raceWith=void 0;var o=r(89795),s=r(65212),a=r(87699);t.raceWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return e.length?s.operate((function(t,r){o.raceInit(i([t],n(e)))(r)})):a.identity}},6757:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameAction=void 0;var o=r(64772),s=r(35726),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.animationFrameProvider.requestAnimationFrame((function(){return t.flush(void 0)}))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&r===t._scheduled&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.animationFrameProvider.cancelAnimationFrame(r),t._scheduled=void 0)},t}(o.AsyncAction);t.AnimationFrameAction=a},6806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnkrProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371),a="9f7d929b018cdffb338517efa06f58359e86ff1ffd350bc889738523659e7972";class u extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a);const i={polling:!0,staticNetwork:r};super(u.getRequest(r,t),r,i),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"rpc.ankr.com/eth";case"goerli":return"rpc.ankr.com/eth_goerli";case"sepolia":return"rpc.ankr.com/eth_sepolia";case"arbitrum":return"rpc.ankr.com/arbitrum";case"base":return"rpc.ankr.com/base";case"base-goerli":return"rpc.ankr.com/base_goerli";case"base-sepolia":return"rpc.ankr.com/base_sepolia";case"bnb":return"rpc.ankr.com/bsc";case"bnbt":return"rpc.ankr.com/bsc_testnet_chapel";case"matic":return"rpc.ankr.com/polygon";case"matic-mumbai":return"rpc.ankr.com/polygon_mumbai";case"optimism":return"rpc.ankr.com/optimism";case"optimism-goerli":return"rpc.ankr.com/optimism_testnet";case"optimism-sepolia":return"rpc.ankr.com/optimism_sepolia"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("AnkrProvider"),!0)),r}getRpcError(e,t){return"eth_sendRawTransaction"===e.method&&t&&t.error&&"INTERNAL_ERROR: could not replace existing tx"===t.error.message&&(t.error.message="replacement transaction underpriced"),super.getRpcError(e,t)}isCommunityResource(){return this.apiKey===a}}t.AnkrProvider=u},7024:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArgumentOutOfRangeError=void 0;var n=r(9619);t.ArgumentOutOfRangeError=n.createErrorClass((function(e){return function(){e(this),this.name="ArgumentOutOfRangeError",this.message="argument out of range"}}))},7120:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NetworkError=t.MultipleAuthError=t.TimeoutError=t.UserExists=t.InvalidCredentials=t.AuthError=t.GunError=void 0;class r extends Error{constructor(e){super(e),this.name="GunError"}}t.GunError=r;class n extends r{constructor(e){super(e),this.name="AuthError"}}t.AuthError=n,t.InvalidCredentials=class extends n{constructor(e="Credenziali non valide"){super(e),this.name="InvalidCredentials"}},t.UserExists=class extends n{constructor(e="Utente già esistente"){super(e),this.name="UserExists"}},t.TimeoutError=class extends r{constructor(e="Timeout durante l'operazione"){super(e),this.name="TimeoutError"}},t.MultipleAuthError=class extends n{constructor(e="Autenticazione multipla in corso"){super(e),this.name="MultipleAuthError"}},t.NetworkError=class extends r{}},7245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttleTime=void 0;var n=r(62326),i=r(44880),o=r(5825);t.throttleTime=function(e,t,r){void 0===t&&(t=n.asyncScheduler);var s=o.timer(e,t);return i.throttle((function(){return s}),r)}},7314:(e,t,r)=>{"use strict";var n=r(65606),i=r(33225);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=y;var s,a=!n.browser&&["v0.10","v0.9."].indexOf(n.version.slice(0,5))>-1?setImmediate:i.nextTick;y.WritableState=b;var u=Object.create(r(15622));u.inherits=r(56698);var c,l={deprecate:r(94643)},f=r(5567),h=r(24116).Buffer,d=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},p=r(36278);function g(){}function b(e,t){s=s||r(26248),e=e||{};var n=t instanceof s;this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.writableObjectMode);var u=e.highWaterMark,c=e.writableHighWaterMark,l=this.objectMode?16:16384;this.highWaterMark=u||0===u?u:n&&(c||0===c)?c:l,this.highWaterMark=Math.floor(this.highWaterMark),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var f=!1===e.decodeStrings;this.decodeStrings=!f,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(_,e,t),e._writableState.errorEmitted=!0,e.emit("error",n)):(o(n),e._writableState.errorEmitted=!0,e.emit("error",n),_(e,t))}(e,r,n,t,o);else{var s=E(r);s||r.corked||r.bufferProcessing||!r.bufferedRequest||w(e,r),n?a(v,e,r,s,o):v(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function y(e){if(s=s||r(26248),!(c.call(y,this)||this instanceof s))return new y(e);this._writableState=new b(e,this),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),f.call(this)}function m(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function v(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),_(e,t)}function w(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,m(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(m(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function E(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function A(e,t){e._final((function(r){t.pendingcb--,r&&e.emit("error",r),t.prefinished=!0,e.emit("prefinish"),_(e,t)}))}function _(e,t){var r=E(t);return r&&(function(e,t){t.prefinished||t.finalCalled||("function"==typeof e._final?(t.pendingcb++,t.finalCalled=!0,i.nextTick(A,e,t)):(t.prefinished=!0,e.emit("prefinish")))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"))),r}u.inherits(y,f),b.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(b.prototype,"buffer",{get:l.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(c=Function.prototype[Symbol.hasInstance],Object.defineProperty(y,Symbol.hasInstance,{value:function(e){return!!c.call(this,e)||this===y&&e&&e._writableState instanceof b}})):c=function(e){return e instanceof this},y.prototype.pipe=function(){this.emit("error",new Error("Cannot pipe, not readable"))},y.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,h.isBuffer(n)||n instanceof d);return a&&!h.isBuffer(e)&&(e=function(e){return h.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=g),o.ended?function(e,t){var r=new Error("write after end");e.emit("error",r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o=!0,s=!1;return null===r?s=new TypeError("May not write null values to stream"):"string"==typeof r||void 0===r||t.objectMode||(s=new TypeError("Invalid non-string/buffer chunk")),s&&(e.emit("error",s),i.nextTick(n,s),o=!1),o}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=h.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var c=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},c?c.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else m(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,r)),s},y.prototype.cork=function(){this._writableState.corked++},y.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||w(this,e))},y.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new TypeError("Unknown encoding: "+e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(y.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),y.prototype._write=function(e,t,r){r(new Error("_write() is not implemented"))},y.prototype._writev=null,y.prototype.end=function(e,t,r){var n=this._writableState;"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,_(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r)},Object.defineProperty(y.prototype,"destroyed",{get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),y.prototype.destroy=p.destroy,y.prototype._undestroy=p.undestroy,y.prototype._destroy=function(e,t){this.end(),t(e)}},7652:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsOrArgArray=void 0;var r=Array.isArray;t.argsOrArgArray=function(e){return 1===e.length&&r(e[0])?e[0]:e}},7836:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(36458),i=r(39732),o=r(67031);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},8165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=t.OFB=t.ECB=t.CTR=t.CFB=t.CBC=t.ModeOfOperation=t.AES=void 0;var n=r(18394);Object.defineProperty(t,"AES",{enumerable:!0,get:function(){return n.AES}});var i=r(86342);Object.defineProperty(t,"ModeOfOperation",{enumerable:!0,get:function(){return i.ModeOfOperation}});var o=r(22977);Object.defineProperty(t,"CBC",{enumerable:!0,get:function(){return o.CBC}});var s=r(9990);Object.defineProperty(t,"CFB",{enumerable:!0,get:function(){return s.CFB}});var a=r(24164);Object.defineProperty(t,"CTR",{enumerable:!0,get:function(){return a.CTR}});var u=r(1485);Object.defineProperty(t,"ECB",{enumerable:!0,get:function(){return u.ECB}});var c=r(80226);Object.defineProperty(t,"OFB",{enumerable:!0,get:function(){return c.OFB}});var l=r(68420);Object.defineProperty(t,"pkcs7Pad",{enumerable:!0,get:function(){return l.pkcs7Pad}}),Object.defineProperty(t,"pkcs7Strip",{enumerable:!0,get:function(){return l.pkcs7Strip}})},8166:(e,t)=>{"use strict";function r(e,t,r){const n=t.split("|").map((e=>e.trim()));for(let r=0;r<n.length;r++)switch(t){case"any":return;case"bigint":case"boolean":case"number":case"string":if(typeof e===t)return}const i=new Error(`invalid value for type ${t}`);throw i.code="INVALID_ARGUMENT",i.argument=`value.${r}`,i.value=e,i}Object.defineProperty(t,"__esModule",{value:!0}),t.defineProperties=t.resolveProperties=void 0,t.resolveProperties=async function(e){const t=Object.keys(e);return(await Promise.all(t.map((t=>Promise.resolve(e[t]))))).reduce(((e,r,n)=>(e[t[n]]=r,e)),{})},t.defineProperties=function(e,t,n){for(let i in t){let o=t[i];const s=n?n[i]:null;s&&r(o,s,i),Object.defineProperty(e,i,{enumerable:!0,value:o,writable:!1})}}},8284:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.intervalProvider=void 0,t.intervalProvider={setInterval:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.intervalProvider.delegate;return(null==a?void 0:a.setInterval)?a.setInterval.apply(a,n([e,i],r(o))):setInterval.apply(void 0,n([e,i],r(o)))},clearInterval:function(e){var r=t.intervalProvider.delegate;return((null==r?void 0:r.clearInterval)||clearInterval)(e)},delegate:void 0}},8456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=t.Result=t.TransactionDescription=t.LogDescription=t.ErrorDescription=t.Interface=t.Indexed=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.Fragment=t.FallbackFragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.encodeBytes32String=t.decodeBytes32String=t.AbiCoder=void 0;var n=r(50954);Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return n.AbiCoder}});var i=r(89414);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}});var o=r(189);Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return o.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return o.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return o.EventFragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return o.FallbackFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return o.Fragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return o.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return o.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return o.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return o.StructFragment}});var s=r(15863);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return s.checkResultErrors}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return s.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return s.Interface}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return s.ErrorDescription}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return s.LogDescription}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return s.TransactionDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return s.Result}});var a=r(39976);Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return a.Typed}})},8510:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256k1_hasher=t.schnorr=t.secp256k1=void 0;const n=r(17076),i=r(99175),o=r(73562),s=r(71761),a=r(24967),u=r(91705),c=r(58627),l={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:BigInt(1),a:BigInt(0),b:BigInt(7),Gx:BigInt("0x79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798"),Gy:BigInt("0x483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8")},f=BigInt(0),h=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function g(e){const t=l.p,r=BigInt(3),n=BigInt(6),i=BigInt(11),o=BigInt(22),s=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,h=f*f*e%t,p=(0,a.pow2)(h,r,t)*h%t,g=(0,a.pow2)(p,r,t)*h%t,y=(0,a.pow2)(g,d,t)*f%t,m=(0,a.pow2)(y,i,t)*y%t,v=(0,a.pow2)(m,o,t)*m%t,w=(0,a.pow2)(v,u,t)*v%t,E=(0,a.pow2)(w,c,t)*w%t,A=(0,a.pow2)(E,u,t)*v%t,_=(0,a.pow2)(A,r,t)*h%t,S=(0,a.pow2)(_,s,t)*m%t,P=(0,a.pow2)(S,n,t)*f%t,k=(0,a.pow2)(P,d,t);if(!b.eql(b.sqr(k),e))throw new Error("Cannot find square root");return k}const b=(0,a.Field)(l.p,void 0,void 0,{sqrt:g});t.secp256k1=(0,o.createCurve)({...l,Fp:b,lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=l.n,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),o=r,s=BigInt("0x100000000000000000000000000000000"),u=p(o*e,t),c=p(-n*e,t);let f=(0,a.mod)(e-u*r-c*i,t),d=(0,a.mod)(-u*n-c*o,t);const g=f>s,b=d>s;if(g&&(f=t-f),b&&(d=t-d),f>s||d>s)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:f,k2neg:b,k2:d}}}},n.sha256);const y={};function m(e,...t){let r=y[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,c.concatBytes)(t,t),y[e]=r}return(0,n.sha256)((0,c.concatBytes)(r,...t))}const v=e=>e.toBytes(!0).slice(1),w=e=>(0,c.numberToBytesBE)(e,32),E=e=>(0,a.mod)(e,l.p),A=e=>(0,a.mod)(e,l.n),_=(()=>t.secp256k1.Point)(),S=e=>e%d===f;function P(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=_.fromPrivateKey(r);return{scalar:S(n.y)?r:A(-r),bytes:v(n)}}function k(e){(0,c.aInRange)("x",e,h,l.p);const t=E(e*e);let r=g(E(t*e+BigInt(7)));S(r)||(r=E(-r));const n=_.fromAffine({x:e,y:r});return n.assertValidity(),n}const O=c.bytesToNumberBE;function x(...e){return A(O(m("BIP0340/challenge",...e)))}function M(e,t,r){const n=(0,c.ensureBytes)("signature",e,64),i=(0,c.ensureBytes)("message",t),o=(0,c.ensureBytes)("publicKey",r,32);try{const e=k(O(o)),t=O(n.subarray(0,32));if(!(0,c.inRange)(t,h,l.p))return!1;const r=O(n.subarray(32,64));if(!(0,c.inRange)(r,h,l.n))return!1;const s=x(w(t),v(e),i),a=_.BASE.multiplyUnsafe(r).add(e.multiplyUnsafe(A(-s))),{x:u,y:f}=a.toAffine();return!(a.is0()||!S(f)||u!==t)}catch(e){return!1}}t.schnorr={getPublicKey:function(e){return P(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,c.ensureBytes)("message",e),{bytes:o,scalar:s}=P(t),a=(0,c.ensureBytes)("auxRand",r,32),u=w(s^O(m("BIP0340/aux",a))),l=m("BIP0340/nonce",u,o,n),h=A(O(l));if(h===f)throw new Error("sign failed: k is zero");const{bytes:d,scalar:p}=P(h),g=x(d,o,n),b=new Uint8Array(64);if(b.set(d,0),b.set(w(A(p+g*s)),32),!M(b,n,o))throw new Error("sign: Invalid signature produced");return b},verify:M,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:k,pointToBytes:v,numberToBytesBE:c.numberToBytesBE,bytesToNumberBE:c.bytesToNumberBE,taggedHash:m,mod:a.mod}};const B=(()=>(0,s.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),T=(()=>(0,u.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))();t.secp256k1_hasher=(0,s.createHasher)(t.secp256k1.Point,(e=>{const{x:t,y:r}=T(b.create(e[0]));return B(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}),t.hashToCurve=t.secp256k1_hasher.hashToCurve,t.encodeToCurve=t.secp256k1_hasher.encodeToCurve},8567:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBase58=t.encodeBase58=void 0;const n=r(87415),i=r(1500),o=r(66508),s="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";let a=null;function u(e){if(null==a){a={};for(let e=0;e<58;e++)a[s[e]]=BigInt(e)}const t=a[e];return(0,i.assertArgument)(null!=t,"invalid base58 value","letter",e),t}const c=BigInt(0),l=BigInt(58);t.encodeBase58=function(e){const t=(0,n.getBytes)(e);let r=(0,o.toBigInt)(t),i="";for(;r;)i=s[Number(r%l)]+i,r/=l;for(let e=0;e<t.length&&!t[e];e++)i=s[0]+i;return i},t.decodeBase58=function(e){let t=c;for(let r=0;r<e.length;r++)t*=l,t+=u(e[r]);return t}},8650:(e,t,r)=>{"use strict";var n=r(77952),i=r(60480),o=r(47011),s=o.assert,a=o.parseBytes,u=r(46661),c=r(90220);function l(e){if(s("ed25519"===e,"only tested with ed25519 so far"),!(this instanceof l))return new l(e);e=i[e].curve,this.curve=e,this.g=e.g,this.g.precompute(e.n.bitLength()+1),this.pointClass=e.point().constructor,this.encodingLength=Math.ceil(e.n.bitLength()/8),this.hash=n.sha512}e.exports=l,l.prototype.sign=function(e,t){e=a(e);var r=this.keyFromSecret(t),n=this.hashInt(r.messagePrefix(),e),i=this.g.mul(n),o=this.encodePoint(i),s=this.hashInt(o,r.pubBytes(),e).mul(r.priv()),u=n.add(s).umod(this.curve.n);return this.makeSignature({R:i,S:u,Rencoded:o})},l.prototype.verify=function(e,t,r){if(e=a(e),(t=this.makeSignature(t)).S().gte(t.eddsa.curve.n)||t.S().isNeg())return!1;var n=this.keyFromPublic(r),i=this.hashInt(t.Rencoded(),n.pubBytes(),e),o=this.g.mul(t.S());return t.R().add(n.pub().mul(i)).eq(o)},l.prototype.hashInt=function(){for(var e=this.hash(),t=0;t<arguments.length;t++)e.update(arguments[t]);return o.intFromLE(e.digest()).umod(this.curve.n)},l.prototype.keyFromPublic=function(e){return u.fromPublic(this,e)},l.prototype.keyFromSecret=function(e){return u.fromSecret(this,e)},l.prototype.makeSignature=function(e){return e instanceof c?e:new c(this,e)},l.prototype.encodePoint=function(e){var t=e.getY().toArray("le",this.encodingLength);return t[this.encodingLength-1]|=e.getX().isOdd()?128:0,t},l.prototype.decodePoint=function(e){var t=(e=o.parseBytes(e)).length-1,r=e.slice(0,t).concat(-129&e[t]),n=!!(128&e[t]),i=o.intFromLE(r);return this.curve.pointFromY(i,n)},l.prototype.encodeInt=function(e){return e.toArray("le",this.encodingLength)},l.prototype.decodeInt=function(e){return o.intFromLE(e)},l.prototype.isPoint=function(e){return e instanceof this.pointClass}},9287:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferCount=void 0;var i=r(65212),o=r(17214),s=r(54830);t.bufferCount=function(e,t){return void 0===t&&(t=null),t=null!=t?t:e,i.operate((function(r,i){var a=[],u=0;r.subscribe(o.createOperatorSubscriber(i,(function(r){var o,c,l,f,h=null;u++%t===0&&a.push([]);try{for(var d=n(a),p=d.next();!p.done;p=d.next())(y=p.value).push(r),e<=y.length&&(h=null!=h?h:[]).push(y)}catch(e){o={error:e}}finally{try{p&&!p.done&&(c=d.return)&&c.call(d)}finally{if(o)throw o.error}}if(h)try{for(var g=n(h),b=g.next();!b.done;b=g.next()){var y=b.value;s.arrRemove(a,y),i.next(y)}}catch(e){l={error:e}}finally{try{b&&!b.done&&(f=g.return)&&f.call(g)}finally{if(l)throw l.error}}}),(function(){var e,t;try{for(var r=n(a),o=r.next();!o.done;o=r.next()){var s=o.value;i.next(s)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(t=r.return)&&t.call(r)}finally{if(e)throw e.error}}i.complete()}),void 0,(function(){a=null})))}))}},9330:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var o=r(65212),s=r(68087),a=r(26404),u=r(47058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e),c=a.popNumber(e,1/0);return o.operate((function(t,o){s.mergeAll(c)(u.from(i([t],n(e)),r)).subscribe(o)}))}},9462:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptAsync=t.scrypt=void 0;const n=r(27302),i=r(96978),o=r(19e3),s=r(74224),a=(e,t)=>e<<t|e>>>32-t;function u(e,t,r,n,i,o){let s=e[t++]^r[n++],u=e[t++]^r[n++],c=e[t++]^r[n++],l=e[t++]^r[n++],f=e[t++]^r[n++],h=e[t++]^r[n++],d=e[t++]^r[n++],p=e[t++]^r[n++],g=e[t++]^r[n++],b=e[t++]^r[n++],y=e[t++]^r[n++],m=e[t++]^r[n++],v=e[t++]^r[n++],w=e[t++]^r[n++],E=e[t++]^r[n++],A=e[t++]^r[n++],_=s,S=u,P=c,k=l,O=f,x=h,M=d,B=p,T=g,I=b,C=y,R=m,N=v,j=w,U=E,L=A;for(let e=0;e<8;e+=2)O^=a(_+N|0,7),T^=a(O+_|0,9),N^=a(T+O|0,13),_^=a(N+T|0,18),I^=a(x+S|0,7),j^=a(I+x|0,9),S^=a(j+I|0,13),x^=a(S+j|0,18),U^=a(C+M|0,7),P^=a(U+C|0,9),M^=a(P+U|0,13),C^=a(M+P|0,18),k^=a(L+R|0,7),B^=a(k+L|0,9),R^=a(B+k|0,13),L^=a(R+B|0,18),S^=a(_+k|0,7),P^=a(S+_|0,9),k^=a(P+S|0,13),_^=a(k+P|0,18),M^=a(x+O|0,7),B^=a(M+x|0,9),O^=a(B+M|0,13),x^=a(O+B|0,18),R^=a(C+I|0,7),T^=a(R+C|0,9),I^=a(T+R|0,13),C^=a(I+T|0,18),N^=a(L+U|0,7),j^=a(N+L|0,9),U^=a(j+N|0,13),L^=a(U+j|0,18);i[o++]=s+_|0,i[o++]=u+S|0,i[o++]=c+P|0,i[o++]=l+k|0,i[o++]=f+O|0,i[o++]=h+x|0,i[o++]=d+M|0,i[o++]=p+B|0,i[o++]=g+T|0,i[o++]=b+I|0,i[o++]=y+C|0,i[o++]=m+R|0,i[o++]=v+N|0,i[o++]=w+j|0,i[o++]=E+U|0,i[o++]=A+L|0}function c(e,t,r,n,i){let o=n+0,s=n+16*i;for(let n=0;n<16;n++)r[s+n]=e[t+16*(2*i-1)+n];for(let n=0;n<i;n++,o+=16,t+=16)u(r,s,e,t,r,o),n>0&&(s+=16),u(r,o,e,t+=16,r,s)}function l(e,t,r){const a=(0,s.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},r),{N:u,r:c,p:l,dkLen:f,asyncTick:h,maxmem:d,onProgress:p}=a;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),(0,n.number)(f),(0,n.number)(h),(0,n.number)(d),void 0!==p&&"function"!=typeof p)throw new Error("progressCb should be function");const g=128*c,b=g/4;if(u<=1||u&u-1||u>=2**(g/8)||u>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(l<0||l>137438953440/g)throw new Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(f<0||f>137438953440)throw new Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");const y=g*(u+l);if(y>d)throw new Error(`Scrypt: parameters too large, ${y} (128 * r * (N + p)) > ${d} (maxmem)`);const m=(0,o.pbkdf2)(i.sha256,e,t,{c:1,dkLen:g*l}),v=(0,s.u32)(m),w=(0,s.u32)(new Uint8Array(g*u)),E=(0,s.u32)(new Uint8Array(g));let A=()=>{};if(p){const e=2*u*l,t=Math.max(Math.floor(e/1e4),1);let r=0;A=()=>{r++,!p||r%t&&r!==e||p(r/e)}}return{N:u,r:c,p:l,dkLen:f,blockSize32:b,V:w,B32:v,B:m,tmp:E,blockMixCb:A,asyncTick:h}}function f(e,t,r,n,s){const a=(0,o.pbkdf2)(i.sha256,e,r,{c:1,dkLen:t});return r.fill(0),n.fill(0),s.fill(0),a}t.scrypt=function(e,t,r){const{N:n,r:i,p:o,dkLen:s,blockSize32:a,V:u,B32:h,B:d,tmp:p,blockMixCb:g}=l(e,t,r);for(let e=0;e<o;e++){const t=a*e;for(let e=0;e<a;e++)u[e]=h[t+e];for(let e=0,t=0;e<n-1;e++)c(u,t,u,t+=a,i),g();c(u,(n-1)*a,h,t,i),g();for(let e=0;e<n;e++){const e=h[t+a-16]%n;for(let r=0;r<a;r++)p[r]=h[t+r]^u[e*a+r];c(p,0,h,t,i),g()}}return f(e,s,d,u,p)},t.scryptAsync=async function(e,t,r){const{N:n,r:i,p:o,dkLen:a,blockSize32:u,V:h,B32:d,B:p,tmp:g,blockMixCb:b,asyncTick:y}=l(e,t,r);for(let e=0;e<o;e++){const t=u*e;for(let e=0;e<u;e++)h[e]=d[t+e];let r=0;await(0,s.asyncLoop)(n-1,y,(()=>{c(h,r,h,r+=u,i),b()})),c(h,(n-1)*u,d,t,i),b(),await(0,s.asyncLoop)(n,y,(()=>{const e=d[t+u-16]%n;for(let r=0;r<u;r++)g[r]=d[t+r]^h[e*u+r];c(g,0,d,t,i),b()}))}return f(e,a,p,h,g)}},9619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createErrorClass=void 0,t.createErrorClass=function(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}},9673:(e,t,r)=>{var n=t;n.Reporter=r(89220).a,n.DecoderBuffer=r(47227).t,n.EncoderBuffer=r(47227).d,n.Node=r(90993)},9990:function(e,t,r){"use strict";var n,i,o,s,a=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},u=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CFB=void 0;const c=r(86342);class l extends c.ModeOfOperation{constructor(e,t,r=8){if(super("CFB",e,l),n.add(this),i.set(this,void 0),o.set(this,void 0),!Number.isInteger(r)||r%8)throw new TypeError("invalid segmentSize");if(Object.defineProperties(this,{segmentSize:{enumerable:!0,value:r}}),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");a(this,i,new Uint8Array(t),"f")}else a(this,i,new Uint8Array(16),"f");a(this,o,this.iv,"f")}get iv(){return new Uint8Array(u(this,i,"f"))}encrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid plaintext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let e=0;e<r.length;e+=t){const i=this.aes.encrypt(u(this,o,"f"));for(let n=0;n<t;n++)r[e+n]^=i[n];u(this,n,"m",s).call(this,r.subarray(e))}return r}decrypt(e){if(8*e.length%this.segmentSize)throw new TypeError("invalid ciphertext size (must be multiple of segmentSize bytes)");const t=this.segmentSize/8,r=new Uint8Array(e);for(let i=0;i<r.length;i+=t){const a=this.aes.encrypt(u(this,o,"f"));for(let e=0;e<t;e++)r[i+e]^=a[e];u(this,n,"m",s).call(this,e.subarray(i))}return r}}t.CFB=l,i=new WeakMap,o=new WeakMap,n=new WeakSet,s=function(e){const t=this.segmentSize/8;u(this,o,"f").set(u(this,o,"f").subarray(t)),u(this,o,"f").set(e.subarray(0,t),16-t)}},10281:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isFunction=void 0,t.isFunction=function(e){return"function"==typeof e}},10381:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ReplaySubject=void 0;var o=r(76808),s=r(93275),a=function(e){function t(t,r,n){void 0===t&&(t=1/0),void 0===r&&(r=1/0),void 0===n&&(n=s.dateTimestampProvider);var i=e.call(this)||this;return i._bufferSize=t,i._windowTime=r,i._timestampProvider=n,i._buffer=[],i._infiniteTimeWindow=!0,i._infiniteTimeWindow=r===1/0,i._bufferSize=Math.max(1,t),i._windowTime=Math.max(1,r),i}return i(t,e),t.prototype.next=function(t){var r=this,n=r.isStopped,i=r._buffer,o=r._infiniteTimeWindow,s=r._timestampProvider,a=r._windowTime;n||(i.push(t),!o&&i.push(s.now()+a)),this._trimBuffer(),e.prototype.next.call(this,t)},t.prototype._subscribe=function(e){this._throwIfClosed(),this._trimBuffer();for(var t=this._innerSubscribe(e),r=this._infiniteTimeWindow,n=this._buffer.slice(),i=0;i<n.length&&!e.closed;i+=r?1:2)e.next(n[i]);return this._checkFinalizedStatuses(e),t},t.prototype._trimBuffer=function(){var e=this,t=e._bufferSize,r=e._timestampProvider,n=e._buffer,i=e._infiniteTimeWindow,o=(i?1:2)*t;if(t<1/0&&o<n.length&&n.splice(0,n.length-o),!i){for(var s=r.now(),a=0,u=1;u<n.length&&n[u]<=s;u+=2)a=u;a&&n.splice(0,a+1)}},t}(o.Subject);t.ReplaySubject=a},10706:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buffer=void 0;var n=r(65212),i=r(5717),o=r(17214),s=r(19724);t.buffer=function(e){return n.operate((function(t,r){var n=[];return t.subscribe(o.createOperatorSubscriber(r,(function(e){return n.push(e)}),(function(){r.next(n),r.complete()}))),s.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){var e=n;n=[],r.next(e)}),i.noop)),function(){n=null}}))}},10924:(e,t,r)=>{var n=r(65606),i="undefined"!=typeof window?window.Gun:r(54827);i.on("create",(function(e){i.TESTING&&(e.opt.file="radatatest"),this.to.next(e);var t,o=e.opt;if(!1!==o.rad&&!1!==o.radisk&&(t+""==typeof n||"false"!=""+(n.env||"").RAD)){var s=i.window&&i.window.Radisk||r(29617),a=s.Radix,u=s(o),c=String.fromCharCode(27),l=0;e.on("put",(function(t){if(this.to.next(t),!(t._||"").rad){var r=t["#"],n=t.put,i=n["#"],o=n["."],s=n[":"],a=n[">"],l=(t._||"").DBG;l&&(l.sp=l.sp||+new Date);var f=(t._||"").RPS||((t._||"").RPS=+new Date);u(i+c+o,{":":s,">":a},(function(t,n){l&&(l.spd=l.spd||+new Date),console.STAT&&console.STAT(f,+new Date-f,"put"),t?e.on("in",{"@":r,err:t,DBG:l}):e.on("in",{"@":r,ok:n,DBG:l})}),!1,l&&(l.r=l.r||{})),l&&(l.sps=l.sps||+new Date)}})),Object.empty,e.on("get",(function(r){this.to.next(r);var n=(r._||"").DBG=r.DBG;n&&(n.sg=+new Date);var h,d,p,g,b=r["#"],y=r.get,m=r.get["#"],v=r.get["."]||"",w={};if("string"==typeof m?d=m:m&&(t!==(p=m["*"])&&(w.limit=g=1),t!==m[">"]&&(w.start=m[">"]),t!==m["<"]&&(w.end=m["<"]),d=g?""+p:p||m["="],g=null),d&&!w.limit&&("string"==typeof v?d=d+c+(w.atom=v):v&&(t!==v[">"]&&(w.start=v[">"],w.limit=1),t!==v["<"]&&(w.end=v["<"],w.limit=1),t!==(p=v["*"])&&(w.limit=g=1),d&&(d=d+c+(g?""+(p||""):p||(w.atom=v["="]||""))))),((p=y["%"])||w.limit)&&(w.limit=p<=(w.pack||1e5)?p:1),(v["-"]||(m||{})["-"]||y["-"])&&(w.reverse=!0),(p=(e.next||"")[m])&&p.put)if(w.atom){if((p=(p.next||"")[w.atom])&&p.root&&p.root.graph&&p.root.graph[m]&&p.root.graph[m][w.atom])return}else if(p&&p.rad)return;var E=i.state(),A=+new Date,_=0;function S(e,t,r,n){if(_++,e){var o=(t=(d+t).split(c)).slice(0,1)[0];if(t=t.slice(-1)[0],w.limit&&w.limit<=w.count)return!0;var a,u,l=o,f=t;if("string"!=typeof e)return a=e[":"],u=e[">"],(h=h||{})[l]=i.state.ify(h[l],f,u,a,l),void(w.count=(w.count||0)+((a||"").length||9));w.count=(w.count||0)+e.length;var p=e.lastIndexOf(">"),g=s.decode(e.slice(p+1),null,c);e=s.decode(e.slice(0,p),null,c),(h=h||{})[o]=i.state.ify(h[o],t,g,e,o)}}n&&(n.sgm=A),u(d||"",(function(r,s,u){n&&(n.sgr=+new Date),n&&(n.sgi=u);try{o.store.stats.get.time[f%50]=+new Date-A,++f,o.store.stats.get.count++,r&&(o.store.stats.get.err=r)}catch(e){}var p,g;if(console.STAT&&console.STAT(A,+new Date-A,"got",JSON.stringify(d)),A=+new Date,(u=u||"").unit&&s&&t!==(p=s[":"])&&t!==(g=s[">"])){var P=d.split(c),k=P[0],O=P[1];(h=h||{})[k]=i.state.ify(h[k],O,g,p,k),e.$.get(k).get(O)._.rad=E}else s&&("string"!=typeof s&&(w.atom?s=t:a.map(s,S,w)),!h&&s&&S(s,""),!w.atom&&!v&"string"==typeof m&&!w.limit&&!w.more&&(e.$.get(m)._.rad=E));n&&(n.sgp=+new Date),console.STAT&&(l=+new Date-A)>9&&(console.STAT(A,l,"got prep time"),console.STAT(A,_,"got prep #")),_=0,A=+new Date;var x=function(){};x.faith=!0,x.rad=y,e.on("in",{"@":b,put:h,"%":u.more?1:t,err:r||t,_:x,DBG:n}),console.STAT&&(l=+new Date-A)>9&&console.STAT(A,l,"got emit",Object.keys(h||{}).length),h=t}),w,n&&(n.r=n.r||{})),n&&(n.sgd=+new Date),console.STAT&&(l=+new Date-A)>9&&console.STAT(A,l,"get call")})),i.valid,(o.store||{}).stats={get:{time:{},count:0},put:{time:{},count:0}};var f=0}}))},11415:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(48051),s=r(19724),a=r(7652),u=r(44885),c=r(17214),l=r(26404);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e),f=a.argsOrArgArray(e);return f.length?new o.Observable((function(e){var t=f.map((function(){return[]})),o=f.map((function(){return!1}));e.add((function(){t=o=null}));for(var a=function(a){s.innerFrom(f[a]).subscribe(c.createOperatorSubscriber(e,(function(s){if(t[a].push(s),t.every((function(e){return e.length}))){var u=t.map((function(e){return e.shift()}));e.next(r?r.apply(void 0,i([],n(u))):u),t.some((function(e,t){return!e.length&&o[t]}))&&e.complete()}}),(function(){o[a]=!0,!t[a].length&&e.complete()})))},u=0;!e.closed&&u<f.length;u++)a(u);return function(){t=o=null}})):u.EMPTY}},11464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaust=void 0;var n=r(17977);t.exhaust=n.exhaustAll},11934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.never=t.NEVER=void 0;var n=r(48051),i=r(5717);t.NEVER=new n.Observable(i.noop),t.never=function(){return t.NEVER}},12187:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isIterable=void 0;var n=r(34891),i=r(10281);t.isIterable=function(e){return i.isFunction(null==e?void 0:e[n.iterator])}},12205:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.version=void 0,t.version="6.14.3"},12688:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.captureError=t.errorContext=void 0;var n=r(93728),i=null;t.errorContext=function(e){if(n.config.useDeprecatedSynchronousErrorHandling){var t=!i;if(t&&(i={errorThrown:!1,error:null}),e(),t){var r=i,o=r.errorThrown,s=r.error;if(i=null,o)throw s}}else e()},t.captureError=function(e){n.config.useDeprecatedSynchronousErrorHandling&&i&&(i.errorThrown=!0,i.error=e)}},12931:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Mnemonic=void 0;const n=r(32291),i=r(75347),o=r(79943);function s(e){return(1<<e)-1<<8-e&255}function a(e,t){(0,i.assertNormalize)("NFKD"),null==t&&(t=o.LangEn.wordlist());const r=t.split(e);(0,i.assertArgument)(r.length%3==0&&r.length>=12&&r.length<=24,"invalid mnemonic length","mnemonic","[ REDACTED ]");const a=new Uint8Array(Math.ceil(11*r.length/8));let u=0;for(let e=0;e<r.length;e++){let n=t.getWordIndex(r[e].normalize("NFKD"));(0,i.assertArgument)(n>=0,`invalid mnemonic word at index ${e}`,"mnemonic","[ REDACTED ]");for(let e=0;e<11;e++)n&1<<10-e&&(a[u>>3]|=1<<7-u%8),u++}const c=32*r.length/3,l=s(r.length/3),f=(0,i.getBytes)((0,n.sha256)(a.slice(0,c/8)))[0]&l;return(0,i.assertArgument)(f===(a[a.length-1]&l),"invalid mnemonic checksum","mnemonic","[ REDACTED ]"),(0,i.hexlify)(a.slice(0,c/8))}function u(e,t){(0,i.assertArgument)(e.length%4==0&&e.length>=16&&e.length<=32,"invalid entropy size","entropy","[ REDACTED ]"),null==t&&(t=o.LangEn.wordlist());const r=[0];let a=11;for(let t=0;t<e.length;t++)a>8?(r[r.length-1]<<=8,r[r.length-1]|=e[t],a-=8):(r[r.length-1]<<=a,r[r.length-1]|=e[t]>>8-a,r.push(e[t]&(1<<8-a)-1&255),a+=3);const u=e.length/4,c=parseInt((0,n.sha256)(e).substring(2,4),16)&s(u);return r[r.length-1]<<=u,r[r.length-1]|=c>>8-u,t.join(r.map((e=>t.getWord(e))))}const c={};class l{phrase;password;wordlist;entropy;constructor(e,t,r,n,s){null==n&&(n=""),null==s&&(s=o.LangEn.wordlist()),(0,i.assertPrivate)(e,c,"Mnemonic"),(0,i.defineProperties)(this,{phrase:r,password:n,wordlist:s,entropy:t})}computeSeed(){const e=(0,i.toUtf8Bytes)("mnemonic"+this.password,"NFKD");return(0,n.pbkdf2)((0,i.toUtf8Bytes)(this.phrase,"NFKD"),e,2048,64,"sha512")}static fromPhrase(e,t,r){const n=a(e,r);return e=u((0,i.getBytes)(n),r),new l(c,n,e,t,r)}static fromEntropy(e,t,r){const n=(0,i.getBytes)(e,"entropy"),o=u(n,r);return new l(c,(0,i.hexlify)(n),o,t,r)}static entropyToPhrase(e,t){return u((0,i.getBytes)(e,"entropy"),t)}static phraseToEntropy(e,t){return a(e,t)}static isValidMnemonic(e,t){try{return a(e,t),!0}catch(e){}return!1}}t.Mnemonic=l},13337:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapTo=void 0;var n=r(26872);t.mapTo=function(e){return n.map((function(){return e}))}},13905:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.keccak256=void 0;const n=r(96534),i=r(75347);let o=!1;const s=function(e){return(0,n.keccak_256)(e)};let a=s;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.keccak256=u,u._=s,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("keccak256 is locked");a=e},Object.freeze(u)},13916:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mapOneOrManyArgs=void 0;var o=r(26872),s=Array.isArray;t.mapOneOrManyArgs=function(e){return o.map((function(t){return function(e,t){return s(t)?e.apply(void 0,i([],n(t))):e(t)}(e,t)}))}},14120:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.not=void 0,t.not=function(e,t){return function(r,n){return!e.call(t,r,n)}}},14134:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventEmitter=void 0;const n=r(45628);t.EventEmitter=class{events;constructor(){this.events=new Map}on(e,t){this.events.has(e)||this.events.set(e,[]),this.events.get(e)?.push(t)}emit(e,t){return!!this.events.has(e)&&((this.events.get(e)||[]).forEach((r=>{try{r(t)}catch(t){(0,n.logError)(`Error in event listener for ${String(e)}:`,t)}})),!0)}off(e,t){if(!this.events.has(e))return;const r=this.events.get(e)||[],n=r.indexOf(t);-1!==n&&(r.splice(n,1),0===r.length?this.events.delete(e):this.events.set(e,r))}once(e,t){const r=n=>{t(n),this.off(e,r)};this.on(e,r)}removeAllListeners(e){e?this.events.delete(e):this.events.clear()}}},14193:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ethers=void 0;const n=r(89990),i=n.__importStar(r(51752));t.ethers=i,n.__exportStar(r(51752),t)},14359:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectableObservable=void 0;var o=r(48051),s=r(69879),a=r(79224),u=r(17214),c=r(65212),l=function(e){function t(t,r){var n=e.call(this)||this;return n.source=t,n.subjectFactory=r,n._subject=null,n._refCount=0,n._connection=null,c.hasLift(t)&&(n.lift=t.lift),n}return i(t,e),t.prototype._subscribe=function(e){return this.getSubject().subscribe(e)},t.prototype.getSubject=function(){var e=this._subject;return e&&!e.isStopped||(this._subject=this.subjectFactory()),this._subject},t.prototype._teardown=function(){this._refCount=0;var e=this._connection;this._subject=this._connection=null,null==e||e.unsubscribe()},t.prototype.connect=function(){var e=this,t=this._connection;if(!t){t=this._connection=new s.Subscription;var r=this.getSubject();t.add(this.source.subscribe(u.createOperatorSubscriber(r,void 0,(function(){e._teardown(),r.complete()}),(function(t){e._teardown(),r.error(t)}),(function(){return e._teardown()})))),t.closed&&(this._connection=null,t=s.Subscription.EMPTY)}return t},t.prototype.refCount=function(){return a.refCount()(this)},t}(o.Observable);t.ConnectableObservable=l},14910:(e,t,r)=>{var n=r(48287).Buffer,i=r(39404),o=new(r(52244)),s=new i(24),a=new i(11),u=new i(10),c=new i(3),l=new i(7),f=r(4934),h=r(53209);function d(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._pub=new i(e),this}function p(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this._priv=new i(e),this}e.exports=b;var g={};function b(e,t,r){this.setGenerator(t),this.__prime=new i(e),this._prime=i.mont(this.__prime),this._primeLen=e.length,this._pub=void 0,this._priv=void 0,this._primeCode=void 0,r?(this.setPublicKey=d,this.setPrivateKey=p):this._primeCode=8}function y(e,t){var r=new n(e.toArray());return t?r.toString(t):r}Object.defineProperty(b.prototype,"verifyError",{enumerable:!0,get:function(){return"number"!=typeof this._primeCode&&(this._primeCode=function(e,t){var r=t.toString("hex"),n=[r,e.toString(16)].join("_");if(n in g)return g[n];var i,h=0;if(e.isEven()||!f.simpleSieve||!f.fermatTest(e)||!o.test(e))return h+=1,h+="02"===r||"05"===r?8:4,g[n]=h,h;switch(o.test(e.shrn(1))||(h+=2),r){case"02":e.mod(s).cmp(a)&&(h+=8);break;case"05":(i=e.mod(u)).cmp(c)&&i.cmp(l)&&(h+=8);break;default:h+=4}return g[n]=h,h}(this.__prime,this.__gen)),this._primeCode}}),b.prototype.generateKeys=function(){return this._priv||(this._priv=new i(h(this._primeLen))),this._pub=this._gen.toRed(this._prime).redPow(this._priv).fromRed(),this.getPublicKey()},b.prototype.computeSecret=function(e){var t=(e=(e=new i(e)).toRed(this._prime)).redPow(this._priv).fromRed(),r=new n(t.toArray()),o=this.getPrime();if(r.length<o.length){var s=new n(o.length-r.length);s.fill(0),r=n.concat([s,r])}return r},b.prototype.getPublicKey=function(e){return y(this._pub,e)},b.prototype.getPrivateKey=function(e){return y(this._priv,e)},b.prototype.getPrime=function(e){return y(this.__prime,e)},b.prototype.getGenerator=function(e){return y(this._gen,e)},b.prototype.setGenerator=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.__gen=e,this._gen=new i(e),this}},15019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.tap=void 0;var n=r(10281),i=r(65212),o=r(17214),s=r(87699);t.tap=function(e,t,r){var a=n.isFunction(e)||t||r?{next:e,error:t,complete:r}:e;return a?i.operate((function(e,t){var r;null===(r=a.subscribe)||void 0===r||r.call(a);var n=!0;e.subscribe(o.createOperatorSubscriber(t,(function(e){var r;null===(r=a.next)||void 0===r||r.call(a,e),t.next(e)}),(function(){var e;n=!1,null===(e=a.complete)||void 0===e||e.call(a),t.complete()}),(function(e){var r;n=!1,null===(r=a.error)||void 0===r||r.call(a,e),t.error(e)}),(function(){var e,t;n&&(null===(e=a.unsubscribe)||void 0===e||e.call(a)),null===(t=a.finalize)||void 0===t||t.call(a)})))})):s.identity}},15037:(e,t,r)=>{var n;function i(e){this.rand=e}if(e.exports=function(e){return n||(n=new i(null)),n.generate(e)},e.exports.Rand=i,i.prototype.generate=function(e){return this._rand(e)},i.prototype._rand=function(e){if(this.rand.getBytes)return this.rand.getBytes(e);for(var t=new Uint8Array(e),r=0;r<t.length;r++)t[r]=this.rand.getByte();return t},"object"==typeof self)self.crypto&&self.crypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.crypto.getRandomValues(t),t}:self.msCrypto&&self.msCrypto.getRandomValues?i.prototype._rand=function(e){var t=new Uint8Array(e);return self.msCrypto.getRandomValues(t),t}:"object"==typeof window&&(i.prototype._rand=function(){throw new Error("Not implemented yet")});else try{var o=r(73776);if("function"!=typeof o.randomBytes)throw new Error("Not supported");i.prototype._rand=function(e){return o.randomBytes(e)}}catch(e){}},15340:()=>{},15380:(e,t,r)=>{var n=r(48287).Buffer,i=r(4934),o=r(23241),s=r(14910),a={binary:!0,hex:!0,base64:!0};t.DiffieHellmanGroup=t.createDiffieHellmanGroup=t.getDiffieHellman=function(e){var t=new n(o[e].prime,"hex"),r=new n(o[e].gen,"hex");return new s(t,r)},t.createDiffieHellman=t.DiffieHellman=function e(t,r,o,u){return n.isBuffer(r)||void 0===a[r]?e(t,"binary",r,o):(r=r||"binary",u=u||"binary",o=o||new n([2]),n.isBuffer(o)||(o=new n(o,u)),"number"==typeof t?new s(i(t,o),o,!0):(n.isBuffer(t)||(t=new n(t,r)),new s(t,o,!0)))}},15579:e=>{"use strict";e.exports=JSON.parse('{"2.16.840.1.101.3.4.1.1":"aes-128-ecb","2.16.840.1.101.3.4.1.2":"aes-128-cbc","2.16.840.1.101.3.4.1.3":"aes-128-ofb","2.16.840.1.101.3.4.1.4":"aes-128-cfb","2.16.840.1.101.3.4.1.21":"aes-192-ecb","2.16.840.1.101.3.4.1.22":"aes-192-cbc","2.16.840.1.101.3.4.1.23":"aes-192-ofb","2.16.840.1.101.3.4.1.24":"aes-192-cfb","2.16.840.1.101.3.4.1.41":"aes-256-ecb","2.16.840.1.101.3.4.1.42":"aes-256-cbc","2.16.840.1.101.3.4.1.43":"aes-256-ofb","2.16.840.1.101.3.4.1.44":"aes-256-cfb"}')},15622:(e,t,r)=>{function n(e){return Object.prototype.toString.call(e)}t.isArray=function(e){return Array.isArray?Array.isArray(e):"[object Array]"===n(e)},t.isBoolean=function(e){return"boolean"==typeof e},t.isNull=function(e){return null===e},t.isNullOrUndefined=function(e){return null==e},t.isNumber=function(e){return"number"==typeof e},t.isString=function(e){return"string"==typeof e},t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=function(e){return void 0===e},t.isRegExp=function(e){return"[object RegExp]"===n(e)},t.isObject=function(e){return"object"==typeof e&&null!==e},t.isDate=function(e){return"[object Date]"===n(e)},t.isError=function(e){return"[object Error]"===n(e)||e instanceof Error},t.isFunction=function(e){return"function"==typeof e},t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(48287).Buffer.isBuffer},15717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(4718),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=s-u*e,o=a-c*e;n=r,r=t,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&h(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const c=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,c),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,o<<BigInt(s-t-1));u=e.sqr(r),l=e.mul(l,r),f=e.mul(f,u),s=t}return l}}function g(e){if(e%u===a){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===c){const t=(e-c)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),u=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw new Error("Cannot find square root");return u}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=b.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=y,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>y(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>c(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=w(t),a=E(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(u,s):(0,n.numberToBytesBE)(u,s)}},15810:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createObject=void 0,t.createObject=function(e,t){return e.reduce((function(e,r,n){return e[r]=t[n],e}),{})}},15863:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Interface=t.Indexed=t.ErrorDescription=t.TransactionDescription=t.LogDescription=t.Result=t.checkResultErrors=void 0;const n=r(32291),i=r(23562),o=r(75347),s=r(50954),a=r(38869);Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return a.checkResultErrors}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return a.Result}});const u=r(189),c=r(39976);class l{fragment;name;signature;topic;args;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,signature:i,topic:t,args:r})}}t.LogDescription=l;class f{fragment;name;args;signature;selector;value;constructor(e,t,r,n){const i=e.name,s=e.format();(0,o.defineProperties)(this,{fragment:e,name:i,args:r,signature:s,selector:t,value:n})}}t.TransactionDescription=f;class h{fragment;name;args;signature;selector;constructor(e,t,r){const n=e.name,i=e.format();(0,o.defineProperties)(this,{fragment:e,name:n,args:r,signature:i,selector:t})}}t.ErrorDescription=h;class d{hash;_isIndexed;static isIndexed(e){return!(!e||!e._isIndexed)}constructor(e){(0,o.defineProperties)(this,{hash:e,_isIndexed:!0})}}t.Indexed=d;const p={0:"generic panic",1:"assert(false)",17:"arithmetic overflow",18:"division or modulo by zero",33:"enum overflow",34:"invalid encoded storage byte array accessed",49:"out-of-bounds array access; popping on an empty array",50:"out-of-bounds access of an array or bytesN",65:"out of memory",81:"uninitialized function"},g={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:e=>`reverted with reason string ${JSON.stringify(e)}`},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"],reason:e=>{let t="unknown panic code";return e>=0&&e<=255&&p[e.toString()]&&(t=p[e.toString()]),`reverted with panic code 0x${e.toString(16)} (${t})`}}};class b{fragments;deploy;fallback;receive;#s;#a;#u;#c;constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,this.#u=new Map,this.#s=new Map,this.#a=new Map;const r=[];for(const e of t)try{r.push(u.Fragment.from(e))}catch(t){console.log(`[Warning] Invalid Fragment ${JSON.stringify(e)}:`,t.message)}(0,o.defineProperties)(this,{fragments:Object.freeze(r)});let n=null,i=!1;this.#c=this.getAbiCoder(),this.fragments.forEach(((e,t)=>{let r;switch(e.type){case"constructor":return this.deploy?void console.log("duplicate definition - constructor"):void(0,o.defineProperties)(this,{deploy:e});case"fallback":return void(0===e.inputs.length?i=!0:((0,o.assertArgument)(!n||e.payable!==n.payable,"conflicting fallback fragments",`fragments[${t}]`,e),n=e,i=n.payable));case"function":r=this.#u;break;case"event":r=this.#a;break;case"error":r=this.#s;break;default:return}const s=e.format();r.has(s)||r.set(s,e)})),this.deploy||(0,o.defineProperties)(this,{deploy:u.ConstructorFragment.from("constructor()")}),(0,o.defineProperties)(this,{fallback:n,receive:i})}format(e){const t=e?"minimal":"full";return this.fragments.map((e=>e.format(t)))}formatJson(){const e=this.fragments.map((e=>e.format("json")));return JSON.stringify(e.map((e=>JSON.parse(e))))}getAbiCoder(){return s.AbiCoder.defaultAbiCoder()}#l(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#u.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#u)t.split("(")[0]===e&&n.push(r);if(t){const e=t.length>0?t[t.length-1]:null;let r=t.length,i=!0;c.Typed.isTyped(e)&&"overrides"===e.type&&(i=!1,r--);for(let e=n.length-1;e>=0;e--){const t=n[e].inputs.length;t===r||i&&t===r-1||n.splice(e,1)}for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(c.Typed.isTyped(t[i])){if(i>=r.length){if("overrides"===t[i].type)continue;n.splice(e,1);break}if(t[i].type!==r[i].baseType){n.splice(e,1);break}}}}if(1===n.length&&t&&t.length!==n[0].inputs.length){const e=t[t.length-1];(null==e||Array.isArray(e)||"object"!=typeof e)&&n.splice(0,1)}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous function description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#u.get(u.FunctionFragment.from(e).format())||null}getFunctionName(e){const t=this.#l(e,null,!1);return(0,o.assertArgument)(t,"no matching function","key",e),t.name}hasFunction(e){return!!this.#l(e,null,!1)}getFunction(e,t){return this.#l(e,t||null,!0)}forEachFunction(e){const t=Array.from(this.#u.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#u.get(n),r)}}#f(e,t,r){if((0,o.isHexString)(e)){const t=e.toLowerCase();for(const e of this.#a.values())if(t===e.topicHash)return e;return null}if(-1===e.indexOf("(")){const n=[];for(const[t,r]of this.#a)t.split("(")[0]===e&&n.push(r);if(t){for(let e=n.length-1;e>=0;e--)n[e].inputs.length<t.length&&n.splice(e,1);for(let e=n.length-1;e>=0;e--){const r=n[e].inputs;for(let i=0;i<t.length;i++)if(c.Typed.isTyped(t[i])&&t[i].type!==r[i].baseType){n.splice(e,1);break}}}if(0===n.length)return null;if(n.length>1&&r){const t=n.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous event description (i.e. matches ${t})`,"key",e)}return n[0]}return this.#a.get(u.EventFragment.from(e).format())||null}getEventName(e){const t=this.#f(e,null,!1);return(0,o.assertArgument)(t,"no matching event","key",e),t.name}hasEvent(e){return!!this.#f(e,null,!1)}getEvent(e,t){return this.#f(e,t||null,!0)}forEachEvent(e){const t=Array.from(this.#a.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#a.get(n),r)}}getError(e,t){if((0,o.isHexString)(e)){const t=e.toLowerCase();if(g[t])return u.ErrorFragment.from(g[t].signature);for(const e of this.#s.values())if(t===e.selector)return e;return null}if(-1===e.indexOf("(")){const t=[];for(const[r,n]of this.#s)r.split("(")[0]===e&&t.push(n);if(0===t.length)return"Error"===e?u.ErrorFragment.from("error Error(string)"):"Panic"===e?u.ErrorFragment.from("error Panic(uint256)"):null;if(t.length>1){const r=t.map((e=>JSON.stringify(e.format()))).join(", ");(0,o.assertArgument)(!1,`ambiguous error description (i.e. ${r})`,"name",e)}return t[0]}if("Error(string)"===(e=u.ErrorFragment.from(e).format()))return u.ErrorFragment.from("error Error(string)");if("Panic(uint256)"===e)return u.ErrorFragment.from("error Panic(uint256)");return this.#s.get(e)||null}forEachError(e){const t=Array.from(this.#s.keys());t.sort(((e,t)=>e.localeCompare(t)));for(let r=0;r<t.length;r++){const n=t[r];e(this.#s.get(n),r)}}_decodeParams(e,t){return this.#c.decode(e,t)}_encodeParams(e,t){return this.#c.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match error ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeErrorResult(e,t){if("string"==typeof e){const t=this.getError(e);(0,o.assertArgument)(t,"unknown error","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.assertArgument)((0,o.dataSlice)(t,0,4)===e.selector,`data signature does not match function ${e.name}.`,"data",t),this._decodeParams(e.inputs,(0,o.dataSlice)(t,4))}encodeFunctionData(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.concat)([e.selector,this._encodeParams(e.inputs,t||[])])}decodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}let r="invalid length for result data";const n=(0,o.getBytesCopy)(t);if(n.length%32==0)try{return this.#c.decode(e.outputs,n)}catch(e){r="could not decode result data"}(0,o.assert)(!1,r,"BAD_DATA",{value:(0,o.hexlify)(n),info:{method:e.name,signature:e.format()}})}makeError(e,t){const r=(0,o.getBytes)(e,"data"),n=s.AbiCoder.getBuiltinCallException("call",t,r);if(n.message.startsWith("execution reverted (unknown custom error)")){const e=(0,o.hexlify)(r.slice(0,4)),t=this.getError(e);if(t)try{const e=this.#c.decode(t.inputs,r.slice(4));n.revert={name:t.name,signature:t.format(),args:e},n.reason=n.revert.signature,n.message=`execution reverted: ${n.reason}`}catch(e){n.message="execution reverted (coult not decode custom error)"}}const i=this.parseTransaction(t);return i&&(n.invocation={method:i.name,signature:i.signature,args:i.args}),n}encodeFunctionResult(e,t){if("string"==typeof e){const t=this.getFunction(e);(0,o.assertArgument)(t,"unknown function","fragment",e),e=t}return(0,o.hexlify)(this.#c.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}(0,o.assert)(t.length<=e.inputs.length,`too many arguments for ${e.format()}`,"UNEXPECTED_ARGUMENT",{count:t.length,expectedCount:e.inputs.length});const r=[];e.anonymous||r.push(e.topicHash);const s=(e,t)=>"string"===e.type?(0,i.id)(t):"bytes"===e.type?(0,n.keccak256)((0,o.hexlify)(t)):("bool"===e.type&&"boolean"==typeof t?t=t?"0x01":"0x00":e.type.match(/^u?int/)?t=(0,o.toBeHex)(t):e.type.match(/^bytes/)?t=(0,o.zeroPadBytes)(t,32):"address"===e.type&&this.#c.encode(["address"],[t]),(0,o.zeroPadValue)((0,o.hexlify)(t),32));for(t.forEach(((t,n)=>{const i=e.inputs[n];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?(0,o.assertArgument)(!1,"filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>s(i,e)))):r.push(s(i,t)):(0,o.assertArgument)(null==t,"cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}const r=[],s=[],a=[];return e.anonymous||r.push(e.topicHash),(0,o.assertArgument)(t.length===e.inputs.length,"event arguments/values mismatch","values",t),e.inputs.forEach(((e,o)=>{const u=t[o];if(e.indexed)if("string"===e.type)r.push((0,i.id)(u));else if("bytes"===e.type)r.push((0,n.keccak256)(u));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this.#c.encode([e.type],[u]))}else s.push(e),a.push(u)})),{data:this.#c.encode(s,a),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e){const t=this.getEvent(e);(0,o.assertArgument)(t,"unknown event","eventFragment",e),e=t}if(null!=r&&!e.anonymous){const t=e.topicHash;(0,o.assertArgument)((0,o.isHexString)(r[0],32)&&r[0].toLowerCase()===t,"fragment/topic mismatch","topics[0]",r[0]),r=r.slice(1)}const n=[],i=[],s=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u.ParamType.from({type:"bytes32",name:e.name})),s.push(!0)):(n.push(e),s.push(!1)):(i.push(e),s.push(!1))}));const c=null!=r?this.#c.decode(n,(0,o.concat)(r)):null,l=this.#c.decode(i,t,!0),f=[],h=[];let p=0,g=0;return e.inputs.forEach(((e,t)=>{let r=null;if(e.indexed)if(null==c)r=new d(null);else if(s[t])r=new d(c[g++]);else try{r=c[g++]}catch(e){r=e}else try{r=l[p++]}catch(e){r=e}f.push(r),h.push(e.name||null)})),a.Result.fromItems(f,h)}parseTransaction(e){const t=(0,o.getBytes)(e.data,"tx.data"),r=(0,o.getBigInt)(null!=e.value?e.value:0,"tx.value"),n=this.getFunction((0,o.hexlify)(t.slice(0,4)));if(!n)return null;const i=this.#c.decode(n.inputs,t.slice(4));return new f(n,n.selector,i,r)}parseCallResult(e){throw new Error("@TODO")}parseLog(e){const t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new l(t,t.topicHash,this.decodeEventLog(t,e.data,e.topics))}parseError(e){const t=(0,o.hexlify)(e),r=this.getError((0,o.dataSlice)(t,0,4));if(!r)return null;const n=this.#c.decode(r.inputs,(0,o.dataSlice)(t,4));return new h(r,r.selector,n)}static from(e){return e instanceof b?e:"string"==typeof e?new b(JSON.parse(e)):"function"==typeof e.formatJson?new b(e.formatJson()):"function"==typeof e.format?new b(e.format("json")):new b(e)}}t.Interface=b},15887:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrame=t.animationFrameScheduler=void 0;var n=r(6757),i=r(74478);t.animationFrameScheduler=new i.AnimationFrameScheduler(n.AnimationFrameAction),t.animationFrame=t.animationFrameScheduler},16002:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.immediateProvider=void 0;var o=r(92052),s=o.Immediate.setImmediate,a=o.Immediate.clearImmediate;t.immediateProvider={setImmediate:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.immediateProvider.delegate;return((null==o?void 0:o.setImmediate)||s).apply(void 0,i([],n(e)))},clearImmediate:function(e){var r=t.immediateProvider.delegate;return((null==r?void 0:r.clearImmediate)||a)(e)},delegate:void 0}},16201:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchAll=void 0;var n=r(90680),i=r(87699);t.switchAll=function(){return n.switchMap(i.identity)}},16707:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeScan=void 0;var n=r(65212),i=r(2574);t.mergeScan=function(e,t,r){return void 0===r&&(r=1/0),n.operate((function(n,o){var s=t;return i.mergeInternals(n,o,(function(t,r){return e(s,t,r)}),r,(function(e){s=e}),!1,void 0,(function(){return s=null}))}))}},16708:(e,t,r)=>{"use strict";var n,i=r(65606);function o(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(undefined),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}e.exports=P,P.WritableState=S;var s,a={deprecate:r(94643)},u=r(40345),c=r(48287).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(75896),h=r(65291).getHighWaterMark,d=r(86048).F,p=d.ERR_INVALID_ARG_TYPE,g=d.ERR_METHOD_NOT_IMPLEMENTED,b=d.ERR_MULTIPLE_CALLBACK,y=d.ERR_STREAM_CANNOT_PIPE,m=d.ERR_STREAM_DESTROYED,v=d.ERR_STREAM_NULL_VALUES,w=d.ERR_STREAM_WRITE_AFTER_END,E=d.ERR_UNKNOWN_ENCODING,A=f.errorOrDestroy;function _(){}function S(e,t,s){n=n||r(25382),e=e||{},"boolean"!=typeof s&&(s=t instanceof n),this.objectMode=!!e.objectMode,s&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=h(this,e,"writableHighWaterMark",s),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,o=r.writecb;if("function"!=typeof o)throw new b;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,o){--t.pendingcb,r?(i.nextTick(o,n),i.nextTick(T,e,t),e._writableState.errorEmitted=!0,A(e,n)):(o(n),e._writableState.errorEmitted=!0,A(e,n),T(e,t))}(e,r,n,t,o);else{var s=M(r)||e.destroyed;s||r.corked||r.bufferProcessing||!r.bufferedRequest||x(e,r),n?i.nextTick(O,e,r,s,o):O(e,r,s,o)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new o(this)}function P(e){var t=this instanceof(n=n||r(25382));if(!t&&!s.call(P,this))return new P(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),u.call(this)}function k(e,t,r,n,i,o,s){t.writelen=n,t.writecb=s,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new m("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function O(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),T(e,t)}function x(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var n=t.bufferedRequestCount,i=new Array(n),s=t.corkedRequestsFree;s.entry=r;for(var a=0,u=!0;r;)i[a]=r,r.isBuf||(u=!1),r=r.next,a+=1;i.allBuffers=u,k(e,t,!0,t.length,i,"",s.finish),t.pendingcb++,t.lastBufferedRequest=null,s.next?(t.corkedRequestsFree=s.next,s.next=null):t.corkedRequestsFree=new o(t),t.bufferedRequestCount=0}else{for(;r;){var c=r.chunk,l=r.encoding,f=r.callback;if(k(e,t,!1,t.objectMode?1:c.length,c,l,f),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function M(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function B(e,t){e._final((function(r){t.pendingcb--,r&&A(e,r),t.prefinished=!0,e.emit("prefinish"),T(e,t)}))}function T(e,t){var r=M(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,i.nextTick(B,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(56698)(P,u),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate((function(){return this.getBuffer()}),"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(s=Function.prototype[Symbol.hasInstance],Object.defineProperty(P,Symbol.hasInstance,{value:function(e){return!!s.call(this,e)||this===P&&e&&e._writableState instanceof S}})):s=function(e){return e instanceof this},P.prototype.pipe=function(){A(this,new y)},P.prototype.write=function(e,t,r){var n,o=this._writableState,s=!1,a=!o.objectMode&&(n=e,c.isBuffer(n)||n instanceof l);return a&&!c.isBuffer(e)&&(e=function(e){return c.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=o.defaultEncoding),"function"!=typeof r&&(r=_),o.ending?function(e,t){var r=new w;A(e,r),i.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var o;return null===r?o=new v:"string"==typeof r||t.objectMode||(o=new p("chunk",["string","Buffer"],r)),!o||(A(e,o),i.nextTick(n,o),!1)}(this,o,e,r))&&(o.pendingcb++,s=function(e,t,r,n,i,o){if(!r){var s=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=c.from(t,r)),t}(t,n,i);n!==s&&(r=!0,i="buffer",n=s)}var a=t.objectMode?1:n.length;t.length+=a;var u=t.length<t.highWaterMark;if(u||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else k(e,t,!1,a,n,i,o);return u}(this,o,a,e,t,r)),s},P.prototype.cork=function(){this._writableState.corked++},P.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||x(this,e))},P.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new E(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(P.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(P.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),P.prototype._write=function(e,t,r){r(new g("_write()"))},P.prototype._writev=null,P.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,T(e,t),r&&(t.finished?i.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(P.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),P.prototype.destroy=f.destroy,P.prototype._undestroy=f.undestroy,P.prototype._destroy=function(e,t){t(e)}},17076:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512_224=t.sha512_256=t.sha384=t.sha512=t.sha224=t.sha256=t.SHA512_256=t.SHA512_224=t.SHA384=t.SHA512=t.SHA224=t.SHA256=void 0;const n=r(37202),i=r(22318),o=r(99175),s=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array(64);class u extends n.HashMD{constructor(e=32){super(64,e,8,!1),this.A=0|n.SHA256_IV[0],this.B=0|n.SHA256_IV[1],this.C=0|n.SHA256_IV[2],this.D=0|n.SHA256_IV[3],this.E=0|n.SHA256_IV[4],this.F=0|n.SHA256_IV[5],this.G=0|n.SHA256_IV[6],this.H=0|n.SHA256_IV[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)a[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=a[e-15],r=a[e-2],n=(0,o.rotr)(t,7)^(0,o.rotr)(t,18)^t>>>3,i=(0,o.rotr)(r,17)^(0,o.rotr)(r,19)^r>>>10;a[e]=i+a[e-7]+n+a[e-16]|0}let{A:r,B:i,C:u,D:c,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,o.rotr)(l,6)^(0,o.rotr)(l,11)^(0,o.rotr)(l,25))+(0,n.Chi)(l,f,h)+s[e]+a[e]|0,p=((0,o.rotr)(r,2)^(0,o.rotr)(r,13)^(0,o.rotr)(r,22))+(0,n.Maj)(r,i,u)|0;d=h,h=f,f=l,l=c+t|0,c=u,u=i,i=r,r=t+p|0}r=r+this.A|0,i=i+this.B|0,u=u+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,i,u,c,l,f,h,d)}roundClean(){(0,o.clean)(a)}destroy(){this.set(0,0,0,0,0,0,0,0),(0,o.clean)(this.buffer)}}t.SHA256=u;class c extends u{constructor(){super(28),this.A=0|n.SHA224_IV[0],this.B=0|n.SHA224_IV[1],this.C=0|n.SHA224_IV[2],this.D=0|n.SHA224_IV[3],this.E=0|n.SHA224_IV[4],this.F=0|n.SHA224_IV[5],this.G=0|n.SHA224_IV[6],this.H=0|n.SHA224_IV[7]}}t.SHA224=c;const l=(()=>i.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),f=(()=>l[0])(),h=(()=>l[1])(),d=new Uint32Array(80),p=new Uint32Array(80);class g extends n.HashMD{constructor(e=64){super(128,e,16,!1),this.Ah=0|n.SHA512_IV[0],this.Al=0|n.SHA512_IV[1],this.Bh=0|n.SHA512_IV[2],this.Bl=0|n.SHA512_IV[3],this.Ch=0|n.SHA512_IV[4],this.Cl=0|n.SHA512_IV[5],this.Dh=0|n.SHA512_IV[6],this.Dl=0|n.SHA512_IV[7],this.Eh=0|n.SHA512_IV[8],this.El=0|n.SHA512_IV[9],this.Fh=0|n.SHA512_IV[10],this.Fl=0|n.SHA512_IV[11],this.Gh=0|n.SHA512_IV[12],this.Gl=0|n.SHA512_IV[13],this.Hh=0|n.SHA512_IV[14],this.Hl=0|n.SHA512_IV[15]}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:c,Fh:l,Fl:f,Gh:h,Gl:d,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,u,c,l,f,h,d,p,g]}set(e,t,r,n,i,o,s,a,u,c,l,f,h,d,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|h,this.Gl=0|d,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)d[r]=e.getUint32(t),p[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|d[e-15],r=0|p[e-15],n=i.rotrSH(t,r,1)^i.rotrSH(t,r,8)^i.shrSH(t,r,7),o=i.rotrSL(t,r,1)^i.rotrSL(t,r,8)^i.shrSL(t,r,7),s=0|d[e-2],a=0|p[e-2],u=i.rotrSH(s,a,19)^i.rotrBH(s,a,61)^i.shrSH(s,a,6),c=i.rotrSL(s,a,19)^i.rotrBL(s,a,61)^i.shrSL(s,a,6),l=i.add4L(o,c,p[e-7],p[e-16]),f=i.add4H(l,n,u,d[e-7],d[e-16]);d[e]=0|f,p[e]=0|l}let{Ah:r,Al:n,Bh:o,Bl:s,Ch:a,Cl:u,Dh:c,Dl:l,Eh:g,El:b,Fh:y,Fl:m,Gh:v,Gl:w,Hh:E,Hl:A}=this;for(let e=0;e<80;e++){const t=i.rotrSH(g,b,14)^i.rotrSH(g,b,18)^i.rotrBH(g,b,41),_=i.rotrSL(g,b,14)^i.rotrSL(g,b,18)^i.rotrBL(g,b,41),S=g&y^~g&v,P=b&m^~b&w,k=i.add5L(A,_,P,h[e],p[e]),O=i.add5H(k,E,t,S,f[e],d[e]),x=0|k,M=i.rotrSH(r,n,28)^i.rotrBH(r,n,34)^i.rotrBH(r,n,39),B=i.rotrSL(r,n,28)^i.rotrBL(r,n,34)^i.rotrBL(r,n,39),T=r&o^r&a^o&a,I=n&s^n&u^s&u;E=0|v,A=0|w,v=0|y,w=0|m,y=0|g,m=0|b,({h:g,l:b}=i.add(0|c,0|l,0|O,0|x)),c=0|a,l=0|u,a=0|o,u=0|s,o=0|r,s=0|n;const C=i.add3L(x,B,I);r=i.add3H(C,O,M,T),n=0|C}({h:r,l:n}=i.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l:s}=i.add(0|this.Bh,0|this.Bl,0|o,0|s)),({h:a,l:u}=i.add(0|this.Ch,0|this.Cl,0|a,0|u)),({h:c,l}=i.add(0|this.Dh,0|this.Dl,0|c,0|l)),({h:g,l:b}=i.add(0|this.Eh,0|this.El,0|g,0|b)),({h:y,l:m}=i.add(0|this.Fh,0|this.Fl,0|y,0|m)),({h:v,l:w}=i.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:E,l:A}=i.add(0|this.Hh,0|this.Hl,0|E,0|A)),this.set(r,n,o,s,a,u,c,l,g,b,y,m,v,w,E,A)}roundClean(){(0,o.clean)(d,p)}destroy(){(0,o.clean)(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=g;class b extends g{constructor(){super(48),this.Ah=0|n.SHA384_IV[0],this.Al=0|n.SHA384_IV[1],this.Bh=0|n.SHA384_IV[2],this.Bl=0|n.SHA384_IV[3],this.Ch=0|n.SHA384_IV[4],this.Cl=0|n.SHA384_IV[5],this.Dh=0|n.SHA384_IV[6],this.Dl=0|n.SHA384_IV[7],this.Eh=0|n.SHA384_IV[8],this.El=0|n.SHA384_IV[9],this.Fh=0|n.SHA384_IV[10],this.Fl=0|n.SHA384_IV[11],this.Gh=0|n.SHA384_IV[12],this.Gl=0|n.SHA384_IV[13],this.Hh=0|n.SHA384_IV[14],this.Hl=0|n.SHA384_IV[15]}}t.SHA384=b;const y=Uint32Array.from([2352822216,424955298,1944164710,2312950998,502970286,855612546,1738396948,1479516111,258812777,2077511080,2011393907,79989058,1067287976,1780299464,286451373,2446758561]),m=Uint32Array.from([573645204,4230739756,2673172387,3360449730,596883563,1867755857,2520282905,1497426621,2519219938,2827943907,3193839141,1401305490,721525244,746961066,246885852,2177182882]);class v extends g{constructor(){super(28),this.Ah=0|y[0],this.Al=0|y[1],this.Bh=0|y[2],this.Bl=0|y[3],this.Ch=0|y[4],this.Cl=0|y[5],this.Dh=0|y[6],this.Dl=0|y[7],this.Eh=0|y[8],this.El=0|y[9],this.Fh=0|y[10],this.Fl=0|y[11],this.Gh=0|y[12],this.Gl=0|y[13],this.Hh=0|y[14],this.Hl=0|y[15]}}t.SHA512_224=v;class w extends g{constructor(){super(32),this.Ah=0|m[0],this.Al=0|m[1],this.Bh=0|m[2],this.Bl=0|m[3],this.Ch=0|m[4],this.Cl=0|m[5],this.Dh=0|m[6],this.Dl=0|m[7],this.Eh=0|m[8],this.El=0|m[9],this.Fh=0|m[10],this.Fl=0|m[11],this.Gh=0|m[12],this.Gl=0|m[13],this.Hh=0|m[14],this.Hl=0|m[15]}}t.SHA512_256=w,t.sha256=(0,o.createHasher)((()=>new u)),t.sha224=(0,o.createHasher)((()=>new c)),t.sha512=(0,o.createHasher)((()=>new g)),t.sha384=(0,o.createHasher)((()=>new b)),t.sha512_256=(0,o.createHasher)((()=>new w)),t.sha512_224=(0,o.createHasher)((()=>new v))},17214:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.OperatorSubscriber=t.createOperatorSubscriber=void 0;var o=r(2708);t.createOperatorSubscriber=function(e,t,r,n,i){return new s(e,t,r,n,i)};var s=function(e){function t(t,r,n,i,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=r?function(e){try{r(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=i?function(e){try{i(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=n?function(){try{n()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return i(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var r=this.closed;e.prototype.unsubscribe.call(this),!r&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(o.Subscriber);t.OperatorSubscriber=s},17474:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallbackInternals=void 0;var o=r(68596),s=r(48051),a=r(5455),u=r(13916),c=r(32071),l=r(5130);t.bindCallbackInternals=function e(t,r,f,h){if(f){if(!o.isScheduler(f))return function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r,h).apply(this,n).pipe(u.mapOneOrManyArgs(f))};h=f}return h?function(){for(var n=[],i=0;i<arguments.length;i++)n[i]=arguments[i];return e(t,r).apply(this,n).pipe(a.subscribeOn(h),c.observeOn(h))}:function(){for(var e=this,o=[],a=0;a<arguments.length;a++)o[a]=arguments[a];var u=new l.AsyncSubject,c=!0;return new s.Observable((function(s){var a=u.subscribe(s);if(c){c=!1;var l=!1,f=!1;r.apply(e,i(i([],n(o)),[function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];if(t){var n=e.shift();if(null!=n)return void u.error(n)}u.next(1<e.length?e:e[0]),f=!0,l&&u.complete()}])),f&&u.complete(),l=!0}return a}))}}},17665:function(e,t,r){"use strict";var n=r(48287).Buffer,i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthConnector=void 0;const o=r(45628),s=r(14134),a=i(r(67476)),u=r(54371);class c extends s.EventEmitter{DEFAULT_CONFIG={providers:{google:{clientId:"",redirectUri:`${this.getOrigin()}/auth/callback`,scope:["openid","email","profile"],authUrl:"https://accounts.google.com/o/oauth2/v2/auth",tokenUrl:"https://oauth2.googleapis.com/token",userInfoUrl:"https://www.googleapis.com/oauth2/v2/userinfo"},github:{clientId:"",redirectUri:`${this.getOrigin()}/auth/callback`,scope:["user:email"],authUrl:"https://github.com/login/oauth/authorize",tokenUrl:"https://github.com/login/oauth/access_token",userInfoUrl:"https://api.github.com/user"},discord:{clientId:"",redirectUri:`${this.getOrigin()}/auth/callback`,scope:["identify","email"],authUrl:"https://discord.com/api/oauth2/authorize",tokenUrl:"https://discord.com/api/oauth2/token",userInfoUrl:"https://discord.com/api/users/@me"},twitter:{clientId:"",redirectUri:`${this.getOrigin()}/auth/callback`,scope:["tweet.read","users.read"],authUrl:"https://twitter.com/i/oauth2/authorize",tokenUrl:"https://api.twitter.com/2/oauth2/token",userInfoUrl:"https://api.twitter.com/2/users/me"},custom:{clientId:"",redirectUri:"",scope:[],authUrl:"",tokenUrl:"",userInfoUrl:""}},usePKCE:!0,cacheDuration:864e5,timeout:6e4,maxRetries:3,retryDelay:1e3,allowUnsafeClientSecret:!0};config;userCache=new Map;memoryStorage=new Map;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e,providers:{...this.DEFAULT_CONFIG.providers||{},...e.providers||{}}}}updateConfig(e){this.config={...this.config,...e,providers:{...this.config.providers||{},...e.providers||{}}},(0,o.logDebug)("OAuthConnector configuration updated",this.config)}getOrigin(){return"undefined"!=typeof window&&window.location?window.location.origin:"http://localhost:3000"}setItem(e,t){"undefined"!=typeof sessionStorage?sessionStorage.setItem(e,t):this.memoryStorage.set(e,t)}getItem(e){return"undefined"!=typeof sessionStorage?sessionStorage.getItem(e):this.memoryStorage.get(e)||null}removeItem(e){"undefined"!=typeof sessionStorage?sessionStorage.removeItem(e):this.memoryStorage.delete(e)}isSupported(){return"undefined"!=typeof URLSearchParams}getAvailableProviders(){return Object.keys(this.config.providers||{}).filter((e=>this.config.providers[e]?.clientId))}async generatePKCEChallenge(){const e=this.generateRandomString(128);return{codeVerifier:e,codeChallenge:await this.calculatePKCECodeChallenge(e)}}async calculatePKCECodeChallenge(e){if("undefined"!=typeof window&&window.crypto&&window.crypto.subtle){const t=(new TextEncoder).encode(e),r=await window.crypto.subtle.digest("SHA-256",t);return this.base64urlEncode(r)}{const t=r(91565).createHash("sha256").update(e).digest();return this.base64urlEncode(t)}}base64urlEncode(e){let t;if(void 0!==n&&n.isBuffer(e))t=e.toString("base64");else{const r=new Uint8Array(e);let n="";for(let e=0;e<r.length;e++)n+=String.fromCharCode(r[e]);t=window.btoa(n)}return t.replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}generateRandomString(e){let t;if("undefined"!=typeof window&&window.crypto)t=new Uint8Array(e),window.crypto.getRandomValues(t);else{const n=r(91565);t=new Uint8Array(n.randomBytes(e))}return Array.from(t).map((e=>"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-._~"[e%66])).join("")}async initiateOAuth(e){const t=this.config.providers?.[e];if(!t){const t=`Provider '${e}' is not configured.`;return(0,o.logError)(t),{success:!1,error:t}}try{const r=this.generateRandomString(32);this.setItem(`oauth_state_${e}`,r);let n=t.authUrl;const i=new URLSearchParams({client_id:t.clientId,redirect_uri:t.redirectUri,response_type:"code",state:r});if(t.scope&&t.scope.length>0&&i.set("scope",t.scope.join(" ")),t.usePKCE??this.config.usePKCE){const{codeVerifier:t,codeChallenge:r}=await this.generatePKCEChallenge();this.setItem(`oauth_verifier_${e}`,t),i.set("code_challenge",r),i.set("code_challenge_method","S256")}return n=n.includes("?")?`${n}&${i.toString()}`:`${n}?${i.toString()}`,this.emit("oauth_initiated",{provider:e,authUrl:n}),{success:!0,provider:e,authUrl:n}}catch(t){return(0,o.logError)(`Error initiating OAuth with ${e}:`,t),{success:!1,error:t.message}}}async completeOAuth(e,t,r,n){const i=this.config.providers?.[e];if(!i){const t=`Provider '${e}' is not configured.`;return(0,o.logError)(t),{success:!1,error:t}}try{const s=await this.exchangeCodeForToken(e,i,t,r);if(!s.access_token){const e="No access token received from provider";return(0,o.logError)(e,s),{success:!1,error:e}}const a=await this.fetchUserInfo(e,i,s.access_token);this.cacheUserInfo(a.id,e,a);const u=await this.generateCredentials(a,e,n||"");return this.emit("oauth_completed",{provider:e,userInfo:a,credentials:u}),{success:!0,provider:e,userInfo:a}}catch(t){return(0,o.logError)(`Error completing OAuth with ${e}:`,t),{success:!1,error:t.message}}}async generateCredentials(e,t,r){const n=this.config.providers?.[t];if(!n)throw new Error(`Provider ${t} is not configured.`);const i=(0,u.generateUsernameFromIdentity)(t,e);try{(0,o.logDebug)(`Generating credentials for ${t} user: ${e.id}`);const n=`${e.id}_${t}_${e.email}_shogun_oauth_${r}`,s=(0,u.generateDeterministicPassword)(n),c={username:i,password:s,provider:t,key:await(0,a.default)(s,n,{includeP256:!0})};return this.cacheUserInfo(e.id,t,e),(0,o.logDebug)("OAuth credentials generated successfully"),c}catch(e){throw(0,o.logError)("Error generating OAuth credentials:",e),e}}async exchangeCodeForToken(e,t,r,n){const i=this.getItem(`oauth_state_${e}`);if(n&&i!==n)throw new Error("Invalid state parameter");const s={client_id:t.clientId,code:r,redirect_uri:t.redirectUri,grant_type:"authorization_code"},a=t.usePKCE??this.config.usePKCE;if(a){if((0,o.logDebug)("PKCE enabled, retrieving code verifier..."),"undefined"!=typeof sessionStorage){const e=[];for(let t=0;t<sessionStorage.length;t++){const r=sessionStorage.key(t);r&&r.startsWith("oauth_")&&e.push(r)}(0,o.logDebug)("OAuth keys in sessionStorage:",e)}const t=this.getItem(`oauth_verifier_${e}`);if((0,o.logDebug)(`Looking for key: oauth_verifier_${e}, found:`,!!t),!t)throw new Error("PKCE enabled but no code verifier found");(0,o.logDebug)(`Found code verifier for PKCE flow: ${t.substring(0,10)}... (length: ${t.length})`),s.code_verifier=t}else t.clientSecret&&""!==t.clientSecret.trim()&&this.config.allowUnsafeClientSecret?s.client_secret=t.clientSecret:(0,o.logWarn)("Client secret is required when PKCE is not enabled. Please enable PKCE or configure a client secret.");this.removeItem(`oauth_verifier_${e}`),(0,o.logDebug)("Token exchange parameters:",JSON.stringify(s,null,2)),(0,o.logDebug)("PKCE enabled:",a),(0,o.logDebug)("Has code_verifier:",!!s.code_verifier),(0,o.logDebug)("Has client_secret:",!!s.client_secret);const u=new URLSearchParams(s);(0,o.logDebug)("Request body keys:",Array.from(u.keys())),(0,o.logDebug)("Request body has code_verifier:",u.has("code_verifier")),(0,o.logDebug)("Request body has client_secret:",u.has("client_secret"));const c=await fetch(t.tokenUrl,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:u.toString()});if(!c.ok){const e=await c.json().catch((()=>({})));throw new Error(`Token exchange failed: ${c.status} ${c.statusText} - ${JSON.stringify(e)}`)}return await c.json()}async fetchUserInfo(e,t,r){const n=await fetch(t.userInfoUrl,{headers:{Authorization:`Bearer ${r}`}});if(!n.ok)throw new Error(`Failed to fetch user info: ${n.status} ${n.statusText}`);const i=await n.json();return this.normalizeUserInfo(i,e)}normalizeUserInfo(e,t){switch(t){case"google":return{id:e.id,email:e.email,name:e.name,picture:e.picture,provider:t};case"github":return{id:e.id.toString(),email:e.email,name:e.name||e.login,picture:e.avatar_url,provider:t};case"discord":return{id:e.id,email:e.email,name:e.username,picture:`https://cdn.discordapp.com/avatars/${e.id}/${e.avatar}.png`,provider:t};case"twitter":return{id:e.data.id,email:e.data.email,name:e.data.name,picture:e.data.profile_image_url,provider:t};default:return{id:e.id?.toString()||"",email:e.email||"",name:e.name||"",picture:e.picture||e.avatar_url||"",provider:t}}}cacheUserInfo(e,t,r){const n=`${t}_${e}`,i={data:r,provider:t,userId:e,timestamp:Date.now()};this.userCache.set(n,i);try{localStorage.setItem(`shogun_oauth_user_${n}`,JSON.stringify(i))}catch(e){(0,o.logWarn)("Failed to persist user info in localStorage:",e)}}getCachedUserInfo(e,t){const r=`${t}_${e}`,n=this.userCache.get(r);if(n&&this.config.cacheDuration&&Date.now()-n.timestamp<=this.config.cacheDuration)return n.data||null;try{const e=localStorage.getItem(`shogun_oauth_user_${r}`);if(e){const t=JSON.parse(e);if(this.config.cacheDuration&&Date.now()-t.timestamp<=this.config.cacheDuration)return this.userCache.set(r,t),t.userInfo}}catch(e){(0,o.logWarn)("Failed to read user info from localStorage:",e)}return null}clearUserCache(e,t){if(e&&t){const r=`${t}_${e}`;this.userCache.delete(r);try{localStorage.removeItem(`shogun_oauth_user_${r}`)}catch(e){(0,o.logWarn)("Failed to remove user info from localStorage:",e)}}else{this.userCache.clear();try{const e=[];for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);r&&r.startsWith("shogun_oauth_user_")&&e.push(r)}e.forEach((e=>localStorage.removeItem(e)))}catch(e){(0,o.logWarn)("Failed to clear user info from localStorage:",e)}}}cleanup(){this.removeAllListeners(),this.userCache.clear()}}t.OAuthConnector=c},17782:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shareReplay=void 0;var n=r(10381),i=r(93405);t.shareReplay=function(e,t,r){var o,s,a,u,c=!1;return e&&"object"==typeof e?(o=e.bufferSize,u=void 0===o?1/0:o,s=e.windowTime,t=void 0===s?1/0:s,c=void 0!==(a=e.refCount)&&a,r=e.scheduler):u=null!=e?e:1/0,i.share({connector:function(){return new n.ReplaySubject(u,t,r)},resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:c})}},17802:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.finalize=void 0;var n=r(65212);t.finalize=function(e){return n.operate((function(t,r){try{t.subscribe(r)}finally{r.add(e)}}))}},17812:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connect=void 0;var n=r(76808),i=r(19724),o=r(65212),s=r(51071),a={connector:function(){return new n.Subject}};t.connect=function(e,t){void 0===t&&(t=a);var r=t.connector;return o.operate((function(t,n){var o=r();i.innerFrom(e(s.fromSubscribable(o))).subscribe(n),n.add(t.subscribe(o))}))}},17873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleAsyncIterable=void 0;var n=r(48051),i=r(28619);t.scheduleAsyncIterable=function(e,t){if(!e)throw new Error("Iterable cannot be null");return new n.Observable((function(r){i.executeSchedule(r,t,(function(){var n=e[Symbol.asyncIterator]();i.executeSchedule(r,t,(function(){n.next().then((function(e){e.done?r.complete():r.next(e.value)}))}),0,!0)}))}))}},17977:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustAll=void 0;var n=r(86632),i=r(87699);t.exhaustAll=function(){return n.exhaustMap(i.identity)}},18394:function(e,t){"use strict";var r,n,i,o=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)},s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r};Object.defineProperty(t,"__esModule",{value:!0}),t.AES=void 0;const a={16:10,24:12,32:14},u=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],c=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],l=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],f=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],h=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],d=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],p=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],g=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],b=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],y=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],m=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],v=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],w=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],E=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],A=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function _(e){const t=[];for(let r=0;r<e.length;r+=4)t.push(e[r]<<24|e[r+1]<<16|e[r+2]<<8|e[r+3]);return t}class S{get key(){return o(this,r,"f").slice()}constructor(e){if(r.set(this,void 0),n.set(this,void 0),i.set(this,void 0),!(this instanceof S))throw Error("AES must be instanitated with `new`");s(this,r,new Uint8Array(e),"f");const t=a[this.key.length];if(null==t)throw new TypeError("invalid key size (must be 16, 24 or 32 bytes)");s(this,i,[],"f"),s(this,n,[],"f");for(let e=0;e<=t;e++)o(this,i,"f").push([0,0,0,0]),o(this,n,"f").push([0,0,0,0]);const l=4*(t+1),f=this.key.length/4,h=_(this.key);let d;for(let e=0;e<f;e++)d=e>>2,o(this,i,"f")[d][e%4]=h[e],o(this,n,"f")[t-d][e%4]=h[e];let p,g=0,b=f;for(;b<l;){if(p=h[f-1],h[0]^=c[p>>16&255]<<24^c[p>>8&255]<<16^c[255&p]<<8^c[p>>24&255]^u[g]<<24,g+=1,8!=f)for(let e=1;e<f;e++)h[e]^=h[e-1];else{for(let e=1;e<f/2;e++)h[e]^=h[e-1];p=h[f/2-1],h[f/2]^=c[255&p]^c[p>>8&255]<<8^c[p>>16&255]<<16^c[p>>24&255]<<24;for(let e=f/2+1;e<f;e++)h[e]^=h[e-1]}let e,r,s=0;for(;s<f&&b<l;)e=b>>2,r=b%4,o(this,i,"f")[e][r]=h[s],o(this,n,"f")[t-e][r]=h[s++],b++}for(let e=1;e<t;e++)for(let t=0;t<4;t++)p=o(this,n,"f")[e][t],o(this,n,"f")[e][t]=v[p>>24&255]^w[p>>16&255]^E[p>>8&255]^A[255&p]}encrypt(e){if(16!=e.length)throw new TypeError("invalid plaintext size (must be 16 bytes)");const t=o(this,i,"f").length-1,r=[0,0,0,0];let n=_(e);for(let e=0;e<4;e++)n[e]^=o(this,i,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=f[n[t]>>24&255]^h[n[(t+1)%4]>>16&255]^d[n[(t+2)%4]>>8&255]^p[255&n[(t+3)%4]]^o(this,i,"f")[e][t];n=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,i,"f")[t][e],s[4*e]=255&(c[n[e]>>24&255]^a>>24),s[4*e+1]=255&(c[n[(e+1)%4]>>16&255]^a>>16),s[4*e+2]=255&(c[n[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(c[255&n[(e+3)%4]]^a);return s}decrypt(e){if(16!=e.length)throw new TypeError("invalid ciphertext size (must be 16 bytes)");const t=o(this,n,"f").length-1,r=[0,0,0,0];let i=_(e);for(let e=0;e<4;e++)i[e]^=o(this,n,"f")[0][e];for(let e=1;e<t;e++){for(let t=0;t<4;t++)r[t]=g[i[t]>>24&255]^b[i[(t+3)%4]>>16&255]^y[i[(t+2)%4]>>8&255]^m[255&i[(t+1)%4]]^o(this,n,"f")[e][t];i=r.slice()}const s=new Uint8Array(16);let a=0;for(let e=0;e<4;e++)a=o(this,n,"f")[t][e],s[4*e]=255&(l[i[e]>>24&255]^a>>24),s[4*e+1]=255&(l[i[(e+3)%4]>>16&255]^a>>16),s[4*e+2]=255&(l[i[(e+2)%4]>>8&255]^a>>8),s[4*e+3]=255&(l[255&i[(e+1)%4]]^a);return s}}t.AES=S,r=new WeakMap,n=new WeakMap,i=new WeakMap},18464:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.multicast=void 0;var n=r(14359),i=r(10281),o=r(17812);t.multicast=function(e,t){var r=i.isFunction(e)?e:function(){return e};return i.isFunction(t)?o.connect(t,{connector:r}):function(e){return new n.ConnectableObservable(e,r)}}},19e3:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2Async=t.pbkdf2=void 0;const n=r(27302),i=r(54542),o=r(74224);function s(e,t,r,s){(0,n.hash)(e);const a=(0,o.checkOpts)({dkLen:32,asyncTick:10},s),{c:u,dkLen:c,asyncTick:l}=a;if((0,n.number)(u),(0,n.number)(c),(0,n.number)(l),u<1)throw new Error("PBKDF2: iterations (c) should be >= 1");const f=(0,o.toBytes)(t),h=(0,o.toBytes)(r),d=new Uint8Array(c),p=i.hmac.create(e,f),g=p._cloneInto().update(h);return{c:u,dkLen:c,asyncTick:l,DK:d,PRF:p,PRFSalt:g}}function a(e,t,r,n,i){return e.destroy(),t.destroy(),n&&n.destroy(),i.fill(0),r}t.pbkdf2=function(e,t,r,n){const{c:i,dkLen:u,DK:c,PRF:l,PRFSalt:f}=s(e,t,r,n);let h;const d=new Uint8Array(4),p=(0,o.createView)(d),g=new Uint8Array(l.outputLen);for(let e=1,t=0;t<u;e++,t+=l.outputLen){const r=c.subarray(t,t+l.outputLen);p.setInt32(0,e,!1),(h=f._cloneInto(h)).update(d).digestInto(g),r.set(g.subarray(0,r.length));for(let e=1;e<i;e++){l._cloneInto(h).update(g).digestInto(g);for(let e=0;e<r.length;e++)r[e]^=g[e]}}return a(l,f,c,h,g)},t.pbkdf2Async=async function(e,t,r,n){const{c:i,dkLen:u,asyncTick:c,DK:l,PRF:f,PRFSalt:h}=s(e,t,r,n);let d;const p=new Uint8Array(4),g=(0,o.createView)(p),b=new Uint8Array(f.outputLen);for(let e=1,t=0;t<u;e++,t+=f.outputLen){const r=l.subarray(t,t+f.outputLen);g.setInt32(0,e,!1),(d=h._cloneInto(d)).update(p).digestInto(b),r.set(b.subarray(0,r.length)),await(0,o.asyncLoop)(i-1,c,(()=>{f._cloneInto(d).update(b).digestInto(b);for(let e=0;e<r.length;e++)r[e]^=b[e]}))}return a(f,h,l,d,b)}},19533:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncScheduler=void 0;var o=r(65881),s=function(e){function t(t,r){void 0===r&&(r=o.Scheduler.now);var n=e.call(this,t,r)||this;return n.actions=[],n._active=!1,n}return i(t,e),t.prototype.flush=function(e){var t=this.actions;if(this._active)t.push(e);else{var r;this._active=!0;do{if(r=e.execute(e.state,e.delay))break}while(e=t.shift());if(this._active=!1,r){for(;e=t.shift();)e.unsubscribe();throw r}}},t}(o.Scheduler);t.AsyncScheduler=s},19724:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))},i=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},o=this&&this.__asyncValues||function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e="function"==typeof s?s(e):e[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}},s=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.fromReadableStreamLike=t.fromAsyncIterable=t.fromIterable=t.fromPromise=t.fromArrayLike=t.fromInteropObservable=t.innerFrom=void 0;var a=r(94975),u=r(67552),c=r(48051),l=r(80629),f=r(78263),h=r(86297),d=r(12187),p=r(95462),g=r(10281),b=r(32980),y=r(2884);function m(e){return new c.Observable((function(t){var r=e[y.observable]();if(g.isFunction(r.subscribe))return r.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}))}function v(e){return new c.Observable((function(t){for(var r=0;r<e.length&&!t.closed;r++)t.next(e[r]);t.complete()}))}function w(e){return new c.Observable((function(t){e.then((function(e){t.closed||(t.next(e),t.complete())}),(function(e){return t.error(e)})).then(null,b.reportUnhandledError)}))}function E(e){return new c.Observable((function(t){var r,n;try{for(var i=s(e),o=i.next();!o.done;o=i.next()){var a=o.value;if(t.next(a),t.closed)return}}catch(e){r={error:e}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}t.complete()}))}function A(e){return new c.Observable((function(t){(function(e,t){var r,s,a,u;return n(this,void 0,void 0,(function(){var n,c;return i(this,(function(i){switch(i.label){case 0:i.trys.push([0,5,6,11]),r=o(e),i.label=1;case 1:return[4,r.next()];case 2:if((s=i.sent()).done)return[3,4];if(n=s.value,t.next(n),t.closed)return[2];i.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return c=i.sent(),a={error:c},[3,11];case 6:return i.trys.push([6,,9,10]),s&&!s.done&&(u=r.return)?[4,u.call(r)]:[3,8];case 7:i.sent(),i.label=8;case 8:return[3,10];case 9:if(a)throw a.error;return[7];case 10:return[7];case 11:return t.complete(),[2]}}))}))})(e,t).catch((function(e){return t.error(e)}))}))}function _(e){return A(p.readableStreamLikeToAsyncGenerator(e))}t.innerFrom=function(e){if(e instanceof c.Observable)return e;if(null!=e){if(l.isInteropObservable(e))return m(e);if(a.isArrayLike(e))return v(e);if(u.isPromise(e))return w(e);if(f.isAsyncIterable(e))return A(e);if(d.isIterable(e))return E(e);if(p.isReadableStreamLike(e))return _(e)}throw h.createInvalidObservableTypeError(e)},t.fromInteropObservable=m,t.fromArrayLike=v,t.fromPromise=w,t.fromIterable=E,t.fromAsyncIterable=A,t.fromReadableStreamLike=_},19818:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dematerialize=void 0;var n=r(31245),i=r(65212),o=r(17214);t.dematerialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){return n.observeNotification(e,t)})))}))}},19913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMapTo=void 0;var n=r(29512),i=r(10281);t.concatMapTo=function(e,t){return i.isFunction(t)?n.concatMap((function(){return e}),t):n.concatMap((function(){return e}))}},19980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.first=void 0;var n=r(59328),i=r(85934),o=r(54383),s=r(58799),a=r(30632),u=r(87699);t.first=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.take(1),r?s.defaultIfEmpty(t):a.throwIfEmpty((function(){return new n.EmptyError})))}}},20254:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserProvider=void 0;const n=r(75347),i=r(42371);class o extends i.JsonRpcApiPollingProvider{#h;#d;constructor(e,t,r){const i=Object.assign({},null!=r?r:{},{batchMaxCount:1});(0,n.assertArgument)(e&&e.request,"invalid EIP-1193 provider","ethereum",e),super(t,i),this.#d=null,r&&r.providerInfo&&(this.#d=r.providerInfo),this.#h=async(t,r)=>{const n={method:t,params:r};this.emit("debug",{action:"sendEip1193Request",payload:n});try{const t=await e.request(n);return this.emit("debug",{action:"receiveEip1193Result",result:t}),t}catch(e){const t=new Error(e.message);throw t.code=e.code,t.data=e.data,t.payload=n,this.emit("debug",{action:"receiveEip1193Error",error:t}),t}}}get providerInfo(){return this.#d}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){(0,n.assertArgument)(!Array.isArray(e),"EIP-1193 does not support batch request","payload",e);try{const t=await this.#h(e.method,e.params||[]);return[{id:e.id,result:t}]}catch(t){return[{id:e.id,error:{code:t.code,data:t.data,message:t.message}}]}}getRpcError(e,t){switch((t=JSON.parse(JSON.stringify(t))).error.code||-1){case 4001:t.error.message=`ethers-user-denied: ${t.error.message}`;break;case 4200:t.error.message=`ethers-unsupported: ${t.error.message}`}return super.getRpcError(e,t)}async hasSigner(e){null==e&&(e=0);const t=await this.send("eth_accounts",[]);return"number"==typeof e?t.length>e:(e=e.toLowerCase(),0!==t.filter((t=>t.toLowerCase()===e)).length)}async getSigner(e){if(null==e&&(e=0),!await this.hasSigner(e))try{await this.#h("eth_requestAccounts",[])}catch(e){const t=e.payload;throw this.getRpcError(t,{id:t.id,error:e})}return await super.getSigner(e)}static async discover(e){if(null==e&&(e={}),e.provider)return new o(e.provider);const t=e.window?e.window:"undefined"!=typeof window?window:null;if(null==t)return null;const r=e.anyProvider;if(r&&t.ethereum)return new o(t.ethereum);if(!("addEventListener"in t&&"dispatchEvent"in t&&"removeEventListener"in t))return null;const i=e.timeout?e.timeout:300;return 0===i?null:await new Promise(((s,a)=>{let u=[];const c=e=>{u.push(e.detail),r&&l()},l=()=>{if(clearTimeout(f),u.length)if(e&&e.filter){const t=e.filter(u.map((e=>Object.assign({},e.info))));if(null==t)s(null);else if(t instanceof o)s(t);else{let e=null;if(t.uuid&&(e=u.filter((e=>t.uuid===e.info.uuid))[0]),e){const{provider:t,info:r}=e;s(new o(t,void 0,{providerInfo:r}))}else a((0,n.makeError)("filter returned unknown info","UNSUPPORTED_OPERATION",{value:t}))}}else{const{provider:e,info:t}=u[0];s(new o(e,void 0,{providerInfo:t}))}else s(null);t.removeEventListener("eip6963:announceProvider",c)},f=setTimeout((()=>{l()}),i);t.addEventListener("eip6963:announceProvider",c),t.dispatchEvent(new Event("eip6963:requestProvider"))}))}}t.BrowserProvider=o},20320:(e,t,r)=>{var n=r(88276);e.exports=function(e){return(new n).update(e).digest()}},20672:(e,t,r)=>{"use strict";var n=r(24116).Buffer,i=r(21638);e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}return e.prototype.push=function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length},e.prototype.unshift=function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length},e.prototype.shift=function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}},e.prototype.clear=function(){this.head=this.tail=null,this.length=0},e.prototype.join=function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r},e.prototype.concat=function(e){if(0===this.length)return n.alloc(0);for(var t,r,i=n.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=i,r=s,o.data.copy(t,r),s+=o.data.length,o=o.next;return i},e}(),i&&i.inspect&&i.inspect.custom&&(e.exports.prototype[i.inspect.custom]=function(){var e=i.inspect({length:this.length});return this.constructor.name+" "+e})},20778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.recoverAddress=t.computeAddress=void 0;const n=r(30646),i=r(32291);function o(e){let t;return t="string"==typeof e?i.SigningKey.computePublicKey(e,!1):e.publicKey,(0,n.getAddress)((0,i.keccak256)("0x"+t.substring(4)).substring(26))}t.computeAddress=o,t.recoverAddress=function(e,t){return o(i.SigningKey.recoverPublicKey(e,t))}},21008:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=t.BaseContract=t.resolveArgs=t.copyOverrides=void 0;const n=r(8456),i=r(30646),o=r(63807),s=r(75347),a=r(6526),u=BigInt(0);function c(e){return e&&"function"==typeof e.call}function l(e){return e&&"function"==typeof e.estimateGas}function f(e){return e&&"function"==typeof e.resolveName}function h(e){return e&&"function"==typeof e.sendTransaction}function d(e){if(null!=e){if(f(e))return e;if(e.provider)return e.provider}}class p{#p;fragment;constructor(e,t,r){if((0,s.defineProperties)(this,{fragment:t}),t.inputs.length<r.length)throw new Error("too many arguments");const n=g(e.runner,"resolveName"),o=f(n)?n:null;this.#p=async function(){const n=await Promise.all(t.inputs.map(((e,t)=>null==r[t]?null:e.walkAsync(r[t],((e,t)=>"address"===e?Array.isArray(t)?Promise.all(t.map((e=>(0,i.resolveAddress)(e,o)))):(0,i.resolveAddress)(t,o):t)))));return e.interface.encodeFilterTopics(t,n)}()}getTopicFilter(){return this.#p}}function g(e,t){return null==e?null:"function"==typeof e[t]?e:e.provider&&"function"==typeof e.provider[t]?e.provider:null}function b(e){return null==e?null:e.provider||null}async function y(e,t){const r=n.Typed.dereference(e,"overrides");(0,s.assertArgument)("object"==typeof r,"invalid overrides parameter","overrides",e);const i=(0,o.copyRequest)(r);return(0,s.assertArgument)(null==i.to||(t||[]).indexOf("to")>=0,"cannot override to","overrides.to",i.to),(0,s.assertArgument)(null==i.data||(t||[]).indexOf("data")>=0,"cannot override data","overrides.data",i.data),i.from&&(i.from=i.from),i}async function m(e,t,r){const o=g(e,"resolveName"),s=f(o)?o:null;return await Promise.all(t.map(((e,t)=>e.walkAsync(r[t],((e,t)=>(t=n.Typed.dereference(t,e),"address"===e?(0,i.resolveAddress)(t,s):t))))))}function v(e){const t=async function(t){const r=await y(t,["data"]);r.to=await e.getAddress(),r.from&&(r.from=await(0,i.resolveAddress)(r.from,d(e.runner)));const n=e.interface,o=(0,s.getBigInt)(r.value||u,"overrides.value")===u,a="0x"===(r.data||"0x");!n.fallback||n.fallback.payable||!n.receive||a||o||(0,s.assertArgument)(!1,"cannot send data to receive or send value to non-payable fallback","overrides",t),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data);const c=n.receive||n.fallback&&n.fallback.payable;return(0,s.assertArgument)(c||o,"cannot send value to non-payable fallback","overrides.value",r.value),(0,s.assertArgument)(n.fallback||a,"cannot send data to receive-only contract","overrides.data",r.data),r},r=async function(r){const n=e.runner;(0,s.assert)(h(n),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await n.sendTransaction(await t(r)),o=b(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},n=async e=>await r(e);return(0,s.defineProperties)(n,{_contract:e,estimateGas:async function(r){const n=g(e.runner,"estimateGas");return(0,s.assert)(l(n),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await n.estimateGas(await t(r))},populateTransaction:t,send:r,staticCall:async function(r){const n=g(e.runner,"call");(0,s.assert)(c(n),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const i=await t(r);try{return await n.call(i)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,i);throw t}}}),n}t.copyOverrides=y,t.resolveArgs=m;const w=Symbol.for("_ethersInternal_contract"),E=new WeakMap;function A(e){return E.get(e[w])}async function _(e,t){let r,n=null;if(Array.isArray(t)){const n=function(t){if((0,s.isHexString)(t,32))return t;const r=e.interface.getEvent(t);return(0,s.assertArgument)(r,"unknown fragment","name",t),r.topicHash};r=t.map((e=>null==e?null:Array.isArray(e)?e.map(n):n(e)))}else"*"===t?r=[null]:"string"==typeof t?(0,s.isHexString)(t,32)?r=[t]:(n=e.interface.getEvent(t),(0,s.assertArgument)(n,"unknown fragment","event",t),r=[n.topicHash]):(i=t)&&"object"==typeof i&&"getTopicFilter"in i&&"function"==typeof i.getTopicFilter&&i.fragment?r=await t.getTopicFilter():"fragment"in t?(n=t.fragment,r=[n.topicHash]):(0,s.assertArgument)(!1,"unknown event name","event",t);var i;return r=r.map((e=>{if(null==e)return null;if(Array.isArray(e)){const t=Array.from(new Set(e.map((e=>e.toLowerCase()))).values());return 1===t.length?t[0]:(t.sort(),t)}return e.toLowerCase()})),{fragment:n,tag:r.map((e=>null==e?"null":Array.isArray(e)?e.join("|"):e)).join("&"),topics:r}}async function S(e,t){const{subs:r}=A(e);return r.get((await _(e,t)).tag)||null}async function P(e,t,r){const n=b(e.runner);(0,s.assert)(n,"contract runner does not support subscribing","UNSUPPORTED_OPERATION",{operation:t});const{fragment:i,tag:o,topics:u}=await _(e,r),{addr:c,subs:l}=A(e);let f=l.get(o);if(!f){const t={address:c||e,topics:u},s=t=>{let n=i;if(null==n)try{n=e.interface.getEvent(t.topics[0])}catch(e){}if(n){const o=n,s=i?e.interface.decodeEventLog(i,t.data,t.topics):[];O(e,r,s,(n=>new a.ContractEventPayload(e,n,r,o,t)))}else O(e,r,[],(n=>new a.ContractUnknownEventPayload(e,n,r,t)))};let h=[];f={tag:o,listeners:[],start:()=>{h.length||h.push(n.on(t,s))},stop:async()=>{if(0==h.length)return;let e=h;h=[],await Promise.all(e),n.off(t,s)}},l.set(o,f)}return f}let k=Promise.resolve();async function O(e,t,r,n){try{await k}catch(e){}const i=async function(e,t,r,n){await k;const i=await S(e,t);if(!i)return!1;const o=i.listeners.length;return i.listeners=i.listeners.filter((({listener:t,once:i})=>{const o=Array.from(r);n&&o.push(n(i?null:t));try{t.call(e,...o)}catch(e){}return!i})),0===i.listeners.length&&(i.stop(),A(e).subs.delete(i.tag)),o>0}(e,t,r,n);return k=i,await i}const x=["then"];class M{target;interface;runner;filters;[w];fallback;constructor(e,t,r,o){(0,s.assertArgument)("string"==typeof e||(0,i.isAddressable)(e),"invalid value for Contract target","target",e),null==r&&(r=null);const u=n.Interface.from(t);let c;(0,s.defineProperties)(this,{target:e,runner:r,interface:u}),Object.defineProperty(this,w,{value:{}});let l=null,h=null;if(o){const e=b(r);h=new a.ContractTransactionResponse(this.interface,e,o)}let d=new Map;if("string"==typeof e)if((0,s.isHexString)(e))l=e,c=Promise.resolve(e);else{const t=g(r,"resolveName");if(!f(t))throw(0,s.makeError)("contract runner does not support name resolution","UNSUPPORTED_OPERATION",{operation:"resolveName"});c=t.resolveName(e).then((t=>{if(null==t)throw(0,s.makeError)("an ENS name used for a contract target must be correctly configured","UNCONFIGURED_NAME",{value:e});return A(this).addr=t,t}))}else c=e.getAddress().then((e=>{if(null==e)throw new Error("TODO");return A(this).addr=e,e}));var p;p={addrPromise:c,addr:l,deployTx:h,subs:d},E.set(this[w],p);const y=new Proxy({},{get:(e,t,r)=>{if("symbol"==typeof t||x.indexOf(t)>=0)return Reflect.get(e,t,r);try{return this.getEvent(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>x.indexOf(t)>=0?Reflect.has(e,t):Reflect.has(e,t)||this.interface.hasEvent(String(t))});return(0,s.defineProperties)(this,{filters:y}),(0,s.defineProperties)(this,{fallback:u.receive||u.fallback?v(this):null}),new Proxy(this,{get:(e,t,r)=>{if("symbol"==typeof t||t in e||x.indexOf(t)>=0)return Reflect.get(e,t,r);try{return e.getFunction(t)}catch(e){if(!(0,s.isError)(e,"INVALID_ARGUMENT")||"key"!==e.argument)throw e}},has:(e,t)=>"symbol"==typeof t||t in e||x.indexOf(t)>=0?Reflect.has(e,t):e.interface.hasFunction(t)})}connect(e){return new M(this.target,this.interface,e)}attach(e){return new M(e,this.interface,this.runner)}async getAddress(){return await A(this).addrPromise}async getDeployedCode(){const e=b(this.runner);(0,s.assert)(e,"runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"getDeployedCode"});const t=await e.getCode(await this.getAddress());return"0x"===t?null:t}async waitForDeployment(){const e=this.deploymentTransaction();if(e)return await e.wait(),this;if(null!=await this.getDeployedCode())return this;const t=b(this.runner);return(0,s.assert)(null!=t,"contract runner does not support .provider","UNSUPPORTED_OPERATION",{operation:"waitForDeployment"}),new Promise(((e,r)=>{const n=async()=>{try{if(null!=await this.getDeployedCode())return e(this);t.once("block",n)}catch(e){r(e)}};n()}))}deploymentTransaction(){return A(this).deployTx}getFunction(e){"string"!=typeof e&&(e=e.format());const t=function(e,t){const r=function(...r){const n=e.interface.getFunction(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=async function(...t){const n=r(...t);let o={};if(n.inputs.length+1===t.length&&(o=await y(t.pop()),o.from&&(o.from=await(0,i.resolveAddress)(o.from,d(e.runner)))),n.inputs.length!==t.length)throw new Error("internal error: fragment inputs doesn't match arguments; should not happen");const a=await m(e.runner,n.inputs,t);return Object.assign({},o,await(0,s.resolveProperties)({to:e.getAddress(),data:e.interface.encodeFunctionData(n,a)}))},o=async function(...e){const t=await f(...e);return 1===t.length?t[0]:t},u=async function(...t){const r=e.runner;(0,s.assert)(h(r),"contract runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const i=await r.sendTransaction(await n(...t)),o=b(e.runner);return new a.ContractTransactionResponse(e.interface,o,i)},f=async function(...t){const i=g(e.runner,"call");(0,s.assert)(c(i),"contract runner does not support calling","UNSUPPORTED_OPERATION",{operation:"call"});const o=await n(...t);let a="0x";try{a=await i.call(o)}catch(t){if((0,s.isCallException)(t)&&t.data)throw e.interface.makeError(t.data,o);throw t}const u=r(...t);return e.interface.decodeFunctionResult(u,a)},p=async(...e)=>r(...e).constant?await o(...e):await u(...e);return(0,s.defineProperties)(p,{name:e.interface.getFunctionName(t),_contract:e,_key:t,getFragment:r,estimateGas:async function(...t){const r=g(e.runner,"estimateGas");return(0,s.assert)(l(r),"contract runner does not support gas estimation","UNSUPPORTED_OPERATION",{operation:"estimateGas"}),await r.estimateGas(await n(...t))},populateTransaction:n,send:u,staticCall:o,staticCallResult:f}),Object.defineProperty(p,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getFunction(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),p}(this,e);return t}getEvent(e){return"string"!=typeof e&&(e=e.format()),function(e,t){const r=function(...r){const n=e.interface.getEvent(t,r);return(0,s.assert)(n,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t,args:r}}),n},n=function(...t){return new p(e,r(...t),t)};return(0,s.defineProperties)(n,{name:e.interface.getEventName(t),_contract:e,_key:t,getFragment:r}),Object.defineProperty(n,"fragment",{configurable:!1,enumerable:!0,get:()=>{const r=e.interface.getEvent(t);return(0,s.assert)(r,"no matching fragment","UNSUPPORTED_OPERATION",{operation:"fragment",info:{key:t}}),r}}),n}(this,e)}async queryTransaction(e){throw new Error("@TODO")}async queryFilter(e,t,r){null==t&&(t=0),null==r&&(r="latest");const{addr:n,addrPromise:i}=A(this),u=n||await i,{fragment:c,topics:l}=await _(this,e),f={address:u,topics:l,fromBlock:t,toBlock:r},h=b(this.runner);return(0,s.assert)(h,"contract runner does not have a provider","UNSUPPORTED_OPERATION",{operation:"queryFilter"}),(await h.getLogs(f)).map((e=>{let t=c;if(null==t)try{t=this.interface.getEvent(e.topics[0])}catch(e){}if(t)try{return new a.EventLog(e,this.interface,t)}catch(t){return new a.UndecodedEventLog(e,t)}return new o.Log(e,h)}))}async on(e,t){const r=await P(this,"on",e);return r.listeners.push({listener:t,once:!1}),r.start(),this}async once(e,t){const r=await P(this,"once",e);return r.listeners.push({listener:t,once:!0}),r.start(),this}async emit(e,...t){return await O(this,e,t,null)}async listenerCount(e){if(e){const t=await S(this,e);return t?t.listeners.length:0}const{subs:t}=A(this);let r=0;for(const{listeners:e}of t.values())r+=e.length;return r}async listeners(e){if(e){const t=await S(this,e);return t?t.listeners.map((({listener:e})=>e)):[]}const{subs:t}=A(this);let r=[];for(const{listeners:e}of t.values())r=r.concat(e.map((({listener:e})=>e)));return r}async off(e,t){const r=await S(this,e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return null!=t&&0!==r.listeners.length||(r.stop(),A(this).subs.delete(r.tag)),this}async removeAllListeners(e){if(e){const t=await S(this,e);if(!t)return this;t.stop(),A(this).subs.delete(t.tag)}else{const{subs:e}=A(this);for(const{tag:t,stop:r}of e.values())r(),e.delete(t)}return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return await this.off(e,t)}static buildClass(e){return class extends M{constructor(t,r=null){super(t,e,r)}}}static from(e,t,r){return null==r&&(r=null),new this(e,t,r)}}t.BaseContract=M;class B extends(function(){return M}()){}t.Contract=B},21137:(e,t,r)=>{"use strict";var n=r(87568);t.certificate=r(36413);var i=n.define("RSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("modulus").int(),this.key("publicExponent").int(),this.key("privateExponent").int(),this.key("prime1").int(),this.key("prime2").int(),this.key("exponent1").int(),this.key("exponent2").int(),this.key("coefficient").int())}));t.RSAPrivateKey=i;var o=n.define("RSAPublicKey",(function(){this.seq().obj(this.key("modulus").int(),this.key("publicExponent").int())}));t.RSAPublicKey=o;var s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("none").null_().optional(),this.key("curve").objid().optional(),this.key("params").seq().obj(this.key("p").int(),this.key("q").int(),this.key("g").int()).optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())}));t.PublicKey=a;var u=n.define("PrivateKeyInfo",(function(){this.seq().obj(this.key("version").int(),this.key("algorithm").use(s),this.key("subjectPrivateKey").octstr())}));t.PrivateKey=u;var c=n.define("EncryptedPrivateKeyInfo",(function(){this.seq().obj(this.key("algorithm").seq().obj(this.key("id").objid(),this.key("decrypt").seq().obj(this.key("kde").seq().obj(this.key("id").objid(),this.key("kdeparams").seq().obj(this.key("salt").octstr(),this.key("iters").int())),this.key("cipher").seq().obj(this.key("algo").objid(),this.key("iv").octstr()))),this.key("subjectPrivateKey").octstr())}));t.EncryptedPrivateKey=c;var l=n.define("DSAPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("p").int(),this.key("q").int(),this.key("g").int(),this.key("pub_key").int(),this.key("priv_key").int())}));t.DSAPrivateKey=l,t.DSAparam=n.define("DSAparam",(function(){this.int()}));var f=n.define("ECParameters",(function(){this.choice({namedCurve:this.objid()})})),h=n.define("ECPrivateKey",(function(){this.seq().obj(this.key("version").int(),this.key("privateKey").octstr(),this.key("parameters").optional().explicit(0).use(f),this.key("publicKey").optional().explicit(1).bitstr())}));t.ECPrivateKey=h,t.signature=n.define("signature",(function(){this.seq().obj(this.key("r").int(),this.key("s").int())}))},21302:function(e,t,r){"use strict";var n,i=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),s=this&&this.__importStar||(n=function(e){return n=Object.getOwnPropertyNames||function(e){var t=[];for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[t.length]=r);return t},n(e)},function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r=n(e),s=0;s<r.length;s++)"default"!==r[s]&&i(t,e,r[s]);return o(t,e),t}),a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};let u,c;Object.defineProperty(t,"__esModule",{value:!0}),t.restrictedPut=t.derive=t.GunErrors=t.crypto=t.GunRxJS=t.Gun=t.SEA=t.GunInstance=void 0,"undefined"!=typeof window?(t.Gun=u=r(54827),t.SEA=c=r(38030)):(t.Gun=u=Promise.resolve().then((()=>s(r(54827)))).then((e=>e.default)),t.SEA=c=Promise.resolve().then((()=>s(r(38030)))).then((e=>e.default))),r(67410),r(78719),r(29617),r(10924),r(46402),r(76140),r(73968);const l=r(50918);Object.defineProperty(t,"restrictedPut",{enumerable:!0,get:function(){return l.restrictedPut}});const f=a(r(67476));t.derive=f.default;const h=r(45628),d=r(23358),p=r(14134),g=r(2077);Object.defineProperty(t,"GunRxJS",{enumerable:!0,get:function(){return g.GunRxJS}});const b=s(r(7120));t.GunErrors=b;const y=s(r(90554));t.crypto=y,t.GunInstance=class{gun;user=null;crypto;sea;node;onAuthCallbacks=[];eventEmitter;_rxjs;constructor(e,t="shogun"){if((0,h.log)("[gunInstance] Initializing GunDB"),this.eventEmitter=new p.EventEmitter,!e)throw new Error("Gun instance is required but was not provided");if("object"!=typeof e)throw new Error("Gun instance must be an object, received: "+typeof e);if("function"!=typeof e.user)throw new Error("Gun instance is invalid: gun.user is not a function. Received gun.user type: "+typeof e.user);if("function"!=typeof e.get)throw new Error("Gun instance is invalid: gun.get is not a function. Received gun.get type: "+typeof e.get);if("function"!=typeof e.on)throw new Error("Gun instance is invalid: gun.on is not a function. Received gun.on type: "+typeof e.on);this.gun=e;try{this.user=this.gun.user().recall({sessionStorage:!0})}catch(e){throw(0,h.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}this.subscribeToAuthEvents(),this.crypto=y,this.node=this.gun.get(t),this.sea=c,this.restoreSessionOnInit()}async restoreSessionOnInit(){try{const e=await this.restoreSession();e.success?(0,h.log)(`Session automatically restored for user: ${e.userPub}`):(0,h.log)(`No previous session to restore: ${e.error}`)}catch(e){(0,h.logError)("Error during automatic session restoration:",e)}}subscribeToAuthEvents(){this.gun.on("auth",(e=>{(0,h.log)("[gunInstance] Auth event received:",e),e.err?d.ErrorHandler.handle(d.ErrorType.GUN,"AUTH_EVENT_ERROR",e.err,new Error(e.err)):this.notifyAuthListeners(e.sea?.pub||"")}))}notifyAuthListeners(e){const t=this.gun.user();this.onAuthCallbacks.forEach((e=>e(t)))}emitDataEvent(e,t,r,n=!0,i){const o={path:t,data:r,success:n,error:i,timestamp:Date.now()};this.eventEmitter.emit(e,o)}emitPeerEvent(e,t){const r={peer:t,action:e,timestamp:Date.now()};this.eventEmitter.emit(`gun:peer:${e}`,r)}on(e,t){this.eventEmitter.on(e,t)}off(e,t){this.eventEmitter.off(e,t)}once(e,t){this.eventEmitter.once(e,t)}emit(e,t){return this.eventEmitter.emit(e,t)}addPeer(e){this.gun.opt({peers:[e]}),this.emitPeerEvent("add",e),(0,h.log)(`Added new peer: ${e}`)}removePeer(e){try{const t=this.gun._.opt;if(t&&t.peers){delete t.peers[e];const r=t.peers[e];r&&"function"==typeof r.close&&r.close(),this.emitPeerEvent("remove",e),(0,h.log)(`Removed peer: ${e}`)}else(0,h.log)(`Peer not found in current connections: ${e}`)}catch(t){(0,h.logError)(`Error removing peer ${e}:`,t)}}getCurrentPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers).filter((t=>{const r=e.peers[t];return r&&r.wire&&"bye"!==r.wire.hied})):[]}catch(e){return(0,h.logError)("Error getting current peers:",e),[]}}getAllConfiguredPeers(){try{const e=this.gun._.opt;return e&&e.peers?Object.keys(e.peers):[]}catch(e){return(0,h.logError)("Error getting configured peers:",e),[]}}getPeerInfo(){try{const e=this.gun._.opt,t={};return e&&e.peers&&Object.keys(e.peers).forEach((r=>{const n=e.peers[r],i=n&&n.wire&&"bye"!==n.wire.hied,o=i?"connected":n&&n.wire?"disconnected":"not_initialized";t[r]={connected:i,status:o}})),t}catch(e){return(0,h.logError)("Error getting peer info:",e),{}}}reconnectToPeer(e){try{this.removePeer(e),this.addPeer(e),(0,h.log)(`Reconnected to peer: ${e}`)}catch(t){(0,h.logError)(`Error reconnecting to peer ${e}:`,t)}}resetPeers(e){try{const t=this.gun._.opt;t&&t.peers&&(Object.keys(t.peers).forEach((e=>{this.removePeer(e)})),e&&e.length>0&&e.forEach((e=>{this.addPeer(e)})),(0,h.log)(`Reset peers. New peers: ${e?e.join(", "):"none"}`))}catch(e){(0,h.logError)("Error resetting peers:",e)}}onAuth(e){this.onAuthCallbacks.push(e);const t=this.gun.user();return t&&t.is&&e(t),()=>{const t=this.onAuthCallbacks.indexOf(e);-1!==t&&this.onAuthCallbacks.splice(t,1)}}navigateToPath(e,t){return t?t.split("/").filter((e=>e.length>0)).reduce(((e,t)=>e.get(t)),e):e}getGun(){return this.gun}getUser(){return this.gun.user()}get(e){return this.navigateToPath(this.gun,e)}async getData(e){return new Promise((t=>{this.navigateToPath(this.gun,e).once((r=>{this.emitDataEvent("gun:get",e,r,!0),t(r)}))}))}async put(e,t){return new Promise((r=>{this.navigateToPath(this.gun,e).put(t,(n=>{const i=n.err?{success:!1,error:n.err}:{success:!0};this.emitDataEvent("gun:put",e,t,!n.err,n.err),r(i)}))}))}async set(e,t){return new Promise((r=>{this.navigateToPath(this.gun,e).set(t,(n=>{const i=n.err?{success:!1,error:n.err}:{success:!0};this.emitDataEvent("gun:set",e,t,!n.err,n.err),r(i)}))}))}async remove(e){return new Promise((t=>{this.navigateToPath(this.gun,e).put(null,(r=>{const n=r.err?{success:!1,error:r.err}:{success:!0};this.emitDataEvent("gun:remove",e,null,!r.err,r.err),t(n)}))}))}async signUp(e,t,r){(0,h.log)("[gunInstance] Attempting user registration:",e);try{if(t.length<8&&!r){const e="Passwords must be more than 8 characters long!";return(0,h.log)(e),{success:!1,error:e}}if(e.length<1){const e="Username must be more than 0 characters long!";return(0,h.log)(e),{success:!1,error:e}}(0,h.log)(`Checking if user ${e} exists in Gun's native system...`);const n=await new Promise((n=>{r?this.gun.user().auth(r,(e=>{e.err?n({exists:!1,error:e.err}):n({exists:!0,userPub:this.gun.user().is?.pub})})):this.gun.user().auth(e,t,(e=>{e.err?n({exists:!1,error:e.err}):n({exists:!0,userPub:this.gun.user().is?.pub})}))}));if(n.exists)return await this.runPostAuthOnAuthResult(n,e);(0,h.log)(`Creating new user: ${e}`);const i=await new Promise((n=>{r?n({success:!0,pub:r.pub}):this.gun.user().create(e,t,(t=>{t.err?((0,h.logError)(`User creation error: ${t.err}`),n({success:!1,error:t.err})):((0,h.log)(`User created successfully: ${e}`),n({success:!0,pub:t.pub}))}))}));if(!i.success)return i;const o=await new Promise((n=>{r?this.gun.user().auth(r,(e=>{e.err?((0,h.logError)(`Authentication after creation failed: ${e.err}`),n({success:!1,error:e.err})):n({success:!0,userPub:this.gun.user().is?.pub})})):this.gun.user().auth(e,t,(e=>{e.err?((0,h.logError)(`Authentication after creation failed: ${e.err}`),n({success:!1,error:e.err})):n({success:!0,userPub:this.gun.user().is?.pub})}))}));if(!o.success)return{success:!1,error:"User created but authentication failed"};const s=o.userPub;return(0,h.log)(`User authentication successful after creation: ${e} (${s})`),await this.runPostAuthOnAuthResult(o,e),this.savePair(),{success:!0,userPub:s,username:e,message:"User created successfully"}}catch(t){return(0,h.logError)(`Exception during signup for ${e}: ${t}`),{success:!1,error:String(t)}}}async runPostAuthOnAuthResult(e,t){(0,h.log)(`User ${t} already exists and password is correct, syncing with tracking system...`);const r=e.userPub;if(!r)return(0,h.logError)("User public key (userPub) is undefined in runPostAuthOnAuthResult."),{success:!1,error:"User public key is missing."};const n=await this.checkUsernameExists(t);if((0,h.log)("[gunInstance] existingUser",n),!n){(0,h.log)(`User ${t} not in tracking system, adding them...`);const e={username:t,pub:r,createdAt:Date.now(),lastLogin:Date.now()};try{return await new Promise(((n,i)=>{this.node.get(r).put(e,(e=>{e.err?((0,h.logError)(`Failed to save user metadata: ${e.err}`),i(e.err)):((0,h.log)(`User metadata saved for: ${t}`),n())}))})),await new Promise(((e,n)=>{const i=this.node.get("usernames"),o="#"+t;i.get(o).put(r,(s=>{if(s.err)return(0,h.logError)(`Failed to create username mapping: ${s.err}`),void n(s.err);Promise.race([new Promise(((e,n)=>{const s=[()=>new Promise((e=>{i.get(o).once((t=>{e(t===r)}))})),()=>new Promise((e=>{let t=!1;i.map().once(((n,i)=>{i===o&&n===r&&(t=!0,e(!0))})),setTimeout((()=>e(t)),500)}))];(async()=>{for(const r of s)try{if(await r())return(0,h.log)(`Successfully verified username mapping for ${t}`),void e()}catch(e){(0,h.logError)(`Verification strategy failed: ${e}`)}(0,h.logError)(`Failed to verify username mapping for ${t}`),n(new Error("Username mapping verification failed"))})()})),new Promise(((e,t)=>setTimeout((()=>t(new Error("Verification timeout"))),5e3)))]).then(e).catch(n)}))})),this.node.get("users").set(this.node.get(r),(e=>{e.err?(0,h.logError)(`Warning: Failed to add user to collection: ${e.err}`):(0,h.log)(`User added to collection: ${t}`)})),this.savePair(),{success:!0,userPub:r,username:t,message:"User successfully synced with tracking system"}}catch(e){return(0,h.logError)(`Critical: Could not update tracking system: ${e}`),{success:!1,userPub:r,username:t,error:"Failed to synchronize user tracking system"}}}return n}async checkUsernameExists(e){try{const t=e.trim().toLowerCase(),r=`#${t}`,n=t,i=[async()=>new Promise((e=>{this.node.get("usernames").get(r).once((t=>e(t)))})),async()=>new Promise((e=>{this.node.get("usernames").get(n).once((t=>e(t)))})),async()=>new Promise((e=>{this.node.map().once(((t,i)=>{i!==r&&i!==n||e(t)}))}))];for(const t of i)try{const r=await Promise.race([t(),new Promise(((e,t)=>setTimeout((()=>t(new Error("Lookup timeout"))),5e3)))]);if(r){if("string"==typeof r){const t=await new Promise((e=>{this.node.get(r).once((t=>{(0,h.log)(`[checkUsernameExists] User data for pub ${r}:`,t),e(t||null)}))}));return t&&t.username?t:{pub:r,username:e}}return r}}catch(e){(0,h.log)(`Username lookup strategy failed: ${e}`)}return null}catch(e){return(0,h.logError)(`Username existence check failed: ${e}`),null}}async login(e,t,r,n){(0,h.log)(`Attempting login for user: ${e}`);try{if(!(await new Promise((n=>{r?this.gun.user().auth(r,(t=>{t.err?((0,h.logError)(`Login error for ${e}: ${t.err}`),n({success:!1,error:t.err})):((0,h.log)(`Login successful for: ${e}`),n({success:!0,ack:t}))})):this.gun.user().auth(e,t,(t=>{t.err?((0,h.logError)(`Login error for ${e}: ${t.err}`),n({success:!1,error:t.err})):((0,h.log)(`Login successful for: ${e}`),n({success:!0,ack:t}))}))}))).success){const t={success:!1,error:`User '${e}' not found. Please check your username or register first.`};return n&&n(t),t}const i=this.gun.user().is?.pub;if(!i){const e={success:!1,error:"Authentication failed: No user pub returned."};return n&&n(e),e}(0,h.log)(`Gun.js authentication successful for: ${e} (${i})`),this.runPostAuthOnAuthResult({success:!0,userPub:i},e),(0,h.log)(`Login completed successfully for: ${e} (${i})`),this.savePair();const o={success:!0,userPub:i,username:e};return n&&n(o),o}catch(t){(0,h.logError)(`Exception during login for ${e}: ${t}`);const r={success:!1,error:String(t)};return n&&n(r),r}}savePair(){try{const e=this.gun.user(),t=e?._?.sea,r=e?.is;if(t&&r){const e={pub:r.pub,alias:r.alias||"",timestamp:Date.now()};"undefined"!=typeof localStorage&&(localStorage.setItem("gun/pair",JSON.stringify(t)),localStorage.setItem("gun/session",JSON.stringify(e))),"undefined"!=typeof sessionStorage&&(sessionStorage.setItem("gun/pair",JSON.stringify(t)),sessionStorage.setItem("gun/session",JSON.stringify(e))),(0,h.log)(`Session saved for user: ${r.alias||r.pub}`)}}catch(e){(0,h.logError)("Error saving auth pair and session:",e)}}async restoreSession(){try{if("undefined"==typeof localStorage)return{success:!1,error:"localStorage not available"};const e=localStorage.getItem("gun/session"),t=localStorage.getItem("gun/pair");if(!e||!t)return(0,h.log)("[gunInstance] No saved session found"),{success:!1,error:"No saved session"};const r=JSON.parse(e),n=JSON.parse(t);if(Date.now()-r.timestamp>6048e5)return(0,h.log)("[gunInstance] Session expired, clearing storage"),localStorage.removeItem("gun/session"),localStorage.removeItem("gun/pair"),{success:!1,error:"Session expired"};(0,h.log)(`Attempting to restore session for user: ${r.alias||r.pub}`);const i=this.gun.user();i._={sea:n};const o=i.recall({sessionStorage:!0});return(0,h.log)("recallResult",o),o&&i.is?.pub===r.pub?((0,h.log)(`Session restored successfully for: ${r.alias||r.pub}`),{success:!0,userPub:r.pub}):((0,h.log)("[gunInstance] Session restoration failed, clearing storage"),localStorage.removeItem("gun/session"),localStorage.removeItem("gun/pair"),{success:!1,error:"Session restoration failed"})}catch(e){return(0,h.logError)(`Error restoring session: ${e}`),{success:!1,error:String(e)}}}logout(){try{if(!this.isLoggedIn())return void(0,h.log)("[gunInstance] No user logged in, skipping logout");const e=this.getCurrentUser();(0,h.log)(`Logging out user: ${e?.pub||"unknown"}`),this.gun.user().leave(),"undefined"!=typeof localStorage&&(localStorage.removeItem("gun/pair"),localStorage.removeItem("gun/session"),localStorage.removeItem("pair"),(0,h.log)("[gunInstance] Local session data cleared")),"undefined"!=typeof sessionStorage&&(sessionStorage.removeItem("gun/"),sessionStorage.removeItem("gun/user"),sessionStorage.removeItem("gun/auth"),sessionStorage.removeItem("gun/pair"),sessionStorage.removeItem("gun/session"),(0,h.log)("[gunInstance] Session storage cleared")),(0,h.log)("[gunInstance] Logout completed successfully")}catch(e){(0,h.logError)("Error during logout:",e)}}clearAllStorageData(){try{if((0,h.log)("[gunInstance] Clearing all Gun-related storage data..."),"undefined"!=typeof localStorage){const e=[];for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);r&&(r.startsWith("gun/")||"pair"===r)&&e.push(r)}e.forEach((e=>localStorage.removeItem(e))),(0,h.log)(`Cleared ${e.length} items from localStorage`)}if("undefined"!=typeof sessionStorage){const e=[];for(let t=0;t<sessionStorage.length;t++){const r=sessionStorage.key(t);r&&r.startsWith("gun/")&&e.push(r)}e.forEach((e=>sessionStorage.removeItem(e))),(0,h.log)(`Cleared ${e.length} items from sessionStorage`)}this.isLoggedIn()&&(this.gun.user().leave(),(0,h.log)("[gunInstance] User logged out")),(0,h.log)("[gunInstance] All Gun-related storage data cleared")}catch(e){(0,h.logError)("Error clearing storage data:",e)}}async testConnectivity(){try{(0,h.log)("[gunInstance] Testing Gun connectivity...");const e={peers:this.getPeerInfo(),gunInstance:!!this.gun,userInstance:!!this.gun.user(),canWrite:!1,canRead:!1,testWriteResult:null,testReadResult:null};try{const t={test:!0,timestamp:Date.now()},r=await new Promise((e=>{this.gun.get("test").get("connectivity").put(t,(t=>{e(t)}))}));e.canWrite=!r?.err,e.testWriteResult=r,(0,h.log)("[gunInstance] Write test result:",r)}catch(t){(0,h.logError)("Write test failed:",t),e.testWriteResult={error:String(t)}}try{const t=await new Promise((e=>{this.gun.get("test").get("connectivity").once((t=>{e(t)}))}));e.canRead=!!t,e.testReadResult=t,(0,h.log)("[gunInstance] Read test result:",t)}catch(t){(0,h.logError)("Read test failed:",t),e.testReadResult={error:String(t)}}return(0,h.log)("[gunInstance] Connectivity test completed:",e),e}catch(e){return(0,h.logError)("Error testing connectivity:",e),{peers:{},gunInstance:!1,userInstance:!1,canWrite:!1,canRead:!1,testWriteResult:{error:String(e)},testReadResult:{error:String(e)}}}}isLoggedIn(){return!!this.gun.user()?.is?.pub}getCurrentUser(){const e=this.gun.user()?.is?.pub;return e?{pub:e,user:this.gun.user()}:null}rx(){return this._rxjs||(this._rxjs=new g.GunRxJS(this.gun)),this._rxjs}async setPasswordHint(e,t,r,n,i){if((0,h.log)("[gunInstance] Setting password hint for:",e),!(await this.login(e,t)).success)return{success:!1,error:"Authentication failed"};const o=this.getCurrentUser();if(!o||!o.pub)return{success:!1,error:"User not authenticated"};try{const e=i.join("|");let t,s;try{if(c&&c.work)t=await c.work(e,null,null,{name:"SHA-256"});else{if(!this.crypto||!this.crypto.hashText)throw new Error("Cryptographic functions not available");t=await this.crypto.hashText(e)}if(!t)throw new Error("Failed to generate hash")}catch(e){return(0,h.logError)("Error generating hash:",e),{success:!1,error:"Failed to generate security hash"}}try{if(c&&c.encrypt)s=await c.encrypt(r,t);else{if(!this.crypto||!this.crypto.encrypt)throw new Error("Encryption functions not available");s=await this.crypto.encrypt(r,t)}if(!s)throw new Error("Failed to encrypt hint")}catch(e){return(0,h.logError)("Error encrypting hint:",e),{success:!1,error:"Failed to encrypt password hint"}}const a=o.pub,u={questions:JSON.stringify(n),hint:s};return await new Promise(((e,t)=>{this.node.get(a).get("security").put(u,(r=>{r.err?((0,h.logError)("Error saving security data to public graph:",r.err),t(new Error(r.err))):((0,h.log)(`Security data saved to public graph for ${a}`),e())}))})),{success:!0}}catch(e){return(0,h.logError)("Error setting password hint:",e),{success:!1,error:String(e)}}}async forgotPassword(e,t){(0,h.log)("[gunInstance] Attempting password recovery for:",e);try{let r=await this.checkUsernameExists(e);if((0,h.log)("[gunInstance] userData",r),"string"==typeof r&&(r={pub:r,username:e}),!r||!r.pub)return{success:!1,error:"User not found"};const n=r.pub;(0,h.log)(`Found user public key for password recovery: ${n}`);const i=await new Promise((t=>{this.node.get(n).get("security").once((r=>{(0,h.log)(`Retrieved security data for user ${e}:`,r?"found":"not found"),t(r)}))}));if(!i||!i.hint)return{success:!1,error:"No password hint found"};const o=t.join("|");let s,a;try{if(c&&c.work)s=await c.work(o,null,null,{name:"SHA-256"});else{if(!this.crypto||!this.crypto.hashText)throw new Error("Cryptographic functions not available");s=await this.crypto.hashText(o)}if(!s)throw new Error("Failed to generate hash")}catch(e){return(0,h.logError)("Error generating hash:",e),{success:!1,error:"Failed to generate security hash"}}try{if(c&&c.decrypt)a=await c.decrypt(i.hint,s);else{if(!this.crypto||!this.crypto.decrypt)throw new Error("Decryption functions not available");a=await this.crypto.decrypt(i.hint,s)}}catch(e){return{success:!1,error:"Incorrect answers to security questions"}}return void 0===a?{success:!1,error:"Incorrect answers to security questions"}:{success:!0,hint:a}}catch(e){return(0,h.logError)("Error recovering password hint:",e),{success:!1,error:String(e)}}}async hashText(e){return this.crypto.hashText(e)}async encrypt(e,t){return this.crypto.encrypt(e,t)}async decrypt(e,t){return this.crypto.decrypt(e,t)}async putUserData(e,t){return new Promise(((r,n)=>{const i=this.gun.user();if(!i.is)return this.emitDataEvent("gun:put",`user/${e}`,t,!1,"User not authenticated"),void n(new Error("User not authenticated"));this.navigateToPath(i,e).put(t,(i=>{i.err?(this.emitDataEvent("gun:put",`user/${e}`,t,!1,i.err),n(new Error(i.err))):(this.emitDataEvent("gun:put",`user/${e}`,t,!0),r(i))}))}))}async getUserData(e){return new Promise((t=>{const r=this.gun.user();if(!r.is)return this.emitDataEvent("gun:get",`user/${e}`,null,!1,"User not authenticated"),void t(null);this.navigateToPath(r,e).once((r=>{this.emitDataEvent("gun:get",`user/${e}`,r,!0),t(r)}))}))}async derive(e,t,r){try{(0,h.log)("[gunInstance] Deriving cryptographic keys with options:",r);const n=await(0,f.default)(e,t,r);return(0,h.log)("[gunInstance] Key derivation completed successfully"),n}catch(e){throw(0,h.logError)("Error during key derivation:",e),d.ErrorHandler.handle(d.ErrorType.ENCRYPTION,"KEY_DERIVATION_FAILED",e instanceof Error?e.message:"Failed to derive cryptographic keys",e),e}}async deriveP256(e,t){return this.derive(e,t,{includeP256:!0})}async deriveBitcoin(e,t){return this.derive(e,t,{includeSecp256k1Bitcoin:!0})}async deriveEthereum(e,t){return this.derive(e,t,{includeSecp256k1Ethereum:!0})}async deriveAll(e,t){return this.derive(e,t,{includeP256:!0,includeSecp256k1Bitcoin:!0,includeSecp256k1Ethereum:!0})}static Errors=b}},21352:(e,t,r)=>{var n=r(20320),i=r(66011),o=r(62802),s=r(92861).Buffer,a=r(64196),u=r(2455),c=r(93382),l=s.alloc(128),f={md5:16,sha1:20,sha224:28,sha256:32,sha384:48,sha512:64,rmd160:20,ripemd160:20};function h(e,t,r){var a=function(e){return"rmd160"===e||"ripemd160"===e?function(e){return(new i).update(e).digest()}:"md5"===e?n:function(t){return o(e).update(t).digest()}}(e),u="sha512"===e||"sha384"===e?128:64;t.length>u?t=a(t):t.length<u&&(t=s.concat([t,l],u));for(var c=s.allocUnsafe(u+f[e]),h=s.allocUnsafe(u+f[e]),d=0;d<u;d++)c[d]=54^t[d],h[d]=92^t[d];var p=s.allocUnsafe(u+r+4);c.copy(p,0,0,u),this.ipad1=p,this.ipad2=c,this.opad=h,this.alg=e,this.blocksize=u,this.hash=a,this.size=f[e]}h.prototype.run=function(e,t){return e.copy(t,this.blocksize),this.hash(t).copy(this.opad,this.blocksize),this.hash(this.opad)},e.exports=function(e,t,r,n,i){a(r,n);var o=new h(i=i||"sha1",e=c(e,u,"Password"),(t=c(t,u,"Salt")).length),l=s.allocUnsafe(n),d=s.allocUnsafe(t.length+4);t.copy(d,0,0,t.length);for(var p=0,g=f[i],b=Math.ceil(n/g),y=1;y<=b;y++){d.writeUInt32BE(y,t.length);for(var m=o.run(d,o.ipad1),v=m,w=1;w<r;w++){v=o.run(v,o.ipad2);for(var E=0;E<g;E++)m[E]^=v[E]}m.copy(l,p),p+=g}return l}},21361:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.every=void 0;var n=r(65212),i=r(17214);t.every=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(i){e.call(t,i,o++,r)||(n.next(!1),n.complete())}),(function(){n.next(!0),n.complete()})))}))}},21638:()=>{},21762:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.debounceTime=void 0;var n=r(62326),i=r(65212),o=r(17214);t.debounceTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.operate((function(r,n){var i=null,s=null,a=null,u=function(){if(i){i.unsubscribe(),i=null;var e=s;s=null,n.next(e)}};function c(){var r=a+e,o=t.now();if(o<r)return i=this.schedule(void 0,r-o),void n.add(i);u()}r.subscribe(o.createOperatorSubscriber(n,(function(r){s=r,a=t.now(),i||(i=t.schedule(c,e),n.add(i))}),(function(){u(),n.complete()}),void 0,(function(){s=i=null})))}))}},21875:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrames=void 0;var n=r(48051),i=r(22931),o=r(35726);function s(e){return new n.Observable((function(t){var r=e||i.performanceTimestampProvider,n=r.now(),s=0,a=function(){t.closed||(s=o.animationFrameProvider.requestAnimationFrame((function(i){s=0;var o=r.now();t.next({timestamp:e?o:i,elapsed:o-n}),a()})))};return a(),function(){s&&o.animationFrameProvider.cancelAnimationFrame(s)}}))}t.animationFrames=function(e){return e?s(e):a};var a=s()},21911:(e,t,r)=>{"use strict";var n=r(67426),i=r(57766);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=1024,o.outSize=384,o.hmacStrength=192,o.padLength=128,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,12),"big"):n.split32(this.h.slice(0,12),"big")}},21946:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindNodeCallback=void 0;var n=r(17474);t.bindNodeCallback=function(e,t,r){return n.bindCallbackInternals(!0,e,t,r)}},22044:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilChanged=void 0;var n=r(87699),i=r(65212),o=r(17214);function s(e,t){return e===t}t.distinctUntilChanged=function(e,t){return void 0===t&&(t=n.identity),e=null!=e?e:s,i.operate((function(r,n){var i,s=!0;r.subscribe(o.createOperatorSubscriber(n,(function(r){var o=t(r);!s&&e(i,o)||(s=!1,i=o,n.next(r))})))}))}},22105:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.asap=t.asapScheduler=void 0;var n=r(78051),i=r(23952);t.asapScheduler=new i.AsapScheduler(n.AsapAction),t.asap=t.asapScheduler},22153:(e,t,r)=>{var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(74598)},22318:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toBig=t.shrSL=t.shrSH=t.rotrSL=t.rotrSH=t.rotrBL=t.rotrBH=t.rotr32L=t.rotr32H=t.rotlSL=t.rotlSH=t.rotlBL=t.rotlBH=t.add5L=t.add5H=t.add4L=t.add4H=t.add3L=t.add3H=void 0,t.add=v,t.fromBig=i,t.split=o;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){const r=e.length;let n=new Uint32Array(r),o=new Uint32Array(r);for(let s=0;s<r;s++){const{h:r,l:a}=i(e[s],t);[n[s],o[s]]=[r,a]}return[n,o]}const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const u=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=u;const c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=b;const y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;const m=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const A=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=A;const _=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=_;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const P=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=P;const k={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:c,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:d,rotr32L:p,rotlSH:g,rotlSL:b,rotlBH:y,rotlBL:m,add:v,add3L:w,add3H:E,add4L:A,add4H:_,add5H:P,add5L:S};t.default=k},22418:(e,t,r)=>{e.exports=function(e){var t=r(78719);e.find("a",(function(){var r,n,i=[];t.map(e.list,(function(e,t){t.indexOf("%1B")+1&&e&&i.push([t,e])})),i.length&&console.log("\n! ! ! WARNING ! ! !\nRAD v0.2020.x has detected OLD v0.2019.x data & automatically migrating. Automatic migration will be turned OFF in future versions! If you are just developing/testing, we recommend you reset your data. Please contact us if you have any concerns.\nThis message should only log once."),i.forEach((function(t){r=t[0],n=t[1],e.list(decodeURIComponent(r),n),e.list(r,0)})),r&&e.find.bad(r)}))}},22426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwl=t.decode=void 0;const n=r(75347),i=/^[a-z]*$/i;function o(e,t){let r=97;return e.reduce(((e,n)=>(n===t?r++:n.match(i)?e.push(String.fromCharCode(r)+n):(r=97,e.push(n)),e)),[])}function s(e,t){for(let r=28;r>=0;r--)e=e.split(" !#$%&'()*+,-./<=>?@[]^_`{|}~"[r]).join(t.substring(2*r,2*r+2));const r=[],n=e.replace(/(:|([0-9])|([A-Z][a-z]*))/g,((e,t,n,i)=>{if(n)for(let e=parseInt(n);e>=0;e--)r.push(";");else r.push(t.toLowerCase());return""}));if(n)throw new Error(`leftovers: ${JSON.stringify(n)}`);return o(o(r,";"),":")}t.decode=s,t.decodeOwl=function(e){return(0,n.assertArgument)("0"===e[0],"unsupported auwl data","data",e),s(e.substring(59),e.substring(1,59))}},22623:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.SHA224=t.sha256=t.SHA256=void 0;const n=r(17076);t.SHA256=n.SHA256,t.sha256=n.sha256,t.SHA224=n.SHA224,t.sha224=n.sha224},22853:(e,t,r)=>{var n=t;n.der=r(62010),n.pem=r(58903)},22862:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pbkdf2=void 0;const n=r(87155),i=r(75347);let o=!1;const s=function(e,t,r,i,o){return(0,n.pbkdf2Sync)(e,t,r,i,o)};let a=s;function u(e,t,r,n,o){const s=(0,i.getBytes)(e,"password"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(a(s,u,r,n,o))}t.pbkdf2=u,u._=s,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("pbkdf2 is locked");a=e},Object.freeze(u)},22931:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.performanceTimestampProvider=void 0,t.performanceTimestampProvider={now:function(){return(t.performanceTimestampProvider.delegate||performance).now()},delegate:void 0}},22977:function(e,t,r){"use strict";var n,i,o=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},s=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CBC=void 0;const a=r(86342);class u extends a.ModeOfOperation{constructor(e,t){if(super("ECC",e,u),n.set(this,void 0),i.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");o(this,n,new Uint8Array(t),"f")}else o(this,n,new Uint8Array(16),"f");o(this,i,this.iv,"f")}get iv(){return new Uint8Array(s(this,n,"f"))}encrypt(e){if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){for(let t=0;t<16;t++)s(this,i,"f")[t]^=e[r+t];o(this,i,this.aes.encrypt(s(this,i,"f")),"f"),t.set(s(this,i,"f"),r)}return t}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");const t=new Uint8Array(e.length);for(let r=0;r<e.length;r+=16){const n=this.aes.decrypt(e.subarray(r,r+16));for(let o=0;o<16;o++)t[r+o]=n[o]^s(this,i,"f")[o],s(this,i,"f")[o]=e[r+o]}return t}}t.CBC=u,n=new WeakMap,i=new WeakMap},23071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.VoidSigner=t.AbstractSigner=void 0;const n=r(30646),i=r(77778),o=r(75347),s=r(63807);function a(e,t){if(e.provider)return e.provider;(0,o.assert)(!1,"missing provider","UNSUPPORTED_OPERATION",{operation:t})}async function u(e,t){let r=(0,s.copyRequest)(t);if(null!=r.to&&(r.to=(0,n.resolveAddress)(r.to,e)),null!=r.from){const t=r.from;r.from=Promise.all([e.getAddress(),(0,n.resolveAddress)(t,e)]).then((([e,t])=>((0,o.assertArgument)(e.toLowerCase()===t.toLowerCase(),"transaction from mismatch","tx.from",t),e)))}else r.from=e.getAddress();return await(0,o.resolveProperties)(r)}class c{provider;constructor(e){(0,o.defineProperties)(this,{provider:e||null})}async getNonce(e){return a(this,"getTransactionCount").getTransactionCount(await this.getAddress(),e)}async populateCall(e){return await u(this,e)}async populateTransaction(e){const t=a(this,"populateTransaction"),r=await u(this,e);null==r.nonce&&(r.nonce=await this.getNonce("pending")),null==r.gasLimit&&(r.gasLimit=await this.estimateGas(r));const n=await this.provider.getNetwork();if(null!=r.chainId){const t=(0,o.getBigInt)(r.chainId);(0,o.assertArgument)(t===n.chainId,"transaction chainId mismatch","tx.chainId",e.chainId)}else r.chainId=n.chainId;const i=null!=r.maxFeePerGas||null!=r.maxPriorityFeePerGas;if(null==r.gasPrice||2!==r.type&&!i?0!==r.type&&1!==r.type||!i||(0,o.assertArgument)(!1,"pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","tx",e):(0,o.assertArgument)(!1,"eip-1559 transaction do not support gasPrice","tx",e),2!==r.type&&null!=r.type||null==r.maxFeePerGas||null==r.maxPriorityFeePerGas)if(0===r.type||1===r.type){const e=await t.getFeeData();(0,o.assert)(null!=e.gasPrice,"network does not support gasPrice","UNSUPPORTED_OPERATION",{operation:"getGasPrice"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice)}else{const e=await t.getFeeData();if(null==r.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(r.authorizationList&&r.authorizationList.length?r.type=4:r.type=2,null!=r.gasPrice){const e=r.gasPrice;delete r.gasPrice,r.maxFeePerGas=e,r.maxPriorityFeePerGas=e}else null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?((0,o.assert)(!i,"network does not support EIP-1559","UNSUPPORTED_OPERATION",{operation:"populateTransaction"}),null==r.gasPrice&&(r.gasPrice=e.gasPrice),r.type=0):(0,o.assert)(!1,"failed to get consistent fee data","UNSUPPORTED_OPERATION",{operation:"signer.getFeeData"});else 2!==r.type&&3!==r.type&&4!==r.type||(null==r.maxFeePerGas&&(r.maxFeePerGas=e.maxFeePerGas),null==r.maxPriorityFeePerGas&&(r.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else r.type=2;return await(0,o.resolveProperties)(r)}async populateAuthorization(e){const t=Object.assign({},e);return null==t.chainId&&(t.chainId=(await a(this,"getNetwork").getNetwork()).chainId),null==t.nonce&&(t.nonce=await this.getNonce()),t}async estimateGas(e){return a(this,"estimateGas").estimateGas(await this.populateCall(e))}async call(e){return a(this,"call").call(await this.populateCall(e))}async resolveName(e){const t=a(this,"resolveName");return await t.resolveName(e)}async sendTransaction(e){const t=a(this,"sendTransaction"),r=await this.populateTransaction(e);delete r.from;const n=i.Transaction.from(r);return await t.broadcastTransaction(await this.signTransaction(n))}authorize(e){(0,o.assert)(!1,"authorization not implemented for this signer","UNSUPPORTED_OPERATION",{operation:"authorize"})}}t.AbstractSigner=c;class l extends c{address;constructor(e,t){super(t),(0,o.defineProperties)(this,{address:e})}async getAddress(){return this.address}connect(e){return new l(this.address,e)}#g(e,t){(0,o.assert)(!1,`VoidSigner cannot sign ${e}`,"UNSUPPORTED_OPERATION",{operation:t})}async signTransaction(e){this.#g("transactions","signTransaction")}async signMessage(e){this.#g("messages","signMessage")}async signTypedData(e,t,r){this.#g("typed-data","signTypedData")}}t.VoidSigner=l},23079:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skip=void 0;var n=r(85934);t.skip=function(e){return n.filter((function(t,r){return e<=r}))}},23241:e=>{"use strict";e.exports=JSON.parse('{"modp1":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a63a3620ffffffffffffffff"},"modp2":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece65381ffffffffffffffff"},"modp5":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca237327ffffffffffffffff"},"modp14":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aacaa68ffffffffffffffff"},"modp15":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a93ad2caffffffffffffffff"},"modp16":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c934063199ffffffffffffffff"},"modp17":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dcc4024ffffffffffffffff"},"modp18":{"gen":"02","prime":"ffffffffffffffffc90fdaa22168c234c4c6628b80dc1cd129024e088a67cc74020bbea63b139b22514a08798e3404ddef9519b3cd3a431b302b0a6df25f14374fe1356d6d51c245e485b576625e7ec6f44c42e9a637ed6b0bff5cb6f406b7edee386bfb5a899fa5ae9f24117c4b1fe649286651ece45b3dc2007cb8a163bf0598da48361c55d39a69163fa8fd24cf5f83655d23dca3ad961c62f356208552bb9ed529077096966d670c354e4abc9804f1746c08ca18217c32905e462e36ce3be39e772c180e86039b2783a2ec07a28fb5c55df06f4c52c9de2bcbf6955817183995497cea956ae515d2261898fa051015728e5a8aaac42dad33170d04507a33a85521abdf1cba64ecfb850458dbef0a8aea71575d060c7db3970f85a6e1e4c7abf5ae8cdb0933d71e8c94e04a25619dcee3d2261ad2ee6bf12ffa06d98a0864d87602733ec86a64521f2b18177b200cbbe117577a615d6c770988c0bad946e208e24fa074e5ab3143db5bfce0fd108e4b82d120a92108011a723c12a787e6d788719a10bdba5b2699c327186af4e23c1a946834b6150bda2583e9ca2ad44ce8dbbbc2db04de8ef92e8efc141fbecaa6287c59474e6bc05d99b2964fa090c3a2233ba186515be7ed1f612970cee2d7afb81bdd762170481cd0069127d5b05aa993b4ea988d8fddc186ffb7dc90a6c08f4df435c93402849236c3fab4d27c7026c1d4dcb2602646dec9751e763dba37bdf8ff9406ad9e530ee5db382f413001aeb06a53ed9027d831179727b0865a8918da3edbebcf9b14ed44ce6cbaced4bb1bdb7f1447e6cc254b332051512bd7af426fb8f401378cd2bf5983ca01c64b92ecf032ea15d1721d03f482d7ce6e74fef6d55e702f46980c82b5a84031900b1c9e59e7c97fbec7e8f323a97a7e36cc88be0f1d45b7ff585ac54bd407b22b4154aacc8f6d7ebf48e1d814cc5ed20f8037e0a79715eef29be32806a1d58bb7c5da76f550aa3d8a1fbff0eb19ccb1a313d55cda56c9ec2ef29632387fe8d76e3c0468043e8f663f4860ee12bf2d5b0b7474d6e694f91e6dbe115974a3926f12fee5e438777cb6a932df8cd8bec4d073b931ba3bc832b68d9dd300741fa7bf8afc47ed2576f6936ba424663aab639c5ae4f5683423b4742bf1c978238f16cbe39d652de3fdb8befc848ad922222e04a4037c0713eb57a81a23f0c73473fc646cea306b4bcbc8862f8385ddfa9d4b7fa2c087e879683303ed5bdd3a062b3cf5b3a278a66d2a13f83f44f82ddf310ee074ab6a364597e899a0255dc164f31cc50846851df9ab48195ded7ea1b1d510bd7ee74d73faf36bc31ecfa268359046f4eb879f924009438b481c6cd7889a002ed5ee382bc9190da6fc026e479558e4475677e9aa9e3050e2765694dfc81f56e880b96e7160c980dd98edd3dfffffffffffffffff"}}')},23358:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorHandler=t.ErrorType=void 0,t.createError=o;const n=r(45628);var i;function o(e,t,r,n){return{type:e,code:t,message:r,originalError:n,timestamp:Date.now()}}!function(e){e.AUTHENTICATION="AuthenticationError",e.AUTHORIZATION="AuthorizationError",e.VALIDATION="ValidationError",e.NETWORK="NetworkError",e.DATABASE="DatabaseError",e.WALLET="WalletError",e.STORAGE="StorageError",e.ENCRYPTION="EncryptionError",e.SIGNATURE="SignatureError",e.ENVIRONMENT="EnvironmentError",e.SECURITY="SecurityError",e.GUN="GunError",e.STEALTH="StealthError",e.WEBAUTHN="WebAuthnError",e.PLUGIN="PluginError",e.UNKNOWN="UnknownError",e.CONNECTOR="ConnectorError",e.GENERAL="GeneralError",e.CONTRACT="ContractError",e.BIP32="BIP32Error",e.ETHEREUM="EthereumError",e.BITCOIN="BitcoinError"}(i||(t.ErrorType=i={})),t.ErrorHandler=class{static errors=[];static maxErrors=100;static listeners=[];static handleError(e){(0,n.logError)(`[${e.type}] ${e.code}: ${e.message}`),this.errors.push(e),this.errors.length>this.maxErrors&&(this.errors=this.errors.slice(-this.maxErrors)),this.notifyListeners(e)}static handle(e,t,r,i,s="error"){const a=i?`${r} - ${this.formatError(i)}`:r;switch(s){case"debug":(0,n.log)(`[${e}.${t}] (DEBUG) ${a}`);break;case"warn":(0,n.log)(`[${e}.${t}] (WARN) ${a}`);break;case"info":(0,n.log)(`[${e}.${t}] (INFO) ${a}`);break;default:(0,n.log)(`[${e}.${t}] (ERROR) ${a}`),i&&i instanceof Error&&(0,n.log)(i.stack||"No stack trace available")}const u=o(e,t,a,i);return this.handleError(u),u}static handleAndThrow(e,t,r,n){throw this.handle(e,t,r,n)}static getRecentErrors(e=10){return this.errors.slice(-Math.min(e,this.errors.length))}static addListener(e){this.listeners.push(e)}static removeListener(e){const t=this.listeners.indexOf(e);-1!==t&&this.listeners.splice(t,1)}static notifyListeners(e){for(const t of this.listeners)try{t(e)}catch(e){(0,n.logError)(`Error in error listener: ${e}`)}}static formatError(e){if(!e)return"Unknown error";if(e instanceof Error)return`${e.name}: ${e.message}`;if("string"==typeof e)return e;if("object"==typeof e)try{return JSON.stringify(e)}catch(t){return`Object: ${Object.prototype.toString.call(e)}`}return String(e)}static async withRetry(e,t,r,i=3,o=1e3){let s;for(let t=1;t<=i;t++)try{return await e()}catch(e){s=e;const r=o*t;t<i&&((0,n.log)(`Retrying operation after ${r}ms (attempt ${t}/${i})`),await new Promise((e=>setTimeout(e,r))))}throw this.handle(t,r,`Operation failed after ${i} attempts`,s)}static clearErrors(){this.errors=[]}static getErrorStats(){const e={total:this.errors.length,byType:{},byCode:{}};for(const t of this.errors)e.byType[t.type]=(e.byType[t.type]||0)+1,e.byCode[t.code]=(e.byCode[t.code]||0)+1;return e}}},23506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NotFoundError=void 0;var n=r(9619);t.NotFoundError=n.createErrorClass((function(e){return function(t){e(this),this.name="NotFoundError",this.message=t}}))},23562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.verifyAuthorization=t.hashAuthorization=void 0;var n=r(24027);Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return n.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return n.verifyAuthorization}});var i=r(81993);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return i.id}});var o=r(43239);Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return o.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return o.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return o.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return o.dnsEncode}});var s=r(48717);Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return s.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return s.verifyMessage}});var a=r(96065);Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return a.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return a.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return a.solidityPackedSha256}});var u=r(67215);Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return u.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return u.verifyTypedData}})},23952:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){this._active=!0;var t=this._scheduled;this._scheduled=void 0;var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(19533).AsyncScheduler);t.AsapScheduler=o},24027:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyAuthorization=t.hashAuthorization=void 0;const n=r(30646),i=r(32291),o=r(77778),s=r(75347);function a(e){return(0,s.assertArgument)("string"==typeof e.address,"invalid address for hashAuthorization","auth.address",e),(0,i.keccak256)((0,s.concat)(["0x05",(0,s.encodeRlp)([null!=e.chainId?(0,s.toBeArray)(e.chainId):"0x",(0,n.getAddress)(e.address),null!=e.nonce?(0,s.toBeArray)(e.nonce):"0x"])]))}t.hashAuthorization=a,t.verifyAuthorization=function(e,t){return(0,o.recoverAddress)(a(e),t)}},24101:(e,t,r)=>{"use strict";var n=/Proc-Type: 4,ENCRYPTED[\n\r]+DEK-Info: AES-((?:128)|(?:192)|(?:256))-CBC,([0-9A-H]+)[\n\r]+([0-9A-z\n\r+/=]+)[\n\r]+/m,i=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----/m,o=/^-----BEGIN ((?:.*? KEY)|CERTIFICATE)-----([0-9A-z\n\r+/=]+)-----END \1-----$/m,s=r(68078),a=r(1241),u=r(92861).Buffer;e.exports=function(e,t){var r,c=e.toString(),l=c.match(n);if(l){var f="aes"+l[1],h=u.from(l[2],"hex"),d=u.from(l[3].replace(/[\r\n]/g,""),"base64"),p=s(t,h.slice(0,8),parseInt(l[1],10)).key,g=[],b=a.createDecipheriv(f,p,h);g.push(b.update(d)),g.push(b.final()),r=u.concat(g)}else{var y=c.match(o);r=u.from(y[2].replace(/[\r\n]/g,""),"base64")}return{tag:c.match(i)[1],data:r}}},24107:(e,t,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298],a=new Array(64);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e){return(e>>>2|e<<30)^(e>>>13|e<<19)^(e>>>22|e<<10)}function h(e){return(e>>>6|e<<26)^(e>>>11|e<<21)^(e>>>25|e<<7)}function d(e){return(e>>>7|e<<25)^(e>>>18|e<<14)^e>>>3}n(u,i),u.prototype.init=function(){return this._a=1779033703,this._b=3144134277,this._c=1013904242,this._d=2773480762,this._e=1359893119,this._f=2600822924,this._g=528734635,this._h=1541459225,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,p=0|this._f,g=0|this._g,b=0|this._h,y=0;y<16;++y)r[y]=e.readInt32BE(4*y);for(;y<64;++y)r[y]=0|(((t=r[y-2])>>>17|t<<15)^(t>>>19|t<<13)^t>>>10)+r[y-7]+d(r[y-15])+r[y-16];for(var m=0;m<64;++m){var v=b+h(u)+c(u,p,g)+s[m]+r[m]|0,w=f(n)+l(n,i,o)|0;b=g,g=p,p=u,u=a+v|0,a=o,o=i,i=n,n=v+w|0}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0,this._f=p+this._f|0,this._g=g+this._g|0,this._h=b+this._h|0},u.prototype._hash=function(){var e=o.allocUnsafe(32);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e.writeInt32BE(this._h,28),e},e.exports=u},24116:(e,t,r)=>{var n=r(48287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},24139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hkdf=void 0,t.extract=o,t.expand=u;const n=r(39615),i=r(99175);function o(e,t,r){return(0,i.ahash)(e),void 0===r&&(r=new Uint8Array(e.outputLen)),(0,n.hmac)(e,(0,i.toBytes)(r),(0,i.toBytes)(t))}const s=Uint8Array.from([0]),a=Uint8Array.of();function u(e,t,r,o=32){(0,i.ahash)(e),(0,i.anumber)(o);const u=e.outputLen;if(o>255*u)throw new Error("Length should be <= 255*HashLen");const c=Math.ceil(o/u);void 0===r&&(r=a);const l=new Uint8Array(c*u),f=n.hmac.create(e,t),h=f._cloneInto(),d=new Uint8Array(f.outputLen);for(let e=0;e<c;e++)s[0]=e+1,h.update(0===e?a:d).update(r).update(s).digestInto(d),l.set(d,u*e),f._cloneInto(h);return f.destroy(),h.destroy(),(0,i.clean)(d,s),l.slice(0,o)}t.hkdf=(e,t,r,n,i)=>u(e,o(e,t,r),n,i)},24164:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.CTR=void 0;const u=r(86342);class c extends u.ModeOfOperation{constructor(e,t){super("CTR",e,c),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),s(this,o,new Uint8Array(16),"f"),a(this,o,"f").fill(0),s(this,n,a(this,o,"f"),"f"),s(this,i,16,"f"),null==t&&(t=1),"number"==typeof t?this.setCounterValue(t):this.setCounterBytes(t)}get counter(){return new Uint8Array(a(this,o,"f"))}setCounterValue(e){if(!Number.isInteger(e)||e<0||e>Number.MAX_SAFE_INTEGER)throw new TypeError("invalid counter initial integer value");for(let t=15;t>=0;--t)a(this,o,"f")[t]=e%256,e=Math.floor(e/256)}setCounterBytes(e){if(16!==e.length)throw new TypeError("invalid counter initial Uint8Array value length");a(this,o,"f").set(e)}increment(){for(let e=15;e>=0;e--){if(255!==a(this,o,"f")[e]){a(this,o,"f")[e]++;break}a(this,o,"f")[e]=0}}encrypt(e){var t,r;const u=new Uint8Array(e);for(let e=0;e<u.length;e++)16===a(this,i,"f")&&(s(this,n,this.aes.encrypt(a(this,o,"f")),"f"),s(this,i,0,"f"),this.increment()),u[e]^=a(this,n,"f")[(s(this,i,(r=a(this,i,"f"),t=r++,r),"f"),t)];return u}decrypt(e){return this.encrypt(e)}}t.CTR=c,n=new WeakMap,i=new WeakMap,o=new WeakMap},24605:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`positive integer expected, not ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`boolean expected, not ${e}`)}function i(e){return e instanceof Uint8Array||null!=e&&"object"==typeof e&&"Uint8Array"===e.constructor.name}function o(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error(`Uint8Array expected of length ${t}, not of length=${e.length}`)}function s(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("hash must be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function a(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function u(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=t.isBytes=void 0,t.number=r,t.bool=n,t.isBytes=i,t.bytes=o,t.hash=s,t.exists=a,t.output=u;const c={number:r,bool:n,bytes:o,hash:s,exists:a,output:u};t.default=c},24669:(e,t,r)=>{var n=t;n.der=r(70082),n.pem=r(90735)},24967:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNegativeLE=void 0,t.mod=f,t.pow=function(e,t,r){return m(A(r),e,t)},t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=h,t.tonelliShanks=g,t.FpSqrt=b,t.validateField=function(e){const t=y.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"number",BITS:"number"});return(0,n._validateObject)(e,t),e},t.FpPow=m,t.FpInvertBatch=v,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?h(r,e.ORDER):e.inv(r))},t.FpLegendre=w,t.FpIsSquare=function(e,t){return 1===w(e,t)},t.nLength=E,t.Field=A,t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=E(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error("hashToPrivateScalar: expected "+s+"-1024 bytes of input, got "+i);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=_,t.getMinHashLength=S,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=_(t),a=S(t);if(i<16||i<a||i>1024)throw new Error("expected "+a+"-1024 bytes of input, got "+i);const u=f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(u,s):(0,n.numberToBytesBE)(u,s)};const n=r(58627),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t){if(e===i)throw new Error("invert: expected non-zero number");if(t<=i)throw new Error("invert: expected positive modulus, got "+t);let r=f(e,t),n=t,s=i,a=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=s-u*e,o=a-c*e;n=r,r=t,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function d(e,t){const r=(e.ORDER+o)/u,n=e.pow(t,r);if(!e.eql(e.sqr(n),t))throw new Error("Cannot find square root");return n}function p(e,t){const r=(e.ORDER-c)/l,n=e.mul(t,s),i=e.pow(n,r),o=e.mul(t,i),a=e.mul(e.mul(o,s),i),u=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),t))throw new Error("Cannot find square root");return u}function g(e){if(e<BigInt(3))throw new Error("sqrt is not defined for small field");let t=e-o,r=0;for(;t%s===i;)t/=s,r++;let n=s;const a=A(e);for(;1===w(a,n);)if(n++>1e3)throw new Error("Cannot find square root: probably non-prime P");if(1===r)return d;let u=a.pow(n,t);const c=(t+o)/s;return function(e,n){if(e.is0(n))return n;if(1!==w(e,n))throw new Error("Cannot find square root");let i=r,s=e.mul(e.ONE,u),a=e.pow(n,t),l=e.pow(n,c);for(;!e.eql(a,e.ONE);){if(e.is0(a))return e.ZERO;let t=1,r=e.sqr(a);for(;!e.eql(r,e.ONE);)if(t++,r=e.sqr(r),t===i)throw new Error("Cannot find square root");const n=o<<BigInt(i-t-1),u=e.pow(s,n);i=t,s=e.sqr(u),a=e.mul(a,s),l=e.mul(l,u)}return l}}function b(e){return e%u===a?d:e%l===c?p:g(e)}t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const y=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function m(e,t,r){if(r<i)throw new Error("invalid exponent, negatives unsupported");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function v(e,t,r=!1){const n=new Array(t.length).fill(r?e.ZERO:void 0),i=t.reduce(((t,r,i)=>e.is0(r)?t:(n[i]=t,e.mul(t,r))),e.ONE),o=e.inv(i);return t.reduceRight(((t,r,i)=>e.is0(r)?t:(n[i]=e.mul(t,n[i]),e.mul(t,r))),o),n}function w(e,t){const r=(e.ORDER-o)/s,n=e.pow(t,r),i=e.eql(n,e.ONE),a=e.eql(n,e.ZERO),u=e.eql(n,e.neg(e.ONE));if(!i&&!a&&!u)throw new Error("invalid Legendre symbol result");return i?1:a?0:-1}function E(e,t){void 0!==t&&(0,n.anumber)(t);const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function A(e,t,r=!1,s={}){if(e<=i)throw new Error("invalid field: expected ORDER > 0, got "+e);let a,u;if("object"==typeof t&&null!=t){if(s.sqrt||r)throw new Error("cannot specify opts in two arguments");const e=t;e.BITS&&(a=e.BITS),e.sqrt&&(u=e.sqrt),"boolean"==typeof e.isLE&&(r=e.isLE)}else"number"==typeof t&&(a=t),s.sqrt&&(u=s.sqrt);const{nBitLength:c,nByteLength:l}=E(e,a);if(l>2048)throw new Error("invalid field: expected ORDER of <= 2048 bytes");let d;const p=Object.freeze({ORDER:e,isLE:r,BITS:c,BYTES:l,MASK:(0,n.bitMask)(c),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isValidNot0:e=>!p.is0(e)&&p.isValid(e),isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>m(p,e,t),div:(t,r)=>f(t*h(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>h(t,e),sqrt:u||(t=>(d||(d=b(e)),d(p,t))),toBytes:e=>r?(0,n.numberToBytesLE)(e,l):(0,n.numberToBytesBE)(e,l),fromBytes:e=>{if(e.length!==l)throw new Error("Field.fromBytes: expected "+l+" bytes, got "+e.length);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)},invertBatch:e=>v(p,e),cmov:(e,t,r)=>r?t:e});return Object.freeze(p)}function _(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function S(e){const t=_(e);return t+Math.ceil(t/2)}},25145:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},25255:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroHash=void 0,t.ZeroHash="0x0000000000000000000000000000000000000000000000000000000000000000"},25382:(e,t,r)=>{"use strict";var n=r(65606),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var o=r(45412),s=r(16708);r(56698)(l,o);for(var a=i(s.prototype),u=0;u<a.length;u++){var c=a[u];l.prototype[c]||(l.prototype[c]=s.prototype[c])}function l(e){if(!(this instanceof l))return new l(e);o.call(this,e),s.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||n.nextTick(h,this)}function h(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},25456:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scryptSync=t.scrypt=void 0;const n=r(9462),i=r(75347);let o=!1,s=!1;const a=async function(e,t,r,i,o,s,a){return await(0,n.scryptAsync)(e,t,{N:r,r:i,p:o,dkLen:s,onProgress:a})},u=function(e,t,r,i,o,s){return(0,n.scrypt)(e,t,{N:r,r:i,p:o,dkLen:s})};let c=a,l=u;async function f(e,t,r,n,o,s,a){const u=(0,i.getBytes)(e,"passwd"),l=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(await c(u,l,r,n,o,s,a))}function h(e,t,r,n,o,s){const a=(0,i.getBytes)(e,"passwd"),u=(0,i.getBytes)(t,"salt");return(0,i.hexlify)(l(a,u,r,n,o,s))}t.scrypt=f,f._=a,f.lock=function(){s=!0},f.register=function(e){if(s)throw new Error("scrypt is locked");c=e},Object.freeze(f),t.scryptSync=h,h._=u,h.lock=function(){o=!0},h.register=function(e){if(o)throw new Error("scryptSync is locked");l=e},Object.freeze(h)},25799:(e,t,r)=>{var n=r(530),i=r(92356),o=r(92861).Buffer,s=r(50650),a=r(56168),u=r(50462),c=r(68078);function l(e,t,r){a.call(this),this._cache=new h,this._cipher=new u.AES(t),this._prev=o.from(r),this._mode=e,this._autopadding=!0}r(56698)(l,a),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get();)r=this._mode.encrypt(this,t),n.push(r);return o.concat(n)};var f=o.alloc(16,16);function h(){this.cache=o.allocUnsafe(0)}function d(e,t,r){var a=n[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof t&&(t=o.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);if("string"==typeof r&&(r=o.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);return"stream"===a.type?new s(a.module,t,r):"auth"===a.type?new i(a.module,t,r):new l(a.module,t,r)}l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return e=this._mode.encrypt(this,e),this._cipher.scrub(),e;if(!e.equals(f))throw this._cipher.scrub(),new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},h.prototype.add=function(e){this.cache=o.concat([this.cache,e])},h.prototype.get=function(){if(this.cache.length>15){var e=this.cache.slice(0,16);return this.cache=this.cache.slice(16),e}return null},h.prototype.flush=function(){for(var e=16-this.cache.length,t=o.allocUnsafe(e),r=-1;++r<e;)t.writeUInt8(e,r);return o.concat([this.cache,t])},t.createCipheriv=d,t.createCipher=function(e,t){var r=n[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var i=c(t,!1,r.key,r.iv);return d(e,i.key,i.iv)}},25892:(e,t,r)=>{var n=r(92861).Buffer,i=n.alloc(16,0);function o(e){var t=n.allocUnsafe(16);return t.writeUInt32BE(e[0]>>>0,0),t.writeUInt32BE(e[1]>>>0,4),t.writeUInt32BE(e[2]>>>0,8),t.writeUInt32BE(e[3]>>>0,12),t}function s(e){this.h=e,this.state=n.alloc(16,0),this.cache=n.allocUnsafe(0)}s.prototype.ghash=function(e){for(var t=-1;++t<e.length;)this.state[t]^=e[t];this._multiply()},s.prototype._multiply=function(){for(var e,t,r,n=[(e=this.h).readUInt32BE(0),e.readUInt32BE(4),e.readUInt32BE(8),e.readUInt32BE(12)],i=[0,0,0,0],s=-1;++s<128;){for(!!(this.state[~~(s/8)]&1<<7-s%8)&&(i[0]^=n[0],i[1]^=n[1],i[2]^=n[2],i[3]^=n[3]),r=!!(1&n[3]),t=3;t>0;t--)n[t]=n[t]>>>1|(1&n[t-1])<<31;n[0]=n[0]>>>1,r&&(n[0]=n[0]^225<<24)}this.state=o(i)},s.prototype.update=function(e){var t;for(this.cache=n.concat([this.cache,e]);this.cache.length>=16;)t=this.cache.slice(0,16),this.cache=this.cache.slice(16),this.ghash(t)},s.prototype.final=function(e,t){return this.cache.length&&this.ghash(n.concat([this.cache,i],16)),this.ghash(o([0,e,0,t])),this.state},e.exports=s},25897:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.secp256r1=t.p256=void 0;const n=r(67054);t.p256=n.p256,t.secp256r1=n.p256,t.hashToCurve=n.p256_hasher.hashToCurve,t.encodeToCurve=n.p256_hasher.encodeToCurve},26162:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(38664).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){l(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],l=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var b=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,b=0|s[2],y=8191&b,m=b>>>13,v=0|s[3],w=8191&v,E=v>>>13,A=0|s[4],_=8191&A,S=A>>>13,P=0|s[5],k=8191&P,O=P>>>13,x=0|s[6],M=8191&x,B=x>>>13,T=0|s[7],I=8191&T,C=T>>>13,R=0|s[8],N=8191&R,j=R>>>13,U=0|s[9],L=8191&U,D=U>>>13,F=0|a[0],H=8191&F,z=F>>>13,q=0|a[1],G=8191&q,W=q>>>13,V=0|a[2],K=8191&V,$=V>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,le=0|a[8],fe=8191&le,he=le>>>13,de=0|a[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(g,H)|0,o=Math.imul(g,z);var ye=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,z))+Math.imul(m,H)|0,o=Math.imul(m,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,W)|0;var me=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(E,H)|0,o=Math.imul(E,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var ve=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,Z)|0;var we=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,H),i=(i=Math.imul(k,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,$)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ee=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(B,H)|0,o=Math.imul(B,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var Ae=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var _e=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,z))+Math.imul(D,H)|0,o=Math.imul(D,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,he)|0;var Pe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,W))+Math.imul(D,G)|0,o=Math.imul(D,W),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0;var ke=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,he)|0;var Oe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,he)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0;var Me=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0;var Be=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,he)|0;var Te=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ge)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,he))+Math.imul(D,fe)|0,o=Math.imul(D,he);var Ce=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ge))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ge))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=we,u[5]=Ee,u[6]=Ae,u[7]=_e,u[8]=Se,u[9]=Pe,u[10]=ke,u[11]=Oe,u[12]=xe,u[13]=Me,u[14]=Be,u[15]=Te,u[16]=Ie,u[17]=Ce,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,f=(0|e.words[l])*(0|t.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],g=n[l+d],b=r[l+d+s],y=n[l+d+s],m=f*b-h*y;y=f*y+h*b,b=m,r[l+d]=p+b,n[l+d]=g+y,r[l+d+s]=p-b,n[l+d+s]=g-y,d!==a&&(m=u*f-c*h,h=u*h+c*f,f=m)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function E(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}E.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},E.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(e,t){e.iushrn(this.n,0,t)},E.prototype.imulK=function(e){return e.imul(this.k)},i(A,E),A.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},A.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,E),i(S,E),i(P,E),P.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new _;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new P}return w[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var g=d,b=0;0!==g.cmp(a);b++)g=g.redSqr();n(b<p);var y=this.pow(f,new o(1).iushln(p-b-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=b}return h},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,k),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},26245:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MessagePrefix=t.EtherSymbol=void 0,t.EtherSymbol="Ξ",t.MessagePrefix="Ethereum Signed Message:\n"},26248:(e,t,r)=>{"use strict";var n=r(33225),i=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var o=Object.create(r(15622));o.inherits=r(56698);var s=r(30206),a=r(7314);o.inherits(f,s);for(var u=i(a.prototype),c=0;c<u.length;c++){var l=u[c];f.prototype[l]||(f.prototype[l]=a.prototype[l])}function f(e){if(!(this instanceof f))return new f(e);s.call(this,e),a.call(this,e),e&&!1===e.readable&&(this.readable=!1),e&&!1===e.writable&&(this.writable=!1),this.allowHalfOpen=!0,e&&!1===e.allowHalfOpen&&(this.allowHalfOpen=!1),this.once("end",h)}function h(){this.allowHalfOpen||this._writableState.ended||n.nextTick(d,this)}function d(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}}),f.prototype._destroy=function(e,t){this.push(null),this.end(),n.nextTick(t,e)}},26404:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.popNumber=t.popScheduler=t.popResultSelector=void 0;var n=r(10281),i=r(68596);function o(e){return e[e.length-1]}t.popResultSelector=function(e){return n.isFunction(o(e))?e.pop():void 0},t.popScheduler=function(e){return i.isScheduler(o(e))?e.pop():void 0},t.popNumber=function(e,t){return"number"==typeof o(e)?e.pop():t}},26481:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(95184),i=r(74224),o=new Uint8Array([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),s=Uint8Array.from({length:16},((e,t)=>t));let a=[s],u=[s.map((e=>(9*e+5)%16))];for(let e=0;e<4;e++)for(let t of[a,u])t.push(t[e].map((e=>o[e])));const c=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>new Uint8Array(e))),l=a.map(((e,t)=>e.map((e=>c[t][e])))),f=u.map(((e,t)=>e.map((e=>c[t][e])))),h=new Uint32Array([0,1518500249,1859775393,2400959708,2840853838]),d=new Uint32Array([1352829926,1548603684,1836072691,2053994217,0]),p=(e,t)=>e<<t|e>>>32-t;function g(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const b=new Uint32Array(16);class y extends n.SHA2{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)b[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,i=0|this.h1,o=i,s=0|this.h2,c=s,y=0|this.h3,m=y,v=0|this.h4,w=v;for(let e=0;e<5;e++){const t=4-e,E=h[e],A=d[e],_=a[e],S=u[e],P=l[e],k=f[e];for(let t=0;t<16;t++){const n=p(r+g(e,i,s,y)+b[_[t]]+E,P[t])+v|0;r=v,v=y,y=0|p(s,10),s=i,i=n}for(let e=0;e<16;e++){const r=p(n+g(t,o,c,m)+b[S[e]]+A,k[e])+w|0;n=w,w=m,m=0|p(c,10),c=o,o=r}}this.set(this.h1+s+m|0,this.h2+y+w|0,this.h3+v+n|0,this.h4+r+o|0,this.h0+i+c|0)}roundClean(){b.fill(0)}destroy(){this.destroyed=!0,this.buffer.fill(0),this.set(0,0,0,0,0)}}t.RIPEMD160=y,t.ripemd160=(0,i.wrapConstructor)((()=>new y))},26569:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishLast=void 0;var n=r(5130),i=r(14359);t.publishLast=function(){return function(e){var t=new n.AsyncSubject;return new i.ConnectableObservable(e,(function(){return t}))}}},26680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwError=void 0;var n=r(48051),i=r(10281);t.throwError=function(e,t){var r=i.isFunction(e)?e:function(){return e},o=function(e){return e.error(r())};return new n.Observable(t?function(e){return t.schedule(o,0,e)}:o)}},26710:(e,t,r)=>{var n=r(56698),i=r(24107),o=r(90392),s=r(92861).Buffer,a=new Array(64);function u(){this.init(),this._w=a,o.call(this,64,56)}n(u,i),u.prototype.init=function(){return this._a=3238371032,this._b=914150663,this._c=812702999,this._d=4144912697,this._e=4290775857,this._f=1750603025,this._g=1694076839,this._h=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(28);return e.writeInt32BE(this._a,0),e.writeInt32BE(this._b,4),e.writeInt32BE(this._c,8),e.writeInt32BE(this._d,12),e.writeInt32BE(this._e,16),e.writeInt32BE(this._f,20),e.writeInt32BE(this._g,24),e},e.exports=u},26744:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairwise=void 0;var n=r(65212),i=r(17214);t.pairwise=function(){return n.operate((function(e,t){var r,n=!1;e.subscribe(i.createOperatorSubscriber(t,(function(e){var i=r;r=e,n&&t.next([i,e]),n=!0})))}))}},26749:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zip=void 0;var o=r(11415),s=r(65212);t.zip=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.operate((function(t,r){o.zip.apply(void 0,i([t],n(e))).subscribe(r)}))}},26872:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.map=void 0;var n=r(65212),i=r(17214);t.map=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){n.next(e.call(t,r,o++))})))}))}},26920:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromEventPattern=void 0;var n=r(48051),i=r(10281),o=r(13916);t.fromEventPattern=function e(t,r,s){return s?e(t,r).pipe(o.mapOneOrManyArgs(s)):new n.Observable((function(e){var n=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1===t.length?t[0]:t)},o=t(n);return i.isFunction(r)?function(){return r(n,o)}:void 0}))}},27302:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const u={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=u},27698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EventPayload=void 0;const n=r(8166);t.EventPayload=class{filter;emitter;#b;constructor(e,t,r){this.#b=t,(0,n.defineProperties)(this,{emitter:e,filter:r})}async removeListener(){null!=this.#b&&await this.emitter.off(this.filter,this.#b)}}},27816:(e,t,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<30|e>>>2}function l(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,f=0;f<16;++f)r[f]=e.readInt32BE(4*f);for(;f<80;++f)r[f]=r[f-3]^r[f-8]^r[f-14]^r[f-16];for(var h=0;h<80;++h){var d=~~(h/20),p=0|((t=n)<<5|t>>>27)+l(d,i,o,a)+u+r[h]+s[d];u=a,a=o,o=c(i),i=n,n=p}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},27966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FilterIdPendingSubscriber=t.FilterIdEventSubscriber=t.FilterIdSubscriber=void 0;const n=r(75347),i=r(34338);class o{#y;#m;#v;#w;#E;#A;constructor(e){this.#y=e,this.#m=null,this.#v=this.#_.bind(this),this.#w=!1,this.#E=null,this.#A=!1}_subscribe(e){throw new Error("subclasses must override this")}_emitResults(e,t){throw new Error("subclasses must override this")}_recover(e){throw new Error("subclasses must override this")}async#_(e){try{null==this.#m&&(this.#m=this._subscribe(this.#y));let e=null;try{e=await this.#m}catch(e){if(!(0,n.isError)(e,"UNSUPPORTED_OPERATION")||"eth_newFilter"!==e.operation)throw e}if(null==e)return this.#m=null,void this.#y._recoverSubscriber(this,this._recover(this.#y));const t=await this.#y.getNetwork();if(this.#E||(this.#E=t),this.#E.chainId!==t.chainId)throw new Error("chaid changed");if(this.#A)return;const r=await this.#y.send("eth_getFilterChanges",[e]);await this._emitResults(this.#y,r)}catch(e){console.log("@TODO",e)}this.#y.once("block",this.#v)}#S(){const e=this.#m;e&&(this.#m=null,e.then((e=>{this.#y.destroyed||this.#y.send("eth_uninstallFilter",[e])})))}start(){this.#w||(this.#w=!0,this.#_(-2))}stop(){this.#w&&(this.#w=!1,this.#A=!0,this.#S(),this.#y.off("block",this.#v))}pause(e){e&&this.#S(),this.#y.off("block",this.#v)}resume(){this.start()}}t.FilterIdSubscriber=o,t.FilterIdEventSubscriber=class extends o{#P;constructor(e,t){var r;super(e),this.#P=(r=t,JSON.parse(JSON.stringify(r)))}_recover(e){return new i.PollingEventSubscriber(e,this.#P)}async _subscribe(e){return await e.send("eth_newFilter",[this.#P])}async _emitResults(e,t){for(const r of t)e.emit(this.#P,e._wrapLog(r,e._network))}},t.FilterIdPendingSubscriber=class extends o{async _subscribe(e){return await e.send("eth_newPendingTransactionFilter",[])}async _emitResults(e,t){for(const r of t)e.emit("pending",r)}}},28156:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.ShogunCore=t.GunInstance=t.GunErrors=t.derive=t.crypto=t.GunRxJS=t.Gun=t.SEA=void 0;const o=r(14134),s=r(45628),a=r(23358),u=r(4643),c=r(50074),l=r(4933),f=r(48098),h=r(48050),d=r(78371),p=r(58851);Object.defineProperty(t,"Gun",{enumerable:!0,get:function(){return p.Gun}}),Object.defineProperty(t,"SEA",{enumerable:!0,get:function(){return p.SEA}}),Object.defineProperty(t,"GunInstance",{enumerable:!0,get:function(){return p.GunInstance}}),Object.defineProperty(t,"GunRxJS",{enumerable:!0,get:function(){return p.GunRxJS}}),Object.defineProperty(t,"crypto",{enumerable:!0,get:function(){return p.crypto}}),Object.defineProperty(t,"derive",{enumerable:!0,get:function(){return p.derive}}),Object.defineProperty(t,"GunErrors",{enumerable:!0,get:function(){return p.GunErrors}}),i(r(23358),t),i(r(5307),t),i(r(50074),t);class g{static API_VERSION="^1.5.1";gundb;storage;provider;config;rx;_gun;_user=null;eventEmitter;plugins=new Map;currentAuthMethod;appToken;constructor(e){if((0,s.log)("[index] Initializing Shogun "+g.API_VERSION),this.config=e,this.storage=new u.ShogunStorage,this.eventEmitter=new o.EventEmitter,e.logging&&(0,s.configureLogging)(e.logging),a.ErrorHandler.addListener((e=>{this.eventEmitter.emit("error",{action:e.code,message:e.message,type:e.type})})),e.authToken&&(0,p.restrictedPut)(p.Gun,e.authToken),!e.oauth)throw new Error("App token is required for OAuth plugin");if(e.appToken&&e.appToken.length<8)throw new Error("App token must be 8 characters long");this.appToken=e.appToken;try{e.gunInstance?this._gun=e.gunInstance:this._gun=(0,p.Gun)({peers:e.peers||[],radisk:!0,file:"radata"})}catch(e){throw(0,s.logError)("Error creating Gun instance:",e),new Error(`Failed to create Gun instance: ${e}`)}try{this.gundb=new p.GunInstance(this._gun,e.scope||""),this._gun=this.gundb.gun,this.setupGunEventForwarding()}catch(e){throw(0,s.logError)("Error initializing GunInstance:",e),new Error(`Failed to initialize GunInstance: ${e}`)}try{this._user=this._gun.user()}catch(e){throw(0,s.logError)("Error initializing Gun user:",e),new Error(`Failed to initialize Gun user: ${e}`)}if(this._gun.on("auth",(e=>{(0,s.log)("[index] [INDEX}Gun auth event received",e),this._user=this._gun.user(),this.eventEmitter.emit("auth:login",{pub:e.pub,alias:e.alias,method:"recall"})})),this.rx=new p.GunRxJS(this._gun),this.registerBuiltinPlugins(e),e.plugins?.autoRegister&&e.plugins.autoRegister.length>0)for(const t of e.plugins.autoRegister)try{this.register(t)}catch(e){(0,s.logError)(`Failed to auto-register plugin ${t.name}:`,e)}"undefined"!=typeof window?(window.ShogunCore=this,window.ShogunDB=this.gundb,window.ShogunGun=this.gundb.gun):void 0!==r.g&&(r.g.ShogunCore=this,r.g.ShogunDB=this.gundb,r.g.ShogunGun=this.gundb.gun),(0,s.log)("[index] Shogun initialized! 🚀")}get gun(){return this._gun}get user(){return this._user}setupGunEventForwarding(){["put","get","set","remove"].forEach((e=>{this.gundb.on(e,(t=>{this.eventEmitter.emit(e,t)}))})),["add","remove","connect","disconnect"].forEach((e=>{this.gundb.on(e,(t=>{this.eventEmitter.emit(e,t)}))})),(0,s.log)("[index] Gun event forwarding setup completed")}registerBuiltinPlugins(e){try{if(e.webauthn?.enabled){const e=new l.WebauthnPlugin;e._category=c.PluginCategory.Authentication,this.register(e),(0,s.log)("[index] Webauthn plugin registered")}if(e.web3?.enabled){const e=new f.Web3ConnectorPlugin;e._category=c.PluginCategory.Authentication,this.register(e),(0,s.log)("[index] Web3Connector plugin registered")}if(e.nostr?.enabled){const e=new h.NostrConnectorPlugin;e._category=c.PluginCategory.Authentication,this.register(e),(0,s.log)("[index] NostrConnector plugin registered")}if(e.oauth?.enabled){const t=new d.OAuthPlugin;t._category=c.PluginCategory.Authentication,t.configure(e.oauth),this.register(t),(0,s.log)("[index] OAuth plugin registered with providers:",e.oauth.providers)}}catch(e){(0,s.logError)("Error registering builtin plugins:",e)}}register(e){if(this.plugins.has(e.name))throw new Error(`Plugin with name "${e.name}" already registered`);if(e.name===c.CorePlugins.OAuth){if(!this.appToken)throw new Error("App token is required for OAuth plugin");e.initialize(this,this.appToken)}else e.initialize(this);this.plugins.set(e.name,e),(0,s.log)(`Registered plugin: ${e.name}`)}unregister(e){const t=this.plugins.get(e);t?(t.destroy&&t.destroy(),this.plugins.delete(e),(0,s.log)(`Unregistered plugin: ${e}`)):(0,s.log)(`Plugin "${e}" not found, nothing to unregister`)}getPlugin(e){return this.plugins.get(e)}hasPlugin(e){return this.plugins.has(e)}getPluginsByCategory(e){const t=[];return this.plugins.forEach((r=>{r._category===e&&t.push(r)})),t}getAuthenticationMethod(e){switch(e){case"webauthn":return this.getPlugin(c.CorePlugins.WebAuthn);case"web3":return this.getPlugin(c.CorePlugins.Web3);case"nostr":return this.getPlugin(c.CorePlugins.Nostr);case"oauth":return this.getPlugin(c.CorePlugins.OAuth);default:return{login:(e,t)=>{this.login(e,t)},signUp:(e,t,r)=>{this.signUp(e,t,r)}}}}getRecentErrors(e=10){return a.ErrorHandler.getRecentErrors(e)}configureLogging(e){(0,s.configureLogging)(e),(0,s.log)("[index] Logging reconfigured with new settings")}isLoggedIn(){return this.gundb.isLoggedIn()}logout(){try{if(!this.isLoggedIn())return void(0,s.log)("[index] Logout ignored: user not authenticated");this.gundb.logout(),this.eventEmitter.emit("auth:logout",{}),(0,s.log)("[index] Logout completed successfully")}catch(e){a.ErrorHandler.handle(a.ErrorType.AUTHENTICATION,"LOGOUT_FAILED",e instanceof Error?e.message:"Error during logout",e)}}async login(e,t,r){(0,s.log)("[index] Login");try{(0,s.log)(`Login attempt for user: ${e}`),this.currentAuthMethod||(this.currentAuthMethod="password",(0,s.log)("[index] Authentication method set to default: password"));const n=await this.gundb.login(e,t,r);return n.success?(this.eventEmitter.emit("auth:login",{userPub:n.userPub??""}),(0,s.log)(`Current auth method before wallet check: ${this.currentAuthMethod}`)):n.error=n.error||"Wrong user or password",n}catch(e){return a.ErrorHandler.handle(a.ErrorType.AUTHENTICATION,"LOGIN_FAILED",e.message??"Unknown error during login",e),{success:!1,error:e.message??"Unknown error during login"}}}async signUp(e,t,r,n){(0,s.log)("[index] Sign up");try{if(void 0!==r&&t!==r&&!n)return{success:!1,error:"Passwords do not match"};this.eventEmitter.emit("debug",{action:"signup_start",username:e,timestamp:Date.now()}),(0,s.log)(`Attempting user registration: ${e}`);const i=await this.gundb.signUp(e,t,n);return i.success?(this.eventEmitter.emit("debug",{action:"signup_complete",username:e,userPub:i.userPub,timestamp:Date.now()}),this.eventEmitter.emit("auth:signup",{userPub:i.userPub??"",username:e})):this.eventEmitter.emit("debug",{action:"signup_failed",username:e,error:i.error,timestamp:Date.now()}),i}catch(t){return(0,s.logError)(`Error during registration for user ${e}:`,t),this.eventEmitter.emit("debug",{action:"signup_exception",username:e,error:t.message||"Unknown error",timestamp:Date.now()}),{success:!1,error:t.message??"Unknown error during registration"}}}emit(e,t){return this.eventEmitter.emit(e,t)}on(e,t){return this.eventEmitter.on(e,t),this}once(e,t){return this.eventEmitter.once(e,t),this}off(e,t){return this.eventEmitter.off(e,t),this}removeAllListeners(e){return this.eventEmitter.removeAllListeners(e),this}setAuthMethod(e){(0,s.log)(`Setting authentication method from '${this.currentAuthMethod}' to '${e}'`),this.currentAuthMethod=e,(0,s.log)(`Authentication method successfully set to: ${e}`)}getAuthMethod(){return this.currentAuthMethod}clearAllStorageData(){this.gundb.clearAllStorageData()}getIsLoggedIn(){return!!this.user?.is}}t.ShogunCore=g,t.default=g,"undefined"!=typeof window&&(window.ShogunCoreClass=g),"undefined"!=typeof window&&(window.initShogun=e=>{const t=new g(e);return window.ShogunCore=t,t})},28399:(e,t,r)=>{(t=e.exports=r(45412)).Stream=t,t.Readable=t,t.Writable=r(16708),t.Duplex=r(25382),t.Transform=r(74610),t.PassThrough=r(63600),t.finished=r(86238),t.pipeline=r(57758)},28545:(e,t,r)=>{"use strict";var n=r(39404),i=r(47011),o=i.assert;function s(e,t){if(e instanceof s)return e;this._importDER(e,t)||(o(e.r&&e.s,"Signature without r or s"),this.r=new n(e.r,16),this.s=new n(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}function a(){this.place=0}function u(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;if(0===e[t.place])return!1;for(var i=0,o=0,s=t.place;o<n;o++,s++)i<<=8,i|=e[s],i>>>=0;return!(i<=127)&&(t.place=s,i)}function c(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t<r;)t++;return 0===t?e:e.slice(t)}function l(e,t){if(t<128)e.push(t);else{var r=1+(Math.log(t)/Math.LN2>>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}e.exports=s,s.prototype._importDER=function(e,t){e=i.toArray(e,t);var r=new a;if(48!==e[r.place++])return!1;var o=u(e,r);if(!1===o)return!1;if(o+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var s=u(e,r);if(!1===s)return!1;if(128&e[r.place])return!1;var c=e.slice(r.place,s+r.place);if(r.place+=s,2!==e[r.place++])return!1;var l=u(e,r);if(!1===l)return!1;if(e.length!==l+r.place)return!1;if(128&e[r.place])return!1;var f=e.slice(r.place,l+r.place);if(0===c[0]){if(!(128&c[1]))return!1;c=c.slice(1)}if(0===f[0]){if(!(128&f[1]))return!1;f=f.slice(1)}return this.r=new n(c),this.s=new n(f),this.recoveryParam=null,!0},s.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=c(t),r=c(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];l(n,t.length),(n=n.concat(t)).push(2),l(n,r.length);var o=n.concat(r),s=[48];return l(s,o.length),s=s.concat(o),i.encode(s,e)}},28619:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.executeSchedule=void 0,t.executeSchedule=function(e,t,r,n,i){void 0===n&&(n=0),void 0===i&&(i=!1);var o=t.schedule((function(){r(),i?e.add(this.schedule(null,n)):this.unsubscribe()}),n);if(e.add(o),!i)return o}},28817:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.QuickNodeProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371),a="919b412a057b5e9c9b6dce193c5a60242d6efadb";class u extends s.JsonRpcProvider{token;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{token:t})}_getProvider(e){try{return new u(e,this.token)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.token===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethers.quiknode.pro";case"goerli":return"ethers.ethereum-goerli.quiknode.pro";case"sepolia":return"ethers.ethereum-sepolia.quiknode.pro";case"holesky":return"ethers.ethereum-holesky.quiknode.pro";case"arbitrum":return"ethers.arbitrum-mainnet.quiknode.pro";case"arbitrum-goerli":return"ethers.arbitrum-goerli.quiknode.pro";case"arbitrum-sepolia":return"ethers.arbitrum-sepolia.quiknode.pro";case"base":return"ethers.base-mainnet.quiknode.pro";case"base-goerli":return"ethers.base-goerli.quiknode.pro";case"base-spolia":return"ethers.base-sepolia.quiknode.pro";case"bnb":return"ethers.bsc.quiknode.pro";case"bnbt":return"ethers.bsc-testnet.quiknode.pro";case"matic":return"ethers.matic.quiknode.pro";case"matic-mumbai":return"ethers.matic-testnet.quiknode.pro";case"optimism":return"ethers.optimism.quiknode.pro";case"optimism-goerli":return"ethers.optimism-goerli.quiknode.pro";case"optimism-sepolia":return"ethers.optimism-sepolia.quiknode.pro";case"xdai":return"ethers.xdai.quiknode.pro"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("QuickNodeProvider"),!0)),r}}t.QuickNodeProvider=u},28902:(e,t,r)=>{var n=r(78170),i=r(53209),o=r(47108),s=r(48206),a=r(52061),u=r(39404),c=r(99247),l=r(67332),f=r(92861).Buffer;e.exports=function(e,t,r){var h;h=e.padding?e.padding:r?1:4;var d,p=n(e);if(4===h)d=function(e,t){var r=e.modulus.byteLength(),n=t.length,c=o("sha1").update(f.alloc(0)).digest(),l=c.length,h=2*l;if(n>r-h-2)throw new Error("message too long");var d=f.alloc(r-n-h-2),p=r-l-1,g=i(l),b=a(f.concat([c,d,f.alloc(1,1),t],p),s(g,p)),y=a(g,s(b,l));return new u(f.concat([f.alloc(1),y,b],r))}(p,t);else if(1===h)d=function(e,t,r){var n,o=t.length,s=e.modulus.byteLength();if(o>s-11)throw new Error("message too long");return n=r?f.alloc(s-o-3,255):function(e){for(var t,r=f.allocUnsafe(e),n=0,o=i(2*e),s=0;n<e;)s===o.length&&(o=i(2*e),s=0),(t=o[s++])&&(r[n++]=t);return r}(s-o-3),new u(f.concat([f.from([0,r?1:2]),n,f.alloc(1),t],s))}(p,t,r);else{if(3!==h)throw new Error("unknown padding");if((d=new u(t)).cmp(p.modulus)>=0)throw new Error("data too long for modulus")}return r?l(d,p):c(d,p)}},28948:(e,t,r)=>{"use strict";var n=r(67426),i=r(43349);function o(e,t,r){if(!(this instanceof o))return new o(e,t,r);this.Hash=e,this.blockSize=e.blockSize/8,this.outSize=e.outSize/8,this.inner=null,this.outer=null,this._init(n.toArray(t,r))}e.exports=o,o.prototype._init=function(e){e.length>this.blockSize&&(e=(new this.Hash).update(e).digest()),i(e.length<=this.blockSize);for(var t=e.length;t<this.blockSize;t++)e.push(0);for(t=0;t<e.length;t++)e[t]^=54;for(this.inner=(new this.Hash).update(e),t=0;t<e.length;t++)e[t]^=106;this.outer=(new this.Hash).update(e)},o.prototype.update=function(e,t){return this.inner.update(e,t),this},o.prototype.digest=function(e){return this.outer.update(this.inner.digest()),this.outer.digest(e)}},28996:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowToggle=void 0;var i=r(76808),o=r(69879),s=r(65212),a=r(19724),u=r(17214),c=r(5717),l=r(54830);t.windowToggle=function(e,t){return s.operate((function(r,s){var f=[],h=function(e){for(;0<f.length;)f.shift().error(e);s.error(e)};a.innerFrom(e).subscribe(u.createOperatorSubscriber(s,(function(e){var r=new i.Subject;f.push(r);var n,d=new o.Subscription;try{n=a.innerFrom(t(e))}catch(e){return void h(e)}s.next(r.asObservable()),d.add(n.subscribe(u.createOperatorSubscriber(s,(function(){l.arrRemove(f,r),r.complete(),d.unsubscribe()}),c.noop,h)))}),c.noop)),r.subscribe(u.createOperatorSubscriber(s,(function(e){var t,r,i=f.slice();try{for(var o=n(i),s=o.next();!s.done;s=o.next())s.value.next(e)}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}}),(function(){for(;0<f.length;)f.shift().complete();s.complete()}),h,(function(){for(;0<f.length;)f.shift().unsubscribe()})))}))}},29035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.findIndex=void 0;var n=r(65212),i=r(98183);t.findIndex=function(e,t){return n.operate(i.createFind(e,t,"index"))}},29512:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatMap=void 0;var n=r(67478),i=r(10281);t.concatMap=function(e,t){return i.isFunction(t)?n.mergeMap(e,t,1):n.mergeMap(e,1)}},29560:(e,t,r)=>{"use strict";t.utils=r(87626),t.Cipher=r(82808),t.DES=r(82211),t.CBC=r(3389),t.EDE=r(65279)},29617:(e,t,r)=>{!function(){function t(e){(e=e||{}).log=e.log||console.log,e.file=String(e.file||"radata");var n=(t.has||(t.has={}))[e.file];if(n)return n;function s(e){return encodeURIComponent(e).replace(/\*/g,"%2A")}e.max=e.max||.3*(e.memory?999*e.memory*999:3e8),e.until=e.until||e.wait||250,e.batch=e.batch||1e4,e.chunk=e.chunk||1048576,e.code=e.code||{},e.code.from=e.code.from||"!",e.jsonify=!0;var a=""+y==typeof setImmediate?setTimeout:setImmediate,u=setTimeout.turn||a,c=o.object,l=0;if(!e.store)return e.log("ERROR: Radisk needs `opt.store` interface with `{get: fn, put: fn (, list: fn)}`!");if(!e.store.put)return e.log("ERROR: Radisk needs `store.put` interface with `(file, data, cb)`!");if(!e.store.get)return e.log("ERROR: Radisk needs `store.get` interface with `(file, cb)`!");e.store.list,r(73968);var f=JSON.parseAsync||function(e,t,r){try{t(void 0,JSON.parse(e,r))}catch(e){t(e)}},h=(JSON.stringifyAsync,function(e,t,r,n,i){if("function"==typeof t){var o=r||{};return r=t,void h.read(e,r,o,i||n)}h.save(e,t,r,n,i)});h.save=function(t,r,n,i,a){var u,c,l={key:t,find:function(t){var r;l.file=t||(t=e.code.from),a&&(a=a[t]=a[t]||{}),a&&(a.sf=a.sf||+new Date),(r=h.disk[t])?l.mix(y,r):h.parse(t,l.mix,y,a)},mix:function(s,u){if(a&&(a.sml=+new Date),a&&(a.sm=a.sm||+new Date),l.err=s||l.err)n(s);else{var c,f=l.file=(u||"").file||l.file;if(!u&&f!==e.code.from)return h.find.bad(f),void h.save(t,r,n,i);(u=h.disk[f]||(h.disk[f]=u||o())).file||(u.file=f),e.compare&&(r=e.compare(u(t),r,t,f),y===r)?n(s,-1):((l.disk=u)(t,r),i&&((c=(c=u.tags||(u.tags={}))[i]||(c[i]=h.tags[i]||(h.tags[i]={})))[f]||(c[f]=h.one[i]||(h.one[i]=n)),n=null),a&&(a.st=a.st||+new Date),u.Q?n&&u.Q.push(n):(u.Q=n?[n]:[],u.to=setTimeout(l.write,e.until)))}},write:function(){a&&(a.sto=a.sto||+new Date);var e=u=l.file,t=l.disk;c=l.q=t.Q,l.tags=t.tags,delete t.Q,delete h.disk[e],delete t.tags,h.write(e,t,l.ack,y,a)},ack:function(e,t){var r,n;for(var i in a&&(a.sa=a.sa||+new Date),a&&(a.sal=c.length),h.tags)if(h.tags.hasOwnProperty(i)){var o=h.tags[i];if(!((n=h.disk[u])&&(n=n.tags)&&n[o])){var f;for(var d in r=o[u],delete o[u],o)if(o.hasOwnProperty(d)){f=!0;break}f||(delete h.tags[o],r&&r(e,t))}}!c&&(c="");for(var p=c.length,g=0,b=+new Date;g<p;g++)(r=c[g])&&r(e,t);console.STAT&&console.STAT(b,+new Date-b,"rad acks",s(l.file)),console.STAT&&console.STAT(b,c.length,"rad acks #",s(l.file))}};n||(n=function(e,t){}),h.find(t,l.find)},h.disk={},h.one={},h.tags={};var d,p,g,b=0;h.write=function(r,n,i,a,u){if(n){a="object"==typeof a?a:{force:a};var c,f,d=function(){};d.text="",d.file=r=n.file||(n.file=r),r?(d.write=function(){var t=n.raw=d.text;h.disk[r=n.file||d.file||r]=n;var o=+new Date;u&&(u.wd=o),h.find.add(r,(function(a){u&&(u.wa=+new Date),a?i(a):e.store.put(s(r),t,(function(e,t){u&&(u.wp=+new Date),console.STAT&&console.STAT(o,l=+new Date-o,"wrote disk",JSON.stringify(r),++b,"total all writes."),i(e,t||1),n.Q||delete h.disk[r]}))}))},d.split=function(){var e=+new Date;u&&(u.wf=e),d.text="",d.count||(d.count=0,o.map(n,(function(){d.count++}))),u&&(u.wfc=d.count),d.limit=Math.ceil(d.count/2);var t=d.count;return d.count=0,u&&(u.wf1=+new Date),d.sub=o(),o.map(n,d.slice,{reverse:1}),u&&(u.wf2=+new Date),h.write(d.end,d.sub,d.both,a),u&&(u.wf3=+new Date),d.hub=o(),o.map(n,d.stop),u&&(u.wf4=+new Date),h.write(n.file,d.hub,d.both,a),u&&(u.wf5=+new Date),console.STAT&&console.STAT(e,+new Date-e,"rad split",s(n.file),t),!0},d.slice=function(e,t){if(d.sub(d.end=t,e),d.limit<=++d.count)return!0},d.stop=function(e,t){if(t>=d.end)return!0;d.hub(t,e)},d.both=function(e,t){u&&(u.wfd=+new Date),f?i(e||f):c?i(e,t):(c=!0,f=e)},d.each=function(r,n,o,s){if(y!==r&&d.count++,e.max<=(r||"").length)return i("Data too big!"),!0;var u=t.encode(s.length)+"#"+t.encode(o)+(y===r?"":":"+t.encode(r))+"\n";if(e.chunk<d.text.length+u.length&&1<d.count&&!a.force)return d.split();d.text+=u},e.jsonify?h.write.jsonify(d,n,i,a,u):o.map(n,d.each,!0)||d.write()):i("What file?")}else i("No radix!")},h.write.jsonify=function(t,r,n,i,s){var a,u=+new Date;s&&(s.w=u);try{a=JSON.stringify(r.$)}catch(e){return void n("Cannot radisk!")}if(s&&(s.ws=+new Date),console.STAT&&console.STAT(u,+new Date-u,"rad stringified JSON"),e.chunk<a.length&&!i.force){var c=0;if(o.map(r,(function(){if(c++)return!0})),c>1)return t.split()}t.text=a,t.write()},h.range=function(e,t){if(e&&t){if(y===t.start&&y===t.end)return e;if(y!==(r=e)&&(!r||"object"!=typeof r))return e;var r,n=o();return o.map(e,(function(e,t){n(t,e)}),t),n("")}},h.read=function(t,r,n,i){n=n||{};var c={key:t,find:function(t){var r;c.file=t||(t=e.code.from),i&&(i=i[t]=i[t]||{}),i&&(i.rf=i.rf||+new Date),(r=h.disk[c.file=t])?c.check(y,r):h.parse(t,c.check,y,i)},get:function(s,u,l){if(i&&(i.rgl=+new Date),i&&(i.rg=i.rg||+new Date),c.err=s||c.err)r(s);else{var f=c.file=(u||"").file||c.file;if(!u&&f!==e.code.from)return h.find.bad(f),void h.read(t,r,n);if(u=h.disk[f]||(h.disk[f]=u)){u.file||(u.file=f);var d=h.range(u(t),n);if(i&&(i.rr=+new Date),n.unit=u.unit,n.chunks=(n.chunks||0)+1,n.parsed=(n.parsed||0)+((l||"").parsed||n.chunks*e.chunk),n.more=1,n.next=y,o.map(h.list,(function(e,t){if(e&&f!==t)return n.next=t,1}),n.reverse?{reverse:1,end:f}:{start:f}),i&&(i.rl=+new Date),n.next||(n.more=0),n.next&&(!n.reverse&&(t<n.next&&0!=n.next.indexOf(t)||y!==n.end&&(n.end||"￿")<n.next)&&(n.more=0),n.reverse&&(t>n.next&&0!=t.indexOf(n.next)||y!==n.start&&(n.start||"")>n.next&&f<=n.start)&&(n.more=0)),n.more){if(d&&r(c.err,d,n),!(n.parsed>=n.limit)){var p=+new Date;i&&(i.rm=p);var g=n.next;a((function(){console.STAT&&console.STAT(p,+new Date-p,"rad more"),h.parse(g,c.check)}),0)}}else r(c.err,d,n)}else r(f===e.code.from?y:"No file!")}},check:function(t,r,n){if(c.get(t,r,n),r&&!r.check){r.check=1;var i=+new Date;(n||(n={})).file||(n.file=c.file),o.map(r,(function(t,r){h.find(r,(function(i){if((i||(i=e.code.from))!==n.file){var o=(""+Math.random()).slice(-3);u((function(){h.save(r,t,(function e(a,u){a?h.save(r,t,e):console.STAT&&console.STAT("MISLOCATED DATA CORRECTED",o,s(r),s(n.file),s(i))}))}),0)}}))})),console.STAT&&console.STAT(i,+new Date-i,"rad check")}}};h.find(t||(n.reverse?n.end||"":n.start||""),c.find)},d=0,p={},g=String.fromCharCode(31),h.parse=function(r,n,i,a){var c;if(!r)return n();if(c=p[r])c.push(n);else{c=p[r]=[n];var b=function(){},m={file:r};(b.disk=o()).file=r,b.read=function(t,n){if(a&&(a.rpg=+new Date),console.STAT&&console.STAT(v,+new Date-v,"read disk",JSON.stringify(r),++d,"total all parses."),(b.err=t)||(b.not=!n))return delete p[r],void b.map(c,b.ack);if("string"!=typeof n){try{e.max<=n.length?b.err="Chunk too big!":n=n.toString()}catch(e){b.err=e}if(b.err)return delete p[r],void b.map(c,b.ack)}m.parsed=n.length,a&&(a.rpl=m.parsed),a&&(a.rpa=c.length),v=+new Date,e.jsonify||"{"===n[0]?f(n,(function(e,t){return e?"{"===n[0]?(delete p[r],b.err="JSON error!",void b.map(c,b.ack)):void b.radec(e,n):(delete p[r],b.disk.$=t,console.STAT&&(l=+new Date-v)>9&&console.STAT(v,l,"rad parsed JSON"),a&&(a.rpd=+new Date),void b.map(c,b.ack))})):b.radec(t,n)},b.map=function(){if(c&&c.length){for(var e,t=+new Date,n=b.err,i=b.not?y:b.disk,o=0;o<9&&(e=c[o++]);)e(n,i,m);console.STAT&&console.STAT(t,+new Date-t,"rad packs",s(r)),console.STAT&&console.STAT(t,o,"rad packs #",s(r)),(c=c.slice(o)).length&&u(b.map,0)}},b.ack=function(e){e&&(b.err||b.not?e(b.err,y,m):e(y,b.disk,m))},b.radec=function(e,t){delete p[r],v=+new Date;var n,i,o,s=b.split(t),a=[];if(!s||0!==s[1])return b.err="File '"+r+"' does not have root radix! ",void b.map(c,b.ack);for(;s;)i=o=y,n=s[1],"#"==(s=b.split(s[2])||"")[0]&&(i=s[1],n<=(a=a.slice(0,n)).length&&a.push(i)),"\n"!=(s=b.split(s[2])||"")[0]&&("="!=s[0]&&":"!=s[0]||(o=s[1]),y!==i&&y!==o&&b.disk(a.join(""),o),s=b.split(s[2]));console.STAT&&console.STAT(v,+new Date-v,"parsed RAD"),b.map(c,b.ack)},b.split=function(e){if(e){var r,n,i=[],o={};if(r=e.indexOf(g),e[r])return n=e.slice(0,r),i[0]=n,i[1]=t.decode(e.slice(r),o),i[2]=e.slice(r+o.i),i}},h.disk&&(i||(i=(h.disk[r]||"").raw));var v=+new Date;if(a&&(a.rp=v),i)return u((function(){b.read(y,i)}),0);e.store.get(s(r),b.read)}},function(){var t,r,n=String.fromCharCode(28);function i(r,a){if(r)return e.log("list",r),void setTimeout((function(){h.parse(n,i)}),1e3);a?s(a):(t=t||a||o(),e.store.list?e.store.list((function(e){e?h.find.add(e,m):s(t)})):s(t))}function s(e,i){(t=t||e).file=n,i=r,r=null,c(i,(function(e){h.find(e[0],e[1])}))}h.find=function(s,a){if(!t)return r?void r.push([s,a]):(r=[[s,a]],void h.parse(n,i));o.map(h.list=t,(function(e,t){if(e)return a(t)||!0}),{reverse:1,end:s})||a(e.code.from)},h.find.add=function(e,r){t(e)||e===n?r(y,1):(t(e,1),r.found=(r.found||0)+1,h.write(n,t,(function(e,t){e?r(e):(r.found=(r.found||0)-1,0===r.found&&r(y,1))}),!0))},h.find.bad=function(e,r){t(e,0),h.write(n,t,r||m)}}();try{!i.window&&r(22418)(h)}catch(e){}var y,m=function(){};return t.has[e.file]=h,h}var n;if(n=String.fromCharCode(31),t.encode=function(e,t,r){var i=r=r||n;if("string"==typeof e){for(var o=e.indexOf(r);-1!=o;)i+=r,o=e.indexOf(r,o+1);return i+'"'+e+r}return e&&e["#"]&&1==Object.keys(e).length?i+"#"+void 0+i:"number"==typeof e?i+"+"+(e||0)+i:null===e?i+" "+i:!0===e?i+"+"+i:!1===e?i+"-"+i:void 0},t.decode=function(e,t,r){var i,o,s,a=-1,u=0;if((r=r||n)===e[0]){for(;r===e[++a];)++u;for(s=e[o=u]||!0;--u>=0;)a=e.indexOf(r,a+1);return-1==a&&(a=e.length),i=e.slice(o+1,a),t&&(t.i=a+1),'"'===s?i:"#"===s?{"#":i}:"+"===s?0===i.length||parseFloat(i):" "===s?null:"-"!==s&&void 0}},"undefined"!=typeof window){var i=window.Gun,o=window.Radix;window.Radisk=t}else{i=r(54827),o=r(78719);try{e.exports=t}catch(e){}}t.Radix=o}()},30125:(e,t,r)=>{var n=r(84050),i=r(1241),o=r(530),s=r(32438),a=r(68078);function u(e,t,r){if(e=e.toLowerCase(),o[e])return i.createCipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e});throw new TypeError("invalid suite type")}function c(e,t,r){if(e=e.toLowerCase(),o[e])return i.createDecipheriv(e,t,r);if(s[e])return new n({key:t,iv:r,mode:e,decrypt:!0});throw new TypeError("invalid suite type")}t.createCipher=t.Cipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return u(e,i.key,i.iv)},t.createCipheriv=t.Cipheriv=u,t.createDecipher=t.Decipher=function(e,t){var r,n;if(e=e.toLowerCase(),o[e])r=o[e].key,n=o[e].iv;else{if(!s[e])throw new TypeError("invalid suite type");r=8*s[e].key,n=s[e].iv}var i=a(t,!1,r,n);return c(e,i.key,i.iv)},t.createDecipheriv=t.Decipheriv=c,t.listCiphers=t.getCiphers=function(){return Object.keys(s).concat(i.getCiphers())}},30131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduled=void 0;var n=r(65650),i=r(54530),o=r(34950),s=r(36805),a=r(17873),u=r(80629),c=r(67552),l=r(94975),f=r(12187),h=r(78263),d=r(86297),p=r(95462),g=r(30380);t.scheduled=function(e,t){if(null!=e){if(u.isInteropObservable(e))return n.scheduleObservable(e,t);if(l.isArrayLike(e))return o.scheduleArray(e,t);if(c.isPromise(e))return i.schedulePromise(e,t);if(h.isAsyncIterable(e))return a.scheduleAsyncIterable(e,t);if(f.isIterable(e))return s.scheduleIterable(e,t);if(p.isReadableStreamLike(e))return g.scheduleReadableStreamLike(e,t)}throw d.createInvalidObservableTypeError(e)}},30206:(e,t,r)=>{"use strict";var n=r(65606),i=r(33225);e.exports=v;var o,s=r(64634);v.ReadableState=m,r(37007).EventEmitter;var a=function(e,t){return e.listeners(t).length},u=r(5567),c=r(24116).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=Object.create(r(15622));f.inherits=r(56698);var h=r(92668),d=void 0;d=h&&h.debuglog?h.debuglog("stream"):function(){};var p,g=r(20672),b=r(36278);f.inherits(v,u);var y=["error","close","destroy","pause","resume"];function m(e,t){e=e||{};var n=t instanceof(o=o||r(26248));this.objectMode=!!e.objectMode,n&&(this.objectMode=this.objectMode||!!e.readableObjectMode);var i=e.highWaterMark,s=e.readableHighWaterMark,a=this.objectMode?16:16384;this.highWaterMark=i||0===i?i:n&&(s||0===s)?s:a,this.highWaterMark=Math.floor(this.highWaterMark),this.buffer=new g,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(p||(p=r(6427).I),this.decoder=new p(e.encoding),this.encoding=e.encoding)}function v(e){if(o=o||r(26248),!(this instanceof v))return new v(e);this._readableState=new m(e,this),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),u.call(this)}function w(e,t,r,n,i){var o,s=e._readableState;return null===t?(s.reading=!1,function(e,t){if(!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,S(e)}}(e,s)):(i||(o=function(e,t){var r,n;return n=t,c.isBuffer(n)||n instanceof l||"string"==typeof t||void 0===t||e.objectMode||(r=new TypeError("Invalid non-string/buffer chunk")),r}(s,t)),o?e.emit("error",o):s.objectMode||t&&t.length>0?("string"==typeof t||s.objectMode||Object.getPrototypeOf(t)===c.prototype||(t=function(e){return c.from(e)}(t)),n?s.endEmitted?e.emit("error",new Error("stream.unshift() after end event")):E(e,s,t,!0):s.ended?e.emit("error",new Error("stream.push() after EOF")):(s.reading=!1,s.decoder&&!r?(t=s.decoder.write(t),s.objectMode||0!==t.length?E(e,s,t,!1):k(e,s)):E(e,s,t,!1))):n||(s.reading=!1)),function(e){return!e.ended&&(e.needReadable||e.length<e.highWaterMark||0===e.length)}(s)}function E(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(e.emit("data",r),e.read(0)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&S(e)),k(e,t)}Object.defineProperty(v.prototype,"destroyed",{get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),v.prototype.destroy=b.destroy,v.prototype._undestroy=b.undestroy,v.prototype._destroy=function(e,t){this.push(null),t(e)},v.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=c.from(e,t),t=""),r=!0),w(this,e,t,!1,r)},v.prototype.unshift=function(e){return w(this,e,null,!0,!1)},v.prototype.isPaused=function(){return!1===this._readableState.flowing},v.prototype.setEncoding=function(e){return p||(p=r(6427).I),this._readableState.decoder=new p(e),this._readableState.encoding=e,this};var A=8388608;function _(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=A?e=A:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function S(e){var t=e._readableState;t.needReadable=!1,t.emittedReadable||(d("emitReadable",t.flowing),t.emittedReadable=!0,t.sync?i.nextTick(P,e):P(e))}function P(e){d("emit readable"),e.emit("readable"),B(e)}function k(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(O,e,t))}function O(e,t){for(var r=t.length;!t.reading&&!t.flowing&&!t.ended&&t.length<t.highWaterMark&&(d("maybeReadMore read 0"),e.read(0),r!==t.length);)r=t.length;t.readingMore=!1}function x(e){d("readable nexttick read 0"),e.read(0)}function M(e,t){t.reading||(d("resume read 0"),e.read(0)),t.resumeScheduled=!1,t.awaitDrain=0,e.emit("resume"),B(e),t.flowing&&!t.reading&&e.read(0)}function B(e){var t=e._readableState;for(d("flow",t.flowing);t.flowing&&null!==e.read(););}function T(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.head.data:t.buffer.concat(t.length),t.buffer.clear()):r=function(e,t,r){var n;return e<t.head.data.length?(n=t.head.data.slice(0,e),t.head.data=t.head.data.slice(e)):n=e===t.head.data.length?t.shift():r?function(e,t){var r=t.head,n=1,i=r.data;for(e-=i.length;r=r.next;){var o=r.data,s=e>o.length?o.length:e;if(s===o.length?i+=o:i+=o.slice(0,e),0===(e-=s)){s===o.length?(++n,r.next?t.head=r.next:t.head=t.tail=null):(t.head=r,r.data=o.slice(s));break}++n}return t.length-=n,i}(e,t):function(e,t){var r=c.allocUnsafe(e),n=t.head,i=1;for(n.data.copy(r),e-=n.data.length;n=n.next;){var o=n.data,s=e>o.length?o.length:e;if(o.copy(r,r.length-e,0,s),0===(e-=s)){s===o.length?(++i,n.next?t.head=n.next:t.head=t.tail=null):(t.head=n,n.data=o.slice(s));break}++i}return t.length-=i,r}(e,t),n}(e,t.buffer,t.decoder),r);var r}function I(e){var t=e._readableState;if(t.length>0)throw new Error('"endReadable()" called on non-empty stream');t.endEmitted||(t.ended=!0,i.nextTick(C,t,e))}function C(e,t){e.endEmitted||0!==e.length||(e.endEmitted=!0,t.readable=!1,t.emit("end"))}function R(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}v.prototype.read=function(e){d("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&(t.length>=t.highWaterMark||t.ended))return d("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?I(this):S(this),null;if(0===(e=_(e,t))&&t.ended)return 0===t.length&&I(this),null;var n,i=t.needReadable;return d("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&d("length less than watermark",i=!0),t.ended||t.reading?d("reading or ended",i=!1):i&&(d("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=_(r,t))),null===(n=e>0?T(e,t):null)?(t.needReadable=!0,e=0):t.length-=e,0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&I(this)),null!==n&&this.emit("data",n),n},v.prototype._read=function(e){this.emit("error",new Error("_read() is not implemented"))},v.prototype.pipe=function(e,t){var r=this,o=this._readableState;switch(o.pipesCount){case 0:o.pipes=e;break;case 1:o.pipes=[o.pipes,e];break;default:o.pipes.push(e)}o.pipesCount+=1,d("pipe count=%d opts=%j",o.pipesCount,t);var u=t&&!1===t.end||e===n.stdout||e===n.stderr?m:c;function c(){d("onend"),e.end()}o.endEmitted?i.nextTick(u):r.once("end",u),e.on("unpipe",(function t(n,i){d("onunpipe"),n===r&&i&&!1===i.hasUnpiped&&(i.hasUnpiped=!0,d("cleanup"),e.removeListener("close",b),e.removeListener("finish",y),e.removeListener("drain",l),e.removeListener("error",g),e.removeListener("unpipe",t),r.removeListener("end",c),r.removeListener("end",m),r.removeListener("data",p),f=!0,!o.awaitDrain||e._writableState&&!e._writableState.needDrain||l())}));var l=function(e){return function(){var t=e._readableState;d("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&a(e,"data")&&(t.flowing=!0,B(e))}}(r);e.on("drain",l);var f=!1,h=!1;function p(t){d("ondata"),h=!1,!1!==e.write(t)||h||((1===o.pipesCount&&o.pipes===e||o.pipesCount>1&&-1!==R(o.pipes,e))&&!f&&(d("false write response, pause",o.awaitDrain),o.awaitDrain++,h=!0),r.pause())}function g(t){d("onerror",t),m(),e.removeListener("error",g),0===a(e,"error")&&e.emit("error",t)}function b(){e.removeListener("finish",y),m()}function y(){d("onfinish"),e.removeListener("close",b),m()}function m(){d("unpipe"),r.unpipe(e)}return r.on("data",p),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?s(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",g),e.once("close",b),e.once("finish",y),e.emit("pipe",r),o.flowing||(d("pipe resume"),r.resume()),e},v.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=R(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},v.prototype.on=function(e,t){var r=u.prototype.on.call(this,e,t);if("data"===e)!1!==this._readableState.flowing&&this.resume();else if("readable"===e){var n=this._readableState;n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.emittedReadable=!1,n.reading?n.length&&S(this):i.nextTick(x,this))}return r},v.prototype.addListener=v.prototype.on,v.prototype.resume=function(){var e=this._readableState;return e.flowing||(d("resume"),e.flowing=!0,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(M,e,t))}(this,e)),this},v.prototype.pause=function(){return d("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(d("pause"),this._readableState.flowing=!1,this.emit("pause")),this},v.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(d("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){d("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var o=0;o<y.length;o++)e.on(y[o],this.emit.bind(this,y[o]));return this._read=function(t){d("wrapped _read",t),n&&(n=!1,e.resume())},this},Object.defineProperty(v.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),v._fromList=T},30295:(e,t,r)=>{var n=r(48287).Buffer;e.exports=function(e,t){for(var r=Math.min(e.length,t.length),i=new n(r),o=0;o<r;++o)i[o]=e[o]^t[o];return i}},30345:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=void 0;const n=r(75347),i=r(87262);function o(e){return e&&"function"==typeof e.getAddress}async function s(e,t){const r=await t;return null!=r&&"0x0000000000000000000000000000000000000000"!==r||((0,n.assert)("string"!=typeof e,"unconfigured name","UNCONFIGURED_NAME",{value:e}),(0,n.assertArgument)(!1,"invalid AddressLike value; did not resolve to a value address","target",e)),(0,i.getAddress)(r)}t.isAddressable=o,t.isAddress=function(e){try{return(0,i.getAddress)(e),!0}catch(e){}return!1},t.resolveAddress=function(e,t){return"string"==typeof e?e.match(/^0x[0-9a-f]{40}$/i)?(0,i.getAddress)(e):((0,n.assert)(null!=t,"ENS resolution requires a provider","UNSUPPORTED_OPERATION",{operation:"resolveName"}),s(e,t.resolveName(e))):o(e)?s(e,e.getAddress()):e&&"function"==typeof e.then?s(e,e):void(0,n.assertArgument)(!1,"unsupported addressable value","target",e)}},30370:(e,t,r)=>{"use strict";var n=r(39404),i=r(56698),o=r(36677),s=r(47011);function a(e){o.call(this,"mont",e),this.a=new n(e.a,16).toRed(this.red),this.b=new n(e.b,16).toRed(this.red),this.i4=new n(4).toRed(this.red).redInvm(),this.two=new n(2).toRed(this.red),this.a24=this.i4.redMul(this.a.redAdd(this.two))}function u(e,t,r){o.BasePoint.call(this,e,"projective"),null===t&&null===r?(this.x=this.curve.one,this.z=this.curve.zero):(this.x=new n(t,16),this.z=new n(r,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)))}i(a,o),e.exports=a,a.prototype.validate=function(e){var t=e.normalize().x,r=t.redSqr(),n=r.redMul(t).redAdd(r.redMul(this.a)).redAdd(t);return 0===n.redSqrt().redSqr().cmp(n)},i(u,o.BasePoint),a.prototype.decodePoint=function(e,t){return this.point(s.toArray(e,t),1)},a.prototype.point=function(e,t){return new u(this,e,t)},a.prototype.pointFromJSON=function(e){return u.fromJSON(this,e)},u.prototype.precompute=function(){},u.prototype._encode=function(){return this.getX().toArray("be",this.curve.p.byteLength())},u.fromJSON=function(e,t){return new u(e,t[0],t[1]||e.one)},u.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},u.prototype.isInfinity=function(){return 0===this.z.cmpn(0)},u.prototype.dbl=function(){var e=this.x.redAdd(this.z).redSqr(),t=this.x.redSub(this.z).redSqr(),r=e.redSub(t),n=e.redMul(t),i=r.redMul(t.redAdd(this.curve.a24.redMul(r)));return this.curve.point(n,i)},u.prototype.add=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.diffAdd=function(e,t){var r=this.x.redAdd(this.z),n=this.x.redSub(this.z),i=e.x.redAdd(e.z),o=e.x.redSub(e.z).redMul(r),s=i.redMul(n),a=t.z.redMul(o.redAdd(s).redSqr()),u=t.x.redMul(o.redISub(s).redSqr());return this.curve.point(a,u)},u.prototype.mul=function(e){for(var t=e.clone(),r=this,n=this.curve.point(null,null),i=[];0!==t.cmpn(0);t.iushrn(1))i.push(t.andln(1));for(var o=i.length-1;o>=0;o--)0===i[o]?(r=r.diffAdd(n,this),n=n.dbl()):(n=r.diffAdd(n,this),r=r.dbl());return n},u.prototype.mulAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.jumlAdd=function(){throw new Error("Not supported on Montgomery curve")},u.prototype.eq=function(e){return 0===this.getX().cmp(e.getX())},u.prototype.normalize=function(){return this.x=this.x.redMul(this.z.redInvm()),this.z=this.curve.one,this},u.prototype.getX=function(){return this.normalize(),this.x.fromRed()}},30380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleReadableStreamLike=void 0;var n=r(17873),i=r(95462);t.scheduleReadableStreamLike=function(e,t){return n.scheduleAsyncIterable(i.readableStreamLikeToAsyncGenerator(e),t)}},30632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throwIfEmpty=void 0;var n=r(59328),i=r(65212),o=r(17214);function s(){return new n.EmptyError}t.throwIfEmpty=function(e){return void 0===e&&(e=s),i.operate((function(t,r){var n=!1;t.subscribe(o.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){return n?r.complete():r.error(e())})))}))}},30646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=void 0;var n=r(87262);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return n.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return n.getIcapAddress}});var i=r(61891);Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return i.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return i.getCreate2Address}});var o=r(30345);Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}})},31210:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.poly1305=t.wrapConstructorWithKey=void 0;const n=r(24605),i=r(36527),o=(e,t)=>255&e[t++]|(255&e[t++])<<8;class s{constructor(e){this.blockLen=16,this.outputLen=16,this.buffer=new Uint8Array(16),this.r=new Uint16Array(10),this.h=new Uint16Array(10),this.pad=new Uint16Array(8),this.pos=0,this.finished=!1,e=(0,i.toBytes)(e),(0,n.bytes)(e,32);const t=o(e,0),r=o(e,2),s=o(e,4),a=o(e,6),u=o(e,8),c=o(e,10),l=o(e,12),f=o(e,14);this.r[0]=8191&t,this.r[1]=8191&(t>>>13|r<<3),this.r[2]=7939&(r>>>10|s<<6),this.r[3]=8191&(s>>>7|a<<9),this.r[4]=255&(a>>>4|u<<12),this.r[5]=u>>>1&8190,this.r[6]=8191&(u>>>14|c<<2),this.r[7]=8065&(c>>>11|l<<5),this.r[8]=8191&(l>>>8|f<<8),this.r[9]=f>>>5&127;for(let t=0;t<8;t++)this.pad[t]=o(e,16+2*t)}process(e,t,r=!1){const n=r?0:2048,{h:i,r:s}=this,a=s[0],u=s[1],c=s[2],l=s[3],f=s[4],h=s[5],d=s[6],p=s[7],g=s[8],b=s[9],y=o(e,t+0),m=o(e,t+2),v=o(e,t+4),w=o(e,t+6),E=o(e,t+8),A=o(e,t+10),_=o(e,t+12),S=o(e,t+14);let P=i[0]+(8191&y),k=i[1]+(8191&(y>>>13|m<<3)),O=i[2]+(8191&(m>>>10|v<<6)),x=i[3]+(8191&(v>>>7|w<<9)),M=i[4]+(8191&(w>>>4|E<<12)),B=i[5]+(E>>>1&8191),T=i[6]+(8191&(E>>>14|A<<2)),I=i[7]+(8191&(A>>>11|_<<5)),C=i[8]+(8191&(_>>>8|S<<8)),R=i[9]+(S>>>5|n),N=0,j=N+P*a+k*(5*b)+O*(5*g)+x*(5*p)+M*(5*d);N=j>>>13,j&=8191,j+=B*(5*h)+T*(5*f)+I*(5*l)+C*(5*c)+R*(5*u),N+=j>>>13,j&=8191;let U=N+P*u+k*a+O*(5*b)+x*(5*g)+M*(5*p);N=U>>>13,U&=8191,U+=B*(5*d)+T*(5*h)+I*(5*f)+C*(5*l)+R*(5*c),N+=U>>>13,U&=8191;let L=N+P*c+k*u+O*a+x*(5*b)+M*(5*g);N=L>>>13,L&=8191,L+=B*(5*p)+T*(5*d)+I*(5*h)+C*(5*f)+R*(5*l),N+=L>>>13,L&=8191;let D=N+P*l+k*c+O*u+x*a+M*(5*b);N=D>>>13,D&=8191,D+=B*(5*g)+T*(5*p)+I*(5*d)+C*(5*h)+R*(5*f),N+=D>>>13,D&=8191;let F=N+P*f+k*l+O*c+x*u+M*a;N=F>>>13,F&=8191,F+=B*(5*b)+T*(5*g)+I*(5*p)+C*(5*d)+R*(5*h),N+=F>>>13,F&=8191;let H=N+P*h+k*f+O*l+x*c+M*u;N=H>>>13,H&=8191,H+=B*a+T*(5*b)+I*(5*g)+C*(5*p)+R*(5*d),N+=H>>>13,H&=8191;let z=N+P*d+k*h+O*f+x*l+M*c;N=z>>>13,z&=8191,z+=B*u+T*a+I*(5*b)+C*(5*g)+R*(5*p),N+=z>>>13,z&=8191;let q=N+P*p+k*d+O*h+x*f+M*l;N=q>>>13,q&=8191,q+=B*c+T*u+I*a+C*(5*b)+R*(5*g),N+=q>>>13,q&=8191;let G=N+P*g+k*p+O*d+x*h+M*f;N=G>>>13,G&=8191,G+=B*l+T*c+I*u+C*a+R*(5*b),N+=G>>>13,G&=8191;let W=N+P*b+k*g+O*p+x*d+M*h;N=W>>>13,W&=8191,W+=B*f+T*l+I*c+C*u+R*a,N+=W>>>13,W&=8191,N=(N<<2)+N|0,N=N+j|0,j=8191&N,N>>>=13,U+=N,i[0]=j,i[1]=U,i[2]=L,i[3]=D,i[4]=F,i[5]=H,i[6]=z,i[7]=q,i[8]=G,i[9]=W}finalize(){const{h:e,pad:t}=this,r=new Uint16Array(10);let n=e[1]>>>13;e[1]&=8191;for(let t=2;t<10;t++)e[t]+=n,n=e[t]>>>13,e[t]&=8191;e[0]+=5*n,n=e[0]>>>13,e[0]&=8191,e[1]+=n,n=e[1]>>>13,e[1]&=8191,e[2]+=n,r[0]=e[0]+5,n=r[0]>>>13,r[0]&=8191;for(let t=1;t<10;t++)r[t]=e[t]+n,n=r[t]>>>13,r[t]&=8191;r[9]-=8192;let i=(1^n)-1;for(let e=0;e<10;e++)r[e]&=i;i=~i;for(let t=0;t<10;t++)e[t]=e[t]&i|r[t];e[0]=65535&(e[0]|e[1]<<13),e[1]=65535&(e[1]>>>3|e[2]<<10),e[2]=65535&(e[2]>>>6|e[3]<<7),e[3]=65535&(e[3]>>>9|e[4]<<4),e[4]=65535&(e[4]>>>12|e[5]<<1|e[6]<<14),e[5]=65535&(e[6]>>>2|e[7]<<11),e[6]=65535&(e[7]>>>5|e[8]<<8),e[7]=65535&(e[8]>>>8|e[9]<<5);let o=e[0]+t[0];e[0]=65535&o;for(let r=1;r<8;r++)o=(e[r]+t[r]|0)+(o>>>16)|0,e[r]=65535&o}update(e){(0,n.exists)(this);const{buffer:t,blockLen:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n<o;){const i=Math.min(r-this.pos,o-n);if(i!==r)t.set(e.subarray(n,n+i),this.pos),this.pos+=i,n+=i,this.pos===r&&(this.process(t,0,!1),this.pos=0);else for(;r<=o-n;n+=r)this.process(e,n)}return this}destroy(){this.h.fill(0),this.r.fill(0),this.buffer.fill(0),this.pad.fill(0)}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,h:r}=this;let{pos:i}=this;if(i){for(t[i++]=1;i<16;i++)t[i]=0;this.process(t,0,!0)}this.finalize();let o=0;for(let t=0;t<8;t++)e[o++]=r[t]>>>0,e[o++]=r[t]>>>8;return e}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}}function a(e){const t=(t,r)=>e(r).update((0,i.toBytes)(t)).digest(),r=e(new Uint8Array(32));return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.wrapConstructorWithKey=a,t.poly1305=a((e=>new s(e)))},31245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeNotification=t.Notification=t.NotificationKind=void 0;var n,i=r(44885),o=r(61587),s=r(26680),a=r(10281);(n=t.NotificationKind||(t.NotificationKind={})).NEXT="N",n.ERROR="E",n.COMPLETE="C";var u=function(){function e(e,t,r){this.kind=e,this.value=t,this.error=r,this.hasValue="N"===e}return e.prototype.observe=function(e){return c(this,e)},e.prototype.do=function(e,t,r){var n=this,i=n.kind,o=n.value,s=n.error;return"N"===i?null==e?void 0:e(o):"E"===i?null==t?void 0:t(s):null==r?void 0:r()},e.prototype.accept=function(e,t,r){var n;return a.isFunction(null===(n=e)||void 0===n?void 0:n.next)?this.observe(e):this.do(e,t,r)},e.prototype.toObservable=function(){var e=this,t=e.kind,r=e.value,n=e.error,a="N"===t?o.of(r):"E"===t?s.throwError((function(){return n})):"C"===t?i.EMPTY:0;if(!a)throw new TypeError("Unexpected notification kind "+t);return a},e.createNext=function(t){return new e("N",t)},e.createError=function(t){return new e("E",void 0,t)},e.createComplete=function(){return e.completeNotification},e.completeNotification=new e("C"),e}();function c(e,t){var r,n,i,o=e,s=o.kind,a=o.value,u=o.error;if("string"!=typeof s)throw new TypeError('Invalid notification, missing "kind"');"N"===s?null===(r=t.next)||void 0===r||r.call(t,a):"E"===s?null===(n=t.error)||void 0===n||n.call(t,u):null===(i=t.complete)||void 0===i||i.call(t)}t.Notification=u,t.observeNotification=c},31298:(e,t,r)=>{"use strict";var n=r(47011),i=r(39404),o=r(56698),s=r(36677),a=n.assert;function u(e){this.twisted=1!=(0|e.a),this.mOneA=this.twisted&&-1==(0|e.a),this.extended=this.mOneA,s.call(this,"edwards",e),this.a=new i(e.a,16).umod(this.red.m),this.a=this.a.toRed(this.red),this.c=new i(e.c,16).toRed(this.red),this.c2=this.c.redSqr(),this.d=new i(e.d,16).toRed(this.red),this.dd=this.d.redAdd(this.d),a(!this.twisted||0===this.c.fromRed().cmpn(1)),this.oneC=1==(0|e.c)}function c(e,t,r,n,o){s.BasePoint.call(this,e,"projective"),null===t&&null===r&&null===n?(this.x=this.curve.zero,this.y=this.curve.one,this.z=this.curve.one,this.t=this.curve.zero,this.zOne=!0):(this.x=new i(t,16),this.y=new i(r,16),this.z=n?new i(n,16):this.curve.one,this.t=o&&new i(o,16),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.t&&!this.t.red&&(this.t=this.t.toRed(this.curve.red)),this.zOne=this.z===this.curve.one,this.curve.extended&&!this.t&&(this.t=this.x.redMul(this.y),this.zOne||(this.t=this.t.redMul(this.z.redInvm()))))}o(u,s),e.exports=u,u.prototype._mulA=function(e){return this.mOneA?e.redNeg():this.a.redMul(e)},u.prototype._mulC=function(e){return this.oneC?e:this.c.redMul(e)},u.prototype.jpoint=function(e,t,r,n){return this.point(e,t,r,n)},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=this.c2.redSub(this.a.redMul(r)),o=this.one.redSub(this.c2.redMul(this.d).redMul(r)),s=n.redMul(o.redInvm()),a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");var u=a.fromRed().isOdd();return(t&&!u||!t&&u)&&(a=a.redNeg()),this.point(e,a)},u.prototype.pointFromY=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr(),n=r.redSub(this.c2),o=r.redMul(this.d).redMul(this.c2).redSub(this.a),s=n.redMul(o.redInvm());if(0===s.cmp(this.zero)){if(t)throw new Error("invalid point");return this.point(this.zero,e)}var a=s.redSqrt();if(0!==a.redSqr().redSub(s).cmp(this.zero))throw new Error("invalid point");return a.fromRed().isOdd()!==t&&(a=a.redNeg()),this.point(a,e)},u.prototype.validate=function(e){if(e.isInfinity())return!0;e.normalize();var t=e.x.redSqr(),r=e.y.redSqr(),n=t.redMul(this.a).redAdd(r),i=this.c2.redMul(this.one.redAdd(this.d.redMul(t).redMul(r)));return 0===n.cmp(i)},o(c,s.BasePoint),u.prototype.pointFromJSON=function(e){return c.fromJSON(this,e)},u.prototype.point=function(e,t,r,n){return new c(this,e,t,r,n)},c.fromJSON=function(e,t){return new c(e,t[0],t[1],t[2])},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+" z: "+this.z.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return 0===this.x.cmpn(0)&&(0===this.y.cmp(this.z)||this.zOne&&0===this.y.cmp(this.curve.c))},c.prototype._extDbl=function(){var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr();r=r.redIAdd(r);var n=this.curve._mulA(e),i=this.x.redAdd(this.y).redSqr().redISub(e).redISub(t),o=n.redAdd(t),s=o.redSub(r),a=n.redSub(t),u=i.redMul(s),c=o.redMul(a),l=i.redMul(a),f=s.redMul(o);return this.curve.point(u,c,f,l)},c.prototype._projDbl=function(){var e,t,r,n,i,o,s=this.x.redAdd(this.y).redSqr(),a=this.x.redSqr(),u=this.y.redSqr();if(this.curve.twisted){var c=(n=this.curve._mulA(a)).redAdd(u);this.zOne?(e=s.redSub(a).redSub(u).redMul(c.redSub(this.curve.two)),t=c.redMul(n.redSub(u)),r=c.redSqr().redSub(c).redSub(c)):(i=this.z.redSqr(),o=c.redSub(i).redISub(i),e=s.redSub(a).redISub(u).redMul(o),t=c.redMul(n.redSub(u)),r=c.redMul(o))}else n=a.redAdd(u),i=this.curve._mulC(this.z).redSqr(),o=n.redSub(i).redSub(i),e=this.curve._mulC(s.redISub(n)).redMul(o),t=this.curve._mulC(n).redMul(a.redISub(u)),r=n.redMul(o);return this.curve.point(e,t,r)},c.prototype.dbl=function(){return this.isInfinity()?this:this.curve.extended?this._extDbl():this._projDbl()},c.prototype._extAdd=function(e){var t=this.y.redSub(this.x).redMul(e.y.redSub(e.x)),r=this.y.redAdd(this.x).redMul(e.y.redAdd(e.x)),n=this.t.redMul(this.curve.dd).redMul(e.t),i=this.z.redMul(e.z.redAdd(e.z)),o=r.redSub(t),s=i.redSub(n),a=i.redAdd(n),u=r.redAdd(t),c=o.redMul(s),l=a.redMul(u),f=o.redMul(u),h=s.redMul(a);return this.curve.point(c,l,h,f)},c.prototype._projAdd=function(e){var t,r,n=this.z.redMul(e.z),i=n.redSqr(),o=this.x.redMul(e.x),s=this.y.redMul(e.y),a=this.curve.d.redMul(o).redMul(s),u=i.redSub(a),c=i.redAdd(a),l=this.x.redAdd(this.y).redMul(e.x.redAdd(e.y)).redISub(o).redISub(s),f=n.redMul(u).redMul(l);return this.curve.twisted?(t=n.redMul(c).redMul(s.redSub(this.curve._mulA(o))),r=u.redMul(c)):(t=n.redMul(c).redMul(s.redSub(o)),r=this.curve._mulC(u).redMul(c)),this.curve.point(f,t,r)},c.prototype.add=function(e){return this.isInfinity()?e:e.isInfinity()?this:this.curve.extended?this._extAdd(e):this._projAdd(e)},c.prototype.mul=function(e){return this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!1)},c.prototype.jmulAdd=function(e,t,r){return this.curve._wnafMulAdd(1,[this,t],[e,r],2,!0)},c.prototype.normalize=function(){if(this.zOne)return this;var e=this.z.redInvm();return this.x=this.x.redMul(e),this.y=this.y.redMul(e),this.t&&(this.t=this.t.redMul(e)),this.z=this.curve.one,this.zOne=!0,this},c.prototype.neg=function(){return this.curve.point(this.x.redNeg(),this.y,this.z,this.t&&this.t.redNeg())},c.prototype.getX=function(){return this.normalize(),this.x.fromRed()},c.prototype.getY=function(){return this.normalize(),this.y.fromRed()},c.prototype.eq=function(e){return this===e||0===this.getX().cmp(e.getX())&&0===this.getY().cmp(e.getY())},c.prototype.eqXToP=function(e){var t=e.toRed(this.curve.red).redMul(this.z);if(0===this.x.cmp(t))return!0;for(var r=e.clone(),n=this.curve.redN.redMul(this.z);;){if(r.iadd(this.curve.n),r.cmp(this.curve.p)>=0)return!1;if(t.redIAdd(n),0===this.x.cmp(t))return!0}},c.prototype.toP=c.prototype.normalize,c.prototype.mixedAdd=c.prototype.add},31766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(50532),i=r(39732),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+s[e]+u[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=h,h=f,f=l,l=c+t|0,c=a,a=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,a,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},31839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=t.md5=t.MD5=t.sha1=t.SHA1=void 0;const n=r(37202),i=r(99175),o=Uint32Array.from([1732584193,4023233417,2562383102,271733878,3285377520]),s=new Uint32Array(80);class a extends n.HashMD{constructor(){super(64,20,8,!1),this.A=0|o[0],this.B=0|o[1],this.C=0|o[2],this.D=0|o[3],this.E=0|o[4]}get(){const{A:e,B:t,C:r,D:n,E:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)s[r]=e.getUint32(t,!1);for(let e=16;e<80;e++)s[e]=(0,i.rotl)(s[e-3]^s[e-8]^s[e-14]^s[e-16],1);let{A:r,B:o,C:a,D:u,E:c}=this;for(let e=0;e<80;e++){let t,l;e<20?(t=(0,n.Chi)(o,a,u),l=1518500249):e<40?(t=o^a^u,l=1859775393):e<60?(t=(0,n.Maj)(o,a,u),l=2400959708):(t=o^a^u,l=3395469782);const f=(0,i.rotl)(r,5)+t+c+l+s[e]|0;c=u,u=a,a=(0,i.rotl)(o,30),o=r,r=f}r=r+this.A|0,o=o+this.B|0,a=a+this.C|0,u=u+this.D|0,c=c+this.E|0,this.set(r,o,a,u,c)}roundClean(){(0,i.clean)(s)}destroy(){this.set(0,0,0,0,0),(0,i.clean)(this.buffer)}}t.SHA1=a,t.sha1=(0,i.createHasher)((()=>new a));const u=Math.pow(2,32),c=Array.from({length:64},((e,t)=>Math.floor(u*Math.abs(Math.sin(t+1))))),l=o.slice(0,4),f=new Uint32Array(16);class h extends n.HashMD{constructor(){super(64,16,8,!0),this.A=0|l[0],this.B=0|l[1],this.C=0|l[2],this.D=0|l[3]}get(){const{A:e,B:t,C:r,D:n}=this;return[e,t,r,n]}set(e,t,r,n){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n}process(e,t){for(let r=0;r<16;r++,t+=4)f[r]=e.getUint32(t,!0);let{A:r,B:o,C:s,D:a}=this;for(let e=0;e<64;e++){let t,u,l;e<16?(t=(0,n.Chi)(o,s,a),u=e,l=[7,12,17,22]):e<32?(t=(0,n.Chi)(a,o,s),u=(5*e+1)%16,l=[5,9,14,20]):e<48?(t=o^s^a,u=(3*e+5)%16,l=[4,11,16,23]):(t=s^(o|~a),u=7*e%16,l=[6,10,15,21]),t=t+r+c[e]+f[u],r=a,a=s,s=o,o+=(0,i.rotl)(t,l[e%4])}r=r+this.A|0,o=o+this.B|0,s=s+this.C|0,a=a+this.D|0,this.set(r,o,s,a)}roundClean(){(0,i.clean)(f)}destroy(){this.set(0,0,0,0),(0,i.clean)(this.buffer)}}t.MD5=h,t.md5=(0,i.createHasher)((()=>new h));const d=Uint8Array.from([7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8]),p=(()=>Uint8Array.from(new Array(16).fill(0).map(((e,t)=>t))))(),g=(()=>p.map((e=>(9*e+5)%16)))(),b=(()=>{const e=[[p],[g]];for(let t=0;t<4;t++)for(let r of e)r.push(r[t].map((e=>d[e])));return e})(),y=(()=>b[0])(),m=(()=>b[1])(),v=[[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8],[12,13,11,15,6,9,9,7,12,15,11,13,7,8,7,7],[13,15,14,11,7,7,6,8,13,14,13,12,5,5,6,9],[14,11,12,14,8,6,5,5,15,12,15,14,9,9,8,6],[15,12,13,13,9,5,8,6,14,11,12,11,8,6,5,5]].map((e=>Uint8Array.from(e))),w=y.map(((e,t)=>e.map((e=>v[t][e])))),E=m.map(((e,t)=>e.map((e=>v[t][e])))),A=Uint32Array.from([0,1518500249,1859775393,2400959708,2840853838]),_=Uint32Array.from([1352829926,1548603684,1836072691,2053994217,0]);function S(e,t,r,n){return 0===e?t^r^n:1===e?t&r|~t&n:2===e?(t|~r)^n:3===e?t&n|r&~n:t^(r|~n)}const P=new Uint32Array(16);class k extends n.HashMD{constructor(){super(64,20,8,!0),this.h0=1732584193,this.h1=-271733879,this.h2=-1732584194,this.h3=271733878,this.h4=-1009589776}get(){const{h0:e,h1:t,h2:r,h3:n,h4:i}=this;return[e,t,r,n,i]}set(e,t,r,n,i){this.h0=0|e,this.h1=0|t,this.h2=0|r,this.h3=0|n,this.h4=0|i}process(e,t){for(let r=0;r<16;r++,t+=4)P[r]=e.getUint32(t,!0);let r=0|this.h0,n=r,o=0|this.h1,s=o,a=0|this.h2,u=a,c=0|this.h3,l=c,f=0|this.h4,h=f;for(let e=0;e<5;e++){const t=4-e,d=A[e],p=_[e],g=y[e],b=m[e],v=w[e],k=E[e];for(let t=0;t<16;t++){const n=(0,i.rotl)(r+S(e,o,a,c)+P[g[t]]+d,v[t])+f|0;r=f,f=c,c=0|(0,i.rotl)(a,10),a=o,o=n}for(let e=0;e<16;e++){const r=(0,i.rotl)(n+S(t,s,u,l)+P[b[e]]+p,k[e])+h|0;n=h,h=l,l=0|(0,i.rotl)(u,10),u=s,s=r}}this.set(this.h1+a+l|0,this.h2+c+h|0,this.h3+f+n|0,this.h4+r+s|0,this.h0+o+u|0)}roundClean(){(0,i.clean)(P)}destroy(){this.destroyed=!0,(0,i.clean)(this.buffer),this.set(0,0,0,0,0)}}t.RIPEMD160=k,t.ripemd160=(0,i.createHasher)((()=>new k))},31983:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueAction=void 0;var o=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.schedule=function(t,r){return void 0===r&&(r=0),r>0?e.prototype.schedule.call(this,t,r):(this.delay=r,this.state=t,this.scheduler.flush(this),this)},t.prototype.execute=function(t,r){return r>0||this.closed?e.prototype.execute.call(this,t,r):this._execute(t,r)},t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!=n&&n>0||null==n&&this.delay>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.flush(this),0)},t}(r(64772).AsyncAction);t.QueueAction=o},32036:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.QueueScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t}(r(19533).AsyncScheduler);t.QueueScheduler=o},32071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.observeOn=void 0;var n=r(28619),i=r(65212),o=r(17214);t.observeOn=function(e,t){return void 0===t&&(t=0),i.operate((function(r,i){r.subscribe(o.createOperatorSubscriber(i,(function(r){return n.executeSchedule(i,e,(function(){return i.next(r)}),t)}),(function(){return n.executeSchedule(i,e,(function(){return i.complete()}),t)}),(function(r){return n.executeSchedule(i,e,(function(){return i.error(r)}),t)})))}))}},32291:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lock=t.Signature=t.SigningKey=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=void 0;const n=r(83192);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return n.computeHmac}});const i=r(13905);Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return i.keccak256}});const o=r(67307);Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return o.ripemd160}});const s=r(22862);Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return s.pbkdf2}});const a=r(48964);Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return a.randomBytes}});const u=r(25456);Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}});const c=r(75059);Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return c.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return c.sha512}});var l=r(84534);Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return l.SigningKey}});var f=r(77005);Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return f.Signature}}),t.lock=function(){n.computeHmac.lock(),i.keccak256.lock(),s.pbkdf2.lock(),a.randomBytes.lock(),o.ripemd160.lock(),u.scrypt.lock(),u.scryptSync.lock(),c.sha256.lock(),c.sha512.lock(),a.randomBytes.lock()}},32438:(e,t)=>{t["des-ecb"]={key:8,iv:0},t["des-cbc"]=t.des={key:8,iv:8},t["des-ede3-cbc"]=t.des3={key:24,iv:8},t["des-ede3"]={key:24,iv:0},t["des-ede-cbc"]={key:16,iv:8},t["des-ede"]={key:16,iv:0}},32506:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCipher=t.rotl=t.sigma=void 0;const n=r(24605),i=r(36527),o=e=>Uint8Array.from(e.split("").map((e=>e.charCodeAt(0)))),s=o("expand 16-byte k"),a=o("expand 32-byte k"),u=(0,i.u32)(s),c=(0,i.u32)(a);function l(e){return e.byteOffset%4==0}t.sigma=c.slice(),t.rotl=function(e,t){return e<<t|e>>>32-t};const f=2**32-1,h=new Uint32Array;t.createCipher=function(e,t){const{allowShortKeys:r,extendNonceFn:o,counterLength:s,counterRight:a,rounds:d}=(0,i.checkOpts)({allowShortKeys:!1,counterLength:8,counterRight:!1,rounds:20},t);if("function"!=typeof e)throw new Error("core must be a function");return(0,n.number)(s),(0,n.number)(d),(0,n.bool)(a),(0,n.bool)(r),(t,p,g,b,y=0)=>{(0,n.bytes)(t),(0,n.bytes)(p),(0,n.bytes)(g);const m=g.length;if(b||(b=new Uint8Array(m)),(0,n.bytes)(b),(0,n.number)(y),y<0||y>=f)throw new Error("arx: counter overflow");if(b.length<m)throw new Error(`arx: output (${b.length}) is shorter than data (${m})`);const v=[];let w,E,A=t.length;if(32===A)w=t.slice(),v.push(w),E=c;else{if(16!==A||!r)throw new Error(`arx: invalid 32-byte key, got length=${A}`);w=new Uint8Array(32),w.set(t),w.set(t,16),E=u,v.push(w)}l(p)||(p=p.slice(),v.push(p));const _=(0,i.u32)(w);if(o){if(24!==p.length)throw new Error("arx: extended nonce must be 24 bytes");o(E,_,(0,i.u32)(p.subarray(0,16)),_),p=p.subarray(16)}const S=16-s;if(S!==p.length)throw new Error(`arx: nonce must be ${S} or 16 bytes`);if(12!==S){const e=new Uint8Array(12);e.set(p,a?0:12-p.length),p=e,v.push(p)}const P=(0,i.u32)(p);for(function(e,t,r,n,o,s,a,u){const c=o.length,d=new Uint8Array(64),p=(0,i.u32)(d),g=l(o)&&l(s),b=g?(0,i.u32)(o):h,y=g?(0,i.u32)(s):h;for(let i=0;i<c;a++){if(e(t,r,n,p,a,u),a>=f)throw new Error("arx: counter overflow");const l=Math.min(64,c-i);if(g&&64===l){const e=i/4;if(i%4!=0)throw new Error("arx: invalid block position");for(let t,r=0;r<16;r++)t=e+r,y[t]=b[t]^p[r];i+=64}else{for(let e,t=0;t<l;t++)e=i+t,s[e]=o[e]^d[t];i+=l}}}(e,E,_,P,g,b,y,d);v.length>0;)v.pop().fill(0);return b}}},32508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TimeInterval=t.timeInterval=void 0;var n=r(62326),i=r(65212),o=r(17214);t.timeInterval=function(e){return void 0===e&&(e=n.asyncScheduler),i.operate((function(t,r){var n=e.now();t.subscribe(o.createOperatorSubscriber(r,(function(t){var i=e.now(),o=i-n;n=i,r.next(new s(t,o))})))}))};var s=function(e,t){this.value=e,this.interval=t};t.TimeInterval=s},32568:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.last=void 0;var n=r(59328),i=r(85934),o=r(87660),s=r(30632),a=r(58799),u=r(87699);t.last=function(e,t){var r=arguments.length>=2;return function(c){return c.pipe(e?i.filter((function(t,r){return e(t,r,c)})):u.identity,o.takeLast(1),r?a.defaultIfEmpty(t):s.throwIfEmpty((function(){return new n.EmptyError})))}}},32723:(e,t,r)=>{"use strict";var n=r(77952),i=r(64367),o=r(43349);function s(e){if(!(this instanceof s))return new s(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=i.toArray(e.entropy,e.entropyEnc||"hex"),r=i.toArray(e.nonce,e.nonceEnc||"hex"),n=i.toArray(e.pers,e.persEnc||"hex");o(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}e.exports=s,s.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var i=0;i<this.V.length;i++)this.K[i]=0,this.V[i]=1;this._update(n),this._reseed=1,this.reseedInterval=281474976710656},s.prototype._hmac=function(){return new n.hmac(this.hash,this.K)},s.prototype._update=function(e){var t=this._hmac().update(this.V).update([0]);e&&(t=t.update(e)),this.K=t.digest(),this.V=this._hmac().update(this.V).digest(),e&&(this.K=this._hmac().update(this.V).update([1]).update(e).digest(),this.V=this._hmac().update(this.V).digest())},s.prototype.reseed=function(e,t,r,n){"string"!=typeof t&&(n=r,r=t,t=null),e=i.toArray(e,t),r=i.toArray(r,n),o(e.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},s.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=i.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length<e;)this.V=this._hmac().update(this.V).digest(),o=o.concat(this.V);var s=o.slice(0,e);return this._update(r),this._reseed++,i.encode(s,t)}},32827:(e,t,r)=>{var n=r(56698),i=r(82890),o=r(90392),s=r(92861).Buffer,a=new Array(160);function u(){this.init(),this._w=a,o.call(this,128,112)}n(u,i),u.prototype.init=function(){return this._ah=3418070365,this._bh=1654270250,this._ch=2438529370,this._dh=355462360,this._eh=1731405415,this._fh=2394180231,this._gh=3675008525,this._hh=1203062813,this._al=3238371032,this._bl=914150663,this._cl=812702999,this._dl=4144912697,this._el=4290775857,this._fl=1750603025,this._gl=1694076839,this._hl=3204075428,this},u.prototype._hash=function(){var e=s.allocUnsafe(48);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),e},e.exports=u},32955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=void 0,t.keccakP=v;const n=r(22318),i=r(99175),o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(7),c=BigInt(256),l=BigInt(113),f=[],h=[],d=[];for(let e=0,t=s,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],f.push(2*(5*n+r)),h.push((e+1)*(e+2)/2%64);let i=o;for(let e=0;e<7;e++)t=(t<<s^(t>>u)*l)%c,t&a&&(i^=s<<(s<<BigInt(e))-s);d.push(i)}const p=(0,n.split)(d,!0),g=p[0],b=p[1],y=(e,t,r)=>r>32?(0,n.rotlBH)(e,t,r):(0,n.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,n.rotlBL)(e,t,r):(0,n.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=h[r],o=y(t,i,n),s=m(t,i,n),a=f[r];t=e[a],i=e[a+1],e[a]=o,e[a+1]=s}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=b[n]}(0,i.clean)(r)}class w extends i.Hash{constructor(e,t,r,n=!1,o=24){if(super(),this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,this.enableXOF=!1,this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=n,this.rounds=o,(0,i.anumber)(r),!(0<e&&e<200))throw new Error("only keccak-f1600 function is supported");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}clone(){return this._cloneInto()}keccak(){(0,i.swap32IfBE)(this.state32),v(this.state32,this.rounds),(0,i.swap32IfBE)(this.state32),this.posOut=0,this.pos=0}update(e){(0,i.aexists)(this),e=(0,i.toBytes)(e),(0,i.abytes)(e);const{blockLen:t,state:r}=this,n=e.length;for(let i=0;i<n;){const o=Math.min(t-this.pos,n-i);for(let t=0;t<o;t++)r[this.pos++]^=e[i++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,i.aexists)(this,!1),(0,i.abytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,i.anumber)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,i.aoutput)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,(0,i.clean)(this.state)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,r)=>(0,i.createHasher)((()=>new w(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const A=(e,t,r)=>(0,i.createXOFer)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=A(31,168,16),t.shake256=A(31,136,32)},32980:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportUnhandledError=void 0;var n=r(93728),i=r(94808);t.reportUnhandledError=function(e){i.timeoutProvider.setTimeout((function(){var t=n.config.onUnhandledError;if(!t)throw e;t(e)}))}},33225:(e,t,r)=>{"use strict";var n=r(65606);void 0===n||!n.version||0===n.version.indexOf("v0.")||0===n.version.indexOf("v1.")&&0!==n.version.indexOf("v1.8.")?e.exports={nextTick:function(e,t,r,i){if("function"!=typeof e)throw new TypeError('"callback" argument must be a function');var o,s,a=arguments.length;switch(a){case 0:case 1:return n.nextTick(e);case 2:return n.nextTick((function(){e.call(null,t)}));case 3:return n.nextTick((function(){e.call(null,t,r)}));case 4:return n.nextTick((function(){e.call(null,t,r,i)}));default:for(o=new Array(a-1),s=0;s<o.length;)o[s++]=arguments[s];return n.nextTick((function(){e.apply(null,o)}))}}}:e.exports=n},34338:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PollingEventSubscriber=t.PollingTransactionSubscriber=t.PollingOrphanSubscriber=t.PollingBlockTagSubscriber=t.OnBlockSubscriber=t.PollingBlockSubscriber=t.getPollingSubscriber=void 0;const n=r(75347);function i(e){return JSON.parse(JSON.stringify(e))}t.getPollingSubscriber=function(e,t){return"block"===t?new o(e):(0,n.isHexString)(t,32)?new a(e,t):void(0,n.assert)(!1,"unsupported polling event","UNSUPPORTED_OPERATION",{operation:"getPollingSubscriber",info:{event:t}})};class o{#y;#v;#k;#O;constructor(e){this.#y=e,this.#v=null,this.#k=4e3,this.#O=-2}get pollingInterval(){return this.#k}set pollingInterval(e){this.#k=e}async#_(){try{const e=await this.#y.getBlockNumber();if(-2===this.#O)return void(this.#O=e);if(e!==this.#O){for(let t=this.#O+1;t<=e;t++){if(null==this.#v)return;await this.#y.emit("block",t)}this.#O=e}}catch(e){}null!=this.#v&&(this.#v=this.#y._setTimeout(this.#_.bind(this),this.#k))}start(){this.#v||(this.#v=this.#y._setTimeout(this.#_.bind(this),this.#k),this.#_())}stop(){this.#v&&(this.#y._clearTimeout(this.#v),this.#v=null)}pause(e){this.stop(),e&&(this.#O=-2)}resume(){this.start()}}t.PollingBlockSubscriber=o;class s{#y;#_;#w;constructor(e){this.#y=e,this.#w=!1,this.#_=e=>{this._poll(e,this.#y)}}async _poll(e,t){throw new Error("sub-classes must override this")}start(){this.#w||(this.#w=!0,this.#_(-2),this.#y.on("block",this.#_))}stop(){this.#w&&(this.#w=!1,this.#y.off("block",this.#_))}pause(e){this.stop()}resume(){this.start()}}t.OnBlockSubscriber=s,t.PollingBlockTagSubscriber=class extends s{#x;#M;constructor(e,t){super(e),this.#x=t,this.#M=-2}pause(e){e&&(this.#M=-2),super.pause(e)}async _poll(e,t){const r=await t.getBlock(this.#x);null!=r&&(-2===this.#M?this.#M=r.number:r.number>this.#M&&(t.emit(this.#x,r.number),this.#M=r.number))}},t.PollingOrphanSubscriber=class extends s{#p;constructor(e,t){super(e),this.#p=i(t)}async _poll(e,t){throw new Error("@TODO")}};class a extends s{#B;constructor(e,t){super(e),this.#B=t}async _poll(e,t){const r=await t.getTransactionReceipt(this.#B);r&&t.emit(this.#B,r)}}t.PollingTransactionSubscriber=a,t.PollingEventSubscriber=class{#y;#p;#v;#w;#O;constructor(e,t){this.#y=e,this.#p=i(t),this.#v=this.#_.bind(this),this.#w=!1,this.#O=-2}async#_(e){if(-2===this.#O)return;const t=i(this.#p);t.fromBlock=this.#O+1,t.toBlock=e;const r=await this.#y.getLogs(t);if(0!==r.length)for(const e of r)this.#y.emit(this.#p,e),this.#O=e.blockNumber;else this.#O<e-60&&(this.#O=e-60)}start(){this.#w||(this.#w=!0,-2===this.#O&&this.#y.getBlockNumber().then((e=>{this.#O=e})),this.#y.on("block",this.#v))}stop(){this.#w&&(this.#w=!1,this.#y.off("block",this.#v))}pause(e){this.stop(),e&&(this.#O=-2)}resume(){this.start()}}},34586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BasePlugin=void 0;const n=r(14134);class i extends n.EventEmitter{description;_category;core=null;appToken;initialize(e,t){this.core=e,this.appToken=t}destroy(){this.core=null}assertInitialized(){if(!this.core)throw new Error(`Plugin ${this.name} not initialized`);return this.core}}t.BasePlugin=i},34891:(e,t)=>{"use strict";function r(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}Object.defineProperty(t,"__esModule",{value:!0}),t.iterator=t.getSymbolIterator=void 0,t.getSymbolIterator=r,t.iterator=r()},34950:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleArray=void 0;var n=r(48051);t.scheduleArray=function(e,t){return new n.Observable((function(r){var n=0;return t.schedule((function(){n===e.length?r.complete():(r.next(e[n++]),r.closed||this.schedule())}))}))}},35359:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(83507),o=r(67332),s=r(86729).ec,a=r(26162),u=r(78170),c=r(64589);function l(e,t,r,o){if((e=n.from(e.toArray())).length<t.byteLength()){var s=n.alloc(t.byteLength()-e.length);e=n.concat([s,e])}var a=r.length,u=function(e,t){e=(e=f(e,t)).mod(t);var r=n.from(e.toArray());if(r.length<t.byteLength()){var i=n.alloc(t.byteLength()-r.length);r=n.concat([i,r])}return r}(r,t),c=n.alloc(a);c.fill(1);var l=n.alloc(a);return l=i(o,l).update(c).update(n.from([0])).update(e).update(u).digest(),c=i(o,l).update(c).digest(),{k:l=i(o,l).update(c).update(n.from([1])).update(e).update(u).digest(),v:c=i(o,l).update(c).digest()}}function f(e,t){var r=new a(e),n=(e.length<<3)-t.bitLength();return n>0&&r.ishrn(n),r}function h(e,t,r){var o,s;do{for(o=n.alloc(0);8*o.length<e.bitLength();)t.v=i(r,t.k).update(t.v).digest(),o=n.concat([o,t.v]);s=f(o,e),t.k=i(r,t.k).update(t.v).update(n.from([0])).digest(),t.v=i(r,t.k).update(t.v).digest()}while(-1!==s.cmp(e));return s}function d(e,t,r,n){return e.toRed(a.mont(r)).redPow(t).fromRed().mod(n)}e.exports=function(e,t,r,i,p){var g=u(t);if(g.curve){if("ecdsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");return function(e,t){var r=c[t.curve.join(".")];if(!r)throw new Error("unknown curve "+t.curve.join("."));var i=new s(r).keyFromPrivate(t.privateKey).sign(e);return n.from(i.toDER())}(e,g)}if("dsa"===g.type){if("dsa"!==i)throw new Error("wrong private key type");return function(e,t,r){for(var i,o=t.params.priv_key,s=t.params.p,u=t.params.q,c=t.params.g,p=new a(0),g=f(e,u).mod(u),b=!1,y=l(o,u,e,r);!1===b;)p=d(c,i=h(u,y,r),s,u),0===(b=i.invm(u).imul(g.add(o.mul(p))).mod(u)).cmpn(0)&&(b=!1,p=new a(0));return function(e,t){e=e.toArray(),t=t.toArray(),128&e[0]&&(e=[0].concat(e)),128&t[0]&&(t=[0].concat(t));var r=[48,e.length+t.length+4,2,e.length];return r=r.concat(e,[2,t.length],t),n.from(r)}(p,b)}(e,g,r)}if("rsa"!==i&&"ecdsa/rsa"!==i)throw new Error("wrong private key type");if(void 0!==t.padding&&1!==t.padding)throw new Error("illegal or unsupported padding mode");e=n.concat([p,e]);for(var b=g.modulus.byteLength(),y=[0,1];e.length+y.length+1<b;)y.push(255);y.push(0);for(var m=-1;++m<e.length;)y.push(e[m]);return o(y,g)},e.exports.getKey=l,e.exports.makeKey=h},35565:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scan=void 0;var n=r(65212),i=r(78531);t.scan=function(e,t){return n.operate(i.scanInternals(e,t,arguments.length>=2,!0))}},35601:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatTransactionResponse=t.formatTransactionReceipt=t.formatReceiptLog=t.formatBlock=t.formatLog=t.formatUint256=t.formatHash=t.formatData=t.formatBoolean=t.object=t.arrayOf=t.allowNull=void 0;const n=r(30646),i=r(32291),o=r(77778),s=r(75347),a=BigInt(0);function u(e,t){return function(r){return null==r?t:e(r)}}function c(e,t){return r=>{if(t&&null==r)return null;if(!Array.isArray(r))throw new Error("not an array");return r.map((t=>e(t)))}}function l(e,t){return r=>{const n={};for(const i in e){let o=i;if(t&&i in t&&!(o in r))for(const e of t[i])if(e in r){o=e;break}try{const t=e[i](r[o]);void 0!==t&&(n[i]=t)}catch(e){const t=e instanceof Error?e.message:"not-an-error";(0,s.assert)(!1,`invalid value for value.${i} (${t})`,"BAD_DATA",{value:r})}}return n}}function f(e){switch(e){case!0:case"true":return!0;case!1:case"false":return!1}(0,s.assertArgument)(!1,`invalid boolean; ${JSON.stringify(e)}`,"value",e)}function h(e){return(0,s.assertArgument)((0,s.isHexString)(e,!0),"invalid data","value",e),e}function d(e){return(0,s.assertArgument)((0,s.isHexString)(e,32),"invalid hash","value",e),e}t.allowNull=u,t.arrayOf=c,t.object=l,t.formatBoolean=f,t.formatData=h,t.formatHash=d,t.formatUint256=function(e){if(!(0,s.isHexString)(e))throw new Error("invalid uint256");return(0,s.zeroPadValue)(e,32)};const p=l({address:n.getAddress,blockHash:d,blockNumber:s.getNumber,data:h,index:s.getNumber,removed:u(f,!1),topics:c(d),transactionHash:d,transactionIndex:s.getNumber},{index:["logIndex"]});t.formatLog=function(e){return p(e)};const g=l({hash:u(d),parentHash:d,parentBeaconBlockRoot:u(d,null),number:s.getNumber,timestamp:s.getNumber,nonce:u(h),difficulty:s.getBigInt,gasLimit:s.getBigInt,gasUsed:s.getBigInt,stateRoot:u(d,null),receiptsRoot:u(d,null),blobGasUsed:u(s.getBigInt,null),excessBlobGas:u(s.getBigInt,null),miner:u(n.getAddress),prevRandao:u(d,null),extraData:h,baseFeePerGas:u(s.getBigInt)},{prevRandao:["mixHash"]});t.formatBlock=function(e){const t=g(e);return t.transactions=e.transactions.map((e=>"string"==typeof e?e:v(e))),t};const b=l({transactionIndex:s.getNumber,blockNumber:s.getNumber,transactionHash:d,address:n.getAddress,topics:c(d),data:h,index:s.getNumber,blockHash:d},{index:["logIndex"]});function y(e){return b(e)}t.formatReceiptLog=y;const m=l({to:u(n.getAddress,null),from:u(n.getAddress,null),contractAddress:u(n.getAddress,null),index:s.getNumber,root:u(s.hexlify),gasUsed:s.getBigInt,blobGasUsed:u(s.getBigInt,null),logsBloom:u(h),blockHash:d,hash:d,logs:c(y),blockNumber:s.getNumber,cumulativeGasUsed:s.getBigInt,effectiveGasPrice:u(s.getBigInt),blobGasPrice:u(s.getBigInt,null),status:u(s.getNumber),type:u(s.getNumber,0)},{effectiveGasPrice:["gasPrice"],hash:["transactionHash"],index:["transactionIndex"]});function v(e){e.to&&(0,s.getBigInt)(e.to)===a&&(e.to="0x0000000000000000000000000000000000000000");const t=l({hash:d,index:u(s.getNumber,void 0),type:e=>"0x"===e||null==e?0:(0,s.getNumber)(e),accessList:u(o.accessListify,null),blobVersionedHashes:u(c(d,!0),null),authorizationList:u(c((e=>{let t;if(e.signature)t=e.signature;else{let r=e.yParity;"0x1b"===r?r=0:"0x1c"===r&&(r=1),t=Object.assign({},e,{yParity:r})}return{address:(0,n.getAddress)(e.address),chainId:(0,s.getBigInt)(e.chainId),nonce:(0,s.getBigInt)(e.nonce),signature:i.Signature.from(t)}}),!1),null),blockHash:u(d,null),blockNumber:u(s.getNumber,null),transactionIndex:u(s.getNumber,null),from:n.getAddress,gasPrice:u(s.getBigInt),maxPriorityFeePerGas:u(s.getBigInt),maxFeePerGas:u(s.getBigInt),maxFeePerBlobGas:u(s.getBigInt,null),gasLimit:s.getBigInt,to:u(n.getAddress,null),value:s.getBigInt,nonce:s.getNumber,data:h,creates:u(n.getAddress,null),chainId:u(s.getBigInt,null)},{data:["input"],gasLimit:["gas"],index:["transactionIndex"]})(e);if(null==t.to&&null==t.creates&&(t.creates=(0,n.getCreateAddress)(t)),1!==e.type&&2!==e.type||null!=e.accessList||(t.accessList=[]),e.signature?t.signature=i.Signature.from(e.signature):t.signature=i.Signature.from(e),null==t.chainId){const e=t.signature.legacyChainId;null!=e&&(t.chainId=e)}return t.blockHash&&(0,s.getBigInt)(t.blockHash)===a&&(t.blockHash=null),t}t.formatTransactionReceipt=function(e){return m(e)},t.formatTransactionResponse=v},35726:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.animationFrameProvider=void 0;var o=r(69879);t.animationFrameProvider={schedule:function(e){var r=requestAnimationFrame,n=cancelAnimationFrame,i=t.animationFrameProvider.delegate;i&&(r=i.requestAnimationFrame,n=i.cancelAnimationFrame);var s=r((function(t){n=void 0,e(t)}));return new o.Subscription((function(){return null==n?void 0:n(s)}))},requestAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.requestAnimationFrame)||requestAnimationFrame).apply(void 0,i([],n(e)))},cancelAnimationFrame:function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];var o=t.animationFrameProvider.delegate;return((null==o?void 0:o.cancelAnimationFrame)||cancelAnimationFrame).apply(void 0,i([],n(e)))},delegate:void 0}},35884:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defer=void 0;var n=r(48051),i=r(19724);t.defer=function(e){return new n.Observable((function(t){i.innerFrom(e()).subscribe(t)}))}},35904:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.using=void 0;var n=r(48051),i=r(19724),o=r(44885);t.using=function(e,t){return new n.Observable((function(r){var n=e(),s=t(n);return(s?i.innerFrom(s):o.EMPTY).subscribe(r),function(){n&&n.unsubscribe()}}))}},36023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(45646),i=r(98421),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:u}=n(t);let c=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*u;let n=Number(o&f);o>>=d,n>u&&(n-=h,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,b=n<0;0===n?l=l.add(r(g,i[a])):c=c.add(r(b,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},36171:(e,t,r)=>{var n=r(92356),i=r(92861).Buffer,o=r(530),s=r(50650),a=r(56168),u=r(50462),c=r(68078);function l(e,t,r){a.call(this),this._cache=new f,this._last=void 0,this._cipher=new u.AES(t),this._prev=i.from(r),this._mode=e,this._autopadding=!0}function f(){this.cache=i.allocUnsafe(0)}function h(e,t,r){var a=o[e.toLowerCase()];if(!a)throw new TypeError("invalid suite type");if("string"==typeof r&&(r=i.from(r)),"GCM"!==a.mode&&r.length!==a.iv)throw new TypeError("invalid iv length "+r.length);if("string"==typeof t&&(t=i.from(t)),t.length!==a.key/8)throw new TypeError("invalid key length "+t.length);return"stream"===a.type?new s(a.module,t,r,!0):"auth"===a.type?new n(a.module,t,r,!0):new l(a.module,t,r)}r(56698)(l,a),l.prototype._update=function(e){var t,r;this._cache.add(e);for(var n=[];t=this._cache.get(this._autopadding);)r=this._mode.decrypt(this,t),n.push(r);return i.concat(n)},l.prototype._final=function(){var e=this._cache.flush();if(this._autopadding)return function(e){var t=e[15];if(t<1||t>16)throw new Error("unable to decrypt data");for(var r=-1;++r<t;)if(e[r+(16-t)]!==t)throw new Error("unable to decrypt data");if(16!==t)return e.slice(0,16-t)}(this._mode.decrypt(this,e));if(e)throw new Error("data not multiple of block length")},l.prototype.setAutoPadding=function(e){return this._autopadding=!!e,this},f.prototype.add=function(e){this.cache=i.concat([this.cache,e])},f.prototype.get=function(e){var t;if(e){if(this.cache.length>16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t}else if(this.cache.length>=16)return t=this.cache.slice(0,16),this.cache=this.cache.slice(16),t;return null},f.prototype.flush=function(){if(this.cache.length)return this.cache},t.createDecipher=function(e,t){var r=o[e.toLowerCase()];if(!r)throw new TypeError("invalid suite type");var n=c(t,!1,r.key,r.iv);return h(e,n.key,n.iv)},t.createDecipheriv=h},36278:(e,t,r)=>{"use strict";var n=r(33225);function i(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,o=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return o||s?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(i,this,e)):n.nextTick(i,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted||(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t&&t(e)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)}}},36413:(e,t,r)=>{"use strict";var n=r(87568),i=n.define("Time",(function(){this.choice({utcTime:this.utctime(),generalTime:this.gentime()})})),o=n.define("AttributeTypeValue",(function(){this.seq().obj(this.key("type").objid(),this.key("value").any())})),s=n.define("AlgorithmIdentifier",(function(){this.seq().obj(this.key("algorithm").objid(),this.key("parameters").optional(),this.key("curve").objid().optional())})),a=n.define("SubjectPublicKeyInfo",(function(){this.seq().obj(this.key("algorithm").use(s),this.key("subjectPublicKey").bitstr())})),u=n.define("RelativeDistinguishedName",(function(){this.setof(o)})),c=n.define("RDNSequence",(function(){this.seqof(u)})),l=n.define("Name",(function(){this.choice({rdnSequence:this.use(c)})})),f=n.define("Validity",(function(){this.seq().obj(this.key("notBefore").use(i),this.key("notAfter").use(i))})),h=n.define("Extension",(function(){this.seq().obj(this.key("extnID").objid(),this.key("critical").bool().def(!1),this.key("extnValue").octstr())})),d=n.define("TBSCertificate",(function(){this.seq().obj(this.key("version").explicit(0).int().optional(),this.key("serialNumber").int(),this.key("signature").use(s),this.key("issuer").use(l),this.key("validity").use(f),this.key("subject").use(l),this.key("subjectPublicKeyInfo").use(a),this.key("issuerUniqueID").implicit(1).bitstr().optional(),this.key("subjectUniqueID").implicit(2).bitstr().optional(),this.key("extensions").explicit(3).seqof(h).optional())})),p=n.define("X509Certificate",(function(){this.seq().obj(this.key("tbsCertificate").use(d),this.key("signatureAlgorithm").use(s),this.key("signatureValue").bitstr())}));e.exports=p},36458:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(91386),i=r(39732);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},36527:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.u64Lengths=t.setBigUint64=t.wrapCipher=t.Hash=t.equalBytes=t.checkOpts=t.concatBytes=t.toBytes=t.bytesToUtf8=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.numberToBytesBE=t.bytesToNumberBE=t.hexToNumber=t.hexToBytes=t.bytesToHex=t.isLE=t.createView=t.u32=t.u16=t.u8=void 0;const n=r(24605);if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u16=e=>new Uint16Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/2)),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function o(e){(0,n.bytes)(e);let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t}t.bytesToHex=o;function s(e){return e>=48&&e<=57?e-48:e>=65&&e<=70?e-55:e>=97&&e<=102?e-87:void 0}function a(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length,r=t/2;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=s(e.charCodeAt(i)),o=s(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function c(e){if("string"!=typeof e)throw new Error("string expected, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function l(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}t.hexToBytes=a,t.hexToNumber=u,t.bytesToNumberBE=function(e){return u(o(e))},t.numberToBytesBE=function(e,t){return a(e.toString(16).padStart(2*t,"0"))},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=c,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=function(e){if("string"==typeof e)e=c(e);else{if(!(0,n.isBytes)(e))throw new Error("Uint8Array expected, got "+typeof e);e=e.slice()}return e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const i=e[r];(0,n.bytes)(i),t+=i.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(null==t||"object"!=typeof t)throw new Error("options must be defined");return Object.assign(e,t)},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.Hash=class{},t.wrapCipher=(e,t)=>(Object.assign(t,e),t),t.setBigUint64=l,t.u64Lengths=function(e,r){const n=new Uint8Array(16),i=(0,t.createView)(n);return l(i,0,BigInt(r?r.length:0),!0),l(i,8,BigInt(e.length),!0),n}},36677:(e,t,r)=>{"use strict";var n=r(39404),i=r(47011),o=i.getNAF,s=i.getJSF,a=i.assert;function u(e,t){this.type=e,this.p=new n(t.p,16),this.red=t.prime?n.red(t.prime):n.mont(this.p),this.zero=new n(0).toRed(this.red),this.one=new n(1).toRed(this.red),this.two=new n(2).toRed(this.red),this.n=t.n&&new n(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}function c(e,t){this.curve=e,this.type=t,this.precomputed=null}e.exports=u,u.prototype.point=function(){throw new Error("Not implemented")},u.prototype.validate=function(){throw new Error("Not implemented")},u.prototype._fixedNafMul=function(e,t){a(e.precomputed);var r=e._getDoubles(),n=o(t,1,this._bitLength),i=(1<<r.step+1)-(r.step%2==0?2:1);i/=3;var s,u,c=[];for(s=0;s<n.length;s+=r.step){u=0;for(var l=s+r.step-1;l>=s;l--)u=(u<<1)+n[l];c.push(u)}for(var f=this.jpoint(null,null,null),h=this.jpoint(null,null,null),d=i;d>0;d--){for(s=0;s<c.length;s++)(u=c[s])===d?h=h.mixedAdd(r.points[s]):u===-d&&(h=h.mixedAdd(r.points[s].neg()));f=f.add(h)}return f.toP()},u.prototype._wnafMul=function(e,t){var r=4,n=e._getNAFPoints(r);r=n.wnd;for(var i=n.points,s=o(t,r,this._bitLength),u=this.jpoint(null,null,null),c=s.length-1;c>=0;c--){for(var l=0;c>=0&&0===s[c];c--)l++;if(c>=0&&l++,u=u.dblp(l),c<0)break;var f=s[c];a(0!==f),u="affine"===e.type?f>0?u.mixedAdd(i[f-1>>1]):u.mixedAdd(i[-f-1>>1].neg()):f>0?u.add(i[f-1>>1]):u.add(i[-f-1>>1].neg())}return"affine"===e.type?u.toP():u},u.prototype._wnafMulAdd=function(e,t,r,n,i){var a,u,c,l=this._wnafT1,f=this._wnafT2,h=this._wnafT3,d=0;for(a=0;a<n;a++){var p=(c=t[a])._getNAFPoints(e);l[a]=p.wnd,f[a]=p.points}for(a=n-1;a>=1;a-=2){var g=a-1,b=a;if(1===l[g]&&1===l[b]){var y=[t[g],null,null,t[b]];0===t[g].y.cmp(t[b].y)?(y[1]=t[g].add(t[b]),y[2]=t[g].toJ().mixedAdd(t[b].neg())):0===t[g].y.cmp(t[b].y.redNeg())?(y[1]=t[g].toJ().mixedAdd(t[b]),y[2]=t[g].add(t[b].neg())):(y[1]=t[g].toJ().mixedAdd(t[b]),y[2]=t[g].toJ().mixedAdd(t[b].neg()));var m=[-3,-1,-5,-7,0,7,5,1,3],v=s(r[g],r[b]);for(d=Math.max(v[0].length,d),h[g]=new Array(d),h[b]=new Array(d),u=0;u<d;u++){var w=0|v[0][u],E=0|v[1][u];h[g][u]=m[3*(w+1)+(E+1)],h[b][u]=0,f[g]=y}}else h[g]=o(r[g],l[g],this._bitLength),h[b]=o(r[b],l[b],this._bitLength),d=Math.max(h[g].length,d),d=Math.max(h[b].length,d)}var A=this.jpoint(null,null,null),_=this._wnafT4;for(a=d;a>=0;a--){for(var S=0;a>=0;){var P=!0;for(u=0;u<n;u++)_[u]=0|h[u][a],0!==_[u]&&(P=!1);if(!P)break;S++,a--}if(a>=0&&S++,A=A.dblp(S),a<0)break;for(u=0;u<n;u++){var k=_[u];0!==k&&(k>0?c=f[u][k-1>>1]:k<0&&(c=f[u][-k-1>>1].neg()),A="affine"===c.type?A.mixedAdd(c):A.add(c))}}for(a=0;a<n;a++)f[a]=null;return i?A:A.toP()},u.BasePoint=c,c.prototype.eq=function(){throw new Error("Not implemented")},c.prototype.validate=function(){return this.curve.validate(this)},u.prototype.decodePoint=function(e,t){e=i.toArray(e,t);var r=this.p.byteLength();if((4===e[0]||6===e[0]||7===e[0])&&e.length-1==2*r)return 6===e[0]?a(e[e.length-1]%2==0):7===e[0]&&a(e[e.length-1]%2==1),this.point(e.slice(1,1+r),e.slice(1+r,1+2*r));if((2===e[0]||3===e[0])&&e.length-1===r)return this.pointFromX(e.slice(1,1+r),3===e[0]);throw new Error("Unknown point format")},c.prototype.encodeCompressed=function(e){return this.encode(e,!0)},c.prototype._encode=function(e){var t=this.curve.p.byteLength(),r=this.getX().toArray("be",t);return e?[this.getY().isEven()?2:3].concat(r):[4].concat(r,this.getY().toArray("be",t))},c.prototype.encode=function(e,t){return i.encode(this._encode(t),e)},c.prototype.precompute=function(e){if(this.precomputed)return this;var t={doubles:null,naf:null,beta:null};return t.naf=this._getNAFPoints(8),t.doubles=this._getDoubles(4,e),t.beta=this._getBeta(),this.precomputed=t,this},c.prototype._hasDoubles=function(e){if(!this.precomputed)return!1;var t=this.precomputed.doubles;return!!t&&t.points.length>=Math.ceil((e.bitLength()+1)/t.step)},c.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,i=0;i<t;i+=e){for(var o=0;o<e;o++)n=n.dbl();r.push(n)}return{step:e,points:r}},c.prototype._getNAFPoints=function(e){if(this.precomputed&&this.precomputed.naf)return this.precomputed.naf;for(var t=[this],r=(1<<e)-1,n=1===r?null:this.dbl(),i=1;i<r;i++)t[i]=t[i-1].add(n);return{wnd:e,points:t}},c.prototype._getBeta=function(){return null},c.prototype.dblp=function(e){for(var t=this,r=0;r<e;r++)t=t.dbl();return t}},36805:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleIterable=void 0;var n=r(48051),i=r(34891),o=r(10281),s=r(28619);t.scheduleIterable=function(e,t){return new n.Observable((function(r){var n;return s.executeSchedule(r,t,(function(){n=e[i.iterator](),s.executeSchedule(r,t,(function(){var e,t,i;try{t=(e=n.next()).value,i=e.done}catch(e){return void r.error(e)}i?r.complete():r.next(t)}),0,!0)})),function(){return o.isFunction(null==n?void 0:n.return)&&n.return()}}))}},36977:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.zipWith=void 0;var o=r(26749);t.zipWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.zip.apply(void 0,i([],n(e)))}},37007:e=>{"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise((function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)}))},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var s=10;function a(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function c(e,t,r,n){var i,o,s,c;if(a(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),s=o[t]),void 0===s)s=o[t]=r,++e._eventsCount;else if("function"==typeof s?s=o[t]=n?[r,s]:[s,r]:n?s.unshift(r):s.push(r),(i=u(e))>0&&s.length>i&&!s.warned){s.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+s.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=s.length,c=l,console&&console.warn&&console.warn(c)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function f(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,(function i(o){n.once&&e.removeEventListener(t,i),r(o)}))}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return s},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");s=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var s;if(t.length>0&&(s=t[0]),s instanceof Error)throw s;var a=new Error("Unhandled error."+(s?" ("+s.message+")":""));throw a.context=s,a}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var c=u.length,l=p(u,c);for(r=0;r<c;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return c(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return c(this,e,t,!0)},o.prototype.once=function(e,t){return a(t),this.on(e,f(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return a(t),this.prependListener(e,f(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,s;if(a(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){s=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,s||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},37202:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA512_IV=t.SHA384_IV=t.SHA224_IV=t.SHA256_IV=t.HashMD=void 0,t.setBigUint64=i,t.Chi=function(e,t,r){return e&t^~e&r},t.Maj=function(e,t,r){return e&t^e&r^t&r};const n=r(99175);function i(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}class o extends n.Hash{constructor(e,t,r,i){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=i,this.buffer=new Uint8Array(e),this.view=(0,n.createView)(this.buffer)}update(e){(0,n.aexists)(this),e=(0,n.toBytes)(e),(0,n.abytes)(e);const{view:t,buffer:r,blockLen:i}=this,o=e.length;for(let s=0;s<o;){const a=Math.min(i-this.pos,o-s);if(a!==i)r.set(e.subarray(s,s+a),this.pos),this.pos+=a,s+=a,this.pos===i&&(this.process(t,0),this.pos=0);else{const t=(0,n.createView)(e);for(;i<=o-s;s+=i)this.process(t,s)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.aexists)(this),(0,n.aoutput)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,(0,n.clean)(this.buffer.subarray(a)),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;i(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,n.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.destroyed=o,e.finished=i,e.length=n,e.pos=s,n%t&&e.buffer.set(r),e}clone(){return this._cloneInto()}}t.HashMD=o,t.SHA256_IV=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),t.SHA224_IV=Uint32Array.from([3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]),t.SHA384_IV=Uint32Array.from([3418070365,3238371032,1654270250,914150663,2438529370,812702999,355462360,4144912697,1731405415,4290775857,2394180231,1750603025,3675008525,1694076839,1203062813,3204075428]),t.SHA512_IV=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209])},37215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NonceManager=void 0;const n=r(75347),i=r(23071);class o extends i.AbstractSigner{signer;#T;#I;constructor(e){super(e.provider),(0,n.defineProperties)(this,{signer:e}),this.#T=null,this.#I=0}async getAddress(){return this.signer.getAddress()}connect(e){return new o(this.signer.connect(e))}async getNonce(e){if("pending"===e){null==this.#T&&(this.#T=super.getNonce("pending"));const e=this.#I;return await this.#T+e}return super.getNonce(e)}increment(){this.#I++}reset(){this.#I=0,this.#T=null}async sendTransaction(e){const t=this.getNonce("pending");return this.increment(),(e=await this.signer.populateTransaction(e)).nonce=await t,await this.signer.sendTransaction(e)}signTransaction(e){return this.signer.signTransaction(e)}signMessage(e){return this.signer.signMessage(e)}signTypedData(e,t,r){return this.signer.signTypedData(e,t,r)}}t.NonceManager=o},37510:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Webauthn=void 0,t.deriveWebauthnKeys=h;const i=r(14193),o=r(23358),s=r(14134),a=r(45628),u=r(61731),c=n(r(67476)),l={rpName:"Shogun Wallet",timeout:6e4,userVerification:"preferred",attestation:"none",authenticatorAttachment:"platform",requireResidentKey:!1};class f extends s.EventEmitter{config;gunInstance;credential;abortController=null;constructor(e,t){super(),this.gunInstance=e,this.credential=null,this.config={...l,...t,rpId:t?.rpId??window.location.hostname.split(":")[0]}}validateUsername(e){if(!e||"string"!=typeof e)throw new Error("Username must be a non-empty string");if(e.length<3||e.length>64)throw new Error("Username must be between 3 and 64 characters");if(!/^[a-zA-Z0-9_-]+$/.test(e))throw new Error("Username can only contain letters, numbers, underscores and hyphens")}async createAccount(e,t,r=!1){try{this.validateUsername(e);const n=3;let i=null;for(let o=1;o<=n;o++)try{const n=await this.generateCredentials(e,t,r);if(n.success)return this.emit(u.WebAuthnEventType.DEVICE_REGISTERED,{type:u.WebAuthnEventType.DEVICE_REGISTERED,data:{username:e},timestamp:Date.now()}),n;i=new Error(n.error??"Unknown error")}catch(e){if(i=e,o<n){await new Promise((e=>setTimeout(e,1e3*o)));continue}}throw i||new Error("Failed to create account after retries")}catch(e){throw this.emit(u.WebAuthnEventType.ERROR,{type:u.WebAuthnEventType.ERROR,data:{error:e.message},timestamp:Date.now()}),e}}async authenticateUser(e,t,r={}){try{if(this.validateUsername(e),!t){const e=new Error("No WebAuthn credentials found for this username");return o.ErrorHandler.handle(o.ErrorType.WEBAUTHN,"NO_CREDENTIALS",e.message,e),{success:!1,error:e.message}}this.abortAuthentication(),this.abortController=new AbortController;const n=r.timeout||this.config.timeout,i=setTimeout((()=>this.abortController?.abort()),n);try{const i={challenge:this.generateChallenge(e),allowCredentials:[],timeout:n,userVerification:r.userVerification||this.config.userVerification,rpId:this.config.rpId},o=await navigator.credentials.get({publicKey:i,signal:this.abortController.signal});if(!o)throw new Error("WebAuthn verification failed");const{password:s}=this.generateCredentialsFromSalt(e,t),a=this.getDeviceInfo(o.id),c={success:!0,username:e,password:s,credentialId:this.bufferToBase64(o.rawId),deviceInfo:a};return this.emit(u.WebAuthnEventType.AUTHENTICATION_SUCCESS,{type:u.WebAuthnEventType.AUTHENTICATION_SUCCESS,data:{username:e,deviceInfo:a},timestamp:Date.now()}),c}finally{clearTimeout(i),this.abortController=null}}catch(t){const r=t instanceof Error?t.message:"Unknown WebAuthn error";return this.emit(u.WebAuthnEventType.AUTHENTICATION_FAILED,{type:u.WebAuthnEventType.AUTHENTICATION_FAILED,data:{username:e,error:r},timestamp:Date.now()}),o.ErrorHandler.handle(o.ErrorType.WEBAUTHN,"AUTH_ERROR",r,t),{success:!1,error:r}}}abortAuthentication(){this.abortController&&(this.abortController.abort(),this.abortController=null)}getDeviceInfo(e){const t=this.getPlatformInfo();return{deviceId:e,timestamp:Date.now(),name:t.name,platform:t.platform,lastUsed:Date.now()}}getPlatformInfo(){if("undefined"==typeof navigator)return{name:"unknown",platform:"unknown"};const e=navigator.platform,t=navigator.userAgent;return/iPhone|iPad|iPod/.test(e)?{name:"iOS Device",platform:e}:/Android/.test(t)?{name:"Android Device",platform:e}:/Win/.test(e)?{name:"Windows Device",platform:e}:/Mac/.test(e)?{name:"Mac Device",platform:e}:/Linux/.test(e)?{name:"Linux Device",platform:e}:{name:"Unknown Device",platform:e}}generateChallenge(e){const t=Date.now().toString(),r=this.getRandomBytes(32),n=`${e}-${t}-${this.uint8ArrayToHex(r)}`;return(new TextEncoder).encode(n)}getRandomBytes(e){if("undefined"!=typeof window&&window.crypto)return window.crypto.getRandomValues(new Uint8Array(e));throw new Error("No cryptographic implementation available")}uint8ArrayToHex(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}bufferToBase64(e){const t=new Uint8Array(e).reduce(((e,t)=>e+String.fromCharCode(t)),"");return btoa(t).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}generateCredentialsFromSalt(e,t){const r=i.ethers.toUtf8Bytes(e+t);return{password:i.ethers.sha256(r)}}isSupported(){return"undefined"!=typeof window&&void 0!==window.PublicKeyCredential}async createCredential(e){try{const t=crypto.getRandomValues(new Uint8Array(32)),r=(new TextEncoder).encode(e),n={challenge:t,rp:{name:"Shogun Wallet",..."localhost"!==this.config.rpId&&{id:this.config.rpId}},user:{id:r,name:e,displayName:e},pubKeyCredParams:[{type:"public-key",alg:-7}],timeout:this.config.timeout,attestation:this.config.attestation,authenticatorSelection:{authenticatorAttachment:this.config.authenticatorAttachment,userVerification:this.config.userVerification,requireResidentKey:this.config.requireResidentKey}};(0,a.logDebug)("Attempting to create credentials with options:",n);const i=await navigator.credentials.create({publicKey:n});if(!i)throw new Error("Credential creation failed");(0,a.logDebug)("Credentials created successfully:",i);const o=i,s={id:o.id,rawId:o.rawId,type:o.type,response:{clientDataJSON:o.response.clientDataJSON},getClientExtensionResults:o.getClientExtensionResults};return"attestationObject"in o.response&&(s.response.attestationObject=o.response.attestationObject),this.credential=s,s}catch(e){(0,a.logError)("Detailed error in credential creation:",e);const t=e instanceof Error?e.message:"Unknown error";throw new Error(`Error creating credentials: ${t}`)}}async generateCredentials(e,t,r=!1){try{if(r){const t=await this.verifyCredential(e);return t.success&&t.credentialId?{success:!0,username:e,key:await h(e,t.credentialId),credentialId:t.credentialId,publicKey:null}:{success:!1,username:e,key:void 0,credentialId:"",error:t.error,publicKey:null}}{const t=await this.createCredential(e),r=t.id;let n=null;return t?.response?.getPublicKey&&(n=t.response.getPublicKey()),{success:!0,username:e,key:await h(e,r),credentialId:r,publicKey:n}}}catch(t){return(0,a.logError)("Error in generateCredentials:",t),{success:!1,username:e,key:void 0,credentialId:"",error:t instanceof Error?t.message:"Unknown error during WebAuthn operation",publicKey:null}}}async verifyCredential(e){try{const t={challenge:crypto.getRandomValues(new Uint8Array(32)),timeout:this.config.timeout,userVerification:this.config.userVerification,..."localhost"!==this.config.rpId&&{rpId:this.config.rpId}};this.credential?.rawId&&(t.allowCredentials=[{id:this.credential.rawId,type:"public-key"}]);const r=await navigator.credentials.get({publicKey:t});return r?{success:!0,credentialId:r.id,username:e}:{success:!1,error:"Credential verification failed"}}catch(e){return(0,a.logError)("Error verifying credentials:",e),{success:!1,error:e instanceof Error?e.message:"Unknown error verifying credentials"}}}async removeDevice(e,t,r){if(!r||!r.credentials||!r.credentials[t])return{success:!1};const n={...r};return n.credentials&&delete n.credentials[t],{success:!0,updatedCredentials:n}}async sign(e){return await navigator.credentials.get({publicKey:{challenge:new Uint8Array(16),rpId:this.config.rpId}})}}async function h(e,t){const r=i.ethers.keccak256(i.ethers.toUtf8Bytes(t)),n=`${e}_${t}`;return await(0,c.default)(r,n,{includeP256:!0})}t.Webauthn=f,"undefined"!=typeof window?window.Webauthn=f:void 0!==r.g&&(r.g.Webauthn=f)},37897:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnector=t.MESSAGE_TO_SIGN=void 0,t.deriveNostrKeys=async function(e,t,r){const n=`${e}_${t}_${r}`;return await(0,u.default)(t,n,{includeP256:!0})};const i=r(14193),o=r(49215),s=r(45628),a=r(14134),u=n(r(67476)),c=r(54371);t.MESSAGE_TO_SIGN="I Love Shogun!";class l extends a.EventEmitter{DEFAULT_CONFIG={cacheDuration:864e5,maxRetries:3,retryDelay:1e3,timeout:6e4,network:"mainnet",useApi:!1};config;signatureCache=new Map;connectedAddress=null;connectedType=null;manualKeyPair=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.setupEventListeners()}setupEventListeners(){}clearSignatureCache(e){if(e){this.signatureCache.delete(e);try{const t=`shogun_bitcoin_sig_${e}`;localStorage.removeItem(t),(0,s.log)(`Cleared signature cache for address: ${e.substring(0,10)}...`)}catch(e){(0,s.logError)("Error clearing signature cache from localStorage:",e)}}else{this.signatureCache.clear();try{const e=[];for(let t=0;t<localStorage.length;t++){const r=localStorage.key(t);r&&r.startsWith("shogun_bitcoin_sig_")&&e.push(r)}e.forEach((e=>localStorage.removeItem(e))),(0,s.log)(`Cleared all signature caches (${e.length} entries)`)}catch(e){(0,s.logError)("Error clearing all signature caches from localStorage:",e)}}}isNostrExtensionAvailable(){return"undefined"!=typeof window&&!!window.nostr}isAvailable(){return this.isNostrExtensionAvailable()||null!==this.manualKeyPair}async connectWallet(e="nostr"){(0,s.log)(`Connecting to Bitcoin wallet via ${e}...`);try{let t;switch(e){case"alby":(0,s.log)("[nostrConnector] Alby is deprecated, redirecting to Nostr"),t=await this.connectNostr();break;case"nostr":t=await this.connectNostr();break;case"manual":t=await this.connectManual();break;default:throw new Error(`Unsupported wallet type: ${e}`)}return t.success&&t.address&&(this.connectedAddress=t.address,this.connectedType=e,(0,s.log)(`Successfully connected to ${e} wallet: ${t.address}`),this.emit("wallet_connected",{address:t.address,type:this.connectedType})),t}catch(t){return(0,s.logError)(`Error connecting to ${e} wallet:`,t),{success:!1,error:t.message||"Failed to connect to wallet"}}}async connectNostr(){if(!this.isNostrExtensionAvailable())return{success:!1,error:"Nostr extension is not available. Please install a Nostr compatible extension."};try{const e=await window.nostr.getPublicKey();if(!e)throw new Error("Could not get public key from Nostr extension");this.connectedAddress=e,this.connectedType="nostr",this.emit("connected",{address:e,type:"nostr"});const t=`nostr_${e.substring(0,10)}`;return{success:!0,address:e,username:t,extensionType:"nostr"}}catch(e){throw new Error(`Nostr connection error: ${e.message}`)}}async connectManual(){if(!this.manualKeyPair)return{success:!1,error:"No manual key pair configured. Use setKeyPair() first."};this.connectedAddress=this.manualKeyPair.address,this.connectedType="manual",this.emit("connected",{address:this.manualKeyPair.address,type:"manual"});const e=`btc_${this.manualKeyPair.address.substring(0,10)}`;return{success:!0,address:this.manualKeyPair.address,username:e,extensionType:"manual"}}setKeyPair(e){this.manualKeyPair=e,e.address&&(this.connectedAddress=e.address,this.connectedType="manual")}async generateCredentials(e,t,r){const n=(0,c.generateUsernameFromIdentity)("nostr",{id:e}),i=`${n}_${t}_${r}`;return{username:n,key:await(0,u.default)(t,i,{includeP256:!0}),message:r,signature:t}}async generatePassword(e){if(!e)throw new Error("Invalid signature");try{const t=e.toLowerCase().replace(/[^a-f0-9]/g,"");return i.ethers.sha256(i.ethers.toUtf8Bytes(t))}catch(e){throw(0,s.logError)("Error generating password:",e),new Error("Failed to generate password from signature")}}async verifySignature(e,t,r){try{const n="object"==typeof r?r.address||JSON.stringify(r):String(r);if((0,s.log)(`Verifying signature for address: ${n}`),!t||!e||!n)return(0,s.logError)("Invalid message, signature, or address for verification"),!1;if("nostr"===this.connectedType||"alby"===this.connectedType)try{const r={kind:1,created_at:0,tags:[],content:e,pubkey:n},i={...r,id:(0,o.getEventHash)(r),sig:t};return(0,o.verifyEvent)(i)}catch(e){return(0,s.logError)("Error in Nostr signature verification:",e),!1}else if("manual"===this.connectedType&&this.manualKeyPair){if((0,s.log)("[nostrConnector] Manual verification for keypair"),!this.manualKeyPair.privateKey)return(0,s.logError)("Manual verification failed: private key is missing."),!1;try{const r={kind:1,created_at:0,tags:[],content:e,pubkey:n},i={...r,id:(0,o.getEventHash)(r),sig:t};return(0,o.verifyEvent)(i)}catch(e){return(0,s.logError)("Error in manual signature verification:",e),!1}}return(0,s.logWarn)("No specific verification method available, signature cannot be fully verified"),!1}catch(e){return(0,s.logError)("Error verifying signature:",e),!1}}getConnectedAddress(){return this.connectedAddress}getConnectedType(){return this.connectedType}async requestSignature(e,t){if(!this.connectedType)throw new Error("No wallet connected");try{switch(this.connectedType){case"alby":case"nostr":if("alby"===this.connectedType&&(0,s.logWarn)("Alby is deprecated, using Nostr functionality for signature request"),(0,s.log)("[nostrConnector] Requesting Nostr signature for message:",t),!window.nostr)throw new Error("Nostr extension not available");const r={kind:1,created_at:0,tags:[],content:t,pubkey:e},n={...r,id:(0,o.getEventHash)(r),sig:""},i=await window.nostr.signEvent(n);return(0,s.log)("Received Nostr signature:",i.sig.substring(0,20)+"..."),i.sig;case"manual":if((0,s.log)("[nostrConnector] Using manual key pair for signature"),!this.manualKeyPair||!this.manualKeyPair.privateKey)throw new Error("No manual key pair available or private key missing");const a={kind:1,created_at:0,tags:[],content:t,pubkey:this.manualKeyPair.address},u={...a,id:(0,o.getEventHash)(a),sig:""},c=o.utils.hexToBytes(this.manualKeyPair.privateKey),l=await(0,o.finalizeEvent)(u,c);return(0,s.log)("Generated manual signature:",l.sig.substring(0,20)+"..."),l.sig;default:throw new Error(`Unsupported wallet type: ${this.connectedType}`)}}catch(e){throw(0,s.logError)("Error requesting signature:",e),new Error(`Failed to get signature: ${e.message}`)}}cleanup(){this.removeAllListeners(),this.connectedAddress=null,this.connectedType=null,this.manualKeyPair=null}}t.NostrConnector=l,"undefined"!=typeof window?window.NostrConnector=l:void 0!==r.g&&(r.g.NostrConnector=l)},38030:(e,t,r)=>{e=r.nmd(e);var n=r(48287).Buffer;!function(){function t(e,n){return n?r(55736)(e):e.slice?t[i(e)]:function(r,n){e(r={exports:{}}),t[i(n)]=r.exports};function i(e){return e.split("/").slice(-1).toString().replace(".js","")}}var i=e;t((function(e){"undefined"!=typeof self&&(e.window=self),"undefined"!=typeof window&&(e.window=window);var t=(e.window||e).SEA||{};(t.window=e.window)&&(t.window.SEA=t);try{void 0+""!=typeof i&&(i.exports=t)}catch(e){}e.exports=t}))(t,"./root"),t((function(e){var r=t("./root");try{r.window&&location.protocol.indexOf("s")<0&&location.host.indexOf("localhost")<0&&!/^127\.\d+\.\d+\.\d+$/.test(location.hostname)&&location.protocol.indexOf("file:")<0&&(console.warn("HTTPS needed for WebCrypto in SEA, redirecting..."),location.protocol="https:")}catch(e){}}))(t,"./https"),t((function(e){var i;if(i+""==typeof btoa){if(i+""==typeof n)try{r.g.Buffer=t("buffer",1).Buffer}catch(e){console.log("Please `npm install buffer` or add it to your package.json !")}r.g.btoa=function(e){return n.from(e,"binary").toString("base64")},r.g.atob=function(e){return n.from(e,"base64").toString("binary")}}}))(t,"./base64"),t((function(e){function r(){}t("./base64"),Object.assign(r,{from:Array.from}),r.prototype=Object.create(Array.prototype),r.prototype.toString=function(e,t,r){e=e||"utf8",t=t||0;const n=this.length;if("hex"===e){const e=new Uint8Array(this);return[...Array((r&&r+1||n)-t).keys()].map((r=>e[r+t].toString(16).padStart(2,"0"))).join("")}return"utf8"===e?Array.from({length:(r||n)-t},((e,r)=>String.fromCharCode(this[r+t]))).join(""):"base64"===e?btoa(this):void 0},e.exports=r}))(t,"./array"),t((function(e){t("./base64");var r=t("./array");function n(...e){return console.warn("new SafeBuffer() is depreciated, please use SafeBuffer.from()"),n.from(...e)}n.prototype=Object.create(Array.prototype),Object.assign(n,{from(){if(!Object.keys(arguments).length||null==arguments[0])throw new TypeError("First argument must be a string, Buffer, ArrayBuffer, Array, or array-like object.");const e=arguments[0];let t;if("string"==typeof e){const n=arguments[1]||"utf8";if("hex"===n){const n=e.match(/([\da-fA-F]{2})/g).map((e=>parseInt(e,16)));if(!n||!n.length)throw new TypeError("Invalid first argument for type 'hex'.");t=r.from(n)}else if("utf8"===n||"binary"===n){const n=e.length,i=new Uint16Array(n);Array.from({length:n},((t,r)=>i[r]=e.charCodeAt(r))),t=r.from(i)}else if("base64"===n){const n=atob(e),i=n.length,o=new Uint8Array(i);Array.from({length:i},((e,t)=>o[t]=n.charCodeAt(t))),t=r.from(o)}else"binary"===n?t=r.from(e):console.info("SafeBuffer.from unknown encoding: "+n);return t}if(e.byteLength,e.byteLength?e.byteLength:e.length){let t;return e instanceof ArrayBuffer&&(t=new Uint8Array(e)),r.from(t||e)}},alloc:(e,t=0)=>r.from(new Uint8Array(Array.from({length:e},(()=>t)))),allocUnsafe:e=>r.from(new Uint8Array(Array.from({length:e}))),concat(e){if(!Array.isArray(e))throw new TypeError("First argument must be Array containing ArrayBuffer or Uint8Array instances.");return r.from(e.reduce(((e,t)=>e.concat(Array.from(t))),[]))}}),n.prototype.from=n.from,n.prototype.toString=r.prototype.toString,e.exports=n}))(t,"./buffer"),t((function(e){const r=t("./root"),n={Buffer:t("./buffer")};var o={};if(JSON.parseAsync=JSON.parseAsync||function(e,t,r){try{t(void 0,JSON.parse(e,r))}catch(e){t(e)}},JSON.stringifyAsync=JSON.stringifyAsync||function(e,t,r,n){try{t(void 0,JSON.stringify(e,r,n))}catch(e){t(e)}},n.parse=function(e,t){return new Promise((function(r,n){JSON.parseAsync(e,(function(e,t){e?n(e):r(t)}),t)}))},n.stringify=function(e,t,r){return new Promise((function(n,i){JSON.stringifyAsync(e,(function(e,t){e?i(e):n(t)}),t,r)}))},r.window&&(n.crypto=r.window.crypto||r.window.msCrypto,n.subtle=(n.crypto||o).subtle||(n.crypto||o).webkitSubtle,n.TextEncoder=r.window.TextEncoder,n.TextDecoder=r.window.TextDecoder,n.random=e=>n.Buffer.from(n.crypto.getRandomValues(new Uint8Array(n.Buffer.alloc(e))))),!n.TextDecoder){const{TextEncoder:e,TextDecoder:r}=t((void 0+""==typeof i?".":"")+"./lib/text-encoding",1);n.TextDecoder=r,n.TextEncoder=e}if(!n.crypto)try{var s=t("crypto",1);Object.assign(n,{crypto:s,random:e=>n.Buffer.from(s.randomBytes(e))});const{Crypto:e}=t("@peculiar/webcrypto",1);n.ossl=n.subtle=new e({directory:"ossl"}).subtle}catch(e){console.log("Please `npm install @peculiar/webcrypto` or add it to your package.json !")}e.exports=n}))(t,"./shim"),t((function(e){var r=t("./root"),n=t("./shim"),i={pbkdf2:{hash:{name:"SHA-256"},iter:1e5,ks:64},ecdsa:{pair:{name:"ECDSA",namedCurve:"P-256"},sign:{name:"ECDSA",hash:{name:"SHA-256"}}},ecdh:{name:"ECDH",namedCurve:"P-256"},jwk:function(e,t){var r={kty:"EC",crv:"P-256",x:(e=e.split("."))[0],y:e[1],ext:!0};return r.key_ops=t?["sign"]:["verify"],t&&(r.d=t),r},keyToJwk:function(e){return{kty:"oct",k:e.toString("base64").replace(/\+/g,"-").replace(/\//g,"_").replace(/\=/g,""),ext:!1,alg:"A256GCM"}},recall:{validity:43200,hook:function(e){return e}},check:function(e){return"string"==typeof e&&"SEA{"===e.slice(0,4)},parse:async function(e){try{var t="string"==typeof e;return t&&"SEA{"===e.slice(0,4)&&(e=e.slice(3)),t?await n.parse(e):e}catch(e){}return e}};r.opt=i,e.exports=i}))(t,"./settings"),t((function(e){var r=t("./shim");e.exports=async function(e,t){var n="string"==typeof e?e:await r.stringify(e),i=await r.subtle.digest({name:t||"SHA-256"},(new r.TextEncoder).encode(n));return r.Buffer.from(i)}}))(t,"./sha256"),t((function(e){const r=t("./shim"),n=r.subtle,i=r.ossl?r.ossl:n;e.exports=e=>i.digest({name:"SHA-1"},new ArrayBuffer(e))}))(t,"./sha1"),t((function(e){var r=t("./root"),n=t("./shim"),i=t("./settings"),o=t("./sha256");r.work=r.work||(async(e,t,s,a)=>{try{var u=(t||{}).epub||t;if(a=a||{},u instanceof Function&&(s=u,u=void 0),e="string"==typeof e?e:await n.stringify(e),"sha"===(a.name||"").toLowerCase().slice(0,3)){var c=n.Buffer.from(await o(e,a.name),"binary").toString(a.encode||"base64");if(s)try{s(c)}catch(e){console.log(e)}return c}u=u||n.random(9);var l=await(n.ossl||n.subtle).importKey("raw",(new n.TextEncoder).encode(e),{name:a.name||"PBKDF2"},!1,["deriveBits"]),f=await(n.ossl||n.subtle).deriveBits({name:a.name||"PBKDF2",iterations:a.iterations||i.pbkdf2.iter,salt:(new n.TextEncoder).encode(a.salt||u),hash:a.hash||i.pbkdf2.hash},l,a.length||8*i.pbkdf2.ks);e=n.random(e.length);var h=n.Buffer.from(f,"binary").toString(a.encode||"base64");if(s)try{s(h)}catch(e){console.log(e)}return h}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(s&&s())}}),e.exports=r.work}))(t,"./work"),t((function(e){var r=t("./root"),n=t("./shim");t("./settings"),r.name=r.name||(async(e,t)=>{try{if(e)try{e()}catch(e){console.log(e)}return}catch(t){if(console.log(t),r.err=t,r.throw)throw t;return void(e&&e())}}),r.pair=r.pair||(async(e,t)=>{try{var i=n.ossl||n.subtle,o=await n.subtle.generateKey({name:"ECDSA",namedCurve:"P-256"},!0,["sign","verify"]).then((async e=>{var t={};t.priv=(await n.subtle.exportKey("jwk",e.privateKey)).d;var r=await n.subtle.exportKey("jwk",e.publicKey);return t.pub=r.x+"."+r.y,t}));try{var s=await i.generateKey({name:"ECDH",namedCurve:"P-256"},!0,["deriveKey"]).then((async e=>{var t={};t.epriv=(await i.exportKey("jwk",e.privateKey)).d;var r=await i.exportKey("jwk",e.publicKey);return t.epub=r.x+"."+r.y,t}))}catch(e){if(r.window)throw e;if("Error: ECDH is not a supported algorithm"!=e)throw e;console.log("Ignoring ECDH...")}s=s||{};var a={pub:o.pub,priv:o.priv,epub:s.epub,epriv:s.epriv};if(e)try{e(a)}catch(e){console.log(e)}return a}catch(t){if(console.log(t),r.err=t,r.throw)throw t;return void(e&&e())}}),e.exports=r.pair}))(t,"./pair"),t((function(e){var r,n=t("./root"),i=t("./shim"),o=t("./settings"),s=t("./sha256");n.sign=n.sign||(async(e,t,a,u)=>{try{if(u=u||{},!(t||u).priv){if(!n.I)throw"No signing key.";t=await n.I(null,{what:e,how:"sign",why:u.why})}if(r===e)throw"`undefined` not allowed.";var c=await o.parse(e),l=u.check=u.check||c;if(n.verify&&(n.opt.check(l)||l&&l.s&&l.m)&&r!==await n.verify(l,t)){var f=await o.parse(l);if(u.raw||(f="SEA"+await i.stringify(f)),a)try{a(f)}catch(e){console.log(e)}return f}var h=t.pub,d=t.priv,p=o.jwk(h,d),g=await s(c),b=await(i.ossl||i.subtle).importKey("jwk",p,{name:"ECDSA",namedCurve:"P-256"},!1,["sign"]).then((e=>(i.ossl||i.subtle).sign({name:"ECDSA",hash:{name:"SHA-256"}},e,new Uint8Array(g))));if(f={m:c,s:i.Buffer.from(b,"binary").toString(u.encode||"base64")},u.raw||(f="SEA"+await i.stringify(f)),a)try{a(f)}catch(e){console.log(e)}return f}catch(e){if(console.log(e),n.err=e,n.throw)throw e;return void(a&&a())}}),e.exports=n.sign}))(t,"./sign"),t((function(e){var r,n=t("./root"),i=t("./shim"),o=t("./settings"),s=t("./sha256");n.verify=n.verify||(async(e,t,a,u)=>{try{var c=await o.parse(e);if(!1===t){var l=await o.parse(c.m);if(a)try{a(l)}catch(e){console.log(e)}return l}u=u||{};var f,h,d,p=t.pub||t,g=n.opt.slow_leak?await n.opt.slow_leak(p):await(i.ossl||i.subtle).importKey("jwk",o.jwk(p),{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]),b=await s(c.m);try{if(f=i.Buffer.from(c.s,u.encode||"base64"),h=new Uint8Array(f),!(d=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},g,h,new Uint8Array(b))))throw"Signature did not match."}catch(r){if(n.opt.fallback)return await n.opt.fall_verify(e,t,a,u)}var y=d?await o.parse(c.m):r;if(a)try{a(y)}catch(e){console.log(e)}return y}catch(e){if(console.log(e),n.err=e,n.throw)throw e;return void(a&&a())}}),e.exports=n.verify;var a={},u=(n.opt.slow_leak=e=>{if(a[e])return a[e];var t=o.jwk(e);return a[e]=(i.ossl||i.subtle).importKey("jwk",t,{name:"ECDSA",namedCurve:"P-256"},!1,["verify"]),a[e]},n.opt);n.opt.fall_verify=async function(e,t,a,c,l){if(l===n.opt.fallback)throw"Signature did not match";l=l||1;var f=e||"";e=n.opt.unpack(e)||e;var h,d,p,g=await o.parse(e),b=t.pub||t,y=await n.opt.slow_leak(b),m=l<=n.opt.fallback?i.Buffer.from(await i.subtle.digest({name:"SHA-256"},(new i.TextEncoder).encode(await o.parse(g.m)))):await s(g.m);try{if(h=i.Buffer.from(g.s,c.encode||"base64"),d=new Uint8Array(h),!(p=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},y,d,new Uint8Array(m))))throw"Signature did not match."}catch(e){try{h=i.Buffer.from(g.s,"utf8"),d=new Uint8Array(h),p=await(i.ossl||i.subtle).verify({name:"ECDSA",hash:{name:"SHA-256"}},y,d,new Uint8Array(m))}catch(e){if(!p)throw"Signature did not match."}}var v=p?await o.parse(g.m):r;if(u.fall_soul=f["#"],u.fall_key=f["."],u.fall_val=e,u.fall_state=f[">"],a)try{a(v)}catch(e){console.log(e)}return v},n.opt.fallback=2}))(t,"./verify"),t((function(e){var r=t("./shim"),n=t("./settings"),i=t("./sha256");e.exports=async(e,t,o)=>{o=o||{};const s=e+(t||r.random(8)).toString("utf8"),a=r.Buffer.from(await i(s),"binary"),u=n.keyToJwk(a);return await r.subtle.importKey("jwk",u,{name:"AES-GCM"},!1,["encrypt","decrypt"])}}))(t,"./aeskey"),t((function(e){var r=t("./root"),n=t("./shim"),i=(t("./settings"),t("./aeskey"));r.encrypt=r.encrypt||(async(e,t,o,s)=>{try{s=s||{};var a=(t||s).epriv||t;if(void 0===e)throw"`undefined` not allowed.";if(!a){if(!r.I)throw"No encryption key.";a=(t=await r.I(null,{what:e,how:"encrypt",why:s.why})).epriv||t}var u="string"==typeof e?e:await n.stringify(e),c={s:n.random(9),iv:n.random(15)},l=await i(a,c.s,s).then((e=>n.subtle.encrypt({name:s.name||"AES-GCM",iv:new Uint8Array(c.iv)},e,(new n.TextEncoder).encode(u)))),f={ct:n.Buffer.from(l,"binary").toString(s.encode||"base64"),iv:c.iv.toString(s.encode||"base64"),s:c.s.toString(s.encode||"base64")};if(s.raw||(f="SEA"+await n.stringify(f)),o)try{o(f)}catch(e){console.log(e)}return f}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(o&&o())}}),e.exports=r.encrypt}))(t,"./encrypt"),t((function(e){var r=t("./root"),n=t("./shim"),i=t("./settings"),o=t("./aeskey");r.decrypt=r.decrypt||(async(e,t,s,a)=>{try{a=a||{};var u=(t||a).epriv||t;if(!u){if(!r.I)throw"No decryption key.";u=(t=await r.I(null,{what:e,how:"decrypt",why:a.why})).epriv||t}var c,l,f,h=await i.parse(e);try{c=n.Buffer.from(h.s,a.encode||"base64"),l=n.Buffer.from(h.iv,a.encode||"base64"),f=n.Buffer.from(h.ct,a.encode||"base64");var d=await o(u,c,a).then((e=>n.subtle.decrypt({name:a.name||"AES-GCM",iv:new Uint8Array(l),tagLength:128},e,new Uint8Array(f))))}catch(n){if("utf8"===a.encode)throw"Could not decrypt";if(r.opt.fallback)return a.encode="utf8",await r.decrypt(e,t,s,a)}var p=await i.parse(new n.TextDecoder("utf8").decode(d));if(s)try{s(p)}catch(e){console.log(e)}return p}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(s&&s())}}),e.exports=r.decrypt}))(t,"./decrypt"),t((function(e){var r=t("./root"),n=t("./shim");t("./settings"),r.secret=r.secret||(async(e,t,o,s)=>{try{if(s=s||{},!t||!t.epriv||!t.epub){if(!r.I)throw"No secret mix.";t=await r.I(null,{what:e,how:"secret",why:s.why})}var a=e.epub||e,u=t.epub,c=t.epriv,l=n.ossl||n.subtle,f=i(a),h=Object.assign({public:await l.importKey(...f,!0,[])},{name:"ECDH",namedCurve:"P-256"}),d=i(u,c),p=await l.importKey(...d,!1,["deriveBits"]).then((async e=>{var t=await l.deriveBits(h,e,256),r=new Uint8Array(t),n=await l.importKey("raw",r,{name:"AES-GCM",length:256},!0,["encrypt","decrypt"]);return l.exportKey("jwk",n).then((({k:e})=>e))}));if(o)try{o(p)}catch(e){console.log(e)}return p}catch(e){if(console.log(e),r.err=e,r.throw)throw e;return void(o&&o())}});var i=(e,t)=>{var[r,n]=e.split("."),i=t?{d:t}:{};return["jwk",Object.assign(i,{x:r,y:n,kty:"EC",crv:"P-256",ext:!0}),{name:"ECDH",namedCurve:"P-256"}]};e.exports=r.secret}))(t,"./secret"),t((function(e){var r=t("./root");r.certify=r.certify||(async(e,t={},n,i,o={})=>{try{if(console.log("SEA.certify() is an early experimental community supported method that may change API behavior without warning in any future version."),e=(()=>{var t=[];if(e){if(("string"==typeof e||Array.isArray(e))&&e.indexOf("*")>-1)return"*";if("string"==typeof e)return e;if(Array.isArray(e)){if(1===e.length&&e[0])return"object"==typeof e[0]&&e[0].pub?e[0].pub:"string"==typeof e[0]?e[0]:null;e.map((e=>{"string"==typeof e?t.push(e):"object"==typeof e&&e.pub&&t.push(e.pub)}))}return"object"==typeof e&&e.pub?e.pub:t.length>0?t:null}})(),!e)return console.log("No certificant found.");const a=!o.expiry||"number"!=typeof o.expiry&&"string"!=typeof o.expiry?null:parseFloat(o.expiry),u=(t||{}).read?t.read:null,c=(t||{}).write?t.write:"string"==typeof t||Array.isArray(t)||t["+"]||t["#"]||t["."]||t["="]||t["*"]||t[">"]||t["<"]?t:null,l=(o||{}).block||(o||{}).blacklist||(o||{}).ban||{},f=l.read&&("string"==typeof l.read||(l.read||{})["#"])?l.read:null,h="string"==typeof l?l:l.write&&("string"==typeof l.write||l.write["#"])?l.write:null;if(!u&&!c)return console.log("No policy found.");const d=JSON.stringify({c:e,...a?{e:a}:{},...u?{r:u}:{},...c?{w:c}:{},...f?{rb:f}:{},...h?{wb:h}:{}});var s=await r.sign(d,n,null,{raw:1});if(o.raw||(s="SEA"+JSON.stringify(s)),i)try{i(s)}catch(e){console.log(e)}return s}catch(e){if(r.err=e,r.throw)throw e;return void(i&&i())}}),e.exports=r.certify}))(t,"./certify"),t((function(e){var r=t("./shim"),n=t("./root");n.work=t("./work"),n.sign=t("./sign"),n.verify=t("./verify"),n.encrypt=t("./encrypt"),n.decrypt=t("./decrypt"),n.certify=t("./certify"),n.random=n.random||r.random,n.Buffer=n.Buffer||t("./buffer"),n.keyid=n.keyid||(async e=>{try{const t=r.Buffer.concat(e.replace(/-/g,"+").replace(/_/g,"/").split(".").map((e=>r.Buffer.from(e,"base64")))),n=r.Buffer.concat([r.Buffer.from([153,t.length/256,t.length%256]),t]),i=await sha1hash(n),o=r.Buffer.from(i,"binary");return o.toString("hex",o.length-8)}catch(e){throw console.log(e),e}}),((n.window||{}).GUN||{}).SEA=n,e.exports=n}))(t,"./sea"),t((function(e){var r,n=t("./sea");function o(e){this._={$:this}}function s(){return r.state().toString(36).replace(".","")}r=n.window?n.window.GUN||{chain:{}}:t((void 0+""==typeof i?".":"")+"./gun",1),n.GUN=r,o.prototype=function(){function e(){}return e.prototype=r.chain,new e}(),o.prototype.constructor=o,r.chain.user=function(e){var t,r=this.back(-1);if(e)return e=n.opt.pub((e._||"")["#"])||e,r.get("~"+e);if(t=r.back("user"))return t;var i=r=r._,a=i.opt.uuid||s;return(i=(t=i.user=this.chain(new o))._).opt={},i.opt.uuid=function(e){var t=a(),n=r.user;return n&&(n=n.is)&&(n=n.pub)?(t="~"+n+"/"+t,e&&e.call&&e(null,t),t):t},t},r.User=o,o.GUN=r,o.SEA=r.SEA=n,e.exports=o}))(t,"./user"),t((function(e){var r;(""+r!=typeof GUN?GUN||{chain:{}}:t((""+r==typeof i?".":"")+"./gun",1)).chain.then=function(e,t){var r=this,n=new Promise((function(e,n){r.once(e,t)}));return e?n.then(e):n}}))(t,"./then"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};r.prototype.create=function(...e){var t,r="object"==typeof e[0]&&(e[0].pub||e[0].epub)?e[0]:"object"==typeof e[1]&&(e[1].pub||e[1].epub)?e[1]:null,s=r&&(r.pub||r.epub)?r.pub:"string"==typeof e[0]?e[0]:null,a=r&&(r.pub||r.epub)?r:s&&"string"==typeof e[1]?e[1]:null,u=e.filter((e=>"function"==typeof e))[0]||null,c=e&&e.length>1&&"object"==typeof e[e.length-1]?e[e.length-1]:{},l=this,f=l._,h=l.back(-1);if(u=u||o,!1!==(c=c||{}).check&&(s||(t="No user."),(a||"").length<8&&(t="Password too short!"),t))return u({err:i.log(t)}),l;if(f.ing)return(u||o)({err:i.log("User is already being created or authenticated!"),wait:!0}),l;f.ing=!0;var d={a:function(e){if(d.pubs=e,e&&!c.already){var t={err:i.log("User already created!")};return f.ing=!1,(u||o)(t),void l.leave()}d.salt=String.random(64),n.work(a,d.salt,d.b)},b:function(e){d.proof=e,r?d.c(r):n.pair(d.c)},c:function(e){var t;d.pair=e||{},(t=f.root.user)&&(t._.sea=e,t.is={pub:e.pub,epub:e.epub,alias:s}),d.data={pub:e.pub},d.d()},d:function(){d.data.alias=s,d.e()},e:function(){d.data.epub=d.pair.epub,n.encrypt({priv:d.pair.priv,epriv:d.pair.epriv},d.proof,d.f,{raw:1})},f:function(e){d.data.auth=JSON.stringify({ek:e,s:d.salt}),d.g(d.data.auth)},g:function(e){var t;d.data.auth=d.data.auth||e,h.get(t="~"+d.pair.pub).put(d.data).on(d.h);var r={};r[t]={"#":t},h.get("~@"+s).put(r).get(t).on(d.i)},h:function(e,t,r,n){n.off(),d.h.ok=1,d.i()},i:function(e,t,n,i){i&&(d.i.ok=1,i.off()),d.h.ok&&d.i.ok&&(f.ing=!1,u({ok:0,pub:d.pair.pub}),o===u&&(r?l.auth(r):l.auth(s,a)))}};return h.get("~@"+s).once(d.a),l},r.prototype.leave=function(e,t){var r=this.back(-1)._.user;if(r&&(delete r.is,delete r._.is,delete r._.sea),n.window)try{var i={};delete(i=n.window.sessionStorage).recall,delete i.pair}catch(e){}return this}}))(t,"./create"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};function s(e){if("string"!=typeof e)return e;try{e=JSON.parse(e)}catch(t){e={}}return e}r.prototype.auth=function(...e){var t="object"==typeof e[0]&&(e[0].pub||e[0].epub)?e[0]:"object"==typeof e[1]&&(e[1].pub||e[1].epub)?e[1]:null,r=t||"string"!=typeof e[0]?null:e[0],a=!r&&(!t||t.priv&&t.epriv)||"string"!=typeof e[1]?null:e[1],u=e.filter((e=>"function"==typeof e))[0]||null,c=e&&e.length>1&&"object"==typeof e[e.length-1]?e[e.length-1]:{},l=this,f=l._,h=l.back(-1);if(f.ing)return(u||o)({err:i.log("User is already being created or authenticated!"),wait:!0}),l;f.ing=!0;var d,p={},g=9;return p.a=function(e){if(!e)return p.b();if(!e.pub){var t=[];return Object.keys(e).forEach((function(r){"_"!=r&&t.push(e[r])})),p.b(t)}if(p.name)return p.f(e);p.c((p.data=e).auth)},p.b=function(e){var t=(p.list=(p.list||[]).concat(e||[])).shift();if(d===t)return p.name?p.err("Your user account is not published for dApps to access, please consider syncing it online, or allowing local access by adding your device as a peer."):r&&g--?void h.get("~@"+r).once(p.a):p.err("Wrong user or password.");h.get(t).once(p.a)},p.c=function(e){return d===e?p.b():"string"==typeof e?p.c(s(e)):void n.work(a,(p.auth=e).s,p.d,p.enc)},p.d=function(e){n.decrypt(p.auth.ek,e,p.e,p.enc)},p.e=function(e){if(d===e)return p.enc?(p.enc=null,p.b()):(p.enc={encode:"utf8"},p.c(p.auth));p.half=e,p.f(p.data)},p.f=function(e){var t=p.half||{},r=p.data||{};p.g(p.lol={pub:e.pub||r.pub,epub:e.epub||r.epub,priv:e.priv||t.priv,epriv:e.epriv||t.epriv})},p.g=function(e){if(!e||!e.pub||!e.epub)return p.b();p.pair=e;var t=h._.user,g=t._,b=(g.tag,g.opt);(g=t._=h.get("~"+e.pub)._).opt=b,t.is={pub:e.pub,epub:e.epub,alias:r||e.pub},g.sea=p.pair,f.ing=!1;try{a&&d==(s(f.root.graph["~"+e.pub].auth)||"")[":"]&&(c.shuffle=c.change=a)}catch(e){}if(c.change?p.z():(u||o)(g),n.window&&(l.back("user")._.opt||c).remember)try{var y={};(y=n.window.sessionStorage).recall=!0,y.pair=JSON.stringify(e)}catch(e){}try{h._.tag.auth?h._.on("auth",g):setTimeout((function(){h._.on("auth",g)}),1)}catch(e){i.log("Your 'auth' callback crashed with:",e)}},p.h=function(e){return e?((r=e.alias)||(r=e.alias="~"+t.pub),e.auth?(t=null,void p.c((p.data=e).auth)):p.g(t)):p.b()},p.z=function(){p.salt=String.random(64),n.work(c.change,p.salt,p.y)},p.y=function(e){n.encrypt({priv:p.pair.priv,epriv:p.pair.epriv},e,p.x,{raw:1})},p.x=function(e){p.w(JSON.stringify({ek:e,s:p.salt}))},p.w=function(e){if(c.shuffle){console.log("migrate core account from UTF8 & shuffle");var t={};Object.keys(p.data).forEach((function(e){t[e]=p.data[e]})),delete t._,t.auth=e,h.get("~"+p.pair.pub).put(t)}h.get("~"+p.pair.pub).get("auth").put(e,u||o)},p.err=function(e){var t={err:i.log(e||"User cannot be found!")};f.ing=!1,(u||o)(t)},p.plugin=function(e){if(!(p.name=e))return p.err();var t=[e];"~"!==e[0]&&(t[1]="~"+e,t[2]="~@"+e),p.b(t)},t?t.priv&&t.epriv?p.g(t):h.get("~"+t.pub).once(p.h):r?h.get("~@"+r).once(p.a):r||a||n.name(p.plugin),l}}))(t,"./auth"),t((function(e){var r=t("./user"),n=r.SEA;r.GUN,r.prototype.recall=function(e,t){var r=this,i=r.back(-1);if((e=e||{})&&e.sessionStorage){if(n.window)try{var o;(o=n.window.sessionStorage)&&(i._.opt.remember=!0,(r.back("user")._.opt||e).remember=!0,(o.recall||o.pair)&&i.user().auth(JSON.parse(o.pair),t))}catch(e){}return r}return r}}))(t,"./recall"),t((function(e){var r=t("./user"),n=r.SEA,i=r.GUN,o=function(){};r.prototype.pair=function(){var e,t=this;try{e=new Proxy({DANGER:"☠"},{get:function(e,r,n){if(t.is&&(t._||"").sea)return t._.sea[r]}})}catch(e){}return e},r.prototype.delete=async function(e,t,r){console.log("user.delete() IS DEPRECATED AND WILL BE MOVED TO A MODULE!!!");var n=this,s=(n.back(-1),n.back("user"));try{s.auth(e,t,(function(e){(s.is||{}).pub,s.map().once((function(){this.put(null)})),s.leave(),(r||o)({ok:0})}))}catch(e){i.log("User.delete failed! Error:",e)}return n},r.prototype.alive=async function(){console.log("user.alive() IS DEPRECATED!!!");const e=this.back(-1);try{return await authRecall(e),e._.user._}catch(e){const t="No session!";throw i.log(t),{err:t}}},r.prototype.trust=async function(e){console.log("`.trust` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!"),i.is(e)&&e.get("pub").get(((e,t)=>{console.log(e,t)})),e.get("trust").get(path).put(theirPubkey)},r.prototype.grant=function(e,t){console.log("`.grant` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!");var r=this,i=r.back(-1).user(),o=i._.sea,s="";return r.back((function(e){e.is||(s+=e.get||"")})),async function(){var r,a=await i.get("grant").get(o.pub).get(s).then();(a=await n.decrypt(a,o))||(a=n.random(16).toString(),r=await n.encrypt(a,o),i.get("grant").get(o.pub).get(s).put(r));var u=e.get("pub").then(),c=e.get("epub").then();u=await u,c=await c;var l=await n.secret(c,o);r=await n.encrypt(a,l),i.get("grant").get(u).get(s).put(r,t)}(),r},r.prototype.secret=function(e,t){console.log("`.secret` API MAY BE DELETED OR CHANGED OR RENAMED, DO NOT USE!");var r=this,i=r.back(-1).user(),o=i.pair(),s="";return r.back((function(e){e.is||(s+=e.get||"")})),async function(){var a,u=await i.get("trust").get(o.pub).get(s).then();(u=await n.decrypt(u,o))||(u=n.random(16).toString(),a=await n.encrypt(u,o),i.get("trust").get(o.pub).get(s).put(a)),a=await n.encrypt(e,u),r.put(a,t)}(),r},e.exports=r}))(t,"./share"),t((function(e){var r,n=t("./sea"),o=t("./settings"),s=(n.window||"").GUN||t((""+r==typeof i?".":"")+"./gun",1);function a(e){var t,r=this,i=r.as,o=e.put,u=o["#"],c=o["."],l=o[":"],f=o[">"],h=e["#"];if(u&&c)if((e._||"").faith&&(i.opt||"").faith&&"function"==typeof e._)n.opt.pack(o,(function(t){n.verify(t,!1,(function(t){o["="]=n.opt.unpack(t),r.to.next(e)}))}));else{var d=function(t){i.on("in",{"@":h,err:e.err=t})};(e._||"").DBG&&((e._||"").DBG.c=+new Date),0<=u.indexOf("<?")&&(t=parseFloat(u.split("<?")[1]||""))&&f<s.state()-1e3*t?(t=e._)&&t.stun&&t.stun--:"~@"!==u?"~@"!==u.slice(0,2)?(t=n.opt.pub(u))?a.pub(r,e,l,c,u,i,d,i.user||"",t):0<=u.indexOf("#")?a.hash(r,e,l,c,u,i,d):a.any(r,e,l,c,u,i,d,i.user||""):a.pubs(r,e,l,c,u,i,d):a.alias(r,e,l,c,u,i,d)}}s.on("opt",(function(e){e.sea||(e.sea={own:{}},e.on("put",a,e)),this.to.next(e)})),a.hash=function(e,t,r,i,o,s,a){n.work(r,null,(function(r){return r&&r===i.split("#").slice(-1)[0]||r&&r===function(e){let t="";for(let r=0;r<e.length;r++)t+=r-1&1?"":String.fromCharCode(parseInt(e.substring(r-1,r+1),16));return btoa(t)}(i.split("#").slice(-1)[0])?e.to.next(t):void a("Data hash not same as hash!")}),{name:"SHA-256"})},a.alias=function(e,t,r,n,i,o,s){return r?"~@"+n===c(r)?e.to.next(t):void s("Alias not same!"):s("Data must exist!")},a.pubs=function(e,t,r,n,i,o,s){return r?n===c(r)?e.to.next(t):void s("Alias not same!"):s("Alias must exist!")},a.pub=async function(e,t,i,a,u,l,f,h,d){var p;const g=await o.parse(i)||{},b=(i,o,c)=>{if(i.m&&i.s&&o&&d)return n.verify(i,d,(n=>{if(r!==n&&r!==n.e&&t.put[">"]&&t.put[">"]>parseFloat(n.e))return f("Certificate expired.");if(r!==n&&n.c&&n.w&&(n.c===o||n.c.indexOf("*")>-1)){let t=u.indexOf("/")>-1?u.replace(u.substring(0,u.indexOf("/")+1),""):"";String.match=String.match||s.text.match;const r=Array.isArray(n.w)?n.w:"object"==typeof n.w||"string"==typeof n.w?[n.w]:[];for(const s of r)if(String.match(t,s["#"])&&String.match(a,s["."])||!s["."]&&String.match(t,s["#"])||!s["#"]&&String.match(a,s["."])||String.match(t?t+"/"+a:a,s["#"]||s)){if(s["+"]&&s["+"].indexOf("*")>-1&&t&&-1==t.indexOf(o)&&-1==a.indexOf(o))return f(`Path "${t}" or key "${a}" must contain string "${o}".`);if(n.wb&&("string"==typeof n.wb||(n.wb||{})["#"])){var i=e.as.root.$.back(-1);return"string"==typeof n.wb&&"~"!==n.wb.slice(0,1)&&(i=i.get("~"+d)),i.get(n.wb).get(o).once((e=>!e||1!==e&&!0!==e?c(n):f(`Certificant ${o} blocked.`)))}return c(n)}return f("Certificate verification fail.")}}))};if("pub"===a&&"~"+d===u)return i===d?e.to.next(t):f("Account not same!");(p=h.is)&&p.pub&&!g["*"]&&!g["+"]&&(d===p.pub||d!==p.pub&&((t._.msg||{}).opt||{}).cert)?n.opt.pack(t.put,(s=>{n.sign(s,h._.sea,(async function(s){if(r===s)return f(n.err||"Signature fail.");if(t.put[":"]={":":p=n.opt.unpack(s.m),"~":s.s},t.put["="]=p,d===h.is.pub)return(p=c(i))&&((l.sea.own[p]=l.sea.own[p]||{})[d]=1),void JSON.stringifyAsync(t.put[":"],(function(r,n){return r?f(r||"Stringify error."):(t.put[":"]=n,e.to.next(t))}));if(d!==h.is.pub&&((t._.msg||{}).opt||{}).cert){const r=await o.parse(t._.msg.opt.cert);r&&r.m&&r.s&&b(r,h.is.pub,(n=>{t.put[":"]["+"]=r,t.put[":"]["*"]=h.is.pub,JSON.stringifyAsync(t.put[":"],(function(r,n){return r?f(r||"Stringify error."):(t.put[":"]=n,e.to.next(t))}))}))}}),{raw:1})})):n.opt.pack(t.put,(i=>{n.verify(i,g["*"]||d,(function(i){var o;return i=n.opt.unpack(i),r===i?f("Unverified data."):((o=c(i))&&d===n.opt.pub(o)&&((l.sea.own[o]=l.sea.own[o]||{})[d]=1),g["+"]&&g["+"].m&&g["+"].s&&g["*"]?void b(g["+"],g["*"],(r=>(t.put["="]=i,e.to.next(t)))):(t.put["="]=i,e.to.next(t)))}))}))},a.any=function(e,t,r,n,i,o,s,a){if(o.opt.secure)return s("Soul missing public key at '"+n+"'.");o.on("secure",(function(t){if(this.off(),!o.opt.secure)return e.to.next(t);s("Data cannot be changed.")})).on.on("secure",t)};var u=s.valid,c=function(e,t){return"string"==typeof(t=u(e))&&t},l=((s.state||"").ify,/[^\w_-]/);n.opt.pub=function(e){if(e&&(e=e.split("~"))&&(e=e[1])&&(e=e.split(l).slice(0,2))&&2==e.length&&"@"!==(e[0]||"")[0])return e.slice(0,2).join(".")},n.opt.stringy=function(e){},n.opt.pack=function(e,t,i,o,a){var u,c;if(n.opt.check(e))return t(e);e&&e["#"]&&e["."]&&e[">"]&&(u=e[":"],c=1),JSON.parseAsync(c?u:e,(function(n,u){var c=r!==(u||"")[":"]&&(u||"")["~"];t(c?{m:{"#":a||e["#"],".":i||e["."],":":(u||"")[":"],">":e[">"]||s.state.is(o,i)},s:c}:e)}))};var f=n.opt;n.opt.unpack=function(e,t,i){var o;if(r!==e){if(e&&r!==(o=e[":"]))return o;if(t=t||f.fall_key,!i&&f.fall_val&&((i={})[t]=f.fall_val),t&&i){if(e===i[t])return e;if(!n.opt.check(i[t]))return e;var a=i&&i._&&i._["#"]||f.fall_soul,u=s.state.is(i,t)||f.fall_state;return e&&4===e.length&&a===e[0]&&t===e[1]&&h(u)===h(e[3])?e[2]:u<n.opt.shuffle_attack?e:void 0}}},n.opt.shuffle_attack=15463296e5;var h=Math.floor}))(t,"./index")}()},38664:()=>{},38672:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbstractProvider=t.UnmanagedSubscriber=void 0;const n=r(30646),i=r(1295),o=r(49288),s=r(23562),a=r(77778),u=r(75347),c=r(41691),l=r(35601),f=r(57698),h=r(63807),d=r(34338),p=BigInt(2);function g(e){return e&&"function"==typeof e.then}function b(e,t){return e+":"+JSON.stringify(t,((e,t)=>{if(null==t)return"null";if("bigint"==typeof t)return`bigint:${t.toString()}`;if("string"==typeof t)return t.toLowerCase();if("object"==typeof t&&!Array.isArray(t)){const e=Object.keys(t);return e.sort(),e.reduce(((e,r)=>(e[r]=t[r],e)),{})}return t}))}class y{name;constructor(e){(0,u.defineProperties)(this,{name:e})}start(){}stop(){}pause(e){}resume(){}}function m(e){return(e=Array.from(new Set(e).values())).sort(),e}async function v(e,t){if(null==e)throw new Error("invalid event");if(Array.isArray(e)&&(e={topics:e}),"string"==typeof e)switch(e){case"block":case"debug":case"error":case"finalized":case"network":case"pending":case"safe":return{type:e,tag:e}}if((0,u.isHexString)(e,32)){const t=e.toLowerCase();return{type:"transaction",tag:b("tx",{hash:t}),hash:t}}if(e.orphan){const t=e;return{type:"orphan",tag:b("orphan",t),filter:(r=t,JSON.parse(JSON.stringify(r)))}}var r;if(e.address||e.topics){const r=e,i={topics:(r.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase()))};if(r.address){const e=[],o=[],s=r=>{(0,u.isHexString)(r)?e.push(r):o.push((async()=>{e.push(await(0,n.resolveAddress)(r,t))})())};Array.isArray(r.address)?r.address.forEach(s):s(r.address),o.length&&await Promise.all(o),i.address=m(e.map((e=>e.toLowerCase())))}return{filter:i,tag:b("event",i),type:"event"}}(0,u.assertArgument)(!1,"unknown ProviderEvent","event",e)}function w(){return(new Date).getTime()}t.UnmanagedSubscriber=y;const E={cacheTimeout:250,pollingInterval:4e3};function A(e,t){try{const r=_(e,t);if(r)return(0,u.toUtf8String)(r)}catch(e){}return null}function _(e,t){if("0x"===e)return null;try{const r=(0,u.getNumber)((0,u.dataSlice)(e,t,t+32)),n=(0,u.getNumber)((0,u.dataSlice)(e,r,r+32));return(0,u.dataSlice)(e,r+32,r+32+n)}catch(e){}return null}function S(e){const t=(0,u.toBeArray)(e);if(t.length>32)throw new Error("internal; should not happen");const r=new Uint8Array(32);return r.set(t,32-t.length),r}function P(e){if(e.length%32==0)return e;const t=new Uint8Array(32*Math.ceil(e.length/32));return t.set(e),t}t.AbstractProvider=class{#C;#R;#N;#j;#U;#L;#D;#F;#H;#z;#q;#G;constructor(e,t){if(this.#G=Object.assign({},E,t||{}),"any"===e)this.#L=!0,this.#U=null;else if(e){const t=f.Network.from(e);this.#L=!1,this.#U=Promise.resolve(t),setTimeout((()=>{this.emit("network",t,null)}),0)}else this.#L=!1,this.#U=null;this.#F=-1,this.#D=new Map,this.#C=new Map,this.#R=new Map,this.#N=null,this.#j=!1,this.#H=1,this.#z=new Map,this.#q=!1}get pollingInterval(){return this.#G.pollingInterval}get provider(){return this}get plugins(){return Array.from(this.#R.values())}attachPlugin(e){if(this.#R.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#R.set(e.name,e.connect(this)),this}getPlugin(e){return this.#R.get(e)||null}get disableCcipRead(){return this.#q}set disableCcipRead(e){this.#q=!!e}async#W(e){const t=this.#G.cacheTimeout;if(t<0)return await this._perform(e);const r=b(e.method,e);let n=this.#D.get(r);return n||(n=this._perform(e),this.#D.set(r,n),setTimeout((()=>{this.#D.get(r)===n&&this.#D.delete(r)}),t)),await n}async ccipReadFetch(e,t,r){if(this.disableCcipRead||0===r.length||null==e.to)return null;const n=e.to.toLowerCase(),i=t.toLowerCase(),o=[];for(let t=0;t<r.length;t++){const s=r[t],a=s.replace("{sender}",n).replace("{data}",i),c=new u.FetchRequest(a);-1===s.indexOf("{data}")&&(c.body={data:i,sender:n}),this.emit("debug",{action:"sendCcipReadFetchRequest",request:c,index:t,urls:r});let l,f="unknown error";try{l=await c.send()}catch(e){o.push(e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:c,result:{error:e}});continue}try{const e=l.bodyJson;if(e.data)return this.emit("debug",{action:"receiveCcipReadFetchResult",request:c,result:e}),e.data;e.message&&(f=e.message),this.emit("debug",{action:"receiveCcipReadFetchError",request:c,result:e})}catch(e){}(0,u.assert)(l.statusCode<400||l.statusCode>=500,`response not found during CCIP fetch: ${f}`,"OFFCHAIN_FAULT",{reason:"404_MISSING_RESOURCE",transaction:e,info:{url:s,errorMessage:f}}),o.push(f)}(0,u.assert)(!1,`error encountered during CCIP fetch: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"OFFCHAIN_FAULT",{reason:"500_SERVER_ERROR",transaction:e,info:{urls:r,errorMessages:o}})}_wrapBlock(e,t){return new h.Block((0,l.formatBlock)(e),this)}_wrapLog(e,t){return new h.Log((0,l.formatLog)(e),this)}_wrapTransactionReceipt(e,t){return new h.TransactionReceipt((0,l.formatTransactionReceipt)(e),this)}_wrapTransactionResponse(e,t){return new h.TransactionResponse((0,l.formatTransactionResponse)(e),this)}_detectNetwork(){(0,u.assert)(!1,"sub-classes must implement this","UNSUPPORTED_OPERATION",{operation:"_detectNetwork"})}async _perform(e){(0,u.assert)(!1,`unsupported method: ${e.method}`,"UNSUPPORTED_OPERATION",{operation:e.method,info:e})}async getBlockNumber(){const e=(0,u.getNumber)(await this.#W({method:"getBlockNumber"}),"%response");return this.#F>=0&&(this.#F=e),e}_getAddress(e){return(0,n.resolveAddress)(e,this)}_getBlockTag(e){if(null==e)return"latest";switch(e){case"earliest":return"0x0";case"finalized":case"latest":case"pending":case"safe":return e}return(0,u.isHexString)(e)?(0,u.isHexString)(e,32)?e:(0,u.toQuantity)(e):("bigint"==typeof e&&(e=(0,u.getNumber)(e,"blockTag")),"number"==typeof e?e>=0?(0,u.toQuantity)(e):this.#F>=0?(0,u.toQuantity)(this.#F+e):this.getBlockNumber().then((t=>(0,u.toQuantity)(t+e))):void(0,u.assertArgument)(!1,"invalid blockTag","blockTag",e))}_getFilter(e){const t=(e.topics||[]).map((e=>null==e?null:Array.isArray(e)?m(e.map((e=>e.toLowerCase()))):e.toLowerCase())),r="blockHash"in e?e.blockHash:void 0,n=(e,n,i)=>{let o;switch(e.length){case 0:break;case 1:o=e[0];break;default:e.sort(),o=e}if(r&&(null!=n||null!=i))throw new Error("invalid filter");const s={};return o&&(s.address=o),t.length&&(s.topics=t),n&&(s.fromBlock=n),i&&(s.toBlock=i),r&&(s.blockHash=r),s};let i,o,s=[];if(e.address)if(Array.isArray(e.address))for(const t of e.address)s.push(this._getAddress(t));else s.push(this._getAddress(e.address));return"fromBlock"in e&&(i=this._getBlockTag(e.fromBlock)),"toBlock"in e&&(o=this._getBlockTag(e.toBlock)),s.filter((e=>"string"!=typeof e)).length||null!=i&&"string"!=typeof i||null!=o&&"string"!=typeof o?Promise.all([Promise.all(s),i,o]).then((e=>n(e[0],e[1],e[2]))):n(s,i,o)}_getTransactionRequest(e){const t=(0,h.copyRequest)(e),r=[];if(["to","from"].forEach((e=>{if(null==t[e])return;const i=(0,n.resolveAddress)(t[e],this);g(i)?r.push(async function(){t[e]=await i}()):t[e]=i})),null!=t.blockTag){const e=this._getBlockTag(t.blockTag);g(e)?r.push(async function(){t.blockTag=await e}()):t.blockTag=e}return r.length?async function(){return await Promise.all(r),t}():t}async getNetwork(){if(null==this.#U){const e=(async()=>{try{const e=await this._detectNetwork();return this.emit("network",e,null),e}catch(t){throw this.#U===e&&(this.#U=null),t}})();return this.#U=e,(await e).clone()}const e=this.#U,[t,r]=await Promise.all([e,this._detectNetwork()]);return t.chainId!==r.chainId&&(this.#L?(this.emit("network",r,t),this.#U===e&&(this.#U=Promise.resolve(r))):(0,u.assert)(!1,`network changed: ${t.chainId} => ${r.chainId} `,"NETWORK_ERROR",{event:"changed"})),t.clone()}async getFeeData(){const e=await this.getNetwork(),t=async()=>{const{_block:t,gasPrice:r,priorityFee:n}=await(0,u.resolveProperties)({_block:this.#V("latest",!1),gasPrice:(async()=>{try{const e=await this.#W({method:"getGasPrice"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})(),priorityFee:(async()=>{try{const e=await this.#W({method:"getPriorityFee"});return(0,u.getBigInt)(e,"%response")}catch(e){}return null})()});let i=null,o=null;const s=this._wrapBlock(t,e);return s&&s.baseFeePerGas&&(o=null!=n?n:BigInt("1000000000"),i=s.baseFeePerGas*p+o),new h.FeeData(r,i,o)},r=e.getPlugin("org.ethers.plugins.network.FetchUrlFeeDataPlugin");if(r){const e=new u.FetchRequest(r.url),n=await r.processFunc(t,this,e);return new h.FeeData(n.gasPrice,n.maxFeePerGas,n.maxPriorityFeePerGas)}return await t()}async estimateGas(e){let t=this._getTransactionRequest(e);return g(t)&&(t=await t),(0,u.getBigInt)(await this.#W({method:"estimateGas",transaction:t}),"%response")}async#K(e,t,r){(0,u.assert)(r<10,"CCIP read exceeded maximum redirections","OFFCHAIN_FAULT",{reason:"TOO_MANY_REDIRECTS",transaction:Object.assign({},e,{blockTag:t,enableCcipRead:!0})});const i=(0,h.copyRequest)(e);try{return(0,u.hexlify)(await this._perform({method:"call",transaction:i,blockTag:t}))}catch(e){if(!this.disableCcipRead&&(0,u.isCallException)(e)&&e.data&&r>=0&&"latest"===t&&null!=i.to&&"0x556f1830"===(0,u.dataSlice)(e.data,0,4)){const o=e.data,s=await(0,n.resolveAddress)(i.to,this);let a;try{a=function(e){const t={sender:"",urls:[],calldata:"",selector:"",extraData:"",errorArgs:[]};(0,u.assert)((0,u.dataLength)(e)>=160,"insufficient OffchainLookup data","OFFCHAIN_FAULT",{reason:"insufficient OffchainLookup data"});const r=(0,u.dataSlice)(e,0,32);(0,u.assert)((0,u.dataSlice)(r,0,12)===(0,u.dataSlice)(x,0,12),"corrupt OffchainLookup sender","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup sender"}),t.sender=(0,u.dataSlice)(r,12);try{const r=[],n=(0,u.getNumber)((0,u.dataSlice)(e,32,64)),i=(0,u.getNumber)((0,u.dataSlice)(e,n,n+32)),o=(0,u.dataSlice)(e,n+32);for(let e=0;e<i;e++){const t=A(o,32*e);if(null==t)throw new Error("abort");r.push(t)}t.urls=r}catch(e){(0,u.assert)(!1,"corrupt OffchainLookup urls","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup urls"})}try{const r=_(e,64);if(null==r)throw new Error("abort");t.calldata=r}catch(e){(0,u.assert)(!1,"corrupt OffchainLookup calldata","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup calldata"})}(0,u.assert)((0,u.dataSlice)(e,100,128)===(0,u.dataSlice)(x,0,28),"corrupt OffchainLookup callbaackSelector","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup callbaackSelector"}),t.selector=(0,u.dataSlice)(e,96,100);try{const r=_(e,128);if(null==r)throw new Error("abort");t.extraData=r}catch(e){(0,u.assert)(!1,"corrupt OffchainLookup extraData","OFFCHAIN_FAULT",{reason:"corrupt OffchainLookup extraData"})}return t.errorArgs="sender,urls,calldata,selector,extraData".split(/,/).map((e=>t[e])),t}((0,u.dataSlice)(e.data,4))}catch(e){(0,u.assert)(!1,e.message,"OFFCHAIN_FAULT",{reason:"BAD_DATA",transaction:i,info:{data:o}})}(0,u.assert)(a.sender.toLowerCase()===s.toLowerCase(),"CCIP Read sender mismatch","CALL_EXCEPTION",{action:"call",data:o,reason:"OffchainLookup",transaction:i,invocation:null,revert:{signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",name:"OffchainLookup",args:a.errorArgs}});const c=await this.ccipReadFetch(i,a.calldata,a.urls);(0,u.assert)(null!=c,"CCIP Read failed to fetch data","OFFCHAIN_FAULT",{reason:"FETCH_FAILED",transaction:i,info:{data:e.data,errorArgs:a.errorArgs}});const l={to:s,data:(0,u.concat)([a.selector,O([c,a.extraData])])};this.emit("debug",{action:"sendCcipReadCall",transaction:l});try{const e=await this.#K(l,t,r+1);return this.emit("debug",{action:"receiveCcipReadCallResult",transaction:Object.assign({},l),result:e}),e}catch(e){throw this.emit("debug",{action:"receiveCcipReadCallError",transaction:Object.assign({},l),error:e}),e}}throw e}}async#$(e){const{value:t}=await(0,u.resolveProperties)({network:this.getNetwork(),value:e});return t}async call(e){const{tx:t,blockTag:r}=await(0,u.resolveProperties)({tx:this._getTransactionRequest(e),blockTag:this._getBlockTag(e.blockTag)});return await this.#$(this.#K(t,r,e.enableCcipRead?0:-1))}async#J(e,t,r){let n=this._getAddress(t),i=this._getBlockTag(r);return"string"==typeof n&&"string"==typeof i||([n,i]=await Promise.all([n,i])),await this.#$(this.#W(Object.assign(e,{address:n,blockTag:i})))}async getBalance(e,t){return(0,u.getBigInt)(await this.#J({method:"getBalance"},e,t),"%response")}async getTransactionCount(e,t){return(0,u.getNumber)(await this.#J({method:"getTransactionCount"},e,t),"%response")}async getCode(e,t){return(0,u.hexlify)(await this.#J({method:"getCode"},e,t))}async getStorage(e,t,r){const n=(0,u.getBigInt)(t,"position");return(0,u.hexlify)(await this.#J({method:"getStorage",position:n},e,r))}async broadcastTransaction(e){const{blockNumber:t,hash:r,network:n}=await(0,u.resolveProperties)({blockNumber:this.getBlockNumber(),hash:this._perform({method:"broadcastTransaction",signedTransaction:e}),network:this.getNetwork()}),i=a.Transaction.from(e);if(i.hash!==r)throw new Error("@TODO: the returned hash did not match");return this._wrapTransactionResponse(i,n).replaceableTransaction(t)}async#V(e,t){if((0,u.isHexString)(e,32))return await this.#W({method:"getBlock",blockHash:e,includeTransactions:t});let r=this._getBlockTag(e);return"string"!=typeof r&&(r=await r),await this.#W({method:"getBlock",blockTag:r,includeTransactions:t})}async getBlock(e,t){const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#V(e,!!t)});return null==n?null:this._wrapBlock(n,r)}async getTransaction(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#W({method:"getTransaction",hash:e})});return null==r?null:this._wrapTransactionResponse(r,t)}async getTransactionReceipt(e){const{network:t,params:r}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#W({method:"getTransactionReceipt",hash:e})});if(null==r)return null;if(null==r.gasPrice&&null==r.effectiveGasPrice){const t=await this.#W({method:"getTransaction",hash:e});if(null==t)throw new Error("report this; could not find tx or effectiveGasPrice");r.effectiveGasPrice=t.gasPrice}return this._wrapTransactionReceipt(r,t)}async getTransactionResult(e){const{result:t}=await(0,u.resolveProperties)({network:this.getNetwork(),result:this.#W({method:"getTransactionResult",hash:e})});return null==t?null:(0,u.hexlify)(t)}async getLogs(e){let t=this._getFilter(e);g(t)&&(t=await t);const{network:r,params:n}=await(0,u.resolveProperties)({network:this.getNetwork(),params:this.#W({method:"getLogs",filter:t})});return n.map((e=>this._wrapLog(e,r)))}_getProvider(e){(0,u.assert)(!1,"provider cannot connect to target network","UNSUPPORTED_OPERATION",{operation:"_getProvider()"})}async getResolver(e){return await c.EnsResolver.fromName(this,e)}async getAvatar(e){const t=await this.getResolver(e);return t?await t.getAvatar():null}async resolveName(e){const t=await this.getResolver(e);return t?await t.getAddress():null}async lookupAddress(e){e=(0,n.getAddress)(e);const t=(0,s.namehash)(e.substring(2).toLowerCase()+".addr.reverse");try{const r=await c.EnsResolver.getEnsAddress(this),n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],this),s=await n.resolver(t);if(null==s||s===i.ZeroAddress)return null;const a=new o.Contract(s,["function name(bytes32) view returns (string)"],this),u=await a.name(t);return await this.resolveName(u)!==e?null:u}catch(e){if((0,u.isError)(e,"BAD_DATA")&&"0x"===e.value)return null;if((0,u.isError)(e,"CALL_EXCEPTION"))return null;throw e}}async waitForTransaction(e,t,r){const n=null!=t?t:1;return 0===n?this.getTransactionReceipt(e):new Promise((async(t,i)=>{let o=null;const s=async r=>{try{const i=await this.getTransactionReceipt(e);if(null!=i&&r-i.blockNumber+1>=n)return t(i),void(o&&(clearTimeout(o),o=null))}catch(e){console.log("EEE",e)}this.once("block",s)};null!=r&&(o=setTimeout((()=>{null!=o&&(o=null,this.off("block",s),i((0,u.makeError)("timeout","TIMEOUT",{reason:"timeout"})))}),r)),s(await this.getBlockNumber())}))}async waitForBlock(e){(0,u.assert)(!1,"not implemented yet","NOT_IMPLEMENTED",{operation:"waitForBlock"})}_clearTimeout(e){const t=this.#z.get(e);t&&(t.timer&&clearTimeout(t.timer),this.#z.delete(e))}_setTimeout(e,t){null==t&&(t=0);const r=this.#H++,n=()=>{this.#z.delete(r),e()};if(this.paused)this.#z.set(r,{timer:null,func:n,time:t});else{const e=setTimeout(n,t);this.#z.set(r,{timer:e,func:n,time:w()})}return r}_forEachSubscriber(e){for(const t of this.#C.values())e(t.subscriber)}_getSubscriber(e){switch(e.type){case"debug":case"error":case"network":return new y(e.type);case"block":{const e=new d.PollingBlockSubscriber(this);return e.pollingInterval=this.pollingInterval,e}case"safe":case"finalized":return new d.PollingBlockTagSubscriber(this,e.type);case"event":return new d.PollingEventSubscriber(this,e.filter);case"transaction":return new d.PollingTransactionSubscriber(this,e.hash);case"orphan":return new d.PollingOrphanSubscriber(this,e.filter)}throw new Error(`unsupported event: ${e.type}`)}_recoverSubscriber(e,t){for(const r of this.#C.values())if(r.subscriber===e){r.started&&r.subscriber.stop(),r.subscriber=t,r.started&&t.start(),null!=this.#N&&t.pause(this.#N);break}}async#Q(e,t){let r=await v(e,this);return"event"===r.type&&t&&t.length>0&&!0===t[0].removed&&(r=await v({orphan:"drop-log",log:t[0]},this)),this.#C.get(r.tag)||null}async#Z(e){const t=await v(e,this),r=t.tag;let n=this.#C.get(r);return n||(n={subscriber:this._getSubscriber(t),tag:r,addressableMap:new WeakMap,nameMap:new Map,started:!1,listeners:[]},this.#C.set(r,n)),n}async on(e,t){const r=await this.#Z(e);return r.listeners.push({listener:t,once:!1}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#N&&r.subscriber.pause(this.#N)),this}async once(e,t){const r=await this.#Z(e);return r.listeners.push({listener:t,once:!0}),r.started||(r.subscriber.start(),r.started=!0,null!=this.#N&&r.subscriber.pause(this.#N)),this}async emit(e,...t){const r=await this.#Q(e,t);if(!r||0===r.listeners.length)return!1;const n=r.listeners.length;return r.listeners=r.listeners.filter((({listener:r,once:n})=>{const i=new u.EventPayload(this,n?null:r,e);try{r.call(this,...t,i)}catch(e){}return!n})),0===r.listeners.length&&(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),n>0}async listenerCount(e){if(e){const t=await this.#Q(e);return t?t.listeners.length:0}let t=0;for(const{listeners:e}of this.#C.values())t+=e.length;return t}async listeners(e){if(e){const t=await this.#Q(e);return t?t.listeners.map((({listener:e})=>e)):[]}let t=[];for(const{listeners:e}of this.#C.values())t=t.concat(e.map((({listener:e})=>e)));return t}async off(e,t){const r=await this.#Q(e);if(!r)return this;if(t){const e=r.listeners.map((({listener:e})=>e)).indexOf(t);e>=0&&r.listeners.splice(e,1)}return t&&0!==r.listeners.length||(r.started&&r.subscriber.stop(),this.#C.delete(r.tag)),this}async removeAllListeners(e){if(e){const{tag:t,started:r,subscriber:n}=await this.#Z(e);r&&n.stop(),this.#C.delete(t)}else for(const[e,{started:t,subscriber:r}]of this.#C)t&&r.stop(),this.#C.delete(e);return this}async addListener(e,t){return await this.on(e,t)}async removeListener(e,t){return this.off(e,t)}get destroyed(){return this.#j}destroy(){this.removeAllListeners();for(const e of this.#z.keys())this._clearTimeout(e);this.#j=!0}get paused(){return null!=this.#N}set paused(e){!!e!==this.paused&&(this.paused?this.resume():this.pause(!1))}pause(e){if(this.#F=-1,null!=this.#N){if(this.#N==!!e)return;(0,u.assert)(!1,"cannot change pause type; resume first","UNSUPPORTED_OPERATION",{operation:"pause"})}this._forEachSubscriber((t=>t.pause(e))),this.#N=!!e;for(const e of this.#z.values())e.timer&&clearTimeout(e.timer),e.time=w()-e.time}resume(){if(null!=this.#N){this._forEachSubscriber((e=>e.resume())),this.#N=null;for(const e of this.#z.values()){let t=e.time;t<0&&(t=0),e.time=w(),setTimeout(e.func,t)}}}};const k=new Uint8Array([]);function O(e){const t=[];let r=0;for(let n=0;n<e.length;n++)t.push(k),r+=32;for(let n=0;n<e.length;n++){const i=(0,u.getBytes)(e[n]);t[n]=S(r),t.push(S(i.length)),t.push(P(i)),r+=32+32*Math.ceil(i.length/32)}return(0,u.concat)(t)}const x="0x0000000000000000000000000000000000000000000000000000000000000000"},38869:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Reader=t.Writer=t.Coder=t.checkResultErrors=t.Result=t.WordSize=void 0;const n=r(75347);t.WordSize=32;const i=new Uint8Array(t.WordSize),o=["then"],s={},a=new WeakMap;function u(e){return a.get(e)}function c(e,t){a.set(e,t)}function l(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);throw r.error=t,r}function f(e,t,r){return e.indexOf(null)>=0?t.map(((e,t)=>e instanceof h?f(u(e),e,r):e)):e.reduce(((e,n,i)=>{let o=t.getValue(n);return n in e||(r&&o instanceof h&&(o=f(u(o),o,r)),e[n]=o),e}),{})}class h extends Array{#Y;constructor(...e){const t=e[0];let r=e[1],i=(e[2]||[]).slice(),a=!0;t!==s&&(r=e,i=[],a=!1),super(r.length),r.forEach(((e,t)=>{this[t]=e}));const f=i.reduce(((e,t)=>("string"==typeof t&&e.set(t,(e.get(t)||0)+1),e)),new Map);if(c(this,Object.freeze(r.map(((e,t)=>{const r=i[t];return null!=r&&1===f.get(r)?r:null})))),this.#Y=[],null==this.#Y&&this.#Y,!a)return;Object.freeze(this);const h=new Proxy(this,{get:(e,t,r)=>{if("string"==typeof t){if(t.match(/^[0-9]+$/)){const r=(0,n.getNumber)(t,"%index");if(r<0||r>=this.length)throw new RangeError("out of result range");const i=e[r];return i instanceof Error&&l(`index ${r}`,i),i}if(o.indexOf(t)>=0)return Reflect.get(e,t,r);const i=e[t];if(i instanceof Function)return function(...t){return i.apply(this===r?e:this,t)};if(!(t in e))return e.getValue.apply(this===r?e:this,[t])}return Reflect.get(e,t,r)}});return c(h,u(this)),h}toArray(e){const t=[];return this.forEach(((r,n)=>{r instanceof Error&&l(`index ${n}`,r),e&&r instanceof h&&(r=r.toArray(e)),t.push(r)})),t}toObject(e){const t=u(this);return t.reduce(((r,i,o)=>((0,n.assert)(null!=i,`value at index ${o} unnamed`,"UNSUPPORTED_OPERATION",{operation:"toObject()"}),f(t,this,e))),{})}slice(e,t){null==e&&(e=0),e<0&&(e+=this.length)<0&&(e=0),null==t&&(t=this.length),t<0&&(t+=this.length)<0&&(t=0),t>this.length&&(t=this.length);const r=u(this),n=[],i=[];for(let o=e;o<t;o++)n.push(this[o]),i.push(r[o]);return new h(s,n,i)}filter(e,t){const r=u(this),n=[],i=[];for(let o=0;o<this.length;o++){const s=this[o];s instanceof Error&&l(`index ${o}`,s),e.call(t,s,o,this)&&(n.push(s),i.push(r[o]))}return new h(s,n,i)}map(e,t){const r=[];for(let n=0;n<this.length;n++){const i=this[n];i instanceof Error&&l(`index ${n}`,i),r.push(e.call(t,i,n,this))}return r}getValue(e){const t=u(this).indexOf(e);if(-1===t)return;const r=this[t];return r instanceof Error&&l(`property ${JSON.stringify(e)}`,r.error),r}static fromItems(e,t){return new h(s,e,t)}}function d(e){let r=(0,n.toBeArray)(e);return(0,n.assert)(r.length<=t.WordSize,"value out-of-bounds","BUFFER_OVERRUN",{buffer:r,length:t.WordSize,offset:r.length}),r.length!==t.WordSize&&(r=(0,n.getBytesCopy)((0,n.concat)([i.slice(r.length%t.WordSize),r]))),r}t.Result=h,t.checkResultErrors=function(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let i in n){const o=e.slice();o.push(i);try{r(o,n[i])}catch(e){t.push({path:o,error:e})}}};return r([],e),t},t.Coder=class{name;type;localName;dynamic;constructor(e,t,r,i){(0,n.defineProperties)(this,{name:e,type:t,localName:r,dynamic:i},{name:"string",type:"string",localName:"string",dynamic:"boolean"})}_throwError(e,t){(0,n.assertArgument)(!1,e,this.localName,t)}},t.Writer=class{#X;#ee;constructor(){this.#X=[],this.#ee=0}get data(){return(0,n.concat)(this.#X)}get length(){return this.#ee}#te(e){return this.#X.push(e),this.#ee+=e.length,e.length}appendWriter(e){return this.#te((0,n.getBytesCopy)(e.data))}writeBytes(e){let r=(0,n.getBytesCopy)(e);const o=r.length%t.WordSize;return o&&(r=(0,n.getBytesCopy)((0,n.concat)([r,i.slice(o)]))),this.#te(r)}writeValue(e){return this.#te(d(e))}writeUpdatableValue(){const e=this.#X.length;return this.#X.push(i),this.#ee+=t.WordSize,t=>{this.#X[e]=d(t)}}};class p{allowLoose;#X;#e;#re;#ne;#ie;constructor(e,t,r){(0,n.defineProperties)(this,{allowLoose:!!t}),this.#X=(0,n.getBytesCopy)(e),this.#re=0,this.#ne=null,this.#ie=null!=r?r:1024,this.#e=0}get data(){return(0,n.hexlify)(this.#X)}get dataLength(){return this.#X.length}get consumed(){return this.#e}get bytes(){return new Uint8Array(this.#X)}#oe(e){if(this.#ne)return this.#ne.#oe(e);this.#re+=e,(0,n.assert)(this.#ie<1||this.#re<=this.#ie*this.dataLength,`compressed ABI data exceeds inflation ratio of ${this.#ie} ( see: https://github.com/ethers-io/ethers.js/issues/4537 )`,"BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#X),offset:this.#e,length:e,info:{bytesRead:this.#re,dataLength:this.dataLength}})}#se(e,r,i){let o=Math.ceil(r/t.WordSize)*t.WordSize;return this.#e+o>this.#X.length&&(this.allowLoose&&i&&this.#e+r<=this.#X.length?o=r:(0,n.assert)(!1,"data out-of-bounds","BUFFER_OVERRUN",{buffer:(0,n.getBytesCopy)(this.#X),length:this.#X.length,offset:this.#e+o})),this.#X.slice(this.#e,this.#e+o)}subReader(e){const t=new p(this.#X.slice(this.#e+e),this.allowLoose,this.#ie);return t.#ne=this,t}readBytes(e,t){let r=this.#se(0,e,!!t);return this.#oe(e),this.#e+=r.length,r.slice(0,e)}readValue(){return(0,n.toBigInt)(this.readBytes(t.WordSize))}readIndex(){return(0,n.toNumber)(this.readBytes(t.WordSize))}}t.Reader=p},39188:(e,t,r)=>{"use strict";var n=r(47011),i=r(39404),o=r(56698),s=r(36677),a=n.assert;function u(e){s.call(this,"short",e),this.a=new i(e.a,16).toRed(this.red),this.b=new i(e.b,16).toRed(this.red),this.tinv=this.two.redInvm(),this.zeroA=0===this.a.fromRed().cmpn(0),this.threeA=0===this.a.fromRed().sub(this.p).cmpn(-3),this.endo=this._getEndomorphism(e),this._endoWnafT1=new Array(4),this._endoWnafT2=new Array(4)}function c(e,t,r,n){s.BasePoint.call(this,e,"affine"),null===t&&null===r?(this.x=null,this.y=null,this.inf=!0):(this.x=new i(t,16),this.y=new i(r,16),n&&(this.x.forceRed(this.curve.red),this.y.forceRed(this.curve.red)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.inf=!1)}function l(e,t,r,n){s.BasePoint.call(this,e,"jacobian"),null===t&&null===r&&null===n?(this.x=this.curve.one,this.y=this.curve.one,this.z=new i(0)):(this.x=new i(t,16),this.y=new i(r,16),this.z=new i(n,16)),this.x.red||(this.x=this.x.toRed(this.curve.red)),this.y.red||(this.y=this.y.toRed(this.curve.red)),this.z.red||(this.z=this.z.toRed(this.curve.red)),this.zOne=this.z===this.curve.one}o(u,s),e.exports=u,u.prototype._getEndomorphism=function(e){if(this.zeroA&&this.g&&this.n&&1===this.p.modn(3)){var t,r;if(e.beta)t=new i(e.beta,16).toRed(this.red);else{var n=this._getEndoRoots(this.p);t=(t=n[0].cmp(n[1])<0?n[0]:n[1]).toRed(this.red)}if(e.lambda)r=new i(e.lambda,16);else{var o=this._getEndoRoots(this.n);0===this.g.mul(o[0]).x.cmp(this.g.x.redMul(t))?r=o[0]:(r=o[1],a(0===this.g.mul(r).x.cmp(this.g.x.redMul(t))))}return{beta:t,lambda:r,basis:e.basis?e.basis.map((function(e){return{a:new i(e.a,16),b:new i(e.b,16)}})):this._getEndoBasis(r)}}},u.prototype._getEndoRoots=function(e){var t=e===this.p?this.red:i.mont(e),r=new i(2).toRed(t).redInvm(),n=r.redNeg(),o=new i(3).toRed(t).redNeg().redSqrt().redMul(r);return[n.redAdd(o).fromRed(),n.redSub(o).fromRed()]},u.prototype._getEndoBasis=function(e){for(var t,r,n,o,s,a,u,c,l,f=this.n.ushrn(Math.floor(this.n.bitLength()/2)),h=e,d=this.n.clone(),p=new i(1),g=new i(0),b=new i(0),y=new i(1),m=0;0!==h.cmpn(0);){var v=d.div(h);c=d.sub(v.mul(h)),l=b.sub(v.mul(p));var w=y.sub(v.mul(g));if(!n&&c.cmp(f)<0)t=u.neg(),r=p,n=c.neg(),o=l;else if(n&&2===++m)break;u=c,d=h,h=c,b=p,p=l,y=g,g=w}s=c.neg(),a=l;var E=n.sqr().add(o.sqr());return s.sqr().add(a.sqr()).cmp(E)>=0&&(s=t,a=r),n.negative&&(n=n.neg(),o=o.neg()),s.negative&&(s=s.neg(),a=a.neg()),[{a:n,b:o},{a:s,b:a}]},u.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],i=n.b.mul(e).divRound(this.n),o=r.b.neg().mul(e).divRound(this.n),s=i.mul(r.a),a=o.mul(n.a),u=i.mul(r.b),c=o.mul(n.b);return{k1:e.sub(s).sub(a),k2:u.add(c).neg()}},u.prototype.pointFromX=function(e,t){(e=new i(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var o=n.fromRed().isOdd();return(t&&!o||!t&&o)&&(n=n.redNeg()),this.point(e,n)},u.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),i=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(i).cmpn(0)},u.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,i=this._endoWnafT2,o=0;o<e.length;o++){var s=this._endoSplit(t[o]),a=e[o],u=a._getBeta();s.k1.negative&&(s.k1.ineg(),a=a.neg(!0)),s.k2.negative&&(s.k2.ineg(),u=u.neg(!0)),n[2*o]=a,n[2*o+1]=u,i[2*o]=s.k1,i[2*o+1]=s.k2}for(var c=this._wnafMulAdd(1,n,i,2*o,r),l=0;l<2*o;l++)n[l]=null,i[l]=null;return c},o(c,s.BasePoint),u.prototype.point=function(e,t,r){return new c(this,e,t,r)},u.prototype.pointFromJSON=function(e,t){return c.fromJSON(this,e,t)},c.prototype._getBeta=function(){if(this.curve.endo){var e=this.precomputed;if(e&&e.beta)return e.beta;var t=this.curve.point(this.x.redMul(this.curve.endo.beta),this.y);if(e){var r=this.curve,n=function(e){return r.point(e.x.redMul(r.endo.beta),e.y)};e.beta=t,t.precomputed={beta:null,naf:e.naf&&{wnd:e.naf.wnd,points:e.naf.points.map(n)},doubles:e.doubles&&{step:e.doubles.step,points:e.doubles.points.map(n)}}}return t}},c.prototype.toJSON=function(){return this.precomputed?[this.x,this.y,this.precomputed&&{doubles:this.precomputed.doubles&&{step:this.precomputed.doubles.step,points:this.precomputed.doubles.points.slice(1)},naf:this.precomputed.naf&&{wnd:this.precomputed.naf.wnd,points:this.precomputed.naf.points.slice(1)}}]:[this.x,this.y]},c.fromJSON=function(e,t,r){"string"==typeof t&&(t=JSON.parse(t));var n=e.point(t[0],t[1],r);if(!t[2])return n;function i(t){return e.point(t[0],t[1],r)}var o=t[2];return n.precomputed={beta:null,doubles:o.doubles&&{step:o.doubles.step,points:[n].concat(o.doubles.points.map(i))},naf:o.naf&&{wnd:o.naf.wnd,points:[n].concat(o.naf.points.map(i))}},n},c.prototype.inspect=function(){return this.isInfinity()?"<EC Point Infinity>":"<EC Point x: "+this.x.fromRed().toString(16,2)+" y: "+this.y.fromRed().toString(16,2)+">"},c.prototype.isInfinity=function(){return this.inf},c.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},c.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),i=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),o=i.redSqr().redISub(this.x.redAdd(this.x)),s=i.redMul(this.x.redSub(o)).redISub(this.y);return this.curve.point(o,s)},c.prototype.getX=function(){return this.x.fromRed()},c.prototype.getY=function(){return this.y.fromRed()},c.prototype.mul=function(e){return e=new i(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},c.prototype.mulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i):this.curve._wnafMulAdd(1,n,i,2)},c.prototype.jmulAdd=function(e,t,r){var n=[this,t],i=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,i,!0):this.curve._wnafMulAdd(1,n,i,2,!0)},c.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},c.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},c.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},o(l,s.BasePoint),u.prototype.jpoint=function(e,t,r){return new l(this,e,t,r)},l.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},l.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},l.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),i=e.x.redMul(r),o=this.y.redMul(t.redMul(e.z)),s=e.y.redMul(r.redMul(this.z)),a=n.redSub(i),u=o.redSub(s);if(0===a.cmpn(0))return 0!==u.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=a.redSqr(),l=c.redMul(a),f=n.redMul(c),h=u.redSqr().redIAdd(l).redISub(f).redISub(f),d=u.redMul(f.redISub(h)).redISub(o.redMul(l)),p=this.z.redMul(e.z).redMul(a);return this.curve.jpoint(h,d,p)},l.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),i=this.y,o=e.y.redMul(t).redMul(this.z),s=r.redSub(n),a=i.redSub(o);if(0===s.cmpn(0))return 0!==a.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var u=s.redSqr(),c=u.redMul(s),l=r.redMul(u),f=a.redSqr().redIAdd(c).redISub(l).redISub(l),h=a.redMul(l.redISub(f)).redISub(i.redMul(c)),d=this.z.redMul(s);return this.curve.jpoint(f,h,d)},l.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t<e;t++)r=r.dbl();return r}var n=this.curve.a,i=this.curve.tinv,o=this.x,s=this.y,a=this.z,u=a.redSqr().redSqr(),c=s.redAdd(s);for(t=0;t<e;t++){var l=o.redSqr(),f=c.redSqr(),h=f.redSqr(),d=l.redAdd(l).redIAdd(l).redIAdd(n.redMul(u)),p=o.redMul(f),g=d.redSqr().redISub(p.redAdd(p)),b=p.redISub(g),y=d.redMul(b);y=y.redIAdd(y).redISub(h);var m=c.redMul(a);t+1<e&&(u=u.redMul(h)),o=g,a=m,c=y}return this.curve.jpoint(o,c.redMul(i),a)},l.prototype.dbl=function(){return this.isInfinity()?this:this.curve.zeroA?this._zeroDbl():this.curve.threeA?this._threeDbl():this._dbl()},l.prototype._zeroDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n),u=a.redSqr().redISub(s).redISub(s),c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),e=u,t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.x.redSqr(),f=this.y.redSqr(),h=f.redSqr(),d=this.x.redAdd(f).redSqr().redISub(l).redISub(h);d=d.redIAdd(d);var p=l.redAdd(l).redIAdd(l),g=p.redSqr(),b=h.redIAdd(h);b=(b=b.redIAdd(b)).redIAdd(b),e=g.redISub(d).redISub(d),t=p.redMul(d.redISub(e)).redISub(b),r=(r=this.y.redMul(this.z)).redIAdd(r)}return this.curve.jpoint(e,t,r)},l.prototype._threeDbl=function(){var e,t,r;if(this.zOne){var n=this.x.redSqr(),i=this.y.redSqr(),o=i.redSqr(),s=this.x.redAdd(i).redSqr().redISub(n).redISub(o);s=s.redIAdd(s);var a=n.redAdd(n).redIAdd(n).redIAdd(this.curve.a),u=a.redSqr().redISub(s).redISub(s);e=u;var c=o.redIAdd(o);c=(c=c.redIAdd(c)).redIAdd(c),t=a.redMul(s.redISub(u)).redISub(c),r=this.y.redAdd(this.y)}else{var l=this.z.redSqr(),f=this.y.redSqr(),h=this.x.redMul(f),d=this.x.redSub(l).redMul(this.x.redAdd(l));d=d.redAdd(d).redIAdd(d);var p=h.redIAdd(h),g=(p=p.redIAdd(p)).redAdd(p);e=d.redSqr().redISub(g),r=this.y.redAdd(this.z).redSqr().redISub(f).redISub(l);var b=f.redSqr();b=(b=(b=b.redIAdd(b)).redIAdd(b)).redIAdd(b),t=d.redMul(p.redISub(e)).redISub(b)}return this.curve.jpoint(e,t,r)},l.prototype._dbl=function(){var e=this.curve.a,t=this.x,r=this.y,n=this.z,i=n.redSqr().redSqr(),o=t.redSqr(),s=r.redSqr(),a=o.redAdd(o).redIAdd(o).redIAdd(e.redMul(i)),u=t.redAdd(t),c=(u=u.redIAdd(u)).redMul(s),l=a.redSqr().redISub(c.redAdd(c)),f=c.redISub(l),h=s.redSqr();h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=a.redMul(f).redISub(h),p=r.redAdd(r).redMul(n);return this.curve.jpoint(l,d,p)},l.prototype.trpl=function(){if(!this.curve.zeroA)return this.dbl().add(this);var e=this.x.redSqr(),t=this.y.redSqr(),r=this.z.redSqr(),n=t.redSqr(),i=e.redAdd(e).redIAdd(e),o=i.redSqr(),s=this.x.redAdd(t).redSqr().redISub(e).redISub(n),a=(s=(s=(s=s.redIAdd(s)).redAdd(s).redIAdd(s)).redISub(o)).redSqr(),u=n.redIAdd(n);u=(u=(u=u.redIAdd(u)).redIAdd(u)).redIAdd(u);var c=i.redIAdd(s).redSqr().redISub(o).redISub(a).redISub(u),l=t.redMul(c);l=(l=l.redIAdd(l)).redIAdd(l);var f=this.x.redMul(a).redISub(l);f=(f=f.redIAdd(f)).redIAdd(f);var h=this.y.redMul(c.redMul(u.redISub(c)).redISub(s.redMul(a)));h=(h=(h=h.redIAdd(h)).redIAdd(h)).redIAdd(h);var d=this.z.redAdd(s).redSqr().redISub(r).redISub(a);return this.curve.jpoint(f,h,d)},l.prototype.mul=function(e,t){return e=new i(e,t),this.curve._wnafMul(this,e)},l.prototype.eq=function(e){if("affine"===e.type)return this.eq(e.toJ());if(this===e)return!0;var t=this.z.redSqr(),r=e.z.redSqr();if(0!==this.x.redMul(r).redISub(e.x.redMul(t)).cmpn(0))return!1;var n=t.redMul(this.z),i=r.redMul(e.z);return 0===this.y.redMul(i).redISub(e.y.redMul(n)).cmpn(0)},l.prototype.eqXToP=function(e){var t=this.z.redSqr(),r=e.toRed(this.curve.red).redMul(t);if(0===this.x.cmp(r))return!0;for(var n=e.clone(),i=this.curve.redN.redMul(t);;){if(n.iadd(this.curve.n),n.cmp(this.curve.p)>=0)return!1;if(r.redIAdd(i),0===this.x.cmp(r))return!0}},l.prototype.inspect=function(){return this.isInfinity()?"<EC JPoint Infinity>":"<EC JPoint x: "+this.x.toString(16,2)+" y: "+this.y.toString(16,2)+" z: "+this.z.toString(16,2)+">"},l.prototype.isInfinity=function(){return 0===this.z.cmpn(0)}},39404:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(47790).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,n){for(var i=0,o=Math.min(e.length,r),s=t;s<o;s++){var a=e.charCodeAt(s)-48;i*=n,i+=a>=49?a-49+10:a>=17?a-17+10:a}return i}o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this.strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this.strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this.strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype.strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},o.prototype.inspect=function(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"};var l=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],f=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],h=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function d(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r.strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?l[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=f[e],d=h[e];r="";var p=this.clone();for(p.negative=0;!p.isZero();){var g=p.modn(d).toString(e);r=(p=p.idivn(d)).isZero()?g+r:l[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16)},o.prototype.toBuffer=function(e,t){return n(void 0!==s),this.toArrayLike(s,e,t)},o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0"),this.strip();var s,a,u="le"===t,c=new e(o),l=this.clone();if(u){for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[a]=s;for(;a<o;a++)c[a]=0}else{for(a=0;a<o-i;a++)c[a]=0;for(a=0;!l.isZero();a++)s=l.andln(255),l.iushrn(8),c[o-a-1]=s}return c},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this.strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this.strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this.strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this.strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this.strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this.strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var p=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,b=0|s[2],y=8191&b,m=b>>>13,v=0|s[3],w=8191&v,E=v>>>13,A=0|s[4],_=8191&A,S=A>>>13,P=0|s[5],k=8191&P,O=P>>>13,x=0|s[6],M=8191&x,B=x>>>13,T=0|s[7],I=8191&T,C=T>>>13,R=0|s[8],N=8191&R,j=R>>>13,U=0|s[9],L=8191&U,D=U>>>13,F=0|a[0],H=8191&F,z=F>>>13,q=0|a[1],G=8191&q,W=q>>>13,V=0|a[2],K=8191&V,$=V>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,le=0|a[8],fe=8191&le,he=le>>>13,de=0|a[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(g,H)|0,o=Math.imul(g,z);var ye=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,z))+Math.imul(m,H)|0,o=Math.imul(m,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,W)|0;var me=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(E,H)|0,o=Math.imul(E,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var ve=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,Z)|0;var we=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,H),i=(i=Math.imul(k,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,$)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ee=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(B,H)|0,o=Math.imul(B,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var Ae=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var _e=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,z))+Math.imul(D,H)|0,o=Math.imul(D,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,he)|0;var Pe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,W))+Math.imul(D,G)|0,o=Math.imul(D,W),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0;var ke=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,he)|0;var Oe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,he)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0;var Me=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0;var Be=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,he)|0;var Te=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ge)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,he))+Math.imul(D,fe)|0,o=Math.imul(D,he);var Ce=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ge))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ge))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=we,u[5]=Ee,u[6]=Ae,u[7]=_e,u[8]=Se,u[9]=Pe,u[10]=ke,u[11]=Oe,u[12]=xe,u[13]=Me,u[14]=Be,u[15]=Te,u[16]=Ie,u[17]=Ce,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function g(e,t,r){return(new b).mulp(e,t,r)}function b(e,t){this.x=e,this.y=t}Math.imul||(p=d),o.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?p(this,e,t):n<63?d(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,f=(0|e.words[l])*(0|t.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r.strip()}(this,e,t):g(this,e,t),r},b.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},b.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},b.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},b.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],g=n[l+d],b=r[l+d+s],y=n[l+d+s],m=f*b-h*y;y=f*y+h*b,b=m,r[l+d]=p+b,n[l+d]=g+y,r[l+d+s]=p-b,n[l+d+s]=g-y,d!==a&&(m=u*f-c*h,h=u*h+c*f,f=m)}},b.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},b.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},b.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},b.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},b.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},b.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r.strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),g(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){n("number"==typeof e),n(e<67108864);for(var t=0,r=0;r<this.length;r++){var i=(0|this.words[r])*e,o=(67108863&i)+(67108863&t);t>>=26,t+=i/67108864|0,t+=o>>>26,this.words[r]=67108863&o}return 0!==t&&(this.words[r]=t,this.length++),this.length=0===e?1:this.length,this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=(e.words[n]&1<<i)>>>i}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this.strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this.strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this.strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this.strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this.strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}return a&&a.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,i=this.length-1;i>=0;i--)r=(t*r+(0|this.words[i]))%e;return r},o.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var i=(0|this.words[r])+67108864*t;this.words[r]=i/e|0,t=i%e}return this.strip()},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new _(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var y={k256:null,p224:null,p192:null,p25519:null};function m(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function v(){m.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){m.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){m.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function A(){m.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function _(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function S(e){_.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}m.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},m.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},m.prototype.split=function(e,t){e.iushrn(this.n,0,t)},m.prototype.imulK=function(e){return e.imul(this.k)},i(v,m),v.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},v.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(w,m),i(E,m),i(A,m),A.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(y[e])return y[e];var t;if("k256"===e)t=new v;else if("p224"===e)t=new w;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new A}return y[e]=t,t},_.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},_.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},_.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},_.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},_.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},_.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},_.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},_.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},_.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},_.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},_.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},_.prototype.isqr=function(e){return this.imul(e,e.clone())},_.prototype.sqr=function(e){return this.mul(e,e)},_.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var g=d,b=0;0!==g.cmp(a);b++)g=g.redSqr();n(b<p);var y=this.pow(f,new o(1).iushln(p-b-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=b}return h},_.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},_.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},_.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},_.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new S(e)},i(S,_),S.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},S.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},S.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},S.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},S.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},39546:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var n=r(70201),i=r(26404),o=r(47058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return n.concatAll()(o.from(e,i.popScheduler(e)))}},39615:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(99175);class i extends n.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.ahash)(e);const r=(0,n.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const i=this.blockLen,o=new Uint8Array(i);o.set(r.length>i?e.create().update(r).digest():r);for(let e=0;e<o.length;e++)o[e]^=54;this.iHash.update(o),this.oHash=e.create();for(let e=0;e<o.length;e++)o[e]^=106;this.oHash.update(o),(0,n.clean)(o)}update(e){return(0,n.aexists)(this),this.iHash.update(e),this}digestInto(e){(0,n.aexists)(this),(0,n.abytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}clone(){return this._cloneInto()}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=i,t.hmac=(e,t,r)=>new i(e,t).update(r).digest(),t.hmac.create=(e,t)=>new i(e,t)},39732:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(89940),i=e=>e instanceof Uint8Array;if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t},t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},39976:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Typed=void 0;const n=r(75347),i={};function o(e,t){let r=!1;return t<0&&(r=!0,t*=-1),new u(i,`${r?"":"u"}int${t}`,e,{signed:r,width:t})}function s(e,t){return new u(i,`bytes${t||""}`,e,{size:t})}const a=Symbol.for("_ethers_typed");class u{type;value;#G;_typedSymbol;constructor(e,t,r,o){null==o&&(o=null),(0,n.assertPrivate)(i,e,"Typed"),(0,n.defineProperties)(this,{_typedSymbol:a,type:t,value:r}),this.#G=o,this.format()}format(){if("array"===this.type)throw new Error("");if("dynamicArray"===this.type)throw new Error("");return"tuple"===this.type?`tuple(${this.value.map((e=>e.format())).join(",")})`:this.type}defaultValue(){return 0}minValue(){return 0}maxValue(){return 0}isBigInt(){return!!this.type.match(/^u?int[0-9]+$/)}isData(){return this.type.startsWith("bytes")}isString(){return"string"===this.type}get tupleName(){if("tuple"!==this.type)throw TypeError("not a tuple");return this.#G}get arrayLength(){if("array"!==this.type)throw TypeError("not an array");return!0===this.#G?-1:!1===this.#G?this.value.length:null}static from(e,t){return new u(i,e,t)}static uint8(e){return o(e,8)}static uint16(e){return o(e,16)}static uint24(e){return o(e,24)}static uint32(e){return o(e,32)}static uint40(e){return o(e,40)}static uint48(e){return o(e,48)}static uint56(e){return o(e,56)}static uint64(e){return o(e,64)}static uint72(e){return o(e,72)}static uint80(e){return o(e,80)}static uint88(e){return o(e,88)}static uint96(e){return o(e,96)}static uint104(e){return o(e,104)}static uint112(e){return o(e,112)}static uint120(e){return o(e,120)}static uint128(e){return o(e,128)}static uint136(e){return o(e,136)}static uint144(e){return o(e,144)}static uint152(e){return o(e,152)}static uint160(e){return o(e,160)}static uint168(e){return o(e,168)}static uint176(e){return o(e,176)}static uint184(e){return o(e,184)}static uint192(e){return o(e,192)}static uint200(e){return o(e,200)}static uint208(e){return o(e,208)}static uint216(e){return o(e,216)}static uint224(e){return o(e,224)}static uint232(e){return o(e,232)}static uint240(e){return o(e,240)}static uint248(e){return o(e,248)}static uint256(e){return o(e,256)}static uint(e){return o(e,256)}static int8(e){return o(e,-8)}static int16(e){return o(e,-16)}static int24(e){return o(e,-24)}static int32(e){return o(e,-32)}static int40(e){return o(e,-40)}static int48(e){return o(e,-48)}static int56(e){return o(e,-56)}static int64(e){return o(e,-64)}static int72(e){return o(e,-72)}static int80(e){return o(e,-80)}static int88(e){return o(e,-88)}static int96(e){return o(e,-96)}static int104(e){return o(e,-104)}static int112(e){return o(e,-112)}static int120(e){return o(e,-120)}static int128(e){return o(e,-128)}static int136(e){return o(e,-136)}static int144(e){return o(e,-144)}static int152(e){return o(e,-152)}static int160(e){return o(e,-160)}static int168(e){return o(e,-168)}static int176(e){return o(e,-176)}static int184(e){return o(e,-184)}static int192(e){return o(e,-192)}static int200(e){return o(e,-200)}static int208(e){return o(e,-208)}static int216(e){return o(e,-216)}static int224(e){return o(e,-224)}static int232(e){return o(e,-232)}static int240(e){return o(e,-240)}static int248(e){return o(e,-248)}static int256(e){return o(e,-256)}static int(e){return o(e,-256)}static bytes1(e){return s(e,1)}static bytes2(e){return s(e,2)}static bytes3(e){return s(e,3)}static bytes4(e){return s(e,4)}static bytes5(e){return s(e,5)}static bytes6(e){return s(e,6)}static bytes7(e){return s(e,7)}static bytes8(e){return s(e,8)}static bytes9(e){return s(e,9)}static bytes10(e){return s(e,10)}static bytes11(e){return s(e,11)}static bytes12(e){return s(e,12)}static bytes13(e){return s(e,13)}static bytes14(e){return s(e,14)}static bytes15(e){return s(e,15)}static bytes16(e){return s(e,16)}static bytes17(e){return s(e,17)}static bytes18(e){return s(e,18)}static bytes19(e){return s(e,19)}static bytes20(e){return s(e,20)}static bytes21(e){return s(e,21)}static bytes22(e){return s(e,22)}static bytes23(e){return s(e,23)}static bytes24(e){return s(e,24)}static bytes25(e){return s(e,25)}static bytes26(e){return s(e,26)}static bytes27(e){return s(e,27)}static bytes28(e){return s(e,28)}static bytes29(e){return s(e,29)}static bytes30(e){return s(e,30)}static bytes31(e){return s(e,31)}static bytes32(e){return s(e,32)}static address(e){return new u(i,"address",e)}static bool(e){return new u(i,"bool",!!e)}static bytes(e){return new u(i,"bytes",e)}static string(e){return new u(i,"string",e)}static array(e,t){throw new Error("not implemented yet")}static tuple(e,t){throw new Error("not implemented yet")}static overrides(e){return new u(i,"overrides",Object.assign({},e))}static isTyped(e){return e&&"object"==typeof e&&"_typedSymbol"in e&&e._typedSymbol===a}static dereference(e,t){if(u.isTyped(e)){if(e.type!==t)throw new Error(`invalid type: expecetd ${t}, got ${e.type}`);return e.value}return e}}t.Typed=u},40345:(e,t,r)=>{e.exports=r(37007).EventEmitter},40841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.firstValueFrom=void 0;var n=r(59328),i=r(2708);t.firstValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(o,s){var a=new i.SafeSubscriber({next:function(e){o(e),a.unsubscribe()},error:s,complete:function(){r?o(t.defaultValue):s(new n.EmptyError)}});e.subscribe(a)}))}},40985:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(96978),i=r(74224),o=r(45646),s=r(97292),a=r(98421),u=r(92124),c=r(47749),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,h=f*f*e%t,p=(0,o.pow2)(h,r,t)*h%t,g=(0,o.pow2)(p,r,t)*h%t,y=(0,o.pow2)(g,d,t)*f%t,m=(0,o.pow2)(y,i,t)*y%t,v=(0,o.pow2)(m,s,t)*m%t,w=(0,o.pow2)(v,u,t)*v%t,E=(0,o.pow2)(w,c,t)*w%t,A=(0,o.pow2)(E,u,t)*v%t,_=(0,o.pow2)(A,r,t)*h%t,S=(0,o.pow2)(_,a,t)*m%t,P=(0,o.pow2)(S,n,t)*f%t,k=(0,o.pow2)(P,d,t);if(!b.eql(b.sqr(k),e))throw new Error("Cannot find square root");return k}const b=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=p(s*e,t),c=p(-n*e,t);let l=(0,o.mod)(e-u*r-c*i,t),d=(0,o.mod)(-u*n-c*s,t);const g=l>a,b=d>a;if(g&&(l=t-l),b&&(d=t-d),l>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:b,k2:d}}}},n.sha256);const y=BigInt(0),m=e=>"bigint"==typeof e&&y<e&&e<l,v={};function w(e,...t){let r=v[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,a.numberToBytesBE)(e,32),_=e=>(0,o.mod)(e,l),S=e=>(0,o.mod)(e,f),P=t.secp256k1.ProjectivePoint;function k(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=P.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:E(n)}}function O(e){if(!m(e))throw new Error("bad x: need 0 < x < p");const t=_(e*e);let r=g(_(t*e+BigInt(7)));r%d!==y&&(r=_(-r));const n=new P(e,r,h);return n.assertValidity(),n}function x(...e){return S((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function M(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),i=(0,a.ensureBytes)("message",t),o=(0,a.ensureBytes)("publicKey",r,32);try{const e=O((0,a.bytesToNumberBE)(o)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!m(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&y<l&&l<f))return!1;const h=x(A(t),E(e),i),d=(s=e,u=r,c=S(-h),P.BASE.multiplyAndAddUnsafe(s,u,c));return!(!d||!d.hasEvenY()||d.toAffine().x!==t)}catch(e){return!1}var s,u,c,l}t.schnorr={getPublicKey:function(e){return k(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,a.ensureBytes)("message",e),{bytes:o,scalar:s}=k(t),u=(0,a.ensureBytes)("auxRand",r,32),c=A(s^(0,a.bytesToNumberBE)(w("BIP0340/aux",u))),l=w("BIP0340/nonce",c,o,n),f=S((0,a.bytesToNumberBE)(l));if(f===y)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=k(f),p=x(h,o,n),g=new Uint8Array(64);if(g.set(h,0),g.set(A(S(d+p*s)),32),!M(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:M,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:O,pointToBytes:E,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:w,mod:o.mod}};const B=(()=>(0,u.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),T=(()=>(0,s.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))(),I=(()=>(0,u.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=T(b.create(e[0]));return B(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=I.hashToCurve,t.encodeToCurve=I.encodeToCurve},41691:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EnsResolver=t.BasicMulticoinProviderPlugin=t.MulticoinProviderPlugin=void 0;const n=r(30646),i=r(1295),o=r(49288),s=r(23562),a=r(75347);function u(e){return e.match(/^ipfs:\/\/ipfs\//i)?e=e.substring(12):e.match(/^ipfs:\/\//i)?e=e.substring(7):(0,a.assertArgument)(!1,"unsupported IPFS format","link",e),`https://gateway.ipfs.io/ipfs/${e}`}class c{name;constructor(e){(0,a.defineProperties)(this,{name:e})}connect(e){return this}supportsCoinType(e){return!1}async encodeAddress(e,t){throw new Error("unsupported coin")}async decodeAddress(e,t){throw new Error("unsupported coin")}}t.MulticoinProviderPlugin=c,t.BasicMulticoinProviderPlugin=class extends c{constructor(){super("org.ethers.plugins.provider.BasicMulticoin")}};const l=new RegExp("^(ipfs)://(.*)$","i"),f=[new RegExp("^(https)://(.*)$","i"),new RegExp("^(data):(.*)$","i"),l,new RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];class h{provider;address;name;#ae;#ue;constructor(e,t,r){(0,a.defineProperties)(this,{provider:e,address:t,name:r}),this.#ae=null,this.#ue=new o.Contract(t,["function supportsInterface(bytes4) view returns (bool)","function resolve(bytes, bytes) view returns (bytes)","function addr(bytes32) view returns (address)","function addr(bytes32, uint) view returns (bytes)","function text(bytes32, string) view returns (string)","function contenthash(bytes32) view returns (bytes)"],e)}async supportsWildcard(){return null==this.#ae&&(this.#ae=(async()=>{try{return await this.#ue.supportsInterface("0x9061b923")}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return!1;throw this.#ae=null,e}})()),await this.#ae}async#ce(e,t){t=(t||[]).slice();const r=this.#ue.interface;t.unshift((0,s.namehash)(this.name));let n=null;await this.supportsWildcard()&&(n=r.getFunction(e),(0,a.assert)(n,"missing fragment","UNKNOWN_ERROR",{info:{funcName:e}}),t=[(0,s.dnsEncode)(this.name,255),r.encodeFunctionData(n,t)],e="resolve(bytes,bytes)"),t.push({enableCcipRead:!0});try{const i=await this.#ue[e](...t);return n?r.decodeFunctionResult(n,i)[0]:i}catch(e){if(!(0,a.isError)(e,"CALL_EXCEPTION"))throw e}return null}async getAddress(e){if(null==e&&(e=60),60===e)try{const e=await this.#ce("addr(bytes32)");return null==e||e===i.ZeroAddress?null:e}catch(e){if((0,a.isError)(e,"CALL_EXCEPTION"))return null;throw e}if(e>=0&&e<2147483648){let t=e+2147483648;const r=await this.#ce("addr(bytes32,uint)",[t]);if((0,a.isHexString)(r,20))return(0,n.getAddress)(r)}let t=null;for(const r of this.provider.plugins)if(r instanceof c&&r.supportsCoinType(e)){t=r;break}if(null==t)return null;const r=await this.#ce("addr(bytes32,uint)",[e]);if(null==r||"0x"===r)return null;const o=await t.decodeAddress(e,r);if(null!=o)return o;(0,a.assert)(!1,"invalid coin data","UNSUPPORTED_OPERATION",{operation:`getAddress(${e})`,info:{coinType:e,data:r}})}async getText(e){const t=await this.#ce("text(bytes32,string)",[e]);return null==t||"0x"===t?null:t}async getContentHash(){const e=await this.#ce("contenthash(bytes32)");if(null==e||"0x"===e)return null;const t=e.match(/^0x(e3010170|e5010172)(([0-9a-f][0-9a-f])([0-9a-f][0-9a-f])([0-9a-f]*))$/);if(t){const e="e3010170"===t[1]?"ipfs":"ipns",r=parseInt(t[4],16);if(t[5].length===2*r)return`${e}://${(0,a.encodeBase58)("0x"+t[2])}`}const r=e.match(/^0xe40101fa011b20([0-9a-f]*)$/);if(r&&64===r[1].length)return`bzz://${r[1]}`;(0,a.assert)(!1,"invalid or unsupported content hash data","UNSUPPORTED_OPERATION",{operation:"getContentHash()",info:{data:e}})}async getAvatar(){return(await this._getAvatar()).url}async _getAvatar(){const e=[{type:"name",value:this.name}];try{const t=await this.getText("avatar");if(null==t)return e.push({type:"!avatar",value:""}),{url:null,linkage:e};e.push({type:"avatar",value:t});for(let r=0;r<f.length;r++){const n=t.match(f[r]);if(null==n)continue;const i=n[1].toLowerCase();switch(i){case"https":case"data":return e.push({type:"url",value:t}),{linkage:e,url:t};case"ipfs":{const r=u(t);return e.push({type:"ipfs",value:t}),e.push({type:"url",value:r}),{linkage:e,url:r}}case"erc721":case"erc1155":{const r="erc721"===i?"tokenURI(uint256)":"uri(uint256)";e.push({type:i,value:t});const s=await this.getAddress();if(null==s)return e.push({type:"!owner",value:""}),{url:null,linkage:e};const c=(n[2]||"").split("/");if(2!==c.length)return e.push({type:`!${i}caip`,value:n[2]||""}),{url:null,linkage:e};const f=c[1],h=new o.Contract(c[0],["function tokenURI(uint) view returns (string)","function ownerOf(uint) view returns (address)","function uri(uint) view returns (string)","function balanceOf(address, uint256) view returns (uint)"],this.provider);if("erc721"===i){const t=await h.ownerOf(f);if(s!==t)return e.push({type:"!owner",value:t}),{url:null,linkage:e};e.push({type:"owner",value:t})}else if("erc1155"===i){const t=await h.balanceOf(s,f);if(!t)return e.push({type:"!balance",value:"0"}),{url:null,linkage:e};e.push({type:"balance",value:t.toString()})}let d=await h[r](f);if(null==d||"0x"===d)return e.push({type:"!metadata-url",value:""}),{url:null,linkage:e};e.push({type:"metadata-url-base",value:d}),"erc1155"===i&&(d=d.replace("{id}",(0,a.toBeHex)(f,32).substring(2)),e.push({type:"metadata-url-expanded",value:d})),d.match(/^ipfs:/i)&&(d=u(d)),e.push({type:"metadata-url",value:d});let p={};const g=await new a.FetchRequest(d).send();g.assertOk();try{p=g.bodyJson}catch(t){try{e.push({type:"!metadata",value:g.bodyText})}catch(t){const r=g.body;return r&&e.push({type:"!metadata",value:(0,a.hexlify)(r)}),{url:null,linkage:e}}return{url:null,linkage:e}}if(!p)return e.push({type:"!metadata",value:""}),{url:null,linkage:e};e.push({type:"metadata",value:JSON.stringify(p)});let b=p.image;if("string"!=typeof b)return e.push({type:"!imageUrl",value:""}),{url:null,linkage:e};if(b.match(/^(https:\/\/|data:)/i));else{if(null==b.match(l))return e.push({type:"!imageUrl-ipfs",value:b}),{url:null,linkage:e};e.push({type:"imageUrl-ipfs",value:b}),b=u(b)}return e.push({type:"url",value:b}),{linkage:e,url:b}}}}}catch(e){}return{linkage:e,url:null}}static async getEnsAddress(e){const t=await e.getNetwork(),r=t.getPlugin("org.ethers.plugins.network.Ens");return(0,a.assert)(r,"network does not support ENS","UNSUPPORTED_OPERATION",{operation:"getEnsAddress",info:{network:t}}),r.address}static async#le(e,t){const r=await h.getEnsAddress(e);try{const n=new o.Contract(r,["function resolver(bytes32) view returns (address)"],e),a=await n.resolver((0,s.namehash)(t),{enableCcipRead:!0});return a===i.ZeroAddress?null:a}catch(e){throw e}}static async fromName(e,t){let r=t;for(;;){if(""===r||"."===r)return null;if("eth"!==t&&"eth"===r)return null;const n=await h.#le(e,r);if(null!=n){const i=new h(e,n,t);return r===t||await i.supportsWildcard()?i:null}r=r.split(".").slice(1).join(".")}}}t.EnsResolver=h},41693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TupleCoder=void 0;const n=r(8166),i=r(39976),o=r(38869),s=r(53178);class a extends o.Coder{coders;constructor(e,t){let r=!1;const i=[];e.forEach((e=>{e.dynamic&&(r=!0),i.push(e.type)})),super("tuple","tuple("+i.join(",")+")",t,r),(0,n.defineProperties)(this,{coders:Object.freeze(e.slice())})}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let i=r.localName;i&&1===t[i]&&("length"===i&&(i="_length"),null==e[i]&&(e[i]=e[n]))})),Object.freeze(e)}encode(e,t){const r=i.Typed.dereference(t,"tuple");return(0,s.pack)(e,this.coders,r)}decode(e){return(0,s.unpack)(e,this.coders)}}t.TupleCoder=a},41719:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferTime=void 0;var i=r(69879),o=r(65212),s=r(17214),a=r(54830),u=r(62326),c=r(26404),l=r(28619);t.bufferTime=function(e){for(var t,r,f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:u.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return o.operate((function(t,r){var o=[],u=!1,c=function(e){var t=e.buffer;e.subs.unsubscribe(),a.arrRemove(o,e),r.next(t),u&&f()},f=function(){if(o){var t=new i.Subscription;r.add(t);var n={buffer:[],subs:t};o.push(n),l.executeSchedule(t,d,(function(){return c(n)}),e)}};null!==p&&p>=0?l.executeSchedule(r,d,f,p,!0):u=!0,f();var h=s.createOperatorSubscriber(r,(function(e){var t,r,i=o.slice();try{for(var s=n(i),a=s.next();!a.done;a=s.next()){var u=a.value,l=u.buffer;l.push(e),g<=l.length&&c(u)}}catch(e){t={error:e}}finally{try{a&&!a.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}}),(function(){for(;null==o?void 0:o.length;)r.next(o.shift().buffer);null==h||h.unsubscribe(),r.complete(),r.unsubscribe()}),void 0,(function(){return o=null}));t.subscribe(h)}))}},41800:(e,t,r)=>{"use strict";var n=r(56698),i=r(92861).Buffer,o=r(56168),s=i.alloc(128),a=64;function u(e,t){o.call(this,"digest"),"string"==typeof t&&(t=i.from(t)),this._alg=e,this._key=t,t.length>a?t=e(t):t.length<a&&(t=i.concat([t,s],a));for(var r=this._ipad=i.allocUnsafe(a),n=this._opad=i.allocUnsafe(a),u=0;u<a;u++)r[u]=54^t[u],n[u]=92^t[u];this._hash=[r]}n(u,o),u.prototype._update=function(e){this._hash.push(e)},u.prototype._final=function(){var e=this._alg(i.concat(this._hash));return this._alg(i.concat([this._opad,e]))},e.exports=u},42271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CloudflareProvider=void 0;const n=r(75347),i=r(57698),o=r(42371);class s extends o.JsonRpcProvider{constructor(e){null==e&&(e="mainnet");const t=i.Network.from(e);(0,n.assertArgument)("mainnet"===t.name,"unsupported network","network",e),super("https://cloudflare-eth.com/",t,{staticNetwork:t})}}t.CloudflareProvider=s},42371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.JsonRpcProvider=t.JsonRpcApiPollingProvider=t.JsonRpcApiProvider=t.JsonRpcSigner=void 0;const n=r(8456),i=r(30646),o=r(23562),s=r(77778),a=r(75347),u=r(38672),c=r(23071),l=r(57698),f=r(27966),h=r(34338),d="bigint,boolean,function,number,string,symbol".split(/,/g);function p(e){if(null==e||d.indexOf(typeof e)>=0)return e;if("function"==typeof e.getAddress)return e;if(Array.isArray(e))return e.map(p);if("object"==typeof e)return Object.keys(e).reduce(((t,r)=>(t[r]=e[r],t)),{});throw new Error(`should not happen: ${e} (${typeof e})`)}function g(e){return new Promise((t=>{setTimeout(t,e)}))}function b(e){return e?e.toLowerCase():e}function y(e){return e&&"number"==typeof e.pollingInterval}const m={polling:!1,staticNetwork:null,batchStallTime:10,batchMaxSize:1<<20,batchMaxCount:100,cacheTimeout:250,pollingInterval:4e3};class v extends c.AbstractSigner{address;constructor(e,t){super(e),t=(0,i.getAddress)(t),(0,a.defineProperties)(this,{address:t})}connect(e){(0,a.assert)(!1,"cannot reconnect JsonRpcSigner","UNSUPPORTED_OPERATION",{operation:"signer.connect"})}async getAddress(){return this.address}async populateTransaction(e){return await this.populateCall(e)}async sendUncheckedTransaction(e){const t=p(e),r=[];if(t.from){const n=t.from;r.push((async()=>{const r=await(0,i.resolveAddress)(n,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r})())}else t.from=this.address;if(null==t.gasLimit&&r.push((async()=>{t.gasLimit=await this.provider.estimateGas({...t,from:this.address})})()),null!=t.to){const e=t.to;r.push((async()=>{t.to=await(0,i.resolveAddress)(e,this.provider)})())}r.length&&await Promise.all(r);const n=this.provider.getRpcTransaction(t);return this.provider.send("eth_sendTransaction",[n])}async sendTransaction(e){const t=await this.provider.getBlockNumber(),r=await this.sendUncheckedTransaction(e);return await new Promise(((e,n)=>{const i=[1e3,100];let o=0;const s=async()=>{try{const n=await this.provider.getTransaction(r);if(null!=n)return void e(n.replaceableTransaction(t))}catch(e){if((0,a.isError)(e,"CANCELLED")||(0,a.isError)(e,"BAD_DATA")||(0,a.isError)(e,"NETWORK_ERROR")||(0,a.isError)(e,"UNSUPPORTED_OPERATION"))return null==e.info&&(e.info={}),e.info.sendTransactionHash=r,void n(e);if((0,a.isError)(e,"INVALID_ARGUMENT")&&(o++,null==e.info&&(e.info={}),e.info.sendTransactionHash=r,o>10))return void n(e);this.provider.emit("error",(0,a.makeError)("failed to fetch transation after sending (will try again)","UNKNOWN_ERROR",{error:e}))}this.provider._setTimeout((()=>{s()}),i.pop()||4e3)};s()}))}async signTransaction(e){const t=p(e);if(t.from){const r=await(0,i.resolveAddress)(t.from,this.provider);(0,a.assertArgument)(null!=r&&r.toLowerCase()===this.address.toLowerCase(),"from address mismatch","transaction",e),t.from=r}else t.from=this.address;const r=this.provider.getRpcTransaction(t);return await this.provider.send("eth_signTransaction",[r])}async signMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("personal_sign",[(0,a.hexlify)(t),this.address.toLowerCase()])}async signTypedData(e,t,r){const n=p(r),s=await o.TypedDataEncoder.resolveNames(e,t,n,(async e=>{const t=await(0,i.resolveAddress)(e);return(0,a.assertArgument)(null!=t,"TypedData does not support null address","value",e),t}));return await this.provider.send("eth_signTypedData_v4",[this.address.toLowerCase(),JSON.stringify(o.TypedDataEncoder.getPayload(s.domain,t,s.value))])}async unlock(e){return this.provider.send("personal_unlockAccount",[this.address.toLowerCase(),e,null])}async _legacySignMessage(e){const t="string"==typeof e?(0,a.toUtf8Bytes)(e):e;return await this.provider.send("eth_sign",[this.address.toLowerCase(),(0,a.hexlify)(t)])}}t.JsonRpcSigner=v;class w extends u.AbstractProvider{#G;#fe;#he;#de;#pe;#E;#ge;#be(){if(this.#de)return;const e=1===this._getOption("batchMaxCount")?0:this._getOption("batchStallTime");this.#de=setTimeout((()=>{this.#de=null;const e=this.#he;for(this.#he=[];e.length;){const t=[e.shift()];for(;e.length&&t.length!==this.#G.batchMaxCount;)if(t.push(e.shift()),JSON.stringify(t.map((e=>e.payload))).length>this.#G.batchMaxSize){e.unshift(t.pop());break}(async()=>{const e=1===t.length?t[0].payload:t.map((e=>e.payload));this.emit("debug",{action:"sendRpcPayload",payload:e});try{const r=await this._send(e);this.emit("debug",{action:"receiveRpcResult",result:r});for(const{resolve:e,reject:n,payload:i}of t){if(this.destroyed){n((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:i.method}));continue}const t=r.filter((e=>e.id===i.id))[0];if(null!=t)"error"in t?n(this.getRpcError(i,t)):e(t.result);else{const e=(0,a.makeError)("missing response for request","BAD_DATA",{value:r,info:{payload:i}});this.emit("error",e),n(e)}}}catch(e){this.emit("debug",{action:"receiveRpcError",error:e});for(const{reject:r}of t)r(e)}})()}}),e)}constructor(e,t){super(e,t),this.#fe=1,this.#G=Object.assign({},m,t||{}),this.#he=[],this.#de=null,this.#E=null,this.#ge=null;{let e=null;const t=new Promise((t=>{e=t}));this.#pe={promise:t,resolve:e}}const r=this._getOption("staticNetwork");"boolean"==typeof r?((0,a.assertArgument)(!r||"any"!==e,"staticNetwork cannot be used on special network 'any'","options",t),r&&null!=e&&(this.#E=l.Network.from(e))):r&&((0,a.assertArgument)(null==e||r.matches(e),"staticNetwork MUST match network object","options",t),this.#E=r)}_getOption(e){return this.#G[e]}get _network(){return(0,a.assert)(this.#E,"network is not available yet","NETWORK_ERROR"),this.#E}async _perform(e){if("call"===e.method||"estimateGas"===e.method){let t=e.transaction;if(t&&null!=t.type&&(0,a.getBigInt)(t.type)&&null==t.maxFeePerGas&&null==t.maxPriorityFeePerGas){const r=await this.getFeeData();null==r.maxFeePerGas&&null==r.maxPriorityFeePerGas&&(e=Object.assign({},e,{transaction:Object.assign({},t,{type:void 0})}))}}const t=this.getRpcRequest(e);return null!=t?await this.send(t.method,t.args):super._perform(e)}async _detectNetwork(){const e=this._getOption("staticNetwork");if(e){if(!0!==e)return e;if(this.#E)return this.#E}return this.#ge?await this.#ge:this.ready?(this.#ge=(async()=>{try{const e=l.Network.from((0,a.getBigInt)(await this.send("eth_chainId",[])));return this.#ge=null,e}catch(e){throw this.#ge=null,e}})(),await this.#ge):(this.#ge=(async()=>{const e={id:this.#fe++,method:"eth_chainId",params:[],jsonrpc:"2.0"};let t;this.emit("debug",{action:"sendRpcPayload",payload:e});try{t=(await this._send(e))[0],this.#ge=null}catch(e){throw this.#ge=null,this.emit("debug",{action:"receiveRpcError",error:e}),e}if(this.emit("debug",{action:"receiveRpcResult",result:t}),"result"in t)return l.Network.from((0,a.getBigInt)(t.result));throw this.getRpcError(e,t)})(),await this.#ge)}_start(){null!=this.#pe&&null!=this.#pe.resolve&&(this.#pe.resolve(),this.#pe=null,(async()=>{for(;null==this.#E&&!this.destroyed;)try{this.#E=await this._detectNetwork()}catch(e){if(this.destroyed)break;console.log("JsonRpcProvider failed to detect network and cannot start up; retry in 1s (perhaps the URL is wrong or the node is not started)"),this.emit("error",(0,a.makeError)("failed to bootstrap network detection","NETWORK_ERROR",{event:"initial-network-discovery",info:{error:e}})),await g(1e3)}this.#be()})())}async _waitUntilReady(){if(null!=this.#pe)return await this.#pe.promise}_getSubscriber(e){return"pending"===e.type?new f.FilterIdPendingSubscriber(this):"event"===e.type?this._getOption("polling")?new h.PollingEventSubscriber(this,e.filter):new f.FilterIdEventSubscriber(this,e.filter):"orphan"===e.type&&"drop-log"===e.filter.orphan?new u.UnmanagedSubscriber("orphan"):super._getSubscriber(e)}get ready(){return null==this.#pe}getRpcTransaction(e){const t={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach((r=>{if(null==e[r])return;let n=r;"gasLimit"===r&&(n="gas"),t[n]=(0,a.toQuantity)((0,a.getBigInt)(e[r],`tx.${r}`))})),["from","to","data"].forEach((r=>{null!=e[r]&&(t[r]=(0,a.hexlify)(e[r]))})),e.accessList&&(t.accessList=(0,s.accessListify)(e.accessList)),e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.map((e=>e.toLowerCase()))),e.authorizationList&&(t.authorizationList=e.authorizationList.map((e=>{const t=(0,s.authorizationify)(e);return{address:t.address,nonce:(0,a.toQuantity)(t.nonce),chainId:(0,a.toQuantity)(t.chainId),yParity:(0,a.toQuantity)(t.signature.yParity),r:(0,a.toQuantity)(t.signature.r),s:(0,a.toQuantity)(t.signature.s)}}))),t}getRpcRequest(e){switch(e.method){case"chainId":return{method:"eth_chainId",args:[]};case"getBlockNumber":return{method:"eth_blockNumber",args:[]};case"getGasPrice":return{method:"eth_gasPrice",args:[]};case"getPriorityFee":return{method:"eth_maxPriorityFeePerGas",args:[]};case"getBalance":return{method:"eth_getBalance",args:[b(e.address),e.blockTag]};case"getTransactionCount":return{method:"eth_getTransactionCount",args:[b(e.address),e.blockTag]};case"getCode":return{method:"eth_getCode",args:[b(e.address),e.blockTag]};case"getStorage":return{method:"eth_getStorageAt",args:[b(e.address),"0x"+e.position.toString(16),e.blockTag]};case"broadcastTransaction":return{method:"eth_sendRawTransaction",args:[e.signedTransaction]};case"getBlock":if("blockTag"in e)return{method:"eth_getBlockByNumber",args:[e.blockTag,!!e.includeTransactions]};if("blockHash"in e)return{method:"eth_getBlockByHash",args:[e.blockHash,!!e.includeTransactions]};break;case"getTransaction":return{method:"eth_getTransactionByHash",args:[e.hash]};case"getTransactionReceipt":return{method:"eth_getTransactionReceipt",args:[e.hash]};case"call":return{method:"eth_call",args:[this.getRpcTransaction(e.transaction),e.blockTag]};case"estimateGas":return{method:"eth_estimateGas",args:[this.getRpcTransaction(e.transaction)]};case"getLogs":return e.filter&&null!=e.filter.address&&(Array.isArray(e.filter.address)?e.filter.address=e.filter.address.map(b):e.filter.address=b(e.filter.address)),{method:"eth_getLogs",args:[e.filter]}}return null}getRpcError(e,t){const{method:r}=e,{error:i}=t;if("eth_estimateGas"===r&&i.message){const t=i.message;if(!t.match(/revert/i)&&t.match(/insufficient funds/i))return(0,a.makeError)("insufficient funds","INSUFFICIENT_FUNDS",{transaction:e.params[0],info:{payload:e,error:i}});if(t.match(/nonce/i)&&t.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:e.params[0],info:{payload:e,error:i}})}if("eth_call"===r||"eth_estimateGas"===r){const t=A(i),o=n.AbiCoder.getBuiltinCallException("eth_call"===r?"call":"estimateGas",e.params[0],t?t.data:null);return o.info={error:i,payload:e},o}const o=JSON.stringify(function(e){const t=[];return _(e,t),t}(i));if("string"==typeof i.message&&i.message.match(/user denied|ethers-user-denied/i)){const t={eth_sign:"signMessage",personal_sign:"signMessage",eth_signTypedData_v4:"signTypedData",eth_signTransaction:"signTransaction",eth_sendTransaction:"sendTransaction",eth_requestAccounts:"requestAccess",wallet_requestAccounts:"requestAccess"};return(0,a.makeError)("user rejected action","ACTION_REJECTED",{action:t[r]||"unknown",reason:"rejected",info:{payload:e,error:i}})}if("eth_sendRawTransaction"===r||"eth_sendTransaction"===r){const t=e.params[0];if(o.match(/insufficient funds|base fee exceeds gas limit/i))return(0,a.makeError)("insufficient funds for intrinsic transaction cost","INSUFFICIENT_FUNDS",{transaction:t,info:{error:i}});if(o.match(/nonce/i)&&o.match(/too low/i))return(0,a.makeError)("nonce has already been used","NONCE_EXPIRED",{transaction:t,info:{error:i}});if(o.match(/replacement transaction/i)&&o.match(/underpriced/i))return(0,a.makeError)("replacement fee too low","REPLACEMENT_UNDERPRICED",{transaction:t,info:{error:i}});if(o.match(/only replay-protected/i))return(0,a.makeError)("legacy pre-eip-155 transactions not supported","UNSUPPORTED_OPERATION",{operation:r,info:{transaction:t,info:{error:i}}})}let s=!!o.match(/the method .* does not exist/i);return s||i&&i.details&&i.details.startsWith("Unauthorized method:")&&(s=!0),s?(0,a.makeError)("unsupported operation","UNSUPPORTED_OPERATION",{operation:e.method,info:{error:i,payload:e}}):(0,a.makeError)("could not coalesce error","UNKNOWN_ERROR",{error:i,payload:e})}send(e,t){if(this.destroyed)return Promise.reject((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e}));const r=this.#fe++,n=new Promise(((n,i)=>{this.#he.push({resolve:n,reject:i,payload:{method:e,params:t,id:r,jsonrpc:"2.0"}})}));return this.#be(),n}async getSigner(e){null==e&&(e=0);const t=this.send("eth_accounts",[]);if("number"==typeof e){const r=await t;if(e>=r.length)throw new Error("no such account");return new v(this,r[e])}const{accounts:r}=await(0,a.resolveProperties)({network:this.getNetwork(),accounts:t});e=(0,i.getAddress)(e);for(const t of r)if((0,i.getAddress)(t)===e)return new v(this,e);throw new Error("invalid account")}async listAccounts(){return(await this.send("eth_accounts",[])).map((e=>new v(this,e)))}destroy(){this.#de&&(clearTimeout(this.#de),this.#de=null);for(const{payload:e,reject:t}of this.#he)t((0,a.makeError)("provider destroyed; cancelled request","UNSUPPORTED_OPERATION",{operation:e.method}));this.#he=[],super.destroy()}}t.JsonRpcApiProvider=w;class E extends w{#ye;constructor(e,t){super(e,t);let r=this._getOption("pollingInterval");null==r&&(r=m.pollingInterval),this.#ye=r}_getSubscriber(e){const t=super._getSubscriber(e);return y(t)&&(t.pollingInterval=this.#ye),t}get pollingInterval(){return this.#ye}set pollingInterval(e){if(!Number.isInteger(e)||e<0)throw new Error("invalid interval");this.#ye=e,this._forEachSubscriber((e=>{y(e)&&(e.pollingInterval=this.#ye)}))}}function A(e){if(null==e)return null;if("string"==typeof e.message&&e.message.match(/revert/i)&&(0,a.isHexString)(e.data))return{message:e.message,data:e.data};if("object"==typeof e){for(const t in e){const r=A(e[t]);if(r)return r}return null}if("string"==typeof e)try{return A(JSON.parse(e))}catch(e){}return null}function _(e,t){if(null!=e){if("string"==typeof e.message&&t.push(e.message),"object"==typeof e)for(const r in e)_(e[r],t);if("string"==typeof e)try{return _(JSON.parse(e),t)}catch(e){}}}t.JsonRpcApiPollingProvider=E,t.JsonRpcProvider=class extends E{#me;constructor(e,t,r){null==e&&(e="http://localhost:8545"),super(t,r),this.#me="string"==typeof e?new a.FetchRequest(e):e.clone()}_getConnection(){return this.#me.clone()}async send(e,t){return await this._start(),await super.send(e,t)}async _send(e){const t=this._getConnection();t.body=JSON.stringify(e),t.setHeader("content-type","application/json");const r=await t.send();r.assertOk();let n=r.bodyJson;return Array.isArray(n)||(n=[n]),n}}},42767:(e,t)=>{"use strict";function r(e,t,r){return{kind:e,value:t,error:r}}Object.defineProperty(t,"__esModule",{value:!0}),t.createNotification=t.nextNotification=t.errorNotification=t.COMPLETE_NOTIFICATION=void 0,t.COMPLETE_NOTIFICATION=r("C",void 0,void 0),t.errorNotification=function(e){return r("E",void 0,e)},t.nextNotification=function(e){return r("N",e,void 0)},t.createNotification=r},43188:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnSigner=void 0;const i=r(37510),o=r(25897),s=r(22623),a=r(45628),u=n(r(67476)),c=r(14193),l=function(e){const t=new Uint8Array(e);return btoa(String.fromCharCode(...t)).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")};class f{webauthn;credentials=new Map;constructor(e){this.webauthn=e||new i.Webauthn}async createSigningCredential(e){try{const t=await navigator.credentials.create({publicKey:{challenge:crypto.getRandomValues(new Uint8Array(32)),rp:{id:"localhost"===window.location.hostname?"localhost":window.location.hostname,name:"Shogun Wallet"},user:{id:(new TextEncoder).encode(e),name:e,displayName:e},pubKeyCredParams:[{type:"public-key",alg:-7},{type:"public-key",alg:-25},{type:"public-key",alg:-257}],authenticatorSelection:{userVerification:"preferred"},timeout:6e4,attestation:"none"}});if(!t)throw new Error("Failed to create WebAuthn credential");const r=t.response.getPublicKey();if(!r)throw new Error("Failed to get public key from credential");const n=new Uint8Array(r);(0,a.logDebug)("Raw public key bytes:",n);const i=n.slice(27,59),o=n.slice(59,91),s=l(i),u=l(o),f=`${s}.${u}`,h=c.ethers.keccak256(c.ethers.toUtf8Bytes(t.id)),d={id:t.id,rawId:t.rawId,publicKey:{x:s,y:u},pub:f,hashedCredentialId:h};return this.credentials.set(t.id,d),(0,a.logDebug)("Created signing credential:",d),d}catch(e){throw(0,a.logError)("Error creating signing credential:",e),new Error(`Failed to create signing credential: ${e.message}`)}}createAuthenticator(e){const t=this.credentials.get(e);if(!t)throw new Error(`Credential ${e} not found`);return async e=>{try{const r={challenge:(new TextEncoder).encode(JSON.stringify(e)),rpId:"localhost"===window.location.hostname?"localhost":window.location.hostname,userVerification:"preferred",allowCredentials:[{type:"public-key",id:t.rawId}],timeout:6e4},n=await navigator.credentials.get({publicKey:r});if(!n)throw new Error("WebAuthn assertion failed");return(0,a.logDebug)("WebAuthn assertion successful:",{options:r,assertion:n}),n.response}catch(e){throw(0,a.logError)("WebAuthn assertion error:",e),e}}}async createDerivedKeyPair(e,t,r){const n=this.credentials.get(e);if(!n)throw new Error(`Credential ${e} not found`);try{const e=await(0,u.default)(n.hashedCredentialId,r,{includeP256:!0});return{pub:e.pub,priv:e.priv,epub:e.epub,epriv:e.epriv}}catch(e){throw(0,a.logError)("Error deriving keys from WebAuthn credential:",e),e}}async createGunUser(e,t,r){const n=this.credentials.get(e);if(!n)throw new Error(`Credential ${e} not found`);try{return new Promise((i=>{r.user().create(t,n.hashedCredentialId,(o=>{o.err?r.user().auth(t,n.hashedCredentialId,(t=>{if(t.err)i({success:!1,error:t.err});else{const r=t.pub;n.gunUserPub=r,this.credentials.set(e,n),i({success:!0,userPub:r})}})):r.user().auth(t,n.hashedCredentialId,(t=>{if(t.err)i({success:!1,error:t.err});else{const r=t.pub;n.gunUserPub=r,this.credentials.set(e,n),i({success:!0,userPub:r})}}))}))}))}catch(e){return(0,a.logError)("Error creating Gun user:",e),{success:!1,error:e.message}}}async signWithDerivedKeys(e,t,r,n){try{const i=this.createAuthenticator(t);await i(e);const a=await this.createDerivedKeyPair(t,r,n),u=JSON.stringify(e),c=(0,s.sha256)((new TextEncoder).encode(u)),f=function(e){for(e=e.replace(/-/g,"+").replace(/_/g,"/");e.length%4;)e+="=";const t=atob(e);return new Uint8Array(t.split("").map((e=>e.charCodeAt(0))))}(a.priv),h=o.p256.sign(c,f),d={m:u,s:l(h.toCompactRawBytes())};return"SEA"+JSON.stringify(d)}catch(e){throw(0,a.logError)("Error signing with derived keys:",e),e}}getGunUserPub(e){const t=this.credentials.get(e);return t?.gunUserPub}getHashedCredentialId(e){const t=this.credentials.get(e);return t?.hashedCredentialId}async verifyConsistency(e,t,r){if(!this.credentials.get(e))return{consistent:!1};const n=await this.createDerivedKeyPair(e,t);return{consistent:!r||n.pub===r,actualUserPub:n.pub,expectedUserPub:r}}getCredential(e){return this.credentials.get(e)}listCredentials(){return Array.from(this.credentials.values())}removeCredential(e){return this.credentials.delete(e)}}t.WebAuthnSigner=f,t.default=f},43239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=void 0;const n=r(32291),i=r(75347),o=r(3514),s=new Uint8Array(32);function a(e){return(0,i.assertArgument)(0!==e.length,"invalid ENS name; empty component","comp",e),e}function u(e){const t=(0,i.toUtf8Bytes)(c(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e<t.length;e++)46===t[e]&&(r.push(a(t.slice(n,e))),n=e+1);return(0,i.assertArgument)(n<t.length,"invalid ENS name; empty component","name",e),r.push(a(t.slice(n))),r}function c(e){try{if(0===e.length)throw new Error("empty label");return(0,o.ens_normalize)(e)}catch(t){(0,i.assertArgument)(!1,`invalid ENS name (${t.message})`,"name",e)}}s.fill(0),t.ensNormalize=c,t.isValidName=function(e){try{return 0!==u(e).length}catch(e){}return!1},t.namehash=function(e){(0,i.assertArgument)("string"==typeof e,"invalid ENS name; not a string","name",e),(0,i.assertArgument)(e.length,"invalid ENS name (empty label)","name",e);let t=s;const r=u(e);for(;r.length;)t=(0,n.keccak256)((0,i.concat)([t,(0,n.keccak256)(r.pop())]));return(0,i.hexlify)(t)},t.dnsEncode=function(e,t){const r=null!=t?t:63;return(0,i.assertArgument)(r<=255,"DNS encoded label cannot exceed 255","length",r),(0,i.hexlify)((0,i.concat)(u(e).map((t=>{(0,i.assertArgument)(t.length<=r,`label ${JSON.stringify(e)} exceeds ${r} bytes`,"name",e);const n=new Uint8Array(t.length+1);return n.set(t,1),n[0]=n.length-1,n}))))+"00"}},43349:e=>{function t(e,t){if(!e)throw new Error(t||"Assertion failed")}e.exports=t,t.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)}},43434:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sample=void 0;var n=r(19724),i=r(65212),o=r(5717),s=r(17214);t.sample=function(e){return i.operate((function(t,r){var i=!1,a=null;t.subscribe(s.createOperatorSubscriber(r,(function(e){i=!0,a=e}))),n.innerFrom(e).subscribe(s.createOperatorSubscriber(r,(function(){if(i){i=!1;var e=a;a=null,r.next(e)}}),o.noop))}))}},43832:(e,t,r)=>{var n,i,o=r(92861).Buffer,s=r(64196),a=r(2455),u=r(21352),c=r(93382),l=r.g.crypto&&r.g.crypto.subtle,f={sha:"SHA-1","sha-1":"SHA-1",sha1:"SHA-1",sha256:"SHA-256","sha-256":"SHA-256",sha384:"SHA-384","sha-384":"SHA-384","sha-512":"SHA-512",sha512:"SHA-512"},h=[];function d(){return i||(i=r.g.process&&r.g.process.nextTick?r.g.process.nextTick:r.g.queueMicrotask?r.g.queueMicrotask:r.g.setImmediate?r.g.setImmediate:r.g.setTimeout)}function p(e,t,r,n,i){return l.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]).then((function(e){return l.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:{name:i}},e,n<<3)})).then((function(e){return o.from(e)}))}e.exports=function(e,t,i,g,b,y){"function"==typeof b&&(y=b,b=void 0);var m=f[(b=b||"sha1").toLowerCase()];if(m&&"function"==typeof r.g.Promise){if(s(i,g),e=c(e,a,"Password"),t=c(t,a,"Salt"),"function"!=typeof y)throw new Error("No callback provided to pbkdf2");!function(e,t){e.then((function(e){d()((function(){t(null,e)}))}),(function(e){d()((function(){t(e)}))}))}(function(e){if(r.g.process&&!r.g.process.browser)return Promise.resolve(!1);if(!l||!l.importKey||!l.deriveBits)return Promise.resolve(!1);if(void 0!==h[e])return h[e];var t=p(n=n||o.alloc(8),n,10,128,e).then((function(){return!0})).catch((function(){return!1}));return h[e]=t,t}(m).then((function(r){return r?p(e,t,i,g,m):u(e,t,i,g,b)})),y)}else d()((function(){var r;try{r=u(e,t,i,g,b)}catch(e){return y(e)}y(null,r)}))}},43917:(e,t,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(66225),s=n.rotl32,a=n.sum32,u=n.sum32_5,c=o.ft_1,l=i.BlockHash,f=[1518500249,1859775393,2400959708,3395469782];function h(){if(!(this instanceof h))return new h;l.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.W=new Array(80)}n.inherits(h,l),e.exports=h,h.blockSize=512,h.outSize=160,h.hmacStrength=80,h.padLength=64,h.prototype._update=function(e,t){for(var r=this.W,n=0;n<16;n++)r[n]=e[t+n];for(;n<r.length;n++)r[n]=s(r[n-3]^r[n-8]^r[n-14]^r[n-16],1);var i=this.h[0],o=this.h[1],l=this.h[2],h=this.h[3],d=this.h[4];for(n=0;n<r.length;n++){var p=~~(n/20),g=u(s(i,5),c(p,o,l,h),d,r[n],f[p]);d=h,h=l,l=s(o,30),o=i,i=g}this.h[0]=a(this.h[0],i),this.h[1]=a(this.h[1],o),this.h[2]=a(this.h[2],l),this.h[3]=a(this.h[3],h),this.h[4]=a(this.h[4],d)},h.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},43948:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8CodePoints=t.toUtf8String=t.toUtf8Bytes=t.Utf8ErrorFuncs=void 0;const n=r(87415),i=r(1500);function o(e,t,r,n,i){if("BAD_PREFIX"===e||"UNEXPECTED_CONTINUE"===e){let e=0;for(let n=t+1;n<r.length&&r[n]>>6==2;n++)e++;return e}return"OVERRUN"===e?r.length-t-1:0}function s(e,r){null==r&&(r=t.Utf8ErrorFuncs.error);const i=(0,n.getBytes)(e,"bytes"),o=[];let s=0;for(;s<i.length;){const e=i[s++];if(!(e>>7)){o.push(e);continue}let t=null,n=null;if(192==(224&e))t=1,n=127;else if(224==(240&e))t=2,n=2047;else{if(240!=(248&e)){s+=r(128==(192&e)?"UNEXPECTED_CONTINUE":"BAD_PREFIX",s-1,i,o);continue}t=3,n=65535}if(s-1+t>=i.length){s+=r("OVERRUN",s-1,i,o);continue}let a=e&(1<<8-t-1)-1;for(let e=0;e<t;e++){let e=i[s];if(128!=(192&e)){s+=r("MISSING_CONTINUE",s,i,o),a=null;break}a=a<<6|63&e,s++}null!==a&&(a>1114111?s+=r("OUT_OF_RANGE",s-1-t,i,o,a):a>=55296&&a<=57343?s+=r("UTF16_SURROGATE",s-1-t,i,o,a):a<=n?s+=r("OVERLONG",s-1-t,i,o,a):o.push(a))}return o}function a(e,t){(0,i.assertArgument)("string"==typeof e,"invalid string value","str",e),null!=t&&((0,i.assertNormalize)(t),e=e.normalize(t));let r=[];for(let t=0;t<e.length;t++){const n=e.charCodeAt(t);if(n<128)r.push(n);else if(n<2048)r.push(n>>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);(0,i.assertArgument)(t<e.length&&56320==(64512&o),"invalid surrogate pair","str",e);const s=65536+((1023&n)<<10)+(1023&o);r.push(s>>18|240),r.push(s>>12&63|128),r.push(s>>6&63|128),r.push(63&s|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return new Uint8Array(r)}t.Utf8ErrorFuncs=Object.freeze({error:function(e,t,r,n,o){(0,i.assertArgument)(!1,`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:o,replace:function(e,t,r,n,s){return"OVERLONG"===e?((0,i.assertArgument)("number"==typeof s,"invalid bad code point for replacement","badCodepoint",s),n.push(s),0):(n.push(65533),o(e,t,r))}}),t.toUtf8Bytes=a,t.toUtf8String=function(e,t){return s(e,t).map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")},t.toUtf8CodePoints=function(e,t){return s(a(e,t))}},44143:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sampleTime=void 0;var n=r(62326),i=r(43434),o=r(62275);t.sampleTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.sample(o.interval(e,t))}},44880:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.throttle=void 0;var n=r(65212),i=r(17214),o=r(19724);t.throttle=function(e,t){return n.operate((function(r,n){var s=null!=t?t:{},a=s.leading,u=void 0===a||a,c=s.trailing,l=void 0!==c&&c,f=!1,h=null,d=null,p=!1,g=function(){null==d||d.unsubscribe(),d=null,l&&(m(),p&&n.complete())},b=function(){d=null,p&&n.complete()},y=function(t){return d=o.innerFrom(e(t)).subscribe(i.createOperatorSubscriber(n,g,b))},m=function(){if(f){f=!1;var e=h;h=null,n.next(e),!p&&y(e)}};r.subscribe(i.createOperatorSubscriber(n,(function(e){f=!0,h=e,(!d||d.closed)&&(u?m():y(e))}),(function(){p=!0,(!(l&&f&&d)||d.closed)&&n.complete()})))}))}},44885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.empty=t.EMPTY=void 0;var n=r(48051);t.EMPTY=new n.Observable((function(e){return e.complete()})),t.empty=function(e){return e?function(e){return new n.Observable((function(t){return e.schedule((function(){return t.complete()}))}))}(e):t.EMPTY}},45122:e=>{e.exports=function(e){for(var t,r=e.length;r--;){if(255!==(t=e.readUInt8(r))){t++,e.writeUInt8(t,r);break}e.writeUInt8(0,r)}}},45412:(e,t,r)=>{"use strict";var n,i=r(65606);e.exports=P,P.ReadableState=S,r(37007).EventEmitter;var o,s=function(e,t){return e.listeners(t).length},a=r(40345),u=r(48287).Buffer,c=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(79838);o=l&&l.debuglog?l.debuglog("stream"):function(){};var f,h,d,p=r(80345),g=r(75896),b=r(65291).getHighWaterMark,y=r(86048).F,m=y.ERR_INVALID_ARG_TYPE,v=y.ERR_STREAM_PUSH_AFTER_EOF,w=y.ERR_METHOD_NOT_IMPLEMENTED,E=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(56698)(P,a);var A=g.errorOrDestroy,_=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(25382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=b(this,e,"readableHighWaterMark",i),this.buffer=new p,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(83141).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function P(e){if(n=n||r(25382),!(this instanceof P))return new P(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function k(e,t,r,n,i){o("readableAddChunk",t);var s,a=e._readableState;if(null===t)a.reading=!1,function(e,t){if(o("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?B(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,T(e)))}}(e,a);else if(i||(s=function(e,t){var r,n;return n=t,u.isBuffer(n)||n instanceof c||"string"==typeof t||void 0===t||e.objectMode||(r=new m("chunk",["string","Buffer","Uint8Array"],t)),r}(a,t)),s)A(e,s);else if(a.objectMode||t&&t.length>0)if("string"==typeof t||a.objectMode||Object.getPrototypeOf(t)===u.prototype||(t=function(e){return u.from(e)}(t)),n)a.endEmitted?A(e,new E):O(e,a,t,!0);else if(a.ended)A(e,new v);else{if(a.destroyed)return!1;a.reading=!1,a.decoder&&!r?(t=a.decoder.write(t),a.objectMode||0!==t.length?O(e,a,t,!1):I(e,a)):O(e,a,t,!1)}else n||(a.reading=!1,I(e,a));return!a.ended&&(a.length<a.highWaterMark||0===a.length)}function O(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&B(e)),I(e,t)}Object.defineProperty(P.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),P.prototype.destroy=g.destroy,P.prototype._undestroy=g.undestroy,P.prototype._destroy=function(e,t){t(e)},P.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=u.from(e,t),t=""),r=!0),k(this,e,t,!1,r)},P.prototype.unshift=function(e){return k(this,e,null,!0,!1)},P.prototype.isPaused=function(){return!1===this._readableState.flowing},P.prototype.setEncoding=function(e){f||(f=r(83141).I);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var x=1073741824;function M(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=x?e=x:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function B(e){var t=e._readableState;o("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(o("emitReadable",t.flowing),t.emittedReadable=!0,i.nextTick(T,e))}function T(e){var t=e._readableState;o("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,U(e)}function I(e,t){t.readingMore||(t.readingMore=!0,i.nextTick(C,e,t))}function C(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(o("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function R(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function N(e){o("readable nexttick read 0"),e.read(0)}function j(e,t){o("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),U(e),t.flowing&&!t.reading&&e.read(0)}function U(e){var t=e._readableState;for(o("flow",t.flowing);t.flowing&&null!==e.read(););}function L(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function D(e){var t=e._readableState;o("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,i.nextTick(F,t,e))}function F(e,t){if(o("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function H(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}P.prototype.read=function(e){o("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return o("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?D(this):B(this),null;if(0===(e=M(e,t))&&t.ended)return 0===t.length&&D(this),null;var n,i=t.needReadable;return o("need readable",i),(0===t.length||t.length-e<t.highWaterMark)&&o("length less than watermark",i=!0),t.ended||t.reading?o("reading or ended",i=!1):i&&(o("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=M(r,t))),null===(n=e>0?L(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&D(this)),null!==n&&this.emit("data",n),n},P.prototype._read=function(e){A(this,new w("_read()"))},P.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,o("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===i.stdout||e===i.stderr?g:u;function u(){o("onend"),e.end()}n.endEmitted?i.nextTick(a):r.once("end",a),e.on("unpipe",(function t(i,s){o("onunpipe"),i===r&&s&&!1===s.hasUnpiped&&(s.hasUnpiped=!0,o("cleanup"),e.removeListener("close",d),e.removeListener("finish",p),e.removeListener("drain",c),e.removeListener("error",h),e.removeListener("unpipe",t),r.removeListener("end",u),r.removeListener("end",g),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||c())}));var c=function(e){return function(){var t=e._readableState;o("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&s(e,"data")&&(t.flowing=!0,U(e))}}(r);e.on("drain",c);var l=!1;function f(t){o("ondata");var i=e.write(t);o("dest.write",i),!1===i&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==H(n.pipes,e))&&!l&&(o("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function h(t){o("onerror",t),g(),e.removeListener("error",h),0===s(e,"error")&&A(e,t)}function d(){e.removeListener("finish",p),g()}function p(){o("onfinish"),e.removeListener("close",d),g()}function g(){o("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",h),e.once("close",d),e.once("finish",p),e.emit("pipe",r),n.flowing||(o("pipe resume"),r.resume()),e},P.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var s=H(t.pipes,e);return-1===s||(t.pipes.splice(s,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},P.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,o("on readable",n.length,n.reading),n.length?B(this):n.reading||i.nextTick(N,this))),r},P.prototype.addListener=P.prototype.on,P.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&i.nextTick(R,this),r},P.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||i.nextTick(R,this),t},P.prototype.resume=function(){var e=this._readableState;return e.flowing||(o("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,i.nextTick(j,e,t))}(this,e)),e.paused=!1,this},P.prototype.pause=function(){return o("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(o("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},P.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var i in e.on("end",(function(){if(o("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)})),e.on("data",(function(i){o("wrapped data"),r.decoder&&(i=r.decoder.write(i)),r.objectMode&&null==i||(r.objectMode||i&&i.length)&&(t.push(i)||(n=!0,e.pause()))})),e)void 0===this[i]&&"function"==typeof e[i]&&(this[i]=function(t){return function(){return e[t].apply(e,arguments)}}(i));for(var s=0;s<_.length;s++)e.on(_[s],this.emit.bind(this,_[s]));return this._read=function(t){o("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(P.prototype[Symbol.asyncIterator]=function(){return void 0===h&&(h=r(2955)),h(this)}),Object.defineProperty(P.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(P.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(P.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),P._fromList=L,Object.defineProperty(P.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(P.from=function(e,t){return void 0===d&&(d=r(55157)),d(P,e,t)})},45628:(e,t,r)=>{"use strict";var n=r(65606);Object.defineProperty(t,"__esModule",{value:!0}),t.enableDebug=function(){o=!0,s("Debug mode enabled")},t.disableDebug=function(){o=!1},t.configureLogging=function(e){i={...i,...e}},t.log=s,t.logError=a,t.logWarn=u,t.logDebug=c,t.logWithLevel=function(e,t,...r){switch(e){case"error":a(t,...r);break;case"warn":u(t,...r);break;case"debug":c(t,...r);break;default:s(t,...r)}};let i={enabled:"true"===n.env.DEBUG,level:"info",prefix:"[ShogunSDK]"},o=!1;function s(e,...t){const r=`[SHOGUN CORE] [${(new Date).toISOString()}] ${e}`;console.log(r,...t)}function a(e,...t){const r=(new Date).toISOString();console.error(`[${r}] ERROR: ${e}`,...t)}function u(e,...t){const r=(new Date).toISOString();console.warn(`[${r}] WARNING: ${e}`,...t)}function c(e,...t){if(!o)return;const r=(new Date).toISOString();console.debug(`[${r}] DEBUG: ${e}`,...t)}},45646:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapHashToField=t.getMinHashLength=t.getFieldBytesLength=t.hashToPrivateScalar=t.FpSqrtEven=t.FpSqrtOdd=t.Field=t.nLength=t.FpIsSquare=t.FpDiv=t.FpInvertBatch=t.FpPow=t.validateField=t.isNegativeLE=t.FpSqrt=t.tonelliShanks=t.invert=t.pow2=t.pow=t.mod=void 0;const n=r(98421),i=BigInt(0),o=BigInt(1),s=BigInt(2),a=BigInt(3),u=BigInt(4),c=BigInt(5),l=BigInt(8);function f(e,t){const r=e%t;return r>=i?r:t+r}function h(e,t,r){if(r<=i||t<i)throw new Error("Expected power/modulo > 0");if(r===o)return i;let n=o;for(;t>i;)t&o&&(n=n*e%r),e=e*e%r,t>>=o;return n}function d(e,t){if(e===i||t<=i)throw new Error(`invert: expected positive integers, got n=${e} mod=${t}`);let r=f(e,t),n=t,s=i,a=o,u=o,c=i;for(;r!==i;){const e=n/r,t=n%r,i=s-u*e,o=a-c*e;n=r,r=t,s=u,a=c,u=i,c=o}if(n!==o)throw new Error("invert: does not exist");return f(s,t)}function p(e){const t=(e-o)/s;let r,n,a;for(r=e-o,n=0;r%s===i;r/=s,n++);for(a=s;a<e&&h(a,t,e)!==e-o;a++);if(1===n){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}const c=(r+o)/s;return function(e,i){if(e.pow(i,t)===e.neg(e.ONE))throw new Error("Cannot find square root");let s=n,u=e.pow(e.mul(e.ONE,a),r),l=e.pow(i,c),f=e.pow(i,r);for(;!e.eql(f,e.ONE);){if(e.eql(f,e.ZERO))return e.ZERO;let t=1;for(let r=e.sqr(f);t<s&&!e.eql(r,e.ONE);t++)r=e.sqr(r);const r=e.pow(u,o<<BigInt(s-t-1));u=e.sqr(r),l=e.mul(l,r),f=e.mul(f,u),s=t}return l}}function g(e){if(e%u===a){const t=(e+o)/u;return function(e,r){const n=e.pow(r,t);if(!e.eql(e.sqr(n),r))throw new Error("Cannot find square root");return n}}if(e%l===c){const t=(e-c)/l;return function(e,r){const n=e.mul(r,s),i=e.pow(n,t),o=e.mul(r,i),a=e.mul(e.mul(o,s),i),u=e.mul(o,e.sub(a,e.ONE));if(!e.eql(e.sqr(u),r))throw new Error("Cannot find square root");return u}}return p(e)}BigInt(9),BigInt(16),t.mod=f,t.pow=h,t.pow2=function(e,t,r){let n=e;for(;t-- >i;)n*=n,n%=r;return n},t.invert=d,t.tonelliShanks=p,t.FpSqrt=g,t.isNegativeLE=(e,t)=>(f(e,t)&o)===o;const b=["create","isValid","is0","neg","inv","sqrt","sqr","eql","add","sub","mul","pow","div","addN","subN","mulN","sqrN"];function y(e,t,r){if(r<i)throw new Error("Expected power > 0");if(r===i)return e.ONE;if(r===o)return t;let n=e.ONE,s=t;for(;r>i;)r&o&&(n=e.mul(n,s)),s=e.sqr(s),r>>=o;return n}function m(e,t){const r=new Array(t.length),n=t.reduce(((t,n,i)=>e.is0(n)?t:(r[i]=t,e.mul(t,n))),e.ONE),i=e.inv(n);return t.reduceRight(((t,n,i)=>e.is0(n)?t:(r[i]=e.mul(t,r[i]),e.mul(t,n))),i),r}function v(e,t){const r=void 0!==t?t:e.toString(2).length;return{nBitLength:r,nByteLength:Math.ceil(r/8)}}function w(e){if("bigint"!=typeof e)throw new Error("field order must be bigint");const t=e.toString(2).length;return Math.ceil(t/8)}function E(e){const t=w(e);return t+Math.ceil(t/2)}t.validateField=function(e){const t=b.reduce(((e,t)=>(e[t]="function",e)),{ORDER:"bigint",MASK:"bigint",BYTES:"isSafeInteger",BITS:"isSafeInteger"});return(0,n.validateObject)(e,t)},t.FpPow=y,t.FpInvertBatch=m,t.FpDiv=function(e,t,r){return e.mul(t,"bigint"==typeof r?d(r,e.ORDER):e.inv(r))},t.FpIsSquare=function(e){const t=(e.ORDER-o)/s;return r=>{const n=e.pow(r,t);return e.eql(n,e.ZERO)||e.eql(n,e.ONE)}},t.nLength=v,t.Field=function(e,t,r=!1,s={}){if(e<=i)throw new Error(`Expected Field ORDER > 0, got ${e}`);const{nBitLength:a,nByteLength:u}=v(e,t);if(u>2048)throw new Error("Field lengths over 2048 bytes are not supported");const c=g(e),l=Object.freeze({ORDER:e,BITS:a,BYTES:u,MASK:(0,n.bitMask)(a),ZERO:i,ONE:o,create:t=>f(t,e),isValid:t=>{if("bigint"!=typeof t)throw new Error("Invalid field element: expected bigint, got "+typeof t);return i<=t&&t<e},is0:e=>e===i,isOdd:e=>(e&o)===o,neg:t=>f(-t,e),eql:(e,t)=>e===t,sqr:t=>f(t*t,e),add:(t,r)=>f(t+r,e),sub:(t,r)=>f(t-r,e),mul:(t,r)=>f(t*r,e),pow:(e,t)=>y(l,e,t),div:(t,r)=>f(t*d(r,e),e),sqrN:e=>e*e,addN:(e,t)=>e+t,subN:(e,t)=>e-t,mulN:(e,t)=>e*t,inv:t=>d(t,e),sqrt:s.sqrt||(e=>c(l,e)),invertBatch:e=>m(l,e),cmov:(e,t,r)=>r?t:e,toBytes:e=>r?(0,n.numberToBytesLE)(e,u):(0,n.numberToBytesBE)(e,u),fromBytes:e=>{if(e.length!==u)throw new Error(`Fp.fromBytes: expected ${u}, got ${e.length}`);return r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e)}});return Object.freeze(l)},t.FpSqrtOdd=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?r:e.neg(r)},t.FpSqrtEven=function(e,t){if(!e.isOdd)throw new Error("Field doesn't have isOdd");const r=e.sqrt(t);return e.isOdd(r)?e.neg(r):r},t.hashToPrivateScalar=function(e,t,r=!1){const i=(e=(0,n.ensureBytes)("privateHash",e)).length,s=v(t).nByteLength+8;if(s<24||i<s||i>1024)throw new Error(`hashToPrivateScalar: expected ${s}-1024 bytes of input, got ${i}`);return f(r?(0,n.bytesToNumberLE)(e):(0,n.bytesToNumberBE)(e),t-o)+o},t.getFieldBytesLength=w,t.getMinHashLength=E,t.mapHashToField=function(e,t,r=!1){const i=e.length,s=w(t),a=E(t);if(i<16||i<a||i>1024)throw new Error(`expected ${a}-1024 bytes of input, got ${i}`);const u=f(r?(0,n.bytesToNumberBE)(e):(0,n.bytesToNumberLE)(e),t-o)+o;return r?(0,n.numberToBytesLE)(u,s):(0,n.numberToBytesBE)(u,s)}},46229:(e,t,r)=>{"use strict";t.sha1=r(43917),t.sha224=r(47714),t.sha256=r(2287),t.sha384=r(21911),t.sha512=r(57766)},46383:(e,t,r)=>{var n=r(92861).Buffer,i=r(30295);function o(e,t,r){var o=t.length,s=i(t,e._cache);return e._cache=e._cache.slice(o),e._prev=n.concat([e._prev,r?t:s]),s}t.encrypt=function(e,t,r){for(var i,s=n.allocUnsafe(0);t.length;){if(0===e._cache.length&&(e._cache=e._cipher.encryptBlock(e._prev),e._prev=n.allocUnsafe(0)),!(e._cache.length<=t.length)){s=n.concat([s,o(e,t,r)]);break}i=e._cache.length,s=n.concat([s,o(e,t.slice(0,i),r)]),t=t.slice(i)}return s}},46402:(e,t,r)=>{!function(){function t(e){(e=e||{}).file=String(e.file||"radata");var r=t[e.file],n=null;if(r)return console.log("Warning: reusing same IndexedDB store and options as 1st."),t[e.file];r=t[e.file]=function(){};try{e.indexedDB=e.indexedDB||t.indexedDB||indexedDB}catch(e){}try{if(!e.indexedDB||"file:"==location.protocol){var i=r.d||(r.d={});return r.put=function(e,t,r){i[e]=t,setTimeout((function(){r(null,1)}),250)},r.get=function(e,t){setTimeout((function(){t(null,i[e]||void 0)}),5)},console.log("Warning: No indexedDB exists to persist data to!"),r}}catch(e){}return r.start=function(){var t=indexedDB.open(e.file,1);t.onupgradeneeded=function(t){t.target.result.createObjectStore(e.file)},t.onsuccess=function(){n=t.result},t.onerror=function(e){console.log(e||1)}},r.start(),r.put=function(t,i,o){if(n){var s=n.transaction([e.file],"readwrite"),a=s.objectStore(e.file),u=a.put(i,""+t);u.onsuccess=a.onsuccess=s.onsuccess=function(){o(null,1)},u.onabort=a.onabort=s.onabort=function(e){o(e||"put.tx.abort")},u.onerror=a.onerror=s.onerror=function(e){o(e||"put.tx.error")}}else setTimeout((function(){r.put(t,i,o)}),1)},r.get=function(t,i){if(n){var o=n.transaction([e.file],"readonly").objectStore(e.file).get(""+t);o.onsuccess=function(){i(null,o.result)},o.onabort=function(e){i(e||4)},o.onerror=function(e){i(e||5)}}else setTimeout((function(){r.get(t,i)}),9)},setInterval((function(){n&&n.close(),n=null,r.start()}),15e3),r}if("undefined"!=typeof window)(t.window=window).RindexedDB=t,t.indexedDB=window.indexedDB;else try{e.exports=t}catch(e){}try{(t.window.Gun||r(54827)).on("create",(function(e){this.to.next(e),e.opt.store=e.opt.store||t(e.opt)}))}catch(e){}}()},46517:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(...e){const t=(e,t)=>r=>e(t(r));return{encode:Array.from(e).reverse().reduce(((e,r)=>e?t(e,r.encode):r.encode),void 0),decode:e.reduce(((e,r)=>e?t(e,r.decode):r.decode),void 0)}}function i(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function o(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function s(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function a(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function u(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let i=0;const o=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let o=i;o<s.length;o++){const a=s[o],u=t*e+a;if(!Number.isSafeInteger(u)||t*e/t!==e||u-a!==t*e)throw new Error("convertRadix: carry overflow");if(e=u%n,s[o]=Math.floor(u/n),!Number.isSafeInteger(s[o])||s[o]*n+e!==u)throw new Error("convertRadix: carry overflow");r&&(s[o]?r=!1:i=o)}if(o.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)o.push(0);return o.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64url=t.base64=t.base32crockford=t.base32hex=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const c=(e,t)=>t?c(t,e%t):e,l=(e,t)=>e+(t-c(e,t));function f(e,t,n,i){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(l(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${l(t,n)}`);let o=0,s=0;const a=2**n-1,u=[];for(const i of e){if(r(i),i>=2**t)throw new Error(`convertRadix2: invalid data word=${i} from=${t}`);if(o=o<<t|i,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)u.push((o>>s-n&a)>>>0);o&=2**s-1}if(o=o<<n-s&a,!i&&s>=t)throw new Error("Excess padding");if(!i&&o)throw new Error(`Non-zero padding: ${o}`);return i&&s>0&&u.push(o>>>0),u}function h(e){return r(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return u(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(u(t,e,256))}}}function d(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(f(r,e,8,t))}}}function p(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),i=new Uint8Array(r.length+e);return i.set(r),i.set(n,r.length),i},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),i=t(n).slice(0,e),o=r.slice(-e);for(let t=0;t<e;t++)if(i[t]!==o[t])throw new Error("Invalid checksum");return n}}}t.utils={alphabet:i,chain:n,checksum:g,radix:h,radix2:d,join:o,padding:s},t.base16=n(d(4),i("0123456789ABCDEF"),o("")),t.base32=n(d(5),i("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),s(5),o("")),t.base32hex=n(d(5),i("0123456789ABCDEFGHIJKLMNOPQRSTUV"),s(5),o("")),t.base32crockford=n(d(5),i("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),o(""),a((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),s(6),o("")),t.base64url=n(d(6),i("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(6),o(""));const b=e=>n(h(58),i(e),o(""));t.base58=b("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=b("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=b("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const y=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const i=e.subarray(n,n+8);r+=t.base58.encode(i).padStart(y[i.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const i=e.slice(n,n+11),o=y.indexOf(i.length),s=t.base58.decode(i);for(let e=0;e<s.length-o;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(s.slice(s.length-o)))}return Uint8Array.from(r)}},t.base58check=e=>n(g(4,(t=>e(e(t)))),t.base58);const m=n(i("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),o("")),v=[996825010,642813549,513874426,1027748829,705979059];function w(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<v.length;e++)1==(t>>e&1)&&(r^=v[e]);return r}function E(e,t,r=1){const n=e.length;let i=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);i=w(i)^r>>5}i=w(i);for(let t=0;t<n;t++)i=w(i)^31&e.charCodeAt(t);for(let e of t)i=w(i)^e;for(let e=0;e<6;e++)i=w(i);return i^=r,m.encode(f([i%2**30],30,5,!1))}function A(e){const t="bech32"===e?1:734539939,r=d(5),n=r.decode,i=r.encode,o=p(n);function s(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const i=(e=n).lastIndexOf("1");if(0===i||-1===i)throw new Error('Letter "1" must be present between prefix and data only');const o=e.slice(0,i),s=e.slice(i+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=m.decode(s).slice(0,-6),u=E(o,a,t);if(!s.endsWith(u))throw new Error(`Invalid checksum in ${e}: expected "${u}"`);return{prefix:o,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const i=e.length+7+r.length;if(!1!==n&&i>n)throw new TypeError(`Length ${i} exceeds limit ${n}`);return`${e=e.toLowerCase()}1${m.encode(r)}${E(e,r,t)}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:p(s),fromWords:n,fromWordsUnsafe:o,toWords:i}}t.bech32=A("bech32"),t.bech32m=A("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=n(d(4),i("0123456789abcdef"),o(""),a((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const _={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},S=`Invalid encoding type. Available types: ${Object.keys(_).join(", ")}`;t.bytesToString=(e,t)=>{if("string"!=typeof e||!_.hasOwnProperty(e))throw new TypeError(S);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return _[e].encode(t)},t.str=t.bytesToString,t.stringToBytes=(e,t)=>{if(!_.hasOwnProperty(e))throw new TypeError(S);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return _[e].decode(t)},t.bytes=t.stringToBytes},46591:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=void 0;var n=r(79011);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return n.Wordlist}});var i=r(79943);Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return i.LangEn}});var o=r(72684);Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return o.WordlistOwl}});var s=r(48725);Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return s.WordlistOwlA}});var a=r(82431);Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return a.wordlists}})},46661:(e,t,r)=>{"use strict";var n=r(47011),i=n.assert,o=n.parseBytes,s=n.cachedProperty;function a(e,t){this.eddsa=e,this._secret=o(t.secret),e.isPoint(t.pub)?this._pub=t.pub:this._pubBytes=o(t.pub)}a.fromPublic=function(e,t){return t instanceof a?t:new a(e,{pub:t})},a.fromSecret=function(e,t){return t instanceof a?t:new a(e,{secret:t})},a.prototype.secret=function(){return this._secret},s(a,"pubBytes",(function(){return this.eddsa.encodePoint(this.pub())})),s(a,"pub",(function(){return this._pubBytes?this.eddsa.decodePoint(this._pubBytes):this.eddsa.g.mul(this.priv())})),s(a,"privBytes",(function(){var e=this.eddsa,t=this.hash(),r=e.encodingLength-1,n=t.slice(0,e.encodingLength);return n[0]&=248,n[r]&=127,n[r]|=64,n})),s(a,"priv",(function(){return this.eddsa.decodeInt(this.privBytes())})),s(a,"hash",(function(){return this.eddsa.hash().update(this.secret()).digest()})),s(a,"messagePrefix",(function(){return this.hash().slice(this.eddsa.encodingLength)})),a.prototype.sign=function(e){return i(this._secret,"KeyPair can only verify"),this.eddsa.sign(e,this)},a.prototype.verify=function(e,t){return this.eddsa.verify(e,t,this)},a.prototype.getSecret=function(e){return i(this._secret,"KeyPair is public only"),n.encode(this.secret(),e)},a.prototype.getPublic=function(e){return n.encode(this.pubBytes(),e)},e.exports=a},46737:(e,t,r)=>{(t=e.exports=r(30206)).Stream=t,t.Readable=t,t.Writable=r(7314),t.Duplex=r(26248),t.Transform=r(81816),t.PassThrough=r(75242)},46784:(e,t,r)=>{"use strict";var n=r(67426),i=r(66166),o=n.rotl32,s=n.sum32,a=n.sum32_3,u=n.sum32_4,c=i.BlockHash;function l(){if(!(this instanceof l))return new l;c.call(this),this.h=[1732584193,4023233417,2562383102,271733878,3285377520],this.endian="little"}function f(e,t,r,n){return e<=15?t^r^n:e<=31?t&r|~t&n:e<=47?(t|~r)^n:e<=63?t&n|r&~n:t^(r|~n)}function h(e){return e<=15?0:e<=31?1518500249:e<=47?1859775393:e<=63?2400959708:2840853838}function d(e){return e<=15?1352829926:e<=31?1548603684:e<=47?1836072691:e<=63?2053994217:0}n.inherits(l,c),t.ripemd160=l,l.blockSize=512,l.outSize=160,l.hmacStrength=192,l.padLength=64,l.prototype._update=function(e,t){for(var r=this.h[0],n=this.h[1],i=this.h[2],c=this.h[3],l=this.h[4],m=r,v=n,w=i,E=c,A=l,_=0;_<80;_++){var S=s(o(u(r,f(_,n,i,c),e[p[_]+t],h(_)),b[_]),l);r=l,l=c,c=o(i,10),i=n,n=S,S=s(o(u(m,f(79-_,v,w,E),e[g[_]+t],d(_)),y[_]),A),m=A,A=E,E=o(w,10),w=v,v=S}S=a(this.h[1],i,E),this.h[1]=a(this.h[2],c,A),this.h[2]=a(this.h[3],l,m),this.h[3]=a(this.h[4],r,v),this.h[4]=a(this.h[0],n,w),this.h[0]=S},l.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"little"):n.split32(this.h,"little")};var p=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],g=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],b=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],y=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11]},46843:(e,t,r)=>{var n=r(48287).Buffer,i=r(30295);function o(e){return e._prev=e._cipher.encryptBlock(e._prev),e._prev}t.encrypt=function(e,t){for(;e._cache.length<t.length;)e._cache=n.concat([e._cache,o(e)]);var r=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),i(t,r)}},47011:(e,t,r)=>{"use strict";var n=t,i=r(39404),o=r(43349),s=r(64367);n.assert=o,n.toArray=s.toArray,n.zero2=s.zero2,n.toHex=s.toHex,n.encode=s.encode,n.getNAF=function(e,t,r){var n,i=new Array(Math.max(e.bitLength(),r)+1);for(n=0;n<i.length;n+=1)i[n]=0;var o=1<<t+1,s=e.clone();for(n=0;n<i.length;n++){var a,u=s.andln(o-1);s.isOdd()?(a=u>(o>>1)-1?(o>>1)-u:u,s.isubn(a)):a=0,i[n]=a,s.iushrn(1)}return i},n.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,i=0,o=0;e.cmpn(-i)>0||t.cmpn(-o)>0;){var s,a,u=e.andln(3)+i&3,c=t.andln(3)+o&3;3===u&&(u=-1),3===c&&(c=-1),s=1&u?3!=(n=e.andln(7)+i&7)&&5!==n||2!==c?u:-u:0,r[0].push(s),a=1&c?3!=(n=t.andln(7)+o&7)&&5!==n||2!==u?c:-c:0,r[1].push(a),2*i===s+1&&(i=1-i),2*o===a+1&&(o=1-o),e.iushrn(1),t.iushrn(1)}return r},n.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},n.parseBytes=function(e){return"string"==typeof e?n.toArray(e,"hex"):e},n.intFromLE=function(e){return new i(e,"hex","le")}},47058:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.from=void 0;var n=r(30131),i=r(19724);t.from=function(e,t){return t?n.scheduled(e,t):i.innerFrom(e)}},47108:(e,t,r)=>{"use strict";var n=r(56698),i=r(88276),o=r(66011),s=r(62802),a=r(56168);function u(e){a.call(this,"digest"),this._hash=e}n(u,a),u.prototype._update=function(e){this._hash.update(e)},u.prototype._final=function(){return this._hash.digest()},e.exports=function(e){return"md5"===(e=e.toLowerCase())?new i:"rmd160"===e||"ripemd160"===e?new o:new u(s(e))}},47227:(e,t,r)=>{var n=r(56698),i=r(9673).Reporter,o=r(48287).Buffer;function s(e,t){i.call(this,t),o.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function a(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof a||(e=new a(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=o.byteLength(e);else{if(!o.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(s,i),t.t=s,s.prototype.save=function(){return{offset:this.offset,reporter:i.prototype.save.call(this)}},s.prototype.restore=function(e){var t=new s(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,i.prototype.restore.call(this,e.reporter),t},s.prototype.isEmpty=function(){return this.offset===this.length},s.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},s.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new s(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},s.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=a,a.prototype.join=function(e,t){return e||(e=new o(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):o.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},47363:(e,t,r)=>{var n=r(87568),i=r(56698);function o(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new o(e,t)},o.prototype._createNamed=function(e){var t;try{t=r(68961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return i(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},o.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},o.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},o.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},o.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},47703:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeOwlA=void 0;const n=r(75347),i=r(89610),o=r(22426);t.decodeOwlA=function(e,t){let r=(0,o.decodeOwl)(e).join(",");return t.split(/,/g).forEach((e=>{const o=e.match(/^([a-z]*)([0-9]+)([0-9])(.*)$/);(0,n.assertArgument)(null!==o,"internal error parsing accents","accents",t);let s=0;const a=(0,i.decodeBits)(parseInt(o[3]),o[4]),u=parseInt(o[2]),c=new RegExp(`([${o[1]}])`,"g");r=r.replace(c,((e,t)=>(0===--a[s]&&(t=String.fromCharCode(t.charCodeAt(0),u),s++),t)))})),r.split(",")}},47714:(e,t,r)=>{"use strict";var n=r(67426),i=r(2287);function o(){if(!(this instanceof o))return new o;i.call(this),this.h=[3238371032,914150663,812702999,4144912697,4290775857,1750603025,1694076839,3204075428]}n.inherits(o,i),e.exports=o,o.blockSize=512,o.outSize=224,o.hmacStrength=192,o.padLength=64,o.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h.slice(0,7),"big"):n.split32(this.h.slice(0,7),"big")}},47749:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createCurve=t.getHash=void 0;const n=r(54542),i=r(74224),o=r(97292);function s(e){return{hash:e,hmac:(t,...r)=>(0,n.hmac)(e,t,(0,i.concatBytes)(...r)),randomBytes:i.randomBytes}}t.getHash=s,t.createCurve=function(e,t){const r=t=>(0,o.weierstrass)({...e,...s(t)});return Object.freeze({...r(t),create:r})}},47790:()=>{},48050:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NostrConnectorPlugin=void 0;const n=r(34586),i=r(37897),o=r(70050),s=r(45628),a=r(23358);class u extends n.BasePlugin{name="nostr";version="1.0.0";description="Provides Bitcoin wallet connection and authentication for ShogunCore";bitcoinConnector=null;signer=null;initialize(e){super.initialize(e),this.bitcoinConnector=new i.NostrConnector,this.signer=new o.NostrSigner(this.bitcoinConnector),(0,s.log)("[nostrConnectorPlugin] Bitcoin wallet plugin initialized with signer support")}destroy(){this.bitcoinConnector&&this.bitcoinConnector.cleanup(),this.bitcoinConnector=null,this.signer=null,super.destroy(),(0,s.log)("[nostrConnectorPlugin] Bitcoin wallet plugin destroyed")}assertBitcoinConnector(){if(this.assertInitialized(),!this.bitcoinConnector)throw new Error("Bitcoin wallet module not initialized");return this.bitcoinConnector}assertSigner(){if(this.assertInitialized(),!this.signer)throw new Error("Nostr signer not initialized");return this.signer}isAvailable(){return this.assertBitcoinConnector().isAvailable()}isAlbyAvailable(){return(0,s.log)("[nostrConnectorPlugin] Alby is deprecated, using Nostr instead"),this.isNostrExtensionAvailable()}isNostrExtensionAvailable(){return this.assertBitcoinConnector().isNostrExtensionAvailable()}async connectBitcoinWallet(e="nostr"){return"alby"===e&&((0,s.log)("[nostrConnectorPlugin] Alby is deprecated, using Nostr instead"),e="nostr"),this.assertBitcoinConnector().connectWallet(e)}async generateCredentials(e,t,r){return(0,s.log)("[nostrConnectorPlugin] Calling credential generation for Bitcoin wallet"),this.assertBitcoinConnector().generateCredentials(e,t,r)}cleanup(){this.assertBitcoinConnector().cleanup()}clearSignatureCache(e){this.assertBitcoinConnector().clearSignatureCache(e)}async verifySignature(e,t,r){return this.assertBitcoinConnector().verifySignature(e,t,r)}async generatePassword(e){return this.assertBitcoinConnector().generatePassword(e)}async createSigningCredential(e){try{return(0,s.log)(`Creating Nostr signing credential for address: ${e}`),await this.assertSigner().createSigningCredential(e)}catch(e){throw(0,s.logError)(`Error creating Nostr signing credential: ${e.message}`),e}}createAuthenticator(e){try{return(0,s.log)(`Creating Nostr authenticator for address: ${e}`),this.assertSigner().createAuthenticator(e)}catch(e){throw(0,s.logError)(`Error creating Nostr authenticator: ${e.message}`),e}}async createDerivedKeyPair(e,t){try{return(0,s.log)(`Creating derived key pair for address: ${e}`),await this.assertSigner().createDerivedKeyPair(e,t)}catch(e){throw(0,s.logError)(`Error creating derived key pair: ${e.message}`),e}}async signWithDerivedKeys(e,t,r){try{return(0,s.log)(`Signing data with derived keys for address: ${t}`),await this.assertSigner().signWithDerivedKeys(e,t,r)}catch(e){throw(0,s.logError)(`Error signing with derived keys: ${e.message}`),e}}getSigningCredential(e){return this.assertSigner().getCredential(e)}listSigningCredentials(){return this.assertSigner().listCredentials()}removeSigningCredential(e){return this.assertSigner().removeCredential(e)}async createGunUserFromSigningCredential(e){try{const t=this.assertInitialized();return(0,s.log)(`Creating Gun user from Nostr signing credential: ${e}`),await this.assertSigner().createGunUser(e,t.gun)}catch(e){throw(0,s.logError)(`Error creating Gun user from Nostr signing credential: ${e.message}`),e}}getGunUserPubFromSigningCredential(e){return this.assertSigner().getGunUserPub(e)}getPassword(e){return this.assertSigner().getPassword(e)}async verifyConsistency(e,t){try{return(0,s.log)(`Verifying Nostr consistency for address: ${e}`),await this.assertSigner().verifyConsistency(e,t)}catch(e){return(0,s.logError)(`Error verifying Nostr consistency: ${e.message}`),{consistent:!1}}}async setupConsistentOneshotSigning(e){try{(0,s.log)(`Setting up consistent Nostr oneshot signing for: ${e}`);const t=await this.createSigningCredential(e);return{credential:t,authenticator:this.createAuthenticator(e),gunUser:await this.createGunUserFromSigningCredential(e),username:t.username,password:t.password}}catch(e){throw(0,s.logError)(`Error setting up consistent Nostr oneshot signing: ${e.message}`),e}}async login(e){(0,s.log)("[nostrConnectorPlugin] Login with Bitcoin wallet");try{const t=this.assertInitialized();if((0,s.log)(`Bitcoin wallet login attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for login");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");const r=i.MESSAGE_TO_SIGN,n=await this.assertBitcoinConnector().requestSignature(e,r);(0,s.log)("[nostrConnectorPlugin] Generating credentials for Bitcoin wallet login...");const o=await this.generateCredentials(e,n,r);if(!(o?.username&&o?.key&&o.message&&o.signature))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,s.log)(`Credentials generated successfully. Username: ${o.username}`),(0,s.log)("[nostrConnectorPlugin] Verifying Bitcoin wallet signature..."),!await this.verifySignature(o.message,o.signature,e))throw(0,s.logError)(`Signature verification failed for address: ${e}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,s.log)("[nostrConnectorPlugin] Bitcoin wallet signature verified successfully.");const u=await(0,i.deriveNostrKeys)(e,n,r);t.setAuthMethod("nostr");const c=await t.login(o.username,"",u);if(!c.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"BITCOIN_LOGIN_FAILED",c.error||"Failed to log in with Bitcoin credentials");return t.emit("auth:login",{userPub:c.userPub,username:o.username,method:"bitcoin"}),c}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_LOGIN_ERROR",n=e?.message||"Unknown error during Bitcoin wallet login";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,s.log)("[nostrConnectorPlugin] Sign up with Bitcoin wallet");try{const t=this.assertInitialized();if((0,s.log)(`Bitcoin wallet signup attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Bitcoin address required for signup");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"BITCOIN_WALLET_UNAVAILABLE","No Bitcoin wallet available in the browser");const r=i.MESSAGE_TO_SIGN,n=await this.assertBitcoinConnector().requestSignature(e,r);(0,s.log)("[nostrConnectorPlugin] Generating credentials for Bitcoin wallet signup...");const o=await this.generateCredentials(e,n,r);if(!(o?.username&&o?.key&&o.message&&o.signature))throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Bitcoin wallet credentials not generated correctly or signature missing");if((0,s.log)(`Credentials generated successfully. Username: ${o.username}`),(0,s.log)("[nostrConnectorPlugin] Verifying Bitcoin wallet signature..."),!await this.verifySignature(o.message,o.signature,e))throw(0,s.logError)(`Signature verification failed for address: ${e}`),(0,a.createError)(a.ErrorType.SECURITY,"SIGNATURE_VERIFICATION_FAILED","Bitcoin wallet signature verification failed");(0,s.log)("[nostrConnectorPlugin] Bitcoin wallet signature verified successfully.");const u=await(0,i.deriveNostrKeys)(e,n,r);t.setAuthMethod("nostr");const c=await t.signUp(o.username,"","",u);if(c.success){const e=await t.login(o.username,"",u);return e.success?((0,s.log)(`Bitcoin wallet registration and login completed for user: ${o.username}`),t.emit("auth:signup",{userPub:e.userPub,username:o.username,method:"bitcoin"}),{...e}):{...c,error:"User created but login failed"}}return c.error&&c.error.toLowerCase().includes("exist")?{...await t.login(o.username,"",u)}:c}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"BITCOIN_SIGNUP_ERROR",n=e?.message||"Unknown error during Bitcoin wallet signup";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async loginWithBitcoinWallet(e){return this.login(e)}async signUpWithBitcoinWallet(e){return this.signUp(e)}}t.NostrConnectorPlugin=u},48051:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Observable=void 0;var n=r(2708),i=r(69879),o=r(2884),s=r(99517),a=r(93728),u=r(10281),c=r(12688),l=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var r=new e;return r.source=this,r.operator=t,r},e.prototype.subscribe=function(e,t,r){var o,s=this,a=(o=e)&&o instanceof n.Subscriber||function(e){return e&&u.isFunction(e.next)&&u.isFunction(e.error)&&u.isFunction(e.complete)}(o)&&i.isSubscription(o)?e:new n.SafeSubscriber(e,t,r);return c.errorContext((function(){var e=s,t=e.operator,r=e.source;a.add(t?t.call(a,r):r?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var r=this;return new(t=f(t))((function(t,i){var o=new n.SafeSubscriber({next:function(t){try{e(t)}catch(e){i(e),o.unsubscribe()}},error:i,complete:t});r.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.observable]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.pipeFromArray(e)(this)},e.prototype.toPromise=function(e){var t=this;return new(e=f(e))((function(e,r){var n;t.subscribe((function(e){return n=e}),(function(e){return r(e)}),(function(){return e(n)}))}))},e.create=function(t){return new e(t)},e}();function f(e){var t;return null!==(t=null!=e?e:a.config.Promise)&&void 0!==t?t:Promise}t.Observable=l},48089:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Connector=void 0;const i=r(14193),o=r(45628),s=r(23358),a=r(14134),u=n(r(67476));class c extends a.EventEmitter{MESSAGE_TO_SIGN="I Love Shogun!";DEFAULT_CONFIG={cacheDuration:18e5,maxRetries:3,retryDelay:1e3,timeout:6e4};config;signatureCache=new Map;provider=null;customProvider=null;customWallet=null;constructor(e={}){super(),this.config={...this.DEFAULT_CONFIG,...e},this.initProvider(),this.setupEventListeners()}initProvider(){if("undefined"!=typeof window)try{const e=this.getAvailableEthereumProvider();e?(this.provider=new i.ethers.BrowserProvider(e),(0,o.logDebug)("BrowserProvider initialized successfully")):(0,o.logWarn)("No compatible Ethereum provider found")}catch(e){(0,o.logError)("Failed to initialize BrowserProvider",e)}else(0,o.logWarn)("Window object not available (non-browser environment)")}getAvailableEthereumProvider(){if("undefined"==typeof window)return;const e=[{source:()=>window._ethereumProviders&&window._ethereumProviders[0],name:"Registry Primary"},{source:()=>window.ethereum,name:"Standard ethereum"},{source:()=>window.web3?.currentProvider,name:"Legacy web3"},{source:()=>window.metamask,name:"MetaMask specific"},{source:()=>window.ethereum?.providers?.find((e=>e.isMetaMask)),name:"MetaMask from providers array"},{source:()=>window.ethereum?.providers?.[0],name:"First provider in array"},{source:()=>window.enkrypt?.providers?.ethereum,name:"Enkrypt"},{source:()=>window.coinbaseWalletExtension,name:"Coinbase"},{source:()=>window.trustWallet,name:"Trust Wallet"},{source:()=>Array.isArray(window._ethereumProviders)?window._ethereumProviders.find((e=>!e._isProxy)):void 0,name:"Registry non-proxy"}];for(const{source:t,name:r}of e)try{const e=t();if(e&&"function"==typeof e.request)return(0,o.logDebug)(`Found compatible Ethereum provider: ${r}`),e}catch(e){(0,o.logWarn)(`Error checking provider ${r}:`,e);continue}(0,o.logWarn)("No compatible Ethereum provider found")}async setupProvider(){try{if("undefined"!=typeof window){const e=this.getAvailableEthereumProvider();e?(this.provider=new i.ethers.BrowserProvider(e),(0,o.logDebug)("BrowserProvider initialized successfully")):(0,o.logWarn)("No compatible Ethereum provider found")}else(0,o.logWarn)("Window object not available (non-browser environment)")}catch(e){(0,o.logError)("Failed to initialize BrowserProvider",e)}}setupEventListeners(){if(this.provider){this.provider.on("network",((e,t)=>{this.emit("chainChanged",e)}));try{const e=this.getAvailableEthereumProvider();e?.on&&(e.on("accountsChanged",(e=>{this.emit("accountsChanged",e)})),e.on("chainChanged",(e=>{this.emit("chainChanged",{chainId:e})})))}catch(e){(0,o.logWarn)("Failed to setup account change listeners",e)}}}cleanup(){this.provider&&this.provider.removeAllListeners(),this.removeAllListeners()}getCachedSignature(e){const t=this.signatureCache.get(e);return t?Date.now()-t.timestamp>this.config.cacheDuration?(this.signatureCache.delete(e),null):!t.signature||"string"!=typeof t.signature||t.signature.length<16?((0,o.logWarn)(`Invalid cached signature for address ${e} (length: ${t.signature?t.signature.length:0}), deleting from cache.`),this.signatureCache.delete(e),null):t.signature:null}cacheSignature(e,t){this.signatureCache.set(e,{signature:t,timestamp:Date.now(),address:e})}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim().toLowerCase();if(!i.ethers.isAddress(t))throw new Error("Invalid address format");return i.ethers.getAddress(t)}catch(e){throw s.ErrorHandler.handle(s.ErrorType.VALIDATION,"INVALID_ADDRESS","Invalid Ethereum address provided",e),e}}async connectMetaMask(){try{if((0,o.logDebug)("Attempting to connect to MetaMask..."),!this.provider&&((0,o.logDebug)("Provider not initialized, setting up..."),this.initProvider(),!this.provider))throw new Error("MetaMask is not available. Please install MetaMask extension.");const e=this.getAvailableEthereumProvider();if(!e)throw new Error("No compatible Ethereum provider found");(0,o.logDebug)("Requesting account access...");let t=[];try{t=await e.request({method:"eth_requestAccounts"})}catch(r){if((0,o.logWarn)("First account request failed, trying window.ethereum:",r),!window.ethereum||window.ethereum===e)throw new Error("User denied account access");try{t=await window.ethereum.request({method:"eth_requestAccounts"})}catch(e){throw(0,o.logError)("All account request methods failed",e),new Error("User denied account access")}}(0,o.logDebug)(`Accounts requested successfully: ${t.length} accounts returned`),t&&0!==t.length||(0,o.logDebug)("No accounts found, trying to get signer...");for(let e=1;e<=this.config.maxRetries;e++)try{(0,o.logDebug)(`Attempt ${e} to get signer...`);const t=await this.provider.getSigner(),r=await t.getAddress();if(!r){(0,o.logError)("No address returned from signer");continue}return(0,o.logDebug)(`Successfully connected to MetaMask with address: ${r}`),this.emit("connected",{address:r}),{success:!0,address:r}}catch(t){if((0,o.logError)(`Attempt ${e} failed:`,t),e===this.config.maxRetries)throw t;await new Promise((e=>setTimeout(e,this.config.retryDelay)))}throw new Error("Failed to connect after retries")}catch(e){return(0,o.logError)("Failed to connect to MetaMask:",e),s.ErrorHandler.handle(s.ErrorType.NETWORK,"METAMASK_CONNECTION_ERROR",e.message??"Unknown error while connecting to MetaMask",e),{success:!1,error:e.message}}}async generateCredentials(e){(0,o.log)("[web3Connector] Generating credentials for address:",e);try{const t=this.validateAddress(e);(0,o.log)("[web3Connector] Valid Address:",t);const r=this.getCachedSignature(t);if(r)return(0,o.log)("[web3Connector] Using cached signature for address:",t),this.generateCredentialsFromSignature(t,r);try{(0,o.log)("[web3Connector] Request signature with timeout");const e=await this.requestSignatureWithTimeout(t,this.MESSAGE_TO_SIGN,this.config.timeout);return this.cacheSignature(t,e),this.generateCredentialsFromSignature(t,e)}catch(e){throw(0,o.logWarn)(`Failed to get signature: ${e}. Using fallback method.`),e}}catch(e){throw s.ErrorHandler.handle(s.ErrorType.AUTHENTICATION,"CREDENTIALS_GENERATION_ERROR",e.message??"Error generating MetaMask credentials",e),e}}async generateCredentialsFromSignature(e,t){(0,o.log)("[web3Connector] Generating credentials from signature");const r=`${e}:${t}`;return await(0,u.default)(r,null,{includeP256:!0})}generateFallbackCredentials(e){(0,o.logWarn)("Using fallback credentials generation for address:",e);const t=`mm_${e.toLowerCase()}`,r=`SHOGUN_FALLBACK:${e.toLowerCase()}`;return{username:t,password:i.ethers.keccak256(i.ethers.toUtf8Bytes(r)),message:r,signature:i.ethers.keccak256(i.ethers.toUtf8Bytes(r))}}static isMetaMaskAvailable(){if("undefined"==typeof window)return!1;if(!0===window.ethereum?.isMetaMask)return!0;const e=[window.web3?.currentProvider,window.metamask];for(const t of e)if(!0===t?.isMetaMask)return!0;return!1}requestSignatureWithTimeout(e,t,r=3e4){return new Promise(((n,i)=>{let s=setTimeout((()=>{s=null,i(new Error("Timeout requesting signature"))}),r);const a=()=>{s&&(clearTimeout(s),s=null),window.ethereum?.removeListener&&window.ethereum.removeListener("accountsChanged",u)},u=e=>{a(),i(e)};return window.ethereum?.on&&window.ethereum.on("accountsChanged",u),(0,o.log)("[web3Connector] Initialize and Sign"),(async()=>{try{if(!this.provider&&(this.initProvider(),!this.provider))throw new Error("Provider not initialized");const r=await this.provider.getSigner(),i=await r.getAddress();if((0,o.log)("[web3Connector] Signer:",r),(0,o.log)("[web3Connector] Signer Address:",i),i.toLowerCase()!==e.toLowerCase())throw new Error(`Signer address (${i}) does not match expected address (${e})`);(0,o.log)(`Requesting signature for message: ${t}`);const s=await r.signMessage(t);(0,o.log)("[web3Connector] Signature obtained successfully"),a(),n(s)}catch(e){(0,o.logError)("Failed to request signature:",e),a(),i(e)}})()}))}isAvailable(){return"undefined"!=typeof window&&!!this.getAvailableEthereumProvider()}setCustomProvider(e,t){if(!e||"string"!=typeof e)throw new Error("Invalid RPC URL");if(!t||"string"!=typeof t)throw new Error("Invalid private key");try{this.customProvider=new i.ethers.JsonRpcProvider(e),this.customWallet=new i.ethers.Wallet(t,this.customProvider),(0,o.logDebug)("Custom provider configured successfully")}catch(e){throw new Error(`Error configuring provider: ${e.message??"Unknown error"}`)}}async getSigner(){try{if(this.customWallet)return this.customWallet;if(this.provider||this.initProvider(),!this.provider)throw new Error("Provider not initialized");return await this.provider.getSigner()}catch(e){throw new Error(`Unable to get Ethereum signer: ${e.message||"Unknown error"}`)}}async getProvider(){return this.customProvider?this.customProvider:(this.provider||this.initProvider(),this.provider)}async generatePassword(e){if(!e)throw new Error("Invalid signature");return i.ethers.keccak256(i.ethers.toUtf8Bytes(e)).slice(2,66)}async verifySignature(e,t){if(!e||!t)throw new Error("Invalid message or signature");try{return i.ethers.verifyMessage(e,t)}catch(e){throw new Error("Invalid message or signature")}}async getEthereumSigner(){if(!c.isMetaMaskAvailable())throw new Error("MetaMask not found. Please install MetaMask to continue.");try{const e=window.ethereum;return await e.request({method:"eth_requestAccounts"}),new i.ethers.BrowserProvider(e).getSigner()}catch(e){throw new Error(`Error accessing MetaMask: ${e.message??"Unknown error"}`)}}}t.Web3Connector=c,"undefined"!=typeof window?window.Web3Connector=c:void 0!==r.g&&(r.g.Web3Connector=c)},48098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Web3ConnectorPlugin=void 0;const n=r(34586),i=r(48089),o=r(59666),s=r(45628),a=r(23358);class u extends n.BasePlugin{name="web3";version="1.0.0";description="Provides Ethereum wallet connection and authentication for ShogunCore";Web3=null;signer=null;initialize(e){super.initialize(e),this.Web3=new i.Web3Connector,this.signer=new o.Web3Signer(this.Web3),(0,s.log)("[web3ConnectorPlugin] Web3 plugin initialized with signer support")}destroy(){this.Web3&&this.Web3.cleanup(),this.Web3=null,this.signer=null,super.destroy(),(0,s.log)("[web3ConnectorPlugin] Web3 plugin destroyed")}assertMetaMask(){if(this.assertInitialized(),!this.Web3)throw new Error("Web3 module not initialized");return this.Web3}assertSigner(){if(this.assertInitialized(),!this.signer)throw new Error("Web3 signer not initialized");return this.signer}isAvailable(){return this.assertMetaMask().isAvailable()}async connectMetaMask(){return this.assertMetaMask().connectMetaMask()}async generateCredentials(e){return(0,s.log)("[web3ConnectorPlugin] Calling credential generation"),this.assertMetaMask().generateCredentials(e)}cleanup(){this.assertMetaMask().cleanup()}setCustomProvider(e,t){this.assertMetaMask().setCustomProvider(e,t)}async getSigner(){return this.assertMetaMask().getSigner()}async getProvider(){return this.assertMetaMask().getProvider()}async generatePassword(e){return this.assertMetaMask().generatePassword(e)}async verifySignature(e,t){return this.assertMetaMask().verifySignature(e,t)}async createSigningCredential(e){try{return(0,s.log)(`Creating Web3 signing credential for address: ${e}`),await this.assertSigner().createSigningCredential(e)}catch(e){throw(0,s.logError)(`Error creating Web3 signing credential: ${e.message}`),e}}createAuthenticator(e){try{return(0,s.log)(`Creating Web3 authenticator for address: ${e}`),this.assertSigner().createAuthenticator(e)}catch(e){throw(0,s.logError)(`Error creating Web3 authenticator: ${e.message}`),e}}async createDerivedKeyPair(e,t){try{return(0,s.log)(`Creating derived key pair for address: ${e}`),await this.assertSigner().createDerivedKeyPair(e,t)}catch(e){throw(0,s.logError)(`Error creating derived key pair: ${e.message}`),e}}async signWithDerivedKeys(e,t,r){try{return(0,s.log)(`Signing data with derived keys for address: ${t}`),await this.assertSigner().signWithDerivedKeys(e,t,r)}catch(e){throw(0,s.logError)(`Error signing with derived keys: ${e.message}`),e}}getSigningCredential(e){return this.assertSigner().getCredential(e)}listSigningCredentials(){return this.assertSigner().listCredentials()}removeSigningCredential(e){return this.assertSigner().removeCredential(e)}async createGunUserFromSigningCredential(e){try{const t=this.assertInitialized();return(0,s.log)(`Creating Gun user from Web3 signing credential: ${e}`),await this.assertSigner().createGunUser(e,t.gun)}catch(e){throw(0,s.logError)(`Error creating Gun user from Web3 signing credential: ${e.message}`),e}}getGunUserPubFromSigningCredential(e){return this.assertSigner().getGunUserPub(e)}getPassword(e){return this.assertSigner().getPassword(e)}async verifyConsistency(e,t){try{return(0,s.log)(`Verifying Web3 consistency for address: ${e}`),await this.assertSigner().verifyConsistency(e,t)}catch(e){return(0,s.logError)(`Error verifying Web3 consistency: ${e.message}`),{consistent:!1}}}async setupConsistentOneshotSigning(e){try{(0,s.log)(`Setting up consistent Web3 oneshot signing for: ${e}`);const t=await this.createSigningCredential(e);return{credential:t,authenticator:this.createAuthenticator(e),gunUser:await this.createGunUserFromSigningCredential(e),username:t.username,password:t.password}}catch(e){throw(0,s.logError)(`Error setting up consistent Web3 oneshot signing: ${e.message}`),e}}async login(e){(0,s.log)("[web3ConnectorPlugin] Login with Web3");try{const t=this.assertInitialized();if((0,s.log)(`Web3 login attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for Web3 login");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"WEB3_UNAVAILABLE","Web3 is not available in the browser");(0,s.log)("[web3ConnectorPlugin] Generating credentials for Web3 login...");const r=await this.generateCredentials(e),n=e.toLowerCase();if(!r?.pub||!r?.priv)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Web3 credentials not generated correctly or signature missing");(0,s.log)(`Credentials generated successfully. Username: ${n}`),t.setAuthMethod("web3"),(0,s.log)("[web3ConnectorPlugin] Logging in using core login method...");const i=await t.login(n,"",r);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"WEB3_LOGIN_FAILED",i.error||"Failed to log in with Web3 credentials");return t.emit("auth:login",{userPub:i.userPub,username:e,method:"web3"}),i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"WEB3_LOGIN_ERROR",n=e?.message||"Unknown error during Web3 login";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,s.log)("[web3ConnectorPlugin] Sign up with Web3");try{const t=this.assertInitialized();if((0,s.log)(`Web3 registration attempt for address: ${e}`),!e)throw(0,a.createError)(a.ErrorType.VALIDATION,"ADDRESS_REQUIRED","Ethereum address required for Web3 registration");if(!this.isAvailable())throw(0,a.createError)(a.ErrorType.ENVIRONMENT,"WEB3_UNAVAILABLE","Web3 is not available in the browser");(0,s.log)("[web3ConnectorPlugin] Generating credentials for Web3 registration...");const r=await this.generateCredentials(e),n=e.toLowerCase();if(!r?.pub||!r?.priv)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"CREDENTIAL_GENERATION_FAILED","Web3 credentials not generated correctly or signature missing");(0,s.log)(`Credentials generated successfully. Username: ${n}`),t.setAuthMethod("web3"),(0,s.log)("[web3ConnectorPlugin] Signing up using core signUp method...");const i=await t.signUp(n,"","",r);if(!i.success)throw(0,a.createError)(a.ErrorType.AUTHENTICATION,"WEB3_SIGNUP_FAILED",i.error||"Failed to sign up with Web3 credentials");return i}catch(e){const t=e?.type||a.ErrorType.AUTHENTICATION,r=e?.code||"WEB3_SIGNUP_ERROR",n=e?.message||"Unknown error during Web3 registration";return{success:!1,error:a.ErrorHandler.handle(t,r,n,e).message}}}}t.Web3ConnectorPlugin=u},48206:(e,t,r)=>{var n=r(47108),i=r(92861).Buffer;function o(e){var t=i.allocUnsafe(4);return t.writeUInt32BE(e,0),t}e.exports=function(e,t){for(var r,s=i.alloc(0),a=0;s.length<t;)r=o(a++),s=i.concat([s,n("sha1").update(e).update(r).digest()]);return s.slice(0,t)}},48287:(e,t,r)=>{"use strict";const n=r(67526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const s=2147483647;function a(e){if(e>s)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return f(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=a(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(J(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(J(e,ArrayBuffer)||e&&J(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(J(e,SharedArrayBuffer)||e&&J(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=a(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||Q(e.length)?a(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function f(e){return l(e),a(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=a(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=s)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+s.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||J(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return V(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return K(e).length;default:if(i)return n?-1:V(e).length;t=(""+t).toLowerCase(),i=!0}}function b(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return B(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return x(this,t,r);case"latin1":case"binary":return M(this,t,r);case"base64":return P(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return T(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function y(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),Q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:v(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):v(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function v(e,t,r,n,i){let o,s=1,a=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;s=2,a/=2,u/=2,r/=2}function c(e,t){return 1===s?e[t]:e.readUInt16BE(t*s)}if(i){let n=-1;for(o=r;o<a;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*s}else-1!==n&&(o-=o-n),n=-1}else for(r+u>a&&(r=a-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let s;for(n>o/2&&(n=o/2),s=0;s<n;++s){const n=parseInt(t.substr(2*s,2),16);if(Q(n))return s;e[r+s]=n}return s}function E(e,t,r,n){return $(V(t,e.length-r),e,r,n)}function A(e,t,r,n){return $(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function _(e,t,r,n){return $(K(t),e,r,n)}function S(e,t,r,n){return $(function(e,t){let r,n,i;const o=[];for(let s=0;s<e.length&&!((t-=2)<0);++s)r=e.charCodeAt(s),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function P(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,s=t>239?4:t>223?3:t>191?2:1;if(i+s<=r){let r,n,a,u;switch(s){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],a=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&a)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&a,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=s}return function(e){const t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=O));return r}(n)}t.kMaxLength=s,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?a(e):void 0!==t?"string"==typeof r?a(e).fill(t,r):a(e).fill(t):a(e)}(e,t,r)},u.allocUnsafe=function(e){return f(e)},u.allocUnsafeSlow=function(e){return f(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),J(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(J(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)y(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)y(this,t,t+3),y(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)y(this,t,t+7),y(this,t+1,t+6),y(this,t+2,t+5),y(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):b.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(J(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),s=(r>>>=0)-(t>>>=0);const a=Math.min(o,s),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<a;++e)if(c[e]!==l[e]){o=c[e],s=l[e];break}return o<s?-1:s<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return E(this,e,t,r);case"ascii":case"latin1":case"binary":return A(this,e,t,r);case"base64":return _(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return S(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const O=4096;function x(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function M(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function B(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Z[e[n]];return i}function T(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function C(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function R(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,s>>=8,e[r++]=s,r}function N(e,t,r,n,i){z(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let s=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=s,s>>=8,e[r+2]=s,s>>=8,e[r+1]=s,s>>=8,e[r]=s,r+8}function j(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function U(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function L(e,t,r,n,o){return t=+t,r>>>=0,o||j(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=Y((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=Y((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=Y((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=Y((function(e){q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||G(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||C(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=Y((function(e,t=0){return R(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=Y((function(e,t=0){return N(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=0,o=1,s=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===s&&0!==this[t+i-1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);C(this,e,t,r,n-1,-n)}let i=r-1,o=1,s=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===s&&0!==this[t+i+1]&&(s=1),this[t+i]=(e/o|0)-s&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||C(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=Y((function(e,t=0){return R(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=Y((function(e,t=0){return N(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return U(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return U(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return L(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return L(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),s=o.length;if(0===s)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%s]}return this};const D={};function F(e,t,r){D[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function H(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function z(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new D.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||G(t,e.length-(r+1))}(n,i,o)}function q(e,t){if("number"!=typeof e)throw new D.ERR_INVALID_ARG_TYPE(t,"number",e)}function G(e,t,r){if(Math.floor(e)!==e)throw q(e,r),new D.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new D.ERR_BUFFER_OUT_OF_BOUNDS;throw new D.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}F("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),F("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),F("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=H(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=H(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const W=/[^+/0-9A-Za-z-_]/g;function V(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let s=0;s<n;++s){if(r=e.charCodeAt(s),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(s+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function K(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(W,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function $(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function J(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function Q(e){return e!=e}const Z=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function Y(e){return"undefined"==typeof BigInt?X:e}function X(){throw new Error("BigInt not supported")}},48461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchScan=void 0;var n=r(90680),i=r(65212);t.switchScan=function(e,t){return i.operate((function(r,i){var o=t;return n.switchMap((function(t,r){return e(o,t,r)}),(function(e,t){return o=t,t}))(r).subscribe(i),function(){o=null}}))}},48634:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.spelunk=t.getPassword=t.zpad=t.looseArrayify=void 0;const n=r(75347);function i(e){return"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),(0,n.getBytesCopy)(e)}t.looseArrayify=i,t.zpad=function(e,t){for(e=String(e);e.length<t;)e="0"+e;return e},t.getPassword=function(e){return"string"==typeof e?(0,n.toUtf8Bytes)(e,"NFKC"):(0,n.getBytesCopy)(e)},t.spelunk=function(e,t){const r=t.match(/^([a-z0-9$_.-]*)(:([a-z]+))?(!)?$/i);(0,n.assertArgument)(null!=r,"invalid path","path",t);const o=r[1],s=r[3],a="!"===r[4];let u=e;for(const e of o.toLowerCase().split(".")){if(Array.isArray(u)){if(!e.match(/^[0-9]+$/))break;u=u[parseInt(e)]}else if("object"==typeof u){let t=null;for(const r in u)if(r.toLowerCase()===e){t=u[r];break}u=t}else u=null;if(null==u)break}if((0,n.assertArgument)(!a||null!=u,"missing required value","path",o),s&&null!=u){if("int"===s){if("string"==typeof u&&u.match(/^-?[0-9]+$/))return parseInt(u);if(Number.isSafeInteger(u))return u}if("number"===s&&"string"==typeof u&&u.match(/^-?[0-9.]*$/))return parseFloat(u);if("data"===s&&"string"==typeof u)return i(u);if("array"===s&&Array.isArray(u))return u;if(s===typeof u)return u;(0,n.assertArgument)(!1,`wrong type found for ${s} `,"path",o)}return u}},48717:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyMessage=t.hashMessage=void 0;const n=r(32291),i=r(1295),o=r(77778),s=r(75347);function a(e){return"string"==typeof e&&(e=(0,s.toUtf8Bytes)(e)),(0,n.keccak256)((0,s.concat)([(0,s.toUtf8Bytes)(i.MessagePrefix),(0,s.toUtf8Bytes)(String(e.length)),e]))}t.hashMessage=a,t.verifyMessage=function(e,t){const r=a(e);return(0,o.recoverAddress)(r,t)}},48725:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwlA=void 0;const n=r(72684),i=r(47703);class o extends n.WordlistOwl{#ve;constructor(e,t,r,n){super(e,t,n),this.#ve=r}get _accent(){return this.#ve}_decodeWords(){return(0,i.decodeOwlA)(this._data,this._accent)}}t.WordlistOwlA=o},48766:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.StringCoder=void 0;const n=r(43948),i=r(39976),o=r(52348);class s extends o.DynamicBytesCoder{constructor(e){super("string",e)}defaultValue(){return""}encode(e,t){return super.encode(e,(0,n.toUtf8Bytes)(i.Typed.dereference(t,"string")))}decode(e){return(0,n.toUtf8String)(super.decode(e))}}t.StringCoder=s},48907:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ChainstackProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371);function a(e){switch(e){case"mainnet":return"39f1d67cedf8b7831010a665328c9197";case"arbitrum":return"0550c209db33c3abf4cc927e1e18cea1";case"bnb":return"98b5a77e531614387366f6fc5da097f8";case"matic":return"cd9d4d70377471aa7c142ec4a4205249"}(0,n.assertArgument)(!1,"unsupported network","network",e)}class u extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a(r.name)),super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.apiKey===a(this._network.name)}static getRequest(e,t){null==t&&(t=a(e.name));const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"ethereum-mainnet.core.chainstack.com";case"arbitrum":return"arbitrum-mainnet.core.chainstack.com";case"bnb":return"bsc-mainnet.core.chainstack.com";case"matic":return"polygon-mainnet.core.chainstack.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/${t}`);return r.allowGzip=!0,t===a(e.name)&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("ChainstackProvider"),!0)),r}}t.ChainstackProvider=u},48964:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=void 0;const n=r(87155);let i=!1;const o=function(e){return new Uint8Array((0,n.randomBytes)(e))};let s=o;function a(e){return s(e)}t.randomBytes=a,a._=o,a.lock=function(){i=!0},a.register=function(e){if(i)throw new Error("randomBytes is locked");s=e},Object.freeze(a)},49215:(e,t,r)=>{"use strict";var n,i=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.prototype.hasOwnProperty,u=(e,t)=>{for(var r in t)i(e,r,{get:t[r],enumerable:!0})},c={};u(c,{Relay:()=>Bt,SimplePool:()=>It,finalizeEvent:()=>I,fj:()=>pt,generateSecretKey:()=>B,getEventHash:()=>x,getFilterLimit:()=>dt,getPublicKey:()=>T,kinds:()=>R,matchFilter:()=>lt,matchFilters:()=>ft,mergeFilters:()=>ht,nip04:()=>Xt,nip05:()=>ar,nip10:()=>gr,nip11:()=>yr,nip13:()=>wr,nip17:()=>kr,nip18:()=>cn,nip19:()=>Ct,nip21:()=>dn,nip25:()=>yn,nip27:()=>wn,nip28:()=>Sn,nip30:()=>Bn,nip39:()=>jn,nip42:()=>Et,nip44:()=>xr,nip47:()=>Dn,nip54:()=>zn,nip57:()=>Gn,nip59:()=>Or,nip98:()=>Xn,parseReferences:()=>Yt,serializeEvent:()=>O,sortEvents:()=>g,utils:()=>y,validateEvent:()=>p,verifiedSymbol:()=>h,verifyEvent:()=>C}),e.exports=(n=c,((e,t,r,n)=>{if(t&&"object"==typeof t||"function"==typeof t)for(let r of s(t))a.call(e,r)||undefined===r||i(e,r,{get:()=>t[r],enumerable:!(n=o(t,r))||n.enumerable});return e})(i({},"__esModule",{value:!0}),n));var l=r(90752),f=r(99175),h=Symbol("verified"),d=e=>e instanceof Object;function p(e){if(!d(e))return!1;if("number"!=typeof e.kind)return!1;if("string"!=typeof e.content)return!1;if("number"!=typeof e.created_at)return!1;if("string"!=typeof e.pubkey)return!1;if(!e.pubkey.match(/^[a-f0-9]{64}$/))return!1;if(!Array.isArray(e.tags))return!1;for(let t=0;t<e.tags.length;t++){let r=e.tags[t];if(!Array.isArray(r))return!1;for(let e=0;e<r.length;e++)if("string"!=typeof r[e])return!1}return!0}function g(e){return e.sort(((e,t)=>e.created_at!==t.created_at?t.created_at-e.created_at:e.id.localeCompare(t.id)))}var b=r(22623),y={};u(y,{Queue:()=>k,QueueNode:()=>P,binarySearch:()=>S,bytesToHex:()=>m.bytesToHex,hexToBytes:()=>m.hexToBytes,insertEventIntoAscendingList:()=>_,insertEventIntoDescendingList:()=>A,normalizeURL:()=>E,utf8Decoder:()=>v,utf8Encoder:()=>w});var m=r(99175),v=new TextDecoder("utf-8"),w=new TextEncoder;function E(e){try{-1===e.indexOf("://")&&(e="wss://"+e);let t=new URL(e);return t.pathname=t.pathname.replace(/\/+/g,"/"),t.pathname.endsWith("/")&&(t.pathname=t.pathname.slice(0,-1)),("80"===t.port&&"ws:"===t.protocol||"443"===t.port&&"wss:"===t.protocol)&&(t.port=""),t.searchParams.sort(),t.hash="",t.toString()}catch(t){throw new Error(`Invalid URL: ${e}`)}}function A(e,t){const[r,n]=S(e,(e=>t.id===e.id?0:t.created_at===e.created_at?-1:e.created_at-t.created_at));return n||e.splice(r,0,t),e}function _(e,t){const[r,n]=S(e,(e=>t.id===e.id?0:t.created_at===e.created_at?-1:t.created_at-e.created_at));return n||e.splice(r,0,t),e}function S(e,t){let r=0,n=e.length-1;for(;r<=n;){const i=Math.floor((r+n)/2),o=t(e[i]);if(0===o)return[i,!0];o<0?n=i-1:r=i+1}return[r,!1]}var P=class{value;next=null;prev=null;constructor(e){this.value=e}},k=class{first;last;constructor(){this.first=null,this.last=null}enqueue(e){const t=new P(e);return this.last?this.last===this.first?(this.last=t,this.last.prev=this.first,this.first.next=t):(t.prev=this.last,this.last.next=t,this.last=t):(this.first=t,this.last=t),!0}dequeue(){if(!this.first)return null;if(this.first===this.last){const e=this.first;return this.first=null,this.last=null,e.value}const e=this.first;return this.first=e.next,this.first&&(this.first.prev=null),e.value}};function O(e){if(!p(e))throw new Error("can't serialize event with wrong or missing properties");return JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content])}function x(e){let t=(0,b.sha256)(w.encode(O(e)));return(0,f.bytesToHex)(t)}var M=new class{generateSecretKey(){return l.schnorr.utils.randomPrivateKey()}getPublicKey(e){return(0,f.bytesToHex)(l.schnorr.getPublicKey(e))}finalizeEvent(e,t){const r=e;return r.pubkey=(0,f.bytesToHex)(l.schnorr.getPublicKey(t)),r.id=x(r),r.sig=(0,f.bytesToHex)(l.schnorr.sign(x(r),t)),r[h]=!0,r}verifyEvent(e){if("boolean"==typeof e[h])return e[h];const t=x(e);if(t!==e.id)return e[h]=!1,!1;try{const r=l.schnorr.verify(e.sig,t,e.pubkey);return e[h]=r,r}catch(t){return e[h]=!1,!1}}},B=M.generateSecretKey,T=M.getPublicKey,I=M.finalizeEvent,C=M.verifyEvent,R={};function N(e){return 1e3<=e&&e<1e4||[1,2,4,5,6,7,8,16,40,41,42,43,44].includes(e)}function j(e){return[0,3].includes(e)||1e4<=e&&e<2e4}function U(e){return 2e4<=e&&e<3e4}function L(e){return 3e4<=e&&e<4e4}function D(e){return N(e)?"regular":j(e)?"replaceable":U(e)?"ephemeral":L(e)?"parameterized":"unknown"}function F(e,t){const r=t instanceof Array?t:[t];return p(e)&&r.includes(e.kind)||!1}u(R,{Application:()=>Ye,BadgeAward:()=>J,BadgeDefinition:()=>We,BlockedRelaysList:()=>ke,BookmarkList:()=>_e,Bookmarksets:()=>ze,Calendar:()=>ot,CalendarEventRSVP:()=>st,ChannelCreation:()=>X,ChannelHideMessage:()=>re,ChannelMessage:()=>te,ChannelMetadata:()=>ee,ChannelMuteUser:()=>ne,ClassifiedListing:()=>tt,ClientAuth:()=>Re,CommunitiesList:()=>Se,CommunityDefinition:()=>ct,CommunityPostApproval:()=>he,Contacts:()=>G,CreateOrUpdateProduct:()=>$e,CreateOrUpdateStall:()=>Ke,Curationsets:()=>qe,Date:()=>nt,DirectMessageRelaysList:()=>Be,DraftClassifiedListing:()=>rt,DraftLong:()=>Qe,Emojisets:()=>Ze,EncryptedDirectMessage:()=>W,EventDeletion:()=>V,FileMetadata:()=>se,FileServerPreference:()=>Te,Followsets:()=>De,GenericRepost:()=>Y,Genericlists:()=>Fe,GiftWrap:()=>oe,HTTPAuth:()=>Le,Handlerinformation:()=>ut,Handlerrecommendation:()=>at,Highlights:()=>ve,InterestsList:()=>xe,Interestsets:()=>Ve,JobFeedback:()=>ge,JobRequest:()=>de,JobResult:()=>pe,Label:()=>fe,LightningPubRPC:()=>Ce,LiveChatMessage:()=>ae,LiveEvent:()=>Xe,LongFormArticle:()=>Je,Metadata:()=>H,Mutelist:()=>we,NWCWalletInfo:()=>Ie,NWCWalletRequest:()=>Ne,NWCWalletResponse:()=>je,NostrConnect:()=>Ue,OpenTimestamps:()=>ie,Pinlist:()=>Ee,PrivateDirectMessage:()=>Z,ProblemTracker:()=>ue,ProfileBadges:()=>Ge,PublicChatsList:()=>Pe,Reaction:()=>$,RecommendRelay:()=>q,RelayList:()=>Ae,Relaysets:()=>He,Report:()=>ce,Reporting:()=>le,Repost:()=>K,Seal:()=>Q,SearchRelaysList:()=>Oe,ShortTextNote:()=>z,Time:()=>it,UserEmojiList:()=>Me,UserStatuses:()=>et,Zap:()=>me,ZapGoal:()=>be,ZapRequest:()=>ye,classifyKind:()=>D,isAddressableKind:()=>L,isEphemeralKind:()=>U,isKind:()=>F,isRegularKind:()=>N,isReplaceableKind:()=>j});var H=0,z=1,q=2,G=3,W=4,V=5,K=6,$=7,J=8,Q=13,Z=14,Y=16,X=40,ee=41,te=42,re=43,ne=44,ie=1040,oe=1059,se=1063,ae=1311,ue=1971,ce=1984,le=1984,fe=1985,he=4550,de=5999,pe=6999,ge=7e3,be=9041,ye=9734,me=9735,ve=9802,we=1e4,Ee=10001,Ae=10002,_e=10003,Se=10004,Pe=10005,ke=10006,Oe=10007,xe=10015,Me=10030,Be=10050,Te=10096,Ie=13194,Ce=21e3,Re=22242,Ne=23194,je=23195,Ue=24133,Le=27235,De=3e4,Fe=30001,He=30002,ze=30003,qe=30004,Ge=30008,We=30009,Ve=30015,Ke=30017,$e=30018,Je=30023,Qe=30024,Ze=30030,Ye=30078,Xe=30311,et=30315,tt=30402,rt=30403,nt=31922,it=31923,ot=31924,st=31925,at=31989,ut=31990,ct=34550;function lt(e,t){if(e.ids&&-1===e.ids.indexOf(t.id))return!1;if(e.kinds&&-1===e.kinds.indexOf(t.kind))return!1;if(e.authors&&-1===e.authors.indexOf(t.pubkey))return!1;for(let r in e)if("#"===r[0]){let n=e[`#${r.slice(1)}`];if(n&&!t.tags.find((([e,t])=>e===r.slice(1)&&-1!==n.indexOf(t))))return!1}return!(e.since&&t.created_at<e.since||e.until&&t.created_at>e.until)}function ft(e,t){for(let r=0;r<e.length;r++)if(lt(e[r],t))return!0;return!1}function ht(...e){let t={};for(let r=0;r<e.length;r++){let n=e[r];Object.entries(n).forEach((([e,r])=>{if("kinds"===e||"ids"===e||"authors"===e||"#"===e[0]){t[e]=t[e]||[];for(let n=0;n<r.length;n++){let i=r[n];t[e].includes(i)||t[e].push(i)}}})),n.limit&&(!t.limit||n.limit>t.limit)&&(t.limit=n.limit),n.until&&(!t.until||n.until>t.until)&&(t.until=n.until),n.since&&(!t.since||n.since<t.since)&&(t.since=n.since)}return t}function dt(e){if(e.ids&&!e.ids.length)return 0;if(e.kinds&&!e.kinds.length)return 0;if(e.authors&&!e.authors.length)return 0;for(const[t,r]of Object.entries(e))if("#"===t[0]&&Array.isArray(r)&&!r.length)return 0;return Math.min(Math.max(0,e.limit??1/0),e.ids?.length??1/0,e.authors?.length&&e.kinds?.every((e=>j(e)))?e.authors.length*e.kinds.length:1/0,e.authors?.length&&e.kinds?.every((e=>L(e)))&&e["#d"]?.length?e.authors.length*e.kinds.length*e["#d"].length:1/0)}var pt={};function gt(e,t){let r=t.length+3,n=e.indexOf(`"${t}":`)+r,i=e.slice(n).indexOf('"')+n+1;return e.slice(i,i+64)}function bt(e,t){let r=t.length,n=e.indexOf(`"${t}":`)+r+3,i=e.slice(n),o=Math.min(i.indexOf(","),i.indexOf("}"));return parseInt(i.slice(0,o),10)}function yt(e){let t=e.slice(0,22).indexOf('"EVENT"');if(-1===t)return null;let r=e.slice(t+7+1).indexOf('"');if(-1===r)return null;let n=t+7+1+r,i=e.slice(n+1,80).indexOf('"');if(-1===i)return null;let o=n+1+i;return e.slice(n+1,o)}function mt(e,t){return t===gt(e,"id")}function vt(e,t){return t===gt(e,"pubkey")}function wt(e,t){return t===bt(e,"kind")}u(pt,{getHex64:()=>gt,getInt:()=>bt,getSubscriptionId:()=>yt,matchEventId:()=>mt,matchEventKind:()=>wt,matchEventPubkey:()=>vt});var Et={};function At(e,t){return{kind:Re,created_at:Math.floor(Date.now()/1e3),tags:[["relay",e],["challenge",t]],content:""}}async function _t(){return new Promise((e=>{const t=new MessageChannel,r=()=>{t.port1.removeEventListener("message",r),e()};t.port1.addEventListener("message",r),t.port2.postMessage(0),t.port1.start()}))}u(Et,{makeAuthEvent:()=>At});var St,Pt=e=>(e[h]=!0,!0),kt=class extends Error{constructor(e,t){super(`Tried to send message '${e} on a closed connection to ${t}.`),this.name="SendingOnClosedConnection"}},Ot=class{url;_connected=!1;onclose=null;onnotice=e=>console.debug(`NOTICE from ${this.url}: ${e}`);baseEoseTimeout=4400;connectionTimeout=4400;publishTimeout=4400;openSubs=new Map;connectionTimeoutHandle;connectionPromise;openCountRequests=new Map;openEventPublishes=new Map;ws;incomingMessageQueue=new k;queueRunning=!1;challenge;authPromise;serial=0;verifyEvent;_WebSocket;constructor(e,t){this.url=E(e),this.verifyEvent=t.verifyEvent,this._WebSocket=t.websocketImplementation||WebSocket}static async connect(e,t){const r=new Ot(e,t);return await r.connect(),r}closeAllSubscriptions(e){for(let[t,r]of this.openSubs)r.close(e);this.openSubs.clear();for(let[t,r]of this.openEventPublishes)r.reject(new Error(e));this.openEventPublishes.clear();for(let[t,r]of this.openCountRequests)r.reject(new Error(e));this.openCountRequests.clear()}get connected(){return this._connected}async connect(){return this.connectionPromise||(this.challenge=void 0,this.authPromise=void 0,this.connectionPromise=new Promise(((e,t)=>{this.connectionTimeoutHandle=setTimeout((()=>{t("connection timed out"),this.connectionPromise=void 0,this.onclose?.(),this.closeAllSubscriptions("relay connection timed out")}),this.connectionTimeout);try{this.ws=new this._WebSocket(this.url)}catch(e){return clearTimeout(this.connectionTimeoutHandle),void t(e)}this.ws.onopen=()=>{clearTimeout(this.connectionTimeoutHandle),this._connected=!0,e()},this.ws.onerror=e=>{clearTimeout(this.connectionTimeoutHandle),t(e.message||"websocket error"),this._connected&&(this._connected=!1,this.connectionPromise=void 0,this.onclose?.(),this.closeAllSubscriptions("relay connection errored"))},this.ws.onclose=e=>{clearTimeout(this.connectionTimeoutHandle),t(e.message||"websocket closed"),this._connected&&(this._connected=!1,this.connectionPromise=void 0,this.onclose?.(),this.closeAllSubscriptions("relay connection closed"))},this.ws.onmessage=this._onmessage.bind(this)}))),this.connectionPromise}async runQueue(){for(this.queueRunning=!0;!1!==this.handleNext();)await _t();this.queueRunning=!1}handleNext(){const e=this.incomingMessageQueue.dequeue();if(!e)return!1;const t=yt(e);if(t){const r=this.openSubs.get(t);if(!r)return;const n=gt(e,"id"),i=r.alreadyHaveEvent?.(n);if(r.receivedEvent?.(this,n),i)return}try{let t=JSON.parse(e);switch(t[0]){case"EVENT":{const e=this.openSubs.get(t[1]),r=t[2];return void(this.verifyEvent(r)&&ft(e.filters,r)&&e.onevent(r))}case"COUNT":{const e=t[1],r=t[2],n=this.openCountRequests.get(e);return void(n&&(n.resolve(r.count),this.openCountRequests.delete(e)))}case"EOSE":{const e=this.openSubs.get(t[1]);if(!e)return;return void e.receivedEose()}case"OK":{const e=t[1],r=t[2],n=t[3],i=this.openEventPublishes.get(e);return void(i&&(clearTimeout(i.timeout),r?i.resolve(n):i.reject(new Error(n)),this.openEventPublishes.delete(e)))}case"CLOSED":{const e=t[1],r=this.openSubs.get(e);if(!r)return;return r.closed=!0,void r.close(t[2])}case"NOTICE":return void this.onnotice(t[1]);case"AUTH":return void(this.challenge=t[1])}}catch(e){return}}async send(e){if(!this.connectionPromise)throw new kt(e,this.url);this.connectionPromise.then((()=>{this.ws?.send(e)}))}async auth(e){const t=this.challenge;if(!t)throw new Error("can't perform auth, no challenge was received");return this.authPromise||(this.authPromise=new Promise((async(r,n)=>{try{let i=await e(At(this.url,t)),o=setTimeout((()=>{let e=this.openEventPublishes.get(i.id);e&&(e.reject(new Error("auth timed out")),this.openEventPublishes.delete(i.id))}),this.publishTimeout);this.openEventPublishes.set(i.id,{resolve:r,reject:n,timeout:o}),this.send('["AUTH",'+JSON.stringify(i)+"]")}catch(e){console.warn("subscribe auth function failed:",e)}}))),this.authPromise}async publish(e){const t=new Promise(((t,r)=>{const n=setTimeout((()=>{const t=this.openEventPublishes.get(e.id);t&&(t.reject(new Error("publish timed out")),this.openEventPublishes.delete(e.id))}),this.publishTimeout);this.openEventPublishes.set(e.id,{resolve:t,reject:r,timeout:n})}));return this.send('["EVENT",'+JSON.stringify(e)+"]"),t}async count(e,t){this.serial++;const r=t?.id||"count:"+this.serial,n=new Promise(((e,t)=>{this.openCountRequests.set(r,{resolve:e,reject:t})}));return this.send('["COUNT","'+r+'",'+JSON.stringify(e).substring(1)),n}subscribe(e,t){const r=this.prepareSubscription(e,t);return r.fire(),r}prepareSubscription(e,t){this.serial++;const r=t.id||(t.label?t.label+":":"sub:")+this.serial,n=new xt(this,r,e,t);return this.openSubs.set(r,n),n}close(){this.closeAllSubscriptions("relay connection closed by us"),this._connected=!1,this.ws?.close()}_onmessage(e){this.incomingMessageQueue.enqueue(e.data),this.queueRunning||this.runQueue()}},xt=class{relay;id;closed=!1;eosed=!1;filters;alreadyHaveEvent;receivedEvent;onevent;oneose;onclose;eoseTimeout;eoseTimeoutHandle;constructor(e,t,r,n){this.relay=e,this.filters=r,this.id=t,this.alreadyHaveEvent=n.alreadyHaveEvent,this.receivedEvent=n.receivedEvent,this.eoseTimeout=n.eoseTimeout||e.baseEoseTimeout,this.oneose=n.oneose,this.onclose=n.onclose,this.onevent=n.onevent||(e=>{console.warn(`onevent() callback not defined for subscription '${this.id}' in relay ${this.relay.url}. event received:`,e)})}fire(){this.relay.send('["REQ","'+this.id+'",'+JSON.stringify(this.filters).substring(1)),this.eoseTimeoutHandle=setTimeout(this.receivedEose.bind(this),this.eoseTimeout)}receivedEose(){this.eosed||(clearTimeout(this.eoseTimeoutHandle),this.eosed=!0,this.oneose?.())}close(e="closed by caller"){if(!this.closed&&this.relay.connected){try{this.relay.send('["CLOSE",'+JSON.stringify(this.id)+"]")}catch(e){if(!(e instanceof kt))throw e}this.closed=!0}this.relay.openSubs.delete(this.id),this.onclose?.(e)}};try{St=WebSocket}catch{}var Mt,Bt=class extends Ot{constructor(e){super(e,{verifyEvent:C,websocketImplementation:St})}static async connect(e){const t=new Bt(e);return await t.connect(),t}},Tt=class{relays=new Map;seenOn=new Map;trackRelays=!1;verifyEvent;trustedRelayURLs=new Set;_WebSocket;constructor(e){this.verifyEvent=e.verifyEvent,this._WebSocket=e.websocketImplementation}async ensureRelay(e,t){e=E(e);let r=this.relays.get(e);return r||(r=new Ot(e,{verifyEvent:this.trustedRelayURLs.has(e)?Pt:this.verifyEvent,websocketImplementation:this._WebSocket}),t?.connectionTimeout&&(r.connectionTimeout=t.connectionTimeout),this.relays.set(e,r)),await r.connect(),r}close(e){e.map(E).forEach((e=>{this.relays.get(e)?.close()}))}subscribe(e,t,r){return r.onauth=r.onauth||r.doauth,this.subscribeMap(e.map((e=>({url:e,filter:t}))),r)}subscribeMany(e,t,r){return r.onauth=r.onauth||r.doauth,this.subscribeMap(e.flatMap((e=>t.map((t=>({url:e,filter:t}))))),r)}subscribeMap(e,t){t.onauth=t.onauth||t.doauth,this.trackRelays&&(t.receivedEvent=(e,t)=>{let r=this.seenOn.get(t);r||(r=new Set,this.seenOn.set(t,r)),r.add(e)});const r=new Set,n=[],i=[];let o=r=>{i[r]||(i[r]=!0,i.filter((e=>e)).length===e.length&&(t.oneose?.(),o=()=>{}))};const s=[];let a=(r,n)=>{s[r]||(o(r),s[r]=n,s.filter((e=>e)).length===e.length&&(t.onclose?.(s),a=()=>{}))};const u=e=>{if(t.alreadyHaveEvent?.(e))return!0;const n=r.has(e);return r.add(e),n},c=Promise.all(e.map((async({url:e,filter:r},i)=>{let s;e=E(e);try{s=await this.ensureRelay(e,{connectionTimeout:t.maxWait?Math.max(.8*t.maxWait,t.maxWait-1e3):void 0})}catch(e){return void a(i,e?.message||String(e))}let c=s.subscribe([r],{...t,oneose:()=>o(i),onclose:e=>{e.startsWith("auth-required: ")&&t.onauth?s.auth(t.onauth).then((()=>{s.subscribe([r],{...t,oneose:()=>o(i),onclose:e=>{a(i,e)},alreadyHaveEvent:u,eoseTimeout:t.maxWait})})).catch((e=>{a(i,`auth was required and attempted, but failed with: ${e}`)})):a(i,e)},alreadyHaveEvent:u,eoseTimeout:t.maxWait});n.push(c)})));return{async close(e){await c,n.forEach((t=>{t.close(e)}))}}}subscribeEose(e,t,r){r.onauth=r.onauth||r.doauth;const n=this.subscribe(e,t,{...r,oneose(){n.close("closed automatically on eose")}});return n}subscribeManyEose(e,t,r){r.onauth=r.onauth||r.doauth;const n=this.subscribeMany(e,t,{...r,oneose(){n.close("closed automatically on eose")}});return n}async querySync(e,t,r){return new Promise((async n=>{const i=[];this.subscribeEose(e,t,{...r,onevent(e){i.push(e)},onclose(e){n(i)}})}))}async get(e,t,r){t.limit=1;const n=await this.querySync(e,t,r);return n.sort(((e,t)=>t.created_at-e.created_at)),n[0]||null}publish(e,t,r){return e.map(E).map((async(e,n,i)=>{if(i.indexOf(e)!==n)return Promise.reject("duplicate url");let o=await this.ensureRelay(e);return o.publish(t).catch((async e=>{if(e instanceof Error&&e.message.startsWith("auth-required: ")&&r?.onauth)return await o.auth(r.onauth),o.publish(t);throw e})).then((e=>{if(this.trackRelays){let e=this.seenOn.get(t.id);e||(e=new Set,this.seenOn.set(t.id,e)),e.add(o)}return e}))}))}listConnectionStatus(){const e=new Map;return this.relays.forEach(((t,r)=>e.set(r,t.connected))),e}destroy(){this.relays.forEach((e=>e.close())),this.relays=new Map}};try{Mt=WebSocket}catch{}var It=class extends Tt{constructor(){super({verifyEvent:C,websocketImplementation:Mt})}},Ct={};u(Ct,{BECH32_REGEX:()=>Lt,Bech32MaxSize:()=>Ut,NostrTypeGuard:()=>jt,decode:()=>Ft,decodeNostrURI:()=>Dt,encodeBytes:()=>Vt,naddrEncode:()=>Jt,neventEncode:()=>$t,noteEncode:()=>Gt,nprofileEncode:()=>Kt,npubEncode:()=>qt,nsecEncode:()=>zt});var Rt=r(99175),Nt=r(46517),jt={isNProfile:e=>/^nprofile1[a-z\d]+$/.test(e||""),isNEvent:e=>/^nevent1[a-z\d]+$/.test(e||""),isNAddr:e=>/^naddr1[a-z\d]+$/.test(e||""),isNSec:e=>/^nsec1[a-z\d]{58}$/.test(e||""),isNPub:e=>/^npub1[a-z\d]{58}$/.test(e||""),isNote:e=>/^note1[a-z\d]+$/.test(e||""),isNcryptsec:e=>/^ncryptsec1[a-z\d]+$/.test(e||"")},Ut=5e3,Lt=/[\x21-\x7E]{1,83}1[023456789acdefghjklmnpqrstuvwxyz]{6,}/;function Dt(e){try{return e.startsWith("nostr:")&&(e=e.substring(6)),Ft(e)}catch(e){return{type:"invalid",data:null}}}function Ft(e){let{prefix:t,words:r}=Nt.bech32.decode(e,Ut),n=new Uint8Array(Nt.bech32.fromWords(r));switch(t){case"nprofile":{let e=Ht(n);if(!e[0]?.[0])throw new Error("missing TLV 0 for nprofile");if(32!==e[0][0].length)throw new Error("TLV 0 should be 32 bytes");return{type:"nprofile",data:{pubkey:(0,Rt.bytesToHex)(e[0][0]),relays:e[1]?e[1].map((e=>v.decode(e))):[]}}}case"nevent":{let e=Ht(n);if(!e[0]?.[0])throw new Error("missing TLV 0 for nevent");if(32!==e[0][0].length)throw new Error("TLV 0 should be 32 bytes");if(e[2]&&32!==e[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(e[3]&&4!==e[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"nevent",data:{id:(0,Rt.bytesToHex)(e[0][0]),relays:e[1]?e[1].map((e=>v.decode(e))):[],author:e[2]?.[0]?(0,Rt.bytesToHex)(e[2][0]):void 0,kind:e[3]?.[0]?parseInt((0,Rt.bytesToHex)(e[3][0]),16):void 0}}}case"naddr":{let e=Ht(n);if(!e[0]?.[0])throw new Error("missing TLV 0 for naddr");if(!e[2]?.[0])throw new Error("missing TLV 2 for naddr");if(32!==e[2][0].length)throw new Error("TLV 2 should be 32 bytes");if(!e[3]?.[0])throw new Error("missing TLV 3 for naddr");if(4!==e[3][0].length)throw new Error("TLV 3 should be 4 bytes");return{type:"naddr",data:{identifier:v.decode(e[0][0]),pubkey:(0,Rt.bytesToHex)(e[2][0]),kind:parseInt((0,Rt.bytesToHex)(e[3][0]),16),relays:e[1]?e[1].map((e=>v.decode(e))):[]}}}case"nsec":return{type:t,data:n};case"npub":case"note":return{type:t,data:(0,Rt.bytesToHex)(n)};default:throw new Error(`unknown prefix ${t}`)}}function Ht(e){let t={},r=e;for(;r.length>0;){let e=r[0],n=r[1],i=r.slice(2,2+n);if(r=r.slice(2+n),i.length<n)throw new Error(`not enough data to read on TLV ${e}`);t[e]=t[e]||[],t[e].push(i)}return t}function zt(e){return Vt("nsec",e)}function qt(e){return Vt("npub",(0,Rt.hexToBytes)(e))}function Gt(e){return Vt("note",(0,Rt.hexToBytes)(e))}function Wt(e,t){let r=Nt.bech32.toWords(t);return Nt.bech32.encode(e,r,Ut)}function Vt(e,t){return Wt(e,t)}function Kt(e){return Wt("nprofile",Qt({0:[(0,Rt.hexToBytes)(e.pubkey)],1:(e.relays||[]).map((e=>w.encode(e)))}))}function $t(e){let t;return void 0!==e.kind&&(t=function(e){const t=new Uint8Array(4);return t[0]=e>>24&255,t[1]=e>>16&255,t[2]=e>>8&255,t[3]=255&e,t}(e.kind)),Wt("nevent",Qt({0:[(0,Rt.hexToBytes)(e.id)],1:(e.relays||[]).map((e=>w.encode(e))),2:e.author?[(0,Rt.hexToBytes)(e.author)]:[],3:t?[new Uint8Array(t)]:[]}))}function Jt(e){let t=new ArrayBuffer(4);return new DataView(t).setUint32(0,e.kind,!1),Wt("naddr",Qt({0:[w.encode(e.identifier)],1:(e.relays||[]).map((e=>w.encode(e))),2:[(0,Rt.hexToBytes)(e.pubkey)],3:[new Uint8Array(t)]}))}function Qt(e){let t=[];return Object.entries(e).reverse().forEach((([e,r])=>{r.forEach((r=>{let n=new Uint8Array(r.length+2);n.set([parseInt(e)],0),n.set([r.length],1),n.set(r,2),t.push(n)}))})),(0,Rt.concatBytes)(...t)}var Zt=/\bnostr:((note|npub|naddr|nevent|nprofile)1\w+)\b|#\[(\d+)\]/g;function Yt(e){let t=[];for(let r of e.content.matchAll(Zt))if(r[2])try{let{type:e,data:n}=Ft(r[1]);switch(e){case"npub":t.push({text:r[0],profile:{pubkey:n,relays:[]}});break;case"nprofile":t.push({text:r[0],profile:n});break;case"note":t.push({text:r[0],event:{id:n,relays:[]}});break;case"nevent":t.push({text:r[0],event:n});break;case"naddr":t.push({text:r[0],address:n})}}catch(e){}else if(r[3]){let n=parseInt(r[3],10),i=e.tags[n];if(!i)continue;switch(i[0]){case"p":t.push({text:r[0],profile:{pubkey:i[1],relays:i[2]?[i[2]]:[]}});break;case"e":t.push({text:r[0],event:{id:i[1],relays:i[2]?[i[2]]:[]}});break;case"a":try{let[e,n,o]=i[1].split(":");t.push({text:r[0],address:{identifier:o,pubkey:n,kind:parseInt(e,10),relays:i[2]?[i[2]]:[]}})}catch(e){}}}return t}var Xt={};u(Xt,{decrypt:()=>or,encrypt:()=>ir});var er=r(99175),tr=r(90752),rr=r(80469),nr=r(46517);function ir(e,t,r){const n=e instanceof Uint8Array?(0,er.bytesToHex)(e):e,i=sr(tr.secp256k1.getSharedSecret(n,"02"+t));let o=Uint8Array.from((0,er.randomBytes)(16)),s=w.encode(r),a=(0,rr.cbc)(i,o).encrypt(s);return`${nr.base64.encode(new Uint8Array(a))}?iv=${nr.base64.encode(new Uint8Array(o.buffer))}`}function or(e,t,r){const n=e instanceof Uint8Array?(0,er.bytesToHex)(e):e;let[i,o]=r.split("?iv="),s=sr(tr.secp256k1.getSharedSecret(n,"02"+t)),a=nr.base64.decode(o),u=nr.base64.decode(i),c=(0,rr.cbc)(s,a).decrypt(u);return v.decode(c)}function sr(e){return e.slice(1,33)}var ar={};u(ar,{NIP05_REGEX:()=>cr,isNip05:()=>lr,isValid:()=>pr,queryProfile:()=>dr,searchDomain:()=>hr,useFetchImplementation:()=>fr});var ur,cr=/^(?:([\w.+-]+)@)?([\w_-]+(\.[\w_-]+)+)$/,lr=e=>cr.test(e||"");try{ur=fetch}catch(e){}function fr(e){ur=e}async function hr(e,t=""){try{const r=`https://${e}/.well-known/nostr.json?name=${t}`,n=await ur(r,{redirect:"manual"});if(200!==n.status)throw Error("Wrong response code");return(await n.json()).names}catch(e){return{}}}async function dr(e){const t=e.match(cr);if(!t)return null;const[,r="_",n]=t;try{const e=`https://${n}/.well-known/nostr.json?name=${r}`,t=await ur(e,{redirect:"manual"});if(200!==t.status)throw Error("Wrong response code");const i=await t.json(),o=i.names[r];return o?{pubkey:o,relays:i.relays?.[o]}:null}catch(e){return null}}async function pr(e,t){const r=await dr(t);return!!r&&r.pubkey===e}var gr={};function br(e){const t={reply:void 0,root:void 0,mentions:[],profiles:[],quotes:[]};let r,n;for(let i=e.tags.length-1;i>=0;i--){const o=e.tags[i];if("e"===o[0]&&o[1]){const[e,i,s,a,u]=o,c={id:i,relays:s?[s]:[],author:u};if("root"===a){t.root=c;continue}if("reply"===a){t.reply=c;continue}if("mention"===a){t.mentions.push(c);continue}r?n=c:r=c,t.mentions.push(c)}else{if("q"===o[0]&&o[1]){const[e,r,n]=o;t.quotes.push({id:r,relays:n?[n]:[]})}"p"===o[0]&&o[1]&&t.profiles.push({pubkey:o[1],relays:o[2]?[o[2]]:[]})}}return t.root||(t.root=n||r||t.reply),t.reply||(t.reply=r||t.root),[t.reply,t.root].forEach((e=>{if(!e)return;let r=t.mentions.indexOf(e);if(-1!==r&&t.mentions.splice(r,1),e.author){let r=t.profiles.find((t=>t.pubkey===e.author));r&&r.relays&&(e.relays||(e.relays=[]),r.relays.forEach((t=>{-1===e.relays?.indexOf(t)&&e.relays.push(t)})),r.relays=e.relays)}})),t.mentions.forEach((e=>{if(e.author){let r=t.profiles.find((t=>t.pubkey===e.author));r&&r.relays&&(e.relays||(e.relays=[]),r.relays.forEach((t=>{-1===e.relays.indexOf(t)&&e.relays.push(t)})),r.relays=e.relays)}})),t}u(gr,{parse:()=>br});var yr={};u(yr,{fetchRelayInformation:()=>vr,useFetchImplementation:()=>mr});try{fetch}catch{}function mr(e){}async function vr(e){return await(await fetch(e.replace("ws://","http://").replace("wss://","https://"),{headers:{Accept:"application/nostr+json"}})).json()}var wr={};u(wr,{fastEventHash:()=>Pr,getPow:()=>_r,minePow:()=>Sr});var Er=r(99175),Ar=r(22623);function _r(e){let t=0;for(let r=0;r<64;r+=8){const n=parseInt(e.substring(r,r+8),16);if(0!==n){t+=Math.clz32(n);break}t+=32}return t}function Sr(e,t){let r=0;const n=e,i=["nonce",r.toString(),t.toString()];for(n.tags.push(i);;){const e=Math.floor((new Date).getTime()/1e3);if(e!==n.created_at&&(r=0,n.created_at=e),i[1]=(++r).toString(),n.id=Pr(n),_r(n.id)>=t)break}return n}function Pr(e){return(0,Er.bytesToHex)((0,Ar.sha256)(w.encode(JSON.stringify([0,e.pubkey,e.created_at,e.kind,e.tags,e.content]))))}var kr={};u(kr,{unwrapEvent:()=>an,unwrapManyEvents:()=>un,wrapEvent:()=>on,wrapManyEvents:()=>sn});var Or={};u(Or,{createRumor:()=>Zr,createSeal:()=>Yr,createWrap:()=>Xr,unwrapEvent:()=>rn,unwrapManyEvents:()=>nn,wrapEvent:()=>en,wrapManyEvents:()=>tn});var xr={};u(xr,{decrypt:()=>Gr,encrypt:()=>qr,getConversationKey:()=>Dr,v2:()=>Wr});var Mr=r(58900),Br=r(36527),Tr=r(90752),Ir=r(24139),Cr=r(39615),Rr=r(22623),Nr=r(99175),jr=r(46517),Ur=1,Lr=65535;function Dr(e,t){const r=Tr.secp256k1.getSharedSecret(e,"02"+t).subarray(1,33);return(0,Ir.extract)(Rr.sha256,r,"nip44-v2")}function Fr(e,t){const r=(0,Ir.expand)(Rr.sha256,e,t,76);return{chacha_key:r.subarray(0,32),chacha_nonce:r.subarray(32,44),hmac_key:r.subarray(44,76)}}function Hr(e){if(!Number.isSafeInteger(e)||e<1)throw new Error("expected positive integer");if(e<=32)return 32;const t=1<<Math.floor(Math.log2(e-1))+1,r=t<=256?32:t/8;return r*(Math.floor((e-1)/r)+1)}function zr(e,t,r){if(32!==r.length)throw new Error("AAD associated data must be 32 bytes");const n=(0,Nr.concatBytes)(r,t);return(0,Cr.hmac)(Rr.sha256,e,n)}function qr(e,t,r=(0,Nr.randomBytes)(32)){const{chacha_key:n,chacha_nonce:i,hmac_key:o}=Fr(t,r),s=function(e){const t=w.encode(e),r=t.length,n=function(e){if(!Number.isSafeInteger(e)||e<Ur||e>Lr)throw new Error("invalid plaintext size: must be between 1 and 65535 bytes");const t=new Uint8Array(2);return new DataView(t.buffer).setUint16(0,e,!1),t}(r),i=new Uint8Array(Hr(r)-r);return(0,Nr.concatBytes)(n,t,i)}(e),a=(0,Mr.chacha20)(n,i,s),u=zr(o,a,r);return jr.base64.encode((0,Nr.concatBytes)(new Uint8Array([2]),r,a,u))}function Gr(e,t){const{nonce:r,ciphertext:n,mac:i}=function(e){if("string"!=typeof e)throw new Error("payload must be a valid string");const t=e.length;if(t<132||t>87472)throw new Error("invalid payload length: "+t);if("#"===e[0])throw new Error("unknown encryption version");let r;try{r=jr.base64.decode(e)}catch(e){throw new Error("invalid base64: "+e.message)}const n=r.length;if(n<99||n>65603)throw new Error("invalid data length: "+n);const i=r[0];if(2!==i)throw new Error("unknown encryption version "+i);return{nonce:r.subarray(1,33),ciphertext:r.subarray(33,-32),mac:r.subarray(-32)}}(e),{chacha_key:o,chacha_nonce:s,hmac_key:a}=Fr(t,r),u=zr(a,n,r);if(!(0,Br.equalBytes)(u,i))throw new Error("invalid MAC");return function(e){const t=new DataView(e.buffer).getUint16(0),r=e.subarray(2,2+t);if(t<Ur||t>Lr||r.length!==t||e.length!==2+Hr(t))throw new Error("invalid padding");return v.decode(r)}((0,Mr.chacha20)(o,s,n))}var Wr={utils:{getConversationKey:Dr,calcPaddedLen:Hr},encrypt:qr,decrypt:Gr},Vr=()=>Math.round(Date.now()/1e3),Kr=()=>Math.round(Vr()-172800*Math.random()),$r=(e,t)=>Dr(e,t),Jr=(e,t,r)=>qr(JSON.stringify(e),$r(t,r)),Qr=(e,t)=>JSON.parse(Gr(e.content,$r(t,e.pubkey)));function Zr(e,t){const r={created_at:Vr(),content:"",tags:[],...e,pubkey:T(t)};return r.id=x(r),r}function Yr(e,t,r){return I({kind:Q,content:Jr(e,t,r),created_at:Kr(),tags:[]},t)}function Xr(e,t){const r=B();return I({kind:oe,content:Jr(e,r,t),created_at:Kr(),tags:[["p",t]]},r)}function en(e,t,r){return Xr(Yr(Zr(e,t),t,r),r)}function tn(e,t,r){if(!r||0===r.length)throw new Error("At least one recipient is required.");const n=T(t),i=[en(e,t,n)];return r.forEach((r=>{i.push(en(e,t,r))})),i}function rn(e,t){const r=Qr(e,t);return Qr(r,t)}function nn(e,t){let r=[];return e.forEach((e=>{r.push(rn(e,t))})),r.sort(((e,t)=>e.created_at-t.created_at)),r}function on(e,t,r,n,i){const o=function(e,t,r,n){const i={created_at:Math.ceil(Date.now()/1e3),kind:Z,tags:[],content:t};return(Array.isArray(e)?e:[e]).forEach((({publicKey:e,relayUrl:t})=>{i.tags.push(t?["p",e,t]:["p",e])})),n&&i.tags.push(["e",n.eventId,n.relayUrl||"","reply"]),r&&i.tags.push(["subject",r]),i}(t,r,n,i);return en(o,e,t.publicKey)}function sn(e,t,r,n,i){if(!t||0===t.length)throw new Error("At least one recipient is required.");return[{publicKey:T(e)},...t].map((t=>on(e,t,r,n,i)))}var an=rn,un=nn,cn={};function ln(e,t,r,n){let i;const o=[...e.tags??[],["e",t.id,r],["p",t.pubkey]];return t.kind===z?i=K:(i=Y,o.push(["k",String(t.kind)])),I({kind:i,tags:o,content:""===e.content||t.tags?.find((e=>"-"===e[0]))?"":JSON.stringify(t),created_at:e.created_at},n)}function fn(e){if(![K,Y].includes(e.kind))return;let t,r;for(let n=e.tags.length-1;n>=0&&(void 0===t||void 0===r);n--){const i=e.tags[n];i.length>=2&&("e"===i[0]&&void 0===t?t=i:"p"===i[0]&&void 0===r&&(r=i))}return void 0!==t?{id:t[1],relays:[t[2],r?.[2]].filter((e=>"string"==typeof e)),author:r?.[1]}:void 0}function hn(e,{skipVerification:t}={}){const r=fn(e);if(void 0===r||""===e.content)return;let n;try{n=JSON.parse(e.content)}catch(e){return}return n.id===r.id&&(t||C(n))?n:void 0}u(cn,{finishRepostEvent:()=>ln,getRepostedEvent:()=>hn,getRepostedEventPointer:()=>fn});var dn={};u(dn,{NOSTR_URI_REGEX:()=>pn,parse:()=>bn,test:()=>gn});var pn=new RegExp(`nostr:(${Lt.source})`);function gn(e){return"string"==typeof e&&new RegExp(`^${pn.source}$`).test(e)}function bn(e){const t=e.match(new RegExp(`^${pn.source}$`));if(!t)throw new Error(`Invalid Nostr URI: ${e}`);return{uri:t[0],value:t[1],decoded:Ft(t[1])}}var yn={};function mn(e,t,r){const n=t.tags.filter((e=>e.length>=2&&("e"===e[0]||"p"===e[0])));return I({...e,kind:$,tags:[...e.tags??[],...n,["e",t.id],["p",t.pubkey]],content:e.content??"+"},r)}function vn(e){if(e.kind!==$)return;let t,r;for(let n=e.tags.length-1;n>=0&&(void 0===t||void 0===r);n--){const i=e.tags[n];i.length>=2&&("e"===i[0]&&void 0===t?t=i:"p"===i[0]&&void 0===r&&(r=i))}return void 0!==t&&void 0!==r?{id:t[1],relays:[t[2],r[2]].filter((e=>void 0!==e)),author:r[1]}:void 0}u(yn,{finishReactionEvent:()=>mn,getReactedEventPointer:()=>vn});var wn={};u(wn,{parse:()=>_n});var En=/\W/m,An=/\W |\W$|$|,| /m;function*_n(e){const t=e.length;let r=0,n=0;for(;n<t;){let i=e.indexOf(":",n);if(-1===i)break;if("nostr"===e.substring(i-5,i)){const o=e.substring(i+60).match(En),s=o?i+60+o.index:t;try{let t,{data:o,type:a}=Ft(e.substring(i+1,s));switch(a){case"npub":t={pubkey:o};break;case"nsec":case"note":n=s+1;continue;default:t=o}r!==i-5&&(yield{type:"text",text:e.substring(r,i-5)}),yield{type:"reference",pointer:t},n=s,r=n;continue}catch(e){n=i+1;continue}}else if("https"===e.substring(i-5,i)||"http"===e.substring(i-4,i)){const o=e.substring(i+4).match(An),s=o?i+4+o.index:t,a="s"===e[i-1]?5:4;try{let t=new URL(e.substring(i-a,s));if(-1===t.hostname.indexOf("."))throw new Error("invalid url");if(r!==i-a&&(yield{type:"text",text:e.substring(r,i-a)}),t.pathname.endsWith(".png")||t.pathname.endsWith(".jpg")||t.pathname.endsWith(".jpeg")||t.pathname.endsWith(".gif")||t.pathname.endsWith(".webp")){yield{type:"image",url:t.toString()},n=s,r=n;continue}if(t.pathname.endsWith(".mp4")||t.pathname.endsWith(".avi")||t.pathname.endsWith(".webm")||t.pathname.endsWith(".mkv")){yield{type:"video",url:t.toString()},n=s,r=n;continue}if(t.pathname.endsWith(".mp3")||t.pathname.endsWith(".aac")||t.pathname.endsWith(".ogg")||t.pathname.endsWith(".opus")){yield{type:"audio",url:t.toString()},n=s,r=n;continue}yield{type:"url",url:t.toString()},n=s,r=n;continue}catch(e){n=s+1;continue}}else{if("wss"!==e.substring(i-3,i)&&"ws"!==e.substring(i-2,i)){n=i+1;continue}{const o=e.substring(i+4).match(An),s=o?i+4+o.index:t,a="s"===e[i-1]?3:2;try{let t=new URL(e.substring(i-a,s));if(-1===t.hostname.indexOf("."))throw new Error("invalid ws url");r!==i-a&&(yield{type:"text",text:e.substring(r,i-a)}),yield{type:"relay",url:t.toString()},n=s,r=n;continue}catch(e){n=s+1;continue}}}}r!==t&&(yield{type:"text",text:e.substring(r)})}var Sn={};u(Sn,{channelCreateEvent:()=>Pn,channelHideMessageEvent:()=>xn,channelMessageEvent:()=>On,channelMetadataEvent:()=>kn,channelMuteUserEvent:()=>Mn});var Pn=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return I({kind:X,tags:[...e.tags??[]],content:r,created_at:e.created_at},t)},kn=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return I({kind:ee,tags:[["e",e.channel_create_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},On=(e,t)=>{const r=[["e",e.channel_create_event_id,e.relay_url,"root"]];return e.reply_to_channel_message_event_id&&r.push(["e",e.reply_to_channel_message_event_id,e.relay_url,"reply"]),I({kind:te,tags:[...r,...e.tags??[]],content:e.content,created_at:e.created_at},t)},xn=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return I({kind:re,tags:[["e",e.channel_message_event_id],...e.tags??[]],content:r,created_at:e.created_at},t)},Mn=(e,t)=>{let r;if("object"==typeof e.content)r=JSON.stringify(e.content);else{if("string"!=typeof e.content)return;r=e.content}return I({kind:ne,tags:[["p",e.pubkey_to_mute],...e.tags??[]],content:r,created_at:e.created_at},t)},Bn={};u(Bn,{EMOJI_SHORTCODE_REGEX:()=>Tn,matchAll:()=>Cn,regex:()=>In,replaceAll:()=>Rn});var Tn=/:(\w+):/,In=()=>new RegExp(`\\B${Tn.source}\\B`,"g");function*Cn(e){const t=e.matchAll(In());for(const e of t)try{const[t,r]=e;yield{shortcode:t,name:r,start:e.index,end:e.index+t.length}}catch(e){}}function Rn(e,t){return e.replaceAll(In(),((e,r)=>t({shortcode:e,name:r})))}var Nn,jn={};u(jn,{useFetchImplementation:()=>Un,validateGithub:()=>Ln});try{Nn=fetch}catch{}function Un(e){Nn=e}async function Ln(e,t,r){try{return await(await Nn(`https://gist.github.com/${t}/${r}/raw`)).text()===`Verifying that I control the following Nostr public key: ${e}`}catch(e){return!1}}var Dn={};function Fn(e){const{pathname:t,searchParams:r}=new URL(e),n=t,i=r.get("relay"),o=r.get("secret");if(!n||!i||!o)throw new Error("invalid connection string");return{pubkey:n,relay:i,secret:o}}async function Hn(e,t,r){const n={method:"pay_invoice",params:{invoice:r}},i=ir(t,e,JSON.stringify(n)),o={kind:Ne,created_at:Math.round(Date.now()/1e3),content:i,tags:[["p",e]]};return I(o,t)}u(Dn,{makeNwcRequestEvent:()=>Hn,parseConnectionString:()=>Fn});var zn={};function qn(e){return e=(e=e.trim().toLowerCase()).normalize("NFKC"),Array.from(e).map((e=>/\p{Letter}/u.test(e)||/\p{Number}/u.test(e)?e:"-")).join("")}u(zn,{normalizeIdentifier:()=>qn});var Gn={};u(Gn,{getSatoshisAmountFromBolt11:()=>Yn,getZapEndpoint:()=>$n,makeZapReceipt:()=>Zn,makeZapRequest:()=>Jn,useFetchImplementation:()=>Kn,validateZapRequest:()=>Qn});var Wn,Vn=r(46517);try{Wn=fetch}catch{}function Kn(e){Wn=e}async function $n(e){try{let t="",{lud06:r,lud16:n}=JSON.parse(e.content);if(r){let{words:e}=Vn.bech32.decode(r,1e3),n=Vn.bech32.fromWords(e);t=v.decode(n)}else{if(!n)return null;{let[e,r]=n.split("@");t=new URL(`/.well-known/lnurlp/${e}`,`https://${r}`).toString()}}let i=await Wn(t),o=await i.json();if(o.allowsNostr&&o.nostrPubkey)return o.callback}catch(e){}return null}function Jn({profile:e,event:t,amount:r,relays:n,comment:i=""}){if(!r)throw new Error("amount not given");if(!e)throw new Error("profile not given");let o={kind:9734,created_at:Math.round(Date.now()/1e3),content:i,tags:[["p",e],["amount",r.toString()],["relays",...n]]};if(t&&"string"==typeof t&&o.tags.push(["e",t]),t&&"object"==typeof t)if(j(t.kind)){const e=["a",`${t.kind}:${t.pubkey}:`];o.tags.push(e)}else if(L(t.kind)){let e=t.tags.find((([e,t])=>"d"===e&&t));if(!e)throw new Error("d tag not found or is empty");const r=["a",`${t.kind}:${t.pubkey}:${e[1]}`];o.tags.push(r)}return o}function Qn(e){let t;try{t=JSON.parse(e)}catch(e){return"Invalid zap request JSON."}if(!p(t))return"Zap request is not a valid Nostr event.";if(!C(t))return"Invalid signature on zap request.";let r=t.tags.find((([e,t])=>"p"===e&&t));if(!r)return"Zap request doesn't have a 'p' tag.";if(!r[1].match(/^[a-f0-9]{64}$/))return"Zap request 'p' tag is not valid hex.";let n=t.tags.find((([e,t])=>"e"===e&&t));return n&&!n[1].match(/^[a-f0-9]{64}$/)?"Zap request 'e' tag is not valid hex.":t.tags.find((([e,t])=>"relays"===e&&t))?null:"Zap request doesn't have a 'relays' tag."}function Zn({zapRequest:e,preimage:t,bolt11:r,paidAt:n}){let i=JSON.parse(e),o=i.tags.filter((([e])=>"e"===e||"p"===e||"a"===e)),s={kind:9735,created_at:Math.round(n.getTime()/1e3),content:"",tags:[...o,["P",i.pubkey],["bolt11",r],["description",e]]};return t&&s.tags.push(["preimage",t]),s}function Yn(e){if(e.length<50)return 0;const t=(e=e.substring(0,50)).lastIndexOf("1");if(-1===t)return 0;const r=e.substring(0,t);if(!r.startsWith("lnbc"))return 0;const n=r.substring(4);if(n.length<1)return 0;const i=n[n.length-1],o=i.charCodeAt(0)-"0".charCodeAt(0),s=o>=0&&o<=9;let a=n.length-1;if(s&&a++,a<1)return 0;const u=parseInt(n.substring(0,a));switch(i){case"m":return 1e5*u;case"u":return 100*u;case"n":return u/10;case"p":return u/1e4;default:return 1e8*u}}var Xn={};u(Xn,{getToken:()=>ii,hashPayload:()=>fi,unpackEventFromToken:()=>si,validateEvent:()=>di,validateEventKind:()=>ui,validateEventMethodTag:()=>li,validateEventPayloadTag:()=>hi,validateEventTimestamp:()=>ai,validateEventUrlTag:()=>ci,validateToken:()=>oi});var ei=r(22623),ti=r(99175),ri=r(46517),ni="Nostr ";async function ii(e,t,r,n=!1,i){const o={kind:Le,tags:[["u",e],["method",t]],created_at:Math.round((new Date).getTime()/1e3),content:""};i&&o.tags.push(["payload",fi(i)]);const s=await r(o);return(n?ni:"")+ri.base64.encode(w.encode(JSON.stringify(s)))}async function oi(e,t,r){const n=await si(e).catch((e=>{throw e}));return await di(n,t,r).catch((e=>{throw e}))}async function si(e){if(!e)throw new Error("Missing token");e=e.replace(ni,"");const t=v.decode(ri.base64.decode(e));if(!t||0===t.length||!t.startsWith("{"))throw new Error("Invalid token");return JSON.parse(t)}function ai(e){return!!e.created_at&&Math.round((new Date).getTime()/1e3)-e.created_at<60}function ui(e){return e.kind===Le}function ci(e,t){const r=e.tags.find((e=>"u"===e[0]));return!!r&&r.length>0&&r[1]===t}function li(e,t){const r=e.tags.find((e=>"method"===e[0]));return!!r&&r.length>0&&r[1].toLowerCase()===t.toLowerCase()}function fi(e){const t=(0,ei.sha256)(w.encode(JSON.stringify(e)));return(0,ti.bytesToHex)(t)}function hi(e,t){const r=e.tags.find((e=>"payload"===e[0]));if(!r)return!1;const n=fi(t);return r.length>0&&r[1]===n}async function di(e,t,r,n){if(!C(e))throw new Error("Invalid nostr event, signature invalid");if(!ui(e))throw new Error("Invalid nostr event, kind invalid");if(!ai(e))throw new Error("Invalid nostr event, created_at timestamp invalid");if(!ci(e,t))throw new Error("Invalid nostr event, url tag invalid");if(!li(e,r))throw new Error("Invalid nostr event, method tag invalid");if(Boolean(n)&&"object"==typeof n&&Object.keys(n).length>0&&!hi(e,n))throw new Error("Invalid nostr event, payload tag does not match request body hash");return!0}},49288:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UndecodedEventLog=t.EventLog=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractUnknownEventPayload=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=void 0;var n=r(21008);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return n.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return n.Contract}});var i=r(60406);Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return i.ContractFactory}});var o=r(6526);Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return o.ContractEventPayload}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return o.ContractUnknownEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return o.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return o.ContractTransactionResponse}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return o.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return o.UndecodedEventLog}})},49902:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FallbackProvider=void 0;const n=r(75347),i=r(38672),o=r(57698),s=BigInt("1"),a=BigInt("2");function u(){return(new Date).getTime()}function c(e){return JSON.stringify(e,((e,t)=>"bigint"==typeof t?{type:"bigint",value:t.toString()}:t))}const l={stallTimeout:400,priority:1,weight:1},f={blockNumber:-2,requests:0,lateResponses:0,errorResponses:0,outOfSync:-1,unsupportedEvents:0,rollingDuration:0,score:0,_network:null,_updateNumber:null,_totalTime:0,_lastFatalError:null,_lastFatalErrorTimestamp:0};function h(e){if(null==e)return"null";if(Array.isArray(e))return"["+e.map(h).join(",")+"]";if("object"==typeof e&&"function"==typeof e.toJSON)return h(e.toJSON());switch(typeof e){case"boolean":case"symbol":return e.toString();case"bigint":case"number":return BigInt(e).toString();case"string":return JSON.stringify(e);case"object":{const t=Object.keys(e);return t.sort(),"{"+t.map((t=>`${JSON.stringify(t)}:${h(e[t])}`)).join(",")+"}"}}throw console.log("Could not serialize",e),new Error("Hmm...")}function d(e,t){if("error"in t){const e=t.error;let r;return r=(0,n.isError)(e,"CALL_EXCEPTION")?h(Object.assign({},e,{shortMessage:void 0,reason:void 0,info:void 0})):h(e),{tag:r,value:e}}const r=t.result;return{tag:h(r),value:r}}function p(e,t){const r=new Map;for(const{value:e,tag:n,weight:i}of t){const t=r.get(n)||{value:e,weight:0};t.weight+=i,r.set(n,t)}let n=null;for(const t of r.values())t.weight>=e&&(!n||t.weight>n.weight)&&(n=t);if(n)return n.value}function g(e,t){let r=0;const n=new Map;let i=null;const o=[];for(const{value:e,tag:s,weight:a}of t)if(e instanceof Error){const t=n.get(s)||{value:e,weight:0};t.weight+=a,n.set(s,t),(null==i||t.weight>i.weight)&&(i=t)}else o.push(BigInt(e)),r+=a;if(r<e)return i&&i.weight>=e?i.value:void 0;o.sort(((e,t)=>e<t?-1:t>e?1:0));const u=Math.floor(o.length/2);return o.length%2?o[u]:(o[u-1]+o[u]+s)/a}function b(e,t){const r=p(e,t);if(void 0!==r)return r;for(const e of t)if(e.value)return e.value}class y extends i.AbstractProvider{quorum;eventQuorum;eventWorkers;#we;#Ee;#Ae;constructor(e,t,r){super(t,r),this.#we=e.map((e=>e instanceof i.AbstractProvider?Object.assign({provider:e},l,f):Object.assign({},l,e,f))),this.#Ee=-2,this.#Ae=null,r&&null!=r.quorum?this.quorum=r.quorum:this.quorum=Math.ceil(this.#we.reduce(((e,t)=>e+t.weight),0)/2),this.eventQuorum=1,this.eventWorkers=1,(0,n.assertArgument)(this.quorum<=this.#we.reduce(((e,t)=>e+t.weight),0),"quorum exceed provider weight","quorum",this.quorum)}get providerConfigs(){return this.#we.map((e=>{const t=Object.assign({},e);for(const e in t)"_"===e[0]&&delete t[e];return t}))}async _detectNetwork(){return o.Network.from((0,n.getBigInt)(await this._perform({method:"chainId"})))}async _translatePerform(e,t){switch(t.method){case"broadcastTransaction":return await e.broadcastTransaction(t.signedTransaction);case"call":return await e.call(Object.assign({},t.transaction,{blockTag:t.blockTag}));case"chainId":return(await e.getNetwork()).chainId;case"estimateGas":return await e.estimateGas(t.transaction);case"getBalance":return await e.getBalance(t.address,t.blockTag);case"getBlock":{const r="blockHash"in t?t.blockHash:t.blockTag;return await e.getBlock(r,t.includeTransactions)}case"getBlockNumber":return await e.getBlockNumber();case"getCode":return await e.getCode(t.address,t.blockTag);case"getGasPrice":return(await e.getFeeData()).gasPrice;case"getPriorityFee":return(await e.getFeeData()).maxPriorityFeePerGas;case"getLogs":return await e.getLogs(t.filter);case"getStorage":return await e.getStorage(t.address,t.position,t.blockTag);case"getTransaction":return await e.getTransaction(t.hash);case"getTransactionCount":return await e.getTransactionCount(t.address,t.blockTag);case"getTransactionReceipt":return await e.getTransactionReceipt(t.hash);case"getTransactionResult":return await e.getTransactionResult(t.hash)}}#_e(e){const t=Array.from(e).map((e=>e.config)),r=this.#we.slice();!function(e){for(let t=e.length-1;t>0;t--){const r=Math.floor(Math.random()*(t+1)),n=e[t];e[t]=e[r],e[r]=n}}(r),r.sort(((e,t)=>e.priority-t.priority));for(const e of r)if(!e._lastFatalError&&-1===t.indexOf(e))return e;return null}#Se(e,t){const r=this.#_e(e);if(null==r)return null;const n={config:r,result:null,didBump:!1,perform:null,staller:null},i=u();return n.perform=(async()=>{try{r.requests++;const e=await this._translatePerform(r.provider,t);n.result={result:e}}catch(e){r.errorResponses++,n.result={error:e}}const e=u()-i;r._totalTime+=e,r.rollingDuration=.95*r.rollingDuration+.05*e,n.perform=null})(),n.staller=(async()=>{var e;await(e=r.stallTimeout,new Promise((t=>{setTimeout(t,e)}))),n.staller=null})(),e.add(n),n}async#Pe(){let e=this.#Ae;if(!e){const t=[];this.#we.forEach((e=>{t.push((async()=>{await async function(e){for(;(e.blockNumber<0||e.blockNumber<0)&&(e._updateNumber||(e._updateNumber=(async()=>{try{const t=await e.provider.getBlockNumber();t>e.blockNumber&&(e.blockNumber=t)}catch(t){e.blockNumber=-2,e._lastFatalError=t,e._lastFatalErrorTimestamp=u()}e._updateNumber=null})()),await e._updateNumber,e.outOfSync++,!e._lastFatalError););}(e),e._lastFatalError||(e._network=await e.provider.getNetwork())})())})),this.#Ae=e=(async()=>{await Promise.all(t);let e=null;for(const t of this.#we){if(t._lastFatalError)continue;const r=t._network;null==e?e=r.chainId:r.chainId!==e&&(0,n.assert)(!1,"cannot mix providers on different networks","UNSUPPORTED_OPERATION",{operation:"new FallbackProvider"})}})()}await e}async#ke(e,t){const r=[];for(const n of e)if(null!=n.result){const{tag:e,value:i}=d(t.method,n.result);r.push({tag:e,value:i,weight:n.config.weight})}if(!(r.reduce(((e,t)=>e+t.weight),0)<this.quorum)){switch(t.method){case"getBlockNumber":{-2===this.#Ee&&(this.#Ee=Math.ceil((0,n.getNumber)(g(this.quorum,this.#we.filter((e=>!e._lastFatalError)).map((e=>({value:e.blockNumber,tag:(0,n.getNumber)(e.blockNumber).toString(),weight:e.weight})))))));const e=function(e,t){if(1===e)return(0,n.getNumber)(g(e,t),"%internal");const r=new Map,i=(e,t)=>{const n=r.get(e)||{result:e,weight:0};n.weight+=t,r.set(e,n)};for(const{weight:e,value:r}of t){const t=(0,n.getNumber)(r);i(t-1,e),i(t,e),i(t+1,e)}let o,s=0;for(const{weight:t,result:n}of r.values())t>=e&&(t>s||null!=o&&t===s&&n>o)&&(s=t,o=n);return o}(this.quorum,r);if(void 0===e)return;return e>this.#Ee&&(this.#Ee=e),this.#Ee}case"getGasPrice":case"getPriorityFee":case"estimateGas":return g(this.quorum,r);case"getBlock":return"blockTag"in t&&"pending"===t.blockTag?b(this.quorum,r):p(this.quorum,r);case"call":case"chainId":case"getBalance":case"getTransactionCount":case"getCode":case"getStorage":case"getTransaction":case"getTransactionReceipt":case"getLogs":return p(this.quorum,r);case"broadcastTransaction":return b(this.quorum,r)}(0,n.assert)(!1,"unsupported method","UNSUPPORTED_OPERATION",{operation:`_perform(${c(t.method)})`})}}async#Oe(e,t){if(0===e.size)throw new Error("no runners?!");const r=[];let i=0;for(const t of e)t.perform&&r.push(t.perform),t.staller?r.push(t.staller):t.didBump||(t.didBump=!0,i++);const o=await this.#ke(e,t);if(void 0!==o){if(o instanceof Error)throw o;return o}for(let r=0;r<i;r++)this.#Se(e,t);return(0,n.assert)(r.length>0,"quorum not met","SERVER_ERROR",{request:"%sub-requests",info:{request:t,results:Array.from(e).map((e=>c(e.result)))}}),await Promise.race(r),await this.#Oe(e,t)}async _perform(e){if("broadcastTransaction"===e.method){const t=this.#we.map((e=>null)),r=this.#we.map((async({provider:r,weight:n},i)=>{try{const o=await r._perform(e);t[i]=Object.assign(d(e.method,{result:o}),{weight:n})}catch(r){t[i]=Object.assign(d(e.method,{error:r}),{weight:n})}}));for(;;){const e=t.filter((e=>null!=e));for(const{value:t}of e)if(!(t instanceof Error))return t;const i=p(this.quorum,t.filter((e=>null!=e)));if((0,n.isError)(i,"INSUFFICIENT_FUNDS"))throw i;const o=r.filter(((e,r)=>null==t[r]));if(0===o.length)break;await Promise.race(o)}const i=b(this.quorum,t);if((0,n.assert)(void 0!==i,"problem multi-broadcasting","SERVER_ERROR",{request:"%sub-requests",info:{request:e,results:t.map(c)}}),i instanceof Error)throw i;return i}await this.#Pe();const t=new Set;let r=0;for(;;){const n=this.#Se(t,e);if(null==n)break;if(r+=n.config.weight,r>=this.quorum)break}const i=await this.#Oe(t,e);for(const e of t)e.perform&&null==e.result&&e.config.lateResponses++;return i}async destroy(){for(const{provider:e}of this.#we)e.destroy();super.destroy()}}t.FallbackProvider=y},50074:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.CorePlugins=t.PluginCategory=void 0,function(e){e.Authentication="authentication",e.Wallet="wallet",e.Privacy="privacy",e.Identity="identity",e.Utility="utility"}(r||(t.PluginCategory=r={})),function(e){e.WebAuthn="webauthn",e.Web3="web3",e.Nostr="nostr",e.OAuth="oauth"}(n||(t.CorePlugins=n={}))},50096:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.max=void 0;var n=r(92070),i=r(10281);t.max=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)>0?t:r}:function(e,t){return e>t?e:t})}},50436:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseEther=t.formatEther=t.parseUnits=t.formatUnits=void 0;const n=r(1500),i=r(99412),o=r(66508),s=["wei","kwei","mwei","gwei","szabo","finney","ether"];function a(e,t){let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromValue(e,r,{decimals:r,width:512}).toString()}function u(e,t){(0,n.assertArgument)("string"==typeof e,"value must be a string","value",e);let r=18;if("string"==typeof t){const e=s.indexOf(t);(0,n.assertArgument)(e>=0,"invalid unit","unit",t),r=3*e}else null!=t&&(r=(0,o.getNumber)(t,"unit"));return i.FixedNumber.fromString(e,{decimals:r,width:512}).value}t.formatUnits=a,t.parseUnits=u,t.formatEther=function(e){return a(e,18)},t.parseEther=function(e){return u(e,18)}},50439:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.argsArgArrayOrObject=void 0;var r=Array.isArray,n=Object.getPrototypeOf,i=Object.prototype,o=Object.keys;t.argsArgArrayOrObject=function(e){if(1===e.length){var t=e[0];if(r(t))return{args:t,keys:null};if((a=t)&&"object"==typeof a&&n(a)===i){var s=o(t);return{args:s.map((function(e){return t[e]})),keys:s}}}var a;return{args:e,keys:null}}},50462:(e,t,r)=>{var n=r(92861).Buffer;function i(e){n.isBuffer(e)||(e=n.from(e));for(var t=e.length/4|0,r=new Array(t),i=0;i<t;i++)r[i]=e.readUInt32BE(4*i);return r}function o(e){for(;0<e.length;e++)e[0]=0}function s(e,t,r,n,i){for(var o,s,a,u,c=r[0],l=r[1],f=r[2],h=r[3],d=e[0]^t[0],p=e[1]^t[1],g=e[2]^t[2],b=e[3]^t[3],y=4,m=1;m<i;m++)o=c[d>>>24]^l[p>>>16&255]^f[g>>>8&255]^h[255&b]^t[y++],s=c[p>>>24]^l[g>>>16&255]^f[b>>>8&255]^h[255&d]^t[y++],a=c[g>>>24]^l[b>>>16&255]^f[d>>>8&255]^h[255&p]^t[y++],u=c[b>>>24]^l[d>>>16&255]^f[p>>>8&255]^h[255&g]^t[y++],d=o,p=s,g=a,b=u;return o=(n[d>>>24]<<24|n[p>>>16&255]<<16|n[g>>>8&255]<<8|n[255&b])^t[y++],s=(n[p>>>24]<<24|n[g>>>16&255]<<16|n[b>>>8&255]<<8|n[255&d])^t[y++],a=(n[g>>>24]<<24|n[b>>>16&255]<<16|n[d>>>8&255]<<8|n[255&p])^t[y++],u=(n[b>>>24]<<24|n[d>>>16&255]<<16|n[p>>>8&255]<<8|n[255&g])^t[y++],[o>>>=0,s>>>=0,a>>>=0,u>>>=0]}var a=[0,1,2,4,8,16,32,64,128,27,54],u=function(){for(var e=new Array(256),t=0;t<256;t++)e[t]=t<128?t<<1:t<<1^283;for(var r=[],n=[],i=[[],[],[],[]],o=[[],[],[],[]],s=0,a=0,u=0;u<256;++u){var c=a^a<<1^a<<2^a<<3^a<<4;c=c>>>8^255&c^99,r[s]=c,n[c]=s;var l=e[s],f=e[l],h=e[f],d=257*e[c]^16843008*c;i[0][s]=d<<24|d>>>8,i[1][s]=d<<16|d>>>16,i[2][s]=d<<8|d>>>24,i[3][s]=d,d=16843009*h^65537*f^257*l^16843008*s,o[0][c]=d<<24|d>>>8,o[1][c]=d<<16|d>>>16,o[2][c]=d<<8|d>>>24,o[3][c]=d,0===s?s=a=1:(s=l^e[e[e[h^l]]],a^=e[e[a]])}return{SBOX:r,INV_SBOX:n,SUB_MIX:i,INV_SUB_MIX:o}}();function c(e){this._key=i(e),this._reset()}c.blockSize=16,c.keySize=32,c.prototype.blockSize=c.blockSize,c.prototype.keySize=c.keySize,c.prototype._reset=function(){for(var e=this._key,t=e.length,r=t+6,n=4*(r+1),i=[],o=0;o<t;o++)i[o]=e[o];for(o=t;o<n;o++){var s=i[o-1];o%t===0?(s=s<<8|s>>>24,s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s],s^=a[o/t|0]<<24):t>6&&o%t===4&&(s=u.SBOX[s>>>24]<<24|u.SBOX[s>>>16&255]<<16|u.SBOX[s>>>8&255]<<8|u.SBOX[255&s]),i[o]=i[o-t]^s}for(var c=[],l=0;l<n;l++){var f=n-l,h=i[f-(l%4?0:4)];c[l]=l<4||f<=4?h:u.INV_SUB_MIX[0][u.SBOX[h>>>24]]^u.INV_SUB_MIX[1][u.SBOX[h>>>16&255]]^u.INV_SUB_MIX[2][u.SBOX[h>>>8&255]]^u.INV_SUB_MIX[3][u.SBOX[255&h]]}this._nRounds=r,this._keySchedule=i,this._invKeySchedule=c},c.prototype.encryptBlockRaw=function(e){return s(e=i(e),this._keySchedule,u.SUB_MIX,u.SBOX,this._nRounds)},c.prototype.encryptBlock=function(e){var t=this.encryptBlockRaw(e),r=n.allocUnsafe(16);return r.writeUInt32BE(t[0],0),r.writeUInt32BE(t[1],4),r.writeUInt32BE(t[2],8),r.writeUInt32BE(t[3],12),r},c.prototype.decryptBlock=function(e){var t=(e=i(e))[1];e[1]=e[3],e[3]=t;var r=s(e,this._invKeySchedule,u.INV_SUB_MIX,u.INV_SBOX,this._nRounds),o=n.allocUnsafe(16);return o.writeUInt32BE(r[0],0),o.writeUInt32BE(r[3],4),o.writeUInt32BE(r[2],8),o.writeUInt32BE(r[1],12),o},c.prototype.scrub=function(){o(this._keySchedule),o(this._invKeySchedule),o(this._key)},e.exports.AES=c},50532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(91386),i=r(39732);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},50597:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutWith=void 0;var n=r(62326),i=r(85345),o=r(81713);t.timeoutWith=function(e,t,r){var s,a,u;if(r=null!=r?r:n.async,i.isValidDate(e)?s=e:"number"==typeof e&&(a=e),!t)throw new TypeError("No observable provided to switch to");if(u=function(){return t},null==s&&null==a)throw new TypeError("No timeout provided.");return o.timeout({first:s,each:a,scheduler:r,with:u})}},50650:(e,t,r)=>{var n=r(50462),i=r(92861).Buffer,o=r(56168);function s(e,t,r,s){o.call(this),this._cipher=new n.AES(t),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._mode=e}r(56698)(s,o),s.prototype._update=function(e){return this._mode.encrypt(this,e,this._decrypt)},s.prototype._final=function(){this._cipher.scrub()},e.exports=s},50839:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ObjectUnsubscribedError=void 0;var n=r(9619);t.ObjectUnsubscribedError=n.createErrorClass((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}}))},50873:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocketProvider=void 0;const n=r(63913),i=r(74945);class o extends i.SocketProvider{#me;#xe;get websocket(){if(null==this.#xe)throw new Error("websocket closed");return this.#xe}constructor(e,t,r){super(t,r),"string"==typeof e?(this.#me=()=>new n.WebSocket(e),this.#xe=this.#me()):"function"==typeof e?(this.#me=e,this.#xe=e()):(this.#me=null,this.#xe=e),this.websocket.onopen=async()=>{try{await this._start(),this.resume()}catch(e){console.log("failed to start WebsocketProvider",e)}},this.websocket.onmessage=e=>{this._processMessage(e.data)}}async _write(e){this.websocket.send(e)}async destroy(){null!=this.#xe&&(this.#xe.close(),this.#xe=null),super.destroy()}}t.WebSocketProvider=o},50875:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.VirtualAction=t.VirtualTimeScheduler=void 0;var o=r(64772),s=r(69879),a=function(e){function t(t,r){void 0===t&&(t=u),void 0===r&&(r=1/0);var n=e.call(this,t,(function(){return n.frame}))||this;return n.maxFrames=r,n.frame=0,n.index=-1,n}return i(t,e),t.prototype.flush=function(){for(var e,t,r=this.actions,n=this.maxFrames;(t=r[0])&&t.delay<=n&&(r.shift(),this.frame=t.delay,!(e=t.execute(t.state,t.delay))););if(e){for(;t=r.shift();)t.unsubscribe();throw e}},t.frameTimeFactor=10,t}(r(19533).AsyncScheduler);t.VirtualTimeScheduler=a;var u=function(e){function t(t,r,n){void 0===n&&(n=t.index+=1);var i=e.call(this,t,r)||this;return i.scheduler=t,i.work=r,i.index=n,i.active=!0,i.index=t.index=n,i}return i(t,e),t.prototype.schedule=function(r,n){if(void 0===n&&(n=0),Number.isFinite(n)){if(!this.id)return e.prototype.schedule.call(this,r,n);this.active=!1;var i=new t(this.scheduler,this.work);return this.add(i),i.schedule(r,n)}return s.Subscription.EMPTY},t.prototype.requestAsyncId=function(e,r,n){void 0===n&&(n=0),this.delay=e.frame+n;var i=e.actions;return i.push(this),i.sort(t.sortActions),1},t.prototype.recycleAsyncId=function(e,t,r){void 0===r&&(r=0)},t.prototype._execute=function(t,r){if(!0===this.active)return e.prototype._execute.call(this,t,r)},t.sortActions=function(e,t){return e.delay===t.delay?e.index===t.index?0:e.index>t.index?1:-1:e.delay>t.delay?1:-1},t}(o.AsyncAction);t.VirtualAction=u},50918:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getToken=t.setToken=t.restrictedPut=void 0;const r=e=>{const t={value:void 0},r=()=>{e.on("opt",(function(e){e.once||e.on("out",(function(e){const r=this.to,n=(e=>({...e,headers:{...e.headers,token:t.value}}))(e);r.next(n)}))}))};return r(),{setToken:e=>(t.value=e,r(),t.value),getToken:()=>t.value}};let n;t.restrictedPut=(e,t)=>{n=r(e),t&&n.setToken(t)},t.setToken=e=>{if(!n)throw new Error("Gun headers module not initialized. Call init(Gun, token) first.");return n.setToken(e)},t.getToken=()=>{if(!n)throw new Error("Gun headers module not initialized. Call init(Gun, token) first.");return n.getToken()},"undefined"!=typeof window&&(window.setToken=t.setToken,window.getToken=t.getToken)},50954:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AbiCoder=void 0;const n=r(75347),i=r(38869),o=r(81355),s=r(53178),a=r(58719),u=r(52348),c=r(79095),l=r(98026),f=r(67398),h=r(48766),d=r(41693),p=r(189),g=r(30646),b=r(75347),y=new Map;y.set(0,"GENERIC_PANIC"),y.set(1,"ASSERT_FALSE"),y.set(17,"OVERFLOW"),y.set(18,"DIVIDE_BY_ZERO"),y.set(33,"ENUM_RANGE_ERROR"),y.set(34,"BAD_STORAGE_DATA"),y.set(49,"STACK_UNDERFLOW"),y.set(50,"ARRAY_RANGE_ERROR"),y.set(65,"OUT_OF_MEMORY"),y.set(81,"UNINITIALIZED_FUNCTION_CALL");const m=new RegExp(/^bytes([0-9]*)$/),v=new RegExp(/^(u?int)([0-9]*)$/);let w=null,E=1024;class A{#Me(e){if(e.isArray())return new s.ArrayCoder(this.#Me(e.arrayChildren),e.arrayLength,e.name);if(e.isTuple())return new d.TupleCoder(e.components.map((e=>this.#Me(e))),e.name);switch(e.baseType){case"address":return new o.AddressCoder(e.name);case"bool":return new a.BooleanCoder(e.name);case"string":return new h.StringCoder(e.name);case"bytes":return new u.BytesCoder(e.name);case"":return new l.NullCoder(e.name)}let t=e.type.match(v);if(t){let r=parseInt(t[2]||"256");return(0,n.assertArgument)(0!==r&&r<=256&&r%8==0,"invalid "+t[1]+" bit length","param",e),new f.NumberCoder(r/8,"int"===t[1],e.name)}if(t=e.type.match(m),t){let r=parseInt(t[1]);return(0,n.assertArgument)(0!==r&&r<=32,"invalid bytes length","param",e),new c.FixedBytesCoder(r,e.name)}(0,n.assertArgument)(!1,"invalid type","type",e.type)}getDefaultValue(e){const t=e.map((e=>this.#Me(p.ParamType.from(e))));return new d.TupleCoder(t,"_").defaultValue()}encode(e,t){(0,n.assertArgumentCount)(t.length,e.length,"types/values length mismatch");const r=e.map((e=>this.#Me(p.ParamType.from(e)))),o=new d.TupleCoder(r,"_"),s=new i.Writer;return o.encode(s,t),s.data}decode(e,t,r){const n=e.map((e=>this.#Me(p.ParamType.from(e))));return new d.TupleCoder(n,"_").decode(new i.Reader(t,r,E))}static _setDefaultMaxInflation(e){(0,n.assertArgument)("number"==typeof e&&Number.isInteger(e),"invalid defaultMaxInflation factor","value",e),E=e}static defaultAbiCoder(){return null==w&&(w=new A),w}static getBuiltinCallException(e,t,r){return function(e,t,r,n){let i="missing revert data",o=null,s=null;if(r){i="execution reverted";const e=(0,b.getBytes)(r);if(r=(0,b.hexlify)(r),0===e.length)i+=" (no data present; likely require(false) occurred",o="require(false)";else if(e.length%32!=4)i+=" (could not decode reason; invalid data length)";else if("0x08c379a0"===(0,b.hexlify)(e.slice(0,4)))try{o=n.decode(["string"],e.slice(4))[0],s={signature:"Error(string)",name:"Error",args:[o]},i+=`: ${JSON.stringify(o)}`}catch(e){i+=" (could not decode reason; invalid string data)"}else if("0x4e487b71"===(0,b.hexlify)(e.slice(0,4)))try{const t=Number(n.decode(["uint256"],e.slice(4))[0]);s={signature:"Panic(uint256)",name:"Panic",args:[t]},o=`Panic due to ${y.get(t)||"UNKNOWN"}(${t})`,i+=`: ${o}`}catch(e){i+=" (could not decode panic code)"}else i+=" (unknown custom error)"}const a={to:t.to?(0,g.getAddress)(t.to):null,data:t.data||"0x"};return t.from&&(a.from=(0,g.getAddress)(t.from)),(0,b.makeError)(i,"CALL_EXCEPTION",{action:e,data:r,reason:o,transaction:a,invocation:null,revert:s})}(e,t,r,A.defaultAbiCoder())}}t.AbiCoder=A},51071:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fromSubscribable=void 0;var n=r(48051);t.fromSubscribable=function(e){return new n.Observable((function(t){return e.subscribe(t)}))}},51147:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(28399).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},51608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.auditTime=void 0;var n=r(62326),i=r(88877),o=r(5825);t.auditTime=function(e,t){return void 0===t&&(t=n.asyncScheduler),i.audit((function(){return o.timer(e,t)}))}},51752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.keccak256=t.randomBytes=t.computeHmac=t.UndecodedEventLog=t.EventLog=t.ContractUnknownEventPayload=t.ContractTransactionResponse=t.ContractTransactionReceipt=t.ContractEventPayload=t.ContractFactory=t.Contract=t.BaseContract=t.MessagePrefix=t.EtherSymbol=t.ZeroHash=t.N=t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.ZeroAddress=t.resolveAddress=t.isAddress=t.isAddressable=t.getCreate2Address=t.getCreateAddress=t.getIcapAddress=t.getAddress=t.Typed=t.TransactionDescription=t.Result=t.LogDescription=t.Interface=t.Indexed=t.ErrorDescription=t.checkResultErrors=t.StructFragment=t.ParamType=t.NamedFragment=t.FunctionFragment=t.FallbackFragment=t.Fragment=t.EventFragment=t.ErrorFragment=t.ConstructorFragment=t.AbiCoder=t.encodeBytes32String=t.decodeBytes32String=t.version=void 0,t.WebSocketProvider=t.SocketProvider=t.IpcSocketProvider=t.QuickNodeProvider=t.PocketProvider=t.InfuraWebSocketProvider=t.InfuraProvider=t.EtherscanProvider=t.CloudflareProvider=t.ChainstackProvider=t.BlockscoutProvider=t.AnkrProvider=t.AlchemyProvider=t.BrowserProvider=t.JsonRpcSigner=t.JsonRpcProvider=t.JsonRpcApiProvider=t.FallbackProvider=t.AbstractProvider=t.VoidSigner=t.NonceManager=t.AbstractSigner=t.TransactionResponse=t.TransactionReceipt=t.Log=t.FeeData=t.Block=t.getDefaultProvider=t.verifyTypedData=t.TypedDataEncoder=t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=t.verifyMessage=t.hashMessage=t.verifyAuthorization=t.hashAuthorization=t.dnsEncode=t.namehash=t.isValidName=t.ensNormalize=t.id=t.SigningKey=t.Signature=t.lock=t.scryptSync=t.scrypt=t.pbkdf2=t.sha512=t.sha256=void 0,t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.isError=t.isCallException=t.makeError=t.assertPrivate=t.assertNormalize=t.assertArgumentCount=t.assertArgument=t.assert=t.resolveProperties=t.defineProperties=t.zeroPadValue=t.zeroPadBytes=t.stripZerosLeft=t.isBytesLike=t.isHexString=t.hexlify=t.getBytesCopy=t.getBytes=t.dataSlice=t.dataLength=t.concat=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=t.showThrottleMessage=t.copyRequest=t.UnmanagedSubscriber=t.SocketSubscriber=t.SocketPendingSubscriber=t.SocketEventSubscriber=t.SocketBlockSubscriber=t.MulticoinProviderPlugin=t.NetworkPlugin=t.GasCostPlugin=t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EtherscanPlugin=t.EnsPlugin=t.Network=t.EnsResolver=void 0,t.wordlists=t.WordlistOwlA=t.WordlistOwl=t.LangEn=t.Wordlist=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.decryptCrowdsaleJson=t.isKeystoreJson=t.isCrowdsaleJson=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.Wallet=t.HDNodeVoidWallet=t.HDNodeWallet=t.BaseWallet=t.Mnemonic=t.uuidV4=t.encodeRlp=t.decodeRlp=t.Utf8ErrorFuncs=t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.mask=t.toTwos=t.fromTwos=t.toQuantity=t.toNumber=t.toBeHex=t.toBigInt=t.toBeArray=t.getUint=t.getNumber=t.getBigInt=t.FixedNumber=void 0;var n=r(12205);Object.defineProperty(t,"version",{enumerable:!0,get:function(){return n.version}});var i=r(8456);Object.defineProperty(t,"decodeBytes32String",{enumerable:!0,get:function(){return i.decodeBytes32String}}),Object.defineProperty(t,"encodeBytes32String",{enumerable:!0,get:function(){return i.encodeBytes32String}}),Object.defineProperty(t,"AbiCoder",{enumerable:!0,get:function(){return i.AbiCoder}}),Object.defineProperty(t,"ConstructorFragment",{enumerable:!0,get:function(){return i.ConstructorFragment}}),Object.defineProperty(t,"ErrorFragment",{enumerable:!0,get:function(){return i.ErrorFragment}}),Object.defineProperty(t,"EventFragment",{enumerable:!0,get:function(){return i.EventFragment}}),Object.defineProperty(t,"Fragment",{enumerable:!0,get:function(){return i.Fragment}}),Object.defineProperty(t,"FallbackFragment",{enumerable:!0,get:function(){return i.FallbackFragment}}),Object.defineProperty(t,"FunctionFragment",{enumerable:!0,get:function(){return i.FunctionFragment}}),Object.defineProperty(t,"NamedFragment",{enumerable:!0,get:function(){return i.NamedFragment}}),Object.defineProperty(t,"ParamType",{enumerable:!0,get:function(){return i.ParamType}}),Object.defineProperty(t,"StructFragment",{enumerable:!0,get:function(){return i.StructFragment}}),Object.defineProperty(t,"checkResultErrors",{enumerable:!0,get:function(){return i.checkResultErrors}}),Object.defineProperty(t,"ErrorDescription",{enumerable:!0,get:function(){return i.ErrorDescription}}),Object.defineProperty(t,"Indexed",{enumerable:!0,get:function(){return i.Indexed}}),Object.defineProperty(t,"Interface",{enumerable:!0,get:function(){return i.Interface}}),Object.defineProperty(t,"LogDescription",{enumerable:!0,get:function(){return i.LogDescription}}),Object.defineProperty(t,"Result",{enumerable:!0,get:function(){return i.Result}}),Object.defineProperty(t,"TransactionDescription",{enumerable:!0,get:function(){return i.TransactionDescription}}),Object.defineProperty(t,"Typed",{enumerable:!0,get:function(){return i.Typed}});var o=r(30646);Object.defineProperty(t,"getAddress",{enumerable:!0,get:function(){return o.getAddress}}),Object.defineProperty(t,"getIcapAddress",{enumerable:!0,get:function(){return o.getIcapAddress}}),Object.defineProperty(t,"getCreateAddress",{enumerable:!0,get:function(){return o.getCreateAddress}}),Object.defineProperty(t,"getCreate2Address",{enumerable:!0,get:function(){return o.getCreate2Address}}),Object.defineProperty(t,"isAddressable",{enumerable:!0,get:function(){return o.isAddressable}}),Object.defineProperty(t,"isAddress",{enumerable:!0,get:function(){return o.isAddress}}),Object.defineProperty(t,"resolveAddress",{enumerable:!0,get:function(){return o.resolveAddress}});var s=r(1295);Object.defineProperty(t,"ZeroAddress",{enumerable:!0,get:function(){return s.ZeroAddress}}),Object.defineProperty(t,"WeiPerEther",{enumerable:!0,get:function(){return s.WeiPerEther}}),Object.defineProperty(t,"MaxUint256",{enumerable:!0,get:function(){return s.MaxUint256}}),Object.defineProperty(t,"MinInt256",{enumerable:!0,get:function(){return s.MinInt256}}),Object.defineProperty(t,"MaxInt256",{enumerable:!0,get:function(){return s.MaxInt256}}),Object.defineProperty(t,"N",{enumerable:!0,get:function(){return s.N}}),Object.defineProperty(t,"ZeroHash",{enumerable:!0,get:function(){return s.ZeroHash}}),Object.defineProperty(t,"EtherSymbol",{enumerable:!0,get:function(){return s.EtherSymbol}}),Object.defineProperty(t,"MessagePrefix",{enumerable:!0,get:function(){return s.MessagePrefix}});var a=r(49288);Object.defineProperty(t,"BaseContract",{enumerable:!0,get:function(){return a.BaseContract}}),Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return a.Contract}}),Object.defineProperty(t,"ContractFactory",{enumerable:!0,get:function(){return a.ContractFactory}}),Object.defineProperty(t,"ContractEventPayload",{enumerable:!0,get:function(){return a.ContractEventPayload}}),Object.defineProperty(t,"ContractTransactionReceipt",{enumerable:!0,get:function(){return a.ContractTransactionReceipt}}),Object.defineProperty(t,"ContractTransactionResponse",{enumerable:!0,get:function(){return a.ContractTransactionResponse}}),Object.defineProperty(t,"ContractUnknownEventPayload",{enumerable:!0,get:function(){return a.ContractUnknownEventPayload}}),Object.defineProperty(t,"EventLog",{enumerable:!0,get:function(){return a.EventLog}}),Object.defineProperty(t,"UndecodedEventLog",{enumerable:!0,get:function(){return a.UndecodedEventLog}});var u=r(32291);Object.defineProperty(t,"computeHmac",{enumerable:!0,get:function(){return u.computeHmac}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return u.randomBytes}}),Object.defineProperty(t,"keccak256",{enumerable:!0,get:function(){return u.keccak256}}),Object.defineProperty(t,"ripemd160",{enumerable:!0,get:function(){return u.ripemd160}}),Object.defineProperty(t,"sha256",{enumerable:!0,get:function(){return u.sha256}}),Object.defineProperty(t,"sha512",{enumerable:!0,get:function(){return u.sha512}}),Object.defineProperty(t,"pbkdf2",{enumerable:!0,get:function(){return u.pbkdf2}}),Object.defineProperty(t,"scrypt",{enumerable:!0,get:function(){return u.scrypt}}),Object.defineProperty(t,"scryptSync",{enumerable:!0,get:function(){return u.scryptSync}}),Object.defineProperty(t,"lock",{enumerable:!0,get:function(){return u.lock}}),Object.defineProperty(t,"Signature",{enumerable:!0,get:function(){return u.Signature}}),Object.defineProperty(t,"SigningKey",{enumerable:!0,get:function(){return u.SigningKey}});var c=r(23562);Object.defineProperty(t,"id",{enumerable:!0,get:function(){return c.id}}),Object.defineProperty(t,"ensNormalize",{enumerable:!0,get:function(){return c.ensNormalize}}),Object.defineProperty(t,"isValidName",{enumerable:!0,get:function(){return c.isValidName}}),Object.defineProperty(t,"namehash",{enumerable:!0,get:function(){return c.namehash}}),Object.defineProperty(t,"dnsEncode",{enumerable:!0,get:function(){return c.dnsEncode}}),Object.defineProperty(t,"hashAuthorization",{enumerable:!0,get:function(){return c.hashAuthorization}}),Object.defineProperty(t,"verifyAuthorization",{enumerable:!0,get:function(){return c.verifyAuthorization}}),Object.defineProperty(t,"hashMessage",{enumerable:!0,get:function(){return c.hashMessage}}),Object.defineProperty(t,"verifyMessage",{enumerable:!0,get:function(){return c.verifyMessage}}),Object.defineProperty(t,"solidityPacked",{enumerable:!0,get:function(){return c.solidityPacked}}),Object.defineProperty(t,"solidityPackedKeccak256",{enumerable:!0,get:function(){return c.solidityPackedKeccak256}}),Object.defineProperty(t,"solidityPackedSha256",{enumerable:!0,get:function(){return c.solidityPackedSha256}}),Object.defineProperty(t,"TypedDataEncoder",{enumerable:!0,get:function(){return c.TypedDataEncoder}}),Object.defineProperty(t,"verifyTypedData",{enumerable:!0,get:function(){return c.verifyTypedData}});var l=r(3996);Object.defineProperty(t,"getDefaultProvider",{enumerable:!0,get:function(){return l.getDefaultProvider}}),Object.defineProperty(t,"Block",{enumerable:!0,get:function(){return l.Block}}),Object.defineProperty(t,"FeeData",{enumerable:!0,get:function(){return l.FeeData}}),Object.defineProperty(t,"Log",{enumerable:!0,get:function(){return l.Log}}),Object.defineProperty(t,"TransactionReceipt",{enumerable:!0,get:function(){return l.TransactionReceipt}}),Object.defineProperty(t,"TransactionResponse",{enumerable:!0,get:function(){return l.TransactionResponse}}),Object.defineProperty(t,"AbstractSigner",{enumerable:!0,get:function(){return l.AbstractSigner}}),Object.defineProperty(t,"NonceManager",{enumerable:!0,get:function(){return l.NonceManager}}),Object.defineProperty(t,"VoidSigner",{enumerable:!0,get:function(){return l.VoidSigner}}),Object.defineProperty(t,"AbstractProvider",{enumerable:!0,get:function(){return l.AbstractProvider}}),Object.defineProperty(t,"FallbackProvider",{enumerable:!0,get:function(){return l.FallbackProvider}}),Object.defineProperty(t,"JsonRpcApiProvider",{enumerable:!0,get:function(){return l.JsonRpcApiProvider}}),Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return l.JsonRpcProvider}}),Object.defineProperty(t,"JsonRpcSigner",{enumerable:!0,get:function(){return l.JsonRpcSigner}}),Object.defineProperty(t,"BrowserProvider",{enumerable:!0,get:function(){return l.BrowserProvider}}),Object.defineProperty(t,"AlchemyProvider",{enumerable:!0,get:function(){return l.AlchemyProvider}}),Object.defineProperty(t,"AnkrProvider",{enumerable:!0,get:function(){return l.AnkrProvider}}),Object.defineProperty(t,"BlockscoutProvider",{enumerable:!0,get:function(){return l.BlockscoutProvider}}),Object.defineProperty(t,"ChainstackProvider",{enumerable:!0,get:function(){return l.ChainstackProvider}}),Object.defineProperty(t,"CloudflareProvider",{enumerable:!0,get:function(){return l.CloudflareProvider}}),Object.defineProperty(t,"EtherscanProvider",{enumerable:!0,get:function(){return l.EtherscanProvider}}),Object.defineProperty(t,"InfuraProvider",{enumerable:!0,get:function(){return l.InfuraProvider}}),Object.defineProperty(t,"InfuraWebSocketProvider",{enumerable:!0,get:function(){return l.InfuraWebSocketProvider}}),Object.defineProperty(t,"PocketProvider",{enumerable:!0,get:function(){return l.PocketProvider}}),Object.defineProperty(t,"QuickNodeProvider",{enumerable:!0,get:function(){return l.QuickNodeProvider}}),Object.defineProperty(t,"IpcSocketProvider",{enumerable:!0,get:function(){return l.IpcSocketProvider}}),Object.defineProperty(t,"SocketProvider",{enumerable:!0,get:function(){return l.SocketProvider}}),Object.defineProperty(t,"WebSocketProvider",{enumerable:!0,get:function(){return l.WebSocketProvider}}),Object.defineProperty(t,"EnsResolver",{enumerable:!0,get:function(){return l.EnsResolver}}),Object.defineProperty(t,"Network",{enumerable:!0,get:function(){return l.Network}}),Object.defineProperty(t,"EnsPlugin",{enumerable:!0,get:function(){return l.EnsPlugin}}),Object.defineProperty(t,"EtherscanPlugin",{enumerable:!0,get:function(){return l.EtherscanPlugin}}),Object.defineProperty(t,"FeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FeeDataNetworkPlugin}}),Object.defineProperty(t,"FetchUrlFeeDataNetworkPlugin",{enumerable:!0,get:function(){return l.FetchUrlFeeDataNetworkPlugin}}),Object.defineProperty(t,"GasCostPlugin",{enumerable:!0,get:function(){return l.GasCostPlugin}}),Object.defineProperty(t,"NetworkPlugin",{enumerable:!0,get:function(){return l.NetworkPlugin}}),Object.defineProperty(t,"MulticoinProviderPlugin",{enumerable:!0,get:function(){return l.MulticoinProviderPlugin}}),Object.defineProperty(t,"SocketBlockSubscriber",{enumerable:!0,get:function(){return l.SocketBlockSubscriber}}),Object.defineProperty(t,"SocketEventSubscriber",{enumerable:!0,get:function(){return l.SocketEventSubscriber}}),Object.defineProperty(t,"SocketPendingSubscriber",{enumerable:!0,get:function(){return l.SocketPendingSubscriber}}),Object.defineProperty(t,"SocketSubscriber",{enumerable:!0,get:function(){return l.SocketSubscriber}}),Object.defineProperty(t,"UnmanagedSubscriber",{enumerable:!0,get:function(){return l.UnmanagedSubscriber}}),Object.defineProperty(t,"copyRequest",{enumerable:!0,get:function(){return l.copyRequest}}),Object.defineProperty(t,"showThrottleMessage",{enumerable:!0,get:function(){return l.showThrottleMessage}});var f=r(77778);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return f.accessListify}}),Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return f.authorizationify}}),Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return f.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return f.recoverAddress}}),Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return f.Transaction}});var h=r(75347);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return h.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return h.encodeBase58}}),Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return h.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return h.encodeBase64}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return h.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return h.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return h.dataSlice}}),Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return h.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return h.getBytesCopy}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return h.hexlify}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return h.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return h.isBytesLike}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return h.stripZerosLeft}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return h.zeroPadBytes}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return h.zeroPadValue}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return h.defineProperties}}),Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return h.resolveProperties}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return h.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return h.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return h.assertArgumentCount}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return h.assertNormalize}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return h.assertPrivate}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return h.makeError}}),Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return h.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return h.isError}}),Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return h.EventPayload}}),Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return h.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return h.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return h.FetchCancelSignal}}),Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return h.FixedNumber}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return h.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return h.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return h.getUint}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return h.toBeArray}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return h.toBigInt}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return h.toBeHex}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return h.toNumber}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return h.toQuantity}}),Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return h.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return h.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return h.mask}}),Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return h.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return h.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return h.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return h.parseUnits}}),Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return h.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return h.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return h.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return h.Utf8ErrorFuncs}}),Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return h.decodeRlp}}),Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return h.encodeRlp}}),Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return h.uuidV4}});var d=r(73279);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return d.Mnemonic}}),Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return d.BaseWallet}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return d.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return d.HDNodeVoidWallet}}),Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return d.Wallet}}),Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return d.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return d.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return d.getIndexedAccountPath}}),Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return d.isCrowdsaleJson}}),Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return d.isKeystoreJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return d.decryptCrowdsaleJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return d.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return d.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return d.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return d.encryptKeystoreJsonSync}});var p=r(46591);Object.defineProperty(t,"Wordlist",{enumerable:!0,get:function(){return p.Wordlist}}),Object.defineProperty(t,"LangEn",{enumerable:!0,get:function(){return p.LangEn}}),Object.defineProperty(t,"WordlistOwl",{enumerable:!0,get:function(){return p.WordlistOwl}}),Object.defineProperty(t,"WordlistOwlA",{enumerable:!0,get:function(){return p.WordlistOwlA}}),Object.defineProperty(t,"wordlists",{enumerable:!0,get:function(){return p.wordlists}})},52061:e=>{e.exports=function(e,t){for(var r=e.length,n=-1;++n<r;)e[n]^=t[n];return e}},52244:(e,t,r)=>{var n=r(39404),i=r(15037);function o(e){this.rand=e||new i.Rand}e.exports=o,o.create=function(e){return new o(e)},o.prototype._randbelow=function(e){var t=e.bitLength(),r=Math.ceil(t/8);do{var i=new n(this.rand.generate(r))}while(i.cmp(e)>=0);return i},o.prototype._randrange=function(e,t){var r=t.sub(e);return e.add(this._randbelow(r))},o.prototype.test=function(e,t,r){var i=e.bitLength(),o=n.mont(e),s=new n(1).toRed(o);t||(t=Math.max(1,i/48|0));for(var a=e.subn(1),u=0;!a.testn(u);u++);for(var c=e.shrn(u),l=a.toRed(o);t>0;t--){var f=this._randrange(new n(2),a);r&&r(f);var h=f.toRed(o).redPow(c);if(0!==h.cmp(s)&&0!==h.cmp(l)){for(var d=1;d<u;d++){if(0===(h=h.redSqr()).cmp(s))return!1;if(0===h.cmp(l))break}if(d===u)return!1}}return!0},o.prototype.getDivisor=function(e,t){var r=e.bitLength(),i=n.mont(e),o=new n(1).toRed(i);t||(t=Math.max(1,r/48|0));for(var s=e.subn(1),a=0;!s.testn(a);a++);for(var u=e.shrn(a),c=s.toRed(i);t>0;t--){var l=this._randrange(new n(2),s),f=e.gcd(l);if(0!==f.cmpn(1))return f;var h=l.toRed(i).redPow(u);if(0!==h.cmp(o)&&0!==h.cmp(c)){for(var d=1;d<a;d++){if(0===(h=h.redSqr()).cmp(o))return h.fromRed().subn(1).gcd(e);if(0===h.cmp(c))break}if(d===a)return(h=h.redSqr()).fromRed().subn(1).gcd(e)}}return!1}},52348:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BytesCoder=t.DynamicBytesCoder=void 0;const n=r(75347),i=r(38869);class o extends i.Coder{constructor(e,t){super(e,e,t,!0)}defaultValue(){return"0x"}encode(e,t){t=(0,n.getBytesCopy)(t);let r=e.writeValue(t.length);return r+=e.writeBytes(t),r}decode(e){return e.readBytes(e.readIndex(),!0)}}t.DynamicBytesCoder=o,t.BytesCoder=class extends o{constructor(e){super("bytes",e)}decode(e){return(0,n.hexlify)(super.decode(e))}}},52632:(e,t)=>{t.encrypt=function(e,t){return e._cipher.encryptBlock(t)},t.decrypt=function(e,t){return e._cipher.decryptBlock(t)}},53178:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ArrayCoder=t.unpack=t.pack=void 0;const n=r(75347),i=r(39976),o=r(38869),s=r(75754);function a(e,t,r){let i=[];if(Array.isArray(r))i=r;else if(r&&"object"==typeof r){let e={};i=t.map((t=>{const i=t.localName;return(0,n.assert)(i,"cannot encode object for signature with missing names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),(0,n.assert)(!e[i],"cannot encode object for signature with duplicate names","INVALID_ARGUMENT",{argument:"values",info:{coder:t},value:r}),e[i]=!0,r[i]}))}else(0,n.assertArgument)(!1,"invalid tuple value","tuple",r);(0,n.assertArgument)(t.length===i.length,"types/value length mismatch","tuple",r);let s=new o.Writer,a=new o.Writer,u=[];t.forEach(((e,t)=>{let r=i[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=s.writeUpdatableValue();u.push((e=>{n(e+t)}))}else e.encode(s,r)})),u.forEach((e=>{e(s.length)}));let c=e.appendWriter(s);return c+=e.appendWriter(a),c}function u(e,t){let r=[],i=[],s=e.subReader(0);return t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readIndex(),i=s.subReader(r);try{o=t.decode(i)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if((0,n.isError)(e,"BUFFER_OVERRUN"))throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}if(null==o)throw new Error("investigate");r.push(o),i.push(t.localName||null)})),o.Result.fromItems(r,i)}t.pack=a,t.unpack=u;class c extends o.Coder{coder;length;constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),(0,n.defineProperties)(this,{coder:e,length:t})}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;r<this.length;r++)t.push(e);return t}encode(e,t){const r=i.Typed.dereference(t,"array");Array.isArray(r)||this._throwError("expected array value",r);let o=this.length;-1===o&&(o=r.length,e.writeValue(r.length)),(0,n.assertArgumentCount)(r.length,o,"coder array"+(this.localName?" "+this.localName:""));let s=[];for(let e=0;e<r.length;e++)s.push(this.coder);return a(e,s,r)}decode(e){let t=this.length;-1===t&&(t=e.readIndex(),(0,n.assert)(t*o.WordSize<=e.dataLength,"insufficient data length","BUFFER_OVERRUN",{buffer:e.bytes,offset:t*o.WordSize,length:e.dataLength}));let r=[];for(let e=0;e<t;e++)r.push(new s.AnonymousCoder(this.coder));return u(e,r)}}t.ArrayCoder=c},53197:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publish=void 0;var n=r(76808),i=r(18464),o=r(17812);t.publish=function(e){return e?function(t){return o.connect(e)(t)}:function(e){return i.multicast(new n.Subject)(e)}}},53209:(e,t,r)=>{"use strict";var n=r(65606),i=65536,o=r(92861).Buffer,s=r.g.crypto||r.g.msCrypto;s&&s.getRandomValues?e.exports=function(e,t){if(e>4294967295)throw new RangeError("requested too many random bytes");var r=o.allocUnsafe(e);if(e>0)if(e>i)for(var a=0;a<e;a+=i)s.getRandomValues(r.slice(a,a+i));else s.getRandomValues(r);return"function"==typeof t?n.nextTick((function(){t(null,r)})):r}:e.exports=function(){throw new Error("Secure random number generation is not supported by this browser.\nUse Chrome, Firefox or Internet Explorer 11")}},53866:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timestamp=void 0;var n=r(93275),i=r(26872);t.timestamp=function(e){return void 0===e&&(e=n.dateTimestampProvider),i.map((function(t){return{value:t,timestamp:e.now()}}))}},54371:(e,t,r)=>{"use strict";function n(e){return!(!e||"string"!=typeof e)&&/^[^@\s]+@[^@\s]+\.[^@\s]+$/.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.validateUsername=function(e){return!(!e||"string"!=typeof e||e.length<3||e.length>64||!/^[a-zA-Z0-9._-]+$/.test(e))},t.validateEmail=n,t.validateProvider=function(e){return["google","github","discord","twitter","custom"].includes(e)},t.generateUsernameFromIdentity=function(e,t){return"web3"===e&&t.id?`web3_${t.id.toLowerCase()}`:"nostr"===e&&t.id?`nostr_${t.id}`:"webauthn"===e&&t.id?`webauthn_${t.id}`:t.email&&n(t.email)?`${e}_${t.email.split("@")[0]}`:t.name?`${e}_${t.name.replace(/\s+/g,"_")}`:t.id?`${e}_${t.id}`:`${e}_user`},t.generateDeterministicPassword=function(e){return i.ethers.keccak256(i.ethers.toUtf8Bytes(e)).slice(2,34)};const i=r(14193)},54383:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.take=void 0;var n=r(44885),i=r(65212),o=r(17214);t.take=function(e){return e<=0?function(){return n.EMPTY}:i.operate((function(t,r){var n=0;t.subscribe(o.createOperatorSubscriber(r,(function(t){++n<=e&&(r.next(t),e<=n&&r.complete())})))}))}},54530:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.schedulePromise=void 0;var n=r(19724),i=r(32071),o=r(5455);t.schedulePromise=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},54542:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.hmac=t.HMAC=void 0;const n=r(27302),i=r(74224);class o extends i.Hash{constructor(e,t){super(),this.finished=!1,this.destroyed=!1,(0,n.hash)(e);const r=(0,i.toBytes)(t);if(this.iHash=e.create(),"function"!=typeof this.iHash.update)throw new Error("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;const o=this.blockLen,s=new Uint8Array(o);s.set(r.length>o?e.create().update(r).digest():r);for(let e=0;e<s.length;e++)s[e]^=54;this.iHash.update(s),this.oHash=e.create();for(let e=0;e<s.length;e++)s[e]^=106;this.oHash.update(s),s.fill(0)}update(e){return(0,n.exists)(this),this.iHash.update(e),this}digestInto(e){(0,n.exists)(this),(0,n.bytes)(e,this.outputLen),this.finished=!0,this.iHash.digestInto(e),this.oHash.update(e),this.oHash.digestInto(e),this.destroy()}digest(){const e=new Uint8Array(this.oHash.outputLen);return this.digestInto(e),e}_cloneInto(e){e||(e=Object.create(Object.getPrototypeOf(this),{}));const{oHash:t,iHash:r,finished:n,destroyed:i,blockLen:o,outputLen:s}=this;return e.finished=n,e.destroyed=i,e.blockLen=o,e.outputLen=s,e.oHash=t._cloneInto(e.oHash),e.iHash=r._cloneInto(e.iHash),e}destroy(){this.destroyed=!0,this.oHash.destroy(),this.iHash.destroy()}}t.HMAC=o,t.hmac=(e,t,r)=>new o(e,t).update(r).digest(),t.hmac.create=(e,t)=>new o(e,t)},54827:(e,t,r)=>{e=r.nmd(e),function(){function t(e,n){return n?r(55736)(e):e.slice?t[i(e)]:function(r,n){e(r={exports:{}}),t[i(n)]=r.exports};function i(e){return e.split("/").slice(-1).toString().replace(".js","")}}var n=e;t((function(e){String.random=function(e,t){var r="";for(e=e||24,t=t||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";e-- >0;)r+=t.charAt(Math.floor(Math.random()*t.length));return r},String.match=function(e,t){var r,n;return"string"==typeof e&&("string"==typeof t&&(t={"=":t}),e===(r=(t=t||{})["="]||t["*"]||t[">"]||t["<"])||n===t["="]&&(r=t["*"]||t[">"],e.slice(0,(r||"").length)===r||n===t["*"]&&(n!==t[">"]&&n!==t["<"]?e>=t[">"]&&e<=t["<"]:n!==t[">"]&&e>=t[">"]||n!==t["<"]&&e<=t["<"])))},String.hash=function(e,t){if("string"==typeof e){if(t=t||0,!e.length)return t;for(var r=0,n=e.length;r<n;++r)t=(t<<5)-t+e.charCodeAt(r),t|=0;return t}};var t,r,n,i,o,s,a=Object.prototype.hasOwnProperty;Object.plain=function(e){return!!e&&(e instanceof Object&&e.constructor===Object||"Object"===Object.prototype.toString.call(e).match(/^\[object (\w+)\]$/)[1])},Object.empty=function(e,t){for(var r in e)if(a.call(e,r)&&(!t||-1==t.indexOf(r)))return!1;return!0},Object.keys=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t},r=setTimeout,n=0,i=0,o=typeof setImmediate!=""+t&&setImmediate||function(e,n){return typeof MessageChannel==""+t?r:((e=new MessageChannel).port1.onmessage=function(e){""==e.data&&n()},function(t){n=t,e.port2.postMessage("")})}(),s=r.check=r.check||typeof performance!=""+t&&performance||{now:function(){return+new Date}},r.hold=r.hold||9,r.poll=r.poll||function(e){r.hold>=s.now()-n&&i++<3333?e():o((function(){n=s.now(),e()}),i=0)},function(){var e,t=setTimeout,r=t.turn=t.turn||function(e){1==n.push(e)&&i(s)},n=r.s=[],i=t.poll,o=0,s=function(){(e=n[o++])&&e(),o!=n.length&&99!=o||(n=r.s=n.slice(o),o=0),n.length&&i(s)}}(),function(){var e,t=setTimeout,r=t.turn;(t.each=t.each||function(t,n,i,o){o=o||9,function s(a,u,c){if(u=(a=(t||[]).splice(0,o)).length){for(var l=0;l<u&&e===(c=n(a[l]));l++);if(e===c)return void r(s)}i&&i(c)}()})()}()}))(t,"./shim"),t((function(e){e.exports=function e(t,r,n){if(!t)return{to:e};var i="function"==typeof r;if(t=(this.tag||(this.tag={}))[t]||i&&(this.tag[t]={tag:t,to:e._={next:function(e){var t;(t=this.to)&&t.next(e)}}}),i){var o={off:e.off||(e.off=function(){if(this.next===e._.next)return!0;this===this.the.last&&(this.the.last=this.back),this.to.back=this.back,this.next=e._.next,this.back.to=this.to,this.the.last===this.the&&delete this.on.tag[this.the.tag]}),to:e._,next:r,the:t,on:this,as:n};return(o.back=t.last||t).to=o,t.last=o}return(t=t.to)&&void 0!==r&&t.next(r),t}}))(t,"./onto"),t((function(e){e.exports=function(e){return null===e||"string"==typeof e||"boolean"==typeof e||"number"==typeof e&&e!=1/0&&e!=-1/0&&e==e||!!e&&"string"==typeof e["#"]&&1===Object.keys(e).length&&e["#"]}}))(t,"./valid"),t((function(e){function r(){var e=+new Date;return a<e?(o=0,a=e+r.drift):a=e+(o+=1)/s+r.drift}t("./shim"),r.drift=0;var n,i=-1/0,o=0,s=999,a=i;r.is=function(e,t,r){var n=t&&e&&e._&&e._[">"]||r;if(n)return"number"==typeof(n=n[t])?n:i},r.ify=function(e,t,r,i,o){(e=e||{})._=e._||{},o&&(e._["#"]=o);var s=e._[">"]||(e._[">"]={});return n!==t&&"_"!==t&&("number"==typeof r&&(s[t]=r),n!==i&&(e[t]=i)),e},e.exports=r}))(t,"./state"),t((function(e){t("./shim"),e.exports=function(e){var t={s:{}},r=t.s;e=e||{max:999,age:9e3},t.check=function(e){return!!r[e]&&n(e)};var n=t.track=function(i){var o=r[i]||(r[i]={});return o.was=t.now=+new Date,t.to||(t.to=setTimeout(t.drop,e.age+9)),n.ed&&n.ed(i),o};return t.drop=function(n){t.to=null,t.now=+new Date;var i=Object.keys(r);console.STAT&&console.STAT(t.now,+new Date-t.now,"dup drop keys"),setTimeout.each(i,(function(i){var o=r[i];o&&(n||e.age)>t.now-o.was||delete r[i]}),0,99)},t}}))(t,"./dup"),t((function(e){t("./onto"),e.exports=function(e,t){if(this.on){var n=(this.opt||{}).lack||9e3;if("function"!=typeof e){if(!e)return;var i=e["#"]||e,o=(this.tag||"")[i];if(!o)return;return t&&(o=this.on(i,t),clearTimeout(o.err),o.err=setTimeout((function(){o.off()}),n)),!0}if(i=t&&t["#"]||r(9),!e)return i;var s=this.on(i,e,t);return s.err=s.err||setTimeout((function(){s.off(),s.next({err:"Error: No ACK yet.",lack:!0})}),n),i}};var r=String.random||function(){return Math.random().toString(36).slice(2)}}))(t,"./ask"),t((function(e){function r(e){return e instanceof r?(this._={$:this}).$:this instanceof r?r.create(this._={$:this,opt:e}):new r(e)}r.is=function(e){return e instanceof r||e&&e._&&e===e._.$||!1},r.version=.202,r.chain=r.prototype,r.chain.toJSON=function(){},t("./shim"),r.valid=t("./valid"),r.state=t("./state"),r.on=t("./onto"),r.dup=t("./dup"),r.ask=t("./ask"),function(){function e(n){if(n)if(n.out!==e){var i,o=this.as,u=o.at||o,c=u.$,l=u.dup,f=n.DBG;if((i=n["#"])||(i=n["#"]=a(9)),!l.check(i)){if(l.track(i),i=n._,n._="function"==typeof i?i:function(){},n.$&&n.$===(n.$._||"").$||(n.$=c),n["@"]&&!n.put&&function(e){var t,r=e["@"]||"";if(t=r._)t.acks=(t.acks||0)+1,(t.err=e.err)&&(e["@"]=t["#"],s(t)),t.ok=e.ok||t.ok,t.stop||t.crack||(t.crack=t.match&&t.match.push((function(){d(t)}))),d(t);else{var n=(n=e.$)&&(n=n._)&&(n=n.root)&&(n=n.dup);if(!(n=n.check(r)))return;e["@"]=n["#"]||e["@"]}}(n),!u.ask(n["@"],n)){if(f&&(f.u=+new Date),n.put)return void t(n);n.get&&r.on.get(n,c)}f&&(f.uc=+new Date),this.to.next(n),f&&(f.ua=+new Date),n.nts||n.NTS||(n.out=e,u.on("out",n),f&&(f.ue=+new Date))}}else this.to.next(n)}function t(t){if(t){var r=t._||"",o=r.root=((r.$=t.$||"")._||"").root;if(t["@"]&&r.faith&&!r.miss)return t.out=e,void o.on("out",t);r.latch=o.hatch,r.match=o.hatch=[];var a=t.put,l=r.DBG=t.DBG,f=+new Date;if(p=p||f,!a["#"]||!a["."]){l&&(l.p=f),r["#"]=t["#"],r.msg=t,r.all=0,r.stun=1;var h=Object.keys(a);console.STAT&&console.STAT(f,((l||r).pk=+new Date)-f,"put sort");var d,y,m,v,E,A,_,S=0;!function e(o){if(d!=S){if(d=S,!(m=h[S]))return console.STAT&&console.STAT(f,((l||r).pd=+new Date)-f,"put"),void s(r);(v=a[m])?(_=v._)?m!==_["#"]?A=g+b(m)+"soul not same.":(E=_[">"])||(A=g+b(m)+"no state."):A=g+b(m)+"no meta.":A=g+b(m)+"no node.",y=Object.keys(v||{})}if(A)return t.err=r.err=A,void s(r);var p,P=0;for(o=o||0;o++<9&&(p=y[P++]);)if("_"!==p){var k=v[p],O=E[p];if(i===O){A=g+b(p)+"on"+b(m)+"no state.";break}if(!c(k)){A=g+b(p)+"on"+b(m)+"bad "+typeof k+b(k);break}n(k,p,m,O,t),++w}(y=y.slice(P)).length?u(e):(++S,y=null,e(o))}()}}}function n(e,t,r,i,o){var s,a=o._||"",u=a.root,c=u.graph,f=c[r]||h,d=l(f,t,1),p=f[t],g=a.DBG;(s=console.STAT)&&(c[r]&&p||(s.has=(s.has||0)+1));var b=v();if(i>b)return setTimeout((function(){n(e,t,r,i,o)}),(s=i-b)>m?m:s),void(console.STAT&&console.STAT((g||a).Hf=+new Date,s,"future"));if(!(i<d)&&(a.faith||i!==d||!(e===p||y(e)<=y(p))||a.miss)){a.stun++;var w=o["#"]+a.all++,E={toString:function(){return w},_:a};E.toJSON=E.toString,u.dup.track(E)["#"]=o["#"],g&&(g.ph=g.ph||+new Date),u.on("put",{"#":E,"@":o["@"],put:{"#":r,".":t,":":e,">":i},ok:o.ok,_:a})}}function o(e){var t;(t=(e._||"").DBG)&&(t.pa=+new Date,t.pm=t.pm||+new Date);var r,n=this.as,i=n.graph,o=e._,a=e.put,u=a["#"],c=a["."],l=a[":"],h=a[">"];e["#"],(r=o.msg)&&(r=r.put)&&(r=r[u])&&f(r,c,h,l,u),i[u]=f(i[u],c,h,l,u),(r=(n.next||"")[u])&&r.on("in",e),s(o),this.to.next(e)}function s(t,r){var n;if(!t.stop&&(t.err||!(0<--t.stun))&&(t.stop=1,n=t.root)){var i=t.match;i.end=1,i===n.hatch&&(!(i=t.latch)||i.end?delete n.hatch:n.hatch=i),t.hatch&&t.hatch(),setTimeout.each(t.match,(function(e){e&&e()})),!(r=t.msg)||t.err||r.err||(r.out=e,t.root.on("out",r),E())}}function d(e){e&&e.root&&(e.stun||e.acks!==e.all||e.root.on("in",{"@":e["#"],err:e.err,ok:e.err?i:e.ok||{"":1}}))}r.create=function(t){t.root=t.root||t,t.graph=t.graph||{},t.on=t.on||r.on,t.ask=t.ask||r.ask,t.dup=t.dup||r.dup();var n=t.$.opt(t.opt);return t.once||(t.on("in",e,t),t.on("out",e,t),t.on("put",o,t),r.on("create",t),t.on("create",t)),t.once=1,n},r.on.put=t;var p,g="Error: Invalid graph!",b=function(e){return" '"+(""+e).slice(0,9)+"...' "},y=JSON.stringify,m=2147483647,v=r.state,w=0,E=function(){w>999&&w/-(p-(p=+new Date))>1&&(r.window&&console.log("Warning: You're syncing 1K+ records a second, faster than DOM can update - consider limiting query."),E=function(){w=0})}}(),function(){function e(e,t){var r=+new Date,n=e._||{},o=n.DBG=e.DBG,s=e["#"],u=a(9),c=Object.keys(t||"").sort(),h=((t||"")._||"")["#"],d=(c.length,e.$._.root),p=t===d.graph[h];console.STAT&&console.STAT(r,((o||n).gk=+new Date)-r,"got keys"),t&&function e(){r=+new Date;for(var n,g,b,y=0,m={};y<9&&(n=c[y++]);)f(m,n,l(t,n),t[n],h);c=c.slice(y),(g={})[h]=m,m=g,p&&((b=function(){}).ram=b.faith=!0),g=c.length,console.STAT&&console.STAT(r,-(r-(r=+new Date)),"got copied some"),o&&(o.ga=+new Date),d.on("in",{"@":s,"#":u,put:m,"%":g?u=a(9):i,$:d.$,_:b,DBG:o,FOO:1}),console.STAT&&console.STAT(r,+new Date-r,"got in"),g&&setTimeout.turn(e)}(),t||d.on("in",{"@":e["#"]})}r.on.get=function(t,r){var n=r._,o=t.get,s=o["#"],a=n.graph[s],u=o["."],c=(n.next||(n.next={}))[s],h=(t._||{}).DBG=t.DBG;if(h&&(h.g=+new Date),!a)return n.on("get",t);if(u){if(("string"!=typeof u||i===a[u])&&!((c||"").next||"")[u])return void n.on("get",t);a=f({},u,l(a,u),a[u],s)}a&&e(t,a),n.on("get",t)},r.on.get.ack=e}(),r.chain.opt=function(e){e=e||{};var t=this._,n=e.peers||e;return Object.plain(e)||(e={}),Object.plain(t.opt)||(t.opt=e),"string"==typeof n&&(n=[n]),Object.plain(t.opt.peers)||(t.opt.peers={}),n instanceof Array&&(e.peers={},n.forEach((function(r){var n={};n.id=n.url=r,e.peers[r]=t.opt.peers[r]=t.opt.peers[r]||n}))),s(e,(function e(t){var r=this[t];this&&this.hasOwnProperty(t)||"string"==typeof r||Object.empty(r)?this[t]=r:(!r||r.constructor===Object||r instanceof Array)&&s(r,e)})),t.opt.from=e,r.on("opt",t),t.opt.uuid=t.opt.uuid||function(e){return r.state().toString(36).replace(".","")+String.random(e||12)},this};var i,o,s=function(e,t){Object.keys(e).forEach(t,e)},a=String.random,u=setTimeout.turn,c=r.valid,l=r.state.is,f=r.state.ify,h={};r.log=function(){return!r.log.off&&o.log.apply(o,arguments),[].slice.call(arguments).join(" ")},r.log.once=function(e,t,n){return(n=r.log.once)[e]=n[e]||0,n[e]++||r.log(t)},"undefined"!=typeof window&&((window.GUN=window.Gun=r).window=window);try{void 0!==n&&(n.exports=r)}catch(e){}e.exports=r,(r.window||{}).console=(r.window||{}).console||{log:function(){}},(o=console).only=function(e,t){return o.only.i&&e===o.only.i&&o.only.i++&&(o.log.apply(o,arguments)||t)},r.log.once("welcome","Hello wonderful person! :) Thanks for using GUN, please ask for help on http://chat.gun.eco if anything takes you longer than 5min to figure out!")}))(t,"./root"),t((function(e){t("./root").chain.back=function(e,t){if(-1===(e=e||1)||1/0===e)return this._.root.$;if(1===e)return(this._.back||this._).$;var i=this._;if("string"==typeof e&&(e=e.split(".")),e instanceof Array){for(var o=0,s=e.length,a=i;o<s;o++)a=(a||n)[e[o]];return r!==a?t?this:a:(a=i.back)?a.$.back(e,t):void 0}if("function"==typeof e){var u;for(a={back:i};(a=a.back)&&r===(u=e(a,t)););return u}return"number"==typeof e?(i.back||i).$.back(e-1):this};var r,n={}}))(t,"./back"),t((function(e){var r=t("./root");function n(e,t){if(t=t||this.as||e.$._,(!e.$$||this===r.on)&&e.put&&!t.soul){var n=e.put||"",i=n["="]||n[":"],o=t.root,s=o.$.get(n["#"]).get(n["."])._;if("string"==typeof(i=c(i))){if(!(s.echo||(s.echo={}))[t.id]||(o.pass||"")[t.id]){if(a=o.pass){if(a[i+t.id])return;a[i+t.id]=1}(s.echo||(s.echo={}))[t.id]=t,t.has&&(t.link=i);var a,u=o.$.get(s.link=i)._;(u.echo||(u.echo={}))[s.id]=s,((a=t.ask||"")[""]||t.lex)&&u.on("out",{get:{"#":i}}),setTimeout.each(Object.keys(a),(function(e,t){e&&(t=a[e])&&t.on("out",{get:{"#":i,".":e}})}),0,99)}}else this===r.on&&((s.echo||(s.echo={}))[t.id]=t)}}function i(e,t){var r,n,o=e.put||"",a=s!==o["="]?o["="]:o[":"],u=t.root;if(s===a){if(t.soul&&s!==t.put)return;if(n=(e.$$||e.$||"")._||"",e["@"]&&(s!==n.put||s!==t.put))return;return(r=t.link||e.linked)&&delete(u.$.get(r)._.echo||"")[t.id],t.has&&(t.link=null),t.put=s,void setTimeout.each(Object.keys(t.next||""),(function(e,n){(n=t.next[e])&&(r&&delete(u.$.get(r).get(e)._.echo||"")[n.id],n.on("in",{get:e,put:s,$:n.$}))}),0,99)}t.soul||e.$$||(r=c(a),n=e.$._||"",(r!==n.link&&(!t.has||n.link)||(u.pass||"")[t.id]&&"string"!=typeof r)&&(delete(n.echo||"")[t.id],i({get:t.get,put:s,$:e.$,linked:e.linked=e.linked||n.link},t)))}function o(e,t){var n=this.as,i=n.$._,o=(i.root,n.get||""),a=(e.put||"")[o["#"]]||"";if(!e.put||"string"==typeof o["."]&&s===a[o["."]]){if(s!==i.put)return;if(!i.soul&&!i.has)return;return i.ack=(i.ack||0)+1,void i.on("in",{get:i.get,put:i.put=s,$:i.$,"@":e["@"]})}(e._||{}).miss=1,r.on.put(e)}r.chain.chain=function(e){var t,n=this,i=n._,o=new(e||n).constructor(n),s=o._;return s.root=t=i.root,s.id=++t.once,s.back=n._,s.on=r.on,s.on("in",r.on.in,s),s.on("out",r.on.out,s),o},r.on.out=function(e){var t,r,n=this.as,i=n.back,a=n.root;if(e.$||(e.$=n.$),this.to.next(e),!n.err){if(t=e.get){if(a.pass&&(a.pass[n.id]=n),n.lex&&Object.keys(n.lex).forEach((function(e){r[e]=n.lex[e]}),r=e.get=e.get||{}),t["#"]||n.soul){if(t["#"]=t["#"]||n.soul,e["#"]||(e["#"]=u(9)),i=a.$.get(t["#"])._,t=t["."]){if(l(i.put,t)&&(r=i.ask&&i.ask[t],(i.ask||(i.ask={}))[t]=i.$.get(t)._,i.on("in",{get:t,put:{"#":i.soul,".":t,":":i.put[t],">":h(a.graph[i.soul],t)}}),r))return}else{if(r=i.ask&&i.ask[""],(i.ask||(i.ask={}))[""]=i,s!==i.put&&(i.on("in",i),r))return;e.$=i.$}return a.ask(o,e),a.on("in",e)}if(t["."])return n.get?(e={get:{".":n.get},$:n.$},(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)):(e={get:n.lex?e.get:{},$:n.$},i.on("out",e));if((n.ask||(n.ask={}))[""]=n,n.get)return t["."]=n.get,(i.ask||(i.ask={}))[n.get]=e.$._,i.on("out",e)}return i.on("out",e)}n.on("in",{put:n.put=s,$:n.$})},r.on.in=function(e,t){var r,o=(t=t||this.as).root,u=e.$||(e.$=t.$),l=(u||"")._||a,f=e.put||"",p=f["#"],g=f["."],b=s!==f["="]?f["="]:f[":"],y=f[">"]||-1/0;if(s!==e.put&&(s===f["#"]||s===f["."]||s===f[":"]&&s===f["="]||s===f[">"]))return c(f)?void t.on("in",{$:l.back.$,put:{"#":p=l.back.soul,".":g=l.has||l.get,"=":f,">":h(l.back.put,g)},via:e}):(p=((f||"")._||"")["#"])?(u=t.root.$.get(p),setTimeout.each(Object.keys(f).sort(),(function(r){"_"!=r&&s!==(y=h(f,r))&&t.on("in",{$:u,put:{"#":p,".":r,"=":f[r],">":y},VIA:e})}))):void console.log("chain not yet supported for",f,"...",e,t);(e.seen||"")[t.id]||((e.seen||(e.seen=function(){}))[t.id]=t,t!==l&&(Object.keys(e).forEach((function(t){f[t]=e[t]}),f={}),f.get=t.get||f.get,t.soul||t.has?l.soul&&(f.$=t.$,f.$$=f.$$||l.$):f.$$$=f.$$$||t.$,e=f),i(e,t),(t.soul||e.$$)&&y>=h(o.graph[p],g)&&((f=o.$.get(p)._).put=d(f.put,g,y,b,p)),!l.soul&&y>=h(o.graph[p],g)&&(r=(o.$.get(p)._.next||"")[g])&&(r.put=b,"string"==typeof(f=c(b))&&(r.put=o.$.get(f)._.put||b)),this.to&&this.to.next(e),t.any&&setTimeout.each(Object.keys(t.any),(function(r){(r=t.any[r])&&r(e)}),0,99),t.echo&&setTimeout.each(Object.keys(t.echo),(function(r){(r=t.echo[r])&&r.on("in",e)}),0,99),((e.$$||"")._||l).soul&&(r=t.next)&&(r=r[g])&&(f={},Object.keys(e).forEach((function(t){f[t]=e[t]})),f.$=(e.$$||e.$).get(f.get=g),delete f.$$,delete f.$$$,r.on("in",f)),n(e,t))},r.on.link=n,r.on.unlink=i;var s,a={},u=String.random,c=r.valid,l=function(e,t){return e&&Object.prototype.hasOwnProperty.call(e,t)},f=r.state,h=f.is,d=f.ify}))(t,"./chain"),t((function(e){var r=t("./root");function n(e){var t=this.at||this.on;if(!e||t.soul||t.has)return this.off();if(e=(e=(e=e.$||e)._||e).id){var r;if(t.map,(r=this.seen||(this.seen={}))[e])return!0;r[e]=!0}}r.chain.get=function(e,t,a){var u,c;if("string"==typeof e){if(0==e.length)return(u=this.chain())._.err={err:r.log("0 length key!",e)},t&&t.call(u,u._.err),u;(u=((f=this._).next||o)[e])||(u=e&&function(e,t){var r=t._,n=r.next,i=t.chain()._;return n||(n=r.next={}),n[i.get=e]=i,t===r.root.$?i.soul=e:(r.soul||r.has)&&(i.has=e),i}(e,this)),u=u&&u.$}else{if("function"==typeof e){if(!0===t)return function(e,t,n,o){var s,a=e._,u=0;(s=a.soul||a.link)?t(s,o,a):a.jam?a.jam.push([t,o]):(a.jam=[[t,o]],e.get((function(e,t){if(!(i===e.put&&!a.root.opt.super&&(s=Object.keys(a.root.opt.peers).length)&&++u<=s)){t.rid(e);var n,o=(o=e.$)&&o._||{},c=0;for(s=a.jam,delete a.jam;n=s[c++];){var l=n[0];n=n[1],l&&l(o.link||o.soul||r.valid(e.put)||((e.put||{})._||{})["#"],n,e,t)}}}),{out:{get:{".":!0}}}))}(this,e,0,a),this;var l,f=(u=this)._,h=t||{},d=f.root;h.at=f,h.ok=e;var p={};function g(e,t,n){if(!g.stun&&(!(o=d.pass)||o[l])){var o,s=e.$._,a=(e.$$||"")._,u=(a||s).put,c=!s.has&&!s.soul,b={};if((c||i===u)&&(u=i===((o=e.put)||"")["="]?i===(o||"")[":"]?o:o[":"]:o["="]),"string"==typeof(o=r.valid(u))&&(u=i===(o=d.$.get(o)._.put)?h.not?i:u:o),!h.not||i!==u){if(i===h.stun){if((o=d.stun)&&o.on&&(f.$.back((function(e){if(o.on(""+e.id,b={}),(b.run||0)<g.id)return b})),!b.run&&o.on(""+s.id,b={}),!b.run&&a&&o.on(""+a.id,b={}),g.id>b.run&&(b.stun&&!b.stun.end||(b.stun=o.on("stun"),b.stun=b.stun&&b.stun.last),b.stun&&!b.stun.end)))return void((b.stun.add||(b.stun.add={}))[l]=function(){g(e,t,1)});if(i===u&&(n=0),(o=d.hatch)&&!o.end&&i===h.hatch&&!n){if(p[s.$._.id])return;return p[s.$._.id]=1,void o.push((function(){g(e,t,1)}))}p={}}if(d.pass){if(d.pass[l+s.id])return;d.pass[l+s.id]=1}h.on?h.ok.call(s.$,u,s.get,e,t||g):h.v2020?h.ok(e,t||g):(Object.keys(e).forEach((function(t){o[t]=e[t]}),o={}),(e=o).put=u,h.ok.call(h.as,e,t||g))}}}return g.at=f,(f.any||(f.any={}))[l=String.random(7)]=g,g.off=function(){g.stun=1,f.any&&delete f.any[l]},g.rid=n,g.id=h.run||++d.once,c=d.pass,(d.pass={})[l]=1,h.out=h.out||{get:{}},f.on("out",h.out),d.pass=c,u}if("number"==typeof e)return this.get(""+e,t,a);if("string"==typeof(c=s(e)))return this.get(c,t,a);(c=this.get.next)&&(u=c(this,e))}return u?(t&&"function"==typeof t&&u.get(t,a),u):((u=this.chain())._.err={err:r.log("Invalid get request!",e)},t&&t.call(u,u._.err),u)};var i,o={},s=r.valid}))(t,"./get"),t((function(e){var r=t("./root");function n(e,t){if(t){t=(t._||"").id||t;var n,i=e.root.stun||(e.root.stun={on:r.on}),o={};e.stun||(e.stun=i.on("stun",(function(){}))),(n=i.on(""+t))&&n.the.last.next(o),o.run>=e.run||i.on(""+t,(function(t){if(e.stun.end)return this.off(),void this.to.next(t);t.run=t.run||e.run,t.stun=t.stun||e.stun}))}}function i(e){if(e.err)i.end(e.stun,e.root);else if(!e.todo.length&&!e.end&&Object.empty(e.wait)){e.end=1;var t,n=e.$.back(-1)._,o=n.root,s=n.ask((function(t){o.on("ack",t),t.err&&!t.lack&&r.log(t),++a>(e.acks||0)&&this.off(),e.ack&&e.ack(t,this)}),e.opt),a=0,u=e.stun;(t=function(){u&&(i.end(u,o),setTimeout.each(Object.keys(u=u.add||""),(function(e){(e=u[e])&&e()})))}).hatch=t,e.ack&&!e.ok&&(e.ok=e.acks||9),e.via._.on("out",{put:e.out=e.graph,ok:e.ok&&{"@":e.ok+1},opt:e.opt,"#":s,_:t})}}r.chain.put=function(e,t,s){var l=this,f=l._,h=f.root;(s=s||{}).root=f.root,s.run||(s.run=h.once),n(s,f.id),s.ack=s.ack||t,s.via=s.via||l,s.data=s.data||e,s.soul||(s.soul=f.soul||"string"==typeof t&&t);var d=s.state=s.state||r.state();return"function"==typeof e?(e((function(e){s.data=e,l.put(o,o,s)})),l):s.soul?(s.$=h.$.get(s.soul),s.todo=[{it:s.data,ref:s.$}],s.turn=s.turn||a,s.ran=s.ran||i,function e(){var t,o,a,l,f,h=s.todo,p=h.pop(),g=p.it;if(p.ref&&p.ref._.id,n(s,p.ref),(l=p.todo)&&(g=g[o=l.pop()],l.length&&h.push(p)),o&&(h.path||(h.path=[])).push(o),!(t=u(g))&&!(f=r.is(g))){if(!Object.plain(g))return void i.err(s,"Invalid data: "+function(e,t){return e&&(t=e.constructor)&&t.name||typeof e}(g)+" at "+(s.via.back((function(e){e.get&&l.push(e.get)}),l=[])||l.join("."))+"."+(h.path||[]).join("."));for(var b=s.seen||(s.seen=[]),y=b.length;y--;)if(g===(l=b[y]).it){t=g=l.link;break}}if(o&&t)p.node=c(p.node,o,d,g);else{if(!s.seen)return void i.err(s,"Data at root of graph must be a node (an object).");s.seen.push(a={it:g,link:{},todo:f?[]:Object.keys(g).sort().reverse(),path:(h.path||[]).slice(),up:p}),p.node=c(p.node,o,d,a.link),!f&&a.todo.length&&h.push(a);var m=s.seen.length;function v(e,t){var r=a.link["#"];t&&(t.off(),t.rid(e));var i=r||e.soul||(l=(e.$$||e.$)._||"").soul||l.link||((l=l.put||"")._||"")["#"]||l["#"]||((l=e.put||"")&&e.$$?l["#"]:(l["="]||l[":"]||"")["#"]);!r&&n(s,e.$),i||p.link["#"]?(i||(i=[],(e.$$||e.$).back((function(e){if(l=e.soul||e.link)return i.push(l);i.push(e.get)})),i=i.reverse().join("/")),a.link["#"]=i,!f&&(((s.graph||(s.graph={}))[i]=a.node||(a.node={_:{}}))._["#"]=i),delete s.wait[m],a.wait&&setTimeout.each(a.wait,(function(e){e&&e()})),s.ran(s)):(p.wait||(p.wait=[])).push((function(){v(e,t)}))}(s.wait||(s.wait={}))[m]="",l=(a.ref=f?g:o?p.ref.get(o):p.ref)._,(l=g&&(g._||"")["#"]||l.soul||l.link)?v({soul:l}):a.ref.get(v,{run:s.run,v2020:1,out:{get:{".":" "}}})}if(!h.length)return s.ran(s);s.turn(e)}(),l):(function(e){var t,r=e.via._;e.via=e.via.back((function(r){if(r.soul||!r.get)return r.$;t=e.data,(e.data={})[r.get]=t})),e.via&&e.via._.soul||(e.via=r.root.$.get(((e.data||"")._||"")["#"]||r.$.back("opt.uuid")())),e.via.put(e.data,e.ack,e)}(s),l)},i.end=function(e,t){e.end=s,e.the.to===e&&e===e.the.last&&delete t.stun,e.off()},i.err=function(e,t){(e.ack||s).call(e,e.out={err:e.err=r.log(t)}),e.ran(e)};var o,s=function(){},a=setTimeout.turn,u=r.valid,c=r.state.ify}))(t,"./put"),t((function(e){var r=t("./root");t("./chain"),t("./back"),t("./put"),t("./get"),e.exports=r}))(t,"./index"),t((function(e){var r,n=t("./index");n.chain.on=function(e,t,r,n){var i,o=this,s=o._;if(s.root,"string"==typeof e)return t?(i=s.on(e,t,r||s,n),r&&r.$&&(r.subs||(r.subs=[])).push(i),o):s.on(e);var a=t;return(a=!0===a?{change:!0}:a||{}).not=1,a.on=1,o.get(e,a),o},n.chain.once=function(e,t){if(t=t||{},!e)return function(e,t,r){return n.log.once("valonce","Chainable val is experimental, its behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),(r=e.chain())._.nix=e.once((function(e,t){r._.on("in",this._)})),r._.lex=e._.lex,r}(this);var i,o=this,s=o._,a=s.root,u=(s.put,String.random(7));return o.get((function(o,c,l,f){var h=this,d=h._,p=d.one||(d.one={});function g(b){d.has||d.soul||(d={put:o,get:c}),r===(i=d.put)&&(i=((l.$$||"")._||"").put),"string"!=typeof n.valid(i)||(i=a.$.get(i)._.put)!==r||b?f.stun||""!==p[u]&&(p[u]="",(s.soul||s.has)&&f.off(),e.call(h,i,d.get),clearTimeout(p[u])):p[u]=setTimeout((function(){g(1)}),t.wait||99)}f.stun||""!==p[u]&&(!0!==(i=n.valid(o))?"string"!=typeof i&&(clearTimeout((s.one||"")[u]),clearTimeout(p[u]),p[u]=setTimeout(g,t.wait||99)):g())}),{on:1}),o},n.chain.off=function(){var e,t=this._,r=t.back;if(r)return t.ack=0,(e=r.next)&&e[t.get]&&delete e[t.get],(e=r.any)&&(delete r.any,r.any={}),(e=r.ask)&&delete e[t.get],(e=r.put)&&delete e[t.get],(e=t.soul)&&delete r.root.graph[e],(e=t.map)&&Object.keys(e).forEach((function(t,n){(n=e[t]).link&&r.root.$.get(n.link).off()})),(e=t.next)&&Object.keys(e).forEach((function(t,r){e[t].$.off()})),t.on("off",{}),this}}))(t,"./on"),t((function(e){var r=t("./index"),n=r.chain.get.next;function i(e){this.to.next(e);var t,n=this.as,i=e.$._,o=e.put;(i.soul||e.$$)&&((t=n.lex)&&!String.match(e.get||(o||"")["."],t["."]||t["#"]||t)||r.on.link(e,n))}r.chain.get.next=function(e,t){var r;return Object.plain(t)?(r=((r=t["#"])||"")["="]||r)?e.get(r):((r=e.chain()._).lex=t,e.on("in",(function(e){String.match(e.get||(e.put||"")["."],t["."]||t["#"]||t)&&r.on("in",e),this.to.next(e)})),r.$):(n||s)(e,t)},r.chain.map=function(e,t,n){var a,u,c=this,l=c._;return Object.plain(e)&&(a=e["."]?e:{".":e},e=o),e?(r.log.once("mapfn","Map functions are experimental, their behavior and API may change moving forward. Please play with it and report bugs and ideas on how to improve it."),u=c.chain(),c.map().on((function(t,n,i,a){var c=(e||s).call(this,t,n,i,a);if(o!==c){if(t===c)return u._.on("in",i);if(r.is(c))return u._.on("in",c._);var l={};Object.keys(i.put).forEach((function(e){l[e]=i.put[e]}),l),l["="]=c,u._.on("in",{get:n,put:l})}})),u):((u=l.each)||((l.each=u=c.chain())._.lex=a||u._.lex||l.lex,u._.nix=c.back("nix"),c.on("in",i,u._)),u)};var o,s=function(){}}))(t,"./map"),t((function(e){var r=t("./index");r.chain.set=function(e,t,n){var i,o,s=this,a=s.back(-1);return t=t||function(){},(n=n||{}).item=n.item||e,(i=((e||"")._||"")["#"])&&((e={})["#"]=i),"string"==typeof(o=r.valid(e))?s.get(i=o).put(e,t,n):r.is(e)?(s.put((function(n){e.get((function(e,i,a){if(!e)return t.call(s,{err:r.log('Only a node can be linked! Not "'+a.put+'"!')});(o={})[e]={"#":e},n(o)}),!0)})),e):(Object.plain(e)&&(e=a.get(i=s.back("opt.uuid")()).put(e)),s.get(i||a.back("opt.uuid")(7)).put(e,t,n))}}))(t,"./set"),t((function(e){t("./shim");var r,n=function(){},i=JSON.parseAsync||function(e,t,r){var n=+new Date;try{t(void 0,JSON.parse(e,r),o.sucks(+new Date-n))}catch(e){t(e)}},o=JSON.stringifyAsync||function(e,t,r,n){var i=+new Date;try{t(void 0,JSON.stringify(e,r,n),o.sucks(+new Date-i))}catch(e){t(e)}};o.sucks=function(e){e>99&&(console.log("Warning: JSON blocking CPU detected. Add `gun/lib/yson.js` to fix."),o.sucks=n)};try{e.exports=function(e){var t=function(){},n=e.opt||{};n.log=n.log||console.log,n.gap=n.gap||n.wait||0,n.max=n.max||.3*(n.memory?999*n.memory*999:3e8),n.pack=n.pack||.01*n.max*.01,n.puff=n.puff||9;var s=setTimeout.turn||setTimeout,a=e.dup,u=a.check,c=a.track,l=(new Date,t.hear=function(e,r){if(e){if(n.max<=e.length)return t.say({dam:"!",err:"Message too big!"},r);t===this&&(l.d+=e.length||0,++l.c);var o,a=r.SH=+new Date,u=e[0];return"["===u?(i(e,(function(e,i){if(e||!i)return t.say({dam:"!",err:"DAM JSON parse error."},r);console.STAT&&console.STAT(+new Date,i.length,"# on hear batch");var o=n.puff;!function e(){for(var n,a=+new Date,u=0;u<o&&(n=i[u++]);)t.hear(n,r);i=i.slice(u),console.STAT&&console.STAT(a,+new Date-a,"hear loop"),f(r),i.length&&s(e,0)}()})),void(e="")):"{"===u||(e["#"]||Object.plain(e))&&(o=e)?o?l.one(o,r,a):void i(e,(function(e,n){if(e||!n)return t.say({dam:"!",err:"DAM JSON parse error."},r);l.one(n,r,a)})):void 0}});function f(e){var t=e.batch,r="string"==typeof t;if(r&&(t+="]"),e.batch=e.tail=null,t&&!(r?3>t.length:!t.length)){if(!r)try{t=1===t.length?t[0]:JSON.stringify(t)}catch(e){return n.log("DAM JSON stringify error",e)}t&&h(t,e)}}function h(e,r){try{var n=r.wire;r.say?r.say(e):n.send&&n.send(e),t.say.d+=e.length||0,++t.say.c}catch(t){(r.queue=r.queue||[]).push(e)}}l.one=function(r,n,i){var o,s,l,f,h;if(r.DBG&&(r.DBG=h={DBG:r.DBG}),h&&(h.h=i),h&&(h.hp=+new Date),(o=r["#"])||(o=r["#"]=String.random(9)),!((l=u(o))||(s=r["##"])&&(l=r["@"]||r.get&&o)&&a.check(f=l+s))){if((r._=function(){}).via=t.leap=n,(l=r["><"])&&"string"==typeof l&&l.slice(0,99).split(",").forEach((function(e){this[e]=1}),r._.yo={}),l=r.dam)return(l=t.hear[l])&&l(r,n,e),void c(o);(l=r.ok)&&(r._.near=l["/"]),i=+new Date,h&&(h.is=i),n.SI=o,c.ed=function(e){o===e&&(c.ed=0,(e=a.s[o])&&(e.via=n,r.get&&(e.it=r)))},e.on("in",t.last=r),h&&(h.hd=+new Date),console.STAT&&console.STAT(i,+new Date-i,r.get?"msg get":r.put?"msg put":"msg"),c(o),f&&c(f),t.leap=t.last=null}},l.c=l.d=0,function(){var e,i=0;function l(e,t){var r;return t instanceof Object?(Object.keys(t).sort().forEach(d,{to:r={},on:t}),r):t}function d(e){this.to[e]=this.on[e]}t.hash=function(e,r){var n,i,a,u=+new Date;o(e.put,(function o(c,l){var f=(i||(i=a=l||"")).slice(0,32768);n=String.hash(f,n),(i=i.slice(32768))?s(o,0):(console.STAT&&console.STAT(u,+new Date-u,"say json+hash"),e._.$put=a,e["##"]=n,t.say(e,r),delete e._.$put)}),l)},(t.say=function(o,u){var l;if((l=this)&&(l=l.to)&&l.next&&l.next(o),!o)return!1;var d,p,g,b=o["@"],y=o._||(o._=function(){}),m=o.DBG,v=+new Date;if(y.y=y.y||v,u||m&&(m.y=v),(d=o["#"])||(d=o["#"]=String.random(9)),!e&&c(d),(p=o["##"])||r===o.put||y.via||!b){if(!u&&b&&(u=(l=a.s[b])&&(l.via||(l=l.it)&&(l=l._)&&l.via)||(l=t.last)&&b===l["#"]&&t.leap),!u&&b){if(a.s[b])return;return console.STAT&&console.STAT(+new Date,++i,"total no peer to ack to"),!1}if(b&&!o.put&&!p&&((a.s[b]||"").it||"")["##"])return!1;if(!u&&t.way)return t.way(o);if(m&&(m.yh=+new Date),g=y.raw){if(m&&(m.yr=+new Date),!u||!u.id){if(!Object.plain(u||n.peers))return!1;v=+new Date,n.puff;var w=n.peers,E=Object.keys(u||n.peers||{});return console.STAT&&console.STAT(v,+new Date-v,"peer keys"),void function r(){var n=+new Date;e=1;var i=y.raw;y.raw=g;for(var a,l=0;l<9&&(a=(E||"")[l++]);)(a=w[a]||(u||"")[a])&&t.say(o,a);y.raw=i,e=0,E=E.slice(l),console.STAT&&console.STAT(n,+new Date-n,"say loop"),E.length&&(s(r,0),b&&c(b))}()}if(!u.wire&&t.wire&&t.wire(u),d!==u.last){if(u.last=d,u===y.via)return!1;if((l=y.yo)&&(l[u.url]||l[u.pid]||l[u.id]))return!1;if(console.STAT&&console.STAT(v,((m||y).yp=+new Date)-(y.y||v),"say prep"),!e&&b&&c(b),u.batch){if(u.tail=(l=u.tail||0)+g.length,u.tail<=n.pack)return void(u.batch+=(l?",":"")+g);f(u)}u.batch="[";var A=+new Date;setTimeout((function(){console.STAT&&console.STAT(A,+new Date-A,"0ms TO"),f(u)}),n.gap),h(g,u),console.STAT&&b===u.SI&&console.STAT(v,+new Date-u.SH,"say ack")}}else t.raw(o,u)}else t.hash(o,u)}).c=t.say.d=0,t.raw=function(e,i){if(!e)return"";var s,c,l=e._||{};if(c=l.raw)return c;if("string"==typeof e)return e;var f=e["##"],h=e["@"];if(f&&h){if(!l.via&&u(h+f))return!1;if(c=(a.s[h]||"").it){if(f===c["##"])return!1;c["##"]||(c["##"]=f)}}if(!e.dam&&!e["@"]){var d=0,p=[];for(var g in c=n.peers){var b=c[g];if(p.push(b.url||b.pid||b.id),++d>6)break}d>1&&(e["><"]=p.join())}if(e.put&&(c=e.ok)&&(e.ok={"@":(c["@"]||1)-1,"/":c["/"]==e._.near?t.near:c["/"]}),s=l.$put)return c={},Object.keys(e).forEach((function(t){c[t]=e[t]})),c.put=":])([:",void o(c,(function(e,t){if(!e){var n=+new Date;c=t.indexOf('"put":":])([:"'),y(r,t=t.slice(0,c+6)+s+t.slice(c+14)),console.STAT&&console.STAT(n,+new Date-n,"say slice")}}));function y(r,n){r||(l.raw=n,t.say(e,i))}o(e,y)}}(),t.near=0,t.hi=function(r){var i;r.wire?(r.id?n.peers[r.url||r.id]=r:(i=r.id=r.id||r.url||String.random(9),t.say({dam:"?",pid:e.opt.pid},n.peers[i]=r),delete a.s[r.last]),r.met||(t.near++,r.met=+new Date,e.on("hi",r)),i=r.queue,r.queue=[],setTimeout.each(i||[],(function(e){h(e,r)}),0,9)):t.wire(r.length&&{url:r,id:r}||r)},t.bye=function(r){r.met&&--t.near,delete r.met,e.on("bye",r);var n=+new Date;n-=r.met||n,t.bye.time=((t.bye.time||n)+n)/2},t.hear["!"]=function(e,t){n.log("Error:",e.err)},t.hear["?"]=function(e,r){e.pid&&(r.pid||(r.pid=e.pid),e["@"])||(t.say({dam:"?",pid:n.pid,"@":e["#"]},r),delete a.s[r.last])},t.hear.mob=function(e,r){if(e.peers){var n=Object.keys(e.peers),i=n[Math.random()*n.length|0];i&&(t.bye(r),t.hi(i))}},e.on("create",(function(e){e.opt.pid=e.opt.pid||String.random(9),this.to.next(e),e.on("out",t.say)})),e.on("bye",(function(e,t){e=n.peers[e.id||e]||e,this.to.next(e),e.bye?e.bye():(t=e.wire)&&t.close&&t.close(),delete n.peers[e.id],e.wire=null}));var d={};return e.on("bye",(function(e,r){this.to.next(e),(r=console.STAT)&&(r.peers=t.near),(r=e.url)&&(d[r]=!0,setTimeout((function(){delete d[r]}),n.lack||9e3))})),e.on("hi",(function(r,i){if(this.to.next(r),(i=console.STAT)&&(i.peers=t.near),!n.super){var o=Object.keys(e.next||"");o.length>9999&&!console.SUBS&&console.log(console.SUBS="Warning: You have more than 10K live GETs, which might use more bandwidth than your screen can show - consider `.off()`."),setTimeout.each(o,(function(i){var o=e.next[i];n.super||(o.ask||"")[""]?t.say({get:{"#":i}},r):setTimeout.each(Object.keys(o.ask||""),(function(n){n&&t.say({"##":String.hash((e.graph[i]||"")[n]),get:{"#":i,".":n}},r)}))}))}})),t}}catch(e){}}))(t,"./mesh"),t((function(e){var r=t("./index");r.Mesh=t("./mesh"),r.on("opt",(function(e){if(this.to.next(e),!e.once){var t=e.opt;if(!1!==t.WebSocket){var n=r.window||{},i=t.WebSocket||n.WebSocket||n.webkitWebSocket||n.mozWebSocket;if(i){t.WebSocket=i;var o=t.mesh=t.mesh||r.Mesh(e);o.wire||t.wire,o.wire=t.wire=u,setTimeout((function(){!t.super&&e.on("out",{dam:"hi"})}),1);var s=1998,a=""+void 0!=typeof document&&document}}}function u(e){try{if(!e||!e.url)return n&&n(e);var r=e.url.replace(/^http/,"ws"),n=e.wire=new t.WebSocket(r);return n.onclose=function(){c(e),t.mesh.bye(e)},n.onerror=function(t){c(e)},n.onopen=function(){t.mesh.hi(e)},n.onmessage=function(r){r&&t.mesh.hear(r.data||r,e)},n}catch(r){t.mesh.bye(e)}}function c(e){clearTimeout(e.defer),t.peers[e.url]&&(a&&e.retry<=0||(e.retry=(e.retry||t.retry+1||60)-(-e.tried+(e.tried=+new Date)<4*s?1:0),e.defer=setTimeout((function t(){if(a&&a.hidden)return setTimeout(t,s);u(e)}),s)))}}))}))(t,"./websocket"),t((function(e){if("undefined"!=typeof Gun){var t;try{t=(Gun.window||function(){}).localStorage}catch(e){}t||(Gun.log("Warning: No localStorage exists to persist data to!"),t={setItem:function(e,t){this[e]=t},removeItem:function(e){delete this[e]},getItem:function(e){return this[e]}}),JSON.parseAsync;var r=JSON.stringifyAsync||function(e,t,r,n){try{t(void 0,JSON.stringify(e,r,n))}catch(e){t(e)}};Gun.on("create",(function e(n){this.to.next(n);var i,o,s,a,u=n.opt,c=(n.graph,[]);if(!1!==u.localStorage){u.prefix=u.file||"gun/";try{i=e[u.prefix]=e[u.prefix]||JSON.parse(s=t.getItem(u.prefix))||{}}catch(t){i=e[u.prefix]={}}s=(s||"").length,n.on("get",(function(e){this.to.next(e);var t,r,n,o=e.get;o&&(t=o["#"])&&((r=i[t]||void 0)&&(n=o["."])&&!Object.plain(n)&&(r=Gun.state.ify({},n,Gun.state.is(r,n),r[n],t)),Gun.on.get.ack(e,r))})),n.on("put",(function(e){this.to.next(e);var t=e.put,r=t["#"],u=t["."],f=e["#"],h=e.ok||"";i[r]=Gun.state.ify(i[r],u,t[">"],t[":"],r),a&&s>4999880?n.on("in",{"@":f,err:"localStorage max!"}):(e["@"]||e._.via&&!(Math.random()<h["@"]/h["/"])||c.push(f),o||(o=setTimeout(l,9+s/333)))}))}function l(){if(c.length||!((setTimeout.turn||"").s||"").length){var e=c;clearTimeout(o),o=!1,c=[],r(i,(function(r,o){try{!r&&t.setItem(u.prefix,o)}catch(e){r=a=e||"localStorage failure"}r&&(Gun.log(r+" Consider using GUN's IndexedDB plugin for RAD for more storage space, https://gun.eco/docs/RAD#install"),n.on("localStorage:error",{err:r,get:u.prefix,put:i})),s=o.length,setTimeout.each(e,(function(e){n.on("in",{"@":e,err:r,ok:0})}),0,99)}))}else setTimeout(l,99)}}))}}))(t,"./localStorage")}(),function(){if(""+A!=typeof Gun){var e=function(e){console.warn("Warning! Deprecated internal utility will break in next version:",e)},t=Gun;t.fn=t.fn||{is:function(t){return e("fn"),!!t&&"function"==typeof t}},t.bi=t.bi||{is:function(t){return e("bi"),t instanceof Boolean||"boolean"==typeof t}},t.num=t.num||{is:function(t){return e("num"),!n(t)&&(t-parseFloat(t)+1>=0||1/0===t||-1/0===t)}},t.text=t.text||{is:function(t){return e("text"),"string"==typeof t}},t.text.ify=t.text.ify||function(r){return e("text.ify"),t.text.is(r)?r:"undefined"!=typeof JSON?JSON.stringify(r):r&&r.toString?r.toString():r},t.text.random=t.text.random||function(t,r){e("text.random");var n="";for(t=t||24,r=r||"0123456789ABCDEFGHIJKLMNOPQRSTUVWXZabcdefghijklmnopqrstuvwxyz";t>0;)n+=r.charAt(Math.floor(Math.random()*r.length)),t--;return n},t.text.match=t.text.match||function(t,r){var n,i;return e("text.match"),"string"==typeof t&&("string"==typeof r&&(r={"=":r}),t===(n=(r=r||{})["="]||r["*"]||r[">"]||r["<"])||i===r["="]&&(n=r["*"]||r[">"]||r["<"],t.slice(0,(n||"").length)===n||i===r["*"]&&(i!==r[">"]&&i!==r["<"]?t>=r[">"]&&t<=r["<"]:i!==r[">"]&&t>=r[">"]||i!==r["<"]&&t<=r["<"])))},t.text.hash=t.text.hash||function(t,r){if(e("text.hash"),"string"==typeof t){if(r=r||0,!t.length)return r;for(var n=0,i=t.length;n<i;++n)r=(r<<5)-r+t.charCodeAt(n),r|=0;return r}},t.list=t.list||{is:function(t){return e("list"),t instanceof Array}},t.list.slit=t.list.slit||Array.prototype.slice,t.list.sort=t.list.sort||function(t){return e("list.sort"),function(e,r){return e&&r?(e=e[t])<(r=r[t])?-1:e>r?1:0:0}},t.list.map=t.list.map||function(t,r,n){return e("list.map"),s(t,r,n)},t.list.index=1,t.obj=t.boj||{is:function(t){return e("obj"),!!t&&(t instanceof Object&&t.constructor===Object||"Object"===Object.prototype.toString.call(t).match(/^\[object (\w+)\]$/)[1])}},t.obj.put=t.obj.put||function(t,r,n){return e("obj.put"),(t||{})[r]=n,t},t.obj.has=t.obj.has||function(t,r){return e("obj.has"),t&&Object.prototype.hasOwnProperty.call(t,r)},t.obj.del=t.obj.del||function(t,r){if(e("obj.del"),t)return t[r]=null,delete t[r],t},t.obj.as=t.obj.as||function(t,r,n,i){return e("obj.as"),t[r]=t[r]||(i===n?{}:n)},t.obj.ify=t.obj.ify||function(t){if(e("obj.ify"),i(t))return t;try{t=JSON.parse(t)}catch(e){t={}}return t},function(){function r(e,t){o(this,t)&&void 0!==this[t]||(this[t]=e)}t.obj.to=t.obj.to||function(t,n){return e("obj.to"),s(t,r,n=n||{}),n}}(),t.obj.copy=t.obj.copy||function(t){return e("obj.copy"),t?JSON.parse(JSON.stringify(t)):t},function(){function r(e,t){var r=this.n;if(!r||!(t===r||i(r)&&o(r,t)))return void 0!==t||void 0}t.obj.empty=t.obj.empty||function(t,n){return e("obj.empty"),!t||!s(t,r,{n})}}(),function(){function r(e,t){if(2===arguments.length)return r.r=r.r||{},void(r.r[e]=t);r.r=r.r||[],r.r.push(e)}var s,a=Object.keys;Object.keys=Object.keys||function(e){return s(e,(function(e,t,r){r(t)}))},t.obj.map=s=t.obj.map||function(s,u,c){e("obj.map");var l,f,h,d,p,g=0,b="function"==typeof u;if(r.r=l,a&&i(s)&&(d=a(s),p=!0),c=c||{},n(s)||d)for(f=(d||s).length;g<f;g++){var y=g+t.list.index;if(b){if((h=p?u.call(c,s[d[g]],d[g],r):u.call(c,s[g],y,r))!==l)return h}else if(u===s[p?d[g]:g])return d?d[g]:y}else for(g in s)if(b){if(o(s,g)&&(h=c?u.call(c,s[g],g,r):u(s[g],g,r))!==l)return h}else if(u===s[g])return g;return b?r.r:t.list.index?0:-1}}(),t.time=t.time||{},t.time.is=t.time.is||function(t){return e("time"),t?t instanceof Date:+(new Date).getTime()};var r=t.fn.is,n=t.list.is,i=(E=t.obj).is,o=E.has,s=E.map,a={is:function(t){return e("val.is"),t!==A&&(null===t||t!==1/0&&(!!(f(t)||c(t)||l(t))||a.link.is(t)||!1))}};a.link=a.rel={_:"#"},function(){function t(e,t){var r=this;return r.id?r.id=!1:t==u&&f(e)?void(r.id=e):r.id=!1}a.link.is=function(r){if(e("val.link.is"),r&&r[u]&&!r._&&i(r)){var n={};if(s(r,t,n),n.id)return n.id}return!1}}(),a.link.ify=function(t){return e("val.link.ify"),h({},u,t)},t.obj.has._=".";var u=a.link._,c=t.bi.is,l=t.num.is,f=t.text.is,h=(i=(E=t.obj).is,E.put);s=E.map,t.val=t.val||a;var d={_:"_",soul:function(t,r){return e("node.soul"),t&&t._&&t._[r||b]}};d.soul.ify=function(t,r){return e("node.soul.ify"),r="string"==typeof r?{soul:r}:r||{},(t=t||{})._=t._||{},t._[b]=r.soul||t._[b]||g(),t},d.soul._=a.link._,function(){function t(e,t){if(t!==d._)return!a.is(e)||void(this.cb&&this.cb.call(this.as,e,t,this.n,this.s))}d.is=function(r,n,o){var a;return e("node.is"),!!i(r)&&!!(a=d.soul(r))&&!s(r,t,{as:o,cb:n,s:a,n:r})}}(),function(){function t(e,t){var r,n=this.o;n.map?void 0===(r=n.map.call(this.as,e,""+t,n.node))?p(n.node,t):n.node&&(n.node[t]=r):a.is(e)&&(n.node[t]=e)}d.ify=function(r,n,i){return e("node.ify"),n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n={map:n}):n={},n.map&&(n.node=n.map.call(i,r,A,n.node||{})),(n.node=d.soul.ify(n.node||{},n))&&s(r,t,{o:n,as:i}),n.node}}(),i=(E=t.obj).is;var p=E.del,g=(s=E.map,t.text.random),b=d.soul._;t.node=t.node||d;var y=t.state;y.lex=function(){return e("state.lex"),y().toString(36).replace(".","")},y.to=function(t,r,n){e("state.to");var o=(t||{})[r];return i(o)&&(o=m(o)),y.ify(n,r,y.is(t,r),o,d.soul(t))},function(){function t(e,t){v!==t&&y.ify(this.o,t,this.s)}y.map=function(n,a,u){var c;e("state.map");var f=i(f=n||a)?f:null;return n=r(n=n||a)?n:null,f&&!n?(a=l(a)?a:y(),f[v]=f[v]||{},s(f,t,{o:f,s:a}),f):(u=u||i(a)?a:c,a=l(a)?a:y(),function(e,r,i,s){if(!n)return t.call({o:i,s:a},e,r),e;n.call(u||this||{},e,r,i,s),o(i,r)&&c===i[r]||t.call({o:i,s:a},e,r)})}}(),(E=t.obj).as,o=E.has,i=E.is,s=E.map;var m=E.copy,v=(l=t.num.is,r=t.fn.is,d._),w={};!function(){function t(e,t){if(!e||t!==d.soul(e)||!d.is(e,this.fn,this.as))return!0;this.cb&&(r.n=e,r.as=this.as,this.cb.call(r.as,e,t,r))}function r(e){e&&d.is(r.n,e,r.as)}w.is=function(r,n,o,a){return e("graph.is"),!(!r||!i(r)||_(r)||s(r,t,{cb:n,fn:o,as:a}))}}(),function(){function r(e,t){var r;return(r=function(e,t){for(var r,n=e.seen,i=n.length;i--;)if(r=n[i],t.obj===r.obj)return r;n.push(t)}(e,t))?r:(t.env=e,t.soul=s,d.ify(t.obj,n,t)&&(t.link=t.link||a.link.ify(d.soul(t.node)),t.obj!==e.shell&&(e.graph[a.link.is(t.link)]=t.node)),t)}function n(e,t,n){var i,s,c=this,l=c.env;if(d._===t&&o(e,a.link._))return n._;if(i=u(e,t,n,c,l)){if(t||(c.node=c.node||n||{},o(e,d._)&&d.soul(e)&&(c.node._=m(e._)),c.node=d.soul.ify(c.node,a.link.is(c.link)),c.link=c.link||a.link.ify(d.soul(c.node))),(s=l.map)&&(s.call(l.as||{},e,t,n,c),o(n,t))){if(e=n[t],A===e)return void p(n,t);if(!(i=u(e,t,n,c,l)))return}if(!t)return c.node;if(!0===i)return e;if((s=r(l,{obj:e,path:c.path.concat(t)})).node)return s.link}}function s(e){var t=this,r=a.link.is(t.link),n=t.env.graph;t.link=t.link||a.link.ify(e),t.link[a.link._]=e,t.node&&t.node[d._]&&(t.node[d._][a.link._]=e),o(n,r)&&(n[e]=n[r],p(n,r))}function u(e,r,n,o,s){var c;return!!a.is(e)||(i(e)?1:(c=s.invalid)?u(e=c.call(s.as||{},e,r,n),r,n,o,s):(s.err="Invalid value at '"+o.path.concat(r).join(".")+"'!",void(t.list.is(e)&&(s.err+=" Use `.set(item)` instead of an Array."))))}w.ify=function(t,n,i){e("graph.ify");var o={path:[],obj:t};return n?"string"==typeof n?n={soul:n}:"function"==typeof n&&(n.map=n):n={},"string"==typeof i&&(n.soul=n.soul||i,i=A),n.soul&&(o.link=a.link.ify(n.soul)),n.shell=(i||{}).shell,n.graph=n.graph||{},n.seen=n.seen||[],n.as=n.as||i,r(n,o),n.root=o.node,n.graph}}(),w.node=function(t){e("graph.node");var r=d.soul(t);if(r)return h({},r,t)},function(){function t(e,t){var r,n;if(d._!==t)(r=a.link.is(e))?(n=this.opt.seen[r])?this.obj[t]=n:this.obj[t]=this.opt.seen[r]=w.to(this.graph,r,this.opt):this.obj[t]=e;else{if(_(e,a.link._))return;this.obj[t]=m(e)}}w.to=function(r,n,i){if(e("graph.to"),r){var o={};return i=i||{seen:{}},s(r[n],t,{obj:o,graph:r,opt:i}),o}}}(),r=t.fn.is,i=(E=t.obj).is,p=E.del,o=E.has;var E,A,_=E.empty;h=E.put,s=E.map,m=E.copy,t.graph=t.graph||w}}()},54830:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.arrRemove=void 0,t.arrRemove=function(e,t){if(e){var r=e.indexOf(t);0<=r&&e.splice(r,1)}}},55157:e=>{e.exports=function(){throw new Error("Readable.from is not available in the browser")}},55264:(e,t,r)=>{var n=r(92861).Buffer;function i(e,t,r){for(var n,i,s=-1,a=0;++s<8;)n=t&1<<7-s?128:0,a+=(128&(i=e._cipher.encryptBlock(e._prev)[0]^n))>>s%8,e._prev=o(e._prev,r?n:i);return a}function o(e,t){var r=e.length,i=-1,o=n.allocUnsafe(e.length);for(e=n.concat([e,n.from([t])]);++i<r;)o[i]=e[i]<<1|e[i+1]>>7;return o}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},55440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.single=void 0;var n=r(59328),i=r(94708),o=r(23506),s=r(65212),a=r(17214);t.single=function(e){return s.operate((function(t,r){var s,u=!1,c=!1,l=0;t.subscribe(a.createOperatorSubscriber(r,(function(n){c=!0,e&&!e(n,l++,t)||(u&&r.error(new i.SequenceError("Too many matching values")),u=!0,s=n)}),(function(){u?(r.next(s),r.complete()):r.error(c?new o.NotFoundError("No matching values"):new n.EmptyError)})))}))}},55715:(e,t,r)=>{"use strict";e.exports=r(62951)},55736:e=>{function t(e){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}t.keys=()=>[],t.resolve=t,t.id=55736,e.exports=t},56131:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeat=void 0;var n=r(44885),i=r(65212),o=r(17214),s=r(19724),a=r(5825);t.repeat=function(e){var t,r,u=1/0;return null!=e&&("object"==typeof e?(t=e.count,u=void 0===t?1/0:t,r=e.delay):u=e),u<=0?function(){return n.EMPTY}:i.operate((function(e,t){var n,i=0,c=function(){if(null==n||n.unsubscribe(),n=null,null!=r){var e="number"==typeof r?a.timer(r):s.innerFrom(r(i)),u=o.createOperatorSubscriber(t,(function(){u.unsubscribe(),l()}));e.subscribe(u)}else l()},l=function(){var r=!1;n=e.subscribe(o.createOperatorSubscriber(t,void 0,(function(){++i<u?n?c():r=!0:t.complete()}))),r&&c()};l()}))}},56168:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(88310).Transform,o=r(83141).I;function s(e){i.call(this),this.hashMode="string"==typeof e,this.hashMode?this[e]=this._finalOrDigest:this.final=this._finalOrDigest,this._final&&(this.__final=this._final,this._final=null),this._decoder=null,this._encoding=null}r(56698)(s,i);var a="undefined"!=typeof Uint8Array,u="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&ArrayBuffer.isView&&(n.prototype instanceof Uint8Array||n.TYPED_ARRAY_SUPPORT);s.prototype.update=function(e,t,r){var i=function(e,t){if(e instanceof n)return e;if("string"==typeof e)return n.from(e,t);if(u&&ArrayBuffer.isView(e)){if(0===e.byteLength)return n.alloc(0);var r=n.from(e.buffer,e.byteOffset,e.byteLength);if(r.byteLength===e.byteLength)return r}if(a&&e instanceof Uint8Array)return n.from(e);if(n.isBuffer(e)&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))return n.from(e);throw new TypeError('The "data" argument must be of type string or an instance of Buffer, TypedArray, or DataView.')}(e,t),o=this._update(i);return this.hashMode?this:(r&&(o=this._toString(o,r)),o)},s.prototype.setAutoPadding=function(){},s.prototype.getAuthTag=function(){throw new Error("trying to get auth tag in unsupported state")},s.prototype.setAuthTag=function(){throw new Error("trying to set auth tag in unsupported state")},s.prototype.setAAD=function(){throw new Error("trying to set aad in unsupported state")},s.prototype._transform=function(e,t,r){var n;try{this.hashMode?this._update(e):this.push(this._update(e))}catch(e){n=e}finally{r(n)}},s.prototype._flush=function(e){var t;try{this.push(this.__final())}catch(e){t=e}e(t)},s.prototype._finalOrDigest=function(e){var t=this.__final()||n.alloc(0);return e&&(t=this._toString(t,e,!0)),t},s.prototype._toString=function(e,t,r){if(this._decoder||(this._decoder=new o(t),this._encoding=t),this._encoding!==t)throw new Error("can’t switch encodings");var n=this._decoder.write(e);return r&&(n+=this._decoder.end()),n},e.exports=s},56606:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bufferWhen=void 0;var n=r(65212),i=r(5717),o=r(17214),s=r(19724);t.bufferWhen=function(e){return n.operate((function(t,r){var n=null,a=null,u=function(){null==a||a.unsubscribe();var t=n;n=[],t&&r.next(t),s.innerFrom(e()).subscribe(a=o.createOperatorSubscriber(r,u,i.noop))};u(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==n?void 0:n.push(e)}),(function(){n&&r.next(n),r.complete()}),void 0,(function(){return n=a=null})))}))}},56698:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},57406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(14120),i=r(85934),o=r(19724);t.partition=function(e,t,r){return[i.filter(t,r)(o.innerFrom(e)),i.filter(n.not(t,r))(o.innerFrom(e))]}},57447:(e,t,r)=>{"use strict";var n=r(39404),i=r(32723),o=r(47011),s=r(60480),a=r(15037),u=o.assert,c=r(61200),l=r(28545);function f(e){if(!(this instanceof f))return new f(e);"string"==typeof e&&(u(Object.prototype.hasOwnProperty.call(s,e),"Unknown curve "+e),e=s[e]),e instanceof s.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}e.exports=f,f.prototype.keyPair=function(e){return new c(this,e)},f.prototype.keyFromPrivate=function(e,t){return c.fromPrivate(this,e,t)},f.prototype.keyFromPublic=function(e,t){return c.fromPublic(this,e,t)},f.prototype.genKeyPair=function(e){e||(e={});for(var t=new i({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||a(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),o=this.n.sub(new n(2));;){var s=new n(t.generate(r));if(!(s.cmp(o)>0))return s.iaddn(1),this.keyFromPrivate(s)}},f.prototype._truncateToN=function(e,t,r){var i;if(n.isBN(e)||"number"==typeof e)i=(e=new n(e,16)).byteLength();else if("object"==typeof e)i=e.length,e=new n(e,16);else{var o=e.toString();i=o.length+1>>>1,e=new n(o,16)}"number"!=typeof r&&(r=8*i);var s=r-this.n.bitLength();return s>0&&(e=e.ushrn(s)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},f.prototype.sign=function(e,t,r,o){if("object"==typeof r&&(o=r,r=null),o||(o={}),"string"!=typeof e&&"number"!=typeof e&&!n.isBN(e)){u("object"==typeof e&&e&&"number"==typeof e.length,"Expected message to be an array-like, a hex string, or a BN instance"),u(e.length>>>0===e.length);for(var s=0;s<e.length;s++)u((255&e[s])===e[s])}t=this.keyFromPrivate(t,r),e=this._truncateToN(e,!1,o.msgBitLength),u(!e.isNeg(),"Can not sign a negative message");var a=this.n.byteLength(),c=t.getPrivate().toArray("be",a),f=e.toArray("be",a);u(new n(f).eq(e),"Can not sign message");for(var h=new i({hash:this.hash,entropy:c,nonce:f,pers:o.pers,persEnc:o.persEnc||"utf8"}),d=this.n.sub(new n(1)),p=0;;p++){var g=o.k?o.k(p):new n(h.generate(this.n.byteLength()));if(!((g=this._truncateToN(g,!0)).cmpn(1)<=0||g.cmp(d)>=0)){var b=this.g.mul(g);if(!b.isInfinity()){var y=b.getX(),m=y.umod(this.n);if(0!==m.cmpn(0)){var v=g.invm(this.n).mul(m.mul(t.getPrivate()).iadd(e));if(0!==(v=v.umod(this.n)).cmpn(0)){var w=(b.getY().isOdd()?1:0)|(0!==y.cmp(m)?2:0);return o.canonical&&v.cmp(this.nh)>0&&(v=this.n.sub(v),w^=1),new l({r:m,s:v,recoveryParam:w})}}}}}},f.prototype.verify=function(e,t,r,n,i){i||(i={}),e=this._truncateToN(e,!1,i.msgBitLength),r=this.keyFromPublic(r,n);var o=(t=new l(t,"hex")).r,s=t.s;if(o.cmpn(1)<0||o.cmp(this.n)>=0)return!1;if(s.cmpn(1)<0||s.cmp(this.n)>=0)return!1;var a,u=s.invm(this.n),c=u.mul(e).umod(this.n),f=u.mul(o).umod(this.n);return this.curve._maxwellTrick?!(a=this.g.jmulAdd(c,r.getPublic(),f)).isInfinity()&&a.eqXToP(o):!(a=this.g.mulAdd(c,r.getPublic(),f)).isInfinity()&&0===a.getX().umod(this.n).cmp(o)},f.prototype.recoverPubKey=function(e,t,r,i){u((3&r)===r,"The recovery param is more than two bits"),t=new l(t,i);var o=this.n,s=new n(e),a=t.r,c=t.s,f=1&r,h=r>>1;if(a.cmp(this.curve.p.umod(this.curve.n))>=0&&h)throw new Error("Unable to find sencond key candinate");a=h?this.curve.pointFromX(a.add(this.curve.n),f):this.curve.pointFromX(a,f);var d=t.r.invm(o),p=o.sub(s).mul(d).umod(o),g=c.mul(d).umod(o);return this.g.mulAdd(p,a,g)},f.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new l(t,n)).recoveryParam)return t.recoveryParam;for(var i=0;i<4;i++){var o;try{o=this.recoverPubKey(e,t,i)}catch(e){continue}if(o.eq(r))return i}throw new Error("Unable to find valid recovery factor")}},57698:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Network=void 0;const n=r(77778),i=r(75347),o=r(94491),s=new Map;class a{#Be;#Te;#R;constructor(e,t){this.#Be=e,this.#Te=(0,i.getBigInt)(t),this.#R=new Map}toJSON(){return{name:this.name,chainId:String(this.chainId)}}get name(){return this.#Be}set name(e){this.#Be=e}get chainId(){return this.#Te}set chainId(e){this.#Te=(0,i.getBigInt)(e,"chainId")}matches(e){if(null==e)return!1;if("string"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return this.name===e}if("number"==typeof e||"bigint"==typeof e){try{return this.chainId===(0,i.getBigInt)(e)}catch(e){}return!1}if("object"==typeof e){if(null!=e.chainId){try{return this.chainId===(0,i.getBigInt)(e.chainId)}catch(e){}return!1}return null!=e.name&&this.name===e.name}return!1}get plugins(){return Array.from(this.#R.values())}attachPlugin(e){if(this.#R.get(e.name))throw new Error(`cannot replace existing plugin: ${e.name} `);return this.#R.set(e.name,e.clone()),this}getPlugin(e){return this.#R.get(e)||null}getPlugins(e){return this.plugins.filter((t=>t.name.split("#")[0]===e))}clone(){const e=new a(this.name,this.chainId);return this.plugins.forEach((t=>{e.attachPlugin(t.clone())})),e}computeIntrinsicGas(e){const t=this.getPlugin("org.ethers.plugins.network.GasCost")||new o.GasCostPlugin;let r=t.txBase;if(null==e.to&&(r+=t.txCreate),e.data)for(let n=2;n<e.data.length;n+=2)"00"===e.data.substring(n,n+2)?r+=t.txDataZero:r+=t.txDataNonzero;if(e.accessList){const i=(0,n.accessListify)(e.accessList);for(const e in i)r+=t.txAccessListAddress+t.txAccessListStorageKey*i[e].storageKeys.length}return r}static from(e){if(function(){function e(e,t,r){const n=function(){const n=new a(e,t);return null!=r.ensNetwork&&n.attachPlugin(new o.EnsPlugin(null,r.ensNetwork)),n.attachPlugin(new o.GasCostPlugin),(r.plugins||[]).forEach((e=>{n.attachPlugin(e)})),n};a.register(e,n),a.register(t,n),r.altNames&&r.altNames.forEach((e=>{a.register(e,n)}))}l||(l=!0,e("mainnet",1,{ensNetwork:1,altNames:["homestead"]}),e("ropsten",3,{ensNetwork:3}),e("rinkeby",4,{ensNetwork:4}),e("goerli",5,{ensNetwork:5}),e("kovan",42,{ensNetwork:42}),e("sepolia",11155111,{ensNetwork:11155111}),e("holesky",17e3,{ensNetwork:17e3}),e("classic",61,{}),e("classicKotti",6,{}),e("arbitrum",42161,{ensNetwork:1}),e("arbitrum-goerli",421613,{}),e("arbitrum-sepolia",421614,{}),e("base",8453,{ensNetwork:1}),e("base-goerli",84531,{}),e("base-sepolia",84532,{}),e("bnb",56,{ensNetwork:1}),e("bnbt",97,{}),e("linea",59144,{ensNetwork:1}),e("linea-goerli",59140,{}),e("linea-sepolia",59141,{}),e("matic",137,{ensNetwork:1,plugins:[c("https://gasstation.polygon.technology/v2")]}),e("matic-amoy",80002,{}),e("matic-mumbai",80001,{altNames:["maticMumbai","maticmum"],plugins:[c("https://gasstation-testnet.polygon.technology/v2")]}),e("optimism",10,{ensNetwork:1,plugins:[]}),e("optimism-goerli",420,{}),e("optimism-sepolia",11155420,{}),e("xdai",100,{ensNetwork:1}))}(),null==e)return a.from("mainnet");if("number"==typeof e&&(e=BigInt(e)),"string"==typeof e||"bigint"==typeof e){const t=s.get(e);if(t)return t();if("bigint"==typeof e)return new a("unknown",e);(0,i.assertArgument)(!1,"unknown network","network",e)}if("function"==typeof e.clone)return e.clone();if("object"==typeof e){(0,i.assertArgument)("string"==typeof e.name&&"number"==typeof e.chainId,"invalid network object name or chainId","network",e);const t=new a(e.name,e.chainId);return(e.ensAddress||null!=e.ensNetwork)&&t.attachPlugin(new o.EnsPlugin(e.ensAddress,e.ensNetwork)),t}(0,i.assertArgument)(!1,"invalid network","network",e)}static register(e,t){"number"==typeof e&&(e=BigInt(e));const r=s.get(e);r&&(0,i.assertArgument)(!1,`conflicting network for ${JSON.stringify(r.name)}`,"nameOrChainId",e),s.set(e,t)}}function u(e,t){const r=String(e);if(!r.match(/^[0-9.]+$/))throw new Error(`invalid gwei value: ${e}`);const n=r.split(".");if(1===n.length&&n.push(""),2!==n.length)throw new Error(`invalid gwei value: ${e}`);for(;n[1].length<t;)n[1]+="0";if(n[1].length>9){let e=BigInt(n[1].substring(0,9));n[1].substring(9).match(/^0+$/)||e++,n[1]=e.toString()}return BigInt(n[0]+n[1])}function c(e){return new o.FetchUrlFeeDataNetworkPlugin(e,(async(e,t,r)=>{let n;r.setHeader("User-Agent","ethers");try{const[t,i]=await Promise.all([r.send(),e()]);n=t;const o=n.bodyJson.standard;return{gasPrice:i.gasPrice,maxFeePerGas:u(o.maxFee,9),maxPriorityFeePerGas:u(o.maxPriorityFee,9)}}catch(e){(0,i.assert)(!1,`error encountered with polygon gas station (${JSON.stringify(r.url)})`,"SERVER_ERROR",{request:r,response:n,error:e})}}))}t.Network=a;let l=!1},57758:(e,t,r)=>{"use strict";var n,i=r(86048).F,o=i.ERR_MISSING_ARGS,s=i.ERR_STREAM_DESTROYED;function a(e){if(e)throw e}function u(e){e()}function c(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,f=function(e){return e.length?"function"!=typeof e[e.length-1]?a:e.pop():a}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map((function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var a=!1;e.on("close",(function(){a=!0})),void 0===n&&(n=r(86238)),n(e,{readable:t,writable:i},(function(e){if(e)return o(e);a=!0,o()}));var u=!1;return function(t){if(!a&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new s("pipe"))}}(e,o,i>0,(function(e){l||(l=e),e&&h.forEach(u),o||(h.forEach(u),f(l))}))}));return t.reduce(c)}},57766:(e,t,r)=>{"use strict";var n=r(67426),i=r(66166),o=r(43349),s=n.rotr64_hi,a=n.rotr64_lo,u=n.shr64_hi,c=n.shr64_lo,l=n.sum64,f=n.sum64_hi,h=n.sum64_lo,d=n.sum64_4_hi,p=n.sum64_4_lo,g=n.sum64_5_hi,b=n.sum64_5_lo,y=i.BlockHash,m=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591];function v(){if(!(this instanceof v))return new v;y.call(this),this.h=[1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209],this.k=m,this.W=new Array(160)}function w(e,t,r,n,i){var o=e&r^~e&i;return o<0&&(o+=4294967296),o}function E(e,t,r,n,i,o){var s=t&n^~t&o;return s<0&&(s+=4294967296),s}function A(e,t,r,n,i){var o=e&r^e&i^r&i;return o<0&&(o+=4294967296),o}function _(e,t,r,n,i,o){var s=t&n^t&o^n&o;return s<0&&(s+=4294967296),s}function S(e,t){var r=s(e,t,28)^s(t,e,2)^s(t,e,7);return r<0&&(r+=4294967296),r}function P(e,t){var r=a(e,t,28)^a(t,e,2)^a(t,e,7);return r<0&&(r+=4294967296),r}function k(e,t){var r=a(e,t,14)^a(e,t,18)^a(t,e,9);return r<0&&(r+=4294967296),r}function O(e,t){var r=s(e,t,1)^s(e,t,8)^u(e,t,7);return r<0&&(r+=4294967296),r}function x(e,t){var r=a(e,t,1)^a(e,t,8)^c(e,t,7);return r<0&&(r+=4294967296),r}function M(e,t){var r=a(e,t,19)^a(t,e,29)^c(e,t,6);return r<0&&(r+=4294967296),r}n.inherits(v,y),e.exports=v,v.blockSize=1024,v.outSize=512,v.hmacStrength=192,v.padLength=128,v.prototype._prepareBlock=function(e,t){for(var r=this.W,n=0;n<32;n++)r[n]=e[t+n];for(;n<r.length;n+=2){var i=(b=r[n-4],y=r[n-3],m=void 0,(m=s(b,y,19)^s(y,b,29)^u(b,y,6))<0&&(m+=4294967296),m),o=M(r[n-4],r[n-3]),a=r[n-14],c=r[n-13],l=O(r[n-30],r[n-29]),f=x(r[n-30],r[n-29]),h=r[n-32],g=r[n-31];r[n]=d(i,o,a,c,l,f,h,g),r[n+1]=p(i,o,a,c,l,f,h,g)}var b,y,m},v.prototype._update=function(e,t){this._prepareBlock(e,t);var r,n,i,a=this.W,u=this.h[0],c=this.h[1],d=this.h[2],p=this.h[3],y=this.h[4],m=this.h[5],v=this.h[6],O=this.h[7],x=this.h[8],M=this.h[9],B=this.h[10],T=this.h[11],I=this.h[12],C=this.h[13],R=this.h[14],N=this.h[15];o(this.k.length===a.length);for(var j=0;j<a.length;j+=2){var U=R,L=N,D=(i=void 0,(i=s(r=x,n=M,14)^s(r,n,18)^s(n,r,9))<0&&(i+=4294967296),i),F=k(x,M),H=w(x,0,B,0,I),z=E(0,M,0,T,0,C),q=this.k[j],G=this.k[j+1],W=a[j],V=a[j+1],K=g(U,L,D,F,H,z,q,G,W,V),$=b(U,L,D,F,H,z,q,G,W,V);U=S(u,c),L=P(u,c),D=A(u,0,d,0,y),F=_(0,c,0,p,0,m);var J=f(U,L,D,F),Q=h(U,L,D,F);R=I,N=C,I=B,C=T,B=x,T=M,x=f(v,O,K,$),M=h(O,O,K,$),v=y,O=m,y=d,m=p,d=u,p=c,u=f(K,$,J,Q),c=h(K,$,J,Q)}l(this.h,0,u,c),l(this.h,2,d,p),l(this.h,4,y,m),l(this.h,6,v,O),l(this.h,8,x,M),l(this.h,10,B,T),l(this.h,12,I,C),l(this.h,14,R,N)},v.prototype._digest=function(e){return"hex"===e?n.toHex32(this.h,"big"):n.split32(this.h,"big")}},58627:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.notImplemented=t.bitMask=t.utf8ToBytes=t.randomBytes=t.isBytes=t.hexToBytes=t.concatBytes=t.bytesToUtf8=t.bytesToHex=t.anumber=t.abytes=void 0,t.abool=function(e,t){if("boolean"!=typeof t)throw new Error(e+" boolean expected, got "+t)},t.numberToHexUnpadded=a,t.hexToNumber=u,t.bytesToNumberBE=function(e){return u((0,n.bytesToHex)(e))},t.bytesToNumberLE=function(e){return(0,n.abytes)(e),u((0,n.bytesToHex)(Uint8Array.from(e).reverse()))},t.numberToBytesBE=c,t.numberToBytesLE=function(e,t){return c(e,t).reverse()},t.numberToVarBytesBE=function(e){return(0,n.hexToBytes)(a(e))},t.ensureBytes=function(e,t,r){let i;if("string"==typeof t)try{i=(0,n.hexToBytes)(t)}catch(t){throw new Error(e+" must be hex string or Uint8Array, cause: "+t)}else{if(!(0,n.isBytes)(t))throw new Error(e+" must be hex string or Uint8Array");i=Uint8Array.from(t)}const o=i.length;if("number"==typeof r&&o!==r)throw new Error(e+" of length "+r+" expected, got "+o);return i},t.equalBytes=function(e,t){if(e.length!==t.length)return!1;let r=0;for(let n=0;n<e.length;n++)r|=e[n]^t[n];return 0===r},t.inRange=f,t.aInRange=function(e,t,r,n){if(!f(t,r,n))throw new Error("expected valid "+e+": "+r+" <= n < "+n+", got "+t)},t.bitLen=function(e){let t;for(t=0;e>o;e>>=s,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&s},t.bitSet=function(e,t,r){return e|(r?s:o)<<BigInt(t)},t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");const i=e=>new Uint8Array(e),o=e=>Uint8Array.of(e);let s=i(e),a=i(e),u=0;const c=()=>{s.fill(1),a.fill(0),u=0},l=(...e)=>r(a,s,...e),f=(e=i(0))=>{a=l(o(0),e),s=l(),0!==e.length&&(a=l(o(1),e),s=l())},h=()=>{if(u++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){s=l();const t=s.slice();r.push(t),e+=s.length}return(0,n.concatBytes)(...r)};return(e,t)=>{let r;for(c(),f(e);!(r=t(h()));)f();return c(),r}},t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=h[r];if("function"!=typeof i)throw new Error("invalid validator function");const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error("param "+String(t)+" is invalid. Expected "+r+", got "+o)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e},t.isHash=function(e){return"function"==typeof e&&Number.isSafeInteger(e.outputLen)},t._validateObject=function(e,t,r={}){if(!e||"object"!=typeof e)throw new Error("expected valid options object");function n(t,r,n){const i=e[t];if(n&&void 0===i)return;const o=typeof i;if(o!==r||null===i)throw new Error(`param "${t}" is invalid: expected ${r}, got ${o}`)}Object.entries(t).forEach((([e,t])=>n(e,t,!1))),Object.entries(r).forEach((([e,t])=>n(e,t,!0)))},t.memoized=function(e){const t=new WeakMap;return(r,...n)=>{const i=t.get(r);if(void 0!==i)return i;const o=e(r,...n);return t.set(r,o),o}};const n=r(99175);var i=r(99175);Object.defineProperty(t,"abytes",{enumerable:!0,get:function(){return i.abytes}}),Object.defineProperty(t,"anumber",{enumerable:!0,get:function(){return i.anumber}}),Object.defineProperty(t,"bytesToHex",{enumerable:!0,get:function(){return i.bytesToHex}}),Object.defineProperty(t,"bytesToUtf8",{enumerable:!0,get:function(){return i.bytesToUtf8}}),Object.defineProperty(t,"concatBytes",{enumerable:!0,get:function(){return i.concatBytes}}),Object.defineProperty(t,"hexToBytes",{enumerable:!0,get:function(){return i.hexToBytes}}),Object.defineProperty(t,"isBytes",{enumerable:!0,get:function(){return i.isBytes}}),Object.defineProperty(t,"randomBytes",{enumerable:!0,get:function(){return i.randomBytes}}),Object.defineProperty(t,"utf8ToBytes",{enumerable:!0,get:function(){return i.utf8ToBytes}});const o=BigInt(0),s=BigInt(1);function a(e){const t=e.toString(16);return 1&t.length?"0"+t:t}function u(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return""===e?o:BigInt("0x"+e)}function c(e,t){return(0,n.hexToBytes)(e.toString(16).padStart(2*t,"0"))}const l=e=>"bigint"==typeof e&&o<=e;function f(e,t,r){return l(e)&&l(t)&&l(r)&&t<=e&&e<r}t.bitMask=e=>(s<<BigInt(e))-s;const h={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||(0,n.isBytes)(e),isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.notImplemented=()=>{throw new Error("not implemented")}},58719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BooleanCoder=void 0;const n=r(39976),i=r(38869);class o extends i.Coder{constructor(e){super("bool","bool",e,!1)}defaultValue(){return!1}encode(e,t){const r=n.Typed.dereference(t,"bool");return e.writeValue(r?1:0)}decode(e){return!!e.readValue()}}t.BooleanCoder=o},58799:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.defaultIfEmpty=void 0;var n=r(65212),i=r(17214);t.defaultIfEmpty=function(e){return n.operate((function(t,r){var n=!1;t.subscribe(i.createOperatorSubscriber(r,(function(e){n=!0,r.next(e)}),(function(){n||r.next(e),r.complete()})))}))}},58851:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),i(r(21302),t)},58900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.xchacha20poly1305=t.chacha20poly1305=t._poly1305_aead=t.chacha12=t.chacha8=t.xchacha20=t.chacha20=t.chacha20orig=t.hchacha=void 0;const n=r(36527),i=r(31210),o=r(32506),s=r(24605);function a(e,t,r,n,i,s=20){let a=e[0],u=e[1],c=e[2],l=e[3],f=t[0],h=t[1],d=t[2],p=t[3],g=t[4],b=t[5],y=t[6],m=t[7],v=i,w=r[0],E=r[1],A=r[2],_=a,S=u,P=c,k=l,O=f,x=h,M=d,B=p,T=g,I=b,C=y,R=m,N=v,j=w,U=E,L=A;for(let e=0;e<s;e+=2)_=_+O|0,N=(0,o.rotl)(N^_,16),T=T+N|0,O=(0,o.rotl)(O^T,12),_=_+O|0,N=(0,o.rotl)(N^_,8),T=T+N|0,O=(0,o.rotl)(O^T,7),S=S+x|0,j=(0,o.rotl)(j^S,16),I=I+j|0,x=(0,o.rotl)(x^I,12),S=S+x|0,j=(0,o.rotl)(j^S,8),I=I+j|0,x=(0,o.rotl)(x^I,7),P=P+M|0,U=(0,o.rotl)(U^P,16),C=C+U|0,M=(0,o.rotl)(M^C,12),P=P+M|0,U=(0,o.rotl)(U^P,8),C=C+U|0,M=(0,o.rotl)(M^C,7),k=k+B|0,L=(0,o.rotl)(L^k,16),R=R+L|0,B=(0,o.rotl)(B^R,12),k=k+B|0,L=(0,o.rotl)(L^k,8),R=R+L|0,B=(0,o.rotl)(B^R,7),_=_+x|0,L=(0,o.rotl)(L^_,16),C=C+L|0,x=(0,o.rotl)(x^C,12),_=_+x|0,L=(0,o.rotl)(L^_,8),C=C+L|0,x=(0,o.rotl)(x^C,7),S=S+M|0,N=(0,o.rotl)(N^S,16),R=R+N|0,M=(0,o.rotl)(M^R,12),S=S+M|0,N=(0,o.rotl)(N^S,8),R=R+N|0,M=(0,o.rotl)(M^R,7),P=P+B|0,j=(0,o.rotl)(j^P,16),T=T+j|0,B=(0,o.rotl)(B^T,12),P=P+B|0,j=(0,o.rotl)(j^P,8),T=T+j|0,B=(0,o.rotl)(B^T,7),k=k+O|0,U=(0,o.rotl)(U^k,16),I=I+U|0,O=(0,o.rotl)(O^I,12),k=k+O|0,U=(0,o.rotl)(U^k,8),I=I+U|0,O=(0,o.rotl)(O^I,7);let D=0;n[D++]=a+_|0,n[D++]=u+S|0,n[D++]=c+P|0,n[D++]=l+k|0,n[D++]=f+O|0,n[D++]=h+x|0,n[D++]=d+M|0,n[D++]=p+B|0,n[D++]=g+T|0,n[D++]=b+I|0,n[D++]=y+C|0,n[D++]=m+R|0,n[D++]=v+N|0,n[D++]=w+j|0,n[D++]=E+U|0,n[D++]=A+L|0}function u(e,t,r,n){let i=e[0],s=e[1],a=e[2],u=e[3],c=t[0],l=t[1],f=t[2],h=t[3],d=t[4],p=t[5],g=t[6],b=t[7],y=r[0],m=r[1],v=r[2],w=r[3];for(let e=0;e<20;e+=2)i=i+c|0,y=(0,o.rotl)(y^i,16),d=d+y|0,c=(0,o.rotl)(c^d,12),i=i+c|0,y=(0,o.rotl)(y^i,8),d=d+y|0,c=(0,o.rotl)(c^d,7),s=s+l|0,m=(0,o.rotl)(m^s,16),p=p+m|0,l=(0,o.rotl)(l^p,12),s=s+l|0,m=(0,o.rotl)(m^s,8),p=p+m|0,l=(0,o.rotl)(l^p,7),a=a+f|0,v=(0,o.rotl)(v^a,16),g=g+v|0,f=(0,o.rotl)(f^g,12),a=a+f|0,v=(0,o.rotl)(v^a,8),g=g+v|0,f=(0,o.rotl)(f^g,7),u=u+h|0,w=(0,o.rotl)(w^u,16),b=b+w|0,h=(0,o.rotl)(h^b,12),u=u+h|0,w=(0,o.rotl)(w^u,8),b=b+w|0,h=(0,o.rotl)(h^b,7),i=i+l|0,w=(0,o.rotl)(w^i,16),g=g+w|0,l=(0,o.rotl)(l^g,12),i=i+l|0,w=(0,o.rotl)(w^i,8),g=g+w|0,l=(0,o.rotl)(l^g,7),s=s+f|0,y=(0,o.rotl)(y^s,16),b=b+y|0,f=(0,o.rotl)(f^b,12),s=s+f|0,y=(0,o.rotl)(y^s,8),b=b+y|0,f=(0,o.rotl)(f^b,7),a=a+h|0,m=(0,o.rotl)(m^a,16),d=d+m|0,h=(0,o.rotl)(h^d,12),a=a+h|0,m=(0,o.rotl)(m^a,8),d=d+m|0,h=(0,o.rotl)(h^d,7),u=u+c|0,v=(0,o.rotl)(v^u,16),p=p+v|0,c=(0,o.rotl)(c^p,12),u=u+c|0,v=(0,o.rotl)(v^u,8),p=p+v|0,c=(0,o.rotl)(c^p,7);let E=0;n[E++]=i,n[E++]=s,n[E++]=a,n[E++]=u,n[E++]=y,n[E++]=m,n[E++]=v,n[E++]=w}t.hchacha=u,t.chacha20orig=(0,o.createCipher)(a,{counterRight:!1,counterLength:8,allowShortKeys:!0}),t.chacha20=(0,o.createCipher)(a,{counterRight:!1,counterLength:4,allowShortKeys:!1}),t.xchacha20=(0,o.createCipher)(a,{counterRight:!1,counterLength:8,extendNonceFn:u,allowShortKeys:!1}),t.chacha8=(0,o.createCipher)(a,{counterRight:!1,counterLength:4,rounds:8}),t.chacha12=(0,o.createCipher)(a,{counterRight:!1,counterLength:4,rounds:12});const c=new Uint8Array(16),l=(e,t)=>{e.update(t);const r=t.length%16;r&&e.update(c.subarray(r))},f=new Uint8Array(32);function h(e,t,r,o,s){const a=e(t,r,f),u=i.poly1305.create(a);s&&l(u,s),l(u,o);const c=new Uint8Array(16),h=(0,n.createView)(c);(0,n.setBigUint64)(h,0,BigInt(s?s.length:0),!0),(0,n.setBigUint64)(h,8,BigInt(o.length),!0),u.update(c);const d=u.digest();return a.fill(0),d}t._poly1305_aead=e=>(t,r,i)=>((0,s.bytes)(t,32),(0,s.bytes)(r),{encrypt:(n,o)=>{const a=n.length,u=a+16;o?(0,s.bytes)(o,u):o=new Uint8Array(u),e(t,r,n,o,1);const c=h(e,t,r,o.subarray(0,-16),i);return o.set(c,a),o},decrypt:(o,a)=>{const u=o.length,c=u-16;if(u<16)throw new Error("encrypted data must be at least 16 bytes");a?(0,s.bytes)(a,c):a=new Uint8Array(c);const l=o.subarray(0,-16),f=o.subarray(-16),d=h(e,t,r,l,i);if(!(0,n.equalBytes)(f,d))throw new Error("invalid tag");return e(t,r,l,a,1),a}}),t.chacha20poly1305=(0,n.wrapCipher)({blockSize:64,nonceLength:12,tagLength:16},(0,t._poly1305_aead)(t.chacha20)),t.xchacha20poly1305=(0,n.wrapCipher)({blockSize:64,nonceLength:24,tagLength:16},(0,t._poly1305_aead)(t.xchacha20))},58903:(e,t,r)=>{var n=r(56698),i=r(48287).Buffer,o=r(62010);function s(e){o.call(this,e),this.enc="pem"}n(s,o),e.exports=s,s.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),s=/^-----(BEGIN|END) ([^-]+)-----$/,a=-1,u=-1,c=0;c<r.length;c++){var l=r[c].match(s);if(null!==l&&l[2]===n){if(-1!==a){if("END"!==l[1])break;u=c;break}if("BEGIN"!==l[1])break;a=c}}if(-1===a||-1===u)throw new Error("PEM section not found for: "+n);var f=r.slice(a+1,u).join("");f.replace(/[^a-z0-9\+\/=]+/gi,"");var h=new i(f,"base64");return o.prototype.decode.call(this,h,t)}},59328:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.EmptyError=void 0;var n=r(9619);t.EmptyError=n.createErrorClass((function(e){return function(){e(this),this.name="EmptyError",this.message="no elements in sequence"}}))},59666:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Web3Signer=void 0;const i=r(48089),o=r(14193),s=r(45628),a=n(r(67476));class u{web3Connector;credentials=new Map;MESSAGE_TO_SIGN="I Love Shogun!";constructor(e){this.web3Connector=e||new i.Web3Connector}async createSigningCredential(e){try{(0,s.logDebug)(`Creating Web3 signing credential for address: ${e}`);const t=o.ethers.getAddress(e.toLowerCase()),r=await this.requestSignature(t),n=`${t.toLowerCase()}`,i=o.ethers.keccak256(o.ethers.toUtf8Bytes(`${r}:${t.toLowerCase()}`)),a={address:t,signature:r,message:this.MESSAGE_TO_SIGN,username:n,password:i};return this.credentials.set(t.toLowerCase(),a),(0,s.logDebug)("Created Web3 signing credential:",a),a}catch(e){throw(0,s.logError)("Error creating Web3 signing credential:",e),new Error(`Failed to create Web3 signing credential: ${e.message}`)}}async requestSignature(e){try{const t=await this.web3Connector.getSigner(),r=await t.getAddress();if(r.toLowerCase()!==e.toLowerCase())throw new Error(`Signer address (${r}) does not match expected address (${e})`);(0,s.logDebug)(`Requesting signature for message: ${this.MESSAGE_TO_SIGN}`);const n=await t.signMessage(this.MESSAGE_TO_SIGN);return(0,s.logDebug)("Signature obtained successfully"),n}catch(e){throw(0,s.logError)("Failed to request signature:",e),e}}createAuthenticator(e){if(!this.credentials.get(e.toLowerCase()))throw new Error(`Credential for address ${e} not found`);return async t=>{try{const r=await this.web3Connector.getSigner();if((await r.getAddress()).toLowerCase()!==e.toLowerCase())throw new Error("Address mismatch during authentication");const n=JSON.stringify(t),i=await r.signMessage(n);return(0,s.logDebug)("Web3 authentication successful:",{data:t,signature:i}),i}catch(e){throw(0,s.logError)("Web3 authentication error:",e),e}}}async createDerivedKeyPair(e,t){const r=this.credentials.get(e.toLowerCase());if(!r)throw new Error(`Credential for address ${e} not found`);try{const e=await(0,a.default)(r.password,t,{includeP256:!0});return{pub:e.pub,priv:e.priv,epub:e.epub,epriv:e.epriv}}catch(e){throw(0,s.logError)("Error deriving keys from Web3 credential:",e),e}}async createGunUser(e,t){const r=this.credentials.get(e.toLowerCase());if(!r)throw new Error(`Credential for address ${e} not found`);try{return new Promise((n=>{t.user().create(r.username,r.password,(i=>{i.err?t.user().auth(r.username,r.password,(t=>{if(t.err)n({success:!1,error:t.err});else{const i=t.pub;r.gunUserPub=i,this.credentials.set(e.toLowerCase(),r),n({success:!0,userPub:i})}})):t.user().auth(r.username,r.password,(t=>{if(t.err)n({success:!1,error:t.err});else{const i=t.pub;r.gunUserPub=i,this.credentials.set(e.toLowerCase(),r),n({success:!0,userPub:i})}}))}))}))}catch(e){return(0,s.logError)("Error creating Gun user:",e),{success:!1,error:e.message}}}async signWithDerivedKeys(e,t,r){try{const n=this.createAuthenticator(t);await n(e);const i=await this.createDerivedKeyPair(t,r),s=JSON.stringify(e),a=(o.ethers.keccak256(o.ethers.toUtf8Bytes(s)),new o.ethers.Wallet(i.priv)),u={m:s,s:await a.signMessage(s)};return"SEA"+JSON.stringify(u)}catch(e){throw(0,s.logError)("Error signing with derived keys:",e),e}}getGunUserPub(e){const t=this.credentials.get(e.toLowerCase());return t?.gunUserPub}getPassword(e){const t=this.credentials.get(e.toLowerCase());return t?.password}async verifyConsistency(e,t){if(!this.credentials.get(e.toLowerCase()))return{consistent:!1};const r=await this.createDerivedKeyPair(e);return{consistent:!t||r.pub===t,actualUserPub:r.pub,expectedUserPub:t}}getCredential(e){return this.credentials.get(e.toLowerCase())}listCredentials(){return Array.from(this.credentials.values())}removeCredential(e){return this.credentials.delete(e.toLowerCase())}}t.Web3Signer=u,t.default=u},59975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function i(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function o(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let o=0;o<e.length;o++){const{h:s,l:a}=i(e[o],t);[r[o],n[o]]=[s,a]}return[r,n]}t.fromBig=i,t.split=o;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const u=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=u;const c=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=c;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const h=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=h;const d=(e,t)=>t;t.rotr32H=d;const p=(e,t)=>e;t.rotr32L=p;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const b=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=b;const y=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=y;const m=(e,t,r)=>e<<r-32|t>>>64-r;function v(e,t,r,n){const i=(t>>>0)+(n>>>0);return{h:e+r+(i/2**32|0)|0,l:0|i}}t.rotlBL=m,t.add=v;const w=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=w;const E=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=E;const A=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=A;const _=(e,t,r,n,i)=>t+r+n+i+(e/2**32|0)|0;t.add4H=_;const S=(e,t,r,n,i)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(i>>>0);t.add5L=S;const P=(e,t,r,n,i,o)=>t+r+n+i+o+(e/2**32|0)|0;t.add5H=P;const k={fromBig:i,split:o,toBig:s,shrSH:a,shrSL:u,rotrSH:c,rotrSL:l,rotrBH:f,rotrBL:h,rotr32H:d,rotr32L:p,rotlSH:g,rotlSL:b,rotlBH:y,rotlBL:m,add:v,add3L:w,add3H:E,add4L:A,add4H:_,add5H:P,add5L:S};t.default=k},60022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.polyval=t.ghash=t._toGHASHKey=void 0;const n=r(36527),i=r(24605),o=16,s=new Uint8Array(16),a=(0,n.u32)(s),u=e=>(e>>>0&255)<<24|(e>>>8&255)<<16|(e>>>16&255)<<8|e>>>24&255;function c(e){e.reverse();const t=1&e[15];let r=0;for(let t=0;t<e.length;t++){const n=e[t];e[t]=n>>>1|r,r=(1&n)<<7}return e[0]^=225&-t,e}t._toGHASHKey=c;class l{constructor(e,t){this.blockLen=o,this.outputLen=o,this.s0=0,this.s1=0,this.s2=0,this.s3=0,this.finished=!1,e=(0,n.toBytes)(e),(0,i.bytes)(e,16);const r=(0,n.createView)(e);let s=r.getUint32(0,!1),a=r.getUint32(4,!1),c=r.getUint32(8,!1),l=r.getUint32(12,!1);const f=[];for(let e=0;e<128;e++)f.push({s0:u(s),s1:u(a),s2:u(c),s3:u(l)}),({s0:s,s1:a,s2:c,s3:l}={s3:(p=c)<<31|(g=l)>>>1,s2:(d=a)<<31|p>>>1,s1:(h=s)<<31|d>>>1,s0:h>>>1^225<<24&-(1&g)});var h,d,p,g;const b=(y=t||1024)>65536?8:y>1024?4:2;var y;if(![1,2,4,8].includes(b))throw new Error(`ghash: wrong window size=${b}, should be 2, 4 or 8`);this.W=b;const m=128/b,v=this.windowSize=2**b,w=[];for(let e=0;e<m;e++)for(let t=0;t<v;t++){let r=0,n=0,i=0,o=0;for(let s=0;s<b;s++){if(!(t>>>b-s-1&1))continue;const{s0:a,s1:u,s2:c,s3:l}=f[b*e+s];r^=a,n^=u,i^=c,o^=l}w.push({s0:r,s1:n,s2:i,s3:o})}this.t=w}_updateBlock(e,t,r,n){e^=this.s0,t^=this.s1,r^=this.s2,n^=this.s3;const{W:i,t:o,windowSize:s}=this;let a=0,u=0,c=0,l=0;const f=(1<<i)-1;let h=0;for(const d of[e,t,r,n])for(let e=0;e<4;e++){const t=d>>>8*e&255;for(let e=8/i-1;e>=0;e--){const r=t>>>i*e&f,{s0:n,s1:d,s2:p,s3:g}=o[h*s+r];a^=n,u^=d,c^=p,l^=g,h+=1}}this.s0=a,this.s1=u,this.s2=c,this.s3=l}update(e){e=(0,n.toBytes)(e),(0,i.exists)(this);const t=(0,n.u32)(e),r=Math.floor(e.length/o),u=e.length%o;for(let e=0;e<r;e++)this._updateBlock(t[4*e+0],t[4*e+1],t[4*e+2],t[4*e+3]);return u&&(s.set(e.subarray(r*o)),this._updateBlock(a[0],a[1],a[2],a[3]),a.fill(0)),this}destroy(){const{t:e}=this;for(const t of e)t.s0=0,t.s1=0,t.s2=0,t.s3=0}digestInto(e){(0,i.exists)(this),(0,i.output)(e,this),this.finished=!0;const{s0:t,s1:r,s2:o,s3:s}=this,a=(0,n.u32)(e);return a[0]=t,a[1]=r,a[2]=o,a[3]=s,e}digest(){const e=new Uint8Array(o);return this.digestInto(e),this.destroy(),e}}class f extends l{constructor(e,t){const r=c((e=(0,n.toBytes)(e)).slice());super(r,t),r.fill(0)}update(e){e=(0,n.toBytes)(e),(0,i.exists)(this);const t=(0,n.u32)(e),r=e.length%o,c=Math.floor(e.length/o);for(let e=0;e<c;e++)this._updateBlock(u(t[4*e+3]),u(t[4*e+2]),u(t[4*e+1]),u(t[4*e+0]));return r&&(s.set(e.subarray(c*o)),this._updateBlock(u(a[3]),u(a[2]),u(a[1]),u(a[0])),a.fill(0)),this}digestInto(e){(0,i.exists)(this),(0,i.output)(e,this),this.finished=!0;const{s0:t,s1:r,s2:o,s3:s}=this,a=(0,n.u32)(e);return a[0]=t,a[1]=r,a[2]=o,a[3]=s,e.reverse()}}function h(e){const t=(t,r)=>e(r,t.length).update((0,n.toBytes)(t)).digest(),r=e(new Uint8Array(16),0);return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=(t,r)=>e(t,r),t}t.ghash=h(((e,t)=>new l(e,t))),t.polyval=h(((e,t)=>new f(e,t)))},60406:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContractFactory=void 0;const n=r(8456),i=r(30646),o=r(75347),s=r(21008);class a{interface;bytecode;runner;constructor(e,t,r){const i=n.Interface.from(e);t instanceof Uint8Array||("object"==typeof t&&(t=t.object),t.startsWith("0x")||(t="0x"+t)),t=(0,o.hexlify)((0,o.getBytes)(t)),(0,o.defineProperties)(this,{bytecode:t,interface:i,runner:r||null})}attach(e){return new s.BaseContract(e,this.interface,this.runner)}async getDeployTransaction(...e){let t={};const r=this.interface.deploy;if(r.inputs.length+1===e.length&&(t=await(0,s.copyOverrides)(e.pop())),r.inputs.length!==e.length)throw new Error("incorrect number of arguments to constructor");const n=await(0,s.resolveArgs)(this.runner,r.inputs,e),i=(0,o.concat)([this.bytecode,this.interface.encodeDeploy(n)]);return Object.assign({},t,{data:i})}async deploy(...e){const t=await this.getDeployTransaction(...e);(0,o.assert)(this.runner&&"function"==typeof this.runner.sendTransaction,"factory runner does not support sending transactions","UNSUPPORTED_OPERATION",{operation:"sendTransaction"});const r=await this.runner.sendTransaction(t),n=(0,i.getCreateAddress)(r);return new s.BaseContract(n,this.interface,this.runner,r)}connect(e){return new a(this.interface,this.bytecode,e)}static fromSolidity(e,t){(0,o.assertArgument)(null!=e,"bad compiler output","output",e),"string"==typeof e&&(e=JSON.parse(e));const r=e.abi;let n="";return e.bytecode?n=e.bytecode:e.evm&&e.evm.bytecode&&(n=e.evm.bytecode),new this(r,n,t)}}t.ContractFactory=a},60480:(e,t,r)=>{"use strict";var n,i=t,o=r(77952),s=r(894),a=r(47011).assert;function u(e){"short"===e.type?this.curve=new s.short(e):"edwards"===e.type?this.curve=new s.edwards(e):this.curve=new s.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,a(this.g.validate(),"Invalid curve"),a(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function c(e,t){Object.defineProperty(i,e,{configurable:!0,enumerable:!0,get:function(){var r=new u(t);return Object.defineProperty(i,e,{configurable:!0,enumerable:!0,value:r}),r}})}i.PresetCurve=u,c("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:o.sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),c("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:o.sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),c("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:o.sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),c("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:o.sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),c("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:o.sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),c("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["9"]}),c("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:o.sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{n=r(74011)}catch(e){n=void 0}c("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:o.sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",n]})},60598:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeWhile=void 0;var n=r(65212),i=r(17214);t.takeWhile=function(e,t){return void 0===t&&(t=!1),n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){var i=e(r,o++);(i||t)&&n.next(r),!i&&n.complete()})))}))}},61200:(e,t,r)=>{"use strict";var n=r(39404),i=r(47011).assert;function o(e,t){this.ec=e,this.priv=null,this.pub=null,t.priv&&this._importPrivate(t.priv,t.privEnc),t.pub&&this._importPublic(t.pub,t.pubEnc)}e.exports=o,o.fromPublic=function(e,t,r){return t instanceof o?t:new o(e,{pub:t,pubEnc:r})},o.fromPrivate=function(e,t,r){return t instanceof o?t:new o(e,{priv:t,privEnc:r})},o.prototype.validate=function(){var e=this.getPublic();return e.isInfinity()?{result:!1,reason:"Invalid public key"}:e.validate()?e.mul(this.ec.curve.n).isInfinity()?{result:!0,reason:null}:{result:!1,reason:"Public key * N != O"}:{result:!1,reason:"Public key is not a point"}},o.prototype.getPublic=function(e,t){return"string"==typeof e&&(t=e,e=null),this.pub||(this.pub=this.ec.g.mul(this.priv)),t?this.pub.encode(t,e):this.pub},o.prototype.getPrivate=function(e){return"hex"===e?this.priv.toString(16,2):this.priv},o.prototype._importPrivate=function(e,t){this.priv=new n(e,t||16),this.priv=this.priv.umod(this.ec.curve.n)},o.prototype._importPublic=function(e,t){if(e.x||e.y)return"mont"===this.ec.curve.type?i(e.x,"Need x coordinate"):"short"!==this.ec.curve.type&&"edwards"!==this.ec.curve.type||i(e.x&&e.y,"Need both x and y coordinate"),void(this.pub=this.ec.curve.point(e.x,e.y));this.pub=this.ec.curve.decodePoint(e,t)},o.prototype.derive=function(e){return e.validate()||i(e.validate(),"public point not validated"),e.mul(this.priv).getX()},o.prototype.sign=function(e,t,r){return this.ec.sign(e,this,t,r)},o.prototype.verify=function(e,t,r){return this.ec.verify(e,t,this,void 0,r)},o.prototype.inspect=function(){return"<Key priv: "+(this.priv&&this.priv.toString(16,2))+" pub: "+(this.pub&&this.pub.inspect())+" >"}},61279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.elementAt=void 0;var n=r(7024),i=r(85934),o=r(30632),s=r(58799),a=r(54383);t.elementAt=function(e,t){if(e<0)throw new n.ArgumentOutOfRangeError;var r=arguments.length>=2;return function(u){return u.pipe(i.filter((function(t,r){return r===e})),a.take(1),r?s.defaultIfEmpty(t):o.throwIfEmpty((function(){return new n.ArgumentOutOfRangeError})))}}},61324:(e,t,r)=>{var n=r(48287).Buffer,i=r(86729),o=r(39404);e.exports=function(e){return new a(e)};var s={secp256k1:{name:"secp256k1",byteLength:32},secp224r1:{name:"p224",byteLength:28},prime256v1:{name:"p256",byteLength:32},prime192v1:{name:"p192",byteLength:24},ed25519:{name:"ed25519",byteLength:32},secp384r1:{name:"p384",byteLength:48},secp521r1:{name:"p521",byteLength:66}};function a(e){this.curveType=s[e],this.curveType||(this.curveType={name:e}),this.curve=new i.ec(this.curveType.name),this.keys=void 0}function u(e,t,r){Array.isArray(e)||(e=e.toArray());var i=new n(e);if(r&&i.length<r){var o=new n(r-i.length);o.fill(0),i=n.concat([o,i])}return t?i.toString(t):i}s.p224=s.secp224r1,s.p256=s.secp256r1=s.prime256v1,s.p192=s.secp192r1=s.prime192v1,s.p384=s.secp384r1,s.p521=s.secp521r1,a.prototype.generateKeys=function(e,t){return this.keys=this.curve.genKeyPair(),this.getPublicKey(e,t)},a.prototype.computeSecret=function(e,t,r){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),u(this.curve.keyFromPublic(e).getPublic().mul(this.keys.getPrivate()).getX(),r,this.curveType.byteLength)},a.prototype.getPublicKey=function(e,t){var r=this.keys.getPublic("compressed"===t,!0);return"hybrid"===t&&(r[r.length-1]%2?r[0]=7:r[0]=6),u(r,e)},a.prototype.getPrivateKey=function(e){return u(this.keys.getPrivate(),e)},a.prototype.setPublicKey=function(e,t){return t=t||"utf8",n.isBuffer(e)||(e=new n(e,t)),this.keys._importPublic(e),this},a.prototype.setPrivateKey=function(e,t){t=t||"utf8",n.isBuffer(e)||(e=new n(e,t));var r=new o(e);return r=r.toString(16),this.keys=this.curve.genKeyPair(),this.keys._importPrivate(r),this}},61587:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.of=void 0;var n=r(26404),i=r(47058);t.of=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=n.popScheduler(e);return i.from(e,r)}},61650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encryptKeystoreJson=t.encryptKeystoreJsonSync=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=void 0;const n=r(8165),i=r(30646),o=r(32291),s=r(77778),a=r(75347),u=r(48634),c=r(12205),l="m/44'/60'/0'/0/0";function f(e,t){const r=(0,a.getBytes)(t),c=(0,u.spelunk)(e,"crypto.ciphertext:data!"),f=(0,a.hexlify)((0,o.keccak256)((0,a.concat)([r.slice(16,32),c]))).substring(2);(0,a.assertArgument)(f===(0,u.spelunk)(e,"crypto.mac:string!").toLowerCase(),"incorrect password","password","[ REDACTED ]");const h=function(e,t,r){if("aes-128-ctr"===(0,u.spelunk)(e,"crypto.cipher:string")){const i=(0,u.spelunk)(e,"crypto.cipherparams.iv:data!"),o=new n.CTR(t,i);return(0,a.hexlify)(o.decrypt(r))}(0,a.assert)(!1,"unsupported cipher","UNSUPPORTED_OPERATION",{operation:"decrypt"})}(e,r.slice(0,16),c),d=(0,s.computeAddress)(h);if(e.address){let t=e.address.toLowerCase();t.startsWith("0x")||(t="0x"+t),(0,a.assertArgument)((0,i.getAddress)(t)===d,"keystore address/privateKey mismatch","address",e.address)}const p={address:d,privateKey:h};if("0.1"===(0,u.spelunk)(e,"x-ethers.version:string")){const t=r.slice(32,64),i=(0,u.spelunk)(e,"x-ethers.mnemonicCiphertext:data!"),o=(0,u.spelunk)(e,"x-ethers.mnemonicCounter:data!"),s=new n.CTR(t,o);p.mnemonic={path:(0,u.spelunk)(e,"x-ethers.path:string")||l,locale:(0,u.spelunk)(e,"x-ethers.locale:string")||"en",entropy:(0,a.hexlify)((0,a.getBytes)(s.decrypt(i)))}}return p}function h(e){const t=(0,u.spelunk)(e,"crypto.kdf:string");if(t&&"string"==typeof t){if("scrypt"===t.toLowerCase()){const r=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),n=(0,u.spelunk)(e,"crypto.kdfparams.n:int!"),i=(0,u.spelunk)(e,"crypto.kdfparams.r:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.p:int!");(0,a.assertArgument)(n>0&&!(n&n-1),"invalid kdf.N","kdf.N",n),(0,a.assertArgument)(i>0&&o>0,"invalid kdf","kdf",t);const s=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===s,"invalid kdf.dklen","kdf.dflen",s),{name:"scrypt",salt:r,N:n,r:i,p:o,dkLen:64}}if("pbkdf2"===t.toLowerCase()){const t=(0,u.spelunk)(e,"crypto.kdfparams.salt:data!"),r=(0,u.spelunk)(e,"crypto.kdfparams.prf:string!"),n=r.split("-").pop();(0,a.assertArgument)("sha256"===n||"sha512"===n,"invalid kdf.pdf","kdf.pdf",r);const i=(0,u.spelunk)(e,"crypto.kdfparams.c:int!"),o=(0,u.spelunk)(e,"crypto.kdfparams.dklen:int!");return(0,a.assertArgument)(32===o,"invalid kdf.dklen","kdf.dklen",o),{name:"pbkdf2",salt:t,count:i,dkLen:o,algorithm:n}}}(0,a.assertArgument)(!1,"unsupported key-derivation function","kdf",t)}function d(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}function p(e){const t=null!=e.salt?(0,a.getBytes)(e.salt,"options.salt"):(0,o.randomBytes)(32);let r=1<<17,n=8,i=1;return e.scrypt&&(e.scrypt.N&&(r=e.scrypt.N),e.scrypt.r&&(n=e.scrypt.r),e.scrypt.p&&(i=e.scrypt.p)),(0,a.assertArgument)("number"==typeof r&&r>0&&Number.isSafeInteger(r)&&(BigInt(r)&BigInt(r-1))===BigInt(0),"invalid scrypt N parameter","options.N",r),(0,a.assertArgument)("number"==typeof n&&n>0&&Number.isSafeInteger(n),"invalid scrypt r parameter","options.r",n),(0,a.assertArgument)("number"==typeof i&&i>0&&Number.isSafeInteger(i),"invalid scrypt p parameter","options.p",i),{name:"scrypt",dkLen:32,salt:t,N:r,r:n,p:i}}function g(e,t,r,i){const s=(0,a.getBytes)(r.privateKey,"privateKey"),f=null!=i.iv?(0,a.getBytes)(i.iv,"options.iv"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===f.length,"invalid options.iv length","options.iv",i.iv);const h=null!=i.uuid?(0,a.getBytes)(i.uuid,"options.uuid"):(0,o.randomBytes)(16);(0,a.assertArgument)(16===h.length,"invalid options.uuid length","options.uuid",i.iv);const d=e.slice(0,16),p=e.slice(16,32),g=new n.CTR(d,f),b=(0,a.getBytes)(g.encrypt(s)),y=(0,o.keccak256)((0,a.concat)([p,b])),m={address:r.address.substring(2).toLowerCase(),id:(0,a.uuidV4)(h),version:3,Crypto:{cipher:"aes-128-ctr",cipherparams:{iv:(0,a.hexlify)(f).substring(2)},ciphertext:(0,a.hexlify)(b).substring(2),kdf:"scrypt",kdfparams:{salt:(0,a.hexlify)(t.salt).substring(2),n:t.N,dklen:32,p:t.p,r:t.r},mac:y.substring(2)}};if(r.mnemonic){const t=null!=i.client?i.client:`ethers/${c.version}`,s=r.mnemonic.path||l,f=r.mnemonic.locale||"en",h=e.slice(32,64),d=(0,a.getBytes)(r.mnemonic.entropy,"account.mnemonic.entropy"),p=(0,o.randomBytes)(16),g=new n.CTR(h,p),b=(0,a.getBytes)(g.encrypt(d)),y=new Date,v="UTC--"+y.getUTCFullYear()+"-"+(0,u.zpad)(y.getUTCMonth()+1,2)+"-"+(0,u.zpad)(y.getUTCDate(),2)+"T"+(0,u.zpad)(y.getUTCHours(),2)+"-"+(0,u.zpad)(y.getUTCMinutes(),2)+"-"+(0,u.zpad)(y.getUTCSeconds(),2)+".0Z--"+m.address;m["x-ethers"]={client:t,gethFilename:v,path:s,locale:f,mnemonicCounter:(0,a.hexlify)(p).substring(2),mnemonicCiphertext:(0,a.hexlify)(b).substring(2),version:"0.1"}}return JSON.stringify(m)}t.isKeystoreJson=function(e){try{const t=JSON.parse(e);if(3===(null!=t.version?parseInt(t.version):0))return!0}catch(e){}return!1},t.decryptKeystoreJsonSync=function(e,t){const r=JSON.parse(e),n=(0,u.getPassword)(t),i=h(r);if("pbkdf2"===i.name){const{salt:e,count:t,dkLen:s,algorithm:a}=i;return f(r,(0,o.pbkdf2)(n,e,t,s,a))}(0,a.assert)("scrypt"===i.name,"cannot be reached","UNKNOWN_ERROR",{params:i});const{salt:s,N:c,r:l,p:d,dkLen:p}=i;return f(r,(0,o.scryptSync)(n,s,c,l,d,p))},t.decryptKeystoreJson=async function(e,t,r){const n=JSON.parse(e),i=(0,u.getPassword)(t),s=h(n);if("pbkdf2"===s.name){r&&(r(0),await d(0));const{salt:e,count:t,dkLen:a,algorithm:u}=s,c=(0,o.pbkdf2)(i,e,t,a,u);return r&&(r(1),await d(0)),f(n,c)}(0,a.assert)("scrypt"===s.name,"cannot be reached","UNKNOWN_ERROR",{params:s});const{salt:c,N:l,r:p,p:g,dkLen:b}=s;return f(n,await(0,o.scrypt)(i,c,l,p,g,b,r))},t.encryptKeystoreJsonSync=function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),s=(0,o.scryptSync)(n,i.salt,i.N,i.r,i.p,64);return g((0,a.getBytes)(s),i,e,r)},t.encryptKeystoreJson=async function(e,t,r){null==r&&(r={});const n=(0,u.getPassword)(t),i=p(r),s=await(0,o.scrypt)(n,i.salt,i.N,i.r,i.p,64,r.progressCallback);return g((0,a.getBytes)(s),i,e,r)}},61731:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.WebAuthnEventType=void 0,function(e){e.DEVICE_REGISTERED="deviceRegistered",e.DEVICE_REMOVED="deviceRemoved",e.AUTHENTICATION_SUCCESS="authenticationSuccess",e.AUTHENTICATION_FAILED="authenticationFailed",e.ERROR="error"}(r||(t.WebAuthnEventType=r={}))},61778:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.bufferToggle=void 0;var i=r(69879),o=r(65212),s=r(19724),a=r(17214),u=r(5717),c=r(54830);t.bufferToggle=function(e,t){return o.operate((function(r,o){var l=[];s.innerFrom(e).subscribe(a.createOperatorSubscriber(o,(function(e){var r=[];l.push(r);var n=new i.Subscription;n.add(s.innerFrom(t(e)).subscribe(a.createOperatorSubscriber(o,(function(){c.arrRemove(l,r),o.next(r),n.unsubscribe()}),u.noop)))}),u.noop)),r.subscribe(a.createOperatorSubscriber(o,(function(e){var t,r;try{for(var i=n(l),o=i.next();!o.done;o=i.next())o.value.push(e)}catch(e){t={error:e}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(t)throw t.error}}}),(function(){for(;l.length>0;)o.next(l.shift());o.complete()})))}))}},61891:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getCreate2Address=t.getCreateAddress=void 0;const n=r(32291),i=r(75347),o=r(87262);t.getCreateAddress=function(e){const t=(0,o.getAddress)(e.from);let r=(0,i.getBigInt)(e.nonce,"tx.nonce").toString(16);return r="0"===r?"0x":r.length%2?"0x0"+r:"0x"+r,(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.encodeRlp)([t,r])),12))},t.getCreate2Address=function(e,t,r){const s=(0,o.getAddress)(e),a=(0,i.getBytes)(t,"salt"),u=(0,i.getBytes)(r,"initCodeHash");return(0,i.assertArgument)(32===a.length,"salt must be 32 bytes","salt",t),(0,i.assertArgument)(32===u.length,"initCodeHash must be 32 bytes","initCodeHash",r),(0,o.getAddress)((0,i.dataSlice)((0,n.keccak256)((0,i.concat)(["0xff",s,a,u])),12))}},61949:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeBase64=t.decodeBase64=void 0;const n=r(87415);t.decodeBase64=function(e){e=atob(e);const t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return(0,n.getBytes)(t)},t.encodeBase64=function(e){const t=(0,n.getBytes)(e);let r="";for(let e=0;e<t.length;e++)r+=String.fromCharCode(t[e]);return btoa(r)}},62010:(e,t,r)=>{var n=r(56698),i=r(87568),o=i.base,s=i.bignum,a=i.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){o.Node.call(this,"der",e)}function l(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=a.tagClass[r>>6],i=!(32&r);if(31&~r)r&=31;else{var o=r;for(r=0;!(128&~o);){if(o=e.readUInt8(t),e.isError(o))return o;r<<=7,r|=127&o}}return{cls:n,primitive:i,tag:r,tagStr:a.tag[r]}}function f(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var i=127&n;if(i>4)return e.error("length octect is too long");n=0;for(var o=0;o<i;o++){n<<=8;var s=e.readUInt8(r);if(e.isError(s))return s;n|=s}return n}e.exports=u,u.prototype.decode=function(e,t){return e instanceof o.DecoderBuffer||(e=new o.DecoderBuffer(e,t)),this.tree._decode(e,t)},n(c,o.Node),c.prototype._peekTag=function(e,t,r){if(e.isEmpty())return!1;var n=e.save(),i=l(e,'Failed to peek tag: "'+t+'"');return e.isError(i)?i:(e.restore(n),i.tag===t||i.tagStr===t||i.tagStr+"of"===t||r)},c.prototype._decodeTag=function(e,t,r){var n=l(e,'Failed to decode tag of "'+t+'"');if(e.isError(n))return n;var i=f(e,n.primitive,'Failed to get length of "'+t+'"');if(e.isError(i))return i;if(!r&&n.tag!==t&&n.tagStr!==t&&n.tagStr+"of"!==t)return e.error('Failed to match tag: "'+t+'"');if(n.primitive||null!==i)return e.skip(i,'Failed to match body of: "'+t+'"');var o=e.save(),s=this._skipUntilEnd(e,'Failed to skip indefinite length body: "'+this.tag+'"');return e.isError(s)?s:(i=e.offset-o.offset,e.restore(o),e.skip(i,'Failed to match body of: "'+t+'"'))},c.prototype._skipUntilEnd=function(e,t){for(;;){var r=l(e,t);if(e.isError(r))return r;var n,i=f(e,r.primitive,t);if(e.isError(i))return i;if(n=r.primitive||null!==i?e.skip(i):this._skipUntilEnd(e,t),e.isError(n))return n;if("end"===r.tagStr)break}},c.prototype._decodeList=function(e,t,r,n){for(var i=[];!e.isEmpty();){var o=this._peekTag(e,"end");if(e.isError(o))return o;var s=r.decode(e,"der",n);if(e.isError(s)&&o)break;i.push(s)}return i},c.prototype._decodeStr=function(e,t){if("bitstr"===t){var r=e.readUInt8();return e.isError(r)?r:{unused:r,data:e.raw()}}if("bmpstr"===t){var n=e.raw();if(n.length%2==1)return e.error("Decoding of string type: bmpstr length mismatch");for(var i="",o=0;o<n.length/2;o++)i+=String.fromCharCode(n.readUInt16BE(2*o));return i}if("numstr"===t){var s=e.raw().toString("ascii");return this._isNumstr(s)?s:e.error("Decoding of string type: numstr unsupported characters")}if("octstr"===t)return e.raw();if("objDesc"===t)return e.raw();if("printstr"===t){var a=e.raw().toString("ascii");return this._isPrintstr(a)?a:e.error("Decoding of string type: printstr unsupported characters")}return/str$/.test(t)?e.raw().toString():e.error("Decoding of string type: "+t+" unsupported")},c.prototype._decodeObjid=function(e,t,r){for(var n,i=[],o=0;!e.isEmpty();){var s=e.readUInt8();o<<=7,o|=127&s,128&s||(i.push(o),o=0)}128&s&&i.push(o);var a=i[0]/40|0,u=i[0]%40;if(n=r?i:[a,u].concat(i.slice(1)),t){var c=t[n.join(" ")];void 0===c&&(c=t[n.join(".")]),void 0!==c&&(n=c)}return n},c.prototype._decodeTime=function(e,t){var r=e.raw().toString();if("gentime"===t)var n=0|r.slice(0,4),i=0|r.slice(4,6),o=0|r.slice(6,8),s=0|r.slice(8,10),a=0|r.slice(10,12),u=0|r.slice(12,14);else{if("utctime"!==t)return e.error("Decoding "+t+" time is not supported yet");n=0|r.slice(0,2),i=0|r.slice(2,4),o=0|r.slice(4,6),s=0|r.slice(6,8),a=0|r.slice(8,10),u=0|r.slice(10,12),n=n<70?2e3+n:1900+n}return Date.UTC(n,i-1,o,s,a,u,0)},c.prototype._decodeNull=function(e){return null},c.prototype._decodeBool=function(e){var t=e.readUInt8();return e.isError(t)?t:0!==t},c.prototype._decodeInt=function(e,t){var r=e.raw(),n=new s(r);return t&&(n=t[n.toString(10)]||n),n},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getDecoder("der").tree}},62275:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.interval=void 0;var n=r(62326),i=r(5825);t.interval=function(e,t){return void 0===e&&(e=0),void 0===t&&(t=n.asyncScheduler),e<0&&(e=0),i.timer(e,e,t)}},62326:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.async=t.asyncScheduler=void 0;var n=r(64772),i=r(19533);t.asyncScheduler=new i.AsyncScheduler(n.AsyncAction),t.async=t.asyncScheduler},62422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.negateCt=a,t.normalizeZ=function(e,t,r){const n="pz"===t?e=>e.pz:e=>e.ez,o=(0,i.FpInvertBatch)(e.Fp,r.map(n));return r.map(((e,t)=>e.toAffine(o[t]))).map(e.fromAffine)},t.wNAF=function(e,t){return{constTimeNegate:a,hasPrecomputes:e=>1!==g(e),unsafeLadder(t,r,n=e.ZERO){let i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,r){const{windows:n,windowSize:i}=c(r,t),o=[];let s=e,a=s;for(let e=0;e<n;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(r,n,i){let o=e.ZERO,s=e.BASE;const u=c(r,t);for(let e=0;e<u.windows;e++){const{nextN:t,offset:r,isZero:c,isNeg:f,isNegF:h,offsetF:d}=l(i,e,u);i=t,c?s=s.add(a(h,n[d])):o=o.add(a(f,n[r]))}return b(i),{p:o,f:s}},wNAFUnsafe(r,n,i,s=e.ZERO){const a=c(r,t);for(let e=0;e<a.windows&&i!==o;e++){const{nextN:t,offset:r,isZero:o,isNeg:u}=l(i,e,a);if(i=t,!o){const e=n[r];s=s.add(u?e.negate():e)}}return b(i),s},getPrecomputes(e,t,r){let n=d.get(t);return n||(n=this.precomputeWindow(t,e),1!==e&&("function"==typeof r&&(n=r(n)),d.set(t,n))),n},wNAFCached(e,t,r){const n=g(e);return this.wNAF(n,this.getPrecomputes(n,e,r),t)},wNAFCachedUnsafe(e,t,r,n){const i=g(e);return 1===i?this.unsafeLadder(e,t,n):this.wNAFUnsafe(i,this.getPrecomputes(i,e,r),t,n)},setWindowSize(e,r){u(r,t),p.set(e,r),d.delete(e)}}},t.mulEndoUnsafe=function(e,t,r,n){let i=t,a=e.ZERO,u=e.ZERO;for(;r>o||n>o;)r&s&&(a=a.add(i)),n&s&&(u=u.add(i)),i=i.double(),r>>=s,n>>=s;return{p1:a,p2:u}},t.pippenger=function(e,t,r,i){f(r,e),h(i,t);const o=r.length,s=i.length;if(o!==s)throw new Error("arrays of points and scalars must have equal length");const a=e.ZERO,u=(0,n.bitLen)(BigInt(o));let c=1;u>12?c=u-3:u>4?c=u-2:u>0&&(c=2);const l=(0,n.bitMask)(c),d=new Array(Number(l)+1).fill(a);let p=a;for(let e=Math.floor((t.BITS-1)/c)*c;e>=0;e-=c){d.fill(a);for(let t=0;t<s;t++){const n=i[t],o=Number(n>>BigInt(e)&l);d[o]=d[o].add(r[t])}let t=a;for(let e=d.length-1,r=a;e>0;e--)r=r.add(d[e]),t=t.add(r);if(p=p.add(t),0!==e)for(let e=0;e<c;e++)p=p.double()}return p},t.precomputeMSMUnsafe=function(e,t,r,i){u(i,t.BITS),f(r,e);const o=e.ZERO,s=2**i-1,a=Math.ceil(t.BITS/i),c=(0,n.bitMask)(i),l=r.map((e=>{const t=[];for(let r=0,n=e;r<s;r++)t.push(n),n=n.add(e);return t}));return e=>{if(h(e,t),e.length>r.length)throw new Error("array of scalars must be smaller than array of points");let n=o;for(let t=0;t<a;t++){if(n!==o)for(let e=0;e<i;e++)n=n.double();const r=BigInt(a*i-(t+1)*i);for(let t=0;t<e.length;t++){const i=e[t],o=Number(i>>r&c);o&&(n=n.add(l[t][o-1]))}}return n}},t.validateBasic=function(e){return(0,i.validateField)(e.Fp),(0,n.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,i.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})},t._createCurveFields=function(e,t,r={}){if(!t||"object"!=typeof t)throw new Error(`expected valid ${e} CURVE object`);for(const e of["p","n","h"]){const r=t[e];if(!("bigint"==typeof r&&r>o))throw new Error(`CURVE.${e} must be positive bigint`)}const n=y(t.p,r.Fp),i=y(t.n,r.Fn),s=["Gx","Gy","a","weierstrass"===e?"b":"d"];for(const e of s)if(!n.isValid(t[e]))throw new Error(`CURVE.${e} must be valid field element of CURVE.Fp`);return{Fp:n,Fn:i}};const n=r(58627),i=r(24967),o=BigInt(0),s=BigInt(1);function a(e,t){const r=t.negate();return e?r:t}function u(e,t){if(!Number.isSafeInteger(e)||e<=0||e>t)throw new Error("invalid window size, expected [1.."+t+"], got W="+e)}function c(e,t){u(e,t);const r=2**e;return{windows:Math.ceil(t/e)+1,windowSize:2**(e-1),mask:(0,n.bitMask)(e),maxNumber:r,shiftBy:BigInt(e)}}function l(e,t,r){const{windowSize:n,mask:i,maxNumber:o,shiftBy:a}=r;let u=Number(e&i),c=e>>a;u>n&&(u-=o,c+=s);const l=t*n;return{nextN:c,offset:l+Math.abs(u)-1,isZero:0===u,isNeg:u<0,isNegF:t%2!=0,offsetF:l}}function f(e,t){if(!Array.isArray(e))throw new Error("array expected");e.forEach(((e,r)=>{if(!(e instanceof t))throw new Error("invalid point at index "+r)}))}function h(e,t){if(!Array.isArray(e))throw new Error("array of scalars expected");e.forEach(((e,r)=>{if(!t.isValid(e))throw new Error("invalid scalar at index "+r)}))}const d=new WeakMap,p=new WeakMap;function g(e){return p.get(e)||1}function b(e){if(e!==o)throw new Error("invalid wNAF")}function y(e,t){if(t){if(t.ORDER!==e)throw new Error("Field.ORDER must match order: Fp == p, Fn == n");return(0,i.validateField)(t),t}return(0,i.Field)(e)}},62560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isObservable=void 0;var n=r(48051),i=r(10281);t.isObservable=function(e){return!!e&&(e instanceof n.Observable||i.isFunction(e.lift)&&i.isFunction(e.subscribe))}},62802:(e,t,r)=>{var n=e.exports=function(e){e=e.toLowerCase();var t=n[e];if(!t)throw new Error(e+" is not supported (we accept pull requests)");return new t};n.sha=r(27816),n.sha1=r(63737),n.sha224=r(26710),n.sha256=r(24107),n.sha384=r(32827),n.sha512=r(82890)},62893:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.windowCount=void 0;var i=r(76808),o=r(65212),s=r(17214);t.windowCount=function(e,t){void 0===t&&(t=0);var r=t>0?t:e;return o.operate((function(t,o){var a=[new i.Subject],u=0;o.next(a[0].asObservable()),t.subscribe(s.createOperatorSubscriber(o,(function(t){var s,c;try{for(var l=n(a),f=l.next();!f.done;f=l.next())f.value.next(t)}catch(e){s={error:e}}finally{try{f&&!f.done&&(c=l.return)&&c.call(l)}finally{if(s)throw s.error}}var h=u-e+1;if(h>=0&&h%r===0&&a.shift().complete(),++u%r===0){var d=new i.Subject;a.push(d),o.next(d.asObservable())}}),(function(){for(;a.length>0;)a.shift().complete();o.complete()}),(function(e){for(;a.length>0;)a.shift().error(e);o.error(e)}),(function(){a=null})))}))}},62951:e=>{"use strict";e.exports=JSON.parse('{"sha224WithRSAEncryption":{"sign":"rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"RSA-SHA224":{"sign":"ecdsa/rsa","hash":"sha224","id":"302d300d06096086480165030402040500041c"},"sha256WithRSAEncryption":{"sign":"rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"RSA-SHA256":{"sign":"ecdsa/rsa","hash":"sha256","id":"3031300d060960864801650304020105000420"},"sha384WithRSAEncryption":{"sign":"rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"RSA-SHA384":{"sign":"ecdsa/rsa","hash":"sha384","id":"3041300d060960864801650304020205000430"},"sha512WithRSAEncryption":{"sign":"rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA512":{"sign":"ecdsa/rsa","hash":"sha512","id":"3051300d060960864801650304020305000440"},"RSA-SHA1":{"sign":"rsa","hash":"sha1","id":"3021300906052b0e03021a05000414"},"ecdsa-with-SHA1":{"sign":"ecdsa","hash":"sha1","id":""},"sha256":{"sign":"ecdsa","hash":"sha256","id":""},"sha224":{"sign":"ecdsa","hash":"sha224","id":""},"sha384":{"sign":"ecdsa","hash":"sha384","id":""},"sha512":{"sign":"ecdsa","hash":"sha512","id":""},"DSA-SHA":{"sign":"dsa","hash":"sha1","id":""},"DSA-SHA1":{"sign":"dsa","hash":"sha1","id":""},"DSA":{"sign":"dsa","hash":"sha1","id":""},"DSA-WITH-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-SHA224":{"sign":"dsa","hash":"sha224","id":""},"DSA-WITH-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-SHA256":{"sign":"dsa","hash":"sha256","id":""},"DSA-WITH-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-SHA384":{"sign":"dsa","hash":"sha384","id":""},"DSA-WITH-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-SHA512":{"sign":"dsa","hash":"sha512","id":""},"DSA-RIPEMD160":{"sign":"dsa","hash":"rmd160","id":""},"ripemd160WithRSA":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"RSA-RIPEMD160":{"sign":"rsa","hash":"rmd160","id":"3021300906052b2403020105000414"},"md5WithRSAEncryption":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"},"RSA-MD5":{"sign":"rsa","hash":"md5","id":"3020300c06082a864886f70d020505000410"}}')},63053:(e,t,r)=>{var n=r(30295),i=r(92861).Buffer,o=r(45122);function s(e){var t=e._cipher.encryptBlockRaw(e._prev);return o(e._prev),t}t.encrypt=function(e,t){var r=Math.ceil(t.length/16),o=e._cache.length;e._cache=i.concat([e._cache,i.allocUnsafe(16*r)]);for(var a=0;a<r;a++){var u=s(e),c=o+16*a;e._cache.writeUInt32BE(u[0],c+0),e._cache.writeUInt32BE(u[1],c+4),e._cache.writeUInt32BE(u[2],c+8),e._cache.writeUInt32BE(u[3],c+12)}var l=e._cache.slice(0,t.length);return e._cache=e._cache.slice(t.length),n(t,l)}},63600:(e,t,r)=>{"use strict";e.exports=i;var n=r(74610);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(56698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},63737:(e,t,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1518500249,1859775393,-1894007588,-899497514],a=new Array(80);function u(){this.init(),this._w=a,i.call(this,64,56)}function c(e){return e<<5|e>>>27}function l(e){return e<<30|e>>>2}function f(e,t,r,n){return 0===e?t&r|~t&n:2===e?t&r|t&n|r&n:t^r^n}n(u,i),u.prototype.init=function(){return this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520,this},u.prototype._update=function(e){for(var t,r=this._w,n=0|this._a,i=0|this._b,o=0|this._c,a=0|this._d,u=0|this._e,h=0;h<16;++h)r[h]=e.readInt32BE(4*h);for(;h<80;++h)r[h]=(t=r[h-3]^r[h-8]^r[h-14]^r[h-16])<<1|t>>>31;for(var d=0;d<80;++d){var p=~~(d/20),g=c(n)+f(p,i,o,a)+u+r[d]+s[p]|0;u=a,a=o,o=l(i),i=n,n=g}this._a=n+this._a|0,this._b=i+this._b|0,this._c=o+this._c|0,this._d=a+this._d|0,this._e=u+this._e|0},u.prototype._hash=function(){var e=o.allocUnsafe(20);return e.writeInt32BE(0|this._a,0),e.writeInt32BE(0|this._b,4),e.writeInt32BE(0|this._c,8),e.writeInt32BE(0|this._d,12),e.writeInt32BE(0|this._e,16),e},e.exports=u},63807:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TransactionResponse=t.TransactionReceipt=t.Log=t.Block=t.copyRequest=t.FeeData=void 0;const n=r(75347),i=r(77778),o=BigInt(0);function s(e){return null==e?null:e}function a(e){return null==e?null:e.toString()}t.FeeData=class{gasPrice;maxFeePerGas;maxPriorityFeePerGas;constructor(e,t,r){(0,n.defineProperties)(this,{gasPrice:s(e),maxFeePerGas:s(t),maxPriorityFeePerGas:s(r)})}toJSON(){const{gasPrice:e,maxFeePerGas:t,maxPriorityFeePerGas:r}=this;return{_type:"FeeData",gasPrice:a(e),maxFeePerGas:a(t),maxPriorityFeePerGas:a(r)}}},t.copyRequest=function(e){const t={};e.to&&(t.to=e.to),e.from&&(t.from=e.from),e.data&&(t.data=(0,n.hexlify)(e.data));const r="chainId,gasLimit,gasPrice,maxFeePerBlobGas,maxFeePerGas,maxPriorityFeePerGas,value".split(/,/);for(const i of r)i in e&&null!=e[i]&&(t[i]=(0,n.getBigInt)(e[i],`request.${i}`));const o="type,nonce".split(/,/);for(const r of o)r in e&&null!=e[r]&&(t[r]=(0,n.getNumber)(e[r],`request.${r}`));return e.accessList&&(t.accessList=(0,i.accessListify)(e.accessList)),e.authorizationList&&(t.authorizationList=e.authorizationList.slice()),"blockTag"in e&&(t.blockTag=e.blockTag),"enableCcipRead"in e&&(t.enableCcipRead=!!e.enableCcipRead),"customData"in e&&(t.customData=e.customData),"blobVersionedHashes"in e&&e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes.slice()),"kzg"in e&&(t.kzg=e.kzg),"blobs"in e&&e.blobs&&(t.blobs=e.blobs.map((e=>(0,n.isBytesLike)(e)?(0,n.hexlify)(e):Object.assign({},e)))),t};class u{provider;number;hash;timestamp;parentHash;parentBeaconBlockRoot;nonce;difficulty;gasLimit;gasUsed;stateRoot;receiptsRoot;blobGasUsed;excessBlobGas;miner;prevRandao;extraData;baseFeePerGas;#Ie;constructor(e,t){this.#Ie=e.transactions.map((e=>"string"!=typeof e?new f(e,t):e)),(0,n.defineProperties)(this,{provider:t,hash:s(e.hash),number:e.number,timestamp:e.timestamp,parentHash:e.parentHash,parentBeaconBlockRoot:e.parentBeaconBlockRoot,nonce:e.nonce,difficulty:e.difficulty,gasLimit:e.gasLimit,gasUsed:e.gasUsed,blobGasUsed:e.blobGasUsed,excessBlobGas:e.excessBlobGas,miner:e.miner,prevRandao:s(e.prevRandao),extraData:e.extraData,baseFeePerGas:s(e.baseFeePerGas),stateRoot:e.stateRoot,receiptsRoot:e.receiptsRoot})}get transactions(){return this.#Ie.map((e=>"string"==typeof e?e:e.hash))}get prefetchedTransactions(){const e=this.#Ie.slice();return 0===e.length?[]:((0,n.assert)("object"==typeof e[0],"transactions were not prefetched with block request","UNSUPPORTED_OPERATION",{operation:"transactionResponses()"}),e)}toJSON(){const{baseFeePerGas:e,difficulty:t,extraData:r,gasLimit:n,gasUsed:i,hash:o,miner:s,prevRandao:u,nonce:c,number:l,parentHash:f,parentBeaconBlockRoot:h,stateRoot:d,receiptsRoot:p,timestamp:g,transactions:b}=this;return{_type:"Block",baseFeePerGas:a(e),difficulty:a(t),extraData:r,gasLimit:a(n),gasUsed:a(i),blobGasUsed:a(this.blobGasUsed),excessBlobGas:a(this.excessBlobGas),hash:o,miner:s,prevRandao:u,nonce:c,number:l,parentHash:f,timestamp:g,parentBeaconBlockRoot:h,stateRoot:d,receiptsRoot:p,transactions:b}}[Symbol.iterator](){let e=0;const t=this.transactions;return{next:()=>e<this.length?{value:t[e++],done:!1}:{value:void 0,done:!0}}}get length(){return this.#Ie.length}get date(){return null==this.timestamp?null:new Date(1e3*this.timestamp)}async getTransaction(e){let t;if("number"==typeof e)t=this.#Ie[e];else{const r=e.toLowerCase();for(const e of this.#Ie){if("string"==typeof e){if(e!==r)continue;t=e;break}if(e.hash===r){t=e;break}}}if(null==t)throw new Error("no such tx");return"string"==typeof t?await this.provider.getTransaction(t):t}getPrefetchedTransaction(e){const t=this.prefetchedTransactions;if("number"==typeof e)return t[e];e=e.toLowerCase();for(const r of t)if(r.hash===e)return r;(0,n.assertArgument)(!1,"no matching transaction","indexOrHash",e)}isMined(){return!!this.hash}isLondon(){return!!this.baseFeePerGas}orphanedEvent(){if(!this.isMined())throw new Error("");return{orphan:"drop-block",hash:this.hash,number:this.number}}}t.Block=u;class c{provider;transactionHash;blockHash;blockNumber;removed;address;data;topics;index;transactionIndex;constructor(e,t){this.provider=t;const r=Object.freeze(e.topics.slice());(0,n.defineProperties)(this,{transactionHash:e.transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,removed:e.removed,address:e.address,data:e.data,topics:r,index:e.index,transactionIndex:e.transactionIndex})}toJSON(){const{address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:u}=this;return{_type:"log",address:e,blockHash:t,blockNumber:r,data:n,index:i,removed:o,topics:s,transactionHash:a,transactionIndex:u}}async getBlock(){const e=await this.provider.getBlock(this.blockHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransaction(){const e=await this.provider.getTransaction(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction","UNKNOWN_ERROR",{}),e}async getTransactionReceipt(){const e=await this.provider.getTransactionReceipt(this.transactionHash);return(0,n.assert)(!!e,"failed to find transaction receipt","UNKNOWN_ERROR",{}),e}removedEvent(){return{orphan:"drop-log",log:{transactionHash:(e=this).transactionHash,blockHash:e.blockHash,blockNumber:e.blockNumber,address:e.address,data:e.data,topics:Object.freeze(e.topics.slice()),index:e.index}};var e}}t.Log=c;class l{provider;to;from;contractAddress;hash;index;blockHash;blockNumber;logsBloom;gasUsed;blobGasUsed;cumulativeGasUsed;gasPrice;blobGasPrice;type;status;root;#Ce;constructor(e,t){this.#Ce=Object.freeze(e.logs.map((e=>new c(e,t))));let r=o;null!=e.effectiveGasPrice?r=e.effectiveGasPrice:null!=e.gasPrice&&(r=e.gasPrice),(0,n.defineProperties)(this,{provider:t,to:e.to,from:e.from,contractAddress:e.contractAddress,hash:e.hash,index:e.index,blockHash:e.blockHash,blockNumber:e.blockNumber,logsBloom:e.logsBloom,gasUsed:e.gasUsed,cumulativeGasUsed:e.cumulativeGasUsed,blobGasUsed:e.blobGasUsed,gasPrice:r,blobGasPrice:e.blobGasPrice,type:e.type,status:e.status,root:e.root})}get logs(){return this.#Ce}toJSON(){const{to:e,from:t,contractAddress:r,hash:n,index:i,blockHash:o,blockNumber:s,logsBloom:u,logs:c,status:l,root:f}=this;return{_type:"TransactionReceipt",blockHash:o,blockNumber:s,contractAddress:r,cumulativeGasUsed:a(this.cumulativeGasUsed),from:t,gasPrice:a(this.gasPrice),blobGasUsed:a(this.blobGasUsed),blobGasPrice:a(this.blobGasPrice),gasUsed:a(this.gasUsed),hash:n,index:i,logs:c,logsBloom:u,root:f,status:l,to:e}}get length(){return this.logs.length}[Symbol.iterator](){let e=0;return{next:()=>e<this.length?{value:this.logs[e++],done:!1}:{value:void 0,done:!0}}}get fee(){return this.gasUsed*this.gasPrice}async getBlock(){const e=await this.provider.getBlock(this.blockHash);if(null==e)throw new Error("TODO");return e}async getTransaction(){const e=await this.provider.getTransaction(this.hash);if(null==e)throw new Error("TODO");return e}async getResult(){return await this.provider.getTransactionResult(this.hash)}async confirmations(){return await this.provider.getBlockNumber()-this.blockNumber+1}removedEvent(){return d(this)}reorderedEvent(e){return(0,n.assert)(!e||e.isMined(),"unmined 'other' transction cannot be orphaned","UNSUPPORTED_OPERATION",{operation:"reorderedEvent(other)"}),h(this,e)}}t.TransactionReceipt=l;class f{provider;blockNumber;blockHash;index;hash;type;to;from;nonce;gasLimit;gasPrice;maxPriorityFeePerGas;maxFeePerGas;maxFeePerBlobGas;data;value;chainId;signature;accessList;blobVersionedHashes;authorizationList;#Re;constructor(e,t){this.provider=t,this.blockNumber=null!=e.blockNumber?e.blockNumber:null,this.blockHash=null!=e.blockHash?e.blockHash:null,this.hash=e.hash,this.index=e.index,this.type=e.type,this.from=e.from,this.to=e.to||null,this.gasLimit=e.gasLimit,this.nonce=e.nonce,this.data=e.data,this.value=e.value,this.gasPrice=e.gasPrice,this.maxPriorityFeePerGas=null!=e.maxPriorityFeePerGas?e.maxPriorityFeePerGas:null,this.maxFeePerGas=null!=e.maxFeePerGas?e.maxFeePerGas:null,this.maxFeePerBlobGas=null!=e.maxFeePerBlobGas?e.maxFeePerBlobGas:null,this.chainId=e.chainId,this.signature=e.signature,this.accessList=null!=e.accessList?e.accessList:null,this.blobVersionedHashes=null!=e.blobVersionedHashes?e.blobVersionedHashes:null,this.authorizationList=null!=e.authorizationList?e.authorizationList:null,this.#Re=-1}toJSON(){const{blockNumber:e,blockHash:t,index:r,hash:n,type:i,to:o,from:s,nonce:u,data:c,signature:l,accessList:f,blobVersionedHashes:h}=this;return{_type:"TransactionResponse",accessList:f,blockNumber:e,blockHash:t,blobVersionedHashes:h,chainId:a(this.chainId),data:c,from:s,gasLimit:a(this.gasLimit),gasPrice:a(this.gasPrice),hash:n,maxFeePerGas:a(this.maxFeePerGas),maxPriorityFeePerGas:a(this.maxPriorityFeePerGas),maxFeePerBlobGas:a(this.maxFeePerBlobGas),nonce:u,signature:l,to:o,index:r,type:i,value:a(this.value)}}async getBlock(){let e=this.blockNumber;if(null==e){const t=await this.getTransaction();t&&(e=t.blockNumber)}if(null==e)return null;const t=this.provider.getBlock(e);if(null==t)throw new Error("TODO");return t}async getTransaction(){return this.provider.getTransaction(this.hash)}async confirmations(){if(null==this.blockNumber){const{tx:e,blockNumber:t}=await(0,n.resolveProperties)({tx:this.getTransaction(),blockNumber:this.provider.getBlockNumber()});return null==e||null==e.blockNumber?0:t-e.blockNumber+1}return await this.provider.getBlockNumber()-this.blockNumber+1}async wait(e,t){const r=null==e?1:e,i=null==t?0:t;let s=this.#Re,a=-1,u=-1===s;const c=async()=>{if(u)return null;const{blockNumber:e,nonce:t}=await(0,n.resolveProperties)({blockNumber:this.provider.getBlockNumber(),nonce:this.provider.getTransactionCount(this.from)});if(t<this.nonce)return void(s=e);if(u)return null;const i=await this.getTransaction();if(!i||null==i.blockNumber)for(-1===a&&(a=s-3,a<this.#Re&&(a=this.#Re));a<=e;){if(u)return null;const t=await this.provider.getBlock(a,!0);if(null==t)return;for(const e of t)if(e===this.hash)return;for(let i=0;i<t.length;i++){const a=await t.getTransaction(i);if(a.from===this.from&&a.nonce===this.nonce){if(u)return null;const t=await this.provider.getTransactionReceipt(a.hash);if(null==t)return;if(e-t.blockNumber+1<r)return;let i="replaced";a.data===this.data&&a.to===this.to&&a.value===this.value?i="repriced":"0x"===a.data&&a.from===a.to&&a.value===o&&(i="cancelled"),(0,n.assert)(!1,"transaction was replaced","TRANSACTION_REPLACED",{cancelled:"replaced"===i||"cancelled"===i,reason:i,replacement:a.replaceableTransaction(s),hash:a.hash,receipt:t})}}a++}},l=e=>{if(null==e||0!==e.status)return e;(0,n.assert)(!1,"transaction execution reverted","CALL_EXCEPTION",{action:"sendTransaction",data:null,reason:null,invocation:null,revert:null,transaction:{to:e.to,from:e.from,data:""},receipt:e})},f=await this.provider.getTransactionReceipt(this.hash);if(0===r)return l(f);if(f){if(1===r||await f.confirmations()>=r)return l(f)}else if(await c(),0===r)return null;const h=new Promise(((e,t)=>{const o=[],a=()=>{o.forEach((e=>e()))};if(o.push((()=>{u=!0})),i>0){const e=setTimeout((()=>{a(),t((0,n.makeError)("wait for transaction timeout","TIMEOUT"))}),i);o.push((()=>{clearTimeout(e)}))}const f=async n=>{if(await n.confirmations()>=r){a();try{e(l(n))}catch(e){t(e)}}};if(o.push((()=>{this.provider.off(this.hash,f)})),this.provider.on(this.hash,f),s>=0){const e=async()=>{try{await c()}catch(e){if((0,n.isError)(e,"TRANSACTION_REPLACED"))return a(),void t(e)}u||this.provider.once("block",e)};o.push((()=>{this.provider.off("block",e)})),this.provider.once("block",e)}}));return await h}isMined(){return null!=this.blockHash}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}removedEvent(){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),d(this)}reorderedEvent(e){return(0,n.assert)(this.isMined(),"unmined transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),(0,n.assert)(!e||e.isMined(),"unmined 'other' transaction canot be orphaned","UNSUPPORTED_OPERATION",{operation:"removeEvent()"}),h(this,e)}replaceableTransaction(e){(0,n.assertArgument)(Number.isInteger(e)&&e>=0,"invalid startBlock","startBlock",e);const t=new f(this,this.provider);return t.#Re=e,t}}function h(e,t){return{orphan:"reorder-transaction",tx:e,other:t}}function d(e){return{orphan:"drop-transaction",tx:e}}t.TransactionResponse=f},63913:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WebSocket=void 0;const n=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}().WebSocket;t.WebSocket=n},64196:e=>{var t=Math.pow(2,30)-1;e.exports=function(e,r){if("number"!=typeof e)throw new TypeError("Iterations not a number");if(e<0)throw new TypeError("Bad iterations");if("number"!=typeof r)throw new TypeError("Key length not a number");if(r<0||r>t||r!=r)throw new TypeError("Bad key length")}},64367:(e,t)=>{"use strict";var r=t;function n(e){return 1===e.length?"0"+e:e}function i(e){for(var t="",r=0;r<e.length;r++)t+=n(e[r].toString(16));return t}r.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"!=typeof e){for(var n=0;n<e.length;n++)r[n]=0|e[n];return r}if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),n=0;n<e.length;n+=2)r.push(parseInt(e[n]+e[n+1],16));else for(n=0;n<e.length;n++){var i=e.charCodeAt(n),o=i>>8,s=255&i;o?r.push(o,s):r.push(s)}return r},r.zero2=n,r.toHex=i,r.encode=function(e,t){return"hex"===t?i(e):e}},64584:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.IpcSocketProvider=void 0,t.IpcSocketProvider=void 0},64589:e=>{"use strict";e.exports=JSON.parse('{"1.3.132.0.10":"secp256k1","1.3.132.0.33":"p224","1.2.840.10045.3.1.1":"p192","1.2.840.10045.3.1.7":"p256","1.3.132.0.34":"p384","1.3.132.0.35":"p521"}')},64634:e=>{var t={}.toString;e.exports=Array.isArray||function(e){return"[object Array]"==t.call(e)}},64772:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsyncAction=void 0;var o=r(71666),s=r(8284),a=r(54830),u=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n.pending=!1,n}return i(t,e),t.prototype.schedule=function(e,t){var r;if(void 0===t&&(t=0),this.closed)return this;this.state=e;var n=this.id,i=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(i,n,t)),this.pending=!0,this.delay=t,this.id=null!==(r=this.id)&&void 0!==r?r:this.requestAsyncId(i,this.id,t),this},t.prototype.requestAsyncId=function(e,t,r){return void 0===r&&(r=0),s.intervalProvider.setInterval(e.flush.bind(e,this),r)},t.prototype.recycleAsyncId=function(e,t,r){if(void 0===r&&(r=0),null!=r&&this.delay===r&&!1===this.pending)return t;null!=t&&s.intervalProvider.clearInterval(t)},t.prototype.execute=function(e,t){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var r=this._execute(e,t);if(r)return r;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},t.prototype._execute=function(e,t){var r,n=!1;try{this.work(e)}catch(e){n=!0,r=e||new Error("Scheduled action threw falsy error")}if(n)return this.unsubscribe(),r},t.prototype.unsubscribe=function(){if(!this.closed){var t=this.id,r=this.scheduler,n=r.actions;this.work=this.state=this.scheduler=null,this.pending=!1,a.arrRemove(n,this),null!=t&&(this.id=this.recycleAsyncId(r,t,null)),this.delay=null,e.prototype.unsubscribe.call(this)}},t}(o.Action);t.AsyncAction=u},64948:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatest=void 0;var o=r(88246),s=r(65212),a=r(7652),u=r(13916),c=r(99517),l=r(26404);t.combineLatest=function e(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];var f=l.popResultSelector(t);return f?c.pipe(e.apply(void 0,i([],n(t))),u.mapOneOrManyArgs(f)):s.operate((function(e,r){o.combineLatestInit(i([e],n(a.argsOrArgArray(t))))(r)}))}},65156:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowWhen=void 0;var n=r(76808),i=r(65212),o=r(17214),s=r(19724);t.windowWhen=function(e){return i.operate((function(t,r){var i,a,u=function(e){i.error(e),r.error(e)},c=function(){var t;null==a||a.unsubscribe(),null==i||i.complete(),i=new n.Subject,r.next(i.asObservable());try{t=s.innerFrom(e())}catch(e){return void u(e)}t.subscribe(a=o.createOperatorSubscriber(r,c,c,u))};c(),t.subscribe(o.createOperatorSubscriber(r,(function(e){return i.next(e)}),(function(){i.complete(),r.complete()}),u,(function(){null==a||a.unsubscribe(),i=null})))}))}},65212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.operate=t.hasLift=void 0;var n=r(10281);function i(e){return n.isFunction(null==e?void 0:e.lift)}t.hasLift=i,t.operate=function(e){return function(t){if(i(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},65239:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ZeroAddress=void 0,t.ZeroAddress="0x0000000000000000000000000000000000000000"},65279:(e,t,r)=>{"use strict";var n=r(43349),i=r(56698),o=r(82808),s=r(82211);function a(e,t){n.equal(t.length,24,"Invalid key length");var r=t.slice(0,8),i=t.slice(8,16),o=t.slice(16,24);this.ciphers="encrypt"===e?[s.create({type:"encrypt",key:r}),s.create({type:"decrypt",key:i}),s.create({type:"encrypt",key:o})]:[s.create({type:"decrypt",key:o}),s.create({type:"encrypt",key:i}),s.create({type:"decrypt",key:r})]}function u(e){o.call(this,e);var t=new a(this.type,this.options.key);this._edeState=t}i(u,o),e.exports=u,u.create=function(e){return new u(e)},u.prototype._update=function(e,t,r,n){var i=this._edeState;i.ciphers[0]._update(e,t,r,n),i.ciphers[1]._update(r,n,r,n),i.ciphers[2]._update(r,n,r,n)},u.prototype._pad=s.prototype._pad,u.prototype._unpad=s.prototype._unpad},65291:(e,t,r)=>{"use strict";var n=r(86048).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},65606:e=>{var t,r,n=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(e){if(t===setTimeout)return setTimeout(e,0);if((t===i||!t)&&setTimeout)return t=setTimeout,setTimeout(e,0);try{return t(e,0)}catch(r){try{return t.call(null,e,0)}catch(r){return t.call(this,e,0)}}}!function(){try{t="function"==typeof setTimeout?setTimeout:i}catch(e){t=i}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(e){r=o}}();var a,u=[],c=!1,l=-1;function f(){c&&a&&(c=!1,a.length?u=a.concat(u):l=-1,u.length&&h())}function h(){if(!c){var e=s(f);c=!0;for(var t=u.length;t;){for(a=u,u=[];++l<t;)a&&a[l].run();l=-1,t=u.length}a=null,c=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{return r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function d(e,t){this.fun=e,this.array=t}function p(){}n.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];u.push(new d(e,t)),1!==u.length||c||s(h)},d.prototype.run=function(){this.fun.apply(null,this.array)},n.title="browser",n.browser=!0,n.env={},n.argv=[],n.version="",n.versions={},n.on=p,n.addListener=p,n.once=p,n.off=p,n.removeListener=p,n.removeAllListeners=p,n.emit=p,n.prependListener=p,n.prependOnceListener=p,n.listeners=function(e){return[]},n.binding=function(e){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(e){throw new Error("process.chdir is not supported")},n.umask=function(){return 0}},65650:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scheduleObservable=void 0;var n=r(19724),i=r(32071),o=r(5455);t.scheduleObservable=function(e,t){return n.innerFrom(e).pipe(o.subscribeOn(t),i.observeOn(t))}},65774:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipWhile=void 0;var n=r(65212),i=r(17214);t.skipWhile=function(e){return n.operate((function(t,r){var n=!1,o=0;t.subscribe(i.createOperatorSubscriber(r,(function(t){return(n||(n=!e(t,o++)))&&r.next(t)})))}))}},65881:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Scheduler=void 0;var n=r(93275),i=function(){function e(t,r){void 0===r&&(r=e.now),this.schedulerActionCtor=t,this.now=r}return e.prototype.schedule=function(e,t,r){return void 0===t&&(t=0),new this.schedulerActionCtor(this,e).schedule(r,t)},e.now=n.dateTimestampProvider.now,e}();t.Scheduler=i},66011:(e,t,r)=>{"use strict";var n=r(48287).Buffer,i=r(56698),o=r(51147),s=new Array(16),a=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,7,4,13,1,10,6,15,3,12,0,9,5,2,14,11,8,3,10,14,4,9,15,8,1,2,7,0,6,13,11,5,12,1,9,11,10,0,8,12,4,13,3,7,15,14,5,6,2,4,0,5,9,7,12,2,10,14,1,3,8,11,6,15,13],u=[5,14,7,0,9,2,11,4,13,6,15,8,1,10,3,12,6,11,3,7,0,13,5,10,14,15,8,12,4,9,1,2,15,5,1,3,7,14,6,9,11,8,12,2,10,0,4,13,8,6,4,1,3,11,15,0,5,12,2,13,9,7,10,14,12,15,10,4,1,5,8,7,6,2,13,14,0,3,9,11],c=[11,14,15,12,5,8,7,9,11,13,14,15,6,7,9,8,7,6,8,13,11,9,7,15,7,12,15,9,11,7,13,12,11,13,6,7,14,9,13,15,14,8,13,6,5,12,7,5,11,12,14,15,14,15,9,8,9,14,5,6,8,6,5,12,9,15,5,11,6,8,13,12,5,12,13,14,11,8,5,6],l=[8,9,9,11,13,15,15,5,7,7,8,11,14,14,12,6,9,13,15,7,12,8,9,11,7,7,12,7,6,15,13,11,9,7,15,11,8,6,6,14,12,13,5,14,13,13,7,5,15,5,8,11,14,14,6,14,6,9,12,9,12,5,15,8,8,5,12,9,12,5,14,6,8,13,6,5,15,13,11,11],f=[0,1518500249,1859775393,2400959708,2840853838],h=[1352829926,1548603684,1836072691,2053994217,0];function d(){o.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878,this._e=3285377520}function p(e,t){return e<<t|e>>>32-t}function g(e,t,r,n,i,o,s,a){return p(e+(t^r^n)+o+s|0,a)+i|0}function b(e,t,r,n,i,o,s,a){return p(e+(t&r|~t&n)+o+s|0,a)+i|0}function y(e,t,r,n,i,o,s,a){return p(e+((t|~r)^n)+o+s|0,a)+i|0}function m(e,t,r,n,i,o,s,a){return p(e+(t&n|r&~n)+o+s|0,a)+i|0}function v(e,t,r,n,i,o,s,a){return p(e+(t^(r|~n))+o+s|0,a)+i|0}i(d,o),d.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);for(var r=0|this._a,n=0|this._b,i=0|this._c,o=0|this._d,d=0|this._e,w=0|this._a,E=0|this._b,A=0|this._c,_=0|this._d,S=0|this._e,P=0;P<80;P+=1){var k,O;P<16?(k=g(r,n,i,o,d,e[a[P]],f[0],c[P]),O=v(w,E,A,_,S,e[u[P]],h[0],l[P])):P<32?(k=b(r,n,i,o,d,e[a[P]],f[1],c[P]),O=m(w,E,A,_,S,e[u[P]],h[1],l[P])):P<48?(k=y(r,n,i,o,d,e[a[P]],f[2],c[P]),O=y(w,E,A,_,S,e[u[P]],h[2],l[P])):P<64?(k=m(r,n,i,o,d,e[a[P]],f[3],c[P]),O=b(w,E,A,_,S,e[u[P]],h[3],l[P])):(k=v(r,n,i,o,d,e[a[P]],f[4],c[P]),O=g(w,E,A,_,S,e[u[P]],h[4],l[P])),r=d,d=o,o=p(i,10),i=n,n=k,w=S,S=_,_=p(A,10),A=E,E=O}var x=this._b+i+_|0;this._b=this._c+o+S|0,this._c=this._d+d+w|0,this._d=this._e+r+E|0,this._e=this._a+n+A|0,this._a=x},d.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=n.alloc?n.alloc(20):new n(20);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e.writeInt32LE(this._e,16),e},e.exports=d},66166:(e,t,r)=>{"use strict";var n=r(67426),i=r(43349);function o(){this.pending=null,this.pendingTotal=0,this.blockSize=this.constructor.blockSize,this.outSize=this.constructor.outSize,this.hmacStrength=this.constructor.hmacStrength,this.padLength=this.constructor.padLength/8,this.endian="big",this._delta8=this.blockSize/8,this._delta32=this.blockSize/32}t.BlockHash=o,o.prototype.update=function(e,t){if(e=n.toArray(e,t),this.pending?this.pending=this.pending.concat(e):this.pending=e,this.pendingTotal+=e.length,this.pending.length>=this._delta8){var r=(e=this.pending).length%this._delta8;this.pending=e.slice(e.length-r,e.length),0===this.pending.length&&(this.pending=null),e=n.join32(e,0,e.length-r,this.endian);for(var i=0;i<e.length;i+=this._delta32)this._update(e,i,i+this._delta32)}return this},o.prototype.digest=function(e){return this.update(this._pad()),i(null===this.pending),this._digest(e)},o.prototype._pad=function(){var e=this.pendingTotal,t=this._delta8,r=t-(e+this.padLength)%t,n=new Array(r+this.padLength);n[0]=128;for(var i=1;i<r;i++)n[i]=0;if(e<<=3,"big"===this.endian){for(var o=8;o<this.padLength;o++)n[i++]=0;n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=e>>>24&255,n[i++]=e>>>16&255,n[i++]=e>>>8&255,n[i++]=255&e}else for(n[i++]=255&e,n[i++]=e>>>8&255,n[i++]=e>>>16&255,n[i++]=e>>>24&255,n[i++]=0,n[i++]=0,n[i++]=0,n[i++]=0,o=8;o<this.padLength;o++)n[i++]=0;return n}},66225:(e,t,r)=>{"use strict";var n=r(67426).rotr32;function i(e,t,r){return e&t^~e&r}function o(e,t,r){return e&t^e&r^t&r}function s(e,t,r){return e^t^r}t.ft_1=function(e,t,r,n){return 0===e?i(t,r,n):1===e||3===e?s(t,r,n):2===e?o(t,r,n):void 0},t.ch32=i,t.maj32=o,t.p32=s,t.s0_256=function(e){return n(e,2)^n(e,13)^n(e,22)},t.s1_256=function(e){return n(e,6)^n(e,11)^n(e,25)},t.g0_256=function(e){return n(e,7)^n(e,18)^e>>>3},t.g1_256=function(e){return n(e,17)^n(e,19)^e>>>10}},66355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pluck=void 0;var n=r(26872);t.pluck=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=e.length;if(0===r)throw new Error("list of properties cannot be empty.");return n.map((function(t){for(var n=t,i=0;i<r;i++){var o=null==n?void 0:n[e[i]];if(void 0===o)return;n=o}return n}))}},66508:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.getNumber=t.toBigInt=t.getUint=t.getBigInt=t.mask=t.toTwos=t.fromTwos=void 0;const n=r(87415),i=r(1500),o=BigInt(0),s=BigInt(1),a=9007199254740991;function u(e,t){switch(typeof e){case"bigint":return e;case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),BigInt(e);case"string":try{if(""===e)throw new Error("empty string");return"-"===e[0]&&"-"!==e[1]?-BigInt(e.substring(1)):BigInt(e)}catch(r){(0,i.assertArgument)(!1,`invalid BigNumberish string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid BigNumberish value",t||"value",e)}function c(e,t){const r=u(e,t);return(0,i.assert)(r>=o,"unsigned value cannot be negative","NUMERIC_FAULT",{fault:"overflow",operation:"getUint",value:e}),r}t.fromTwos=function(e,t){const r=c(e,"value"),n=BigInt(h(t,"width"));return(0,i.assert)(r>>n===o,"overflow","NUMERIC_FAULT",{operation:"fromTwos",fault:"overflow",value:e}),r>>n-s?-((~r&(s<<n)-s)+s):r},t.toTwos=function(e,t){let r=u(e,"value");const n=BigInt(h(t,"width")),a=s<<n-s;return r<o?(r=-r,(0,i.assert)(r<=a,"too low","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),(~r&(s<<n)-s)+s):((0,i.assert)(r<a,"too high","NUMERIC_FAULT",{operation:"toTwos",fault:"overflow",value:e}),r)},t.mask=function(e,t){const r=c(e,"value"),n=BigInt(h(t,"bits"));return r&(s<<n)-s},t.getBigInt=u,t.getUint=c;const l="0123456789abcdef";function f(e){if(e instanceof Uint8Array){let t="0x0";for(const r of e)t+=l[r>>4],t+=l[15&r];return BigInt(t)}return u(e)}function h(e,t){switch(typeof e){case"bigint":return(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),Number(e);case"number":return(0,i.assertArgument)(Number.isInteger(e),"underflow",t||"value",e),(0,i.assertArgument)(e>=-a&&e<=a,"overflow",t||"value",e),e;case"string":try{if(""===e)throw new Error("empty string");return h(BigInt(e),t)}catch(r){(0,i.assertArgument)(!1,`invalid numeric string: ${r.message}`,t||"value",e)}}(0,i.assertArgument)(!1,"invalid numeric value",t||"value",e)}function d(e){const t=c(e,"value");if(t===o)return new Uint8Array([]);let r=t.toString(16);r.length%2&&(r="0"+r);const n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=2*e;n[e]=parseInt(r.substring(t,t+2),16)}return n}t.toBigInt=f,t.getNumber=h,t.toNumber=function(e){return h(f(e))},t.toBeHex=function(e,t){let r=c(e,"value").toString(16);if(null==t)r.length%2&&(r="0"+r);else{const n=h(t,"width");for((0,i.assert)(2*n>=r.length,`value exceeds width (${n} bytes)`,"NUMERIC_FAULT",{operation:"toBeHex",fault:"overflow",value:e});r.length<2*n;)r="0"+r}return"0x"+r},t.toBeArray=d,t.toQuantity=function(e){let t=(0,n.hexlify)((0,n.isBytesLike)(e)?e:d(e)).substring(2);for(;t.startsWith("0");)t=t.substring(1);return""===t&&(t="0"),"0x"+t}},66791:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.endWith=void 0;var o=r(39546),s=r(61587);t.endWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return o.concat(t,s.of.apply(void 0,i([],n(e))))}}},66911:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.takeUntil=void 0;var n=r(65212),i=r(17214),o=r(19724),s=r(5717);t.takeUntil=function(e){return n.operate((function(t,r){o.innerFrom(e).subscribe(i.createOperatorSubscriber(r,(function(){return r.complete()}),s.noop)),!r.closed&&t.subscribe(r)}))}},66975:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.withLatestFrom=void 0;var o=r(65212),s=r(17214),a=r(19724),u=r(87699),c=r(5717),l=r(26404);t.withLatestFrom=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=l.popResultSelector(e);return o.operate((function(t,o){for(var l=e.length,f=new Array(l),h=e.map((function(){return!1})),d=!1,p=function(t){a.innerFrom(e[t]).subscribe(s.createOperatorSubscriber(o,(function(e){f[t]=e,d||h[t]||(h[t]=!0,(d=h.every(u.identity))&&(h=null))}),c.noop))},g=0;g<l;g++)p(g);t.subscribe(s.createOperatorSubscriber(o,(function(e){if(d){var t=i([e],n(f));o.next(r?r.apply(void 0,i([],n(t))):t)}})))}))}},67031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(15717),i=r(4718),o=r(4718),s=r(89440),{bytesToNumberBE:a,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(s);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&c<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:u}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let c;try{c="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(c=n.mod(c,u)),p(c),c}const b=new Map;function y(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){y(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(g,u),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new m(u,c,l)}add(e){y(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const d=t.a,p=r.mul(t.b,h);let g=r.mul(n,s),b=r.mul(i,a),v=r.mul(o,u),w=r.add(n,i),E=r.add(s,a);w=r.mul(w,E),E=r.add(g,b),w=r.sub(w,E),E=r.add(n,o);let A=r.add(s,u);return E=r.mul(E,A),A=r.add(g,v),E=r.sub(E,A),A=r.add(i,o),c=r.add(a,u),A=r.mul(A,c),c=r.add(b,v),A=r.sub(A,c),f=r.mul(d,E),c=r.mul(p,v),f=r.add(c,f),c=r.sub(b,f),f=r.add(b,f),l=r.mul(c,f),b=r.add(g,g),b=r.add(b,g),v=r.mul(d,v),E=r.mul(p,E),b=r.add(b,v),v=r.sub(g,v),v=r.mul(d,v),E=r.add(E,v),g=r.mul(b,E),l=r.add(l,g),g=r.mul(A,E),c=r.mul(w,c),c=r.sub(c,g),g=r.mul(w,b),f=r.mul(A,f),f=r.add(f,g),new m(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return w.wNAFCached(this,b,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(e),f=n,h=n,d=this;for(;s>c||u>c;)s&l&&(f=f.add(d)),u&l&&(h=h.add(d)),d=d.double(),s>>=l,u>>=l;return o&&(f=f.negate()),a&&(h=h.negate()),h=new m(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:u}=s.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=c.add(f),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(m,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:d}}function g(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,u=(a-l)/f,p=s-l,g=o,b=e.pow(t,a),y=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=b,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,u),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let c=e.mul(s,o);a=e.pow(c,g);let h=e.eql(a,e.ONE);o=e.mul(s,y),a=e.mul(c,n),s=e.cmov(o,s,h),c=e.cmov(a,c,h);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(c,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(c,n),s=e.cmov(o,s,a),c=e.cmov(i,c,a)}return{isValid:h,value:s}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,f=a.BYTES+1,h=2*a.BYTES+1;function d(e){return n.mod(e,u)}function g(e){return n.invert(e,u)}const{ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:m,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return!(1&~r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function E(e){return e>u>>l}const A=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class _{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new _(A(e,0,t),A(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new _(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=O((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=1&i?"03":"02",l=b.fromHex(c+w(u)),f=g(u),h=d(-s*f),p=d(n*f),y=b.BASE.multiplyAndAddUnsafe(l,h,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const S={isValidPrivateKey(e){try{return y(e),!0}catch(e){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function P(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof b}const k=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},O=r.bits2int_modN||function(e){return d(k(e))},x=i.bitMask(r.nBitLength);function M(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&e<x))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const B={lowS:r.lowS,prehash:!1},T={lowS:r.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return b.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(P(e))throw new Error("first arg must be private key");if(!P(t))throw new Error("second arg must be public key");return b.fromHex(t).multiply(y(e)).toRawBytes(r)},sign:function(e,t,n=B){const{seed:s,k2sig:u}=function(e,t,n=B){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:f,prehash:h,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const m=O(e),w=y(t),A=[M(w),M(m)];if(null!=p){const e=!0===p?u(a.BYTES):p;A.push((0,o.ensureBytes)("extraEntropy",e))}const S=i.concatBytes(...A),P=m;return{seed:S,k2sig:function(e){const t=k(e);if(!v(t))return;const r=g(t),n=b.BASE.multiply(t).toAffine(),i=d(n.x);if(i===c)return;const o=d(r*d(P+i*w));if(o===c)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&E(o)&&(a=function(e){return E(e)?d(-e):e}(o),s^=1),new _(i,a,s)}}}(e,t,n),f=r;return i.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,u)},verify:function(e,n,i,s=T){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=_.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=_.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new _(e,t)}}f=b.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:h,s:p}=l,y=O(n),m=g(p),v=d(y*m),w=d(h*m),E=b.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!E&&d(E.x)===h},ProjectivePoint:b,Signature:_,utils:S}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),c=e.sqr(a),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,s),c=e.mul(c,a),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,s);const{isValid:h,value:d}=r(o,c);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,s,h),f=e.cmov(f,d,h);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},67054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.p521_hasher=t.secp521r1=t.p521=t.p384_hasher=t.secp384r1=t.p384=t.p256_hasher=t.secp256r1=t.p256=void 0;const n=r(17076),i=r(73562),o=r(71761),s=r(24967),a=r(91705),u={p:BigInt("0xffffffff00000001000000000000000000000000ffffffffffffffffffffffff"),n:BigInt("0xffffffff00000000ffffffffffffffffbce6faada7179e84f3b9cac2fc632551"),h:BigInt(1),a:BigInt("0xffffffff00000001000000000000000000000000fffffffffffffffffffffffc"),b:BigInt("0x5ac635d8aa3a93e7b3ebbd55769886bc651d06b0cc53b0f63bce3c3e27d2604b"),Gx:BigInt("0x6b17d1f2e12c4247f8bce6e563a440f277037d812deb33a0f4a13945d898c296"),Gy:BigInt("0x4fe342e2fe1a7f9b8ee7eb4a7c0f9e162bce33576b315ececbb6406837bf51f5")},c={p:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000ffffffff"),n:BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffc7634d81f4372ddf581a0db248b0a77aecec196accc52973"),h:BigInt(1),a:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffeffffffff0000000000000000fffffffc"),b:BigInt("0xb3312fa7e23ee7e4988e056be3f82d19181d9c6efe8141120314088f5013875ac656398d8a2ed19d2a85c8edd3ec2aef"),Gx:BigInt("0xaa87ca22be8b05378eb1c71ef320ad746e1d3b628ba79b9859f741e082542a385502f25dbf55296c3a545e3872760ab7"),Gy:BigInt("0x3617de4a96262c6f5d9e98bf9292dc29f8f41dbd289a147ce9da3113b5f0b8c00a60b1ce1d7e819d7a431d7c90ea0e5f")},l={p:BigInt("0x1ffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),n:BigInt("0x01fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffa51868783bf2f966b7fcc0148f709a5d03bb5c9b8899c47aebb6fb71e91386409"),h:BigInt(1),a:BigInt("0x1fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffc"),b:BigInt("0x0051953eb9618e1c9a1f929a21a0b68540eea2da725b99b315f3b8b489918ef109e156193951ec7e937b1652c0bd3bb1bf073573df883d2c34f1ef451fd46b503f00"),Gx:BigInt("0x00c6858e06b70404e9cd9e3ecb662395b4429c648139053fb521f828af606b4d3dbaa14b5e77efe75928fe1dc127a2ffa8de3348b3c1856a429bf97e7e31c2e5bd66"),Gy:BigInt("0x011839296a789a3bc0045c8a5fb42c7d1bd998f54449579b446817afbd17273e662c97ee72995ef42640c550b9013fad0761353c7086a272c24088be94769fd16650")},f=(0,s.Field)(u.p),h=(0,s.Field)(c.p),d=(0,s.Field)(l.p);function p(e,t){const r=(0,a.mapToCurveSimpleSWU)(e,t);return e=>r(e[0])}t.p256=(0,i.createCurve)({...u,Fp:f,lowS:!1},n.sha256),t.secp256r1=t.p256,t.p256_hasher=(0,o.createHasher)(t.p256.Point,p(f,{A:u.a,B:u.b,Z:f.create(BigInt("-10"))}),{DST:"P256_XMD:SHA-256_SSWU_RO_",encodeDST:"P256_XMD:SHA-256_SSWU_NU_",p:u.p,m:1,k:128,expand:"xmd",hash:n.sha256}),t.p384=(0,i.createCurve)({...c,Fp:h,lowS:!1},n.sha384),t.secp384r1=t.p384,t.p384_hasher=(0,o.createHasher)(t.p384.Point,p(h,{A:c.a,B:c.b,Z:h.create(BigInt("-12"))}),{DST:"P384_XMD:SHA-384_SSWU_RO_",encodeDST:"P384_XMD:SHA-384_SSWU_NU_",p:c.p,m:1,k:192,expand:"xmd",hash:n.sha384}),t.p521=(0,i.createCurve)({...l,Fp:d,lowS:!1,allowedPrivateKeyLengths:[130,131,132]},n.sha512),t.secp521r1=t.p521,t.p521_hasher=(0,o.createHasher)(t.p521.Point,p(d,{A:l.a,B:l.b,Z:d.create(BigInt("-4"))}),{DST:"P521_XMD:SHA-512_SSWU_RO_",encodeDST:"P521_XMD:SHA-512_SSWU_NU_",p:l.p,m:1,k:256,expand:"xmd",hash:n.sha512})},67215:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.verifyTypedData=t.TypedDataEncoder=void 0;const n=r(30646),i=r(32291),o=r(77778),s=r(75347),a=r(81993),u=new Uint8Array(32);u.fill(0);const c=BigInt(-1),l=BigInt(0),f=BigInt(1),h=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),d=(0,s.toBeHex)(f,32),p=(0,s.toBeHex)(l,32),g={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},b=["name","version","chainId","verifyingContract","salt"];function y(e){return function(t){return(0,s.assertArgument)("string"==typeof t,`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const m={name:y("name"),version:y("version"),chainId:function(e){const t=(0,s.getBigInt)(e,"domain.chainId");return(0,s.assertArgument)(t>=0,"invalid chain ID","domain.chainId",e),Number.isSafeInteger(t)?Number(t):(0,s.toQuantity)(t)},verifyingContract:function(e){try{return(0,n.getAddress)(e).toLowerCase()}catch(e){}(0,s.assertArgument)(!1,'invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){const t=(0,s.getBytes)(e,"domain.salt");return(0,s.assertArgument)(32===t.length,'invalid domain value "salt"',"domain.salt",e),(0,s.hexlify)(t)}};function v(e){{const t=e.match(/^(u?)int(\d+)$/);if(t){const r=""===t[1],n=parseInt(t[2]);(0,s.assertArgument)(n%8==0&&0!==n&&n<=256&&t[2]===String(n),"invalid numeric width","type",e);const i=(0,s.mask)(h,r?n-1:n),o=r?(i+f)*c:l;return function(t){const n=(0,s.getBigInt)(t,"value");return(0,s.assertArgument)(n>=o&&n<=i,`value out-of-bounds for ${e}`,"value",n),(0,s.toBeHex)(r?(0,s.toTwos)(n,256):n,32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0,s.assertArgument)(0!==r&&r<=32&&t[1]===String(r),"invalid bytes width","type",e),function(t){const n=(0,s.getBytes)(t);return(0,s.assertArgument)(n.length===r,`invalid length for ${e}`,"value",t),function(e){const t=(0,s.getBytes)(e),r=t.length%32;return r?(0,s.concat)([t,u.slice(r)]):(0,s.hexlify)(t)}(t)}}}switch(e){case"address":return function(e){return(0,s.zeroPadValue)((0,n.getAddress)(e),32)};case"bool":return function(e){return e?d:p};case"bytes":return function(e){return(0,i.keccak256)(e)};case"string":return function(e){return(0,a.id)(e)}}return null}function w(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}function E(e){const t=e.match(/^([^\x5b]*)((\x5b\d*\x5d)*)(\x5b(\d*)\x5d)$/);return t?{base:t[1],index:t[2]+t[4],array:{base:t[1],prefix:t[1]+t[2],count:t[5]?parseInt(t[5]):-1}}:{base:e}}class A{primaryType;#Ne;get types(){return JSON.parse(this.#Ne)}#je;#Ue;constructor(e){this.#je=new Map,this.#Ue=new Map;const t=new Map,r=new Map,n=new Map,i={};Object.keys(e).forEach((o=>{i[o]=e[o].map((({name:t,type:r})=>{let{base:n,index:i}=E(r);return"int"!==n||e.int||(n="int256"),"uint"!==n||e.uint||(n="uint256"),{name:t,type:n+(i||"")}})),t.set(o,new Set),r.set(o,[]),n.set(o,new Set)})),this.#Ne=JSON.stringify(i);for(const n in i){const o=new Set;for(const a of i[n]){(0,s.assertArgument)(!o.has(a.name),`duplicate variable name ${JSON.stringify(a.name)} in ${JSON.stringify(n)}`,"types",e),o.add(a.name);const i=E(a.type).base;(0,s.assertArgument)(i!==n,`circular type reference to ${JSON.stringify(i)}`,"types",e),v(i)||((0,s.assertArgument)(r.has(i),`unknown type ${JSON.stringify(i)}`,"types",e),r.get(i).push(n),t.get(n).add(i))}}const o=Array.from(r.keys()).filter((e=>0===r.get(e).length));(0,s.assertArgument)(0!==o.length,"missing primary type","types",e),(0,s.assertArgument)(1===o.length,`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,s.defineProperties)(this,{primaryType:o[0]}),function i(o,a){(0,s.assertArgument)(!a.has(o),`circular type reference to ${JSON.stringify(o)}`,"types",e),a.add(o);for(const e of t.get(o))if(r.has(e)){i(e,a);for(const t of a)n.get(t).add(e)}a.delete(o)}(this.primaryType,new Set);for(const[e,t]of n){const r=Array.from(t);r.sort(),this.#je.set(e,w(e,i[e])+r.map((e=>w(e,i[e]))).join(""))}}getEncoder(e){let t=this.#Ue.get(e);return t||(t=this.#Le(e),this.#Ue.set(e,t)),t}#Le(e){{const t=v(e);if(t)return t}const t=E(e).array;if(t){const e=t.prefix,r=this.getEncoder(e);return n=>{(0,s.assertArgument)(-1===t.count||t.count===n.length,`array length mismatch; expected length ${t.count}`,"value",n);let o=n.map(r);return this.#je.has(e)&&(o=o.map(i.keccak256)),(0,i.keccak256)((0,s.concat)(o))}}const r=this.types[e];if(r){const t=(0,a.id)(this.#je.get(e));return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this.#je.has(r)?(0,i.keccak256)(n):n}));return n.unshift(t),(0,s.concat)(n)}}(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}encodeType(e){const t=this.#je.get(e);return(0,s.assertArgument)(t,`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,i.keccak256)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(v(e))return r(e,t);const n=E(e).array;if(n)return(0,s.assertArgument)(-1===n.count||n.count===t.length,`array length mismatch; expected length ${n.count}`,"value",t),t.map((e=>this._visit(n.prefix,e,r)));const i=this.types[e];if(i)return i.reduce(((e,{name:n,type:i})=>(e[n]=this._visit(i,t[n],r),e)),{});(0,s.assertArgument)(!1,`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new A(e)}static getPrimaryType(e){return A.from(e).primaryType}static hashStruct(e,t,r){return A.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){if(null==e[r])continue;const n=g[r];(0,s.assertArgument)(n,`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>b.indexOf(e.name)-b.indexOf(t.name))),A.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,s.concat)(["0x1901",A.hashDomain(e),A.from(t).hash(r)])}static hash(e,t,r){return(0,i.keccak256)(A.encode(e,t,r))}static async resolveNames(e,t,r,n){e=Object.assign({},e);for(const t in e)null==e[t]&&delete e[t];const i={};e.verifyingContract&&!(0,s.isHexString)(e.verifyingContract,20)&&(i[e.verifyingContract]="0x");const o=A.from(t);o.visit(r,((e,t)=>("address"!==e||(0,s.isHexString)(t,20)||(i[t]="0x"),t)));for(const e in i)i[e]=await n(e);return e.verifyingContract&&i[e.verifyingContract]&&(e.verifyingContract=i[e.verifyingContract]),{domain:e,value:r=o.visit(r,((e,t)=>"address"===e&&i[t]?i[t]:t))}}static getPayload(e,t,r){A.hashDomain(e);const n={},i=[];b.forEach((t=>{const r=e[t];null!=r&&(n[t]=m[t](r),i.push({name:t,type:g[t]}))}));const o=A.from(t);t=o.types;const a=Object.assign({},t);return(0,s.assertArgument)(null==a.EIP712Domain,"types must not contain EIP712Domain type","types.EIP712Domain",t),a.EIP712Domain=i,o.encode(r),{types:a,domain:n,primaryType:o.primaryType,message:o.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,s.hexlify)((0,s.getBytes)(t));if(e.match(/^u?int/))return(0,s.getBigInt)(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return(0,s.assertArgument)("string"==typeof t,"invalid string","value",t),t}(0,s.assertArgument)(!1,"unsupported type","type",e)}))}}}t.TypedDataEncoder=A,t.verifyTypedData=function(e,t,r,n){return(0,o.recoverAddress)(A.hash(e,t,r),n)}},67307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=void 0;const n=r(26481),i=r(75347);let o=!1;const s=function(e){return(0,n.ripemd160)(e)};let a=s;function u(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}t.ripemd160=u,u._=s,u.lock=function(){o=!0},u.register=function(e){if(o)throw new TypeError("ripemd160 is locked");a=e},Object.freeze(u)},67332:(e,t,r)=>{"use strict";var n=r(78893),i=r(53209),o=r(92861).Buffer;function s(e){var t,r=e.modulus.byteLength();do{t=new n(i(r))}while(t.cmp(e.modulus)>=0||!t.umod(e.prime1)||!t.umod(e.prime2));return t}function a(e,t){var r=function(e){var t=s(e);return{blinder:t.toRed(n.mont(e.modulus)).redPow(new n(e.publicExponent)).fromRed(),unblinder:t.invm(e.modulus)}}(t),i=t.modulus.byteLength(),a=new n(e).mul(r.blinder).umod(t.modulus),u=a.toRed(n.mont(t.prime1)),c=a.toRed(n.mont(t.prime2)),l=t.coefficient,f=t.prime1,h=t.prime2,d=u.redPow(t.exponent1).fromRed(),p=c.redPow(t.exponent2).fromRed(),g=d.isub(p).imul(l).umod(f).imul(h);return p.iadd(g).imul(r.unblinder).umod(t.modulus).toArrayLike(o,"be",i)}a.getr=s,e.exports=a},67398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NumberCoder=void 0;const n=r(75347),i=r(39976),o=r(38869),s=BigInt(0),a=BigInt(1),u=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");class c extends o.Coder{size;signed;constructor(e,t,r){const i=(t?"int":"uint")+8*e;super(i,i,r,!1),(0,n.defineProperties)(this,{size:e,signed:t},{size:"number",signed:"boolean"})}defaultValue(){return 0}encode(e,t){let r=(0,n.getBigInt)(i.Typed.dereference(t,this.type)),c=(0,n.mask)(u,8*o.WordSize);if(this.signed){let e=(0,n.mask)(c,8*this.size-1);(r>e||r<-(e+a))&&this._throwError("value out-of-bounds",t),r=(0,n.toTwos)(r,8*o.WordSize)}else(r<s||r>(0,n.mask)(c,8*this.size))&&this._throwError("value out-of-bounds",t);return e.writeValue(r)}decode(e){let t=(0,n.mask)(e.readValue(),8*this.size);return this.signed&&(t=(0,n.fromTwos)(t,8*this.size)),t}}t.NumberCoder=c},67410:(e,t,r)=>{var n="undefined"!=typeof window?window.Gun:r(54827);n.chain.promise=function(e){var t=this;return e=e||function(e){return e},new Promise((function(e,r){t.once((function(t,r){e({put:t,get:r,gun:this})}))})).then(e)},n.chain.then=function(e){var t=this,r=new Promise(((e,r)=>{t.once((function(t,r){e(t,r)}))}));return e?r.then(e):r}},67426:(e,t,r)=>{"use strict";var n=r(43349),i=r(56698);function o(e,t){return 55296==(64512&e.charCodeAt(t))&&!(t<0||t+1>=e.length)&&56320==(64512&e.charCodeAt(t+1))}function s(e){return(e>>>24|e>>>8&65280|e<<8&16711680|(255&e)<<24)>>>0}function a(e){return 1===e.length?"0"+e:e}function u(e){return 7===e.length?"0"+e:6===e.length?"00"+e:5===e.length?"000"+e:4===e.length?"0000"+e:3===e.length?"00000"+e:2===e.length?"000000"+e:1===e.length?"0000000"+e:e}t.inherits=i,t.toArray=function(e,t){if(Array.isArray(e))return e.slice();if(!e)return[];var r=[];if("string"==typeof e)if(t){if("hex"===t)for((e=e.replace(/[^a-z0-9]+/gi,"")).length%2!=0&&(e="0"+e),i=0;i<e.length;i+=2)r.push(parseInt(e[i]+e[i+1],16))}else for(var n=0,i=0;i<e.length;i++){var s=e.charCodeAt(i);s<128?r[n++]=s:s<2048?(r[n++]=s>>6|192,r[n++]=63&s|128):o(e,i)?(s=65536+((1023&s)<<10)+(1023&e.charCodeAt(++i)),r[n++]=s>>18|240,r[n++]=s>>12&63|128,r[n++]=s>>6&63|128,r[n++]=63&s|128):(r[n++]=s>>12|224,r[n++]=s>>6&63|128,r[n++]=63&s|128)}else for(i=0;i<e.length;i++)r[i]=0|e[i];return r},t.toHex=function(e){for(var t="",r=0;r<e.length;r++)t+=a(e[r].toString(16));return t},t.htonl=s,t.toHex32=function(e,t){for(var r="",n=0;n<e.length;n++){var i=e[n];"little"===t&&(i=s(i)),r+=u(i.toString(16))}return r},t.zero2=a,t.zero8=u,t.join32=function(e,t,r,i){var o=r-t;n(o%4==0);for(var s=new Array(o/4),a=0,u=t;a<s.length;a++,u+=4){var c;c="big"===i?e[u]<<24|e[u+1]<<16|e[u+2]<<8|e[u+3]:e[u+3]<<24|e[u+2]<<16|e[u+1]<<8|e[u],s[a]=c>>>0}return s},t.split32=function(e,t){for(var r=new Array(4*e.length),n=0,i=0;n<e.length;n++,i+=4){var o=e[n];"big"===t?(r[i]=o>>>24,r[i+1]=o>>>16&255,r[i+2]=o>>>8&255,r[i+3]=255&o):(r[i+3]=o>>>24,r[i+2]=o>>>16&255,r[i+1]=o>>>8&255,r[i]=255&o)}return r},t.rotr32=function(e,t){return e>>>t|e<<32-t},t.rotl32=function(e,t){return e<<t|e>>>32-t},t.sum32=function(e,t){return e+t>>>0},t.sum32_3=function(e,t,r){return e+t+r>>>0},t.sum32_4=function(e,t,r,n){return e+t+r+n>>>0},t.sum32_5=function(e,t,r,n,i){return e+t+r+n+i>>>0},t.sum64=function(e,t,r,n){var i=e[t],o=n+e[t+1]>>>0,s=(o<n?1:0)+r+i;e[t]=s>>>0,e[t+1]=o},t.sum64_hi=function(e,t,r,n){return(t+n>>>0<t?1:0)+e+r>>>0},t.sum64_lo=function(e,t,r,n){return t+n>>>0},t.sum64_4_hi=function(e,t,r,n,i,o,s,a){var u=0,c=t;return u+=(c=c+n>>>0)<t?1:0,u+=(c=c+o>>>0)<o?1:0,e+r+i+s+(u+=(c=c+a>>>0)<a?1:0)>>>0},t.sum64_4_lo=function(e,t,r,n,i,o,s,a){return t+n+o+a>>>0},t.sum64_5_hi=function(e,t,r,n,i,o,s,a,u,c){var l=0,f=t;return l+=(f=f+n>>>0)<t?1:0,l+=(f=f+o>>>0)<o?1:0,l+=(f=f+a>>>0)<a?1:0,e+r+i+s+u+(l+=(f=f+c>>>0)<c?1:0)>>>0},t.sum64_5_lo=function(e,t,r,n,i,o,s,a,u,c){return t+n+o+a+c>>>0},t.rotr64_hi=function(e,t,r){return(t<<32-r|e>>>r)>>>0},t.rotr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0},t.shr64_hi=function(e,t,r){return e>>>r},t.shr64_lo=function(e,t,r){return(e<<32-r|t>>>r)>>>0}},67476:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=async function(e,t,r={}){const o=new TextEncoder,s=e?"string"==typeof e?o.encode(l(e)):e:crypto.getRandomValues(new Uint8Array(32)),a=t?(Array.isArray(t)?t:[t]).map((e=>l(e.toString()))):[],d=o.encode(a.join("|")),b=new Uint8Array(s.length+d.length);if(b.set(s),b.set(d,s.length),b.length<16)throw new Error(`Insufficient input entropy (${b.length})`);const y="v1",m={},{includeP256:v=!0,includeSecp256k1Bitcoin:w=!1,includeSecp256k1Ethereum:E=!1}=r;if(v){const e=[{label:"signing",type:"pub/priv"},{label:"encryption",type:"epub/epriv"}],[t,r]=await Promise.all(e.map((async({label:e})=>{const t=o.encode(`${e}-${y}`),r=await f(b,t);if(!n.p256.utils.isValidPrivateKey(r))throw new Error(`Invalid private key for ${e}`);return{pub:c(n.p256.getPublicKey(r,!1)),priv:u(r)}})));m.pub=t.pub,m.priv=t.priv,m.epub=r.pub,m.epriv=r.priv}if(w){const e=o.encode(`secp256k1-bitcoin-${y}`),t=await f(b,e);if(!i.secp256k1.utils.isValidPrivateKey(t))throw new Error("Invalid secp256k1 private key for Bitcoin");const r=i.secp256k1.getPublicKey(t,!0);m.secp256k1Bitcoin={privateKey:h(t),publicKey:h(r),address:p(r)}}if(E){const e=o.encode(`secp256k1-ethereum-${y}`),t=await f(b,e);if(!i.secp256k1.utils.isValidPrivateKey(t))throw new Error("Invalid secp256k1 private key for Ethereum");const r=i.secp256k1.getPublicKey(t,!1);m.secp256k1Ethereum={privateKey:"0x"+h(t),publicKey:"0x"+h(r),address:g(r)}}return m};const n=r(25897),i=r(8510),o=r(22623),s=r(32955),a=r(93238);function u(e){return btoa(String.fromCharCode(...e)).replace(/\//g,"_").replace(/=/g,"").replace(/\+/g,"-")}function c(e){if(4!==e[0])throw new Error("Invalid uncompressed public key format");return[u(e.slice(1,33)),u(e.slice(33,65))].join(".")}function l(e){return e.normalize("NFC").trim()}async function f(e,t,r=3e5){const n=await crypto.subtle.importKey("raw",e,{name:"PBKDF2"},!1,["deriveBits"]),i=await crypto.subtle.deriveBits({name:"PBKDF2",salt:t,iterations:r,hash:"SHA-256"},n,256);return new Uint8Array(i)}function h(e){return Array.from(e).map((e=>e.toString(16).padStart(2,"0"))).join("")}const d="123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz";function p(e){const t=(0,o.sha256)(e),r=(0,a.ripemd160)(t),n=new Uint8Array(21);n[0]=0,n.set(r,1);const i=(0,o.sha256)((0,o.sha256)(n)),s=new Uint8Array(25);return s.set(n),s.set(i.slice(0,4),21),function(e){if(0===e.length)return"";let t=0;for(let r=0;r<e.length&&0===e[r];r++)t++;const r=[0];for(let n=t;n<e.length;n++){let t=e[n];for(let e=0;e<r.length;e++)t+=r[e]<<8,r[e]=t%58,t=t/58|0;for(;t>0;)r.push(t%58),t=t/58|0}let n="";for(let e=0;e<t;e++)n+=d[0];for(let e=r.length-1;e>=0;e--)n+=d[r[e]];return n}(s)}function g(e){const t=e.slice(1);return"0x"+h((0,s.keccak_256)(t).slice(-20))}},67478:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMap=void 0;var n=r(26872),i=r(19724),o=r(65212),s=r(2574),a=r(10281);t.mergeMap=function e(t,r,u){return void 0===u&&(u=1/0),a.isFunction(r)?e((function(e,o){return n.map((function(t,n){return r(e,t,o,n)}))(i.innerFrom(t(e,o)))}),u):("number"==typeof r&&(u=r),o.operate((function(e,r){return s.mergeInternals(e,r,t,u)})))}},67526:(e,t)=>{"use strict";t.byteLength=function(e){var t=a(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=a(e),s=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,s,u)),l=0,f=u>0?s-4:s;for(r=0;r<f;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],s=16383,a=0,c=n-i;a<c;a+=s)o.push(u(e,a,a+s>c?c:a+s));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0;s<64;++s)r[s]=o[s],n[o.charCodeAt(s)]=s;function a(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,s=[],a=t;a<n;a+=3)i=(e[a]<<16&16711680)+(e[a+1]<<8&65280)+(255&e[a+2]),s.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return s.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},67552:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isPromise=void 0;var n=r(10281);t.isPromise=function(e){return n.isFunction(null==e?void 0:e.then)}},67780:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeRlp=void 0;const n=r(87415),i=r(1500),o=r(87415);function s(e){let t=e.toString(16);for(;t.length<2;)t="0"+t;return"0x"+t}function a(e,t,r){let n=0;for(let i=0;i<r;i++)n=256*n+e[t+i];return n}function u(e,t,r,n){const o=[];for(;r<t+1+n;){const s=c(e,r);o.push(s.result),r+=s.consumed,(0,i.assert)(r<=t+1+n,"child data too short","BUFFER_OVERRUN",{buffer:e,length:n,offset:t})}return{consumed:1+n,result:o}}function c(e,t){(0,i.assert)(0!==e.length,"data too short","BUFFER_OVERRUN",{buffer:e,length:0,offset:1});const r=t=>{(0,i.assert)(t<=e.length,"data short segment too short","BUFFER_OVERRUN",{buffer:e,length:e.length,offset:t})};if(e[t]>=248){const n=e[t]-247;r(t+1+n);const i=a(e,t+1,n);return r(t+1+n+i),u(e,t,t+1+n,n+i)}if(e[t]>=192){const n=e[t]-192;return r(t+1+n),u(e,t,t+1,n)}if(e[t]>=184){const i=e[t]-183;r(t+1+i);const o=a(e,t+1,i);return r(t+1+i+o),{consumed:1+i+o,result:(0,n.hexlify)(e.slice(t+1+i,t+1+i+o))}}if(e[t]>=128){const i=e[t]-128;return r(t+1+i),{consumed:1+i,result:(0,n.hexlify)(e.slice(t+1,t+1+i))}}return{consumed:1,result:s(e[t])}}t.decodeRlp=function(e){const t=(0,o.getBytes)(e,"data"),r=c(t,0);return(0,i.assertArgument)(r.consumed===t.length,"unexpected junk after rlp payload","data",e),r.result}},67933:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestAll=void 0;var n=r(88246),i=r(80719);t.combineLatestAll=function(e){return i.joinAllInternals(n.combineLatest,e)}},68078:(e,t,r)=>{var n=r(92861).Buffer,i=r(88276);e.exports=function(e,t,r,o){if(n.isBuffer(e)||(e=n.from(e,"binary")),t&&(n.isBuffer(t)||(t=n.from(t,"binary")),8!==t.length))throw new RangeError("salt should be Buffer with 8 byte length");for(var s=r/8,a=n.alloc(s),u=n.alloc(o||0),c=n.alloc(0);s>0||o>0;){var l=new i;l.update(c),l.update(e),t&&l.update(t),c=l.digest();var f=0;if(s>0){var h=a.length-s;f=Math.min(s,c.length),c.copy(a,h,0,f),s-=f}if(f<c.length&&o>0){var d=u.length-o,p=Math.min(o,c.length-f);c.copy(u,d,f,f+p),o-=p}}return c.fill(0),{key:a,iv:u}}},68087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=void 0;var n=r(67478),i=r(87699);t.mergeAll=function(e){return void 0===e&&(e=1/0),n.mergeMap(i.identity,e)}},68394:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BaseWallet=void 0;const n=r(30646),i=r(23562),o=r(3996),s=r(77778),a=r(75347);class u extends o.AbstractSigner{address;#De;constructor(e,t){super(t),(0,a.assertArgument)(e&&"function"==typeof e.sign,"invalid private key","privateKey","[ REDACTED ]"),this.#De=e;const r=(0,s.computeAddress)(this.signingKey.publicKey);(0,a.defineProperties)(this,{address:r})}get signingKey(){return this.#De}get privateKey(){return this.signingKey.privateKey}async getAddress(){return this.address}connect(e){return new u(this.#De,e)}async signTransaction(e){e=(0,o.copyRequest)(e);const{to:t,from:r}=await(0,a.resolveProperties)({to:e.to?(0,n.resolveAddress)(e.to,this):void 0,from:e.from?(0,n.resolveAddress)(e.from,this):void 0});null!=t&&(e.to=t),null!=r&&(e.from=r),null!=e.from&&((0,a.assertArgument)((0,n.getAddress)(e.from)===this.address,"transaction from address mismatch","tx.from",e.from),delete e.from);const i=s.Transaction.from(e);return i.signature=this.signingKey.sign(i.unsignedHash),i.serialized}async signMessage(e){return this.signMessageSync(e)}signMessageSync(e){return this.signingKey.sign((0,i.hashMessage)(e)).serialized}authorizeSync(e){(0,a.assertArgument)("string"==typeof e.address,"invalid address for authorizeSync","auth.address",e);const t=this.signingKey.sign((0,i.hashAuthorization)(e));return Object.assign({},{address:(0,n.getAddress)(e.address),nonce:(0,a.getBigInt)(e.nonce||0),chainId:(0,a.getBigInt)(e.chainId||0)},{signature:t})}async authorize(e){return e=Object.assign({},e,{address:await(0,n.resolveAddress)(e.address,this)}),this.authorizeSync(await this.populateAuthorization(e))}async signTypedData(e,t,r){const n=await i.TypedDataEncoder.resolveNames(e,t,r,(async e=>{(0,a.assert)(null!=this.provider,"cannot resolve ENS names without a provider","UNSUPPORTED_OPERATION",{operation:"resolveName",info:{name:e}});const t=await this.provider.resolveName(e);return(0,a.assert)(null!=t,"unconfigured ENS name","UNCONFIGURED_NAME",{value:e}),t}));return this.signingKey.sign(i.TypedDataEncoder.hash(n.domain,t,n.value)).serialized}}t.BaseWallet=u},68420:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pkcs7Strip=t.pkcs7Pad=void 0,t.pkcs7Pad=function(e){const t=16-e.length%16,r=new Uint8Array(e.length+t);r.set(e);for(let n=e.length;n<r.length;n++)r[n]=t;return r},t.pkcs7Strip=function(e){if(e.length<16)throw new TypeError("PKCS#7 invalid length");const t=e[e.length-1];if(t>16)throw new TypeError("PKCS#7 padding byte out of range");const r=e.length-t;for(let n=0;n<t;n++)if(e[r+n]!==t)throw new TypeError("PKCS#7 invalid padding byte");return new Uint8Array(e.subarray(0,r))}},68596:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isScheduler=void 0;var n=r(10281);t.isScheduler=function(e){return e&&n.isFunction(e.schedule)}},68710:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishReplay=void 0;var n=r(10381),i=r(18464),o=r(10281);t.publishReplay=function(e,t,r,s){r&&!o.isFunction(r)&&(s=r);var a=o.isFunction(r)?r:void 0;return function(r){return i.multicast(new n.ReplaySubject(e,t,s),a)(r)}}},68961:(__unused_webpack_module,exports)=>{var indexOf=function(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0;r<e.length;r++)if(e[r]===t)return r;return-1},Object_keys=function(e){if(Object.keys)return Object.keys(e);var t=[];for(var r in e)t.push(r);return t},forEach=function(e,t){if(e.forEach)return e.forEach(t);for(var r=0;r<e.length;r++)t(e[r],r,e)},defineProp=function(){try{return Object.defineProperty({},"_",{}),function(e,t,r){Object.defineProperty(e,t,{writable:!0,enumerable:!1,configurable:!0,value:r})}}catch(e){return function(e,t,r){e[t]=r}}}(),globals=["Array","Boolean","Date","Error","EvalError","Function","Infinity","JSON","Math","NaN","Number","Object","RangeError","ReferenceError","RegExp","String","SyntaxError","TypeError","URIError","decodeURI","decodeURIComponent","encodeURI","encodeURIComponent","escape","eval","isFinite","isNaN","parseFloat","parseInt","undefined","unescape"];function Context(){}Context.prototype={};var Script=exports.Script=function(e){if(!(this instanceof Script))return new Script(e);this.code=e};Script.prototype.runInContext=function(e){if(!(e instanceof Context))throw new TypeError("needs a 'context' argument.");var t=document.createElement("iframe");t.style||(t.style={}),t.style.display="none",document.body.appendChild(t);var r=t.contentWindow,n=r.eval,i=r.execScript;!n&&i&&(i.call(r,"null"),n=r.eval),forEach(Object_keys(e),(function(t){r[t]=e[t]})),forEach(globals,(function(t){e[t]&&(r[t]=e[t])}));var o=Object_keys(r),s=n.call(r,this.code);return forEach(Object_keys(r),(function(t){(t in e||-1===indexOf(o,t))&&(e[t]=r[t])})),forEach(globals,(function(t){t in e||defineProp(e,t,r[t])})),document.body.removeChild(t),s},Script.prototype.runInThisContext=function(){return eval(this.code)},Script.prototype.runInNewContext=function(e){var t=Script.createContext(e),r=this.runInContext(t);return e&&forEach(Object_keys(t),(function(r){e[r]=t[r]})),r},forEach(Object_keys(Script.prototype),(function(e){exports[e]=Script[e]=function(t){var r=Script(t);return r[e].apply(r,[].slice.call(arguments,1))}})),exports.isContext=function(e){return e instanceof Context},exports.createScript=function(e){return exports.Script(e)},exports.createContext=Script.createContext=function(e){var t=new Context;return"object"==typeof e&&forEach(Object_keys(e),(function(r){t[r]=e[r]})),t}},69517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.UnsubscriptionError=void 0;var n=r(9619);t.UnsubscriptionError=n.createErrorClass((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}}))},69879:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},i=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},o=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.isSubscription=t.EMPTY_SUBSCRIPTION=t.Subscription=void 0;var s=r(10281),a=r(69517),u=r(54830),c=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,r,u,c;if(!this.closed){this.closed=!0;var f=this._parentage;if(f)if(this._parentage=null,Array.isArray(f))try{for(var h=n(f),d=h.next();!d.done;d=h.next())d.value.remove(this)}catch(t){e={error:t}}finally{try{d&&!d.done&&(t=h.return)&&t.call(h)}finally{if(e)throw e.error}}else f.remove(this);var p=this.initialTeardown;if(s.isFunction(p))try{p()}catch(e){c=e instanceof a.UnsubscriptionError?e.errors:[e]}var g=this._finalizers;if(g){this._finalizers=null;try{for(var b=n(g),y=b.next();!y.done;y=b.next()){var m=y.value;try{l(m)}catch(e){c=null!=c?c:[],e instanceof a.UnsubscriptionError?c=o(o([],i(c)),i(e.errors)):c.push(e)}}}catch(e){r={error:e}}finally{try{y&&!y.done&&(u=b.return)&&u.call(b)}finally{if(r)throw r.error}}}if(c)throw new a.UnsubscriptionError(c)}},e.prototype.add=function(t){var r;if(t&&t!==this)if(this.closed)l(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(r=this._finalizers)&&void 0!==r?r:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&u.arrRemove(t,e)},e.prototype.remove=function(t){var r=this._finalizers;r&&u.arrRemove(r,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}();function l(e){s.isFunction(e)?e():e.unsubscribe()}t.Subscription=c,t.EMPTY_SUBSCRIPTION=c.EMPTY,t.isSubscription=function(e){return e instanceof c||e&&"closed"in e&&s.isFunction(e.remove)&&s.isFunction(e.add)&&s.isFunction(e.unsubscribe)}},69915:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isEmpty=void 0;var n=r(65212),i=r(17214);t.isEmpty=function(){return n.operate((function(e,t){e.subscribe(i.createOperatorSubscriber(t,(function(){t.next(!1),t.complete()}),(function(){t.next(!0),t.complete()})))}))}},70022:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIndexedAccountPath=t.getAccountPath=t.HDNodeVoidWallet=t.HDNodeWallet=t.defaultPath=void 0;const n=r(32291),i=r(3996),o=r(77778),s=r(75347),a=r(79943),u=r(68394),c=r(12931),l=r(61650);t.defaultPath="m/44'/60'/0'/0/0";const f=new Uint8Array([66,105,116,99,111,105,110,32,115,101,101,100]),h=2147483648,d=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141");function p(e,t){let r="";for(;e;)r="0123456789abcdef"[e%16]+r,e=Math.trunc(e/16);for(;r.length<2*t;)r="0"+r;return"0x"+r}function g(e){const t=(0,s.getBytes)(e),r=(0,s.dataSlice)((0,n.sha256)((0,n.sha256)(t)),0,4),i=(0,s.concat)([t,r]);return(0,s.encodeBase58)(i)}const b={};function y(e,t,r,i){const o=new Uint8Array(37);e&h?((0,s.assert)(null!=i,"cannot derive child of neutered node","UNSUPPORTED_OPERATION",{operation:"deriveChild"}),o.set((0,s.getBytes)(i),1)):o.set((0,s.getBytes)(r));for(let t=24;t>=0;t-=8)o[33+(t>>3)]=e>>24-t&255;const a=(0,s.getBytes)((0,n.computeHmac)("sha512",t,o));return{IL:a.slice(0,32),IR:a.slice(32)}}function m(e,t){const r=t.split("/");(0,s.assertArgument)(r.length>0,"invalid path","path",t),"m"===r[0]&&((0,s.assertArgument)(0===e.depth,`cannot derive root path (i.e. path starting with "m/") for a node at non-zero depth ${e.depth}`,"path",t),r.shift());let n=e;for(let e=0;e<r.length;e++){const t=r[e];if(t.match(/^[0-9]+'$/)){const r=parseInt(t.substring(0,t.length-1));(0,s.assertArgument)(r<h,"invalid path index",`path[${e}]`,t),n=n.deriveChild(h+r)}else if(t.match(/^[0-9]+$/)){const r=parseInt(t);(0,s.assertArgument)(r<h,"invalid path index",`path[${e}]`,t),n=n.deriveChild(r)}else(0,s.assertArgument)(!1,"invalid path component",`path[${e}]`,t)}return n}class v extends u.BaseWallet{publicKey;fingerprint;parentFingerprint;mnemonic;chainCode;path;index;depth;constructor(e,t,r,i,o,a,u,c,l){super(t,l),(0,s.assertPrivate)(e,b,"HDNodeWallet"),(0,s.defineProperties)(this,{publicKey:t.compressedPublicKey});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(this.publicKey)),0,4);(0,s.defineProperties)(this,{parentFingerprint:r,fingerprint:f,chainCode:i,path:o,index:a,depth:u}),(0,s.defineProperties)(this,{mnemonic:c})}connect(e){return new v(b,this.signingKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.mnemonic,e)}#Fe(){const e={address:this.address,privateKey:this.privateKey},t=this.mnemonic;return this.path&&t&&"en"===t.wordlist.locale&&""===t.password&&(e.mnemonic={path:this.path,locale:"en",entropy:t.entropy}),e}async encrypt(e,t){return await(0,l.encryptKeystoreJson)(this.#Fe(),e,{progressCallback:t})}encryptSync(e){return(0,l.encryptKeystoreJsonSync)(this.#Fe(),e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488ADE4",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,(0,s.concat)(["0x00",this.privateKey])]))}hasPath(){return null!=this.path}neuter(){return new w(b,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,this.provider)}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&h&&(r+="'"));const{IR:i,IL:o}=y(t,this.chainCode,this.publicKey,this.privateKey),a=new n.SigningKey((0,s.toBeHex)(((0,s.toBigInt)(o)+BigInt(this.privateKey))%d,32));return new v(b,a,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.mnemonic,this.provider)}derivePath(e){return m(this,e)}static#He(e,t){(0,s.assertArgument)((0,s.isBytesLike)(e),"invalid seed","seed","[REDACTED]");const r=(0,s.getBytes)(e,"seed");(0,s.assertArgument)(r.length>=16&&r.length<=64,"invalid seed","seed","[REDACTED]");const i=(0,s.getBytes)((0,n.computeHmac)("sha512",f,r)),o=new n.SigningKey((0,s.hexlify)(i.slice(0,32)));return new v(b,o,"0x00000000",(0,s.hexlify)(i.slice(32)),"m",0,0,t,null)}static fromExtendedKey(e){const t=(0,s.toBeArray)((0,s.decodeBase58)(e));(0,s.assertArgument)(82===t.length||g(t.slice(0,78))===e,"invalid extended key","extendedKey","[ REDACTED ]");const r=t[4],i=(0,s.hexlify)(t.slice(5,9)),a=parseInt((0,s.hexlify)(t.slice(9,13)).substring(2),16),u=(0,s.hexlify)(t.slice(13,45)),c=t.slice(45,78);switch((0,s.hexlify)(t.slice(0,4))){case"0x0488b21e":case"0x043587cf":{const e=(0,s.hexlify)(c);return new w(b,(0,o.computeAddress)(e),e,i,u,null,a,r,null)}case"0x0488ade4":case"0x04358394 ":if(0!==c[0])break;return new v(b,new n.SigningKey(c.slice(1)),i,u,null,a,r,null,null)}(0,s.assertArgument)(!1,"invalid extended key prefix","extendedKey","[ REDACTED ]")}static createRandom(e,r,i){null==e&&(e=""),null==r&&(r=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=c.Mnemonic.fromEntropy((0,n.randomBytes)(16),e,i);return v.#He(o.computeSeed(),o).derivePath(r)}static fromMnemonic(e,r){return r||(r=t.defaultPath),v.#He(e.computeSeed(),e).derivePath(r)}static fromPhrase(e,r,n,i){null==r&&(r=""),null==n&&(n=t.defaultPath),null==i&&(i=a.LangEn.wordlist());const o=c.Mnemonic.fromPhrase(e,r,i);return v.#He(o.computeSeed(),o).derivePath(n)}static fromSeed(e){return v.#He(e,null)}}t.HDNodeWallet=v;class w extends i.VoidSigner{publicKey;fingerprint;parentFingerprint;chainCode;path;index;depth;constructor(e,t,r,i,o,a,u,c,l){super(t,l),(0,s.assertPrivate)(e,b,"HDNodeVoidWallet"),(0,s.defineProperties)(this,{publicKey:r});const f=(0,s.dataSlice)((0,n.ripemd160)((0,n.sha256)(r)),0,4);(0,s.defineProperties)(this,{publicKey:r,fingerprint:f,parentFingerprint:i,chainCode:o,path:a,index:u,depth:c})}connect(e){return new w(b,this.address,this.publicKey,this.parentFingerprint,this.chainCode,this.path,this.index,this.depth,e)}get extendedKey(){return(0,s.assert)(this.depth<256,"Depth too deep","UNSUPPORTED_OPERATION",{operation:"extendedKey"}),g((0,s.concat)(["0x0488B21E",p(this.depth,1),this.parentFingerprint,p(this.index,4),this.chainCode,this.publicKey]))}hasPath(){return null!=this.path}deriveChild(e){const t=(0,s.getNumber)(e,"index");(0,s.assertArgument)(t<=4294967295,"invalid index","index",t);let r=this.path;r&&(r+="/"+(2147483647&t),t&h&&(r+="'"));const{IR:i,IL:a}=y(t,this.chainCode,this.publicKey,null),u=n.SigningKey.addPoints(a,this.publicKey,!0),c=(0,o.computeAddress)(u);return new w(b,c,u,this.fingerprint,(0,s.hexlify)(i),r,t,this.depth+1,this.provider)}derivePath(e){return m(this,e)}}t.HDNodeVoidWallet=w,t.getAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<h,"invalid account index","index",t),`m/44'/60'/${t}'/0/0`},t.getIndexedAccountPath=function(e){const t=(0,s.getNumber)(e,"index");return(0,s.assertArgument)(t>=0&&t<h,"invalid account index","index",t),`m/44'/60'/0'/0/${t}`}},70050:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.NostrSigner=void 0;const i=r(37897),o=r(45628),s=n(r(67476)),a=r(14193);class u{nostrConnector;credentials=new Map;MESSAGE_TO_SIGN="I Love Shogun!";constructor(e){this.nostrConnector=e||new i.NostrConnector}async createSigningCredential(e){try{(0,o.logDebug)(`Creating Nostr signing credential for address: ${e}`);const t=this.validateAddress(e),r=await this.generateDeterministicSignature(t),n=`${t.toLowerCase()}`,i=await this.generatePassword(r),s={address:t,signature:r,message:this.MESSAGE_TO_SIGN,username:n,password:i};return this.credentials.set(t.toLowerCase(),s),(0,o.logDebug)("Created Nostr signing credential:",s),s}catch(e){throw(0,o.logError)("Error creating Nostr signing credential:",e),new Error(`Failed to create Nostr signing credential: ${e.message}`)}}validateAddress(e){if(!e)throw new Error("Address not provided");try{const t=String(e).trim();if(!/^(npub1|[0-9a-f]{64}|bc1|[13])[a-zA-HJ-NP-Z0-9]{25,59}$/.test(t)&&t.length<10)throw new Error("Invalid Nostr/Bitcoin address format");return t}catch(e){throw new Error("Invalid Nostr/Bitcoin address provided")}}async generateDeterministicSignature(e){const t=`${e}_${this.MESSAGE_TO_SIGN}_shogun_deterministic`;let r="",n=0;for(let e=0;e<t.length;e++)n=31*n+t.charCodeAt(e)&4294967295,e%4==3&&(r+=n.toString(16).padStart(8,"0"));for(;r.length<128;)n=31*n+r.length&4294967295,r+=n.toString(16).padStart(8,"0");let i=r.substring(0,128);return i=i.toLowerCase().replace(/[^0-9a-f]/g,"0"),i.length<128?i=i.padEnd(128,"0"):i.length>128&&(i=i.substring(0,128)),(0,o.logDebug)(`Generated deterministic signature: ${i.substring(0,16)}... (${i.length} chars)`),i}async generatePassword(e){if(!e)throw new Error("Invalid signature");try{const t=e.toLowerCase().replace(/[^a-f0-9]/g,"");return a.ethers.sha256(a.ethers.toUtf8Bytes(t))}catch(e){throw(0,o.logError)("Error generating password:",e),new Error("Failed to generate password from signature")}}createAuthenticator(e){const t=this.credentials.get(e.toLowerCase());if(!t)throw new Error(`Credential for address ${e} not found`);return async e=>{try{const r=JSON.stringify(e),n=await this.signData(r,t);return(0,o.logDebug)("Nostr authentication successful:",{data:e,signature:n}),n}catch(e){throw(0,o.logError)("Nostr authentication error:",e),e}}}async signData(e,t){const r=`${t.signature}_${e}_${Date.now()}`;return this.generateDeterministicSignature(r)}async createDerivedKeyPair(e,t){const r=this.credentials.get(e.toLowerCase());if(!r)throw new Error(`Credential for address ${e} not found`);try{const e=await(0,s.default)(r.password,t,{includeP256:!0});return{pub:e.pub,priv:e.priv,epub:e.epub,epriv:e.epriv}}catch(e){throw(0,o.logError)("Error deriving keys from Nostr credential:",e),e}}async createGunUser(e,t){const r=this.credentials.get(e.toLowerCase());if(!r)throw new Error(`Credential for address ${e} not found`);try{return new Promise((n=>{t.user().create(r.username,r.password,(i=>{i.err?t.user().auth(r.username,r.password,(t=>{if(t.err)n({success:!1,error:t.err});else{const i=t.pub;r.gunUserPub=i,this.credentials.set(e.toLowerCase(),r),n({success:!0,userPub:i})}})):t.user().auth(r.username,r.password,(t=>{if(t.err)n({success:!1,error:t.err});else{const i=t.pub;r.gunUserPub=i,this.credentials.set(e.toLowerCase(),r),n({success:!0,userPub:i})}}))}))}))}catch(e){return(0,o.logError)("Error creating Gun user:",e),{success:!1,error:e.message}}}async signWithDerivedKeys(e,t,r){try{const n=this.createAuthenticator(t);await n(e);const i=await this.createDerivedKeyPair(t,r),o=JSON.stringify(e),s={m:o,s:await this.generateDeterministicSignature(`${i.priv}_${o}`)};return"SEA"+JSON.stringify(s)}catch(e){throw(0,o.logError)("Error signing with derived keys:",e),e}}getGunUserPub(e){const t=this.credentials.get(e.toLowerCase());return t?.gunUserPub}getPassword(e){const t=this.credentials.get(e.toLowerCase());return t?.password}async verifyConsistency(e,t){if(!this.credentials.get(e.toLowerCase()))return{consistent:!1};const r=await this.createDerivedKeyPair(e);return{consistent:!t||r.pub===t,actualUserPub:r.pub,expectedUserPub:t}}getCredential(e){return this.credentials.get(e.toLowerCase())}listCredentials(){return Array.from(this.credentials.values())}removeCredential(e){return this.credentials.delete(e.toLowerCase())}}t.NostrSigner=u,t.default=u},70082:(e,t,r)=>{var n=r(56698),i=r(48287).Buffer,o=r(87568),s=o.base,a=o.constants.der;function u(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){s.Node.call(this,"der",e)}function l(e){return e<10?"0"+e:e}e.exports=u,u.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,s.Node),c.prototype._encodeComposite=function(e,t,r,n){var o,s=function(e,t,r,n){var i;if("seqof"===e?e="seq":"setof"===e&&(e="set"),a.tagByName.hasOwnProperty(e))i=a.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);i=e}return i>=31?n.error("Multi-octet tag encoding unsupported"):(t||(i|=32),i|=a.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128)return(o=new i(2))[0]=s,o[1]=n.length,this._createEncoderBuffer([o,n]);for(var u=1,c=n.length;c>=256;c>>=8)u++;(o=new i(2+u))[0]=s,o[1]=128|u,c=1+u;for(var l=n.length;l>0;c--,l>>=8)o[c]=255&l;return this._createEncoderBuffer([o,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new i(2*e.length),n=0;n<e.length;n++)r.writeUInt16BE(e.charCodeAt(n),2*n);return this._createEncoderBuffer(r)}return"numstr"===t?this._isNumstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: numstr supports only digits and space"):"printstr"===t?this._isPrintstr(e)?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: printstr supports only latin upper and lower case letters, digits, space, apostrophe, left and rigth parenthesis, plus sign, comma, hyphen, dot, slash, colon, equal sign, question mark"):/str$/.test(t)||"objDesc"===t?this._createEncoderBuffer(e):this.reporter.error("Encoding of string type: "+t+" unsupported")},c.prototype._encodeObjid=function(e,t,r){if("string"==typeof e){if(!t)return this.reporter.error("string objid given, but no values map found");if(!t.hasOwnProperty(e))return this.reporter.error("objid not found in values map");e=t[e].split(/[\s\.]+/g);for(var n=0;n<e.length;n++)e[n]|=0}else if(Array.isArray(e))for(e=e.slice(),n=0;n<e.length;n++)e[n]|=0;if(!Array.isArray(e))return this.reporter.error("objid() should be either array or string, got: "+JSON.stringify(e));if(!r){if(e[1]>=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var o=0;for(n=0;n<e.length;n++){var s=e[n];for(o++;s>=128;s>>=7)o++}var a=new i(o),u=a.length-1;for(n=e.length-1;n>=0;n--)for(s=e[n],a[u--]=127&s;(s>>=7)>0;)a[u--]=128|127&s;return this._createEncoderBuffer(a)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[l(n.getFullYear()),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[l(n.getFullYear()%100),l(n.getUTCMonth()+1),l(n.getUTCDate()),l(n.getUTCHours()),l(n.getUTCMinutes()),l(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!i.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new i(r)}if(i.isBuffer(e)){var n=e.length;0===e.length&&n++;var o=new i(n);return e.copy(o),0===e.length&&(o[0]=0),this._createEncoderBuffer(o)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var s=e;s>=256;s>>=8)n++;for(s=(o=new Array(n)).length-1;s>=0;s--)o[s]=255&e,e>>=8;return 128&o[0]&&o.unshift(0),this._createEncoderBuffer(new i(o))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,i=this._baseState;if(null===i.default)return!1;var o=e.join();if(void 0===i.defaultBuffer&&(i.defaultBuffer=this._encodeValue(i.default,t,r).join()),o.length!==i.defaultBuffer.length)return!1;for(n=0;n<o.length;n++)if(o[n]!==i.defaultBuffer[n])return!1;return!0}},70201:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.concatAll=void 0;var n=r(68087);t.concatAll=function(){return n.mergeAll(1)}},71398:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=void 0;const n=r(30646),i=r(65239),o=r(32291),s=r(75347),a=r(87918),u=r(72963),c=r(20778),l=BigInt(0),f=BigInt(2),h=BigInt(27),d=BigInt(28),p=BigInt(35),g=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),b=131072;function y(e,t){let r=e.toString(16);for(;r.length<2;)r="0"+r;return r+=(0,o.sha256)(t).substring(4),"0x"+r}function m(e){return"0x"===e?null:(0,n.getAddress)(e)}function v(e,t){try{return(0,a.accessListify)(e)}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function w(e,t){try{if(!Array.isArray(e))throw new Error("authorizationList: invalid array");const t=[];for(let r=0;r<e.length;r++){const n=e[r];if(!Array.isArray(n))throw new Error(`authorization[${r}]: invalid array`);if(6!==n.length)throw new Error(`authorization[${r}]: wrong length`);if(!n[1])throw new Error(`authorization[${r}]: null address`);t.push({address:m(n[1]),nonce:A(n[2],"nonce"),chainId:A(n[0],"chainId"),signature:o.Signature.from({yParity:E(n[3],"yParity"),r:(0,s.zeroPadValue)(n[4],32),s:(0,s.zeroPadValue)(n[5],32)})})}return t}catch(r){(0,s.assertArgument)(!1,r.message,t,e)}}function E(e,t){return"0x"===e?0:(0,s.getNumber)(e,t)}function A(e,t){if("0x"===e)return l;const r=(0,s.getBigInt)(e,t);return(0,s.assertArgument)(r<=g,"value exceeds uint size",t,r),r}function _(e,t){const r=(0,s.getBigInt)(e,"value"),n=(0,s.toBeArray)(r);return(0,s.assertArgument)(n.length<=32,"value too large",`tx.${t}`,r),n}function S(e){return(0,a.accessListify)(e).map((e=>[e.address,e.storageKeys]))}function P(e,t){(0,s.assertArgument)(Array.isArray(e),`invalid ${t}`,"value",e);for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid ${ param } hash",`value[${t}]`,e[t]);return e}function k(e,t){let r;try{if(r=E(t[0],"yParity"),0!==r&&1!==r)throw new Error("bad yParity")}catch(e){(0,s.assertArgument)(!1,"invalid yParity","yParity",t[0])}const n=(0,s.zeroPadValue)(t[1],32),i=(0,s.zeroPadValue)(t[2],32),a=o.Signature.from({r:n,s:i,yParity:r});e.signature=a}class O{#ze;#qe;#X;#Ge;#We;#Ve;#Ke;#$e;#Je;#Te;#Qe;#Ze;#Ye;#Xe;#et;#tt;#rt;get type(){return this.#ze}set type(e){switch(e){case null:this.#ze=null;break;case 0:case"legacy":this.#ze=0;break;case 1:case"berlin":case"eip-2930":this.#ze=1;break;case 2:case"london":case"eip-1559":this.#ze=2;break;case 3:case"cancun":case"eip-4844":this.#ze=3;break;case 4:case"pectra":case"eip-7702":this.#ze=4;break;default:(0,s.assertArgument)(!1,"unsupported transaction type","type",e)}}get typeName(){switch(this.type){case 0:return"legacy";case 1:return"eip-2930";case 2:return"eip-1559";case 3:return"eip-4844";case 4:return"eip-7702"}return null}get to(){const e=this.#qe;return null==e&&3===this.type?i.ZeroAddress:e}set to(e){this.#qe=null==e?null:(0,n.getAddress)(e)}get nonce(){return this.#Ge}set nonce(e){this.#Ge=(0,s.getNumber)(e,"value")}get gasLimit(){return this.#We}set gasLimit(e){this.#We=(0,s.getBigInt)(e)}get gasPrice(){const e=this.#Ve;return null!=e||0!==this.type&&1!==this.type?e:l}set gasPrice(e){this.#Ve=null==e?null:(0,s.getBigInt)(e,"gasPrice")}get maxPriorityFeePerGas(){const e=this.#Ke;return null==e?2===this.type||3===this.type?l:null:e}set maxPriorityFeePerGas(e){this.#Ke=null==e?null:(0,s.getBigInt)(e,"maxPriorityFeePerGas")}get maxFeePerGas(){const e=this.#$e;return null==e?2===this.type||3===this.type?l:null:e}set maxFeePerGas(e){this.#$e=null==e?null:(0,s.getBigInt)(e,"maxFeePerGas")}get data(){return this.#X}set data(e){this.#X=(0,s.hexlify)(e)}get value(){return this.#Je}set value(e){this.#Je=(0,s.getBigInt)(e,"value")}get chainId(){return this.#Te}set chainId(e){this.#Te=(0,s.getBigInt)(e)}get signature(){return this.#Qe||null}set signature(e){this.#Qe=null==e?null:o.Signature.from(e)}get accessList(){const e=this.#Ze||null;return null==e?1===this.type||2===this.type||3===this.type?[]:null:e}set accessList(e){this.#Ze=null==e?null:(0,a.accessListify)(e)}get authorizationList(){const e=this.#rt||null;return null==e&&4===this.type?[]:e}set authorizationList(e){this.#rt=null==e?null:e.map((e=>(0,u.authorizationify)(e)))}get maxFeePerBlobGas(){const e=this.#Ye;return null==e&&3===this.type?l:e}set maxFeePerBlobGas(e){this.#Ye=null==e?null:(0,s.getBigInt)(e,"maxFeePerBlobGas")}get blobVersionedHashes(){let e=this.#Xe;return null==e&&3===this.type?[]:e}set blobVersionedHashes(e){if(null!=e){(0,s.assertArgument)(Array.isArray(e),"blobVersionedHashes must be an Array","value",e),e=e.slice();for(let t=0;t<e.length;t++)(0,s.assertArgument)((0,s.isHexString)(e[t],32),"invalid blobVersionedHash",`value[${t}]`,e[t])}this.#Xe=e}get blobs(){return null==this.#tt?null:this.#tt.map((e=>Object.assign({},e)))}set blobs(e){if(null==e)return void(this.#tt=null);const t=[],r=[];for(let n=0;n<e.length;n++){const i=e[n];if((0,s.isBytesLike)(i)){(0,s.assert)(this.#et,"adding a raw blob requires a KZG library","UNSUPPORTED_OPERATION",{operation:"set blobs()"});let e=(0,s.getBytes)(i);if((0,s.assertArgument)(e.length<=b,"blob is too large",`blobs[${n}]`,i),e.length!==b){const t=new Uint8Array(b);t.set(e),e=t}const o=this.#et.blobToKzgCommitment(e),a=(0,s.hexlify)(this.#et.computeBlobKzgProof(e,o));t.push({data:(0,s.hexlify)(e),commitment:(0,s.hexlify)(o),proof:a}),r.push(y(1,o))}else{const e=(0,s.hexlify)(i.commitment);t.push({data:(0,s.hexlify)(i.data),commitment:e,proof:(0,s.hexlify)(i.proof)}),r.push(y(1,e))}}this.#tt=t,this.#Xe=r}get kzg(){return this.#et}set kzg(e){this.#et=null==e?null:function(e){return{blobToKzgCommitment:t=>{if("computeBlobProof"in e){if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment((0,s.hexlify)(t)))}else if("blobToKzgCommitment"in e&&"function"==typeof e.blobToKzgCommitment)return(0,s.getBytes)(e.blobToKzgCommitment(t));if("blobToKZGCommitment"in e&&"function"==typeof e.blobToKZGCommitment)return(0,s.getBytes)(e.blobToKZGCommitment((0,s.hexlify)(t)));(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)},computeBlobKzgProof:(t,r)=>"computeBlobProof"in e&&"function"==typeof e.computeBlobProof?(0,s.getBytes)(e.computeBlobProof((0,s.hexlify)(t),(0,s.hexlify)(r))):"computeBlobKzgProof"in e&&"function"==typeof e.computeBlobKzgProof?e.computeBlobKzgProof(t,r):"computeBlobKZGProof"in e&&"function"==typeof e.computeBlobKZGProof?(0,s.getBytes)(e.computeBlobKZGProof((0,s.hexlify)(t),(0,s.hexlify)(r))):void(0,s.assertArgument)(!1,"unsupported KZG library","kzg",e)}}(e)}constructor(){this.#ze=null,this.#qe=null,this.#Ge=0,this.#We=l,this.#Ve=null,this.#Ke=null,this.#$e=null,this.#X="0x",this.#Je=l,this.#Te=l,this.#Qe=null,this.#Ze=null,this.#Ye=null,this.#Xe=null,this.#et=null,this.#tt=null,this.#rt=null}get hash(){return null==this.signature?null:(0,o.keccak256)(this.#nt(!0,!1))}get unsignedHash(){return(0,o.keccak256)(this.unsignedSerialized)}get from(){return null==this.signature?null:(0,c.recoverAddress)(this.unsignedHash,this.signature)}get fromPublicKey(){return null==this.signature?null:o.SigningKey.recoverPublicKey(this.unsignedHash,this.signature)}isSigned(){return null!=this.signature}#nt(e,t){(0,s.assert)(!e||null!=this.signature,"cannot serialize unsigned transaction; maybe you meant .unsignedSerialized","UNSUPPORTED_OPERATION",{operation:".serialized"});const r=e?this.signature:null;switch(this.inferType()){case 0:return function(e,t){const r=[_(e.nonce,"nonce"),_(e.gasPrice||0,"gasPrice"),_(e.gasLimit,"gasLimit"),e.to||"0x",_(e.value,"value"),e.data];let n=l;if(e.chainId!=l)n=(0,s.getBigInt)(e.chainId,"tx.chainId"),(0,s.assertArgument)(!t||null==t.networkV||t.legacyChainId===n,"tx.chainId/sig.v mismatch","sig",t);else if(e.signature){const t=e.signature.legacyChainId;null!=t&&(n=t)}if(!t)return n!==l&&(r.push((0,s.toBeArray)(n)),r.push("0x"),r.push("0x")),(0,s.encodeRlp)(r);let i=BigInt(27+t.yParity);return n!==l?i=o.Signature.getChainIdV(n,t.v):BigInt(t.v)!==i&&(0,s.assertArgument)(!1,"tx.chainId/sig.v mismatch","sig",t),r.push((0,s.toBeArray)(i)),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s)),(0,s.encodeRlp)(r)}(this,r);case 1:return function(e,t){const r=[_(e.chainId,"chainId"),_(e.nonce,"nonce"),_(e.gasPrice||0,"gasPrice"),_(e.gasLimit,"gasLimit"),e.to||"0x",_(e.value,"value"),e.data,S(e.accessList||[])];return t&&(r.push(_(t.yParity,"recoveryParam")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x01",(0,s.encodeRlp)(r)])}(this,r);case 2:return function(e,t){const r=[_(e.chainId,"chainId"),_(e.nonce,"nonce"),_(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_(e.maxFeePerGas||0,"maxFeePerGas"),_(e.gasLimit,"gasLimit"),e.to||"0x",_(e.value,"value"),e.data,S(e.accessList||[])];return t&&(r.push(_(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x02",(0,s.encodeRlp)(r)])}(this,r);case 3:return function(e,t,r){const n=[_(e.chainId,"chainId"),_(e.nonce,"nonce"),_(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_(e.maxFeePerGas||0,"maxFeePerGas"),_(e.gasLimit,"gasLimit"),e.to||i.ZeroAddress,_(e.value,"value"),e.data,S(e.accessList||[]),_(e.maxFeePerBlobGas||0,"maxFeePerBlobGas"),P(e.blobVersionedHashes||[],"blobVersionedHashes")];return t&&(n.push(_(t.yParity,"yParity")),n.push((0,s.toBeArray)(t.r)),n.push((0,s.toBeArray)(t.s)),r)?(0,s.concat)(["0x03",(0,s.encodeRlp)([n,r.map((e=>e.data)),r.map((e=>e.commitment)),r.map((e=>e.proof))])]):(0,s.concat)(["0x03",(0,s.encodeRlp)(n)])}(this,r,t?this.blobs:null);case 4:return function(e,t){const r=[_(e.chainId,"chainId"),_(e.nonce,"nonce"),_(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),_(e.maxFeePerGas||0,"maxFeePerGas"),_(e.gasLimit,"gasLimit"),e.to||"0x",_(e.value,"value"),e.data,S(e.accessList||[]),(n=e.authorizationList||[],n.map((e=>[_(e.chainId,"chainId"),e.address,_(e.nonce,"nonce"),_(e.signature.yParity,"yParity"),e.signature.r,e.signature.s])))];var n;return t&&(r.push(_(t.yParity,"yParity")),r.push((0,s.toBeArray)(t.r)),r.push((0,s.toBeArray)(t.s))),(0,s.concat)(["0x04",(0,s.encodeRlp)(r)])}(this,r)}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:".serialized"})}get serialized(){return this.#nt(!0,!0)}get unsignedSerialized(){return this.#nt(!1,!1)}inferType(){const e=this.inferTypes();return e.indexOf(2)>=0?2:e.pop()}inferTypes(){const e=null!=this.gasPrice,t=null!=this.maxFeePerGas||null!=this.maxPriorityFeePerGas,r=null!=this.accessList,n=null!=this.#Ye||this.#Xe;null!=this.maxFeePerGas&&null!=this.maxPriorityFeePerGas&&(0,s.assert)(this.maxFeePerGas>=this.maxPriorityFeePerGas,"priorityFee cannot be more than maxFee","BAD_DATA",{value:this}),(0,s.assert)(!t||0!==this.type&&1!==this.type,"transaction type cannot have maxFeePerGas or maxPriorityFeePerGas","BAD_DATA",{value:this}),(0,s.assert)(0!==this.type||!r,"legacy transaction cannot have accessList","BAD_DATA",{value:this});const i=[];return null!=this.type?i.push(this.type):this.authorizationList&&this.authorizationList.length?i.push(4):t?i.push(2):e?(i.push(1),r||i.push(0)):r?(i.push(1),i.push(2)):(n&&this.to||(i.push(0),i.push(1),i.push(2)),i.push(3)),i.sort(),i}isLegacy(){return 0===this.type}isBerlin(){return 1===this.type}isLondon(){return 2===this.type}isCancun(){return 3===this.type}clone(){return O.from(this)}toJSON(){const e=e=>null==e?null:e.toString();return{type:this.type,to:this.to,data:this.data,nonce:this.nonce,gasLimit:e(this.gasLimit),gasPrice:e(this.gasPrice),maxPriorityFeePerGas:e(this.maxPriorityFeePerGas),maxFeePerGas:e(this.maxFeePerGas),value:e(this.value),chainId:e(this.chainId),sig:this.signature?this.signature.toJSON():null,accessList:this.accessList}}static from(e){if(null==e)return new O;if("string"==typeof e){const t=(0,s.getBytes)(e);if(t[0]>=127)return O.from(function(e){const t=(0,s.decodeRlp)(e);(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||6===t.length),"invalid field count for legacy transaction","data",e);const r={type:0,nonce:E(t[0],"nonce"),gasPrice:A(t[1],"gasPrice"),gasLimit:A(t[2],"gasLimit"),to:m(t[3]),value:A(t[4],"value"),data:(0,s.hexlify)(t[5]),chainId:l};if(6===t.length)return r;const n=A(t[6],"v"),i=A(t[7],"r"),a=A(t[8],"s");if(i===l&&a===l)r.chainId=n;else{let e=(n-p)/f;e<l&&(e=l),r.chainId=e,(0,s.assertArgument)(e!==l||n===h||n===d,"non-canonical legacy v","v",t[6]),r.signature=o.Signature.from({r:(0,s.zeroPadValue)(t[7],32),s:(0,s.zeroPadValue)(t[8],32),v:n})}return r}(t));switch(t[0]){case 1:return O.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(8===t.length||11===t.length),"invalid field count for transaction type: 1","data",(0,s.hexlify)(e));const r={type:1,chainId:A(t[0],"chainId"),nonce:E(t[1],"nonce"),gasPrice:A(t[2],"gasPrice"),gasLimit:A(t[3],"gasLimit"),to:m(t[4]),value:A(t[5],"value"),data:(0,s.hexlify)(t[6]),accessList:v(t[7],"accessList")};return 8===t.length||k(r,t.slice(8)),r}(t));case 2:return O.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(9===t.length||12===t.length),"invalid field count for transaction type: 2","data",(0,s.hexlify)(e));const r={type:2,chainId:A(t[0],"chainId"),nonce:E(t[1],"nonce"),maxPriorityFeePerGas:A(t[2],"maxPriorityFeePerGas"),maxFeePerGas:A(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:A(t[4],"gasLimit"),to:m(t[5]),value:A(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList")};return 9===t.length||k(r,t.slice(9)),r}(t));case 3:return O.from(function(e){let t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1)),r="3",n=null;if(4===t.length&&Array.isArray(t[0])){r="3 (network format)";const e=t[1],i=t[2],o=t[3];(0,s.assertArgument)(Array.isArray(e),"invalid network format: blobs not an array","fields[1]",e),(0,s.assertArgument)(Array.isArray(i),"invalid network format: commitments not an array","fields[2]",i),(0,s.assertArgument)(Array.isArray(o),"invalid network format: proofs not an array","fields[3]",o),(0,s.assertArgument)(e.length===i.length,"invalid network format: blobs/commitments length mismatch","fields",t),(0,s.assertArgument)(e.length===o.length,"invalid network format: blobs/proofs length mismatch","fields",t),n=[];for(let r=0;r<t[1].length;r++)n.push({data:e[r],commitment:i[r],proof:o[r]});t=t[0]}(0,s.assertArgument)(Array.isArray(t)&&(11===t.length||14===t.length),`invalid field count for transaction type: ${r}`,"data",(0,s.hexlify)(e));const i={type:3,chainId:A(t[0],"chainId"),nonce:E(t[1],"nonce"),maxPriorityFeePerGas:A(t[2],"maxPriorityFeePerGas"),maxFeePerGas:A(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:A(t[4],"gasLimit"),to:m(t[5]),value:A(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),maxFeePerBlobGas:A(t[9],"maxFeePerBlobGas"),blobVersionedHashes:t[10]};n&&(i.blobs=n),(0,s.assertArgument)(null!=i.to,`invalid address for transaction type: ${r}`,"data",e),(0,s.assertArgument)(Array.isArray(i.blobVersionedHashes),"invalid blobVersionedHashes: must be an array","data",e);for(let t=0;t<i.blobVersionedHashes.length;t++)(0,s.assertArgument)((0,s.isHexString)(i.blobVersionedHashes[t],32),`invalid blobVersionedHash at index ${t}: must be length 32`,"data",e);return 11===t.length||k(i,t.slice(11)),i}(t));case 4:return O.from(function(e){const t=(0,s.decodeRlp)((0,s.getBytes)(e).slice(1));(0,s.assertArgument)(Array.isArray(t)&&(10===t.length||13===t.length),"invalid field count for transaction type: 4","data",(0,s.hexlify)(e));const r={type:4,chainId:A(t[0],"chainId"),nonce:E(t[1],"nonce"),maxPriorityFeePerGas:A(t[2],"maxPriorityFeePerGas"),maxFeePerGas:A(t[3],"maxFeePerGas"),gasPrice:null,gasLimit:A(t[4],"gasLimit"),to:m(t[5]),value:A(t[6],"value"),data:(0,s.hexlify)(t[7]),accessList:v(t[8],"accessList"),authorizationList:w(t[9],"authorizationList")};return 10===t.length||k(r,t.slice(10)),r}(t))}(0,s.assert)(!1,"unsupported transaction type","UNSUPPORTED_OPERATION",{operation:"from"})}const t=new O;return null!=e.type&&(t.type=e.type),null!=e.to&&(t.to=e.to),null!=e.nonce&&(t.nonce=e.nonce),null!=e.gasLimit&&(t.gasLimit=e.gasLimit),null!=e.gasPrice&&(t.gasPrice=e.gasPrice),null!=e.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas),null!=e.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null!=e.maxFeePerBlobGas&&(t.maxFeePerBlobGas=e.maxFeePerBlobGas),null!=e.data&&(t.data=e.data),null!=e.value&&(t.value=e.value),null!=e.chainId&&(t.chainId=e.chainId),null!=e.signature&&(t.signature=o.Signature.from(e.signature)),null!=e.accessList&&(t.accessList=e.accessList),null!=e.authorizationList&&(t.authorizationList=e.authorizationList),null!=e.blobVersionedHashes&&(t.blobVersionedHashes=e.blobVersionedHashes),null!=e.kzg&&(t.kzg=e.kzg),null!=e.blobs&&(t.blobs=e.blobs),null!=e.hash&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.hash'","tx",e),(0,s.assertArgument)(t.hash===e.hash,"hash mismatch","tx",e)),null!=e.from&&((0,s.assertArgument)(t.isSigned(),"unsigned transaction cannot define '.from'","tx",e),(0,s.assertArgument)(t.from.toLowerCase()===(e.from||"").toLowerCase(),"from mismatch","tx",e)),t}}t.Transaction=O},71666:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.Action=void 0;var o=function(e){function t(t,r){return e.call(this)||this}return i(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(r(69879).Subscription);t.Action=o},71761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand_message_xmd=c,t.expand_message_xof=l,t.hash_to_field=f,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[o,s,a,u]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n))))),[c,l]=(0,i.FpInvertBatch)(e,[s,u],!0);return t=e.mul(o,c),n=e.mul(n,e.mul(a,l)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");function n(r){return e.fromAffine(t(r))}function i(t){const r=t.clearCofactor();return r.equals(e.ZERO)?e.ZERO:(r.assertValidity(),r)}return{defaults:r,hashToCurve(e,t){const o=r.DST?r.DST:{},s=f(e,2,Object.assign({},r,o,t)),a=n(s[0]),u=n(s[1]);return i(a.add(u))},encodeToCurve(e,t){const o=r.encodeDST?r.encodeDST:{};return i(n(f(e,1,Object.assign({},r,o,t))[0]))},mapToCurve(e){if(!Array.isArray(e))throw new Error("expected array of bigints");for(const t of e)if("bigint"!=typeof t)throw new Error("expected array of bigints");return i(n(e))}}};const n=r(58627),i=r(24967),o=n.bytesToNumberBE;function s(e,t){if(u(e),u(t),e<0||e>=1<<8*t)throw new Error("invalid I2OSP input: "+e);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function c(e,t,r,i){(0,n.abytes)(e),(0,n.abytes)(t),u(r),t.length>255&&(t=i((0,n.concatBytes)((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:c}=i,l=Math.ceil(r/o);if(r>65535||l>255)throw new Error("expand_message_xmd: invalid lenInBytes");const f=(0,n.concatBytes)(t,s(t.length,1)),h=s(0,c),d=s(r,2),p=new Array(l),g=i((0,n.concatBytes)(h,e,d,s(0,1),f));p[0]=i((0,n.concatBytes)(g,s(1,1),f));for(let e=1;e<=l;e++){const t=[a(g,p[e-1]),s(e+1,1),f];p[e]=i((0,n.concatBytes)(...t))}return(0,n.concatBytes)(...p).slice(0,r)}function l(e,t,r,i,o){if((0,n.abytes)(e),(0,n.abytes)(t),u(r),t.length>255){const e=Math.ceil(2*i/8);t=o.create({dkLen:e}).update((0,n.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function f(e,t,r){(0,n._validateObject)(r,{p:"bigint",m:"number",k:"number",hash:"function"});const{p:s,k:a,m:f,hash:h,expand:d,DST:p}=r;if(!(0,n.isBytes)(p)&&"string"!=typeof p)throw new Error("DST must be string or uint8array");if(!(0,n.isHash)(r.hash))throw new Error("expected valid hash");(0,n.abytes)(e),u(t);const g="string"==typeof p?(0,n.utf8ToBytes)(p):p,b=s.toString(2).length,y=Math.ceil((b+a)/8),m=t*f*y;let v;if("xmd"===d)v=c(e,g,m,h);else if("xof"===d)v=l(e,g,m,a,h);else{if("_internal_pass"!==d)throw new Error('expand must be "xmd" or "xof"');v=e}const w=new Array(t);for(let e=0;e<t;e++){const t=new Array(f);for(let r=0;r<f;r++){const n=y*(r+e*f),a=v.subarray(n,n+y);t[r]=(0,i.mod)(o(a),s)}w[e]=t}return w}},72347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getDefaultProvider=void 0;const n=r(75347),i=r(6806),o=r(97841),s=r(48907),a=r(42271),u=r(5047),c=r(95855),l=r(28817),f=r(49902),h=r(42371),d=r(57698),p=r(50873),g="goerli kovan sepolia classicKotti optimism-goerli arbitrum-goerli matic-mumbai bnbt".split(" ");t.getDefaultProvider=function(e,t){null==t&&(t={});const r=e=>"-"!==t[e]&&("string"==typeof t.exclusive?e===t.exclusive:!Array.isArray(t.exclusive)||-1!==t.exclusive.indexOf(e));if("string"==typeof e&&e.match(/^https?:/))return new h.JsonRpcProvider(e);if("string"==typeof e&&e.match(/^wss?:/)||(b=e)&&"function"==typeof b.send&&"function"==typeof b.close)return new p.WebSocketProvider(e);var b;let y=null;try{y=d.Network.from(e)}catch(e){}const m=[];if(r("publicPolygon")&&y&&("matic"===y.name?m.push(new h.JsonRpcProvider("https://polygon-rpc.com/",y,{staticNetwork:y})):"matic-amoy"===y.name&&m.push(new h.JsonRpcProvider("https://rpc-amoy.polygon.technology/",y,{staticNetwork:y}))),r("alchemy"))try{m.push(new o.AlchemyProvider(e,t.alchemy))}catch(e){}if(r("ankr")&&null!=t.ankr)try{m.push(new i.AnkrProvider(e,t.ankr))}catch(e){}if(r("chainstack"))try{m.push(new s.ChainstackProvider(e,t.chainstack))}catch(e){}if(r("cloudflare"))try{m.push(new a.CloudflareProvider(e))}catch(e){}if(r("etherscan"))try{m.push(new u.EtherscanProvider(e,t.etherscan))}catch(e){}if(r("infura"))try{let r,n=t.infura;"object"==typeof n&&(r=n.projectSecret,n=n.projectId),m.push(new c.InfuraProvider(e,n,r))}catch(e){}if(r("quicknode"))try{let r=t.quicknode;m.push(new l.QuickNodeProvider(e,r))}catch(e){}if((0,n.assert)(m.length,"unsupported default network","UNSUPPORTED_OPERATION",{operation:"getDefaultProvider"}),1===m.length)return m[0];let v=Math.floor(m.length/2);return v>2&&(v=2),y&&-1!==g.indexOf(y.name)&&(v=1),t&&t.quorum&&(v=t.quorum),new f.FallbackProvider(m,void 0,{quorum:v})}},72684:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WordlistOwl=void 0;const n=r(23562),i=r(75347),o=r(22426),s=r(79011);class a extends s.Wordlist{#X;#it;constructor(e,t,r){super(e),this.#X=t,this.#it=r,this.#ot=null}get _data(){return this.#X}_decodeWords(){return(0,o.decodeOwl)(this.#X)}#ot;#st(){if(null==this.#ot){const e=this._decodeWords();if((0,n.id)(e.join("\n")+"\n")!==this.#it)throw new Error(`BIP39 Wordlist for ${this.locale} FAILED`);this.#ot=e}return this.#ot}getWord(e){const t=this.#st();return(0,i.assertArgument)(e>=0&&e<t.length,`invalid word index: ${e}`,"index",e),t[e]}getWordIndex(e){return this.#st().indexOf(e)}}t.WordlistOwl=a},72719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.catchError=void 0;var n=r(19724),i=r(17214),o=r(65212);t.catchError=function e(t){return o.operate((function(r,o){var s,a=null,u=!1;a=r.subscribe(i.createOperatorSubscriber(o,void 0,void 0,(function(i){s=n.innerFrom(t(i,e(t)(r))),a?(a.unsubscribe(),a=null,s.subscribe(o)):u=!0}))),u&&(a.unsubscribe(),a=null,s.subscribe(o))}))}},72885:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.delayWhen=void 0;var n=r(39546),i=r(54383),o=r(2959),s=r(13337),a=r(67478),u=r(19724);t.delayWhen=function e(t,r){return r?function(s){return n.concat(r.pipe(i.take(1),o.ignoreElements()),s.pipe(e(t)))}:a.mergeMap((function(e,r){return u.innerFrom(t(e,r)).pipe(i.take(1),s.mapTo(e))}))}},72963:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.authorizationify=void 0;const n=r(30646),i=r(32291),o=r(75347);t.authorizationify=function(e){return{address:(0,n.getAddress)(e.address),nonce:(0,o.getBigInt)(null!=e.nonce?e.nonce:0),chainId:(0,o.getBigInt)(null!=e.chainId?e.chainId:0),signature:i.Signature.from(e.signature)}}},73271:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getUrl=t.createGetUrl=void 0;const n=r(1500);function i(e){return async function(t,r){(0,n.assert)(null==r||!r.cancelled,"request cancelled before sending","CANCELLED");const i=t.url.split(":")[0].toLowerCase();(0,n.assert)("http"===i||"https"===i,`unsupported protocol ${i}`,"UNSUPPORTED_OPERATION",{info:{protocol:i},operation:"request"}),(0,n.assert)("https"===i||!t.credentials||t.allowInsecureAuthentication,"insecure authorized connections unsupported","UNSUPPORTED_OPERATION",{operation:"request"});let o=null;const s=new AbortController,a=setTimeout((()=>{o=(0,n.makeError)("request timeout","TIMEOUT"),s.abort()}),t.timeout);r&&r.addListener((()=>{o=(0,n.makeError)("request cancelled","CANCELLED"),s.abort()}));const u=Object.assign({},e,{method:t.method,headers:new Headers(Array.from(t)),body:t.body||void 0,signal:s.signal});let c;try{c=await fetch(t.url,u)}catch(e){if(clearTimeout(a),o)throw o;throw e}clearTimeout(a);const l={};c.headers.forEach(((e,t)=>{l[t.toLowerCase()]=e}));const f=await c.arrayBuffer(),h=null==f?null:new Uint8Array(f);return{statusCode:c.status,statusMessage:c.statusText,headers:l,body:h}}}t.createGetUrl=i;const o=i({});t.getUrl=async function(e,t){return o(e,t)}},73279:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=t.Mnemonic=t.encryptKeystoreJsonSync=t.encryptKeystoreJson=t.decryptKeystoreJson=t.decryptKeystoreJsonSync=t.isKeystoreJson=t.decryptCrowdsaleJson=t.isCrowdsaleJson=t.HDNodeVoidWallet=t.HDNodeWallet=t.getIndexedAccountPath=t.getAccountPath=t.defaultPath=t.BaseWallet=void 0;var n=r(68394);Object.defineProperty(t,"BaseWallet",{enumerable:!0,get:function(){return n.BaseWallet}});var i=r(70022);Object.defineProperty(t,"defaultPath",{enumerable:!0,get:function(){return i.defaultPath}}),Object.defineProperty(t,"getAccountPath",{enumerable:!0,get:function(){return i.getAccountPath}}),Object.defineProperty(t,"getIndexedAccountPath",{enumerable:!0,get:function(){return i.getIndexedAccountPath}}),Object.defineProperty(t,"HDNodeWallet",{enumerable:!0,get:function(){return i.HDNodeWallet}}),Object.defineProperty(t,"HDNodeVoidWallet",{enumerable:!0,get:function(){return i.HDNodeVoidWallet}});var o=r(97570);Object.defineProperty(t,"isCrowdsaleJson",{enumerable:!0,get:function(){return o.isCrowdsaleJson}}),Object.defineProperty(t,"decryptCrowdsaleJson",{enumerable:!0,get:function(){return o.decryptCrowdsaleJson}});var s=r(61650);Object.defineProperty(t,"isKeystoreJson",{enumerable:!0,get:function(){return s.isKeystoreJson}}),Object.defineProperty(t,"decryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.decryptKeystoreJsonSync}}),Object.defineProperty(t,"decryptKeystoreJson",{enumerable:!0,get:function(){return s.decryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJson",{enumerable:!0,get:function(){return s.encryptKeystoreJson}}),Object.defineProperty(t,"encryptKeystoreJsonSync",{enumerable:!0,get:function(){return s.encryptKeystoreJsonSync}});var a=r(12931);Object.defineProperty(t,"Mnemonic",{enumerable:!0,get:function(){return a.Mnemonic}});var u=r(86930);Object.defineProperty(t,"Wallet",{enumerable:!0,get:function(){return u.Wallet}})},73484:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toArray=void 0;var n=r(92070),i=r(65212),o=function(e,t){return e.push(t),e};t.toArray=function(){return i.operate((function(e,t){n.reduce(o,[])(e).subscribe(t)}))}},73562:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getHash=function(e){return{hash:e}},t.createCurve=function(e,t){const r=t=>(0,n.weierstrass)({...e,hash:t});return{...r(t),create:r}};const n=r(91705)},73726:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(28399).Transform;function o(e){i.call(this),this._block=n.allocUnsafe(e),this._blockSize=e,this._blockOffset=0,this._length=[0,0,0,0],this._finalized=!1}r(56698)(o,i),o.prototype._transform=function(e,t,r){var n=null;try{this.update(e,t)}catch(e){n=e}r(n)},o.prototype._flush=function(e){var t=null;try{this.push(this.digest())}catch(e){t=e}e(t)},o.prototype.update=function(e,t){if(function(e){if(!n.isBuffer(e)&&"string"!=typeof e)throw new TypeError("Data must be a string or a buffer")}(e),this._finalized)throw new Error("Digest already called");n.isBuffer(e)||(e=n.from(e,t));for(var r=this._block,i=0;this._blockOffset+e.length-i>=this._blockSize;){for(var o=this._blockOffset;o<this._blockSize;)r[o++]=e[i++];this._update(),this._blockOffset=0}for(;i<e.length;)r[this._blockOffset++]=e[i++];for(var s=0,a=8*e.length;a>0;++s)this._length[s]+=a,(a=this._length[s]/4294967296|0)>0&&(this._length[s]-=4294967296*a);return this},o.prototype._update=function(){throw new Error("_update is not implemented")},o.prototype.digest=function(e){if(this._finalized)throw new Error("Digest already called");this._finalized=!0;var t=this._digest();void 0!==e&&(t=t.toString(e)),this._block.fill(0),this._blockOffset=0;for(var r=0;r<4;++r)this._length[r]=0;return t},o.prototype._digest=function(){throw new Error("_digest is not implemented")},e.exports=o},73776:()=>{},73929:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sequenceEqual=void 0;var n=r(65212),i=r(17214),o=r(19724);t.sequenceEqual=function(e,t){return void 0===t&&(t=function(e,t){return e===t}),n.operate((function(r,n){var s={buffer:[],complete:!1},a={buffer:[],complete:!1},u=function(e){n.next(e),n.complete()},c=function(e,r){var o=i.createOperatorSubscriber(n,(function(n){var i=r.buffer,o=r.complete;0===i.length?o?u(!1):e.buffer.push(n):!t(n,i.shift())&&u(!1)}),(function(){e.complete=!0;var t=r.complete,n=r.buffer;t&&u(0===n.length),null==o||o.unsubscribe()}));return o};r.subscribe(c(s,a)),o.innerFrom(e).subscribe(c(a,s))}))}},73956:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.retryWhen=void 0;var n=r(19724),i=r(76808),o=r(65212),s=r(17214);t.retryWhen=function(e){return o.operate((function(t,r){var o,a,u=!1,c=function(){o=t.subscribe(s.createOperatorSubscriber(r,void 0,void 0,(function(t){a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){return o?c():u=!0})))),a&&a.next(t)}))),u&&(o.unsubscribe(),o=null,u=!1,c())};c()}))}},73968:e=>{!function(){var t,r={},n=setTimeout.turn||typeof setImmediate!=""+t&&setImmediate||setTimeout;function i(e){var t=parseFloat(e);return isNaN(t)?"true"==(e=e.trim())||"false"!=e&&("null"==e?null:void 0):t}r.parseAsync=function(e,r,o,s){if("string"==typeof e){var a={i:0,text:e,done:r,l:e.length,up:[]};s=s||32768,function r(){for(var o,u,c=a.text,l=a.i,f=a.l,h=0,d=a.w;h++<s;){var p=c[l++];if(l>f){a.end=!0;break}if(d){for(l=c.indexOf('"',l-1),p=c[l],u=0;"\\"==c[l-++u];);u=!(u%2),o=o||u,'"'!=p||u||(d=t,u=a.s,a.a?(u=c.slice(a.sl,l),(o||1+u.indexOf("\\"))&&(u=JSON.parse('"'+u+'"')),a.at instanceof Array?a.at.push(a.s=u):(a.at||(a.end=h=s,u=t),(a.at||{})[a.s]=a.s=u),a.s=t):(a.s=c.slice(a.sl,l),(o||1+a.s.indexOf("\\"))&&(a.s=JSON.parse('"'+a.s+'"'))),a.a=o=t),++l}else switch(p){case'"':a.sl=l,d=!0;break;case":":a.ai=l,a.a=!0;break;case",":(a.a||a.at instanceof Array)&&(u=c.slice(a.ai,l-1))&&t!==(u=i(u))&&(a.at instanceof Array?a.at.push(u):a.at[a.s]=u),a.a=t,a.at instanceof Array&&(a.a=!0,a.ai=l);break;case"{":a.up.push(a.at||(a.at={})),a.at instanceof Array?a.at.push(a.at={}):t!==(u=a.s)&&(a.at[u]=a.at={}),a.a=t;break;case"}":a.a&&(u=c.slice(a.ai,l-1))&&t!==(u=i(u))&&(a.at instanceof Array?a.at.push(u):(a.at||(a.end=h=s,u=t),(a.at||{})[a.s]=u)),a.a=t,a.at=a.up.pop();break;case"[":t!==(u=a.s)?(a.up.push(a.at),a.at[u]=a.at=[]):a.at||a.up.push(a.at=[]),a.a=!0,a.ai=l;break;case"]":a.a&&(u=c.slice(a.ai,l-1))&&t!==(u=i(u))&&(a.at instanceof Array?a.at.push(u):a.at[a.s]=u),a.a=t,a.at=a.up.pop()}}if(a.s=t,a.i=l,a.w=d,a.end){if(u=a.at,t===u)try{u=JSON.parse(e)}catch(e){return a.done(e)}a.done(t,u)}else n(r)}()}else try{r(t,JSON.parse(e))}catch(e){r(e)}},r.stringifyAsync=function(e,r,i,o,s){(s=s||{}).text=s.text||"",s.up=[s.at={d:e}],s.done=r,s.i=0;var a=0;!function e(){var r,i=s.at,o=i.d,u="";switch(i.i&&i.i-i.j>0&&(u+=","),t!==(r=i.k)&&(u+=JSON.stringify(r)+":"),typeof o){case"boolean":u+=""+o;break;case"string":u+=JSON.stringify(o);break;case"number":u+=isNaN(o)?"null":o;break;case"object":if(!o){u+="null";break}if(o instanceof Array){u+="[",(i={i:-1,as:o,up:i,j:0}).l=o.length,s.up.push(s.at=i);break}if("function"!=typeof(o||"").toJSON){u+="{",(i={i:-1,ok:Object.keys(o).sort(),as:o,up:i,j:0}).l=i.ok.length,s.up.push(s.at=i);break}if(r=o.toJSON()){u+=r;break}case"function":if(i.as instanceof Array){u+="null";break}default:u="",i.j++}for(s.text+=u;1+i.i>=i.l;)s.text+=i.ok?"}":"]",i=s.at=i.up;if(++i.i<i.l)return(r=i.ok)?i.d=i.as[i.k=r[i.i]]:i.d=i.as[i.i],++a<9?e():(a=0,void n(e));s.done(t,s.text)}()},typeof window!=""+t&&(window.YSON=r);try{e.exports=r}catch(e){}typeof JSON!=""+t&&(JSON.parseAsync=r.parseAsync,JSON.stringifyAsync=r.stringifyAsync)}()},74011:e=>{e.exports={doubles:{step:4,points:[["e60fce93b59e9ec53011aabc21c23e97b2a31369b87a5ae9c44ee89e2a6dec0a","f7e3507399e595929db99f34f57937101296891e44d23f0be1f32cce69616821"],["8282263212c609d9ea2a6e3e172de238d8c39cabd5ac1ca10646e23fd5f51508","11f8a8098557dfe45e8256e830b60ace62d613ac2f7b17bed31b6eaff6e26caf"],["175e159f728b865a72f99cc6c6fc846de0b93833fd2222ed73fce5b551e5b739","d3506e0d9e3c79eba4ef97a51ff71f5eacb5955add24345c6efa6ffee9fed695"],["363d90d447b00c9c99ceac05b6262ee053441c7e55552ffe526bad8f83ff4640","4e273adfc732221953b445397f3363145b9a89008199ecb62003c7f3bee9de9"],["8b4b5f165df3c2be8c6244b5b745638843e4a781a15bcd1b69f79a55dffdf80c","4aad0a6f68d308b4b3fbd7813ab0da04f9e336546162ee56b3eff0c65fd4fd36"],["723cbaa6e5db996d6bf771c00bd548c7b700dbffa6c0e77bcb6115925232fcda","96e867b5595cc498a921137488824d6e2660a0653779494801dc069d9eb39f5f"],["eebfa4d493bebf98ba5feec812c2d3b50947961237a919839a533eca0e7dd7fa","5d9a8ca3970ef0f269ee7edaf178089d9ae4cdc3a711f712ddfd4fdae1de8999"],["100f44da696e71672791d0a09b7bde459f1215a29b3c03bfefd7835b39a48db0","cdd9e13192a00b772ec8f3300c090666b7ff4a18ff5195ac0fbd5cd62bc65a09"],["e1031be262c7ed1b1dc9227a4a04c017a77f8d4464f3b3852c8acde6e534fd2d","9d7061928940405e6bb6a4176597535af292dd419e1ced79a44f18f29456a00d"],["feea6cae46d55b530ac2839f143bd7ec5cf8b266a41d6af52d5e688d9094696d","e57c6b6c97dce1bab06e4e12bf3ecd5c981c8957cc41442d3155debf18090088"],["da67a91d91049cdcb367be4be6ffca3cfeed657d808583de33fa978bc1ec6cb1","9bacaa35481642bc41f463f7ec9780e5dec7adc508f740a17e9ea8e27a68be1d"],["53904faa0b334cdda6e000935ef22151ec08d0f7bb11069f57545ccc1a37b7c0","5bc087d0bc80106d88c9eccac20d3c1c13999981e14434699dcb096b022771c8"],["8e7bcd0bd35983a7719cca7764ca906779b53a043a9b8bcaeff959f43ad86047","10b7770b2a3da4b3940310420ca9514579e88e2e47fd68b3ea10047e8460372a"],["385eed34c1cdff21e6d0818689b81bde71a7f4f18397e6690a841e1599c43862","283bebc3e8ea23f56701de19e9ebf4576b304eec2086dc8cc0458fe5542e5453"],["6f9d9b803ecf191637c73a4413dfa180fddf84a5947fbc9c606ed86c3fac3a7","7c80c68e603059ba69b8e2a30e45c4d47ea4dd2f5c281002d86890603a842160"],["3322d401243c4e2582a2147c104d6ecbf774d163db0f5e5313b7e0e742d0e6bd","56e70797e9664ef5bfb019bc4ddaf9b72805f63ea2873af624f3a2e96c28b2a0"],["85672c7d2de0b7da2bd1770d89665868741b3f9af7643397721d74d28134ab83","7c481b9b5b43b2eb6374049bfa62c2e5e77f17fcc5298f44c8e3094f790313a6"],["948bf809b1988a46b06c9f1919413b10f9226c60f668832ffd959af60c82a0a","53a562856dcb6646dc6b74c5d1c3418c6d4dff08c97cd2bed4cb7f88d8c8e589"],["6260ce7f461801c34f067ce0f02873a8f1b0e44dfc69752accecd819f38fd8e8","bc2da82b6fa5b571a7f09049776a1ef7ecd292238051c198c1a84e95b2b4ae17"],["e5037de0afc1d8d43d8348414bbf4103043ec8f575bfdc432953cc8d2037fa2d","4571534baa94d3b5f9f98d09fb990bddbd5f5b03ec481f10e0e5dc841d755bda"],["e06372b0f4a207adf5ea905e8f1771b4e7e8dbd1c6a6c5b725866a0ae4fce725","7a908974bce18cfe12a27bb2ad5a488cd7484a7787104870b27034f94eee31dd"],["213c7a715cd5d45358d0bbf9dc0ce02204b10bdde2a3f58540ad6908d0559754","4b6dad0b5ae462507013ad06245ba190bb4850f5f36a7eeddff2c27534b458f2"],["4e7c272a7af4b34e8dbb9352a5419a87e2838c70adc62cddf0cc3a3b08fbd53c","17749c766c9d0b18e16fd09f6def681b530b9614bff7dd33e0b3941817dcaae6"],["fea74e3dbe778b1b10f238ad61686aa5c76e3db2be43057632427e2840fb27b6","6e0568db9b0b13297cf674deccb6af93126b596b973f7b77701d3db7f23cb96f"],["76e64113f677cf0e10a2570d599968d31544e179b760432952c02a4417bdde39","c90ddf8dee4e95cf577066d70681f0d35e2a33d2b56d2032b4b1752d1901ac01"],["c738c56b03b2abe1e8281baa743f8f9a8f7cc643df26cbee3ab150242bcbb891","893fb578951ad2537f718f2eacbfbbbb82314eef7880cfe917e735d9699a84c3"],["d895626548b65b81e264c7637c972877d1d72e5f3a925014372e9f6588f6c14b","febfaa38f2bc7eae728ec60818c340eb03428d632bb067e179363ed75d7d991f"],["b8da94032a957518eb0f6433571e8761ceffc73693e84edd49150a564f676e03","2804dfa44805a1e4d7c99cc9762808b092cc584d95ff3b511488e4e74efdf6e7"],["e80fea14441fb33a7d8adab9475d7fab2019effb5156a792f1a11778e3c0df5d","eed1de7f638e00771e89768ca3ca94472d155e80af322ea9fcb4291b6ac9ec78"],["a301697bdfcd704313ba48e51d567543f2a182031efd6915ddc07bbcc4e16070","7370f91cfb67e4f5081809fa25d40f9b1735dbf7c0a11a130c0d1a041e177ea1"],["90ad85b389d6b936463f9d0512678de208cc330b11307fffab7ac63e3fb04ed4","e507a3620a38261affdcbd9427222b839aefabe1582894d991d4d48cb6ef150"],["8f68b9d2f63b5f339239c1ad981f162ee88c5678723ea3351b7b444c9ec4c0da","662a9f2dba063986de1d90c2b6be215dbbea2cfe95510bfdf23cbf79501fff82"],["e4f3fb0176af85d65ff99ff9198c36091f48e86503681e3e6686fd5053231e11","1e63633ad0ef4f1c1661a6d0ea02b7286cc7e74ec951d1c9822c38576feb73bc"],["8c00fa9b18ebf331eb961537a45a4266c7034f2f0d4e1d0716fb6eae20eae29e","efa47267fea521a1a9dc343a3736c974c2fadafa81e36c54e7d2a4c66702414b"],["e7a26ce69dd4829f3e10cec0a9e98ed3143d084f308b92c0997fddfc60cb3e41","2a758e300fa7984b471b006a1aafbb18d0a6b2c0420e83e20e8a9421cf2cfd51"],["b6459e0ee3662ec8d23540c223bcbdc571cbcb967d79424f3cf29eb3de6b80ef","67c876d06f3e06de1dadf16e5661db3c4b3ae6d48e35b2ff30bf0b61a71ba45"],["d68a80c8280bb840793234aa118f06231d6f1fc67e73c5a5deda0f5b496943e8","db8ba9fff4b586d00c4b1f9177b0e28b5b0e7b8f7845295a294c84266b133120"],["324aed7df65c804252dc0270907a30b09612aeb973449cea4095980fc28d3d5d","648a365774b61f2ff130c0c35aec1f4f19213b0c7e332843967224af96ab7c84"],["4df9c14919cde61f6d51dfdbe5fee5dceec4143ba8d1ca888e8bd373fd054c96","35ec51092d8728050974c23a1d85d4b5d506cdc288490192ebac06cad10d5d"],["9c3919a84a474870faed8a9c1cc66021523489054d7f0308cbfc99c8ac1f98cd","ddb84f0f4a4ddd57584f044bf260e641905326f76c64c8e6be7e5e03d4fc599d"],["6057170b1dd12fdf8de05f281d8e06bb91e1493a8b91d4cc5a21382120a959e5","9a1af0b26a6a4807add9a2daf71df262465152bc3ee24c65e899be932385a2a8"],["a576df8e23a08411421439a4518da31880cef0fba7d4df12b1a6973eecb94266","40a6bf20e76640b2c92b97afe58cd82c432e10a7f514d9f3ee8be11ae1b28ec8"],["7778a78c28dec3e30a05fe9629de8c38bb30d1f5cf9a3a208f763889be58ad71","34626d9ab5a5b22ff7098e12f2ff580087b38411ff24ac563b513fc1fd9f43ac"],["928955ee637a84463729fd30e7afd2ed5f96274e5ad7e5cb09eda9c06d903ac","c25621003d3f42a827b78a13093a95eeac3d26efa8a8d83fc5180e935bcd091f"],["85d0fef3ec6db109399064f3a0e3b2855645b4a907ad354527aae75163d82751","1f03648413a38c0be29d496e582cf5663e8751e96877331582c237a24eb1f962"],["ff2b0dce97eece97c1c9b6041798b85dfdfb6d8882da20308f5404824526087e","493d13fef524ba188af4c4dc54d07936c7b7ed6fb90e2ceb2c951e01f0c29907"],["827fbbe4b1e880ea9ed2b2e6301b212b57f1ee148cd6dd28780e5e2cf856e241","c60f9c923c727b0b71bef2c67d1d12687ff7a63186903166d605b68baec293ec"],["eaa649f21f51bdbae7be4ae34ce6e5217a58fdce7f47f9aa7f3b58fa2120e2b3","be3279ed5bbbb03ac69a80f89879aa5a01a6b965f13f7e59d47a5305ba5ad93d"],["e4a42d43c5cf169d9391df6decf42ee541b6d8f0c9a137401e23632dda34d24f","4d9f92e716d1c73526fc99ccfb8ad34ce886eedfa8d8e4f13a7f7131deba9414"],["1ec80fef360cbdd954160fadab352b6b92b53576a88fea4947173b9d4300bf19","aeefe93756b5340d2f3a4958a7abbf5e0146e77f6295a07b671cdc1cc107cefd"],["146a778c04670c2f91b00af4680dfa8bce3490717d58ba889ddb5928366642be","b318e0ec3354028add669827f9d4b2870aaa971d2f7e5ed1d0b297483d83efd0"],["fa50c0f61d22e5f07e3acebb1aa07b128d0012209a28b9776d76a8793180eef9","6b84c6922397eba9b72cd2872281a68a5e683293a57a213b38cd8d7d3f4f2811"],["da1d61d0ca721a11b1a5bf6b7d88e8421a288ab5d5bba5220e53d32b5f067ec2","8157f55a7c99306c79c0766161c91e2966a73899d279b48a655fba0f1ad836f1"],["a8e282ff0c9706907215ff98e8fd416615311de0446f1e062a73b0610d064e13","7f97355b8db81c09abfb7f3c5b2515888b679a3e50dd6bd6cef7c73111f4cc0c"],["174a53b9c9a285872d39e56e6913cab15d59b1fa512508c022f382de8319497c","ccc9dc37abfc9c1657b4155f2c47f9e6646b3a1d8cb9854383da13ac079afa73"],["959396981943785c3d3e57edf5018cdbe039e730e4918b3d884fdff09475b7ba","2e7e552888c331dd8ba0386a4b9cd6849c653f64c8709385e9b8abf87524f2fd"],["d2a63a50ae401e56d645a1153b109a8fcca0a43d561fba2dbb51340c9d82b151","e82d86fb6443fcb7565aee58b2948220a70f750af484ca52d4142174dcf89405"],["64587e2335471eb890ee7896d7cfdc866bacbdbd3839317b3436f9b45617e073","d99fcdd5bf6902e2ae96dd6447c299a185b90a39133aeab358299e5e9faf6589"],["8481bde0e4e4d885b3a546d3e549de042f0aa6cea250e7fd358d6c86dd45e458","38ee7b8cba5404dd84a25bf39cecb2ca900a79c42b262e556d64b1b59779057e"],["13464a57a78102aa62b6979ae817f4637ffcfed3c4b1ce30bcd6303f6caf666b","69be159004614580ef7e433453ccb0ca48f300a81d0942e13f495a907f6ecc27"],["bc4a9df5b713fe2e9aef430bcc1dc97a0cd9ccede2f28588cada3a0d2d83f366","d3a81ca6e785c06383937adf4b798caa6e8a9fbfa547b16d758d666581f33c1"],["8c28a97bf8298bc0d23d8c749452a32e694b65e30a9472a3954ab30fe5324caa","40a30463a3305193378fedf31f7cc0eb7ae784f0451cb9459e71dc73cbef9482"],["8ea9666139527a8c1dd94ce4f071fd23c8b350c5a4bb33748c4ba111faccae0","620efabbc8ee2782e24e7c0cfb95c5d735b783be9cf0f8e955af34a30e62b945"],["dd3625faef5ba06074669716bbd3788d89bdde815959968092f76cc4eb9a9787","7a188fa3520e30d461da2501045731ca941461982883395937f68d00c644a573"],["f710d79d9eb962297e4f6232b40e8f7feb2bc63814614d692c12de752408221e","ea98e67232d3b3295d3b535532115ccac8612c721851617526ae47a9c77bfc82"]]},naf:{wnd:7,points:[["f9308a019258c31049344f85f89d5229b531c845836f99b08601f113bce036f9","388f7b0f632de8140fe337e62a37f3566500a99934c2231b6cb9fd7584b8e672"],["2f8bde4d1a07209355b4a7250a5c5128e88b84bddc619ab7cba8d569b240efe4","d8ac222636e5e3d6d4dba9dda6c9c426f788271bab0d6840dca87d3aa6ac62d6"],["5cbdf0646e5db4eaa398f365f2ea7a0e3d419b7e0330e39ce92bddedcac4f9bc","6aebca40ba255960a3178d6d861a54dba813d0b813fde7b5a5082628087264da"],["acd484e2f0c7f65309ad178a9f559abde09796974c57e714c35f110dfc27ccbe","cc338921b0a7d9fd64380971763b61e9add888a4375f8e0f05cc262ac64f9c37"],["774ae7f858a9411e5ef4246b70c65aac5649980be5c17891bbec17895da008cb","d984a032eb6b5e190243dd56d7b7b365372db1e2dff9d6a8301d74c9c953c61b"],["f28773c2d975288bc7d1d205c3748651b075fbc6610e58cddeeddf8f19405aa8","ab0902e8d880a89758212eb65cdaf473a1a06da521fa91f29b5cb52db03ed81"],["d7924d4f7d43ea965a465ae3095ff41131e5946f3c85f79e44adbcf8e27e080e","581e2872a86c72a683842ec228cc6defea40af2bd896d3a5c504dc9ff6a26b58"],["defdea4cdb677750a420fee807eacf21eb9898ae79b9768766e4faa04a2d4a34","4211ab0694635168e997b0ead2a93daeced1f4a04a95c0f6cfb199f69e56eb77"],["2b4ea0a797a443d293ef5cff444f4979f06acfebd7e86d277475656138385b6c","85e89bc037945d93b343083b5a1c86131a01f60c50269763b570c854e5c09b7a"],["352bbf4a4cdd12564f93fa332ce333301d9ad40271f8107181340aef25be59d5","321eb4075348f534d59c18259dda3e1f4a1b3b2e71b1039c67bd3d8bcf81998c"],["2fa2104d6b38d11b0230010559879124e42ab8dfeff5ff29dc9cdadd4ecacc3f","2de1068295dd865b64569335bd5dd80181d70ecfc882648423ba76b532b7d67"],["9248279b09b4d68dab21a9b066edda83263c3d84e09572e269ca0cd7f5453714","73016f7bf234aade5d1aa71bdea2b1ff3fc0de2a887912ffe54a32ce97cb3402"],["daed4f2be3a8bf278e70132fb0beb7522f570e144bf615c07e996d443dee8729","a69dce4a7d6c98e8d4a1aca87ef8d7003f83c230f3afa726ab40e52290be1c55"],["c44d12c7065d812e8acf28d7cbb19f9011ecd9e9fdf281b0e6a3b5e87d22e7db","2119a460ce326cdc76c45926c982fdac0e106e861edf61c5a039063f0e0e6482"],["6a245bf6dc698504c89a20cfded60853152b695336c28063b61c65cbd269e6b4","e022cf42c2bd4a708b3f5126f16a24ad8b33ba48d0423b6efd5e6348100d8a82"],["1697ffa6fd9de627c077e3d2fe541084ce13300b0bec1146f95ae57f0d0bd6a5","b9c398f186806f5d27561506e4557433a2cf15009e498ae7adee9d63d01b2396"],["605bdb019981718b986d0f07e834cb0d9deb8360ffb7f61df982345ef27a7479","2972d2de4f8d20681a78d93ec96fe23c26bfae84fb14db43b01e1e9056b8c49"],["62d14dab4150bf497402fdc45a215e10dcb01c354959b10cfe31c7e9d87ff33d","80fc06bd8cc5b01098088a1950eed0db01aa132967ab472235f5642483b25eaf"],["80c60ad0040f27dade5b4b06c408e56b2c50e9f56b9b8b425e555c2f86308b6f","1c38303f1cc5c30f26e66bad7fe72f70a65eed4cbe7024eb1aa01f56430bd57a"],["7a9375ad6167ad54aa74c6348cc54d344cc5dc9487d847049d5eabb0fa03c8fb","d0e3fa9eca8726909559e0d79269046bdc59ea10c70ce2b02d499ec224dc7f7"],["d528ecd9b696b54c907a9ed045447a79bb408ec39b68df504bb51f459bc3ffc9","eecf41253136e5f99966f21881fd656ebc4345405c520dbc063465b521409933"],["49370a4b5f43412ea25f514e8ecdad05266115e4a7ecb1387231808f8b45963","758f3f41afd6ed428b3081b0512fd62a54c3f3afbb5b6764b653052a12949c9a"],["77f230936ee88cbbd73df930d64702ef881d811e0e1498e2f1c13eb1fc345d74","958ef42a7886b6400a08266e9ba1b37896c95330d97077cbbe8eb3c7671c60d6"],["f2dac991cc4ce4b9ea44887e5c7c0bce58c80074ab9d4dbaeb28531b7739f530","e0dedc9b3b2f8dad4da1f32dec2531df9eb5fbeb0598e4fd1a117dba703a3c37"],["463b3d9f662621fb1b4be8fbbe2520125a216cdfc9dae3debcba4850c690d45b","5ed430d78c296c3543114306dd8622d7c622e27c970a1de31cb377b01af7307e"],["f16f804244e46e2a09232d4aff3b59976b98fac14328a2d1a32496b49998f247","cedabd9b82203f7e13d206fcdf4e33d92a6c53c26e5cce26d6579962c4e31df6"],["caf754272dc84563b0352b7a14311af55d245315ace27c65369e15f7151d41d1","cb474660ef35f5f2a41b643fa5e460575f4fa9b7962232a5c32f908318a04476"],["2600ca4b282cb986f85d0f1709979d8b44a09c07cb86d7c124497bc86f082120","4119b88753c15bd6a693b03fcddbb45d5ac6be74ab5f0ef44b0be9475a7e4b40"],["7635ca72d7e8432c338ec53cd12220bc01c48685e24f7dc8c602a7746998e435","91b649609489d613d1d5e590f78e6d74ecfc061d57048bad9e76f302c5b9c61"],["754e3239f325570cdbbf4a87deee8a66b7f2b33479d468fbc1a50743bf56cc18","673fb86e5bda30fb3cd0ed304ea49a023ee33d0197a695d0c5d98093c536683"],["e3e6bd1071a1e96aff57859c82d570f0330800661d1c952f9fe2694691d9b9e8","59c9e0bba394e76f40c0aa58379a3cb6a5a2283993e90c4167002af4920e37f5"],["186b483d056a033826ae73d88f732985c4ccb1f32ba35f4b4cc47fdcf04aa6eb","3b952d32c67cf77e2e17446e204180ab21fb8090895138b4a4a797f86e80888b"],["df9d70a6b9876ce544c98561f4be4f725442e6d2b737d9c91a8321724ce0963f","55eb2dafd84d6ccd5f862b785dc39d4ab157222720ef9da217b8c45cf2ba2417"],["5edd5cc23c51e87a497ca815d5dce0f8ab52554f849ed8995de64c5f34ce7143","efae9c8dbc14130661e8cec030c89ad0c13c66c0d17a2905cdc706ab7399a868"],["290798c2b6476830da12fe02287e9e777aa3fba1c355b17a722d362f84614fba","e38da76dcd440621988d00bcf79af25d5b29c094db2a23146d003afd41943e7a"],["af3c423a95d9f5b3054754efa150ac39cd29552fe360257362dfdecef4053b45","f98a3fd831eb2b749a93b0e6f35cfb40c8cd5aa667a15581bc2feded498fd9c6"],["766dbb24d134e745cccaa28c99bf274906bb66b26dcf98df8d2fed50d884249a","744b1152eacbe5e38dcc887980da38b897584a65fa06cedd2c924f97cbac5996"],["59dbf46f8c94759ba21277c33784f41645f7b44f6c596a58ce92e666191abe3e","c534ad44175fbc300f4ea6ce648309a042ce739a7919798cd85e216c4a307f6e"],["f13ada95103c4537305e691e74e9a4a8dd647e711a95e73cb62dc6018cfd87b8","e13817b44ee14de663bf4bc808341f326949e21a6a75c2570778419bdaf5733d"],["7754b4fa0e8aced06d4167a2c59cca4cda1869c06ebadfb6488550015a88522c","30e93e864e669d82224b967c3020b8fa8d1e4e350b6cbcc537a48b57841163a2"],["948dcadf5990e048aa3874d46abef9d701858f95de8041d2a6828c99e2262519","e491a42537f6e597d5d28a3224b1bc25df9154efbd2ef1d2cbba2cae5347d57e"],["7962414450c76c1689c7b48f8202ec37fb224cf5ac0bfa1570328a8a3d7c77ab","100b610ec4ffb4760d5c1fc133ef6f6b12507a051f04ac5760afa5b29db83437"],["3514087834964b54b15b160644d915485a16977225b8847bb0dd085137ec47ca","ef0afbb2056205448e1652c48e8127fc6039e77c15c2378b7e7d15a0de293311"],["d3cc30ad6b483e4bc79ce2c9dd8bc54993e947eb8df787b442943d3f7b527eaf","8b378a22d827278d89c5e9be8f9508ae3c2ad46290358630afb34db04eede0a4"],["1624d84780732860ce1c78fcbfefe08b2b29823db913f6493975ba0ff4847610","68651cf9b6da903e0914448c6cd9d4ca896878f5282be4c8cc06e2a404078575"],["733ce80da955a8a26902c95633e62a985192474b5af207da6df7b4fd5fc61cd4","f5435a2bd2badf7d485a4d8b8db9fcce3e1ef8e0201e4578c54673bc1dc5ea1d"],["15d9441254945064cf1a1c33bbd3b49f8966c5092171e699ef258dfab81c045c","d56eb30b69463e7234f5137b73b84177434800bacebfc685fc37bbe9efe4070d"],["a1d0fcf2ec9de675b612136e5ce70d271c21417c9d2b8aaaac138599d0717940","edd77f50bcb5a3cab2e90737309667f2641462a54070f3d519212d39c197a629"],["e22fbe15c0af8ccc5780c0735f84dbe9a790badee8245c06c7ca37331cb36980","a855babad5cd60c88b430a69f53a1a7a38289154964799be43d06d77d31da06"],["311091dd9860e8e20ee13473c1155f5f69635e394704eaa74009452246cfa9b3","66db656f87d1f04fffd1f04788c06830871ec5a64feee685bd80f0b1286d8374"],["34c1fd04d301be89b31c0442d3e6ac24883928b45a9340781867d4232ec2dbdf","9414685e97b1b5954bd46f730174136d57f1ceeb487443dc5321857ba73abee"],["f219ea5d6b54701c1c14de5b557eb42a8d13f3abbcd08affcc2a5e6b049b8d63","4cb95957e83d40b0f73af4544cccf6b1f4b08d3c07b27fb8d8c2962a400766d1"],["d7b8740f74a8fbaab1f683db8f45de26543a5490bca627087236912469a0b448","fa77968128d9c92ee1010f337ad4717eff15db5ed3c049b3411e0315eaa4593b"],["32d31c222f8f6f0ef86f7c98d3a3335ead5bcd32abdd94289fe4d3091aa824bf","5f3032f5892156e39ccd3d7915b9e1da2e6dac9e6f26e961118d14b8462e1661"],["7461f371914ab32671045a155d9831ea8793d77cd59592c4340f86cbc18347b5","8ec0ba238b96bec0cbdddcae0aa442542eee1ff50c986ea6b39847b3cc092ff6"],["ee079adb1df1860074356a25aa38206a6d716b2c3e67453d287698bad7b2b2d6","8dc2412aafe3be5c4c5f37e0ecc5f9f6a446989af04c4e25ebaac479ec1c8c1e"],["16ec93e447ec83f0467b18302ee620f7e65de331874c9dc72bfd8616ba9da6b5","5e4631150e62fb40d0e8c2a7ca5804a39d58186a50e497139626778e25b0674d"],["eaa5f980c245f6f038978290afa70b6bd8855897f98b6aa485b96065d537bd99","f65f5d3e292c2e0819a528391c994624d784869d7e6ea67fb18041024edc07dc"],["78c9407544ac132692ee1910a02439958ae04877151342ea96c4b6b35a49f51","f3e0319169eb9b85d5404795539a5e68fa1fbd583c064d2462b675f194a3ddb4"],["494f4be219a1a77016dcd838431aea0001cdc8ae7a6fc688726578d9702857a5","42242a969283a5f339ba7f075e36ba2af925ce30d767ed6e55f4b031880d562c"],["a598a8030da6d86c6bc7f2f5144ea549d28211ea58faa70ebf4c1e665c1fe9b5","204b5d6f84822c307e4b4a7140737aec23fc63b65b35f86a10026dbd2d864e6b"],["c41916365abb2b5d09192f5f2dbeafec208f020f12570a184dbadc3e58595997","4f14351d0087efa49d245b328984989d5caf9450f34bfc0ed16e96b58fa9913"],["841d6063a586fa475a724604da03bc5b92a2e0d2e0a36acfe4c73a5514742881","73867f59c0659e81904f9a1c7543698e62562d6744c169ce7a36de01a8d6154"],["5e95bb399a6971d376026947f89bde2f282b33810928be4ded112ac4d70e20d5","39f23f366809085beebfc71181313775a99c9aed7d8ba38b161384c746012865"],["36e4641a53948fd476c39f8a99fd974e5ec07564b5315d8bf99471bca0ef2f66","d2424b1b1abe4eb8164227b085c9aa9456ea13493fd563e06fd51cf5694c78fc"],["336581ea7bfbbb290c191a2f507a41cf5643842170e914faeab27c2c579f726","ead12168595fe1be99252129b6e56b3391f7ab1410cd1e0ef3dcdcabd2fda224"],["8ab89816dadfd6b6a1f2634fcf00ec8403781025ed6890c4849742706bd43ede","6fdcef09f2f6d0a044e654aef624136f503d459c3e89845858a47a9129cdd24e"],["1e33f1a746c9c5778133344d9299fcaa20b0938e8acff2544bb40284b8c5fb94","60660257dd11b3aa9c8ed618d24edff2306d320f1d03010e33a7d2057f3b3b6"],["85b7c1dcb3cec1b7ee7f30ded79dd20a0ed1f4cc18cbcfcfa410361fd8f08f31","3d98a9cdd026dd43f39048f25a8847f4fcafad1895d7a633c6fed3c35e999511"],["29df9fbd8d9e46509275f4b125d6d45d7fbe9a3b878a7af872a2800661ac5f51","b4c4fe99c775a606e2d8862179139ffda61dc861c019e55cd2876eb2a27d84b"],["a0b1cae06b0a847a3fea6e671aaf8adfdfe58ca2f768105c8082b2e449fce252","ae434102edde0958ec4b19d917a6a28e6b72da1834aff0e650f049503a296cf2"],["4e8ceafb9b3e9a136dc7ff67e840295b499dfb3b2133e4ba113f2e4c0e121e5","cf2174118c8b6d7a4b48f6d534ce5c79422c086a63460502b827ce62a326683c"],["d24a44e047e19b6f5afb81c7ca2f69080a5076689a010919f42725c2b789a33b","6fb8d5591b466f8fc63db50f1c0f1c69013f996887b8244d2cdec417afea8fa3"],["ea01606a7a6c9cdd249fdfcfacb99584001edd28abbab77b5104e98e8e3b35d4","322af4908c7312b0cfbfe369f7a7b3cdb7d4494bc2823700cfd652188a3ea98d"],["af8addbf2b661c8a6c6328655eb96651252007d8c5ea31be4ad196de8ce2131f","6749e67c029b85f52a034eafd096836b2520818680e26ac8f3dfbcdb71749700"],["e3ae1974566ca06cc516d47e0fb165a674a3dabcfca15e722f0e3450f45889","2aeabe7e4531510116217f07bf4d07300de97e4874f81f533420a72eeb0bd6a4"],["591ee355313d99721cf6993ffed1e3e301993ff3ed258802075ea8ced397e246","b0ea558a113c30bea60fc4775460c7901ff0b053d25ca2bdeee98f1a4be5d196"],["11396d55fda54c49f19aa97318d8da61fa8584e47b084945077cf03255b52984","998c74a8cd45ac01289d5833a7beb4744ff536b01b257be4c5767bea93ea57a4"],["3c5d2a1ba39c5a1790000738c9e0c40b8dcdfd5468754b6405540157e017aa7a","b2284279995a34e2f9d4de7396fc18b80f9b8b9fdd270f6661f79ca4c81bd257"],["cc8704b8a60a0defa3a99a7299f2e9c3fbc395afb04ac078425ef8a1793cc030","bdd46039feed17881d1e0862db347f8cf395b74fc4bcdc4e940b74e3ac1f1b13"],["c533e4f7ea8555aacd9777ac5cad29b97dd4defccc53ee7ea204119b2889b197","6f0a256bc5efdf429a2fb6242f1a43a2d9b925bb4a4b3a26bb8e0f45eb596096"],["c14f8f2ccb27d6f109f6d08d03cc96a69ba8c34eec07bbcf566d48e33da6593","c359d6923bb398f7fd4473e16fe1c28475b740dd098075e6c0e8649113dc3a38"],["a6cbc3046bc6a450bac24789fa17115a4c9739ed75f8f21ce441f72e0b90e6ef","21ae7f4680e889bb130619e2c0f95a360ceb573c70603139862afd617fa9b9f"],["347d6d9a02c48927ebfb86c1359b1caf130a3c0267d11ce6344b39f99d43cc38","60ea7f61a353524d1c987f6ecec92f086d565ab687870cb12689ff1e31c74448"],["da6545d2181db8d983f7dcb375ef5866d47c67b1bf31c8cf855ef7437b72656a","49b96715ab6878a79e78f07ce5680c5d6673051b4935bd897fea824b77dc208a"],["c40747cc9d012cb1a13b8148309c6de7ec25d6945d657146b9d5994b8feb1111","5ca560753be2a12fc6de6caf2cb489565db936156b9514e1bb5e83037e0fa2d4"],["4e42c8ec82c99798ccf3a610be870e78338c7f713348bd34c8203ef4037f3502","7571d74ee5e0fb92a7a8b33a07783341a5492144cc54bcc40a94473693606437"],["3775ab7089bc6af823aba2e1af70b236d251cadb0c86743287522a1b3b0dedea","be52d107bcfa09d8bcb9736a828cfa7fac8db17bf7a76a2c42ad961409018cf7"],["cee31cbf7e34ec379d94fb814d3d775ad954595d1314ba8846959e3e82f74e26","8fd64a14c06b589c26b947ae2bcf6bfa0149ef0be14ed4d80f448a01c43b1c6d"],["b4f9eaea09b6917619f6ea6a4eb5464efddb58fd45b1ebefcdc1a01d08b47986","39e5c9925b5a54b07433a4f18c61726f8bb131c012ca542eb24a8ac07200682a"],["d4263dfc3d2df923a0179a48966d30ce84e2515afc3dccc1b77907792ebcc60e","62dfaf07a0f78feb30e30d6295853ce189e127760ad6cf7fae164e122a208d54"],["48457524820fa65a4f8d35eb6930857c0032acc0a4a2de422233eeda897612c4","25a748ab367979d98733c38a1fa1c2e7dc6cc07db2d60a9ae7a76aaa49bd0f77"],["dfeeef1881101f2cb11644f3a2afdfc2045e19919152923f367a1767c11cceda","ecfb7056cf1de042f9420bab396793c0c390bde74b4bbdff16a83ae09a9a7517"],["6d7ef6b17543f8373c573f44e1f389835d89bcbc6062ced36c82df83b8fae859","cd450ec335438986dfefa10c57fea9bcc521a0959b2d80bbf74b190dca712d10"],["e75605d59102a5a2684500d3b991f2e3f3c88b93225547035af25af66e04541f","f5c54754a8f71ee540b9b48728473e314f729ac5308b06938360990e2bfad125"],["eb98660f4c4dfaa06a2be453d5020bc99a0c2e60abe388457dd43fefb1ed620c","6cb9a8876d9cb8520609af3add26cd20a0a7cd8a9411131ce85f44100099223e"],["13e87b027d8514d35939f2e6892b19922154596941888336dc3563e3b8dba942","fef5a3c68059a6dec5d624114bf1e91aac2b9da568d6abeb2570d55646b8adf1"],["ee163026e9fd6fe017c38f06a5be6fc125424b371ce2708e7bf4491691e5764a","1acb250f255dd61c43d94ccc670d0f58f49ae3fa15b96623e5430da0ad6c62b2"],["b268f5ef9ad51e4d78de3a750c2dc89b1e626d43505867999932e5db33af3d80","5f310d4b3c99b9ebb19f77d41c1dee018cf0d34fd4191614003e945a1216e423"],["ff07f3118a9df035e9fad85eb6c7bfe42b02f01ca99ceea3bf7ffdba93c4750d","438136d603e858a3a5c440c38eccbaddc1d2942114e2eddd4740d098ced1f0d8"],["8d8b9855c7c052a34146fd20ffb658bea4b9f69e0d825ebec16e8c3ce2b526a1","cdb559eedc2d79f926baf44fb84ea4d44bcf50fee51d7ceb30e2e7f463036758"],["52db0b5384dfbf05bfa9d472d7ae26dfe4b851ceca91b1eba54263180da32b63","c3b997d050ee5d423ebaf66a6db9f57b3180c902875679de924b69d84a7b375"],["e62f9490d3d51da6395efd24e80919cc7d0f29c3f3fa48c6fff543becbd43352","6d89ad7ba4876b0b22c2ca280c682862f342c8591f1daf5170e07bfd9ccafa7d"],["7f30ea2476b399b4957509c88f77d0191afa2ff5cb7b14fd6d8e7d65aaab1193","ca5ef7d4b231c94c3b15389a5f6311e9daff7bb67b103e9880ef4bff637acaec"],["5098ff1e1d9f14fb46a210fada6c903fef0fb7b4a1dd1d9ac60a0361800b7a00","9731141d81fc8f8084d37c6e7542006b3ee1b40d60dfe5362a5b132fd17ddc0"],["32b78c7de9ee512a72895be6b9cbefa6e2f3c4ccce445c96b9f2c81e2778ad58","ee1849f513df71e32efc3896ee28260c73bb80547ae2275ba497237794c8753c"],["e2cb74fddc8e9fbcd076eef2a7c72b0ce37d50f08269dfc074b581550547a4f7","d3aa2ed71c9dd2247a62df062736eb0baddea9e36122d2be8641abcb005cc4a4"],["8438447566d4d7bedadc299496ab357426009a35f235cb141be0d99cd10ae3a8","c4e1020916980a4da5d01ac5e6ad330734ef0d7906631c4f2390426b2edd791f"],["4162d488b89402039b584c6fc6c308870587d9c46f660b878ab65c82c711d67e","67163e903236289f776f22c25fb8a3afc1732f2b84b4e95dbda47ae5a0852649"],["3fad3fa84caf0f34f0f89bfd2dcf54fc175d767aec3e50684f3ba4a4bf5f683d","cd1bc7cb6cc407bb2f0ca647c718a730cf71872e7d0d2a53fa20efcdfe61826"],["674f2600a3007a00568c1a7ce05d0816c1fb84bf1370798f1c69532faeb1a86b","299d21f9413f33b3edf43b257004580b70db57da0b182259e09eecc69e0d38a5"],["d32f4da54ade74abb81b815ad1fb3b263d82d6c692714bcff87d29bd5ee9f08f","f9429e738b8e53b968e99016c059707782e14f4535359d582fc416910b3eea87"],["30e4e670435385556e593657135845d36fbb6931f72b08cb1ed954f1e3ce3ff6","462f9bce619898638499350113bbc9b10a878d35da70740dc695a559eb88db7b"],["be2062003c51cc3004682904330e4dee7f3dcd10b01e580bf1971b04d4cad297","62188bc49d61e5428573d48a74e1c655b1c61090905682a0d5558ed72dccb9bc"],["93144423ace3451ed29e0fb9ac2af211cb6e84a601df5993c419859fff5df04a","7c10dfb164c3425f5c71a3f9d7992038f1065224f72bb9d1d902a6d13037b47c"],["b015f8044f5fcbdcf21ca26d6c34fb8197829205c7b7d2a7cb66418c157b112c","ab8c1e086d04e813744a655b2df8d5f83b3cdc6faa3088c1d3aea1454e3a1d5f"],["d5e9e1da649d97d89e4868117a465a3a4f8a18de57a140d36b3f2af341a21b52","4cb04437f391ed73111a13cc1d4dd0db1693465c2240480d8955e8592f27447a"],["d3ae41047dd7ca065dbf8ed77b992439983005cd72e16d6f996a5316d36966bb","bd1aeb21ad22ebb22a10f0303417c6d964f8cdd7df0aca614b10dc14d125ac46"],["463e2763d885f958fc66cdd22800f0a487197d0a82e377b49f80af87c897b065","bfefacdb0e5d0fd7df3a311a94de062b26b80c61fbc97508b79992671ef7ca7f"],["7985fdfd127c0567c6f53ec1bb63ec3158e597c40bfe747c83cddfc910641917","603c12daf3d9862ef2b25fe1de289aed24ed291e0ec6708703a5bd567f32ed03"],["74a1ad6b5f76e39db2dd249410eac7f99e74c59cb83d2d0ed5ff1543da7703e9","cc6157ef18c9c63cd6193d83631bbea0093e0968942e8c33d5737fd790e0db08"],["30682a50703375f602d416664ba19b7fc9bab42c72747463a71d0896b22f6da3","553e04f6b018b4fa6c8f39e7f311d3176290d0e0f19ca73f17714d9977a22ff8"],["9e2158f0d7c0d5f26c3791efefa79597654e7a2b2464f52b1ee6c1347769ef57","712fcdd1b9053f09003a3481fa7762e9ffd7c8ef35a38509e2fbf2629008373"],["176e26989a43c9cfeba4029c202538c28172e566e3c4fce7322857f3be327d66","ed8cc9d04b29eb877d270b4878dc43c19aefd31f4eee09ee7b47834c1fa4b1c3"],["75d46efea3771e6e68abb89a13ad747ecf1892393dfc4f1b7004788c50374da8","9852390a99507679fd0b86fd2b39a868d7efc22151346e1a3ca4726586a6bed8"],["809a20c67d64900ffb698c4c825f6d5f2310fb0451c869345b7319f645605721","9e994980d9917e22b76b061927fa04143d096ccc54963e6a5ebfa5f3f8e286c1"],["1b38903a43f7f114ed4500b4eac7083fdefece1cf29c63528d563446f972c180","4036edc931a60ae889353f77fd53de4a2708b26b6f5da72ad3394119daf408f9"]]}}},74224:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(81760),i=e=>e instanceof Uint8Array;if(t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength),t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4)),t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength),t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const o=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!i(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.bytesToHex=function(e){if(!i(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=o[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r},t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!i(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t},t.Hash=class{clone(){return this._cloneInto()}};const u={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==u.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},74385:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.range=void 0;var n=r(48051),i=r(44885);t.range=function(e,t,r){if(null==t&&(t=e,e=0),t<=0)return i.EMPTY;var o=t+e;return new n.Observable(r?function(t){var n=e;return r.schedule((function(){n<o?(t.next(n++),this.schedule()):t.complete()}))}:function(t){for(var r=e;r<o&&!t.closed;)t.next(r++);t.complete()})}},74478:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AnimationFrameScheduler=void 0;var o=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return i(t,e),t.prototype.flush=function(e){var t;this._active=!0,e?t=e.id:(t=this._scheduled,this._scheduled=void 0);var r,n=this.actions;e=e||n.shift();do{if(r=e.execute(e.state,e.delay))break}while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}},t}(r(19533).AsyncScheduler);t.AnimationFrameScheduler=o},74598:(e,t,r)=>{var n=r(22153);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},74610:(e,t,r)=>{"use strict";e.exports=l;var n=r(86048).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,s=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,a=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(25382);function c(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:c.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",f)}function f(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush((function(t,r){h(e,t,r)}))}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new a;if(e._transformState.transforming)throw new s;return e.push(null)}r(56698)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,(function(e){t(e)}))}},74613:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.flatMap=void 0;var n=r(67478);t.flatMap=n.mergeMap},74847:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=r(26162),o=r(86729).ec,s=r(78170),a=r(64589);function u(e,t){if(e.cmpn(0)<=0)throw new Error("invalid sig");if(e.cmp(t)>=0)throw new Error("invalid sig")}e.exports=function(e,t,r,c,l){var f=s(r);if("ec"===f.type){if("ecdsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=a[r.data.algorithm.curve.join(".")];if(!n)throw new Error("unknown curve "+r.data.algorithm.curve.join("."));var i=new o(n),s=r.data.subjectPrivateKey.data;return i.verify(t,e,s)}(e,t,f)}if("dsa"===f.type){if("dsa"!==c)throw new Error("wrong public key type");return function(e,t,r){var n=r.data.p,o=r.data.q,a=r.data.g,c=r.data.pub_key,l=s.signature.decode(e,"der"),f=l.s,h=l.r;u(f,o),u(h,o);var d=i.mont(n),p=f.invm(o);return 0===a.toRed(d).redPow(new i(t).mul(p).mod(o)).fromRed().mul(c.toRed(d).redPow(h.mul(p).mod(o)).fromRed()).mod(n).mod(o).cmp(h)}(e,t,f)}if("rsa"!==c&&"ecdsa/rsa"!==c)throw new Error("wrong public key type");t=n.concat([l,t]);for(var h=f.modulus.byteLength(),d=[1],p=0;t.length+d.length+2<h;)d.push(255),p+=1;d.push(0);for(var g=-1;++g<t.length;)d.push(t[g]);d=n.from(d);var b=i.mont(f.modulus);e=(e=new i(e).toRed(b)).redPow(new i(f.publicExponent)),e=n.from(e.fromRed().toArray());var y=p<8?1:0;for(h=Math.min(e.length,d.length),e.length!==d.length&&(y=1),g=-1;++g<h;)y|=e[g]^d[g];return 0===y}},74945:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SocketProvider=t.SocketEventSubscriber=t.SocketPendingSubscriber=t.SocketBlockSubscriber=t.SocketSubscriber=void 0;const n=r(38672),i=r(75347),o=r(42371);class s{#y;#p;get filter(){return JSON.parse(this.#p)}#at;#ut;#ct;constructor(e,t){this.#y=e,this.#p=JSON.stringify(t),this.#at=null,this.#ut=null,this.#ct=null}start(){this.#at=this.#y.send("eth_subscribe",this.filter).then((e=>(this.#y._register(e,this),e)))}stop(){this.#at.then((e=>{this.#y.destroyed||this.#y.send("eth_unsubscribe",[e])})),this.#at=null}pause(e){(0,i.assert)(e,"preserve logs while paused not supported by SocketSubscriber yet","UNSUPPORTED_OPERATION",{operation:"pause(false)"}),this.#ut=!!e}resume(){this.#ut=null}_handleMessage(e){if(null!=this.#at&&null===this.#ut){let t=this.#ct;t=null==t?this._emit(this.#y,e):t.then((async()=>{await this._emit(this.#y,e)})),this.#ct=t.then((()=>{this.#ct===t&&(this.#ct=null)}))}}async _emit(e,t){throw new Error("sub-classes must implemente this; _emit")}}t.SocketSubscriber=s;class a extends s{constructor(e){super(e,["newHeads"])}async _emit(e,t){e.emit("block",parseInt(t.number))}}t.SocketBlockSubscriber=a;class u extends s{constructor(e){super(e,["newPendingTransactions"])}async _emit(e,t){e.emit("pending",t)}}t.SocketPendingSubscriber=u;class c extends s{#lt;get logFilter(){return JSON.parse(this.#lt)}constructor(e,t){super(e,["logs",t]),this.#lt=JSON.stringify(t)}async _emit(e,t){e.emit(this.logFilter,e._wrapLog(t,e._network))}}t.SocketEventSubscriber=c;class l extends o.JsonRpcApiProvider{#ft;#C;#ht;constructor(e,t){const r=Object.assign({},null!=t?t:{});(0,i.assertArgument)(null==r.batchMaxCount||1===r.batchMaxCount,"sockets-based providers do not support batches","options.batchMaxCount",t),r.batchMaxCount=1,null==r.staticNetwork&&(r.staticNetwork=!0),super(e,r),this.#ft=new Map,this.#C=new Map,this.#ht=new Map}_getSubscriber(e){switch(e.type){case"close":return new n.UnmanagedSubscriber("close");case"block":return new a(this);case"pending":return new u(this);case"event":return new c(this,e.filter);case"orphan":if("drop-log"===e.filter.orphan)return new n.UnmanagedSubscriber("drop-log")}return super._getSubscriber(e)}_register(e,t){this.#C.set(e,t);const r=this.#ht.get(e);if(r){for(const e of r)t._handleMessage(e);this.#ht.delete(e)}}async _send(e){(0,i.assertArgument)(!Array.isArray(e),"WebSocket does not support batch send","payload",e);const t=new Promise(((t,r)=>{this.#ft.set(e.id,{payload:e,resolve:t,reject:r})}));return await this._waitUntilReady(),await this._write(JSON.stringify(e)),[await t]}async _processMessage(e){const t=JSON.parse(e);if(t&&"object"==typeof t&&"id"in t){const e=this.#ft.get(t.id);if(null==e)return void this.emit("error",(0,i.makeError)("received result for unknown id","UNKNOWN_ERROR",{reasonCode:"UNKNOWN_ID",result:t}));this.#ft.delete(t.id),e.resolve(t)}else{if(!t||"eth_subscription"!==t.method)return void this.emit("error",(0,i.makeError)("received unexpected message","UNKNOWN_ERROR",{reasonCode:"UNEXPECTED_MESSAGE",result:t}));{const e=t.params.subscription,r=this.#C.get(e);if(r)r._handleMessage(t.params.result);else{let r=this.#ht.get(e);null==r&&(r=[],this.#ht.set(e,r)),r.push(t.params.result)}}}}async _write(e){throw new Error("sub-classes must override this")}}t.SocketProvider=l},75019:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.materialize=void 0;var n=r(31245),i=r(65212),o=r(17214);t.materialize=function(){return i.operate((function(e,t){e.subscribe(o.createOperatorSubscriber(t,(function(e){t.next(n.Notification.createNext(e))}),(function(){t.next(n.Notification.createComplete()),t.complete()}),(function(e){t.next(n.Notification.createError(e)),t.complete()})))}))}},75059:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha512=t.sha256=void 0;const n=r(87155),i=r(75347),o=function(e){return(0,n.createHash)("sha256").update(e).digest()},s=function(e){return(0,n.createHash)("sha512").update(e).digest()};let a=o,u=s,c=!1,l=!1;function f(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(a(t))}function h(e){const t=(0,i.getBytes)(e,"data");return(0,i.hexlify)(u(t))}t.sha256=f,f._=o,f.lock=function(){c=!0},f.register=function(e){if(c)throw new Error("sha256 is locked");a=e},Object.freeze(f),t.sha512=h,h._=s,h.lock=function(){l=!0},h.register=function(e){if(l)throw new Error("sha512 is locked");u=e},Object.freeze(f)},75242:(e,t,r)=>{"use strict";e.exports=o;var n=r(81816),i=Object.create(r(15622));function o(e){if(!(this instanceof o))return new o(e);n.call(this,e)}i.inherits=r(56698),i.inherits(o,n),o.prototype._transform=function(e,t,r){r(null,e)}},75266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.forkJoin=void 0;var n=r(48051),i=r(50439),o=r(19724),s=r(26404),a=r(17214),u=r(13916),c=r(15810);t.forkJoin=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popResultSelector(e),l=i.argsArgArrayOrObject(e),f=l.args,h=l.keys,d=new n.Observable((function(e){var t=f.length;if(t)for(var r=new Array(t),n=t,i=t,s=function(t){var s=!1;o.innerFrom(f[t]).subscribe(a.createOperatorSubscriber(e,(function(e){s||(s=!0,i--),r[t]=e}),(function(){return n--}),void 0,(function(){n&&s||(i||e.next(h?c.createObject(h,r):r),e.complete())})))},u=0;u<t;u++)s(u);else e.complete()}));return r?d.pipe(u.mapOneOrManyArgs(r)):d}},75347:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.toUtf8String=t.toUtf8CodePoints=t.toUtf8Bytes=t.parseUnits=t.formatUnits=t.parseEther=t.formatEther=t.encodeRlp=t.decodeRlp=t.defineProperties=t.resolveProperties=t.toQuantity=t.toBeArray=t.toBeHex=t.toNumber=t.toBigInt=t.getUint=t.getNumber=t.getBigInt=t.mask=t.toTwos=t.fromTwos=t.FixedNumber=t.FetchCancelSignal=t.FetchResponse=t.FetchRequest=t.EventPayload=t.makeError=t.assertNormalize=t.assertPrivate=t.assertArgumentCount=t.assertArgument=t.assert=t.isError=t.isCallException=t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=t.encodeBase64=t.decodeBase64=t.encodeBase58=t.decodeBase58=void 0,t.uuidV4=t.Utf8ErrorFuncs=void 0;var n=r(8567);Object.defineProperty(t,"decodeBase58",{enumerable:!0,get:function(){return n.decodeBase58}}),Object.defineProperty(t,"encodeBase58",{enumerable:!0,get:function(){return n.encodeBase58}});var i=r(61949);Object.defineProperty(t,"decodeBase64",{enumerable:!0,get:function(){return i.decodeBase64}}),Object.defineProperty(t,"encodeBase64",{enumerable:!0,get:function(){return i.encodeBase64}});var o=r(87415);Object.defineProperty(t,"getBytes",{enumerable:!0,get:function(){return o.getBytes}}),Object.defineProperty(t,"getBytesCopy",{enumerable:!0,get:function(){return o.getBytesCopy}}),Object.defineProperty(t,"isHexString",{enumerable:!0,get:function(){return o.isHexString}}),Object.defineProperty(t,"isBytesLike",{enumerable:!0,get:function(){return o.isBytesLike}}),Object.defineProperty(t,"hexlify",{enumerable:!0,get:function(){return o.hexlify}}),Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return o.concat}}),Object.defineProperty(t,"dataLength",{enumerable:!0,get:function(){return o.dataLength}}),Object.defineProperty(t,"dataSlice",{enumerable:!0,get:function(){return o.dataSlice}}),Object.defineProperty(t,"stripZerosLeft",{enumerable:!0,get:function(){return o.stripZerosLeft}}),Object.defineProperty(t,"zeroPadValue",{enumerable:!0,get:function(){return o.zeroPadValue}}),Object.defineProperty(t,"zeroPadBytes",{enumerable:!0,get:function(){return o.zeroPadBytes}});var s=r(1500);Object.defineProperty(t,"isCallException",{enumerable:!0,get:function(){return s.isCallException}}),Object.defineProperty(t,"isError",{enumerable:!0,get:function(){return s.isError}}),Object.defineProperty(t,"assert",{enumerable:!0,get:function(){return s.assert}}),Object.defineProperty(t,"assertArgument",{enumerable:!0,get:function(){return s.assertArgument}}),Object.defineProperty(t,"assertArgumentCount",{enumerable:!0,get:function(){return s.assertArgumentCount}}),Object.defineProperty(t,"assertPrivate",{enumerable:!0,get:function(){return s.assertPrivate}}),Object.defineProperty(t,"assertNormalize",{enumerable:!0,get:function(){return s.assertNormalize}}),Object.defineProperty(t,"makeError",{enumerable:!0,get:function(){return s.makeError}});var a=r(27698);Object.defineProperty(t,"EventPayload",{enumerable:!0,get:function(){return a.EventPayload}});var u=r(85191);Object.defineProperty(t,"FetchRequest",{enumerable:!0,get:function(){return u.FetchRequest}}),Object.defineProperty(t,"FetchResponse",{enumerable:!0,get:function(){return u.FetchResponse}}),Object.defineProperty(t,"FetchCancelSignal",{enumerable:!0,get:function(){return u.FetchCancelSignal}});var c=r(99412);Object.defineProperty(t,"FixedNumber",{enumerable:!0,get:function(){return c.FixedNumber}});var l=r(66508);Object.defineProperty(t,"fromTwos",{enumerable:!0,get:function(){return l.fromTwos}}),Object.defineProperty(t,"toTwos",{enumerable:!0,get:function(){return l.toTwos}}),Object.defineProperty(t,"mask",{enumerable:!0,get:function(){return l.mask}}),Object.defineProperty(t,"getBigInt",{enumerable:!0,get:function(){return l.getBigInt}}),Object.defineProperty(t,"getNumber",{enumerable:!0,get:function(){return l.getNumber}}),Object.defineProperty(t,"getUint",{enumerable:!0,get:function(){return l.getUint}}),Object.defineProperty(t,"toBigInt",{enumerable:!0,get:function(){return l.toBigInt}}),Object.defineProperty(t,"toNumber",{enumerable:!0,get:function(){return l.toNumber}}),Object.defineProperty(t,"toBeHex",{enumerable:!0,get:function(){return l.toBeHex}}),Object.defineProperty(t,"toBeArray",{enumerable:!0,get:function(){return l.toBeArray}}),Object.defineProperty(t,"toQuantity",{enumerable:!0,get:function(){return l.toQuantity}});var f=r(8166);Object.defineProperty(t,"resolveProperties",{enumerable:!0,get:function(){return f.resolveProperties}}),Object.defineProperty(t,"defineProperties",{enumerable:!0,get:function(){return f.defineProperties}});var h=r(67780);Object.defineProperty(t,"decodeRlp",{enumerable:!0,get:function(){return h.decodeRlp}});var d=r(95212);Object.defineProperty(t,"encodeRlp",{enumerable:!0,get:function(){return d.encodeRlp}});var p=r(50436);Object.defineProperty(t,"formatEther",{enumerable:!0,get:function(){return p.formatEther}}),Object.defineProperty(t,"parseEther",{enumerable:!0,get:function(){return p.parseEther}}),Object.defineProperty(t,"formatUnits",{enumerable:!0,get:function(){return p.formatUnits}}),Object.defineProperty(t,"parseUnits",{enumerable:!0,get:function(){return p.parseUnits}});var g=r(43948);Object.defineProperty(t,"toUtf8Bytes",{enumerable:!0,get:function(){return g.toUtf8Bytes}}),Object.defineProperty(t,"toUtf8CodePoints",{enumerable:!0,get:function(){return g.toUtf8CodePoints}}),Object.defineProperty(t,"toUtf8String",{enumerable:!0,get:function(){return g.toUtf8String}}),Object.defineProperty(t,"Utf8ErrorFuncs",{enumerable:!0,get:function(){return g.Utf8ErrorFuncs}});var b=r(87744);Object.defineProperty(t,"uuidV4",{enumerable:!0,get:function(){return b.uuidV4}})},75544:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.expand=void 0;var n=r(65212),i=r(2574);t.expand=function(e,t,r){return void 0===t&&(t=1/0),t=(t||0)<1?1/0:t,n.operate((function(n,o){return i.mergeInternals(n,o,e,t,void 0,!0,r)}))}},75754:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousCoder=void 0;const n=r(38869);class i extends n.Coder{coder;constructor(e){super(e.name,e.type,"_",e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}t.AnonymousCoder=i},75896:(e,t,r)=>{"use strict";var n=r(65606);function i(e,t){s(e,t),o(e)}function o(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function s(e,t){e.emit("error",t)}e.exports={destroy:function(e,t){var r=this,a=this._readableState&&this._readableState.destroyed,u=this._writableState&&this._writableState.destroyed;return a||u?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,n.nextTick(s,this,e)):n.nextTick(s,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,(function(e){!t&&e?r._writableState?r._writableState.errorEmitted?n.nextTick(o,r):(r._writableState.errorEmitted=!0,n.nextTick(i,r,e)):n.nextTick(i,r,e):t?(n.nextTick(o,r),t(e)):n.nextTick(o,r)})),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},76035:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinctUntilKeyChanged=void 0;var n=r(22044);t.distinctUntilKeyChanged=function(e,t){return n.distinctUntilChanged((function(r,n){return t?t(r[e],n[e]):r[e]===n[e]}))}},76075:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeMapTo=void 0;var n=r(67478),i=r(10281);t.mergeMapTo=function(e,t,r){return void 0===r&&(r=1/0),i.isFunction(t)?n.mergeMap((function(){return e}),t,r):("number"==typeof t&&(r=t),n.mergeMap((function(){return e}),r))}},76140:(e,t,r)=>{!function(){var e="undefined"!=typeof window?window.Gun:r(54827);e.on("opt",(function(t){this.to.next(t);var n=t.opt;if(!t.once&&e.Mesh&&!1!==n.RTCPeerConnection){var i;"undefined"!=typeof window&&(i=window),void 0!==r.g&&(i=r.g),i=i||{};var o=n.RTCPeerConnection||i.RTCPeerConnection||i.webkitRTCPeerConnection||i.mozRTCPeerConnection,s=n.RTCSessionDescription||i.RTCSessionDescription||i.webkitRTCSessionDescription||i.mozRTCSessionDescription,a=n.RTCIceCandidate||i.RTCIceCandidate||i.webkitRTCIceCandidate||i.mozRTCIceCandidate;if(o&&s&&a){n.RTCPeerConnection=o,n.RTCSessionDescription=s,n.RTCIceCandidate=a,n.rtc=n.rtc||{iceServers:[{urls:"stun:stun.l.google.com:19302"},{urls:"stun:stun.sipgate.net:3478"}]},n.rtc.dataChannel=n.rtc.dataChannel||{ordered:!1,maxRetransmits:2},n.rtc.sdp=n.rtc.sdp||{mandatory:{OfferToReceiveAudio:!1,OfferToReceiveVideo:!1}},n.rtc.max=n.rtc.max||55,n.rtc.room=n.rtc.room||e.window&&(location.hash.slice(1)||location.pathname.slice(1)),n.announce=function(e){n.rtc.start=+new Date,t.$.get("/RTC/"+n.rtc.room+"<?99").get("+").put(n.pid,(function(e){e.ok&&e.ok.rtc&&c(e)}),{acks:n.rtc.max}).on((function(e,t,r){e===n.pid||n.rtc.start>r.put[">"]||c({"#":""+r["#"],ok:{rtc:{id:e}}})}))};var u=n.mesh=n.mesh||e.Mesh(t);t.on("create",(function(e){this.to.next(e),setTimeout(n.announce,1)}))}}function c(e){if(this&&this.off&&this.off(),e.ok){var r,i,o=e.ok.rtc;if(o&&o.id&&o.id!==n.pid){if(i=o.answer){if(!(r=n.peers[o.id]||c[o.id])||r.remoteSet)return;return i.sdp=i.sdp.replace(/\\r\\n/g,"\r\n"),r.setRemoteDescription(r.remoteSet=new n.RTCSessionDescription(i))}if(i=o.candidate)return(r=n.peers[o.id]||c[o.id]||c({ok:{rtc:{id:o.id}}})).addIceCandidate(new n.RTCIceCandidate(i));if(!c[o.id]){(r=new n.RTCPeerConnection(n.rtc)).id=o.id;var s=r.wire=r.createDataChannel("dc",n.rtc.dataChannel);return c[o.id]=r,s.to=setTimeout((function(){delete c[o.id]}),6e4),s.onclose=function(){u.bye(r)},s.onerror=function(e){},s.onopen=function(e){delete c[o.id],u.hi(r)},s.onmessage=function(e){e&&u.hear(e.data||e,r)},r.onicecandidate=function(r){r.candidate&&t.on("out",{"@":e["#"],ok:{rtc:{candidate:r.candidate,id:n.pid}}})},r.ondatachannel=function(e){var t=e.channel;t.onmessage=s.onmessage,t.onopen=s.onopen,t.onclose=s.onclose},(i=o.offer)?(o.offer.sdp=o.offer.sdp.replace(/\\r\\n/g,"\r\n"),r.setRemoteDescription(new n.RTCSessionDescription(i)),void r.createAnswer((function(i){r.setLocalDescription(i),t.on("out",{"@":e["#"],ok:{rtc:{answer:i,id:n.pid}}})}),(function(){}),n.rtc.sdp)):(r.createOffer((function(i){r.setLocalDescription(i),t.on("out",{"@":e["#"],"#":t.ask(c),ok:{rtc:{offer:i,id:n.pid}}})}),(function(){}),n.rtc.sdp),r)}}}}}))}()},76808:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}),o=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.AnonymousSubject=t.Subject=void 0;var s=r(48051),a=r(69879),u=r(50839),c=r(54830),l=r(12688),f=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return i(t,e),t.prototype.lift=function(e){var t=new h(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new u.ObjectUnsubscribedError},t.prototype.next=function(e){var t=this;l.errorContext((function(){var r,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var i=o(t.currentObservers),s=i.next();!s.done;s=i.next())s.value.next(e)}catch(e){r={error:e}}finally{try{s&&!s.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}}))},t.prototype.error=function(e){var t=this;l.errorContext((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var r=t.observers;r.length;)r.shift().error(e)}}))},t.prototype.complete=function(){var e=this;l.errorContext((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,r=this,n=r.hasError,i=r.isStopped,o=r.observers;return n||i?a.EMPTY_SUBSCRIPTION:(this.currentObservers=null,o.push(e),new a.Subscription((function(){t.currentObservers=null,c.arrRemove(o,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,r=t.hasError,n=t.thrownError,i=t.isStopped;r?e.error(n):i&&e.complete()},t.prototype.asObservable=function(){var e=new s.Observable;return e.source=this,e},t.create=function(e,t){return new h(e,t)},t}(s.Observable);t.Subject=f;var h=function(e){function t(t,r){var n=e.call(this)||this;return n.destination=t,n.source=r,n}return i(t,e),t.prototype.next=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===r||r.call(t,e)},t.prototype.error=function(e){var t,r;null===(r=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===r||r.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,r;return null!==(r=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==r?r:a.EMPTY_SUBSCRIPTION},t}(f);t.AnonymousSubject=h},76983:(e,t,r)=>{"use strict";var n=r(65606);function i(){throw new Error("secure random number generation not supported by this browser\nuse chrome, FireFox or Internet Explorer 11")}var o=r(92861),s=r(53209),a=o.Buffer,u=o.kMaxLength,c=r.g.crypto||r.g.msCrypto,l=Math.pow(2,32)-1;function f(e,t){if("number"!=typeof e||e!=e)throw new TypeError("offset must be a number");if(e>l||e<0)throw new TypeError("offset must be a uint32");if(e>u||e>t)throw new RangeError("offset out of range")}function h(e,t,r){if("number"!=typeof e||e!=e)throw new TypeError("size must be a number");if(e>l||e<0)throw new TypeError("size must be a uint32");if(e+t>r||e>u)throw new RangeError("buffer too small")}function d(e,t,r,i){if(n.browser){var o=e.buffer,a=new Uint8Array(o,t,r);return c.getRandomValues(a),i?void n.nextTick((function(){i(null,e)})):e}if(!i)return s(r).copy(e,t),e;s(r,(function(r,n){if(r)return i(r);n.copy(e,t),i(null,e)}))}c&&c.getRandomValues||!n.browser?(t.randomFill=function(e,t,n,i){if(!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');if("function"==typeof t)i=t,t=0,n=e.length;else if("function"==typeof n)i=n,n=e.length-t;else if("function"!=typeof i)throw new TypeError('"cb" argument must be a function');return f(t,e.length),h(n,t,e.length),d(e,t,n,i)},t.randomFillSync=function(e,t,n){if(void 0===t&&(t=0),!(a.isBuffer(e)||e instanceof r.g.Uint8Array))throw new TypeError('"buf" argument must be a Buffer or Uint8Array');return f(t,e.length),void 0===n&&(n=e.length-t),h(n,t,e.length),d(e,t,n)}):(t.randomFill=i,t.randomFillSync=i)},77005:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(1295),i=r(75347),o=BigInt(0),s=BigInt(1),a=BigInt(2),u=BigInt(27),c=BigInt(28),l=BigInt(35),f={};function h(e){return(0,i.zeroPadValue)((0,i.toBeArray)(e),32)}class d{#dt;#pt;#gt;#bt;get r(){return this.#dt}set r(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid r","value",e),this.#dt=(0,i.hexlify)(e)}get s(){return this.#pt}set s(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid s","value",e);const t=(0,i.hexlify)(e);(0,i.assertArgument)(parseInt(t.substring(0,3))<8,"non-canonical s","value",t),this.#pt=t}get v(){return this.#gt}set v(e){const t=(0,i.getNumber)(e,"value");(0,i.assertArgument)(27===t||28===t,"invalid v","v",e),this.#gt=t}get networkV(){return this.#bt}get legacyChainId(){const e=this.networkV;return null==e?null:d.getChainId(e)}get yParity(){return 27===this.v?0:1}get yParityAndS(){const e=(0,i.getBytes)(this.s);return this.yParity&&(e[0]|=128),(0,i.hexlify)(e)}get compactSerialized(){return(0,i.concat)([this.r,this.yParityAndS])}get serialized(){return(0,i.concat)([this.r,this.s,this.yParity?"0x1c":"0x1b"])}constructor(e,t,r,n){(0,i.assertPrivate)(e,f,"Signature"),this.#dt=t,this.#pt=r,this.#gt=n,this.#bt=null}[Symbol.for("nodejs.util.inspect.custom")](){return`Signature { r: "${this.r}", s: "${this.s}", yParity: ${this.yParity}, networkV: ${this.networkV} }`}clone(){const e=new d(f,this.r,this.s,this.v);return this.networkV&&(e.#bt=this.networkV),e}toJSON(){const e=this.networkV;return{_type:"signature",networkV:null!=e?e.toString():null,r:this.r,s:this.s,v:this.v}}static getChainId(e){const t=(0,i.getBigInt)(e,"v");return t==u||t==c?o:((0,i.assertArgument)(t>=l,"invalid EIP-155 v","v",e),(t-l)/a)}static getChainIdV(e,t){return(0,i.getBigInt)(e)*a+BigInt(35+t-27)}static getNormalizedV(e){const t=(0,i.getBigInt)(e);return t===o||t===u?27:t===s||t===c?28:((0,i.assertArgument)(t>=l,"invalid v","v",e),t&s?27:28)}static from(e){function t(t,r){(0,i.assertArgument)(t,r,"signature",e)}if(null==e)return new d(f,n.ZeroHash,n.ZeroHash,27);if("string"==typeof e){const r=(0,i.getBytes)(e,"signature");if(64===r.length){const e=(0,i.hexlify)(r.slice(0,32)),t=r.slice(32,64),n=128&t[0]?28:27;return t[0]&=127,new d(f,e,(0,i.hexlify)(t),n)}if(65===r.length){const e=(0,i.hexlify)(r.slice(0,32)),n=r.slice(32,64);t(!(128&n[0]),"non-canonical s");const o=d.getNormalizedV(r[64]);return new d(f,e,(0,i.hexlify)(n),o)}t(!1,"invalid raw signature length")}if(e instanceof d)return e.clone();const r=e.r;t(null!=r,"missing r");const o=h(r),s=function(e,r){if(null!=e)return h(e);if(null!=r){t((0,i.isHexString)(r,32),"invalid yParityAndS");const e=(0,i.getBytes)(r);return e[0]&=127,(0,i.hexlify)(e)}t(!1,"missing s")}(e.s,e.yParityAndS);t(!(128&(0,i.getBytes)(s)[0]),"non-canonical s");const{networkV:a,v:u}=function(e,r,n){if(null!=e){const t=(0,i.getBigInt)(e);return{networkV:t>=l?t:void 0,v:d.getNormalizedV(t)}}if(null!=r)return t((0,i.isHexString)(r,32),"invalid yParityAndS"),{v:128&(0,i.getBytes)(r)[0]?28:27};if(null!=n){switch((0,i.getNumber)(n,"sig.yParity")){case 0:return{v:27};case 1:return{v:28}}t(!1,"invalid yParity")}t(!1,"missing v")}(e.v,e.yParityAndS,e.yParity),c=new d(f,o,s,u);return a&&(c.#bt=a),t(null==e.yParity||(0,i.getNumber)(e.yParity,"sig.yParity")===c.yParity,"yParity mismatch"),t(null==e.yParityAndS||e.yParityAndS===c.yParityAndS,"yParityAndS mismatch"),c}}t.Signature=d},77362:(e,t,r)=>{var n=r(78170),i=r(48206),o=r(52061),s=r(39404),a=r(67332),u=r(47108),c=r(99247),l=r(92861).Buffer;e.exports=function(e,t,r){var f;f=e.padding?e.padding:r?1:4;var h,d=n(e),p=d.modulus.byteLength();if(t.length>p||new s(t).cmp(d.modulus)>=0)throw new Error("decryption error");h=r?c(new s(t),d):a(t,d);var g=l.alloc(p-h.length);if(h=l.concat([g,h],p),4===f)return function(e,t){var r=e.modulus.byteLength(),n=u("sha1").update(l.alloc(0)).digest(),s=n.length;if(0!==t[0])throw new Error("decryption error");var a=t.slice(1,s+1),c=t.slice(s+1),f=o(a,i(c,s)),h=o(c,i(f,r-s-1));if(function(e,t){e=l.from(e),t=l.from(t);var r=0,n=e.length;e.length!==t.length&&(r++,n=Math.min(e.length,t.length));for(var i=-1;++i<n;)r+=e[i]^t[i];return r}(n,h.slice(0,s)))throw new Error("decryption error");for(var d=s;0===h[d];)d++;if(1!==h[d++])throw new Error("decryption error");return h.slice(d)}(d,h);if(1===f)return function(e,t,r){for(var n=t.slice(0,2),i=2,o=0;0!==t[i++];)if(i>=t.length){o++;break}var s=t.slice(2,i-1);if(("0002"!==n.toString("hex")&&!r||"0001"!==n.toString("hex")&&r)&&o++,s.length<8&&o++,o)throw new Error("decryption error");return t.slice(i)}(0,h,r);if(3===f)return h;throw new Error("unknown padding")}},77778:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Transaction=t.recoverAddress=t.computeAddress=t.authorizationify=t.accessListify=void 0;var n=r(87918);Object.defineProperty(t,"accessListify",{enumerable:!0,get:function(){return n.accessListify}});var i=r(72963);Object.defineProperty(t,"authorizationify",{enumerable:!0,get:function(){return i.authorizationify}});var o=r(20778);Object.defineProperty(t,"computeAddress",{enumerable:!0,get:function(){return o.computeAddress}}),Object.defineProperty(t,"recoverAddress",{enumerable:!0,get:function(){return o.recoverAddress}});var s=r(71398);Object.defineProperty(t,"Transaction",{enumerable:!0,get:function(){return s.Transaction}})},77876:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.distinct=void 0;var n=r(65212),i=r(17214),o=r(5717),s=r(19724);t.distinct=function(e,t){return n.operate((function(r,n){var a=new Set;r.subscribe(i.createOperatorSubscriber(n,(function(t){var r=e?e(t):t;a.has(r)||(a.add(r),n.next(t))}))),t&&s.innerFrom(t).subscribe(i.createOperatorSubscriber(n,(function(){return a.clear()}),o.noop))}))}},77952:(e,t,r)=>{var n=t;n.utils=r(67426),n.common=r(66166),n.sha=r(46229),n.ripemd=r(46784),n.hmac=r(28948),n.sha1=n.sha.sha1,n.sha256=n.sha.sha256,n.sha224=n.sha.sha224,n.sha384=n.sha.sha384,n.sha512=n.sha.sha512,n.ripemd160=n.ripemd.ripemd160},78051:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.AsapAction=void 0;var o=r(64772),s=r(16002),a=function(e){function t(t,r){var n=e.call(this,t,r)||this;return n.scheduler=t,n.work=r,n}return i(t,e),t.prototype.requestAsyncId=function(t,r,n){return void 0===n&&(n=0),null!==n&&n>0?e.prototype.requestAsyncId.call(this,t,r,n):(t.actions.push(this),t._scheduled||(t._scheduled=s.immediateProvider.setImmediate(t.flush.bind(t,void 0))))},t.prototype.recycleAsyncId=function(t,r,n){var i;if(void 0===n&&(n=0),null!=n?n>0:this.delay>0)return e.prototype.recycleAsyncId.call(this,t,r,n);var o=t.actions;null!=r&&(null===(i=o[o.length-1])||void 0===i?void 0:i.id)!==r&&(s.immediateProvider.clearImmediate(r),t._scheduled===r&&(t._scheduled=void 0))},t}(o.AsyncAction);t.AsapAction=a},78072:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.window=void 0;var n=r(76808),i=r(65212),o=r(17214),s=r(5717),a=r(19724);t.window=function(e){return i.operate((function(t,r){var i=new n.Subject;r.next(i.asObservable());var u=function(e){i.error(e),r.error(e)};return t.subscribe(o.createOperatorSubscriber(r,(function(e){return null==i?void 0:i.next(e)}),(function(){i.complete(),r.complete()}),u)),a.innerFrom(e).subscribe(o.createOperatorSubscriber(r,(function(){i.complete(),r.next(i=new n.Subject)}),s.noop,u)),function(){null==i||i.unsubscribe(),i=null}}))}},78170:(e,t,r)=>{"use strict";var n=r(21137),i=r(15579),o=r(24101),s=r(1241),a=r(78396),u=r(92861).Buffer;function c(e){var t;"object"!=typeof e||u.isBuffer(e)||(t=e.passphrase,e=e.key),"string"==typeof e&&(e=u.from(e));var r,c,l=o(e,t),f=l.tag,h=l.data;switch(f){case"CERTIFICATE":c=n.certificate.decode(h,"der").tbsCertificate.subjectPublicKeyInfo;case"PUBLIC KEY":switch(c||(c=n.PublicKey.decode(h,"der")),r=c.algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPublicKey.decode(c.subjectPublicKey.data,"der");case"1.2.840.10045.2.1":return c.subjectPrivateKey=c.subjectPublicKey,{type:"ec",data:c};case"1.2.840.10040.4.1":return c.algorithm.params.pub_key=n.DSAparam.decode(c.subjectPublicKey.data,"der"),{type:"dsa",data:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"ENCRYPTED PRIVATE KEY":h=function(e,t){var r=e.algorithm.decrypt.kde.kdeparams.salt,n=parseInt(e.algorithm.decrypt.kde.kdeparams.iters.toString(),10),o=i[e.algorithm.decrypt.cipher.algo.join(".")],c=e.algorithm.decrypt.cipher.iv,l=e.subjectPrivateKey,f=parseInt(o.split("-")[1],10)/8,h=a.pbkdf2Sync(t,r,n,f,"sha1"),d=s.createDecipheriv(o,h,c),p=[];return p.push(d.update(l)),p.push(d.final()),u.concat(p)}(h=n.EncryptedPrivateKey.decode(h,"der"),t);case"PRIVATE KEY":switch(r=(c=n.PrivateKey.decode(h,"der")).algorithm.algorithm.join(".")){case"1.2.840.113549.1.1.1":return n.RSAPrivateKey.decode(c.subjectPrivateKey,"der");case"1.2.840.10045.2.1":return{curve:c.algorithm.curve,privateKey:n.ECPrivateKey.decode(c.subjectPrivateKey,"der").privateKey};case"1.2.840.10040.4.1":return c.algorithm.params.priv_key=n.DSAparam.decode(c.subjectPrivateKey,"der"),{type:"dsa",params:c.algorithm.params};default:throw new Error("unknown key id "+r)}case"RSA PUBLIC KEY":return n.RSAPublicKey.decode(h,"der");case"RSA PRIVATE KEY":return n.RSAPrivateKey.decode(h,"der");case"DSA PRIVATE KEY":return{type:"dsa",params:n.DSAPrivateKey.decode(h,"der")};case"EC PRIVATE KEY":return{curve:(h=n.ECPrivateKey.decode(h,"der")).parameters.value,privateKey:h.privateKey};default:throw new Error("unknown key type "+f)}}c.signature=n.signature,e.exports=c},78263:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isAsyncIterable=void 0;var n=r(10281);t.isAsyncIterable=function(e){return Symbol.asyncIterator&&n.isFunction(null==e?void 0:e[Symbol.asyncIterator])}},78371:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.OAuthPlugin=void 0;const n=r(34586),i=r(17665),o=r(45628),s=r(23358),a=r(4643);class u extends n.BasePlugin{name="oauth";version="1.0.0";description="Provides OAuth authentication with external providers for ShogunCore";oauthConnector=null;config={};storage=null;initialize(e,t){if(super.initialize(e),this.oauthConnector=new i.OAuthConnector(this.config),this.storage=new a.ShogunStorage,!t)throw new Error("App token is required for OAuth plugin");this.appToken=t,(0,o.log)("[oauthPlugin] OAuth plugin initialized successfully")}configure(e){this.config={...this.config,...e},this.oauthConnector&&(this.oauthConnector.updateConfig(this.config),(0,o.log)("[oauthPlugin] OAuth connector configuration updated",this.config.providers))}destroy(){this.oauthConnector&&this.oauthConnector.cleanup(),this.oauthConnector=null,super.destroy(),(0,o.log)("[oauthPlugin] OAuth plugin destroyed")}assertOAuthConnector(){if(this.assertInitialized(),!this.oauthConnector)throw new Error("OAuth connector not initialized");return this.oauthConnector}isSupported(){return this.assertOAuthConnector().isSupported()}getAvailableProviders(){return this.assertOAuthConnector().getAvailableProviders()}async initiateOAuth(e){return(0,o.log)(`Initiating OAuth flow with ${e}`),this.assertOAuthConnector().initiateOAuth(e)}async completeOAuth(e,t,r){return(0,o.log)(`Completing OAuth flow with ${e}`),this.assertOAuthConnector().completeOAuth(e,t,r,this.appToken)}async generateCredentials(e,t){if((0,o.log)(`Generating credentials for ${t} user`),!this.appToken)throw new Error("App token is required for OAuth generation");return this.assertOAuthConnector().generateCredentials(e,t,this.appToken)}async login(e){(0,o.log)(`OAuth login with ${e}`);try{if(this.assertInitialized(),(0,o.log)(`OAuth login attempt with provider: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"PROVIDER_REQUIRED","OAuth provider required for OAuth login");if(!this.isSupported())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"OAUTH_UNAVAILABLE","OAuth is not supported in this environment");if(!this.getAvailableProviders().includes(e))throw(0,s.createError)(s.ErrorType.VALIDATION,"PROVIDER_NOT_CONFIGURED",`Provider ${e} is not configured or available`);const t=await this.initiateOAuth(e);if(!t.success)throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"OAUTH_INITIATION_FAILED",t.error||"Failed to initiate OAuth flow");return{success:!0,redirectUrl:t.authUrl,pendingAuth:!0,message:"Redirect to OAuth provider required to complete authentication",provider:e,authMethod:"oauth"}}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"OAUTH_LOGIN_ERROR",n=e?.message||"Unknown error during OAuth login";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async signUp(e){(0,o.log)(`OAuth signup with ${e}`);try{if(this.assertInitialized(),(0,o.log)(`OAuth signup attempt with provider: ${e}`),!e)throw(0,s.createError)(s.ErrorType.VALIDATION,"PROVIDER_REQUIRED","OAuth provider required for OAuth signup");if(!this.isSupported())throw(0,s.createError)(s.ErrorType.ENVIRONMENT,"OAUTH_UNAVAILABLE","OAuth is not supported in this environment");if(!this.getAvailableProviders().includes(e))throw(0,s.createError)(s.ErrorType.VALIDATION,"PROVIDER_NOT_CONFIGURED",`Provider ${e} is not configured or available`);const t=await this.initiateOAuth(e);if(!t.success)throw(0,s.createError)(s.ErrorType.AUTHENTICATION,"OAUTH_INITIATION_FAILED",t.error||"Failed to initiate OAuth flow");return{success:!0,redirectUrl:t.authUrl,pendingAuth:!0,message:"Redirect to OAuth provider required to complete registration",provider:e,authMethod:"oauth"}}catch(e){const t=e?.type||s.ErrorType.AUTHENTICATION,r=e?.code||"OAUTH_SIGNUP_ERROR",n=e?.message||"Unknown error during OAuth signup";return{success:!1,error:s.ErrorHandler.handle(t,r,n,e).message}}}async handleOAuthCallback(e,t,r){try{(0,o.log)(`Handling OAuth callback for ${e}`);const n=this.assertInitialized(),i=await this.completeOAuth(e,t,r);if(!i.success||!i.userInfo)throw new Error(i.error||"Failed to complete OAuth flow");const s=await this.generateCredentials(i.userInfo,e);n.setAuthMethod("oauth");const a=await this._loginOrSignUp(s.username,s.key);if(a.success){n.user&&await n.user.put({oauth:{provider:e,id:i.userInfo.id,email:i.userInfo.email,name:i.userInfo.name,picture:i.userInfo.picture,lastLogin:Date.now()}});const t=a.isNewUser?"auth:signup":"auth:login";n.emit(t,{userPub:a.userPub,username:s.username,method:"oauth",provider:e})}return a}catch(t){return(0,o.logError)(`Error handling OAuth callback for ${e}:`,t),{success:!1,error:t.message||"Failed to handle OAuth callback"}}}async _loginOrSignUp(e,t){if(!this.core)return{success:!1,error:"Shogun core not available"};const r=await this.core.login(e,"",t);if(r.success)return this.core.gundb.savePair?.(),r.isNewUser=!1,r;const n=await this.core.signUp(e,"","",t);if(n.success){const r=await this.core.login(e,"",t);return r.success?(this.core.gundb.savePair?.(),r.isNewUser=!0,r):{success:!1,error:r.error||"Login failed after successful signup."}}return n}async handleSimpleOAuth(e,t,r){return(0,o.log)(`handleSimpleOAuth called (alias for handleOAuthCallback) for ${e}`),this.handleOAuthCallback(e,t,r)}getCachedUserInfo(e,t){return this.assertOAuthConnector().getCachedUserInfo(e,t)}clearUserCache(e,t){this.assertOAuthConnector().clearUserCache(e,t)}}t.OAuthPlugin=u},78396:(e,t,r)=>{t.pbkdf2=r(43832),t.pbkdf2Sync=r(21352)},78531:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.scanInternals=void 0;var n=r(17214);t.scanInternals=function(e,t,r,i,o){return function(s,a){var u=r,c=t,l=0;s.subscribe(n.createOperatorSubscriber(a,(function(t){var r=l++;c=u?e(c,t,r):(u=!0,t),i&&a.next(c)}),o&&function(){u&&a.next(c),a.complete()}))}}},78719:e=>{!function(){function t(){var e=function(i,s,a){if(e.unit=0,a||r===s||(e.last=""+i<e.last?e.last:""+i,delete(e.$||{})[o]),a=a||e.$||(e.$={}),!i&&Object.keys(a).length)return a;for(var u,c,l=0,f=(i=""+i).length-1,h=i[l];!(u=a[h])&&l<f;)h+=i[++l];if(u){if(l!=f)return r!==s&&delete u[o],e(i.slice(++l),s,u||(u={}));if(r===s)return r===(c=u[""])?u:(e.unit=1)&&c;u[""]=s}else{if(!n(a,(function(e,n){var o=0,u="";if((n||"").length)for(;n[o]==i[o];)u+=n[o++];if(u){if(r===s){if(o<=f)return;return(c||(c={}))[n.slice(o)]=e,e}var l={};return l[n.slice(o)]=e,""===(o=i.slice(o))?l[""]=s:(l[o]={})[""]=s,a[u]=l,t.debug&&"undefined"==""+u&&console.log(0,u),delete a[n],!0}}))){if(r===s)return;(a[h]||(a[h]={}))[""]=s,t.debug&&"undefined"==""+h&&console.log(1,h)}if(r===s)return c}};return e}if(t.map=function e(n,s,a,u){try{u=u||[];var c="function"==typeof n?n.$||{}:n;if(!c)return;if("string"==typeof c){if(t.debug)throw["BUG:",n,s,a,u];return}var l,f=(c[o]||i).sort||(c[o]=function e(){return e.sort=Object.keys(c).sort(),e}()).sort;(l=(a=!0===a?{branch:!0}:a||{}).reverse)&&(f=f.slice(0).reverse());for(var h=a.start,d=a.end,p=0,g=f.length;p<g;p++){var b,y,m,v=f[p],w=c[v];if(w&&""!==v&&o!==v&&"undefined"!==v&&((y=u.slice(0)).push(v),m=y.join(""),!(r!==h&&m<(h||"").slice(0,m.length)||r!==d&&(d||"￿")<m))){if(l&&(b=e(w,s,a,y),r!==b))return b;if(r!==(b=w[""])){var E=1;if(r!==h&&m<(h||"")&&(E=0),r!==d&&m>(d||"￿")&&(E=0),E&&(b=s(b,m,v,u),r!==b))return b}else if(a.branch&&(b=s(r,m,v,u),r!==b))return b;if(u=y,!l&&(b=e(w,s,a,u),r!==b))return b;u.pop()}}}catch(e){console.error(e)}},"undefined"!=typeof window)window.Radix=t;else try{e.exports=t}catch(e){}var r,n=t.object=function(e,t,n){for(var i in e)if(e.hasOwnProperty(i)&&(n=t(e[i],i))!==r)return n},i={},o=String.fromCharCode(24)}()},78893:function(e,t,r){!function(e,t){"use strict";function n(e,t){if(!e)throw new Error(t||"Assertion failed")}function i(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}function o(e,t,r){if(o.isBN(e))return e;this.negative=0,this.words=null,this.length=0,this.red=null,null!==e&&("le"!==t&&"be"!==t||(r=t,t=10),this._init(e||0,t||10,r||"be"))}var s;"object"==typeof e?e.exports=o:t.BN=o,o.BN=o,o.wordSize=26;try{s="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:r(98285).Buffer}catch(e){}function a(e,t){var r=e.charCodeAt(t);return r>=48&&r<=57?r-48:r>=65&&r<=70?r-55:r>=97&&r<=102?r-87:void n(!1,"Invalid character in "+e)}function u(e,t,r){var n=a(e,r);return r-1>=t&&(n|=a(e,r-1)<<4),n}function c(e,t,r,i){for(var o=0,s=0,a=Math.min(e.length,r),u=t;u<a;u++){var c=e.charCodeAt(u)-48;o*=i,s=c>=49?c-49+10:c>=17?c-17+10:c,n(c>=0&&s<i,"Invalid character"),o+=s}return o}function l(e,t){e.words=t.words,e.length=t.length,e.negative=t.negative,e.red=t.red}if(o.isBN=function(e){return e instanceof o||null!==e&&"object"==typeof e&&e.constructor.wordSize===o.wordSize&&Array.isArray(e.words)},o.max=function(e,t){return e.cmp(t)>0?e:t},o.min=function(e,t){return e.cmp(t)<0?e:t},o.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var i=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(i++,this.negative=1),i<e.length&&(16===t?this._parseHex(e,i,r):(this._parseBase(e,t,i),"le"===r&&this._initArray(this.toArray(),t,r)))},o.prototype._initNumber=function(e,t,r){e<0&&(this.negative=1,e=-e),e<67108864?(this.words=[67108863&e],this.length=1):e<4503599627370496?(this.words=[67108863&e,e/67108864&67108863],this.length=2):(n(e<9007199254740992),this.words=[67108863&e,e/67108864&67108863,1],this.length=3),"le"===r&&this._initArray(this.toArray(),t,r)},o.prototype._initArray=function(e,t,r){if(n("number"==typeof e.length),e.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(e.length/3),this.words=new Array(this.length);for(var i=0;i<this.length;i++)this.words[i]=0;var o,s,a=0;if("be"===r)for(i=e.length-1,o=0;i>=0;i-=3)s=e[i]|e[i-1]<<8|e[i-2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);else if("le"===r)for(i=0,o=0;i<e.length;i+=3)s=e[i]|e[i+1]<<8|e[i+2]<<16,this.words[o]|=s<<a&67108863,this.words[o+1]=s>>>26-a&67108863,(a+=24)>=26&&(a-=26,o++);return this._strip()},o.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n<this.length;n++)this.words[n]=0;var i,o=0,s=0;if("be"===r)for(n=e.length-1;n>=t;n-=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;else for(n=(e.length-t)%2==0?t+1:t;n<e.length;n+=2)i=u(e,t,n)<<o,this.words[s]|=67108863&i,o>=18?(o-=18,s+=1,this.words[s]|=i>>>26):o+=8;this._strip()},o.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,i=1;i<=67108863;i*=t)n++;n--,i=i/t|0;for(var o=e.length-r,s=o%n,a=Math.min(o,o-s)+r,u=0,l=r;l<a;l+=n)u=c(e,l,l+n,t),this.imuln(i),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u);if(0!==s){var f=1;for(u=c(e,l,e.length,t),l=0;l<s;l++)f*=t;this.imuln(f),this.words[0]+u<67108864?this.words[0]+=u:this._iaddn(u)}this._strip()},o.prototype.copy=function(e){e.words=new Array(this.length);for(var t=0;t<this.length;t++)e.words[t]=this.words[t];e.length=this.length,e.negative=this.negative,e.red=this.red},o.prototype._move=function(e){l(e,this)},o.prototype.clone=function(){var e=new o(null);return this.copy(e),e},o.prototype._expand=function(e){for(;this.length<e;)this.words[this.length++]=0;return this},o.prototype._strip=function(){for(;this.length>1&&0===this.words[this.length-1];)this.length--;return this._normSign()},o.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{o.prototype[Symbol.for("nodejs.util.inspect.custom")]=f}catch(e){o.prototype.inspect=f}else o.prototype.inspect=f;function f(){return(this.red?"<BN-R: ":"<BN: ")+this.toString(16)+">"}var h=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],p=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function g(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var i=0|e.words[0],o=0|t.words[0],s=i*o,a=67108863&s,u=s/67108864|0;r.words[0]=a;for(var c=1;c<n;c++){for(var l=u>>>26,f=67108863&u,h=Math.min(c,t.length-1),d=Math.max(0,c-e.length+1);d<=h;d++){var p=c-d|0;l+=(s=(i=0|e.words[p])*(o=0|t.words[d])+f)/67108864|0,f=67108863&s}r.words[c]=0|f,u=0|l}return 0!==u?r.words[c]=0|u:r.length--,r._strip()}o.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var i=0,o=0,s=0;s<this.length;s++){var a=this.words[s],u=(16777215&(a<<i|o)).toString(16);o=a>>>24-i&16777215,(i+=2)>=26&&(i-=26,s--),r=0!==o||s!==this.length-1?h[6-u.length]+u+r:u+r}for(0!==o&&(r=o.toString(16)+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],l=p[e];r="";var f=this.clone();for(f.negative=0;!f.isZero();){var g=f.modrn(l).toString(e);r=(f=f.idivn(l)).isZero()?g+r:h[c-g.length]+g+r}for(this.isZero()&&(r="0"+r);r.length%t!==0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},o.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},o.prototype.toJSON=function(){return this.toString(16,2)},s&&(o.prototype.toBuffer=function(e,t){return this.toArrayLike(s,e,t)}),o.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},o.prototype.toArrayLike=function(e,t,r){this._strip();var i=this.byteLength(),o=r||Math.max(1,i);n(i<=o,"byte array longer than desired length"),n(o>0,"Requested array length <= 0");var s=function(e,t){return e.allocUnsafe?e.allocUnsafe(t):new e(t)}(e,o);return this["_toArrayLike"+("le"===t?"LE":"BE")](s,i),s},o.prototype._toArrayLikeLE=function(e,t){for(var r=0,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r++]=255&s,r<e.length&&(e[r++]=s>>8&255),r<e.length&&(e[r++]=s>>16&255),6===o?(r<e.length&&(e[r++]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r<e.length)for(e[r++]=n;r<e.length;)e[r++]=0},o.prototype._toArrayLikeBE=function(e,t){for(var r=e.length-1,n=0,i=0,o=0;i<this.length;i++){var s=this.words[i]<<o|n;e[r--]=255&s,r>=0&&(e[r--]=s>>8&255),r>=0&&(e[r--]=s>>16&255),6===o?(r>=0&&(e[r--]=s>>24&255),n=0,o=0):(n=s>>>24,o+=2)}if(r>=0)for(e[r--]=n;r>=0;)e[r--]=0},Math.clz32?o.prototype._countBits=function(e){return 32-Math.clz32(e)}:o.prototype._countBits=function(e){var t=e,r=0;return t>=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},o.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},o.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},o.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;t<this.length;t++){var r=this._zeroBits(this.words[t]);if(e+=r,26!==r)break}return e},o.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},o.prototype.toTwos=function(e){return 0!==this.negative?this.abs().inotn(e).iaddn(1):this.clone()},o.prototype.fromTwos=function(e){return this.testn(e-1)?this.notn(e).iaddn(1).ineg():this.clone()},o.prototype.isNeg=function(){return 0!==this.negative},o.prototype.neg=function(){return this.clone().ineg()},o.prototype.ineg=function(){return this.isZero()||(this.negative^=1),this},o.prototype.iuor=function(e){for(;this.length<e.length;)this.words[this.length++]=0;for(var t=0;t<e.length;t++)this.words[t]=this.words[t]|e.words[t];return this._strip()},o.prototype.ior=function(e){return n(0===(this.negative|e.negative)),this.iuor(e)},o.prototype.or=function(e){return this.length>e.length?this.clone().ior(e):e.clone().ior(this)},o.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},o.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;r<t.length;r++)this.words[r]=this.words[r]&e.words[r];return this.length=t.length,this._strip()},o.prototype.iand=function(e){return n(0===(this.negative|e.negative)),this.iuand(e)},o.prototype.and=function(e){return this.length>e.length?this.clone().iand(e):e.clone().iand(this)},o.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},o.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;n<r.length;n++)this.words[n]=t.words[n]^r.words[n];if(this!==t)for(;n<t.length;n++)this.words[n]=t.words[n];return this.length=t.length,this._strip()},o.prototype.ixor=function(e){return n(0===(this.negative|e.negative)),this.iuxor(e)},o.prototype.xor=function(e){return this.length>e.length?this.clone().ixor(e):e.clone().ixor(this)},o.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},o.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var i=0;i<t;i++)this.words[i]=67108863&~this.words[i];return r>0&&(this.words[i]=~this.words[i]&67108863>>26-r),this._strip()},o.prototype.notn=function(e){return this.clone().inotn(e)},o.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,i=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<<i:this.words[r]&~(1<<i),this._strip()},o.prototype.iadd=function(e){var t,r,n;if(0!==this.negative&&0===e.negative)return this.negative=0,t=this.isub(e),this.negative^=1,this._normSign();if(0===this.negative&&0!==e.negative)return e.negative=0,t=this.isub(e),e.negative=1,t._normSign();this.length>e.length?(r=this,n=e):(r=e,n=this);for(var i=0,o=0;o<n.length;o++)t=(0|r.words[o])+(0|n.words[o])+i,this.words[o]=67108863&t,i=t>>>26;for(;0!==i&&o<r.length;o++)t=(0|r.words[o])+i,this.words[o]=67108863&t,i=t>>>26;if(this.length=r.length,0!==i)this.words[this.length]=i,this.length++;else if(r!==this)for(;o<r.length;o++)this.words[o]=r.words[o];return this},o.prototype.add=function(e){var t;return 0!==e.negative&&0===this.negative?(e.negative=0,t=this.sub(e),e.negative^=1,t):0===e.negative&&0!==this.negative?(this.negative=0,t=e.sub(this),this.negative=1,t):this.length>e.length?this.clone().iadd(e):e.clone().iadd(this)},o.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,i=this.cmp(e);if(0===i)return this.negative=0,this.length=1,this.words[0]=0,this;i>0?(r=this,n=e):(r=e,n=this);for(var o=0,s=0;s<n.length;s++)o=(t=(0|r.words[s])-(0|n.words[s])+o)>>26,this.words[s]=67108863&t;for(;0!==o&&s<r.length;s++)o=(t=(0|r.words[s])+o)>>26,this.words[s]=67108863&t;if(0===o&&s<r.length&&r!==this)for(;s<r.length;s++)this.words[s]=r.words[s];return this.length=Math.max(this.length,s),r!==this&&(this.negative=1),this._strip()},o.prototype.sub=function(e){return this.clone().isub(e)};var b=function(e,t,r){var n,i,o,s=e.words,a=t.words,u=r.words,c=0,l=0|s[0],f=8191&l,h=l>>>13,d=0|s[1],p=8191&d,g=d>>>13,b=0|s[2],y=8191&b,m=b>>>13,v=0|s[3],w=8191&v,E=v>>>13,A=0|s[4],_=8191&A,S=A>>>13,P=0|s[5],k=8191&P,O=P>>>13,x=0|s[6],M=8191&x,B=x>>>13,T=0|s[7],I=8191&T,C=T>>>13,R=0|s[8],N=8191&R,j=R>>>13,U=0|s[9],L=8191&U,D=U>>>13,F=0|a[0],H=8191&F,z=F>>>13,q=0|a[1],G=8191&q,W=q>>>13,V=0|a[2],K=8191&V,$=V>>>13,J=0|a[3],Q=8191&J,Z=J>>>13,Y=0|a[4],X=8191&Y,ee=Y>>>13,te=0|a[5],re=8191&te,ne=te>>>13,ie=0|a[6],oe=8191&ie,se=ie>>>13,ae=0|a[7],ue=8191&ae,ce=ae>>>13,le=0|a[8],fe=8191&le,he=le>>>13,de=0|a[9],pe=8191&de,ge=de>>>13;r.negative=e.negative^t.negative,r.length=19;var be=(c+(n=Math.imul(f,H))|0)+((8191&(i=(i=Math.imul(f,z))+Math.imul(h,H)|0))<<13)|0;c=((o=Math.imul(h,z))+(i>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(p,H),i=(i=Math.imul(p,z))+Math.imul(g,H)|0,o=Math.imul(g,z);var ye=(c+(n=n+Math.imul(f,G)|0)|0)+((8191&(i=(i=i+Math.imul(f,W)|0)+Math.imul(h,G)|0))<<13)|0;c=((o=o+Math.imul(h,W)|0)+(i>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(y,H),i=(i=Math.imul(y,z))+Math.imul(m,H)|0,o=Math.imul(m,z),n=n+Math.imul(p,G)|0,i=(i=i+Math.imul(p,W)|0)+Math.imul(g,G)|0,o=o+Math.imul(g,W)|0;var me=(c+(n=n+Math.imul(f,K)|0)|0)+((8191&(i=(i=i+Math.imul(f,$)|0)+Math.imul(h,K)|0))<<13)|0;c=((o=o+Math.imul(h,$)|0)+(i>>>13)|0)+(me>>>26)|0,me&=67108863,n=Math.imul(w,H),i=(i=Math.imul(w,z))+Math.imul(E,H)|0,o=Math.imul(E,z),n=n+Math.imul(y,G)|0,i=(i=i+Math.imul(y,W)|0)+Math.imul(m,G)|0,o=o+Math.imul(m,W)|0,n=n+Math.imul(p,K)|0,i=(i=i+Math.imul(p,$)|0)+Math.imul(g,K)|0,o=o+Math.imul(g,$)|0;var ve=(c+(n=n+Math.imul(f,Q)|0)|0)+((8191&(i=(i=i+Math.imul(f,Z)|0)+Math.imul(h,Q)|0))<<13)|0;c=((o=o+Math.imul(h,Z)|0)+(i>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(_,H),i=(i=Math.imul(_,z))+Math.imul(S,H)|0,o=Math.imul(S,z),n=n+Math.imul(w,G)|0,i=(i=i+Math.imul(w,W)|0)+Math.imul(E,G)|0,o=o+Math.imul(E,W)|0,n=n+Math.imul(y,K)|0,i=(i=i+Math.imul(y,$)|0)+Math.imul(m,K)|0,o=o+Math.imul(m,$)|0,n=n+Math.imul(p,Q)|0,i=(i=i+Math.imul(p,Z)|0)+Math.imul(g,Q)|0,o=o+Math.imul(g,Z)|0;var we=(c+(n=n+Math.imul(f,X)|0)|0)+((8191&(i=(i=i+Math.imul(f,ee)|0)+Math.imul(h,X)|0))<<13)|0;c=((o=o+Math.imul(h,ee)|0)+(i>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(k,H),i=(i=Math.imul(k,z))+Math.imul(O,H)|0,o=Math.imul(O,z),n=n+Math.imul(_,G)|0,i=(i=i+Math.imul(_,W)|0)+Math.imul(S,G)|0,o=o+Math.imul(S,W)|0,n=n+Math.imul(w,K)|0,i=(i=i+Math.imul(w,$)|0)+Math.imul(E,K)|0,o=o+Math.imul(E,$)|0,n=n+Math.imul(y,Q)|0,i=(i=i+Math.imul(y,Z)|0)+Math.imul(m,Q)|0,o=o+Math.imul(m,Z)|0,n=n+Math.imul(p,X)|0,i=(i=i+Math.imul(p,ee)|0)+Math.imul(g,X)|0,o=o+Math.imul(g,ee)|0;var Ee=(c+(n=n+Math.imul(f,re)|0)|0)+((8191&(i=(i=i+Math.imul(f,ne)|0)+Math.imul(h,re)|0))<<13)|0;c=((o=o+Math.imul(h,ne)|0)+(i>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(M,H),i=(i=Math.imul(M,z))+Math.imul(B,H)|0,o=Math.imul(B,z),n=n+Math.imul(k,G)|0,i=(i=i+Math.imul(k,W)|0)+Math.imul(O,G)|0,o=o+Math.imul(O,W)|0,n=n+Math.imul(_,K)|0,i=(i=i+Math.imul(_,$)|0)+Math.imul(S,K)|0,o=o+Math.imul(S,$)|0,n=n+Math.imul(w,Q)|0,i=(i=i+Math.imul(w,Z)|0)+Math.imul(E,Q)|0,o=o+Math.imul(E,Z)|0,n=n+Math.imul(y,X)|0,i=(i=i+Math.imul(y,ee)|0)+Math.imul(m,X)|0,o=o+Math.imul(m,ee)|0,n=n+Math.imul(p,re)|0,i=(i=i+Math.imul(p,ne)|0)+Math.imul(g,re)|0,o=o+Math.imul(g,ne)|0;var Ae=(c+(n=n+Math.imul(f,oe)|0)|0)+((8191&(i=(i=i+Math.imul(f,se)|0)+Math.imul(h,oe)|0))<<13)|0;c=((o=o+Math.imul(h,se)|0)+(i>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(I,H),i=(i=Math.imul(I,z))+Math.imul(C,H)|0,o=Math.imul(C,z),n=n+Math.imul(M,G)|0,i=(i=i+Math.imul(M,W)|0)+Math.imul(B,G)|0,o=o+Math.imul(B,W)|0,n=n+Math.imul(k,K)|0,i=(i=i+Math.imul(k,$)|0)+Math.imul(O,K)|0,o=o+Math.imul(O,$)|0,n=n+Math.imul(_,Q)|0,i=(i=i+Math.imul(_,Z)|0)+Math.imul(S,Q)|0,o=o+Math.imul(S,Z)|0,n=n+Math.imul(w,X)|0,i=(i=i+Math.imul(w,ee)|0)+Math.imul(E,X)|0,o=o+Math.imul(E,ee)|0,n=n+Math.imul(y,re)|0,i=(i=i+Math.imul(y,ne)|0)+Math.imul(m,re)|0,o=o+Math.imul(m,ne)|0,n=n+Math.imul(p,oe)|0,i=(i=i+Math.imul(p,se)|0)+Math.imul(g,oe)|0,o=o+Math.imul(g,se)|0;var _e=(c+(n=n+Math.imul(f,ue)|0)|0)+((8191&(i=(i=i+Math.imul(f,ce)|0)+Math.imul(h,ue)|0))<<13)|0;c=((o=o+Math.imul(h,ce)|0)+(i>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(N,H),i=(i=Math.imul(N,z))+Math.imul(j,H)|0,o=Math.imul(j,z),n=n+Math.imul(I,G)|0,i=(i=i+Math.imul(I,W)|0)+Math.imul(C,G)|0,o=o+Math.imul(C,W)|0,n=n+Math.imul(M,K)|0,i=(i=i+Math.imul(M,$)|0)+Math.imul(B,K)|0,o=o+Math.imul(B,$)|0,n=n+Math.imul(k,Q)|0,i=(i=i+Math.imul(k,Z)|0)+Math.imul(O,Q)|0,o=o+Math.imul(O,Z)|0,n=n+Math.imul(_,X)|0,i=(i=i+Math.imul(_,ee)|0)+Math.imul(S,X)|0,o=o+Math.imul(S,ee)|0,n=n+Math.imul(w,re)|0,i=(i=i+Math.imul(w,ne)|0)+Math.imul(E,re)|0,o=o+Math.imul(E,ne)|0,n=n+Math.imul(y,oe)|0,i=(i=i+Math.imul(y,se)|0)+Math.imul(m,oe)|0,o=o+Math.imul(m,se)|0,n=n+Math.imul(p,ue)|0,i=(i=i+Math.imul(p,ce)|0)+Math.imul(g,ue)|0,o=o+Math.imul(g,ce)|0;var Se=(c+(n=n+Math.imul(f,fe)|0)|0)+((8191&(i=(i=i+Math.imul(f,he)|0)+Math.imul(h,fe)|0))<<13)|0;c=((o=o+Math.imul(h,he)|0)+(i>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(L,H),i=(i=Math.imul(L,z))+Math.imul(D,H)|0,o=Math.imul(D,z),n=n+Math.imul(N,G)|0,i=(i=i+Math.imul(N,W)|0)+Math.imul(j,G)|0,o=o+Math.imul(j,W)|0,n=n+Math.imul(I,K)|0,i=(i=i+Math.imul(I,$)|0)+Math.imul(C,K)|0,o=o+Math.imul(C,$)|0,n=n+Math.imul(M,Q)|0,i=(i=i+Math.imul(M,Z)|0)+Math.imul(B,Q)|0,o=o+Math.imul(B,Z)|0,n=n+Math.imul(k,X)|0,i=(i=i+Math.imul(k,ee)|0)+Math.imul(O,X)|0,o=o+Math.imul(O,ee)|0,n=n+Math.imul(_,re)|0,i=(i=i+Math.imul(_,ne)|0)+Math.imul(S,re)|0,o=o+Math.imul(S,ne)|0,n=n+Math.imul(w,oe)|0,i=(i=i+Math.imul(w,se)|0)+Math.imul(E,oe)|0,o=o+Math.imul(E,se)|0,n=n+Math.imul(y,ue)|0,i=(i=i+Math.imul(y,ce)|0)+Math.imul(m,ue)|0,o=o+Math.imul(m,ce)|0,n=n+Math.imul(p,fe)|0,i=(i=i+Math.imul(p,he)|0)+Math.imul(g,fe)|0,o=o+Math.imul(g,he)|0;var Pe=(c+(n=n+Math.imul(f,pe)|0)|0)+((8191&(i=(i=i+Math.imul(f,ge)|0)+Math.imul(h,pe)|0))<<13)|0;c=((o=o+Math.imul(h,ge)|0)+(i>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,n=Math.imul(L,G),i=(i=Math.imul(L,W))+Math.imul(D,G)|0,o=Math.imul(D,W),n=n+Math.imul(N,K)|0,i=(i=i+Math.imul(N,$)|0)+Math.imul(j,K)|0,o=o+Math.imul(j,$)|0,n=n+Math.imul(I,Q)|0,i=(i=i+Math.imul(I,Z)|0)+Math.imul(C,Q)|0,o=o+Math.imul(C,Z)|0,n=n+Math.imul(M,X)|0,i=(i=i+Math.imul(M,ee)|0)+Math.imul(B,X)|0,o=o+Math.imul(B,ee)|0,n=n+Math.imul(k,re)|0,i=(i=i+Math.imul(k,ne)|0)+Math.imul(O,re)|0,o=o+Math.imul(O,ne)|0,n=n+Math.imul(_,oe)|0,i=(i=i+Math.imul(_,se)|0)+Math.imul(S,oe)|0,o=o+Math.imul(S,se)|0,n=n+Math.imul(w,ue)|0,i=(i=i+Math.imul(w,ce)|0)+Math.imul(E,ue)|0,o=o+Math.imul(E,ce)|0,n=n+Math.imul(y,fe)|0,i=(i=i+Math.imul(y,he)|0)+Math.imul(m,fe)|0,o=o+Math.imul(m,he)|0;var ke=(c+(n=n+Math.imul(p,pe)|0)|0)+((8191&(i=(i=i+Math.imul(p,ge)|0)+Math.imul(g,pe)|0))<<13)|0;c=((o=o+Math.imul(g,ge)|0)+(i>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(L,K),i=(i=Math.imul(L,$))+Math.imul(D,K)|0,o=Math.imul(D,$),n=n+Math.imul(N,Q)|0,i=(i=i+Math.imul(N,Z)|0)+Math.imul(j,Q)|0,o=o+Math.imul(j,Z)|0,n=n+Math.imul(I,X)|0,i=(i=i+Math.imul(I,ee)|0)+Math.imul(C,X)|0,o=o+Math.imul(C,ee)|0,n=n+Math.imul(M,re)|0,i=(i=i+Math.imul(M,ne)|0)+Math.imul(B,re)|0,o=o+Math.imul(B,ne)|0,n=n+Math.imul(k,oe)|0,i=(i=i+Math.imul(k,se)|0)+Math.imul(O,oe)|0,o=o+Math.imul(O,se)|0,n=n+Math.imul(_,ue)|0,i=(i=i+Math.imul(_,ce)|0)+Math.imul(S,ue)|0,o=o+Math.imul(S,ce)|0,n=n+Math.imul(w,fe)|0,i=(i=i+Math.imul(w,he)|0)+Math.imul(E,fe)|0,o=o+Math.imul(E,he)|0;var Oe=(c+(n=n+Math.imul(y,pe)|0)|0)+((8191&(i=(i=i+Math.imul(y,ge)|0)+Math.imul(m,pe)|0))<<13)|0;c=((o=o+Math.imul(m,ge)|0)+(i>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(L,Q),i=(i=Math.imul(L,Z))+Math.imul(D,Q)|0,o=Math.imul(D,Z),n=n+Math.imul(N,X)|0,i=(i=i+Math.imul(N,ee)|0)+Math.imul(j,X)|0,o=o+Math.imul(j,ee)|0,n=n+Math.imul(I,re)|0,i=(i=i+Math.imul(I,ne)|0)+Math.imul(C,re)|0,o=o+Math.imul(C,ne)|0,n=n+Math.imul(M,oe)|0,i=(i=i+Math.imul(M,se)|0)+Math.imul(B,oe)|0,o=o+Math.imul(B,se)|0,n=n+Math.imul(k,ue)|0,i=(i=i+Math.imul(k,ce)|0)+Math.imul(O,ue)|0,o=o+Math.imul(O,ce)|0,n=n+Math.imul(_,fe)|0,i=(i=i+Math.imul(_,he)|0)+Math.imul(S,fe)|0,o=o+Math.imul(S,he)|0;var xe=(c+(n=n+Math.imul(w,pe)|0)|0)+((8191&(i=(i=i+Math.imul(w,ge)|0)+Math.imul(E,pe)|0))<<13)|0;c=((o=o+Math.imul(E,ge)|0)+(i>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(L,X),i=(i=Math.imul(L,ee))+Math.imul(D,X)|0,o=Math.imul(D,ee),n=n+Math.imul(N,re)|0,i=(i=i+Math.imul(N,ne)|0)+Math.imul(j,re)|0,o=o+Math.imul(j,ne)|0,n=n+Math.imul(I,oe)|0,i=(i=i+Math.imul(I,se)|0)+Math.imul(C,oe)|0,o=o+Math.imul(C,se)|0,n=n+Math.imul(M,ue)|0,i=(i=i+Math.imul(M,ce)|0)+Math.imul(B,ue)|0,o=o+Math.imul(B,ce)|0,n=n+Math.imul(k,fe)|0,i=(i=i+Math.imul(k,he)|0)+Math.imul(O,fe)|0,o=o+Math.imul(O,he)|0;var Me=(c+(n=n+Math.imul(_,pe)|0)|0)+((8191&(i=(i=i+Math.imul(_,ge)|0)+Math.imul(S,pe)|0))<<13)|0;c=((o=o+Math.imul(S,ge)|0)+(i>>>13)|0)+(Me>>>26)|0,Me&=67108863,n=Math.imul(L,re),i=(i=Math.imul(L,ne))+Math.imul(D,re)|0,o=Math.imul(D,ne),n=n+Math.imul(N,oe)|0,i=(i=i+Math.imul(N,se)|0)+Math.imul(j,oe)|0,o=o+Math.imul(j,se)|0,n=n+Math.imul(I,ue)|0,i=(i=i+Math.imul(I,ce)|0)+Math.imul(C,ue)|0,o=o+Math.imul(C,ce)|0,n=n+Math.imul(M,fe)|0,i=(i=i+Math.imul(M,he)|0)+Math.imul(B,fe)|0,o=o+Math.imul(B,he)|0;var Be=(c+(n=n+Math.imul(k,pe)|0)|0)+((8191&(i=(i=i+Math.imul(k,ge)|0)+Math.imul(O,pe)|0))<<13)|0;c=((o=o+Math.imul(O,ge)|0)+(i>>>13)|0)+(Be>>>26)|0,Be&=67108863,n=Math.imul(L,oe),i=(i=Math.imul(L,se))+Math.imul(D,oe)|0,o=Math.imul(D,se),n=n+Math.imul(N,ue)|0,i=(i=i+Math.imul(N,ce)|0)+Math.imul(j,ue)|0,o=o+Math.imul(j,ce)|0,n=n+Math.imul(I,fe)|0,i=(i=i+Math.imul(I,he)|0)+Math.imul(C,fe)|0,o=o+Math.imul(C,he)|0;var Te=(c+(n=n+Math.imul(M,pe)|0)|0)+((8191&(i=(i=i+Math.imul(M,ge)|0)+Math.imul(B,pe)|0))<<13)|0;c=((o=o+Math.imul(B,ge)|0)+(i>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(L,ue),i=(i=Math.imul(L,ce))+Math.imul(D,ue)|0,o=Math.imul(D,ce),n=n+Math.imul(N,fe)|0,i=(i=i+Math.imul(N,he)|0)+Math.imul(j,fe)|0,o=o+Math.imul(j,he)|0;var Ie=(c+(n=n+Math.imul(I,pe)|0)|0)+((8191&(i=(i=i+Math.imul(I,ge)|0)+Math.imul(C,pe)|0))<<13)|0;c=((o=o+Math.imul(C,ge)|0)+(i>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(L,fe),i=(i=Math.imul(L,he))+Math.imul(D,fe)|0,o=Math.imul(D,he);var Ce=(c+(n=n+Math.imul(N,pe)|0)|0)+((8191&(i=(i=i+Math.imul(N,ge)|0)+Math.imul(j,pe)|0))<<13)|0;c=((o=o+Math.imul(j,ge)|0)+(i>>>13)|0)+(Ce>>>26)|0,Ce&=67108863;var Re=(c+(n=Math.imul(L,pe))|0)+((8191&(i=(i=Math.imul(L,ge))+Math.imul(D,pe)|0))<<13)|0;return c=((o=Math.imul(D,ge))+(i>>>13)|0)+(Re>>>26)|0,Re&=67108863,u[0]=be,u[1]=ye,u[2]=me,u[3]=ve,u[4]=we,u[5]=Ee,u[6]=Ae,u[7]=_e,u[8]=Se,u[9]=Pe,u[10]=ke,u[11]=Oe,u[12]=xe,u[13]=Me,u[14]=Be,u[15]=Te,u[16]=Ie,u[17]=Ce,u[18]=Re,0!==c&&(u[19]=c,r.length++),r};function y(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,i=0,o=0;o<r.length-1;o++){var s=i;i=0;for(var a=67108863&n,u=Math.min(o,t.length-1),c=Math.max(0,o-e.length+1);c<=u;c++){var l=o-c,f=(0|e.words[l])*(0|t.words[c]),h=67108863&f;a=67108863&(h=h+a|0),i+=(s=(s=s+(f/67108864|0)|0)+(h>>>26)|0)>>>26,s&=67108863}r.words[o]=a,n=s,s=i}return 0!==n?r.words[o]=n:r.length--,r._strip()}function m(e,t,r){return y(e,t,r)}function v(e,t){this.x=e,this.y=t}Math.imul||(b=g),o.prototype.mulTo=function(e,t){var r=this.length+e.length;return 10===this.length&&10===e.length?b(this,e,t):r<63?g(this,e,t):r<1024?y(this,e,t):m(this,e,t)},v.prototype.makeRBT=function(e){for(var t=new Array(e),r=o.prototype._countBits(e)-1,n=0;n<e;n++)t[n]=this.revBin(n,r,e);return t},v.prototype.revBin=function(e,t,r){if(0===e||e===r-1)return e;for(var n=0,i=0;i<t;i++)n|=(1&e)<<t-i-1,e>>=1;return n},v.prototype.permute=function(e,t,r,n,i,o){for(var s=0;s<o;s++)n[s]=t[e[s]],i[s]=r[e[s]]},v.prototype.transform=function(e,t,r,n,i,o){this.permute(o,e,t,r,n,i);for(var s=1;s<i;s<<=1)for(var a=s<<1,u=Math.cos(2*Math.PI/a),c=Math.sin(2*Math.PI/a),l=0;l<i;l+=a)for(var f=u,h=c,d=0;d<s;d++){var p=r[l+d],g=n[l+d],b=r[l+d+s],y=n[l+d+s],m=f*b-h*y;y=f*y+h*b,b=m,r[l+d]=p+b,n[l+d]=g+y,r[l+d+s]=p-b,n[l+d+s]=g-y,d!==a&&(m=u*f-c*h,h=u*h+c*f,f=m)}},v.prototype.guessLen13b=function(e,t){var r=1|Math.max(t,e),n=1&r,i=0;for(r=r/2|0;r;r>>>=1)i++;return 1<<i+1+n},v.prototype.conjugate=function(e,t,r){if(!(r<=1))for(var n=0;n<r/2;n++){var i=e[n];e[n]=e[r-n-1],e[r-n-1]=i,i=t[n],t[n]=-t[r-n-1],t[r-n-1]=-i}},v.prototype.normalize13b=function(e,t){for(var r=0,n=0;n<t/2;n++){var i=8192*Math.round(e[2*n+1]/t)+Math.round(e[2*n]/t)+r;e[n]=67108863&i,r=i<67108864?0:i/67108864|0}return e},v.prototype.convert13b=function(e,t,r,i){for(var o=0,s=0;s<t;s++)o+=0|e[s],r[2*s]=8191&o,o>>>=13,r[2*s+1]=8191&o,o>>>=13;for(s=2*t;s<i;++s)r[s]=0;n(0===o),n(!(-8192&o))},v.prototype.stub=function(e){for(var t=new Array(e),r=0;r<e;r++)t[r]=0;return t},v.prototype.mulp=function(e,t,r){var n=2*this.guessLen13b(e.length,t.length),i=this.makeRBT(n),o=this.stub(n),s=new Array(n),a=new Array(n),u=new Array(n),c=new Array(n),l=new Array(n),f=new Array(n),h=r.words;h.length=n,this.convert13b(e.words,e.length,s,n),this.convert13b(t.words,t.length,c,n),this.transform(s,o,a,u,n,i),this.transform(c,o,l,f,n,i);for(var d=0;d<n;d++){var p=a[d]*l[d]-u[d]*f[d];u[d]=a[d]*f[d]+u[d]*l[d],a[d]=p}return this.conjugate(a,u,n),this.transform(a,u,h,o,n,i),this.conjugate(h,o,n),this.normalize13b(h,n),r.negative=e.negative^t.negative,r.length=e.length+t.length,r._strip()},o.prototype.mul=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),this.mulTo(e,t)},o.prototype.mulf=function(e){var t=new o(null);return t.words=new Array(this.length+e.length),m(this,e,t)},o.prototype.imul=function(e){return this.clone().mulTo(e,this)},o.prototype.imuln=function(e){var t=e<0;t&&(e=-e),n("number"==typeof e),n(e<67108864);for(var r=0,i=0;i<this.length;i++){var o=(0|this.words[i])*e,s=(67108863&o)+(67108863&r);r>>=26,r+=o/67108864|0,r+=s>>>26,this.words[i]=67108863&s}return 0!==r&&(this.words[i]=r,this.length++),this.length=0===e?1:this.length,t?this.ineg():this},o.prototype.muln=function(e){return this.clone().imuln(e)},o.prototype.sqr=function(){return this.mul(this)},o.prototype.isqr=function(){return this.imul(this.clone())},o.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r<t.length;r++){var n=r/26|0,i=r%26;t[r]=e.words[n]>>>i&1}return t}(e);if(0===t.length)return new o(1);for(var r=this,n=0;n<t.length&&0===t[n];n++,r=r.sqr());if(++n<t.length)for(var i=r.sqr();n<t.length;n++,i=i.sqr())0!==t[n]&&(r=r.mul(i));return r},o.prototype.iushln=function(e){n("number"==typeof e&&e>=0);var t,r=e%26,i=(e-r)/26,o=67108863>>>26-r<<26-r;if(0!==r){var s=0;for(t=0;t<this.length;t++){var a=this.words[t]&o,u=(0|this.words[t])-a<<r;this.words[t]=u|s,s=a>>>26-r}s&&(this.words[t]=s,this.length++)}if(0!==i){for(t=this.length-1;t>=0;t--)this.words[t+i]=this.words[t];for(t=0;t<i;t++)this.words[t]=0;this.length+=i}return this._strip()},o.prototype.ishln=function(e){return n(0===this.negative),this.iushln(e)},o.prototype.iushrn=function(e,t,r){var i;n("number"==typeof e&&e>=0),i=t?(t-t%26)/26:0;var o=e%26,s=Math.min((e-o)/26,this.length),a=67108863^67108863>>>o<<o,u=r;if(i-=s,i=Math.max(0,i),u){for(var c=0;c<s;c++)u.words[c]=this.words[c];u.length=s}if(0===s);else if(this.length>s)for(this.length-=s,c=0;c<this.length;c++)this.words[c]=this.words[c+s];else this.words[0]=0,this.length=1;var l=0;for(c=this.length-1;c>=0&&(0!==l||c>=i);c--){var f=0|this.words[c];this.words[c]=l<<26-o|f>>>o,l=f&a}return u&&0!==l&&(u.words[u.length++]=l),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},o.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},o.prototype.shln=function(e){return this.clone().ishln(e)},o.prototype.ushln=function(e){return this.clone().iushln(e)},o.prototype.shrn=function(e){return this.clone().ishrn(e)},o.prototype.ushrn=function(e){return this.clone().iushrn(e)},o.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,i=1<<t;return!(this.length<=r||!(this.words[r]&i))},o.prototype.imaskn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var i=67108863^67108863>>>t<<t;this.words[this.length-1]&=i}return this._strip()},o.prototype.maskn=function(e){return this.clone().imaskn(e)},o.prototype.iaddn=function(e){return n("number"==typeof e),n(e<67108864),e<0?this.isubn(-e):0!==this.negative?1===this.length&&(0|this.words[0])<=e?(this.words[0]=e-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(e),this.negative=1,this):this._iaddn(e)},o.prototype._iaddn=function(e){this.words[0]+=e;for(var t=0;t<this.length&&this.words[t]>=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},o.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t<this.length&&this.words[t]<0;t++)this.words[t]+=67108864,this.words[t+1]-=1;return this._strip()},o.prototype.addn=function(e){return this.clone().iaddn(e)},o.prototype.subn=function(e){return this.clone().isubn(e)},o.prototype.iabs=function(){return this.negative=0,this},o.prototype.abs=function(){return this.clone().iabs()},o.prototype._ishlnsubmul=function(e,t,r){var i,o,s=e.length+r;this._expand(s);var a=0;for(i=0;i<e.length;i++){o=(0|this.words[i+r])+a;var u=(0|e.words[i])*t;a=((o-=67108863&u)>>26)-(u/67108864|0),this.words[i+r]=67108863&o}for(;i<this.length-r;i++)a=(o=(0|this.words[i+r])+a)>>26,this.words[i+r]=67108863&o;if(0===a)return this._strip();for(n(-1===a),a=0,i=0;i<this.length;i++)a=(o=-(0|this.words[i])+a)>>26,this.words[i]=67108863&o;return this.negative=1,this._strip()},o.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),i=e,s=0|i.words[i.length-1];0!=(r=26-this._countBits(s))&&(i=i.ushln(r),n.iushln(r),s=0|i.words[i.length-1]);var a,u=n.length-i.length;if("mod"!==t){(a=new o(null)).length=u+1,a.words=new Array(a.length);for(var c=0;c<a.length;c++)a.words[c]=0}var l=n.clone()._ishlnsubmul(i,1,u);0===l.negative&&(n=l,a&&(a.words[u]=1));for(var f=u-1;f>=0;f--){var h=67108864*(0|n.words[i.length+f])+(0|n.words[i.length+f-1]);for(h=Math.min(h/s|0,67108863),n._ishlnsubmul(i,h,f);0!==n.negative;)h--,n.negative=0,n._ishlnsubmul(i,1,f),n.isZero()||(n.negative^=1);a&&(a.words[f]=h)}return a&&a._strip(),n._strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:a||null,mod:n}},o.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new o(0),mod:new o(0)}:0!==this.negative&&0===e.negative?(a=this.neg().divmod(e,t),"mod"!==t&&(i=a.div.neg()),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.iadd(e)),{div:i,mod:s}):0===this.negative&&0!==e.negative?(a=this.divmod(e.neg(),t),"mod"!==t&&(i=a.div.neg()),{div:i,mod:a.mod}):0!==(this.negative&e.negative)?(a=this.neg().divmod(e.neg(),t),"div"!==t&&(s=a.mod.neg(),r&&0!==s.negative&&s.isub(e)),{div:a.div,mod:s}):e.length>this.length||this.cmp(e)<0?{div:new o(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new o(this.modrn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new o(this.modrn(e.words[0]))}:this._wordDiv(e,t);var i,s,a},o.prototype.div=function(e){return this.divmod(e,"div",!1).div},o.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},o.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},o.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),i=e.andln(1),o=r.cmp(n);return o<0||1===i&&0===o?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},o.prototype.modrn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=(1<<26)%e,i=0,o=this.length-1;o>=0;o--)i=(r*i+(0|this.words[o]))%e;return t?-i:i},o.prototype.modn=function(e){return this.modrn(e)},o.prototype.idivn=function(e){var t=e<0;t&&(e=-e),n(e<=67108863);for(var r=0,i=this.length-1;i>=0;i--){var o=(0|this.words[i])+67108864*r;this.words[i]=o/e|0,r=o%e}return this._strip(),t?this.ineg():this},o.prototype.divn=function(e){return this.clone().idivn(e)},o.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i=new o(1),s=new o(0),a=new o(0),u=new o(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var l=r.clone(),f=t.clone();!t.isZero();){for(var h=0,d=1;0===(t.words[0]&d)&&h<26;++h,d<<=1);if(h>0)for(t.iushrn(h);h-- >0;)(i.isOdd()||s.isOdd())&&(i.iadd(l),s.isub(f)),i.iushrn(1),s.iushrn(1);for(var p=0,g=1;0===(r.words[0]&g)&&p<26;++p,g<<=1);if(p>0)for(r.iushrn(p);p-- >0;)(a.isOdd()||u.isOdd())&&(a.iadd(l),u.isub(f)),a.iushrn(1),u.iushrn(1);t.cmp(r)>=0?(t.isub(r),i.isub(a),s.isub(u)):(r.isub(t),a.isub(i),u.isub(s))}return{a,b:u,gcd:r.iushln(c)}},o.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var i,s=new o(1),a=new o(0),u=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,l=1;0===(t.words[0]&l)&&c<26;++c,l<<=1);if(c>0)for(t.iushrn(c);c-- >0;)s.isOdd()&&s.iadd(u),s.iushrn(1);for(var f=0,h=1;0===(r.words[0]&h)&&f<26;++f,h<<=1);if(f>0)for(r.iushrn(f);f-- >0;)a.isOdd()&&a.iadd(u),a.iushrn(1);t.cmp(r)>=0?(t.isub(r),s.isub(a)):(r.isub(t),a.isub(s))}return(i=0===t.cmpn(1)?s:a).cmpn(0)<0&&i.iadd(e),i},o.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var i=t.cmp(r);if(i<0){var o=t;t=r,r=o}else if(0===i||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},o.prototype.invm=function(e){return this.egcd(e).a.umod(e)},o.prototype.isEven=function(){return!(1&this.words[0])},o.prototype.isOdd=function(){return!(1&~this.words[0])},o.prototype.andln=function(e){return this.words[0]&e},o.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,i=1<<t;if(this.length<=r)return this._expand(r+1),this.words[r]|=i,this;for(var o=i,s=r;0!==o&&s<this.length;s++){var a=0|this.words[s];o=(a+=o)>>>26,a&=67108863,this.words[s]=a}return 0!==o&&(this.words[s]=o,this.length++),this},o.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},o.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this._strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var i=0|this.words[0];t=i===e?0:i<e?-1:1}return 0!==this.negative?0|-t:t},o.prototype.cmp=function(e){if(0!==this.negative&&0===e.negative)return-1;if(0===this.negative&&0!==e.negative)return 1;var t=this.ucmp(e);return 0!==this.negative?0|-t:t},o.prototype.ucmp=function(e){if(this.length>e.length)return 1;if(this.length<e.length)return-1;for(var t=0,r=this.length-1;r>=0;r--){var n=0|this.words[r],i=0|e.words[r];if(n!==i){n<i?t=-1:n>i&&(t=1);break}}return t},o.prototype.gtn=function(e){return 1===this.cmpn(e)},o.prototype.gt=function(e){return 1===this.cmp(e)},o.prototype.gten=function(e){return this.cmpn(e)>=0},o.prototype.gte=function(e){return this.cmp(e)>=0},o.prototype.ltn=function(e){return-1===this.cmpn(e)},o.prototype.lt=function(e){return-1===this.cmp(e)},o.prototype.lten=function(e){return this.cmpn(e)<=0},o.prototype.lte=function(e){return this.cmp(e)<=0},o.prototype.eqn=function(e){return 0===this.cmpn(e)},o.prototype.eq=function(e){return 0===this.cmp(e)},o.red=function(e){return new k(e)},o.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},o.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},o.prototype._forceRed=function(e){return this.red=e,this},o.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},o.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},o.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},o.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},o.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},o.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},o.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},o.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},o.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},o.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},o.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},o.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},o.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},o.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var w={k256:null,p224:null,p192:null,p25519:null};function E(e,t){this.name=e,this.p=new o(t,16),this.n=this.p.bitLength(),this.k=new o(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function A(){E.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function _(){E.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function S(){E.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){E.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function k(e){if("string"==typeof e){var t=o._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function O(e){k.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new o(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}E.prototype._tmp=function(){var e=new o(null);return e.words=new Array(Math.ceil(this.n/13)),e},E.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t<this.n?-1:r.ucmp(this.p);return 0===n?(r.words[0]=0,r.length=1):n>0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},E.prototype.split=function(e,t){e.iushrn(this.n,0,t)},E.prototype.imulK=function(e){return e.imul(this.k)},i(A,E),A.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),i=0;i<n;i++)t.words[i]=e.words[i];if(t.length=n,e.length<=9)return e.words[0]=0,void(e.length=1);var o=e.words[9];for(t.words[t.length++]=o&r,i=10;i<e.length;i++){var s=0|e.words[i];e.words[i-10]=(s&r)<<4|o>>>22,o=s}o>>>=22,e.words[i-10]=o,0===o&&e.length>10?e.length-=10:e.length-=9},A.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r<e.length;r++){var n=0|e.words[r];t+=977*n,e.words[r]=67108863&t,t=64*n+(t/67108864|0)}return 0===e.words[e.length-1]&&(e.length--,0===e.words[e.length-1]&&e.length--),e},i(_,E),i(S,E),i(P,E),P.prototype.imulK=function(e){for(var t=0,r=0;r<e.length;r++){var n=19*(0|e.words[r])+t,i=67108863&n;n>>>=26,e.words[r]=i,t=n}return 0!==t&&(e.words[e.length++]=t),e},o._prime=function(e){if(w[e])return w[e];var t;if("k256"===e)t=new A;else if("p224"===e)t=new _;else if("p192"===e)t=new S;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new P}return w[e]=t,t},k.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},k.prototype._verify2=function(e,t){n(0===(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},k.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):(l(e,e.umod(this.m)._forceRed(this)),e)},k.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},k.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},k.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},k.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},k.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},k.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},k.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},k.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},k.prototype.isqr=function(e){return this.imul(e,e.clone())},k.prototype.sqr=function(e){return this.mul(e,e)},k.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new o(1)).iushrn(2);return this.pow(e,r)}for(var i=this.m.subn(1),s=0;!i.isZero()&&0===i.andln(1);)s++,i.iushrn(1);n(!i.isZero());var a=new o(1).toRed(this),u=a.redNeg(),c=this.m.subn(1).iushrn(1),l=this.m.bitLength();for(l=new o(2*l*l).toRed(this);0!==this.pow(l,c).cmp(u);)l.redIAdd(u);for(var f=this.pow(l,i),h=this.pow(e,i.addn(1).iushrn(1)),d=this.pow(e,i),p=s;0!==d.cmp(a);){for(var g=d,b=0;0!==g.cmp(a);b++)g=g.redSqr();n(b<p);var y=this.pow(f,new o(1).iushln(p-b-1));h=h.redMul(y),f=y.redSqr(),d=d.redMul(f),p=b}return h},k.prototype.invm=function(e){var t=e._invmp(this.m);return 0!==t.negative?(t.negative=0,this.imod(t).redNeg()):this.imod(t)},k.prototype.pow=function(e,t){if(t.isZero())return new o(1).toRed(this);if(0===t.cmpn(1))return e.clone();var r=new Array(16);r[0]=new o(1).toRed(this),r[1]=e;for(var n=2;n<r.length;n++)r[n]=this.mul(r[n-1],e);var i=r[0],s=0,a=0,u=t.bitLength()%26;for(0===u&&(u=26),n=t.length-1;n>=0;n--){for(var c=t.words[n],l=u-1;l>=0;l--){var f=c>>l&1;i!==r[0]&&(i=this.sqr(i)),0!==f||0!==s?(s<<=1,s|=f,(4===++a||0===n&&0===l)&&(i=this.mul(i,r[s]),a=0,s=0)):a=0}u=26}return i},k.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},k.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},o.mont=function(e){return new O(e)},i(O,k),O.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},O.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},O.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),o=i;return i.cmp(this.m)>=0?o=i.isub(this.m):i.cmpn(0)<0&&(o=i.iadd(this.m)),o._forceRed(this)},O.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new o(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),i=r.isub(n).iushrn(this.shift),s=i;return i.cmp(this.m)>=0?s=i.isub(this.m):i.cmpn(0)<0&&(s=i.iadd(this.m)),s._forceRed(this)},O.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},79011:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wordlist=void 0;const n=r(75347);t.Wordlist=class{locale;constructor(e){(0,n.defineProperties)(this,{locale:e})}split(e){return e.toLowerCase().split(/\s+/g)}join(e){return e.join(" ")}}},79095:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedBytesCoder=void 0;const n=r(75347),i=r(39976),o=r(38869);class s extends o.Coder{size;constructor(e,t){let r="bytes"+String(e);super(r,r,t,!1),(0,n.defineProperties)(this,{size:e},{size:"number"})}defaultValue(){return"0x0000000000000000000000000000000000000000000000000000000000000000".substring(0,2+2*this.size)}encode(e,t){let r=(0,n.getBytesCopy)(i.Typed.dereference(t,this.type));return r.length!==this.size&&this._throwError("incorrect data length",t),e.writeBytes(r)}decode(e){return(0,n.hexlify)(e.readBytes(this.size))}}t.FixedBytesCoder=s},79197:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MaxInt256=t.MinInt256=t.MaxUint256=t.WeiPerEther=t.N=void 0,t.N=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),t.WeiPerEther=BigInt("1000000000000000000"),t.MaxUint256=BigInt("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),t.MinInt256=BigInt("0x8000000000000000000000000000000000000000000000000000000000000000")*BigInt(-1),t.MaxInt256=BigInt("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},79224:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.refCount=void 0;var n=r(65212),i=r(17214);t.refCount=function(){return n.operate((function(e,t){var r=null;e._refCount++;var n=i.createOperatorSubscriber(t,void 0,void 0,void 0,(function(){if(!e||e._refCount<=0||0<--e._refCount)r=null;else{var n=e._connection,i=r;r=null,!n||i&&n!==i||n.unsubscribe(),t.unsubscribe()}}));e.subscribe(n),n.closed||(r=e.connect())}))}},79364:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),i=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.interval=t.iif=t.generate=t.fromEventPattern=t.fromEvent=t.from=t.forkJoin=t.empty=t.defer=t.connectable=t.concat=t.combineLatest=t.bindNodeCallback=t.bindCallback=t.UnsubscriptionError=t.TimeoutError=t.SequenceError=t.ObjectUnsubscribedError=t.NotFoundError=t.EmptyError=t.ArgumentOutOfRangeError=t.firstValueFrom=t.lastValueFrom=t.isObservable=t.identity=t.noop=t.pipe=t.NotificationKind=t.Notification=t.Subscriber=t.Subscription=t.Scheduler=t.VirtualAction=t.VirtualTimeScheduler=t.animationFrameScheduler=t.animationFrame=t.queueScheduler=t.queue=t.asyncScheduler=t.async=t.asapScheduler=t.asap=t.AsyncSubject=t.ReplaySubject=t.BehaviorSubject=t.Subject=t.animationFrames=t.observable=t.ConnectableObservable=t.Observable=void 0,t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.combineLatestWith=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=t.config=t.NEVER=t.EMPTY=t.scheduled=t.zip=t.using=t.timer=t.throwError=t.range=t.race=t.partition=t.pairs=t.onErrorResumeNext=t.of=t.never=t.merge=void 0,t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.pairwise=t.onErrorResumeNextWith=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=t.mergeAll=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=void 0,t.zipWith=t.zipAll=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=void 0;var o=r(48051);Object.defineProperty(t,"Observable",{enumerable:!0,get:function(){return o.Observable}});var s=r(14359);Object.defineProperty(t,"ConnectableObservable",{enumerable:!0,get:function(){return s.ConnectableObservable}});var a=r(2884);Object.defineProperty(t,"observable",{enumerable:!0,get:function(){return a.observable}});var u=r(21875);Object.defineProperty(t,"animationFrames",{enumerable:!0,get:function(){return u.animationFrames}});var c=r(76808);Object.defineProperty(t,"Subject",{enumerable:!0,get:function(){return c.Subject}});var l=r(97314);Object.defineProperty(t,"BehaviorSubject",{enumerable:!0,get:function(){return l.BehaviorSubject}});var f=r(10381);Object.defineProperty(t,"ReplaySubject",{enumerable:!0,get:function(){return f.ReplaySubject}});var h=r(5130);Object.defineProperty(t,"AsyncSubject",{enumerable:!0,get:function(){return h.AsyncSubject}});var d=r(22105);Object.defineProperty(t,"asap",{enumerable:!0,get:function(){return d.asap}}),Object.defineProperty(t,"asapScheduler",{enumerable:!0,get:function(){return d.asapScheduler}});var p=r(62326);Object.defineProperty(t,"async",{enumerable:!0,get:function(){return p.async}}),Object.defineProperty(t,"asyncScheduler",{enumerable:!0,get:function(){return p.asyncScheduler}});var g=r(99245);Object.defineProperty(t,"queue",{enumerable:!0,get:function(){return g.queue}}),Object.defineProperty(t,"queueScheduler",{enumerable:!0,get:function(){return g.queueScheduler}});var b=r(15887);Object.defineProperty(t,"animationFrame",{enumerable:!0,get:function(){return b.animationFrame}}),Object.defineProperty(t,"animationFrameScheduler",{enumerable:!0,get:function(){return b.animationFrameScheduler}});var y=r(50875);Object.defineProperty(t,"VirtualTimeScheduler",{enumerable:!0,get:function(){return y.VirtualTimeScheduler}}),Object.defineProperty(t,"VirtualAction",{enumerable:!0,get:function(){return y.VirtualAction}});var m=r(65881);Object.defineProperty(t,"Scheduler",{enumerable:!0,get:function(){return m.Scheduler}});var v=r(69879);Object.defineProperty(t,"Subscription",{enumerable:!0,get:function(){return v.Subscription}});var w=r(2708);Object.defineProperty(t,"Subscriber",{enumerable:!0,get:function(){return w.Subscriber}});var E=r(31245);Object.defineProperty(t,"Notification",{enumerable:!0,get:function(){return E.Notification}}),Object.defineProperty(t,"NotificationKind",{enumerable:!0,get:function(){return E.NotificationKind}});var A=r(99517);Object.defineProperty(t,"pipe",{enumerable:!0,get:function(){return A.pipe}});var _=r(5717);Object.defineProperty(t,"noop",{enumerable:!0,get:function(){return _.noop}});var S=r(87699);Object.defineProperty(t,"identity",{enumerable:!0,get:function(){return S.identity}});var P=r(62560);Object.defineProperty(t,"isObservable",{enumerable:!0,get:function(){return P.isObservable}});var k=r(85761);Object.defineProperty(t,"lastValueFrom",{enumerable:!0,get:function(){return k.lastValueFrom}});var O=r(40841);Object.defineProperty(t,"firstValueFrom",{enumerable:!0,get:function(){return O.firstValueFrom}});var x=r(7024);Object.defineProperty(t,"ArgumentOutOfRangeError",{enumerable:!0,get:function(){return x.ArgumentOutOfRangeError}});var M=r(59328);Object.defineProperty(t,"EmptyError",{enumerable:!0,get:function(){return M.EmptyError}});var B=r(23506);Object.defineProperty(t,"NotFoundError",{enumerable:!0,get:function(){return B.NotFoundError}});var T=r(50839);Object.defineProperty(t,"ObjectUnsubscribedError",{enumerable:!0,get:function(){return T.ObjectUnsubscribedError}});var I=r(94708);Object.defineProperty(t,"SequenceError",{enumerable:!0,get:function(){return I.SequenceError}});var C=r(81713);Object.defineProperty(t,"TimeoutError",{enumerable:!0,get:function(){return C.TimeoutError}});var R=r(69517);Object.defineProperty(t,"UnsubscriptionError",{enumerable:!0,get:function(){return R.UnsubscriptionError}});var N=r(79750);Object.defineProperty(t,"bindCallback",{enumerable:!0,get:function(){return N.bindCallback}});var j=r(21946);Object.defineProperty(t,"bindNodeCallback",{enumerable:!0,get:function(){return j.bindNodeCallback}});var U=r(88246);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return U.combineLatest}});var L=r(39546);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return L.concat}});var D=r(98590);Object.defineProperty(t,"connectable",{enumerable:!0,get:function(){return D.connectable}});var F=r(35884);Object.defineProperty(t,"defer",{enumerable:!0,get:function(){return F.defer}});var H=r(44885);Object.defineProperty(t,"empty",{enumerable:!0,get:function(){return H.empty}});var z=r(75266);Object.defineProperty(t,"forkJoin",{enumerable:!0,get:function(){return z.forkJoin}});var q=r(47058);Object.defineProperty(t,"from",{enumerable:!0,get:function(){return q.from}});var G=r(88616);Object.defineProperty(t,"fromEvent",{enumerable:!0,get:function(){return G.fromEvent}});var W=r(26920);Object.defineProperty(t,"fromEventPattern",{enumerable:!0,get:function(){return W.fromEventPattern}});var V=r(87281);Object.defineProperty(t,"generate",{enumerable:!0,get:function(){return V.generate}});var K=r(99380);Object.defineProperty(t,"iif",{enumerable:!0,get:function(){return K.iif}});var $=r(62275);Object.defineProperty(t,"interval",{enumerable:!0,get:function(){return $.interval}});var J=r(95936);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return J.merge}});var Q=r(11934);Object.defineProperty(t,"never",{enumerable:!0,get:function(){return Q.never}});var Z=r(61587);Object.defineProperty(t,"of",{enumerable:!0,get:function(){return Z.of}});var Y=r(1903);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return Y.onErrorResumeNext}});var X=r(88269);Object.defineProperty(t,"pairs",{enumerable:!0,get:function(){return X.pairs}});var ee=r(57406);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ee.partition}});var te=r(89795);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return te.race}});var re=r(74385);Object.defineProperty(t,"range",{enumerable:!0,get:function(){return re.range}});var ne=r(26680);Object.defineProperty(t,"throwError",{enumerable:!0,get:function(){return ne.throwError}});var ie=r(5825);Object.defineProperty(t,"timer",{enumerable:!0,get:function(){return ie.timer}});var oe=r(35904);Object.defineProperty(t,"using",{enumerable:!0,get:function(){return oe.using}});var se=r(11415);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return se.zip}});var ae=r(30131);Object.defineProperty(t,"scheduled",{enumerable:!0,get:function(){return ae.scheduled}});var ue=r(44885);Object.defineProperty(t,"EMPTY",{enumerable:!0,get:function(){return ue.EMPTY}});var ce=r(11934);Object.defineProperty(t,"NEVER",{enumerable:!0,get:function(){return ce.NEVER}}),i(r(96153),t);var le=r(93728);Object.defineProperty(t,"config",{enumerable:!0,get:function(){return le.config}});var fe=r(88877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return fe.audit}});var he=r(51608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return he.auditTime}});var de=r(10706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return de.buffer}});var pe=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return pe.bufferCount}});var ge=r(41719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return ge.bufferTime}});var be=r(61778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return be.bufferToggle}});var ye=r(56606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return ye.bufferWhen}});var me=r(72719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return me.catchError}});var ve=r(89244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return ve.combineAll}});var we=r(67933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return we.combineLatestAll}});var Ee=r(82044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return Ee.combineLatestWith}});var Ae=r(70201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return Ae.concatAll}});var _e=r(29512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return _e.concatMap}});var Se=r(19913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return Se.concatMapTo}});var Pe=r(98032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return Pe.concatWith}});var ke=r(17812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return ke.connect}});var Oe=r(88589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return Oe.count}});var xe=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return xe.debounce}});var Me=r(21762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return Me.debounceTime}});var Be=r(58799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return Be.defaultIfEmpty}});var Te=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return Te.delay}});var Ie=r(72885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return Ie.delayWhen}});var Ce=r(19818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return Ce.dematerialize}});var Re=r(77876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return Re.distinct}});var Ne=r(22044);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return Ne.distinctUntilChanged}});var je=r(76035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return je.distinctUntilKeyChanged}});var Ue=r(61279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return Ue.elementAt}});var Le=r(66791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return Le.endWith}});var De=r(21361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return De.every}});var Fe=r(11464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return Fe.exhaust}});var He=r(17977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return He.exhaustAll}});var ze=r(86632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return ze.exhaustMap}});var qe=r(75544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return qe.expand}});var Ge=r(85934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return Ge.filter}});var We=r(17802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return We.finalize}});var Ve=r(98183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return Ve.find}});var Ke=r(29035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return Ke.findIndex}});var $e=r(19980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return $e.first}});var Je=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return Je.groupBy}});var Qe=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return Qe.ignoreElements}});var Ze=r(69915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return Ze.isEmpty}});var Ye=r(32568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return Ye.last}});var Xe=r(26872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return Xe.map}});var et=r(13337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return et.mapTo}});var tt=r(75019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return tt.materialize}});var rt=r(50096);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return rt.max}});var nt=r(68087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return nt.mergeAll}});var it=r(74613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return it.flatMap}});var ot=r(67478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ot.mergeMap}});var st=r(76075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return st.mergeMapTo}});var at=r(16707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return at.mergeScan}});var ut=r(79694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ut.mergeWith}});var ct=r(80142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ct.min}});var lt=r(18464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return lt.multicast}});var ft=r(32071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return ft.observeOn}});var ht=r(95513);Object.defineProperty(t,"onErrorResumeNextWith",{enumerable:!0,get:function(){return ht.onErrorResumeNextWith}});var dt=r(26744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return dt.pairwise}});var pt=r(66355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return pt.pluck}});var gt=r(53197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return gt.publish}});var bt=r(82955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return bt.publishBehavior}});var yt=r(26569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return yt.publishLast}});var mt=r(68710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return mt.publishReplay}});var vt=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return vt.raceWith}});var wt=r(92070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return wt.reduce}});var Et=r(56131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return Et.repeat}});var At=r(82139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return At.repeatWhen}});var _t=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return _t.retry}});var St=r(73956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return St.retryWhen}});var Pt=r(79224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Pt.refCount}});var kt=r(43434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return kt.sample}});var Ot=r(44143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Ot.sampleTime}});var xt=r(35565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return xt.scan}});var Mt=r(73929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return Mt.sequenceEqual}});var Bt=r(93405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Bt.share}});var Tt=r(17782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return Tt.shareReplay}});var It=r(55440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return It.single}});var Ct=r(23079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Ct.skip}});var Rt=r(92359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Rt.skipLast}});var Nt=r(97783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Nt.skipUntil}});var jt=r(65774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return jt.skipWhile}});var Ut=r(99054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Ut.startWith}});var Lt=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Lt.subscribeOn}});var Dt=r(16201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return Dt.switchAll}});var Ft=r(90680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Ft.switchMap}});var Ht=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Ht.switchMapTo}});var zt=r(48461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return zt.switchScan}});var qt=r(54383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return qt.take}});var Gt=r(87660);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return Gt.takeLast}});var Wt=r(66911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return Wt.takeUntil}});var Vt=r(60598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return Vt.takeWhile}});var Kt=r(15019);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Kt.tap}});var $t=r(44880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return $t.throttle}});var Jt=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Jt.throttleTime}});var Qt=r(30632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Qt.throwIfEmpty}});var Zt=r(32508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return Zt.timeInterval}});var Yt=r(81713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Yt.timeout}});var Xt=r(50597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Xt.timeoutWith}});var er=r(53866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return er.timestamp}});var tr=r(73484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return tr.toArray}});var rr=r(78072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return rr.window}});var nr=r(62893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return nr.windowCount}});var ir=r(90037);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return ir.windowTime}});var or=r(28996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return or.windowToggle}});var sr=r(65156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return sr.windowWhen}});var ar=r(66975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return ar.withLatestFrom}});var ur=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return ur.zipAll}});var cr=r(36977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return cr.zipWith}})},79694:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.mergeWith=void 0;var o=r(9330);t.mergeWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.merge.apply(void 0,i([],n(e)))}},79750:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.bindCallback=void 0;var n=r(17474);t.bindCallback=function(e,t,r){return n.bindCallbackInternals(!1,e,t,r)}},79838:()=>{},79943:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.LangEn=void 0;const n=r(72684);let i=null;class o extends n.WordlistOwl{constructor(){super("en","0erleonalorenseinceregesticitStanvetearctssi#ch2Athck&tneLl0And#Il.yLeOutO=S|S%b/ra@SurdU'0Ce[Cid|CountCu'Hie=IdOu,-Qui*Ro[TT]T%T*[Tu$0AptDD-tD*[Ju,M.UltV<)Vi)0Rob-0FairF%dRaid0A(EEntRee0Ead0MRRp%tS!_rmBumCoholErtI&LLeyLowMo,O}PhaReadySoT Ways0A>urAz(gOngOuntU'd0Aly,Ch%Ci|G G!GryIm$K!Noun)Nu$O` Sw T&naTiqueXietyY1ArtOlogyPe?P!Pro=Ril1ChCt-EaEnaGueMMedM%MyOundR<+Re,Ri=RowTTefa@Ti,Tw%k0KPe@SaultSetSi,SumeThma0H!>OmTa{T&dT.udeTra@0Ct]D.Gu,NtTh%ToTumn0Era+OcadoOid0AkeA*AyEsomeFulKw?d0Is:ByChel%C#D+GL<)Lc#y~MbooN<aNn RRelyRga(R*lSeS-SketTt!3A^AnAutyCau'ComeEfF%eG(Ha=H(dLie=LowLtN^Nef./TrayTt Twe&Y#d3Cyc!DKeNdOlogyRdR`Tt _{AdeAmeAnketA,EakE[IndOodO[omOu'UeUrUsh_rdAtDyIlMbNeNusOkO,Rd R(gRrowSsTtomUn)XY_{etA(AndA[A=EadEezeI{Id+IefIghtIngIskOccoliOk&OnzeOomO` OwnUsh2Bb!DdyD+tFf$oIldLbLkL!tNd!Nk Rd&Rg R,SS(e[SyTt Y Zz:Bba+B(B!CtusGeKe~LmM aMpNN$N)lNdyNn#NoeNvasNy#Pab!P.$Pta(RRb#RdRgoRpetRryRtSeShS(o/!Su$TT$ogT^Teg%yTt!UghtU'Ut]Ve3Il(gL yM|NsusNturyRe$Rta(_irAlkAmp]An+AosApt Ar+A'AtEapE{Ee'EfErryE,I{&IefIldIm}yOi)Oo'R#-U{!UnkUrn0G?Nnam#Rc!Tiz&TyVil_imApArifyAwAyE<ErkEv I{I|IffImbIn-IpO{OgO'O`OudOwnUbUmpU, Ut^_^A,C#utDeFfeeIlInL!@L%LumnMb(eMeMf%tM-Mm#Mp<yNc tNdu@NfirmNg*[N}@Nsid NtrolNv()OkOlPp PyR$ReRnR*@/Tt#U^UntryUp!Ur'Us(V Yo>_{Ad!AftAmA}AshAt AwlAzyEamEd.EekEwI{etImeIspIt-OpO[Ou^OwdUci$UelUi'Umb!Un^UshYY,$2BeLtu*PPbo?dRiousRr|Rta(R=Sh]/omTe3C!:DMa+MpN)Ng R(gShUght WnY3AlBa>BrisCadeCemb CideCl(eC%a>C*a'ErF&'F(eFyG*eLayLiv M<dMi'Ni$Nti,NyP?tP&dPos.P`PutyRi=ScribeS tSignSkSpair/royTailTe@VelopVi)Vo>3AgramAlAm#dAryCeE'lEtFf G.$Gn.yLemmaNn NosaurRe@RtSag*eScov Sea'ShSmi[S%d Splay/<)V tVideV%)Zzy5Ct%Cum|G~Lph(Ma(Na>NkeyN%OrSeUb!Ve_ftAg#AmaA,-AwEamE[IftIllInkIpI=OpUmY2CkMbNeR(g/T^Ty1Arf1Nam-:G G!RlyRnR`Sily/Sy1HoOlogyOnomy0GeItUca>1F%t0G1GhtTh 2BowD E@r-Eg<tEm|Eph<tEvat%I>Se0B?kBodyBra)Er+Ot]PloyPow Pty0Ab!A@DD![D%'EmyErgyF%)Ga+G(eH<)JoyLi,OughR-hRollSu*T Ti*TryVelope1Isode0U$Uip0AA'OdeOs]R%Upt0CapeSayS&)Ta>0Ern$H-s1Id&)IlOkeOl=1A@Amp!Ce[Ch<+C.eCludeCu'Ecu>Erci'Hau,Hib.I!I,ItOt-P<dPe@Pi*Pla(Po'P*[T&dTra0EEbrow:Br-CeCultyDeIntI`~L'MeMilyMousNNcyNtasyRmSh]TT$Th TigueUltV%.e3Atu*Bru?yD $EEdElMa!N)/iv$T^V W3B Ct]EldGu*LeLmLt N$NdNeNg NishReRmR,Sc$ShTT}[X_gAmeAshAtAv%EeIghtIpOatO{O%Ow UidUshY_mCusGIlLd~owOdOtR)Re,R+tRkRtu}RumRw?dSsil/ UndX_gi!AmeEqu|EshI&dIn+OgOntO,OwnOz&U.2ElNNnyRna)RyTu*:D+tInLaxy~ yMePRa+Rba+Rd&Rl-Rm|SSpTeTh U+Ze3N $NiusN*Nt!Nu(e/u*2O,0AntFtGg!Ng RaffeRlVe_dAn)A*A[IdeImp'ObeOomOryO=OwUe_tDde[LdOdO'RillaSpelSsipV nWn_bA)A(AntApeA[Av.yEatE&IdIefItOc yOupOwUnt_rdE[IdeIltIt?N3M:B.IrLfMm M, NdPpyRb%RdRshR=,TVeWkZ?d3AdAl`ArtAvyD+hogIght~oLmetLpNRo3Dd&Gh~NtPRe/%y5BbyCkeyLdLeLiday~owMeNeyOdPeRnRr%R'Sp.$/TelUrV 5BGeM<Mb!M%Nd*dNgryNtRd!RryRtSb<d3Brid:1EOn0EaEntifyLe2N%e4LLeg$L}[0A+Ita>M&'Mu}Pa@Po'Pro=Pul'0ChCludeComeC*a'DexD-a>Do%Du,ryF<tFl-tF%mHa!H .Iti$Je@JuryMa>N Noc|PutQuiryS<eSe@SideSpi*/$lTa@T e,ToVe,V.eVol=3On0L<dOla>Sue0Em1Ory:CketGu?RZz3AlousAns~yWel9BInKeUr}yY5D+I)MpNg!Ni%Nk/:Ng?oo3EnEpT^upY3CkDD}yNdNgdomSsTT^&TeTt&Wi4EeIfeO{Ow:BBelB%Dd DyKeMpNgua+PtopR+T T(UghUndryVaWWnWsu.Y Zy3Ad AfArnA=Ctu*FtGG$G&dIsu*M#NdNg`NsOp?dSs#Tt Vel3ArB tyBr?yC&'FeFtGhtKeMbM.NkOnQuid/Tt!VeZ?d5AdAnB, C$CkG-NelyNgOpTt yUdUn+VeY$5CkyGga+Mb N?N^Xury3R-s:Ch(eDG-G}tIdIlInJ%KeMm$NNa+Nda>NgoNs]Nu$P!Rb!R^Rg(R(eRketRria+SkSs/ T^T i$ThTrixTt XimumZe3AdowAnAsu*AtCh<-D$DiaLodyLtMb M%yNt]NuRcyR+R.RryShSsa+T$Thod3Dd!DnightLk~]M-NdNimumN%Nu>Rac!Rr%S ySs/akeXXedXtu*5Bi!DelDifyMM|N.%NkeyN, N`OnR$ReRn(gSqu.oTh T]T%Unta(U'VeVie5ChFf(LeLtiplySc!SeumShroomS-/Tu$3Self/ yTh:I=MePk(Rrow/yT]Tu*3ArCkEdGati=G!@I` PhewR=/TTw%kUtr$V WsXt3CeGht5B!I'M(eeOd!Rm$R`SeTab!TeTh(gTi)VelW5C!?Mb R'T:K0EyJe@Li+Scu*S =Ta(Vious0CurE<Tob 0Or1FF Fi)T&2L1Ay0DI=Ymp-0It0CeEI#L(eLy1EnEraIn]Po'T]1An+B.Ch?dD D(?yG<I|Ig($Ph<0Tr-h0H 0Tdo%T TputTside0AlEnEr0NN 0Yg&0/ 0O}:CtDd!GeIrLa)LmNdaNelN-N` P RadeR|RkRrotRtySsT^ThTi|TrolTt nU'VeYm|3A)AnutArAs<tL-<NN$tyNcilOp!Pp Rfe@Rm.Rs#T2O}OtoRa'Ys-$0AnoCn-Ctu*E)GGe#~LotNkO} Pe/olT^Zza_)A}tA,-A>AyEa'Ed+U{UgUn+2EmEtIntL?LeLi)NdNyOlPul?Rt]S.]Ssib!/TatoTt yV tyWd W _@i)Ai'Ed-tEf Epa*Es|EttyEv|I)IdeIm?yIntI%.yIs#Iva>IzeOb!mO)[Odu)Of.OgramOje@Omo>OofOp tyOsp O>@OudOvide2Bl-Dd(g~LpL'Mpk(N^PilPpyR^a'R.yRpo'R'ShTZz!3Ramid:99Al.yAntumArt E,]I{ItIzO>:Bb.Cco#CeCkD?DioIlInI'~yMpN^NdomN+PidReTeTh V&WZ%3AdyAlAs#BelBuildC$lCei=CipeC%dCyc!Du)F!@F%mFu'G]G*tGul?Je@LaxLea'LiefLyMa(Memb M(dMo=Nd NewNtOp&PairPeatPla)P%tQui*ScueSemb!Si,Sour)Sp#'SultTi*T*atTurnUn]Ve$ViewW?d2Y`m0BBb#CeChDeD+F!GhtGidNgOtPp!SkTu$V$V 5AdA,BotBu,CketM<)OfOkieOmSeTa>UghUndU>Y$5Bb DeGLeNNwayR$:DDd!D}[FeIlLadLm#L#LtLu>MeMp!NdTisfyToshiU)Usa+VeY1A!AnA*Att E}HemeHoolI&)I[%sOrp]OutRapRe&RiptRub1AAr^As#AtC#dC*tCt]Cur.yEdEkGm|Le@~M(?Ni%N'Nt&)RiesRvi)Ss]Tt!TupV&_dowAftAllowA*EdEllEriffIeldIftI}IpIv O{OeOotOpOrtOuld O=RimpRugUff!Y0Bl(gCkDeE+GhtGnL|Lk~yLv Mil?Mp!N)NgR&/ Tua>XZe1A>Et^IIllInIrtUll0AbAmEepEnd I)IdeIghtImOg<OtOwUsh0AllArtI!OkeOo`0A{AkeApIffOw0ApCc Ci$CkDaFtL?Ldi LidLut]L=Me#eNgOnRryRtUlUndUpUr)U`0A)A*Ati$AwnEakEci$EedEllEndH eI)Id IkeInIr.L.OilOns%O#OrtOtRayReadR(gY0Ua*UeezeUir*l_b!AdiumAffA+AirsAmpAndArtA>AyEakEelEmEpE*oI{IllIngO{Oma^O}OolOryO=Ra>gyReetRikeR#gRugg!Ud|UffUmb!Y!0Bje@Bm.BwayC)[ChDd&Ff G?G+,ItMm NNnyN'tP PplyP*meReRfa)R+Rpri'RroundR=ySpe@/a(1AllowAmpApArmE?EetIftImIngIt^Ord1MbolMptomRup/em:B!Ck!GIlL|LkNkPeR+tSk/eTtooXi3A^Am~NN<tNnisNtRm/Xt_nkAtEmeEnE%yE*EyIngIsOughtReeRi=RowUmbUnd 0CketDeG LtMb MeNyPRedSsueT!5A,BaccoDayDdl EGe` I!tK&MatoM%rowNeNgueNightOlO`PP-Pp!R^RnadoRtoi'SsT$Uri,W?dW WnY_{AdeAff-Ag-A(Ansf ApAshA=lAyEatEeEndI$IbeI{Igg ImIpOphyOub!U{UeUlyUmpetU,U`Y2BeIt]Mb!NaN}lRkeyRnRt!1El=EntyI)InI,O1PeP-$:5Ly5B*lla0Ab!Awa*C!Cov D DoFairFoldHappyIf%mIqueItIv 'KnownLo{TilUsu$Veil1Da>GradeHoldOnP Set1B<Ge0A+EEdEfulE![U$0Il.y:C<tCuumGueLidL!yL=NNishP%Rious/Ult3H-!L=tNd%Ntu*NueRbRifyRs]RyS'lT <3Ab!Br<tCiousCt%yDeoEw~a+Nta+Ol(Rtu$RusSaS.Su$T$Vid5C$I)IdLc<oLumeTeYa+:GeG#ItLk~LnutNtRfa*RmRri%ShSp/eT VeY3Al`Ap#ArA'lA` BDd(gEk&dIrdLcome/T_!AtEatEelEnE*IpIsp 0DeD`FeLd~NNdowNeNgNkNn Nt ReSdomSeShT}[5LfM<Nd OdOlRdRkRldRryR`_pE{E,!I,I>Ong::Rd3Ar~ow9UUngU`:3BraRo9NeO","0x3c8acc1e7b08d8e76f9fda015ef48dc8c710a73cb7e0f77b2c18a9b5a7adde60")}static wordlist(){return null==i&&(i=new o),i}}t.LangEn=o},80142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.min=void 0;var n=r(92070),i=r(10281);t.min=function(e){return n.reduce(i.isFunction(e)?function(t,r){return e(t,r)<0?t:r}:function(e,t){return e<t?e:t})}},80226:function(e,t,r){"use strict";var n,i,o,s=this&&this.__classPrivateFieldSet||function(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r},a=this&&this.__classPrivateFieldGet||function(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)};Object.defineProperty(t,"__esModule",{value:!0}),t.OFB=void 0;const u=r(86342);class c extends u.ModeOfOperation{constructor(e,t){if(super("OFB",e,c),n.set(this,void 0),i.set(this,void 0),o.set(this,void 0),t){if(t.length%16)throw new TypeError("invalid iv size (must be 16 bytes)");s(this,n,new Uint8Array(t),"f")}else s(this,n,new Uint8Array(16),"f");s(this,i,this.iv,"f"),s(this,o,16,"f")}get iv(){return new Uint8Array(a(this,n,"f"))}encrypt(e){var t,r;if(e.length%16)throw new TypeError("invalid plaintext size (must be multiple of 16 bytes)");const n=new Uint8Array(e);for(let e=0;e<n.length;e++)16===a(this,o,"f")&&(s(this,i,this.aes.encrypt(a(this,i,"f")),"f"),s(this,o,0,"f")),n[e]^=a(this,i,"f")[(s(this,o,(r=a(this,o,"f"),t=r++,r),"f"),t)];return n}decrypt(e){if(e.length%16)throw new TypeError("invalid ciphertext size (must be multiple of 16 bytes)");return this.encrypt(e)}}t.OFB=c,n=new WeakMap,i=new WeakMap,o=new WeakMap},80345:(e,t,r)=>{"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach((function(t){o(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function o(e,t,r){return(t=a(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(48287).Buffer,c=r(15340).inspect,l=c&&c.custom||"inspect";e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t,r,n,i=u.allocUnsafe(e>>>0),o=this.head,s=0;o;)t=o.data,r=i,n=s,u.prototype.copy.call(t,r,n),s+=o.data.length,o=o.next;return i}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return c(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&s(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},80469:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.unsafe=t.siv=t.gcm=t.cfb=t.cbc=t.ecb=t.ctr=t.expandKeyDecLE=t.expandKeyLE=void 0;const n=r(36527),i=r(60022),o=r(24605),s=16,a=new Uint8Array(s);function u(e){return e<<1^283&-(e>>7)}function c(e,t){let r=0;for(;t>0;t>>=1)r^=e&-(1&t),e=u(e);return r}const l=(()=>{let e=new Uint8Array(256);for(let t=0,r=1;t<256;t++,r^=u(r))e[t]=r;const t=new Uint8Array(256);t[0]=99;for(let r=0;r<255;r++){let n=e[255-r];n|=n<<8,t[e[r]]=255&(n^n>>4^n>>5^n>>6^n>>7^99)}return t})(),f=l.map(((e,t)=>l.indexOf(t))),h=e=>e<<8|e>>>24;function d(e,t){if(256!==e.length)throw new Error("Wrong sbox length");const r=new Uint32Array(256).map(((r,n)=>t(e[n]))),n=r.map(h),i=n.map(h),o=i.map(h),s=new Uint32Array(65536),a=new Uint32Array(65536),u=new Uint16Array(65536);for(let t=0;t<256;t++)for(let c=0;c<256;c++){const l=256*t+c;s[l]=r[t]^n[c],a[l]=i[t]^o[c],u[l]=e[t]<<8|e[c]}return{sbox:e,sbox2:u,T0:r,T1:n,T2:i,T3:o,T01:s,T23:a}}const p=d(l,(e=>c(e,3)<<24|e<<16|e<<8|c(e,2))),g=d(f,(e=>c(e,11)<<24|c(e,13)<<16|c(e,9)<<8|c(e,14))),b=(()=>{const e=new Uint8Array(16);for(let t=0,r=1;t<16;t++,r=u(r))e[t]=r;return e})();function y(e){(0,o.bytes)(e);const t=e.length;if(![16,24,32].includes(t))throw new Error(`aes: wrong key size: should be 16, 24 or 32, got: ${t}`);const{sbox2:r}=p,i=(0,n.u32)(e),s=i.length,a=e=>w(r,e,e,e,e),u=new Uint32Array(t+28);u.set(i);for(let e=s;e<u.length;e++){let t=u[e-1];e%s===0?t=a((c=t)<<24|c>>>8)^b[e/s-1]:s>6&&e%s===4&&(t=a(t)),u[e]=u[e-s]^t}var c;return u}function m(e){const t=y(e),r=t.slice(),n=t.length,{sbox2:i}=p,{T0:o,T1:s,T2:a,T3:u}=g;for(let e=0;e<n;e+=4)for(let i=0;i<4;i++)r[e+i]=t[n-e-4+i];t.fill(0);for(let e=4;e<n-4;e++){const t=r[e],n=w(i,t,t,t,t);r[e]=o[255&n]^s[n>>>8&255]^a[n>>>16&255]^u[n>>>24]}return r}function v(e,t,r,n,i,o){return e[r<<8&65280|n>>>8&255]^t[i>>>8&65280|o>>>24&255]}function w(e,t,r,n,i){return e[255&t|65280&r]|e[n>>>16&255|i>>>16&65280]<<16}function E(e,t,r,n,i){const{sbox2:o,T01:s,T23:a}=p;let u=0;t^=e[u++],r^=e[u++],n^=e[u++],i^=e[u++];const c=e.length/4-2;for(let o=0;o<c;o++){const o=e[u++]^v(s,a,t,r,n,i),c=e[u++]^v(s,a,r,n,i,t),l=e[u++]^v(s,a,n,i,t,r),f=e[u++]^v(s,a,i,t,r,n);t=o,r=c,n=l,i=f}return{s0:e[u++]^w(o,t,r,n,i),s1:e[u++]^w(o,r,n,i,t),s2:e[u++]^w(o,n,i,t,r),s3:e[u++]^w(o,i,t,r,n)}}function A(e,t,r,n,i){const{sbox2:o,T01:s,T23:a}=g;let u=0;t^=e[u++],r^=e[u++],n^=e[u++],i^=e[u++];const c=e.length/4-2;for(let o=0;o<c;o++){const o=e[u++]^v(s,a,t,i,n,r),c=e[u++]^v(s,a,r,t,i,n),l=e[u++]^v(s,a,n,r,t,i),f=e[u++]^v(s,a,i,n,r,t);t=o,r=c,n=l,i=f}return{s0:e[u++]^w(o,t,i,n,r),s1:e[u++]^w(o,r,t,i,n),s2:e[u++]^w(o,n,r,t,i),s3:e[u++]^w(o,i,n,r,t)}}function _(e,t){if(!t)return new Uint8Array(e);if((0,o.bytes)(t),t.length<e)throw new Error(`aes: wrong destination length, expected at least ${e}, got: ${t.length}`);return t}function S(e,t,r,i){(0,o.bytes)(t,s),(0,o.bytes)(r);const a=r.length;i=_(a,i);const u=t,c=(0,n.u32)(u);let{s0:l,s1:f,s2:h,s3:d}=E(e,c[0],c[1],c[2],c[3]);const p=(0,n.u32)(r),g=(0,n.u32)(i);for(let t=0;t+4<=p.length;t+=4){g[t+0]=p[t+0]^l,g[t+1]=p[t+1]^f,g[t+2]=p[t+2]^h,g[t+3]=p[t+3]^d;let r=1;for(let e=u.length-1;e>=0;e--)r=r+(255&u[e])|0,u[e]=255&r,r>>>=8;({s0:l,s1:f,s2:h,s3:d}=E(e,c[0],c[1],c[2],c[3]))}const b=s*Math.floor(p.length/4);if(b<a){const e=new Uint32Array([l,f,h,d]),t=(0,n.u8)(e);for(let e=b,n=0;e<a;e++,n++)i[e]=r[e]^t[n]}return i}function P(e,t,r,i,a){(0,o.bytes)(r,s),(0,o.bytes)(i),a=_(i.length,a);const u=r,c=(0,n.u32)(u),l=(0,n.createView)(u),f=(0,n.u32)(i),h=(0,n.u32)(a),d=t?0:12,p=i.length;let g=l.getUint32(d,t),{s0:b,s1:y,s2:m,s3:v}=E(e,c[0],c[1],c[2],c[3]);for(let r=0;r+4<=f.length;r+=4)h[r+0]=f[r+0]^b,h[r+1]=f[r+1]^y,h[r+2]=f[r+2]^m,h[r+3]=f[r+3]^v,g=g+1>>>0,l.setUint32(d,g,t),({s0:b,s1:y,s2:m,s3:v}=E(e,c[0],c[1],c[2],c[3]));const w=s*Math.floor(f.length/4);if(w<p){const e=new Uint32Array([b,y,m,v]),t=(0,n.u8)(e);for(let e=w,r=0;e<p;e++,r++)a[e]=i[e]^t[r]}return a}function k(e){if((0,o.bytes)(e),e.length%s!==0)throw new Error("aes/(cbc-ecb).decrypt ciphertext should consist of blocks with size 16")}function O(e,t,r){let i=e.length;const o=i%s;if(!t&&0!==o)throw new Error("aec/(cbc-ecb): unpadded plaintext with disabled padding");const a=(0,n.u32)(e);if(t){let e=s-o;e||(e=s),i+=e}const u=_(i,r);return{b:a,o:(0,n.u32)(u),out:u}}function x(e,t){if(!t)return e;const r=e.length;if(!r)throw new Error("aes/pcks5: empty ciphertext not allowed");const n=e[r-1];if(n<=0||n>16)throw new Error(`aes/pcks5: wrong padding byte: ${n}`);const i=e.subarray(0,-n);for(let t=0;t<n;t++)if(e[r-t-1]!==n)throw new Error("aes/pcks5: wrong padding");return i}function M(e){const t=new Uint8Array(16),r=(0,n.u32)(t);t.set(e);const i=s-e.length;for(let e=s-i;e<s;e++)t[e]=i;return r}function B(e,t,r,i,o){const s=e.create(r,i.length+(o?.length||0));o&&s.update(o),s.update(i);const a=new Uint8Array(16),u=(0,n.createView)(a);return o&&(0,n.setBigUint64)(u,0,BigInt(8*o.length),t),(0,n.setBigUint64)(u,8,BigInt(8*i.length),t),s.update(a),s.digest()}t.expandKeyLE=y,t.expandKeyDecLE=m,t.ctr=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t){function r(r,n){const i=y(e),o=t.slice(),s=S(i,o,r,n);return i.fill(0),o.fill(0),s}return(0,o.bytes)(e),(0,o.bytes)(t,s),{encrypt:(e,t)=>r(e,t),decrypt:(e,t)=>r(e,t)}})),t.ecb=(0,n.wrapCipher)({blockSize:16},(function(e,t={}){(0,o.bytes)(e);const r=!t.disablePadding;return{encrypt:(t,n)=>{(0,o.bytes)(t);const{b:i,o:s,out:a}=O(t,r,n),u=y(e);let c=0;for(;c+4<=i.length;){const{s0:e,s1:t,s2:r,s3:n}=E(u,i[c+0],i[c+1],i[c+2],i[c+3]);s[c++]=e,s[c++]=t,s[c++]=r,s[c++]=n}if(r){const e=M(t.subarray(4*c)),{s0:r,s1:n,s2:i,s3:o}=E(u,e[0],e[1],e[2],e[3]);s[c++]=r,s[c++]=n,s[c++]=i,s[c++]=o}return u.fill(0),a},decrypt:(t,i)=>{k(t);const o=m(e),s=_(t.length,i),a=(0,n.u32)(t),u=(0,n.u32)(s);for(let e=0;e+4<=a.length;){const{s0:t,s1:r,s2:n,s3:i}=A(o,a[e+0],a[e+1],a[e+2],a[e+3]);u[e++]=t,u[e++]=r,u[e++]=n,u[e++]=i}return o.fill(0),x(s,r)}}})),t.cbc=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t,r={}){(0,o.bytes)(e),(0,o.bytes)(t,16);const i=!r.disablePadding;return{encrypt:(r,o)=>{const s=y(e),{b:a,o:u,out:c}=O(r,i,o),l=(0,n.u32)(t);let f=l[0],h=l[1],d=l[2],p=l[3],g=0;for(;g+4<=a.length;)f^=a[g+0],h^=a[g+1],d^=a[g+2],p^=a[g+3],({s0:f,s1:h,s2:d,s3:p}=E(s,f,h,d,p)),u[g++]=f,u[g++]=h,u[g++]=d,u[g++]=p;if(i){const e=M(r.subarray(4*g));f^=e[0],h^=e[1],d^=e[2],p^=e[3],({s0:f,s1:h,s2:d,s3:p}=E(s,f,h,d,p)),u[g++]=f,u[g++]=h,u[g++]=d,u[g++]=p}return s.fill(0),c},decrypt:(r,o)=>{k(r);const s=m(e),a=(0,n.u32)(t),u=_(r.length,o),c=(0,n.u32)(r),l=(0,n.u32)(u);let f=a[0],h=a[1],d=a[2],p=a[3];for(let e=0;e+4<=c.length;){const t=f,r=h,n=d,i=p;f=c[e+0],h=c[e+1],d=c[e+2],p=c[e+3];const{s0:o,s1:a,s2:u,s3:g}=A(s,f,h,d,p);l[e++]=o^t,l[e++]=a^r,l[e++]=u^n,l[e++]=g^i}return s.fill(0),x(u,i)}}})),t.cfb=(0,n.wrapCipher)({blockSize:16,nonceLength:16},(function(e,t){function r(r,i,o){const a=y(e),u=r.length;o=_(u,o);const c=(0,n.u32)(r),l=(0,n.u32)(o),f=i?l:c,h=(0,n.u32)(t);let d=h[0],p=h[1],g=h[2],b=h[3];for(let e=0;e+4<=c.length;){const{s0:t,s1:r,s2:n,s3:i}=E(a,d,p,g,b);l[e+0]=c[e+0]^t,l[e+1]=c[e+1]^r,l[e+2]=c[e+2]^n,l[e+3]=c[e+3]^i,d=f[e++],p=f[e++],g=f[e++],b=f[e++]}const m=s*Math.floor(c.length/4);if(m<u){({s0:d,s1:p,s2:g,s3:b}=E(a,d,p,g,b));const e=(0,n.u8)(new Uint32Array([d,p,g,b]));for(let t=m,n=0;t<u;t++,n++)o[t]=r[t]^e[n];e.fill(0)}return a.fill(0),o}return(0,o.bytes)(e),(0,o.bytes)(t,16),{encrypt:(e,t)=>r(e,!0,t),decrypt:(e,t)=>r(e,!1,t)}})),t.gcm=(0,n.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(e,t,r){if((0,o.bytes)(t),0===t.length)throw new Error("aes/gcm: empty nonce");function s(e,t,n){const o=B(i.ghash,!1,e,n,r);for(let e=0;e<t.length;e++)o[e]^=t[e];return o}function u(){const r=y(e),o=a.slice(),s=a.slice();if(P(r,!1,s,s,o),12===t.length)s.set(t);else{const e=a.slice(),r=(0,n.createView)(e);(0,n.setBigUint64)(r,8,BigInt(8*t.length),!1),i.ghash.create(o).update(t).update(e).digestInto(s)}return{xk:r,authKey:o,counter:s,tagMask:P(r,!1,s,a)}}return{encrypt:e=>{(0,o.bytes)(e);const{xk:t,authKey:r,counter:n,tagMask:i}=u(),a=new Uint8Array(e.length+16);P(t,!1,n,e,a);const c=s(r,i,a.subarray(0,a.length-16));return a.set(c,e.length),t.fill(0),a},decrypt:e=>{if((0,o.bytes)(e),e.length<16)throw new Error("aes/gcm: ciphertext less than tagLen (16)");const{xk:t,authKey:r,counter:i,tagMask:a}=u(),c=e.subarray(0,-16),l=e.subarray(-16),f=s(r,a,c);if(!(0,n.equalBytes)(f,l))throw new Error("aes/gcm: invalid ghash tag");const h=P(t,!1,i,c);return r.fill(0),a.fill(0),t.fill(0),h}}}));const T=(e,t,r)=>n=>{if(!Number.isSafeInteger(n)||t>n||n>r)throw new Error(`${e}: invalid value=${n}, must be [${t}..${r}]`)};function I(e){return null!=e&&"object"==typeof e&&(e instanceof Uint32Array||"Uint32Array"===e.constructor.name)}t.siv=(0,n.wrapCipher)({blockSize:16,nonceLength:12,tagLength:16},(function(e,t,r){const s=T("AAD",0,2**36),a=T("plaintext",0,2**36),u=T("nonce",12,12),c=T("ciphertext",16,2**36+16);function l(){const r=e.length;if(16!==r&&24!==r&&32!==r)throw new Error(`key length must be 16, 24 or 32 bytes, got: ${r} bytes`);const i=y(e),o=new Uint8Array(r),s=new Uint8Array(16),a=(0,n.u32)(t);let u=0,c=a[0],l=a[1],f=a[2],h=0;for(const e of[s,o].map(n.u32)){const t=(0,n.u32)(e);for(let e=0;e<t.length;e+=2){const{s0:r,s1:n}=E(i,u,c,l,f);t[e+0]=r,t[e+1]=n,u=++h}}return i.fill(0),{authKey:s,encKey:y(o)}}function f(e,o,s){const a=B(i.polyval,!0,o,s,r);for(let e=0;e<12;e++)a[e]^=t[e];a[15]&=127;const u=(0,n.u32)(a);let c=u[0],l=u[1],f=u[2],h=u[3];return({s0:c,s1:l,s2:f,s3:h}=E(e,c,l,f,h)),u[0]=c,u[1]=l,u[2]=f,u[3]=h,a}function h(e,t,r){let n=t.slice();return n[15]|=128,P(e,!0,n,r)}return(0,o.bytes)(t),u(t.length),r&&((0,o.bytes)(r),s(r.length)),{encrypt:e=>{(0,o.bytes)(e),a(e.length);const{encKey:t,authKey:r}=l(),n=f(t,r,e),i=new Uint8Array(e.length+16);return i.set(n,e.length),i.set(h(t,n,e)),t.fill(0),r.fill(0),i},decrypt:e=>{(0,o.bytes)(e),c(e.length);const t=e.subarray(-16),{encKey:r,authKey:i}=l(),s=h(r,t,e.subarray(0,-16)),a=f(r,i,s);if(r.fill(0),i.fill(0),!(0,n.equalBytes)(t,a))throw new Error("invalid polyval tag");return s}}})),t.unsafe={expandKeyLE:y,expandKeyDecLE:m,encrypt:E,decrypt:A,encryptBlock:function(e,t){if((0,o.bytes)(t,16),!I(e))throw new Error("_encryptBlock accepts result of expandKeyLE");const r=(0,n.u32)(t);let{s0:i,s1:s,s2:a,s3:u}=E(e,r[0],r[1],r[2],r[3]);return r[0]=i,r[1]=s,r[2]=a,r[3]=u,t},decryptBlock:function(e,t){if((0,o.bytes)(t,16),!I(e))throw new Error("_decryptBlock accepts result of expandKeyLE");const r=(0,n.u32)(t);let{s0:i,s1:s,s2:a,s3:u}=A(e,r[0],r[1],r[2],r[3]);return r[0]=i,r[1]=s,r[2]=a,r[3]=u,t},ctrCounter:S,ctr32:P}},80629:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isInteropObservable=void 0;var n=r(2884),i=r(10281);t.isInteropObservable=function(e){return i.isFunction(e[n.observable])}},80719:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.joinAllInternals=void 0;var n=r(87699),i=r(13916),o=r(99517),s=r(67478),a=r(73484);t.joinAllInternals=function(e,t){return o.pipe(a.toArray(),s.mergeMap((function(t){return e(t)})),t?i.mapOneOrManyArgs(t):n.identity)}},81355:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AddressCoder=void 0;const n=r(30646),i=r(66508),o=r(39976),s=r(38869);class a extends s.Coder{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){let r=o.Typed.dereference(t,"string");try{r=(0,n.getAddress)(r)}catch(e){return this._throwError(e.message,t)}return e.writeValue(r)}decode(e){return(0,n.getAddress)((0,i.toBeHex)(e.readValue(),20))}}t.AddressCoder=a},81713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.timeout=t.TimeoutError=void 0;var n=r(62326),i=r(85345),o=r(65212),s=r(19724),a=r(9619),u=r(17214),c=r(28619);function l(e){throw new t.TimeoutError(e)}t.TimeoutError=a.createErrorClass((function(e){return function(t){void 0===t&&(t=null),e(this),this.message="Timeout has occurred",this.name="TimeoutError",this.info=t}})),t.timeout=function(e,t){var r=i.isValidDate(e)?{first:e}:"number"==typeof e?{each:e}:e,a=r.first,f=r.each,h=r.with,d=void 0===h?l:h,p=r.scheduler,g=void 0===p?null!=t?t:n.asyncScheduler:p,b=r.meta,y=void 0===b?null:b;if(null==a&&null==f)throw new TypeError("No timeout provided.");return o.operate((function(e,t){var r,n,i=null,o=0,l=function(e){n=c.executeSchedule(t,g,(function(){try{r.unsubscribe(),s.innerFrom(d({meta:y,lastValue:i,seen:o})).subscribe(t)}catch(e){t.error(e)}}),e)};r=e.subscribe(u.createOperatorSubscriber(t,(function(e){null==n||n.unsubscribe(),o++,t.next(i=e),f>0&&l(f)}),void 0,void 0,(function(){(null==n?void 0:n.closed)||null==n||n.unsubscribe(),i=null}))),!o&&l(null!=a?"number"==typeof a?a:+a-g.now():f)}))}},81760:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},81816:(e,t,r)=>{"use strict";e.exports=s;var n=r(26248),i=Object.create(r(15622));function o(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(!n)return this.emit("error",new Error("write callback called multiple times"));r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function s(e){if(!(this instanceof s))return new s(e);n.call(this,e),this._transformState={afterTransform:o.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",a)}function a(){var e=this;"function"==typeof this._flush?this._flush((function(t,r){u(e,t,r)})):u(this,null,null)}function u(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new Error("Calling transform done when ws.length != 0");if(e._transformState.transforming)throw new Error("Calling transform done when still transforming");return e.push(null)}i.inherits=r(56698),i.inherits(s,n),s.prototype.push=function(e,t){return this._transformState.needTransform=!1,n.prototype.push.call(this,e,t)},s.prototype._transform=function(e,t,r){throw new Error("_transform() is not implemented")},s.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},s.prototype._read=function(e){var t=this._transformState;null!==t.writechunk&&t.writecb&&!t.transforming?(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform)):t.needTransform=!0},s.prototype._destroy=function(e,t){var r=this;n.prototype._destroy.call(this,e,(function(e){t(e),r.emit("close")}))}},81993:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.id=void 0;const n=r(32291),i=r(75347);t.id=function(e){return(0,n.keccak256)((0,i.toUtf8Bytes)(e))}},82044:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestWith=void 0;var o=r(64948);t.combineLatestWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.combineLatest.apply(void 0,i([],n(e)))}},82139:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.repeatWhen=void 0;var n=r(19724),i=r(76808),o=r(65212),s=r(17214);t.repeatWhen=function(e){return o.operate((function(t,r){var o,a,u=!1,c=!1,l=!1,f=function(){return l&&c&&(r.complete(),!0)},h=function(){l=!1,o=t.subscribe(s.createOperatorSubscriber(r,void 0,(function(){l=!0,!f()&&(a||(a=new i.Subject,n.innerFrom(e(a)).subscribe(s.createOperatorSubscriber(r,(function(){o?h():u=!0}),(function(){c=!0,f()})))),a).next()}))),u&&(o.unsubscribe(),o=null,u=!1,h())};h()}))}},82211:(e,t,r)=>{"use strict";var n=r(43349),i=r(56698),o=r(87626),s=r(82808);function a(){this.tmp=new Array(2),this.keys=null}function u(e){s.call(this,e);var t=new a;this._desState=t,this.deriveKeys(t,e.key)}i(u,s),e.exports=u,u.create=function(e){return new u(e)};var c=[1,1,2,2,2,2,2,2,1,2,2,2,2,2,2,1];u.prototype.deriveKeys=function(e,t){e.keys=new Array(32),n.equal(t.length,this.blockSize,"Invalid key length");var r=o.readUInt32BE(t,0),i=o.readUInt32BE(t,4);o.pc1(r,i,e.tmp,0),r=e.tmp[0],i=e.tmp[1];for(var s=0;s<e.keys.length;s+=2){var a=c[s>>>1];r=o.r28shl(r,a),i=o.r28shl(i,a),o.pc2(r,i,e.keys,s)}},u.prototype._update=function(e,t,r,n){var i=this._desState,s=o.readUInt32BE(e,t),a=o.readUInt32BE(e,t+4);o.ip(s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],"encrypt"===this.type?this._encrypt(i,s,a,i.tmp,0):this._decrypt(i,s,a,i.tmp,0),s=i.tmp[0],a=i.tmp[1],o.writeUInt32BE(r,s,n),o.writeUInt32BE(r,a,n+4)},u.prototype._pad=function(e,t){if(!1===this.padding)return!1;for(var r=e.length-t,n=t;n<e.length;n++)e[n]=r;return!0},u.prototype._unpad=function(e){if(!1===this.padding)return e;for(var t=e[e.length-1],r=e.length-t;r<e.length;r++)n.equal(e[r],t);return e.slice(0,e.length-t)},u.prototype._encrypt=function(e,t,r,n,i){for(var s=t,a=r,u=0;u<e.keys.length;u+=2){var c=e.keys[u],l=e.keys[u+1];o.expand(a,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(c,l),h=a;a=(s^o.permute(f))>>>0,s=h}o.rip(a,s,n,i)},u.prototype._decrypt=function(e,t,r,n,i){for(var s=r,a=t,u=e.keys.length-2;u>=0;u-=2){var c=e.keys[u],l=e.keys[u+1];o.expand(s,e.tmp,0),c^=e.tmp[0],l^=e.tmp[1];var f=o.substitute(c,l),h=s;s=(a^o.permute(f))>>>0,a=h}o.rip(s,a,n,i)}},82431:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wordlists=void 0;const n=r(79943);t.wordlists={en:n.LangEn.wordlist()}},82808:(e,t,r)=>{"use strict";var n=r(43349);function i(e){this.options=e,this.type=this.options.type,this.blockSize=8,this._init(),this.buffer=new Array(this.blockSize),this.bufferOff=0,this.padding=!1!==e.padding}e.exports=i,i.prototype._init=function(){},i.prototype.update=function(e){return 0===e.length?[]:"decrypt"===this.type?this._updateDecrypt(e):this._updateEncrypt(e)},i.prototype._buffer=function(e,t){for(var r=Math.min(this.buffer.length-this.bufferOff,e.length-t),n=0;n<r;n++)this.buffer[this.bufferOff+n]=e[t+n];return this.bufferOff+=r,r},i.prototype._flushBuffer=function(e,t){return this._update(this.buffer,0,e,t),this.bufferOff=0,this.blockSize},i.prototype._updateEncrypt=function(e){var t=0,r=0,n=(this.bufferOff+e.length)/this.blockSize|0,i=new Array(n*this.blockSize);0!==this.bufferOff&&(t+=this._buffer(e,t),this.bufferOff===this.buffer.length&&(r+=this._flushBuffer(i,r)));for(var o=e.length-(e.length-t)%this.blockSize;t<o;t+=this.blockSize)this._update(e,t,i,r),r+=this.blockSize;for(;t<e.length;t++,this.bufferOff++)this.buffer[this.bufferOff]=e[t];return i},i.prototype._updateDecrypt=function(e){for(var t=0,r=0,n=Math.ceil((this.bufferOff+e.length)/this.blockSize)-1,i=new Array(n*this.blockSize);n>0;n--)t+=this._buffer(e,t),r+=this._flushBuffer(i,r);return t+=this._buffer(e,t),i},i.prototype.final=function(e){var t,r;return e&&(t=this.update(e)),r="encrypt"===this.type?this._finalEncrypt():this._finalDecrypt(),t?t.concat(r):r},i.prototype._pad=function(e,t){if(0===t)return!1;for(;t<e.length;)e[t++]=0;return!0},i.prototype._finalEncrypt=function(){if(!this._pad(this.buffer,this.bufferOff))return[];var e=new Array(this.blockSize);return this._update(this.buffer,0,e,0),e},i.prototype._unpad=function(e){return e},i.prototype._finalDecrypt=function(){n.equal(this.bufferOff,this.blockSize,"Not enough data to decrypt");var e=new Array(this.blockSize);return this._flushBuffer(e,0),this._unpad(e)}},82890:(e,t,r)=>{var n=r(56698),i=r(90392),o=r(92861).Buffer,s=[1116352408,3609767458,1899447441,602891725,3049323471,3964484399,3921009573,2173295548,961987163,4081628472,1508970993,3053834265,2453635748,2937671579,2870763221,3664609560,3624381080,2734883394,310598401,1164996542,607225278,1323610764,1426881987,3590304994,1925078388,4068182383,2162078206,991336113,2614888103,633803317,3248222580,3479774868,3835390401,2666613458,4022224774,944711139,264347078,2341262773,604807628,2007800933,770255983,1495990901,1249150122,1856431235,1555081692,3175218132,1996064986,2198950837,2554220882,3999719339,2821834349,766784016,2952996808,2566594879,3210313671,3203337956,3336571891,1034457026,3584528711,2466948901,113926993,3758326383,338241895,168717936,666307205,1188179964,773529912,1546045734,1294757372,1522805485,1396182291,2643833823,1695183700,2343527390,1986661051,1014477480,2177026350,1206759142,2456956037,344077627,2730485921,1290863460,2820302411,3158454273,3259730800,3505952657,3345764771,106217008,3516065817,3606008344,3600352804,1432725776,4094571909,1467031594,275423344,851169720,430227734,3100823752,506948616,1363258195,659060556,3750685593,883997877,3785050280,958139571,3318307427,1322822218,3812723403,1537002063,2003034995,1747873779,3602036899,1955562222,1575990012,2024104815,1125592928,2227730452,2716904306,2361852424,442776044,2428436474,593698344,2756734187,3733110249,3204031479,2999351573,3329325298,3815920427,3391569614,3928383900,3515267271,566280711,3940187606,3454069534,4118630271,4000239992,116418474,1914138554,174292421,2731055270,289380356,3203993006,460393269,320620315,685471733,587496836,852142971,1086792851,1017036298,365543100,1126000580,2618297676,1288033470,3409855158,1501505948,4234509866,1607167915,987167468,1816402316,1246189591],a=new Array(160);function u(){this.init(),this._w=a,i.call(this,128,112)}function c(e,t,r){return r^e&(t^r)}function l(e,t,r){return e&t|r&(e|t)}function f(e,t){return(e>>>28|t<<4)^(t>>>2|e<<30)^(t>>>7|e<<25)}function h(e,t){return(e>>>14|t<<18)^(e>>>18|t<<14)^(t>>>9|e<<23)}function d(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^e>>>7}function p(e,t){return(e>>>1|t<<31)^(e>>>8|t<<24)^(e>>>7|t<<25)}function g(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^e>>>6}function b(e,t){return(e>>>19|t<<13)^(t>>>29|e<<3)^(e>>>6|t<<26)}function y(e,t){return e>>>0<t>>>0?1:0}n(u,i),u.prototype.init=function(){return this._ah=1779033703,this._bh=3144134277,this._ch=1013904242,this._dh=2773480762,this._eh=1359893119,this._fh=2600822924,this._gh=528734635,this._hh=1541459225,this._al=4089235720,this._bl=2227873595,this._cl=4271175723,this._dl=1595750129,this._el=2917565137,this._fl=725511199,this._gl=4215389547,this._hl=327033209,this},u.prototype._update=function(e){for(var t=this._w,r=0|this._ah,n=0|this._bh,i=0|this._ch,o=0|this._dh,a=0|this._eh,u=0|this._fh,m=0|this._gh,v=0|this._hh,w=0|this._al,E=0|this._bl,A=0|this._cl,_=0|this._dl,S=0|this._el,P=0|this._fl,k=0|this._gl,O=0|this._hl,x=0;x<32;x+=2)t[x]=e.readInt32BE(4*x),t[x+1]=e.readInt32BE(4*x+4);for(;x<160;x+=2){var M=t[x-30],B=t[x-30+1],T=d(M,B),I=p(B,M),C=g(M=t[x-4],B=t[x-4+1]),R=b(B,M),N=t[x-14],j=t[x-14+1],U=t[x-32],L=t[x-32+1],D=I+j|0,F=T+N+y(D,I)|0;F=(F=F+C+y(D=D+R|0,R)|0)+U+y(D=D+L|0,L)|0,t[x]=F,t[x+1]=D}for(var H=0;H<160;H+=2){F=t[H],D=t[H+1];var z=l(r,n,i),q=l(w,E,A),G=f(r,w),W=f(w,r),V=h(a,S),K=h(S,a),$=s[H],J=s[H+1],Q=c(a,u,m),Z=c(S,P,k),Y=O+K|0,X=v+V+y(Y,O)|0;X=(X=(X=X+Q+y(Y=Y+Z|0,Z)|0)+$+y(Y=Y+J|0,J)|0)+F+y(Y=Y+D|0,D)|0;var ee=W+q|0,te=G+z+y(ee,W)|0;v=m,O=k,m=u,k=P,u=a,P=S,a=o+X+y(S=_+Y|0,_)|0,o=i,_=A,i=n,A=E,n=r,E=w,r=X+te+y(w=Y+ee|0,Y)|0}this._al=this._al+w|0,this._bl=this._bl+E|0,this._cl=this._cl+A|0,this._dl=this._dl+_|0,this._el=this._el+S|0,this._fl=this._fl+P|0,this._gl=this._gl+k|0,this._hl=this._hl+O|0,this._ah=this._ah+r+y(this._al,w)|0,this._bh=this._bh+n+y(this._bl,E)|0,this._ch=this._ch+i+y(this._cl,A)|0,this._dh=this._dh+o+y(this._dl,_)|0,this._eh=this._eh+a+y(this._el,S)|0,this._fh=this._fh+u+y(this._fl,P)|0,this._gh=this._gh+m+y(this._gl,k)|0,this._hh=this._hh+v+y(this._hl,O)|0},u.prototype._hash=function(){var e=o.allocUnsafe(64);function t(t,r,n){e.writeInt32BE(t,n),e.writeInt32BE(r,n+4)}return t(this._ah,this._al,0),t(this._bh,this._bl,8),t(this._ch,this._cl,16),t(this._dh,this._dl,24),t(this._eh,this._el,32),t(this._fh,this._fl,40),t(this._gh,this._gl,48),t(this._hh,this._hl,56),e},e.exports=u},82955:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.publishBehavior=void 0;var n=r(97314),i=r(14359);t.publishBehavior=function(e){return function(t){var r=new n.BehaviorSubject(e);return new i.ConnectableObservable(t,(function(){return r}))}}},83141:(e,t,r)=>{"use strict";var n=r(92861).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=c,t=4;break;case"utf8":this.fillLast=a,t=4;break;case"base64":this.text=l,this.end=f,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function s(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function a(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function c(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function f(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=s(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=s(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},83192:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.computeHmac=void 0;const n=r(87155),i=r(75347);let o=!1;const s=function(e,t,r){return(0,n.createHmac)(e,t).update(r).digest()};let a=s;function u(e,t,r){const n=(0,i.getBytes)(t,"key"),o=(0,i.getBytes)(r,"data");return(0,i.hexlify)(a(e,n,o))}t.computeHmac=u,u._=s,u.lock=function(){o=!0},u.register=function(e){if(o)throw new Error("computeHmac is locked");a=e},Object.freeze(u)},83507:(e,t,r)=>{"use strict";var n=r(56698),i=r(41800),o=r(56168),s=r(92861).Buffer,a=r(20320),u=r(66011),c=r(62802),l=s.alloc(128);function f(e,t){o.call(this,"digest"),"string"==typeof t&&(t=s.from(t));var r="sha512"===e||"sha384"===e?128:64;this._alg=e,this._key=t,t.length>r?t=("rmd160"===e?new u:c(e)).update(t).digest():t.length<r&&(t=s.concat([t,l],r));for(var n=this._ipad=s.allocUnsafe(r),i=this._opad=s.allocUnsafe(r),a=0;a<r;a++)n[a]=54^t[a],i[a]=92^t[a];this._hash="rmd160"===e?new u:c(e),this._hash.update(n)}n(f,o),f.prototype._update=function(e){this._hash.update(e)},f.prototype._final=function(){var e=this._hash.digest();return("rmd160"===this._alg?new u:c(this._alg)).update(this._opad).update(e).digest()},e.exports=function(e,t){return"rmd160"===(e=e.toLowerCase())||"ripemd160"===e?new f("rmd160",t):"md5"===e?new i(a,t):new f(e,t)}},84050:(e,t,r)=>{var n=r(56168),i=r(29560),o=r(56698),s=r(92861).Buffer,a={"des-ede3-cbc":i.CBC.instantiate(i.EDE),"des-ede3":i.EDE,"des-ede-cbc":i.CBC.instantiate(i.EDE),"des-ede":i.EDE,"des-cbc":i.CBC.instantiate(i.DES),"des-ecb":i.DES};function u(e){n.call(this);var t,r=e.mode.toLowerCase(),i=a[r];t=e.decrypt?"decrypt":"encrypt";var o=e.key;s.isBuffer(o)||(o=s.from(o)),"des-ede"!==r&&"des-ede-cbc"!==r||(o=s.concat([o,o.slice(0,8)]));var u=e.iv;s.isBuffer(u)||(u=s.from(u)),this._des=i.create({key:o,iv:u,type:t})}a.des=a["des-cbc"],a.des3=a["des-ede3-cbc"],e.exports=u,o(u,n),u.prototype._update=function(e){return s.from(this._des.update(e))},u.prototype._final=function(){return s.from(this._des.final())}},84534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SigningKey=void 0;const n=r(40985),i=r(75347),o=r(77005);class s{#yt;constructor(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid private key","privateKey","[REDACTED]"),this.#yt=(0,i.hexlify)(e)}get privateKey(){return this.#yt}get publicKey(){return s.computePublicKey(this.#yt)}get compressedPublicKey(){return s.computePublicKey(this.#yt,!0)}sign(e){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const t=n.secp256k1.sign((0,i.getBytesCopy)(e),(0,i.getBytesCopy)(this.#yt),{lowS:!0});return o.Signature.from({r:(0,i.toBeHex)(t.r,32),s:(0,i.toBeHex)(t.s,32),v:t.recovery?28:27})}computeSharedSecret(e){const t=s.computePublicKey(e);return(0,i.hexlify)(n.secp256k1.getSharedSecret((0,i.getBytesCopy)(this.#yt),(0,i.getBytes)(t),!1))}static computePublicKey(e,t){let r=(0,i.getBytes)(e,"key");if(32===r.length){const e=n.secp256k1.getPublicKey(r,!!t);return(0,i.hexlify)(e)}if(64===r.length){const e=new Uint8Array(65);e[0]=4,e.set(r,1),r=e}const o=n.secp256k1.ProjectivePoint.fromHex(r);return(0,i.hexlify)(o.toRawBytes(t))}static recoverPublicKey(e,t){(0,i.assertArgument)(32===(0,i.dataLength)(e),"invalid digest length","digest",e);const r=o.Signature.from(t);let s=n.secp256k1.Signature.fromCompact((0,i.getBytesCopy)((0,i.concat)([r.r,r.s])));s=s.addRecoveryBit(r.yParity);const a=s.recoverPublicKey((0,i.getBytesCopy)(e));return(0,i.assertArgument)(null!=a,"invalid signature for digest","signature",t),"0x"+a.toHex(!1)}static addPoints(e,t,r){const i=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(e).substring(2)),o=n.secp256k1.ProjectivePoint.fromHex(s.computePublicKey(t).substring(2));return"0x"+i.add(o).toHex(!!r)}}t.SigningKey=s},85191:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchResponse=t.FetchRequest=t.FetchCancelSignal=void 0;const n=r(61949),i=r(87415),o=r(1500),s=r(8166),a=r(43948),u=r(73271);let c=(0,u.createGetUrl)();const l=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),f=new RegExp("^ipfs://(ipfs/)?(.*)$","i");let h=!1;async function d(e,t){try{const t=e.match(l);if(!t)throw new Error("invalid data");return new w(200,"OK",{"content-type":t[1]||"text/plain"},t[2]?(0,n.decodeBase64)(t[3]):(r=t[3],(0,a.toUtf8Bytes)(r.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16)))))))}catch(t){return new w(599,"BAD REQUEST (invalid data: URI)",{},null,new v(e))}var r}function p(e){return async function(t,r){try{const r=t.match(f);if(!r)throw new Error("invalid link");return new v(`${e}${r[2]}`)}catch(e){return new w(599,"BAD REQUEST (invalid IPFS URI)",{},null,new v(t))}}}const g={data:d,ipfs:p("https://gateway.ipfs.io/ipfs/")},b=new WeakMap;class y{#mt;#vt;constructor(e){this.#mt=[],this.#vt=!1,b.set(e,(()=>{if(!this.#vt){this.#vt=!0;for(const e of this.#mt)setTimeout((()=>{e()}),0);this.#mt=[]}}))}addListener(e){(0,o.assert)(!this.#vt,"singal already cancelled","UNSUPPORTED_OPERATION",{operation:"fetchCancelSignal.addCancelListener"}),this.#mt.push(e)}get cancelled(){return this.#vt}checkSignal(){(0,o.assert)(!this.cancelled,"cancelled","CANCELLED",{})}}function m(e){if(null==e)throw new Error("missing signal; should not happen");return e.checkSignal(),e}t.FetchCancelSignal=y;class v{#wt;#Et;#At;#_t;#St;#Pt;#kt;#Ot;#xt;#Mt;#Bt;#Tt;#It;#Ct;#Rt;get url(){return this.#Pt}set url(e){this.#Pt=String(e)}get body(){return null==this.#kt?null:new Uint8Array(this.#kt)}set body(e){if(null==e)this.#kt=void 0,this.#Ot=void 0;else if("string"==typeof e)this.#kt=(0,a.toUtf8Bytes)(e),this.#Ot="text/plain";else if(e instanceof Uint8Array)this.#kt=e,this.#Ot="application/octet-stream";else{if("object"!=typeof e)throw new Error("invalid body");this.#kt=(0,a.toUtf8Bytes)(JSON.stringify(e)),this.#Ot="application/json"}}hasBody(){return null!=this.#kt}get method(){return this.#_t?this.#_t:this.hasBody()?"POST":"GET"}set method(e){null==e&&(e=""),this.#_t=String(e).toUpperCase()}get headers(){const e=Object.assign({},this.#At);return this.#xt&&(e.authorization=`Basic ${(0,n.encodeBase64)((0,a.toUtf8Bytes)(this.#xt))}`),this.allowGzip&&(e["accept-encoding"]="gzip"),null==e["content-type"]&&this.#Ot&&(e["content-type"]=this.#Ot),this.body&&(e["content-length"]=String(this.body.length)),e}getHeader(e){return this.headers[e.toLowerCase()]}setHeader(e,t){this.#At[String(e).toLowerCase()]=String(t)}clearHeaders(){this.#At={}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}get credentials(){return this.#xt||null}setCredentials(e,t){(0,o.assertArgument)(!e.match(/:/),"invalid basic authentication username","username","[REDACTED]"),this.#xt=`${e}:${t}`}get allowGzip(){return this.#Et}set allowGzip(e){this.#Et=!!e}get allowInsecureAuthentication(){return!!this.#wt}set allowInsecureAuthentication(e){this.#wt=!!e}get timeout(){return this.#St}set timeout(e){(0,o.assertArgument)(e>=0,"timeout must be non-zero","timeout",e),this.#St=e}get preflightFunc(){return this.#Mt||null}set preflightFunc(e){this.#Mt=e}get processFunc(){return this.#Bt||null}set processFunc(e){this.#Bt=e}get retryFunc(){return this.#Tt||null}set retryFunc(e){this.#Tt=e}get getUrlFunc(){return this.#Rt||c}set getUrlFunc(e){this.#Rt=e}constructor(e){this.#Pt=String(e),this.#wt=!1,this.#Et=!0,this.#At={},this.#_t="",this.#St=3e5,this.#Ct={slotInterval:250,maxAttempts:12},this.#Rt=null}toString(){return`<FetchRequest method=${JSON.stringify(this.method)} url=${JSON.stringify(this.url)} headers=${JSON.stringify(this.headers)} body=${this.#kt?(0,i.hexlify)(this.#kt):"null"}>`}setThrottleParams(e){null!=e.slotInterval&&(this.#Ct.slotInterval=e.slotInterval),null!=e.maxAttempts&&(this.#Ct.maxAttempts=e.maxAttempts)}async#Nt(e,t,r,n,i){if(e>=this.#Ct.maxAttempts)return i.makeServerError("exceeded maximum retry limit");(0,o.assert)(E()<=t,"timeout","TIMEOUT",{operation:"request.send",reason:"timeout",request:n}),r>0&&await function(e){return new Promise((t=>setTimeout(t,e)))}(r);let s=this.clone();const a=(s.url.split(":")[0]||"").toLowerCase();if(a in g){const e=await g[a](s.url,m(n.#It));if(e instanceof w){let t=e;if(this.processFunc){m(n.#It);try{t=await this.processFunc(s,t)}catch(e){null!=e.throttle&&"number"==typeof e.stall||t.makeServerError("error in post-processing function",e).assertOk()}}return t}s=e}this.preflightFunc&&(s=await this.preflightFunc(s));const u=await this.getUrlFunc(s,m(n.#It));let c=new w(u.statusCode,u.statusMessage,u.headers,u.body,n);if(301===c.statusCode||302===c.statusCode){try{const r=c.headers.location||"";return s.redirect(r).#Nt(e+1,t,0,n,c)}catch(e){}return c}if(429===c.statusCode&&(null==this.retryFunc||await this.retryFunc(s,c,e))){const r=c.headers["retry-after"];let i=this.#Ct.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return"string"==typeof r&&r.match(/^[1-9][0-9]*$/)&&(i=parseInt(r)),s.clone().#Nt(e+1,t,i,n,c)}if(this.processFunc){m(n.#It);try{c=await this.processFunc(s,c)}catch(r){null!=r.throttle&&"number"==typeof r.stall||c.makeServerError("error in post-processing function",r).assertOk();let i=this.#Ct.slotInterval*Math.trunc(Math.random()*Math.pow(2,e));return r.stall>=0&&(i=r.stall),s.clone().#Nt(e+1,t,i,n,c)}}return c}send(){return(0,o.assert)(null==this.#It,"request already sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.send"}),this.#It=new y(this),this.#Nt(0,E()+this.timeout,0,this,new w(0,"",{},null,this))}cancel(){(0,o.assert)(null!=this.#It,"request has not been sent","UNSUPPORTED_OPERATION",{operation:"fetchRequest.cancel"});const e=b.get(this);if(!e)throw new Error("missing signal; should not happen");e()}redirect(e){const t=this.url.split(":")[0].toLowerCase(),r=e.split(":")[0].toLowerCase();(0,o.assert)("GET"===this.method&&("https"!==t||"http"!==r)&&e.match(/^https?:/),"unsupported redirect","UNSUPPORTED_OPERATION",{operation:`redirect(${this.method} ${JSON.stringify(this.url)} => ${JSON.stringify(e)})`});const n=new v(e);return n.method="GET",n.allowGzip=this.allowGzip,n.timeout=this.timeout,n.#At=Object.assign({},this.#At),this.#kt&&(n.#kt=new Uint8Array(this.#kt)),n.#Ot=this.#Ot,n}clone(){const e=new v(this.url);return e.#_t=this.#_t,this.#kt&&(e.#kt=this.#kt),e.#Ot=this.#Ot,e.#At=Object.assign({},this.#At),e.#xt=this.#xt,this.allowGzip&&(e.allowGzip=!0),e.timeout=this.timeout,this.allowInsecureAuthentication&&(e.allowInsecureAuthentication=!0),e.#Mt=this.#Mt,e.#Bt=this.#Bt,e.#Tt=this.#Tt,e.#Ct=Object.assign({},this.#Ct),e.#Rt=this.#Rt,e}static lockConfig(){h=!0}static getGateway(e){return g[e.toLowerCase()]||null}static registerGateway(e,t){if("http"===(e=e.toLowerCase())||"https"===e)throw new Error(`cannot intercept ${e}; use registerGetUrl`);if(h)throw new Error("gateways locked");g[e]=t}static registerGetUrl(e){if(h)throw new Error("gateways locked");c=e}static createGetUrlFunc(e){return(0,u.createGetUrl)(e)}static createDataGateway(){return d}static createIpfsGatewayFunc(e){return p(e)}}t.FetchRequest=v;class w{#jt;#Ut;#At;#kt;#h;#Lt;toString(){return`<FetchResponse status=${this.statusCode} body=${this.#kt?(0,i.hexlify)(this.#kt):"null"}>`}get statusCode(){return this.#jt}get statusMessage(){return this.#Ut}get headers(){return Object.assign({},this.#At)}get body(){return null==this.#kt?null:new Uint8Array(this.#kt)}get bodyText(){try{return null==this.#kt?"":(0,a.toUtf8String)(this.#kt)}catch(e){(0,o.assert)(!1,"response body is not valid UTF-8 data","UNSUPPORTED_OPERATION",{operation:"bodyText",info:{response:this}})}}get bodyJson(){try{return JSON.parse(this.bodyText)}catch(e){(0,o.assert)(!1,"response body is not valid JSON","UNSUPPORTED_OPERATION",{operation:"bodyJson",info:{response:this}})}}[Symbol.iterator](){const e=this.headers,t=Object.keys(e);let r=0;return{next:()=>{if(r<t.length){const n=t[r++];return{value:[n,e[n]],done:!1}}return{value:void 0,done:!0}}}}constructor(e,t,r,n,i){this.#jt=e,this.#Ut=t,this.#At=Object.keys(r).reduce(((e,t)=>(e[t.toLowerCase()]=String(r[t]),e)),{}),this.#kt=null==n?null:new Uint8Array(n),this.#h=i||null,this.#Lt={message:""}}makeServerError(e,t){let r;r=e?`CLIENT ESCALATED SERVER ERROR (${this.statusCode} ${this.statusMessage}; ${e})`:`CLIENT ESCALATED SERVER ERROR (${e=`${this.statusCode} ${this.statusMessage}`})`;const n=new w(599,r,this.headers,this.body,this.#h||void 0);return n.#Lt={message:e,error:t},n}throwThrottleError(e,t){null==t?t=-1:(0,o.assertArgument)(Number.isInteger(t)&&t>=0,"invalid stall timeout","stall",t);const r=new Error(e||"throttling requests");throw(0,s.defineProperties)(r,{stall:t,throttle:!0}),r}getHeader(e){return this.headers[e.toLowerCase()]}hasBody(){return null!=this.#kt}get request(){return this.#h}ok(){return""===this.#Lt.message&&this.statusCode>=200&&this.statusCode<300}assertOk(){if(this.ok())return;let{message:e,error:t}=this.#Lt;""===e&&(e=`server response ${this.statusCode} ${this.statusMessage}`);let r=null;this.request&&(r=this.request.url);let n=null;try{this.#kt&&(n=(0,a.toUtf8String)(this.#kt))}catch(e){}(0,o.assert)(!1,e,"SERVER_ERROR",{request:this.request||"unknown request",response:this,error:t,info:{requestUrl:r,responseBody:n,responseStatus:`${this.statusCode} ${this.statusMessage}`}})}}function E(){return(new Date).getTime()}t.FetchResponse=w},85345:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isValidDate=void 0,t.isValidDate=function(e){return e instanceof Date&&!isNaN(e)}},85761:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.lastValueFrom=void 0;var n=r(59328);t.lastValueFrom=function(e,t){var r="object"==typeof t;return new Promise((function(i,o){var s,a=!1;e.subscribe({next:function(e){s=e,a=!0},error:o,complete:function(){a?i(s):r?i(t.defaultValue):o(new n.EmptyError)}})}))}},85934:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.filter=void 0;var n=r(65212),i=r(17214);t.filter=function(e,t){return n.operate((function(r,n){var o=0;r.subscribe(i.createOperatorSubscriber(n,(function(r){return e.call(t,r,o++)&&n.next(r)})))}))}},86048:e=>{"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}r("ERR_INVALID_OPT_VALUE",(function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'}),TypeError),r("ERR_INVALID_ARG_TYPE",(function(e,t,r){var i,o,s,a,u;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-9,r)===t}(e," argument"))s="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var c=("number"!=typeof u&&(u=0),u+1>(a=e).length||-1===a.indexOf(".",u)?"argument":"property");s='The "'.concat(e,'" ').concat(c," ").concat(i," ").concat(n(t,"type"))}return s+". Received type ".concat(typeof r)}),TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",(function(e){return"The "+e+" method is not implemented"})),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",(function(e){return"Cannot call "+e+" after a stream was destroyed"})),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",(function(e){return"Unknown encoding: "+e}),TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},86081:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.race=void 0;var o=r(7652),s=r(6677);t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return s.raceWith.apply(void 0,i([],n(o.argsOrArgArray(e))))}},86238:(e,t,r)=>{"use strict";var n=r(86048).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var s=r.readable||!1!==r.readable&&t.readable,a=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},c=t._writableState&&t._writableState.finished,l=function(){a=!1,c=!0,s||o.call(t)},f=t._readableState&&t._readableState.endEmitted,h=function(){s=!1,f=!0,a||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return s&&!f?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):a&&!c?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)):a&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},86297:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createInvalidObservableTypeError=void 0,t.createInvalidObservableTypeError=function(e){return new TypeError("You provided "+(null!==e&&"object"==typeof e?"an invalid object":"'"+e+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}},86342:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ModeOfOperation=void 0;const n=r(18394);t.ModeOfOperation=class{constructor(e,t,r){if(r&&!(this instanceof r))throw new Error(`${e} must be instantiated with "new"`);Object.defineProperties(this,{aes:{enumerable:!0,value:new n.AES(t)},name:{enumerable:!0,value:e}})}}},86632:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.exhaustMap=void 0;var n=r(26872),i=r(19724),o=r(65212),s=r(17214);t.exhaustMap=function e(t,r){return r?function(o){return o.pipe(e((function(e,o){return i.innerFrom(t(e,o)).pipe(n.map((function(t,n){return r(e,t,o,n)})))})))}:o.operate((function(e,r){var n=0,o=null,a=!1;e.subscribe(s.createOperatorSubscriber(r,(function(e){o||(o=s.createOperatorSubscriber(r,void 0,(function(){o=null,a&&r.complete()})),i.innerFrom(t(e,n++)).subscribe(o))}),(function(){a=!0,!o&&r.complete()})))}))}},86729:(e,t,r)=>{"use strict";var n=t;n.version=r(1636).rE,n.utils=r(47011),n.rand=r(15037),n.curve=r(894),n.curves=r(60480),n.ec=r(57447),n.eddsa=r(8650)},86930:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Wallet=void 0;const n=r(32291),i=r(75347),o=r(68394),s=r(70022),a=r(97570),u=r(61650),c=r(12931);function l(e){return new Promise((t=>{setTimeout((()=>{t()}),e)}))}class f extends o.BaseWallet{constructor(e,t){"string"!=typeof e||e.startsWith("0x")||(e="0x"+e),super("string"==typeof e?new n.SigningKey(e):e,t)}connect(e){return new f(this.signingKey,e)}async encrypt(e,t){const r={address:this.address,privateKey:this.privateKey};return await(0,u.encryptKeystoreJson)(r,e,{progressCallback:t})}encryptSync(e){const t={address:this.address,privateKey:this.privateKey};return(0,u.encryptKeystoreJsonSync)(t,e)}static#Dt(e){if((0,i.assertArgument)(e,"invalid JSON wallet","json","[ REDACTED ]"),"mnemonic"in e&&e.mnemonic&&"en"===e.mnemonic.locale){const t=c.Mnemonic.fromEntropy(e.mnemonic.entropy),r=s.HDNodeWallet.fromMnemonic(t,e.mnemonic.path);if(r.address===e.address&&r.privateKey===e.privateKey)return r;console.log("WARNING: JSON mismatch address/privateKey != mnemonic; fallback onto private key")}const t=new f(e.privateKey);return(0,i.assertArgument)(t.address===e.address,"address/privateKey mismatch","json","[ REDACTED ]"),t}static async fromEncryptedJson(e,t,r){let n=null;return(0,u.isKeystoreJson)(e)?n=await(0,u.decryptKeystoreJson)(e,t,r):(0,a.isCrowdsaleJson)(e)&&(r&&(r(0),await l(0)),n=(0,a.decryptCrowdsaleJson)(e,t),r&&(r(1),await l(0))),f.#Dt(n)}static fromEncryptedJsonSync(e,t){let r=null;return(0,u.isKeystoreJson)(e)?r=(0,u.decryptKeystoreJsonSync)(e,t):(0,a.isCrowdsaleJson)(e)?r=(0,a.decryptCrowdsaleJson)(e,t):(0,i.assertArgument)(!1,"invalid JSON wallet","json","[ REDACTED ]"),f.#Dt(r)}static createRandom(e){const t=s.HDNodeWallet.createRandom();return e?t.connect(e):t}static fromPhrase(e,t){const r=s.HDNodeWallet.fromPhrase(e);return t?r.connect(t):r}}t.Wallet=f},86975:(e,t,r)=>{var n=r(92861).Buffer;function i(e,t,r){var i=e._cipher.encryptBlock(e._prev)[0]^t;return e._prev=n.concat([e._prev.slice(1),n.from([r?t:i])]),i}t.encrypt=function(e,t,r){for(var o=t.length,s=n.allocUnsafe(o),a=-1;++a<o;)s[a]=i(e,t[a],r);return s}},87155:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.pbkdf2Sync=t.createHmac=t.createHash=void 0;const n=r(54542),i=r(19e3),o=r(96978),s=r(99483),a=r(75347),u=function(){if("undefined"!=typeof self)return self;if("undefined"!=typeof window)return window;if(void 0!==r.g)return r.g;throw new Error("unable to locate global object")}(),c=u.crypto||u.msCrypto;t.createHash=function(e){switch(e){case"sha256":return o.sha256.create();case"sha512":return s.sha512.create()}(0,a.assertArgument)(!1,"invalid hashing algorithm name","algorithm",e)},t.createHmac=function(e,t){const r={sha256:o.sha256,sha512:s.sha512}[e];return(0,a.assertArgument)(null!=r,"invalid hmac algorithm","algorithm",e),n.hmac.create(r,t)},t.pbkdf2Sync=function(e,t,r,n,u){const c={sha256:o.sha256,sha512:s.sha512}[u];return(0,a.assertArgument)(null!=c,"invalid pbkdf2 algorithm","algorithm",u),(0,i.pbkdf2)(c,e,t,{c:r,dkLen:n})},t.randomBytes=function(e){(0,a.assert)(null!=c,"platform does not support secure random numbers","UNSUPPORTED_OPERATION",{operation:"randomBytes"}),(0,a.assertArgument)(Number.isInteger(e)&&e>0&&e<=1024,"invalid length","length",e);const t=new Uint8Array(e);return c.getRandomValues(t),t}},87262:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getIcapAddress=t.getAddress=void 0;const n=r(32291),i=r(75347),o=BigInt(0),s=BigInt(36);function a(e){const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,i.getBytes)((0,n.keccak256)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const u={};for(let e=0;e<10;e++)u[String(e)]=String(e);for(let e=0;e<26;e++)u[String.fromCharCode(65+e)]=String(10+e);function c(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>u[e])).join("");for(;t.length>=15;){let e=t.substring(0,15);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}const l=function(){const e={};for(let t=0;t<36;t++)e["0123456789abcdefghijklmnopqrstuvwxyz"[t]]=BigInt(t);return e}();function f(e){if((0,i.assertArgument)("string"==typeof e,"invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/)){e.startsWith("0x")||(e="0x"+e);const t=a(e);return(0,i.assertArgument)(!e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)||t===e,"bad address checksum","address",e),t}if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){(0,i.assertArgument)(e.substring(2,4)===c(e),"bad icap checksum","address",e);let t=function(e){e=e.toLowerCase();let t=o;for(let r=0;r<e.length;r++)t=t*s+l[e[r]];return t}(e.substring(4)).toString(16);for(;t.length<40;)t="0"+t;return a("0x"+t)}(0,i.assertArgument)(!1,"invalid address","address",e)}t.getAddress=f,t.getIcapAddress=function(e){let t=BigInt(f(e)).toString(36).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+c("XE00"+t)+t}},87281:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}};Object.defineProperty(t,"__esModule",{value:!0}),t.generate=void 0;var i=r(87699),o=r(68596),s=r(35884),a=r(36805);t.generate=function(e,t,r,u,c){var l,f,h,d;function p(){var e;return n(this,(function(n){switch(n.label){case 0:e=d,n.label=1;case 1:return t&&!t(e)?[3,4]:[4,h(e)];case 2:n.sent(),n.label=3;case 3:return e=r(e),[3,1];case 4:return[2]}}))}return 1===arguments.length?(d=(l=e).initialState,t=l.condition,r=l.iterate,f=l.resultSelector,h=void 0===f?i.identity:f,c=l.scheduler):(d=e,!u||o.isScheduler(u)?(h=i.identity,c=u):h=u),s.defer(c?function(){return a.scheduleIterable(p(),c)}:p)}},87415:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.zeroPadBytes=t.zeroPadValue=t.stripZerosLeft=t.dataSlice=t.dataLength=t.concat=t.hexlify=t.isBytesLike=t.isHexString=t.getBytesCopy=t.getBytes=void 0;const n=r(1500);function i(e,t,r){if(e instanceof Uint8Array)return r?new Uint8Array(e):e;if("string"==typeof e&&e.match(/^0x(?:[0-9a-f][0-9a-f])*$/i)){const t=new Uint8Array((e.length-2)/2);let r=2;for(let n=0;n<t.length;n++)t[n]=parseInt(e.substring(r,r+2),16),r+=2;return t}(0,n.assertArgument)(!1,"invalid BytesLike value",t||"value",e)}function o(e,t){return i(e,t,!1)}function s(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||"number"==typeof t&&e.length!==2+2*t||!0===t&&e.length%2!=0)}t.getBytes=o,t.getBytesCopy=function(e,t){return i(e,t,!0)},t.isHexString=s,t.isBytesLike=function(e){return s(e,!0)||e instanceof Uint8Array};const a="0123456789abcdef";function u(e){const t=o(e);let r="0x";for(let e=0;e<t.length;e++){const n=t[e];r+=a[(240&n)>>4]+a[15&n]}return r}function c(e,t,r){const i=o(e);(0,n.assert)(t>=i.length,"padding exceeds data length","BUFFER_OVERRUN",{buffer:new Uint8Array(i),length:t,offset:t+1});const s=new Uint8Array(t);return s.fill(0),r?s.set(i,t-i.length):s.set(i,0),u(s)}t.hexlify=u,t.concat=function(e){return"0x"+e.map((e=>u(e).substring(2))).join("")},t.dataLength=function(e){return s(e,!0)?(e.length-2)/2:o(e).length},t.dataSlice=function(e,t,r){const i=o(e);return null!=r&&r>i.length&&(0,n.assert)(!1,"cannot slice beyond data bounds","BUFFER_OVERRUN",{buffer:i,length:i.length,offset:r}),u(i.slice(null==t?0:t,null==r?i.length:r))},t.stripZerosLeft=function(e){let t=u(e).substring(2);for(;t.startsWith("00");)t=t.substring(2);return"0x"+t},t.zeroPadValue=function(e,t){return c(e,t,!0)},t.zeroPadBytes=function(e,t){return c(e,t,!1)}},87568:(e,t,r)=>{var n=t;n.bignum=r(39404),n.define=r(47363).define,n.base=r(9673),n.constants=r(22153),n.decoders=r(22853),n.encoders=r(24669)},87626:(e,t)=>{"use strict";t.readUInt32BE=function(e,t){return(e[0+t]<<24|e[1+t]<<16|e[2+t]<<8|e[3+t])>>>0},t.writeUInt32BE=function(e,t,r){e[0+r]=t>>>24,e[1+r]=t>>>16&255,e[2+r]=t>>>8&255,e[3+r]=255&t},t.ip=function(e,t,r,n){for(var i=0,o=0,s=6;s>=0;s-=2){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>>a+s&1}for(s=6;s>=0;s-=2){for(a=1;a<=25;a+=8)o<<=1,o|=t>>>a+s&1;for(a=1;a<=25;a+=8)o<<=1,o|=e>>>a+s&1}r[n+0]=i>>>0,r[n+1]=o>>>0},t.rip=function(e,t,r,n){for(var i=0,o=0,s=0;s<4;s++)for(var a=24;a>=0;a-=8)i<<=1,i|=t>>>a+s&1,i<<=1,i|=e>>>a+s&1;for(s=4;s<8;s++)for(a=24;a>=0;a-=8)o<<=1,o|=t>>>a+s&1,o<<=1,o|=e>>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.pc1=function(e,t,r,n){for(var i=0,o=0,s=7;s>=5;s--){for(var a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(a=0;a<=24;a+=8)i<<=1,i|=e>>a+s&1}for(a=0;a<=24;a+=8)i<<=1,i|=t>>a+s&1;for(s=1;s<=3;s++){for(a=0;a<=24;a+=8)o<<=1,o|=t>>a+s&1;for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1}for(a=0;a<=24;a+=8)o<<=1,o|=e>>a+s&1;r[n+0]=i>>>0,r[n+1]=o>>>0},t.r28shl=function(e,t){return e<<t&268435455|e>>>28-t};var r=[14,11,17,4,27,23,25,0,13,22,7,18,5,9,16,24,2,20,12,21,1,8,15,26,15,4,25,19,9,1,26,16,5,11,23,8,12,7,17,0,22,3,10,14,6,20,27,24];t.pc2=function(e,t,n,i){for(var o=0,s=0,a=r.length>>>1,u=0;u<a;u++)o<<=1,o|=e>>>r[u]&1;for(u=a;u<r.length;u++)s<<=1,s|=t>>>r[u]&1;n[i+0]=o>>>0,n[i+1]=s>>>0},t.expand=function(e,t,r){var n=0,i=0;n=(1&e)<<5|e>>>27;for(var o=23;o>=15;o-=4)n<<=6,n|=e>>>o&63;for(o=11;o>=3;o-=4)i|=e>>>o&63,i<<=6;i|=(31&e)<<1|e>>>31,t[r+0]=n>>>0,t[r+1]=i>>>0};var n=[14,0,4,15,13,7,1,4,2,14,15,2,11,13,8,1,3,10,10,6,6,12,12,11,5,9,9,5,0,3,7,8,4,15,1,12,14,8,8,2,13,4,6,9,2,1,11,7,15,5,12,11,9,3,7,14,3,10,10,0,5,6,0,13,15,3,1,13,8,4,14,7,6,15,11,2,3,8,4,14,9,12,7,0,2,1,13,10,12,6,0,9,5,11,10,5,0,13,14,8,7,10,11,1,10,3,4,15,13,4,1,2,5,11,8,6,12,7,6,12,9,0,3,5,2,14,15,9,10,13,0,7,9,0,14,9,6,3,3,4,15,6,5,10,1,2,13,8,12,5,7,14,11,12,4,11,2,15,8,1,13,1,6,10,4,13,9,0,8,6,15,9,3,8,0,7,11,4,1,15,2,14,12,3,5,11,10,5,14,2,7,12,7,13,13,8,14,11,3,5,0,6,6,15,9,0,10,3,1,4,2,7,8,2,5,12,11,1,12,10,4,14,15,9,10,3,6,15,9,0,0,6,12,10,11,1,7,13,13,8,15,9,1,4,3,5,14,11,5,12,2,7,8,2,4,14,2,14,12,11,4,2,1,12,7,4,10,7,11,13,6,1,8,5,5,0,3,15,15,10,13,3,0,9,14,8,9,6,4,11,2,8,1,12,11,7,10,1,13,14,7,2,8,13,15,6,9,15,12,0,5,9,6,10,3,4,0,5,14,3,12,10,1,15,10,4,15,2,9,7,2,12,6,9,8,5,0,6,13,1,3,13,4,14,14,0,7,11,5,3,11,8,9,4,14,3,15,2,5,12,2,9,8,5,12,15,3,10,7,11,0,14,4,1,10,7,1,6,13,0,11,8,6,13,4,13,11,0,2,11,14,7,15,4,0,9,8,1,13,10,3,14,12,3,9,5,7,12,5,2,10,15,6,8,1,6,1,6,4,11,11,13,13,8,12,1,3,4,7,10,14,7,10,9,15,5,6,0,8,15,0,14,5,2,9,3,2,12,13,1,2,15,8,13,4,8,6,10,15,3,11,7,1,4,10,12,9,5,3,6,14,11,5,0,0,14,12,9,7,2,7,2,11,1,4,14,1,7,9,4,12,10,14,8,2,13,0,15,6,12,10,9,13,0,15,3,3,5,5,6,8,11];t.substitute=function(e,t){for(var r=0,i=0;i<4;i++)r<<=4,r|=n[64*i+(e>>>18-6*i&63)];for(i=0;i<4;i++)r<<=4,r|=n[256+64*i+(t>>>18-6*i&63)];return r>>>0};var i=[16,25,12,11,3,20,4,15,31,17,9,6,27,14,1,22,30,24,8,18,0,5,29,23,13,19,2,26,10,21,28,7];t.permute=function(e){for(var t=0,r=0;r<i.length;r++)t<<=1,t|=e>>>i[r]&1;return t>>>0},t.padSplit=function(e,t,r){for(var n=e.toString(2);n.length<t;)n="0"+n;for(var i=[],o=0;o<t;o+=r)i.push(n.slice(o,o+r));return i.join(" ")}},87660:function(e,t,r){"use strict";var n=this&&this.__values||function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(t,"__esModule",{value:!0}),t.takeLast=void 0;var i=r(44885),o=r(65212),s=r(17214);t.takeLast=function(e){return e<=0?function(){return i.EMPTY}:o.operate((function(t,r){var i=[];t.subscribe(s.createOperatorSubscriber(r,(function(t){i.push(t),e<i.length&&i.shift()}),(function(){var e,t;try{for(var o=n(i),s=o.next();!s.done;s=o.next()){var a=s.value;r.next(a)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=o.return)&&t.call(o)}finally{if(e)throw e.error}}r.complete()}),void 0,(function(){i=null})))}))}},87699:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.identity=void 0,t.identity=function(e){return e}},87744:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.uuidV4=void 0;const n=r(87415);t.uuidV4=function(e){const t=(0,n.getBytes)(e,"randomBytes");t[6]=15&t[6]|64,t[8]=63&t[8]|128;const r=(0,n.hexlify)(t);return[r.substring(2,10),r.substring(10,14),r.substring(14,18),r.substring(18,22),r.substring(22,34)].join("-")}},87918:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.accessListify=void 0;const n=r(30646),i=r(75347);function o(e,t){return{address:(0,n.getAddress)(e),storageKeys:t.map(((e,t)=>((0,i.assertArgument)((0,i.isHexString)(e,32),"invalid slot",`storageKeys[${t}]`,e),e.toLowerCase())))}}t.accessListify=function(e){if(Array.isArray(e))return e.map(((t,r)=>Array.isArray(t)?((0,i.assertArgument)(2===t.length,"invalid slot set",`value[${r}]`,t),o(t[0],t[1])):((0,i.assertArgument)(null!=t&&"object"==typeof t,"invalid address-slot set","value",e),o(t.address,t.storageKeys))));(0,i.assertArgument)(null!=e&&"object"==typeof e,"invalid access list","value",e);const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return o(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}},88246:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineLatestInit=t.combineLatest=void 0;var n=r(48051),i=r(50439),o=r(47058),s=r(87699),a=r(13916),u=r(26404),c=r(15810),l=r(17214),f=r(28619);function h(e,t,r){return void 0===r&&(r=s.identity),function(n){d(t,(function(){for(var i=e.length,s=new Array(i),a=i,u=i,c=function(i){d(t,(function(){var c=o.from(e[i],t),f=!1;c.subscribe(l.createOperatorSubscriber(n,(function(e){s[i]=e,f||(f=!0,u--),u||n.next(r(s.slice()))}),(function(){--a||n.complete()})))}),n)},f=0;f<i;f++)c(f)}),n)}}function d(e,t,r){e?f.executeSchedule(r,e,t):t()}t.combineLatest=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=u.popScheduler(e),l=u.popResultSelector(e),f=i.argsArgArrayOrObject(e),d=f.args,p=f.keys;if(0===d.length)return o.from([],r);var g=new n.Observable(h(d,r,p?function(e){return c.createObject(p,e)}:s.identity));return l?g.pipe(a.mapOneOrManyArgs(l)):g},t.combineLatestInit=h},88269:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pairs=void 0;var n=r(47058);t.pairs=function(e,t){return n.from(Object.entries(e),t)}},88276:(e,t,r)=>{"use strict";var n=r(56698),i=r(73726),o=r(92861).Buffer,s=new Array(16);function a(){i.call(this,64),this._a=1732584193,this._b=4023233417,this._c=2562383102,this._d=271733878}function u(e,t){return e<<t|e>>>32-t}function c(e,t,r,n,i,o,s){return u(e+(t&r|~t&n)+i+o|0,s)+t|0}function l(e,t,r,n,i,o,s){return u(e+(t&n|r&~n)+i+o|0,s)+t|0}function f(e,t,r,n,i,o,s){return u(e+(t^r^n)+i+o|0,s)+t|0}function h(e,t,r,n,i,o,s){return u(e+(r^(t|~n))+i+o|0,s)+t|0}n(a,i),a.prototype._update=function(){for(var e=s,t=0;t<16;++t)e[t]=this._block.readInt32LE(4*t);var r=this._a,n=this._b,i=this._c,o=this._d;r=c(r,n,i,o,e[0],3614090360,7),o=c(o,r,n,i,e[1],3905402710,12),i=c(i,o,r,n,e[2],606105819,17),n=c(n,i,o,r,e[3],3250441966,22),r=c(r,n,i,o,e[4],4118548399,7),o=c(o,r,n,i,e[5],1200080426,12),i=c(i,o,r,n,e[6],2821735955,17),n=c(n,i,o,r,e[7],4249261313,22),r=c(r,n,i,o,e[8],1770035416,7),o=c(o,r,n,i,e[9],2336552879,12),i=c(i,o,r,n,e[10],4294925233,17),n=c(n,i,o,r,e[11],2304563134,22),r=c(r,n,i,o,e[12],1804603682,7),o=c(o,r,n,i,e[13],4254626195,12),i=c(i,o,r,n,e[14],2792965006,17),r=l(r,n=c(n,i,o,r,e[15],1236535329,22),i,o,e[1],4129170786,5),o=l(o,r,n,i,e[6],3225465664,9),i=l(i,o,r,n,e[11],643717713,14),n=l(n,i,o,r,e[0],3921069994,20),r=l(r,n,i,o,e[5],3593408605,5),o=l(o,r,n,i,e[10],38016083,9),i=l(i,o,r,n,e[15],3634488961,14),n=l(n,i,o,r,e[4],3889429448,20),r=l(r,n,i,o,e[9],568446438,5),o=l(o,r,n,i,e[14],3275163606,9),i=l(i,o,r,n,e[3],4107603335,14),n=l(n,i,o,r,e[8],1163531501,20),r=l(r,n,i,o,e[13],2850285829,5),o=l(o,r,n,i,e[2],4243563512,9),i=l(i,o,r,n,e[7],1735328473,14),r=f(r,n=l(n,i,o,r,e[12],2368359562,20),i,o,e[5],4294588738,4),o=f(o,r,n,i,e[8],2272392833,11),i=f(i,o,r,n,e[11],1839030562,16),n=f(n,i,o,r,e[14],4259657740,23),r=f(r,n,i,o,e[1],2763975236,4),o=f(o,r,n,i,e[4],1272893353,11),i=f(i,o,r,n,e[7],4139469664,16),n=f(n,i,o,r,e[10],3200236656,23),r=f(r,n,i,o,e[13],681279174,4),o=f(o,r,n,i,e[0],3936430074,11),i=f(i,o,r,n,e[3],3572445317,16),n=f(n,i,o,r,e[6],76029189,23),r=f(r,n,i,o,e[9],3654602809,4),o=f(o,r,n,i,e[12],3873151461,11),i=f(i,o,r,n,e[15],530742520,16),r=h(r,n=f(n,i,o,r,e[2],3299628645,23),i,o,e[0],4096336452,6),o=h(o,r,n,i,e[7],1126891415,10),i=h(i,o,r,n,e[14],2878612391,15),n=h(n,i,o,r,e[5],4237533241,21),r=h(r,n,i,o,e[12],1700485571,6),o=h(o,r,n,i,e[3],2399980690,10),i=h(i,o,r,n,e[10],4293915773,15),n=h(n,i,o,r,e[1],2240044497,21),r=h(r,n,i,o,e[8],1873313359,6),o=h(o,r,n,i,e[15],4264355552,10),i=h(i,o,r,n,e[6],2734768916,15),n=h(n,i,o,r,e[13],1309151649,21),r=h(r,n,i,o,e[4],4149444226,6),o=h(o,r,n,i,e[11],3174756917,10),i=h(i,o,r,n,e[2],718787259,15),n=h(n,i,o,r,e[9],3951481745,21),this._a=this._a+r|0,this._b=this._b+n|0,this._c=this._c+i|0,this._d=this._d+o|0},a.prototype._digest=function(){this._block[this._blockOffset++]=128,this._blockOffset>56&&(this._block.fill(0,this._blockOffset,64),this._update(),this._blockOffset=0),this._block.fill(0,this._blockOffset,56),this._block.writeUInt32LE(this._length[0],56),this._block.writeUInt32LE(this._length[1],60),this._update();var e=o.allocUnsafe(16);return e.writeInt32LE(this._a,0),e.writeInt32LE(this._b,4),e.writeInt32LE(this._c,8),e.writeInt32LE(this._d,12),e},e.exports=a},88310:(e,t,r)=>{e.exports=i;var n=r(37007).EventEmitter;function i(){n.call(this)}r(56698)(i,n),i.Readable=r(45412),i.Writable=r(16708),i.Duplex=r(25382),i.Transform=r(74610),i.PassThrough=r(63600),i.finished=r(86238),i.pipeline=r(57758),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",a),r.on("close",u));var s=!1;function a(){s||(s=!0,e.end())}function u(){s||(s=!0,"function"==typeof e.destroy&&e.destroy())}function c(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",a),r.removeListener("close",u),r.removeListener("error",c),e.removeListener("error",c),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",c),e.on("error",c),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},88393:(e,t,r)=>{var n=r(48287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},88589:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.count=void 0;var n=r(92070);t.count=function(e){return n.reduce((function(t,r,n){return!e||e(r,n)?t+1:t}),0)}},88616:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s};Object.defineProperty(t,"__esModule",{value:!0}),t.fromEvent=void 0;var i=r(19724),o=r(48051),s=r(67478),a=r(94975),u=r(10281),c=r(13916),l=["addListener","removeListener"],f=["addEventListener","removeEventListener"],h=["on","off"];function d(e,t){return function(r){return function(n){return e[r](t,n)}}}t.fromEvent=function e(t,r,p,g){if(u.isFunction(p)&&(g=p,p=void 0),g)return e(t,r,p).pipe(c.mapOneOrManyArgs(g));var b=n(function(e){return u.isFunction(e.addEventListener)&&u.isFunction(e.removeEventListener)}(t)?f.map((function(e){return function(n){return t[e](r,n,p)}})):function(e){return u.isFunction(e.addListener)&&u.isFunction(e.removeListener)}(t)?l.map(d(t,r)):function(e){return u.isFunction(e.on)&&u.isFunction(e.off)}(t)?h.map(d(t,r)):[],2),y=b[0],m=b[1];if(!y&&a.isArrayLike(t))return s.mergeMap((function(t){return e(t,r,p)}))(i.innerFrom(t));if(!y)throw new TypeError("Invalid event target");return new o.Observable((function(e){var t=function(){for(var t=[],r=0;r<arguments.length;r++)t[r]=arguments[r];return e.next(1<t.length?t:t[0])};return y(t),function(){return m(t)}}))}},88877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.audit=void 0;var n=r(65212),i=r(19724),o=r(17214);t.audit=function(e){return n.operate((function(t,r){var n=!1,s=null,a=null,u=!1,c=function(){if(null==a||a.unsubscribe(),a=null,n){n=!1;var e=s;s=null,r.next(e)}u&&r.complete()},l=function(){a=null,u&&r.complete()};t.subscribe(o.createOperatorSubscriber(r,(function(t){n=!0,s=t,a||i.innerFrom(e(t)).subscribe(a=o.createOperatorSubscriber(r,c,l))}),(function(){u=!0,(!n||!a||a.closed)&&r.complete()})))}))}},89220:(e,t,r)=>{var n=r(56698);function i(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function o(e,t){this.path=e,this.rethrow(t)}t.a=i,i.prototype.isError=function(e){return e instanceof o},i.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},i.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},i.prototype.enterKey=function(e){return this._reporterState.path.push(e)},i.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},i.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},i.prototype.path=function(){return this._reporterState.path.join("/")},i.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},i.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},i.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof o;if(t=n?e:new o(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},i.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(o,Error),o.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,o),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},89244:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.combineAll=void 0;var n=r(67933);t.combineAll=n.combineLatestAll},89414:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBytes32String=t.encodeBytes32String=void 0;const n=r(75347);t.encodeBytes32String=function(e){const t=(0,n.toUtf8Bytes)(e);if(t.length>31)throw new Error("bytes32 string must be less than 32 bytes");return(0,n.zeroPadBytes)(t,32)},t.decodeBytes32String=function(e){const t=(0,n.getBytes)(e,"bytes");if(32!==t.length)throw new Error("invalid bytes32 - not 32 bytes long");if(0!==t[31])throw new Error("invalid bytes32 string - no null terminator");let r=31;for(;0===t[r-1];)r--;return(0,n.toUtf8String)(t.slice(0,r))}},89440:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateBasic=t.wNAF=void 0;const n=r(15717),i=r(4718),o=BigInt(0),s=BigInt(1);t.wNAF=function(e,t){const r=(e,t)=>{const r=t.negate();return e?r:t},n=e=>({windows:Math.ceil(t/e)+1,windowSize:2**(e-1)});return{constTimeNegate:r,unsafeLadder(t,r){let n=e.ZERO,i=t;for(;r>o;)r&s&&(n=n.add(i)),i=i.double(),r>>=s;return n},precomputeWindow(e,t){const{windows:r,windowSize:i}=n(t),o=[];let s=e,a=s;for(let e=0;e<r;e++){a=s,o.push(a);for(let e=1;e<i;e++)a=a.add(s),o.push(a);s=a.double()}return o},wNAF(t,i,o){const{windows:a,windowSize:u}=n(t);let c=e.ZERO,l=e.BASE;const f=BigInt(2**t-1),h=2**t,d=BigInt(t);for(let e=0;e<a;e++){const t=e*u;let n=Number(o&f);o>>=d,n>u&&(n-=h,o+=s);const a=t,p=t+Math.abs(n)-1,g=e%2!=0,b=n<0;0===n?l=l.add(r(g,i[a])):c=c.add(r(b,i[p]))}return{p:c,f:l}},wNAFCached(e,t,r,n){const i=e._WINDOW_SIZE||1;let o=t.get(e);return o||(o=this.precomputeWindow(e,i),1!==i&&t.set(e,n(o))),this.wNAF(i,o,r)}}},t.validateBasic=function(e){return(0,n.validateField)(e.Fp),(0,i.validateObject)(e,{n:"bigint",h:"bigint",Gx:"field",Gy:"field"},{nBitLength:"isSafeInteger",nByteLength:"isSafeInteger"}),Object.freeze({...(0,n.nLength)(e.n,e.nBitLength),...e,p:e.Fp.ORDER})}},89610:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decodeBits=void 0,t.decodeBits=function(e,t){const r=(1<<e)-1,n=[];let i=0,o=0,s=0;for(let a=0;a<t.length;a++)for(i=i<<6|")!@#$%^&*(ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".indexOf(t[a]),o+=6;o>=e;){const t=i>>o-e;i&=(1<<o-e)-1,o-=e,0===t?s+=r:(n.push(t+s),s=0)}return n}},89795:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.raceInit=t.race=void 0;var n=r(48051),i=r(19724),o=r(7652),s=r(17214);function a(e){return function(t){for(var r=[],n=function(n){r.push(i.innerFrom(e[n]).subscribe(s.createOperatorSubscriber(t,(function(e){if(r){for(var i=0;i<r.length;i++)i!==n&&r[i].unsubscribe();r=null}t.next(e)}))))},o=0;r&&!t.closed&&o<e.length;o++)n(o)}}t.race=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return 1===(e=o.argsOrArgArray(e)).length?i.innerFrom(e[0]):new n.Observable(a(e))},t.raceInit=a},89940:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},89973:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.showThrottleMessage=void 0;const r=new Set;t.showThrottleMessage=function(e){r.has(e)||(r.add(e),console.log("========= NOTICE ========="),console.log(`Request-Rate Exceeded for ${e} (this message will not be repeated)`),console.log(""),console.log("The default API keys for each service are provided as a highly-throttled,"),console.log("community resource for low-traffic projects and early prototyping."),console.log(""),console.log("While your application will continue to function, we highly recommended"),console.log("signing up for your own API keys to improve performance, increase your"),console.log("request rate/limit and enable other perks, such as metrics and advanced APIs."),console.log(""),console.log("For more details: https://docs.ethers.org/api-keys/"),console.log("=========================="))}},89990:(e,t,r)=>{"use strict";r.r(t),r.d(t,{__addDisposableResource:()=>R,__assign:()=>o,__asyncDelegator:()=>P,__asyncGenerator:()=>S,__asyncValues:()=>k,__await:()=>_,__awaiter:()=>p,__classPrivateFieldGet:()=>T,__classPrivateFieldIn:()=>C,__classPrivateFieldSet:()=>I,__createBinding:()=>b,__decorate:()=>a,__disposeResources:()=>j,__esDecorate:()=>c,__exportStar:()=>y,__extends:()=>i,__generator:()=>g,__importDefault:()=>B,__importStar:()=>M,__makeTemplateObject:()=>O,__metadata:()=>d,__param:()=>u,__propKey:()=>f,__read:()=>v,__rest:()=>s,__runInitializers:()=>l,__setFunctionName:()=>h,__spread:()=>w,__spreadArray:()=>A,__spreadArrays:()=>E,__values:()=>m,default:()=>U});var n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)};function i(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)}var o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var i in t=arguments[r])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},o.apply(this,arguments)};function s(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}function a(e,t,r,n){var i,o=arguments.length,s=o<3?t:null===n?n=Object.getOwnPropertyDescriptor(t,r):n;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)s=Reflect.decorate(e,t,r,n);else for(var a=e.length-1;a>=0;a--)(i=e[a])&&(s=(o<3?i(s):o>3?i(t,r,s):i(t,r))||s);return o>3&&s&&Object.defineProperty(t,r,s),s}function u(e,t){return function(r,n){t(r,n,e)}}function c(e,t,r,n,i,o){function s(e){if(void 0!==e&&"function"!=typeof e)throw new TypeError("Function expected");return e}for(var a,u=n.kind,c="getter"===u?"get":"setter"===u?"set":"value",l=!t&&e?n.static?e:e.prototype:null,f=t||(l?Object.getOwnPropertyDescriptor(l,n.name):{}),h=!1,d=r.length-1;d>=0;d--){var p={};for(var g in n)p[g]="access"===g?{}:n[g];for(var g in n.access)p.access[g]=n.access[g];p.addInitializer=function(e){if(h)throw new TypeError("Cannot add initializers after decoration has completed");o.push(s(e||null))};var b=(0,r[d])("accessor"===u?{get:f.get,set:f.set}:f[c],p);if("accessor"===u){if(void 0===b)continue;if(null===b||"object"!=typeof b)throw new TypeError("Object expected");(a=s(b.get))&&(f.get=a),(a=s(b.set))&&(f.set=a),(a=s(b.init))&&i.unshift(a)}else(a=s(b))&&("field"===u?i.unshift(a):f[c]=a)}l&&Object.defineProperty(l,n.name,f),h=!0}function l(e,t,r){for(var n=arguments.length>2,i=0;i<t.length;i++)r=n?t[i].call(e,r):t[i].call(e);return n?r:void 0}function f(e){return"symbol"==typeof e?e:"".concat(e)}function h(e,t,r){return"symbol"==typeof t&&(t=t.description?"[".concat(t.description,"]"):""),Object.defineProperty(e,"name",{configurable:!0,value:r?"".concat(r," ",t):t})}function d(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}function p(e,t,r,n){return new(r||(r=Promise))((function(i,o){function s(e){try{u(n.next(e))}catch(e){o(e)}}function a(e){try{u(n.throw(e))}catch(e){o(e)}}function u(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(s,a)}u((n=n.apply(e,t||[])).next())}))}function g(e,t){var r,n,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},s=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return s.next=a(0),s.throw=a(1),s.return=a(2),"function"==typeof Symbol&&(s[Symbol.iterator]=function(){return this}),s;function a(a){return function(u){return function(a){if(r)throw new TypeError("Generator is already executing.");for(;s&&(s=0,a[0]&&(o=0)),o;)try{if(r=1,n&&(i=2&a[0]?n.return:a[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,a[1])).done)return i;switch(n=0,i&&(a=[2&a[0],i.value]),a[0]){case 0:case 1:i=a;break;case 4:return o.label++,{value:a[1],done:!1};case 5:o.label++,n=a[1],a=[0];continue;case 7:a=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==a[0]&&2!==a[0])){o=0;continue}if(3===a[0]&&(!i||a[1]>i[0]&&a[1]<i[3])){o.label=a[1];break}if(6===a[0]&&o.label<i[1]){o.label=i[1],i=a;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(a);break}i[2]&&o.ops.pop(),o.trys.pop();continue}a=t.call(e,o)}catch(e){a=[6,e],n=0}finally{r=i=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,u])}}}var b=Object.create?function(e,t,r,n){void 0===n&&(n=r);var i=Object.getOwnPropertyDescriptor(t,r);i&&!("get"in i?!t.__esModule:i.writable||i.configurable)||(i={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,i)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]};function y(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||b(t,e,r)}function m(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function v(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s}function w(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(v(arguments[t]));return e}function E(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;var n=Array(e),i=0;for(t=0;t<r;t++)for(var o=arguments[t],s=0,a=o.length;s<a;s++,i++)n[i]=o[s];return n}function A(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i<o;i++)!n&&i in t||(n||(n=Array.prototype.slice.call(t,0,i)),n[i]=t[i]);return e.concat(n||Array.prototype.slice.call(t))}function _(e){return this instanceof _?(this.v=e,this):new _(e)}function S(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,i=r.apply(e,t||[]),o=[];return n=Object.create(("function"==typeof AsyncIterator?AsyncIterator:Object).prototype),s("next"),s("throw"),s("return",(function(e){return function(t){return Promise.resolve(t).then(e,c)}})),n[Symbol.asyncIterator]=function(){return this},n;function s(e,t){i[e]&&(n[e]=function(t){return new Promise((function(r,n){o.push([e,t,r,n])>1||a(e,t)}))},t&&(n[e]=t(n[e])))}function a(e,t){try{(r=i[e](t)).value instanceof _?Promise.resolve(r.value.v).then(u,c):l(o[0][2],r)}catch(e){l(o[0][3],e)}var r}function u(e){a("next",e)}function c(e){a("throw",e)}function l(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function P(e){var t,r;return t={},n("next"),n("throw",(function(e){throw e})),n("return"),t[Symbol.iterator]=function(){return this},t;function n(n,i){t[n]=e[n]?function(t){return(r=!r)?{value:_(e[n](t)),done:!1}:i?i(t):t}:i}}function k(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,r=e[Symbol.asyncIterator];return r?r.call(e):(e=m(e),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(r){t[r]=e[r]&&function(t){return new Promise((function(n,i){!function(e,t,r,n){Promise.resolve(n).then((function(t){e({value:t,done:r})}),t)}(n,i,(t=e[r](t)).done,t.value)}))}}}function O(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}var x=Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t};function M(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&b(t,e,r);return x(t,e),t}function B(e){return e&&e.__esModule?e:{default:e}}function T(e,t,r,n){if("a"===r&&!n)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===r?n:"a"===r?n.call(e):n?n.value:t.get(e)}function I(e,t,r,n,i){if("m"===n)throw new TypeError("Private method is not writable");if("a"===n&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===n?i.call(e,r):i?i.value=r:t.set(e,r),r}function C(e,t){if(null===t||"object"!=typeof t&&"function"!=typeof t)throw new TypeError("Cannot use 'in' operator on non-object");return"function"==typeof e?t===e:e.has(t)}function R(e,t,r){if(null!=t){if("object"!=typeof t&&"function"!=typeof t)throw new TypeError("Object expected.");var n,i;if(r){if(!Symbol.asyncDispose)throw new TypeError("Symbol.asyncDispose is not defined.");n=t[Symbol.asyncDispose]}if(void 0===n){if(!Symbol.dispose)throw new TypeError("Symbol.dispose is not defined.");n=t[Symbol.dispose],r&&(i=n)}if("function"!=typeof n)throw new TypeError("Object not disposable.");i&&(n=function(){try{i.call(this)}catch(e){return Promise.reject(e)}}),e.stack.push({value:t,dispose:n,async:r})}else r&&e.stack.push({async:!0});return t}var N="function"==typeof SuppressedError?SuppressedError:function(e,t,r){var n=new Error(r);return n.name="SuppressedError",n.error=e,n.suppressed=t,n};function j(e){function t(t){e.error=e.hasError?new N(t,e.error,"An error was suppressed during disposal."):t,e.hasError=!0}var r,n=0;return function i(){for(;r=e.stack.pop();)try{if(!r.async&&1===n)return n=0,e.stack.push(r),Promise.resolve().then(i);if(r.dispose){var o=r.dispose.call(r.value);if(r.async)return n|=2,Promise.resolve(o).then(i,(function(e){return t(e),i()}))}else n|=1}catch(e){t(e)}if(1===n)return e.hasError?Promise.reject(e.error):Promise.resolve();if(e.hasError)throw e.error}()}const U={__extends:i,__assign:o,__rest:s,__decorate:a,__param:u,__metadata:d,__awaiter:p,__generator:g,__createBinding:b,__exportStar:y,__values:m,__read:v,__spread:w,__spreadArrays:E,__spreadArray:A,__await:_,__asyncGenerator:S,__asyncDelegator:P,__asyncValues:k,__makeTemplateObject:O,__importStar:M,__importDefault:B,__classPrivateFieldGet:T,__classPrivateFieldSet:I,__classPrivateFieldIn:C,__addDisposableResource:R,__disposeResources:j}},90037:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.windowTime=void 0;var n=r(76808),i=r(62326),o=r(69879),s=r(65212),a=r(17214),u=r(54830),c=r(26404),l=r(28619);t.windowTime=function(e){for(var t,r,f=[],h=1;h<arguments.length;h++)f[h-1]=arguments[h];var d=null!==(t=c.popScheduler(f))&&void 0!==t?t:i.asyncScheduler,p=null!==(r=f[0])&&void 0!==r?r:null,g=f[1]||1/0;return s.operate((function(t,r){var i=[],s=!1,c=function(e){var t=e.window,r=e.subs;t.complete(),r.unsubscribe(),u.arrRemove(i,e),s&&f()},f=function(){if(i){var t=new o.Subscription;r.add(t);var s=new n.Subject,a={window:s,subs:t,seen:0};i.push(a),r.next(s.asObservable()),l.executeSchedule(t,d,(function(){return c(a)}),e)}};null!==p&&p>=0?l.executeSchedule(r,d,f,p,!0):s=!0,f();var h=function(e){return i.slice().forEach(e)},b=function(e){h((function(t){var r=t.window;return e(r)})),e(r),r.unsubscribe()};return t.subscribe(a.createOperatorSubscriber(r,(function(e){h((function(t){t.window.next(e),g<=++t.seen&&c(t)}))}),(function(){return b((function(e){return e.complete()}))}),(function(e){return b((function(t){return t.error(e)}))}))),function(){i=null}}))}},90220:(e,t,r)=>{"use strict";var n=r(39404),i=r(47011),o=i.assert,s=i.cachedProperty,a=i.parseBytes;function u(e,t){this.eddsa=e,"object"!=typeof t&&(t=a(t)),Array.isArray(t)&&(o(t.length===2*e.encodingLength,"Signature has invalid size"),t={R:t.slice(0,e.encodingLength),S:t.slice(e.encodingLength)}),o(t.R&&t.S,"Signature without R or S"),e.isPoint(t.R)&&(this._R=t.R),t.S instanceof n&&(this._S=t.S),this._Rencoded=Array.isArray(t.R)?t.R:t.Rencoded,this._Sencoded=Array.isArray(t.S)?t.S:t.Sencoded}s(u,"S",(function(){return this.eddsa.decodeInt(this.Sencoded())})),s(u,"R",(function(){return this.eddsa.decodePoint(this.Rencoded())})),s(u,"Rencoded",(function(){return this.eddsa.encodePoint(this.R())})),s(u,"Sencoded",(function(){return this.eddsa.encodeInt(this.S())})),u.prototype.toBytes=function(){return this.Rencoded().concat(this.Sencoded())},u.prototype.toHex=function(){return i.encode(this.toBytes(),"hex").toUpperCase()},e.exports=u},90392:(e,t,r)=>{var n=r(92861).Buffer;function i(e,t){this._block=n.alloc(e),this._finalSize=t,this._blockSize=e,this._len=0}i.prototype.update=function(e,t){"string"==typeof e&&(t=t||"utf8",e=n.from(e,t));for(var r=this._block,i=this._blockSize,o=e.length,s=this._len,a=0;a<o;){for(var u=s%i,c=Math.min(o-a,i-u),l=0;l<c;l++)r[u+l]=e[a+l];a+=c,(s+=c)%i===0&&this._update(r)}return this._len+=o,this},i.prototype.digest=function(e){var t=this._len%this._blockSize;this._block[t]=128,this._block.fill(0,t+1),t>=this._finalSize&&(this._update(this._block),this._block.fill(0));var r=8*this._len;if(r<=4294967295)this._block.writeUInt32BE(r,this._blockSize-4);else{var n=(4294967295&r)>>>0,i=(r-n)/4294967296;this._block.writeUInt32BE(i,this._blockSize-8),this._block.writeUInt32BE(n,this._blockSize-4)}this._update(this._block);var o=this._hash();return e?o.toString(e):o},i.prototype._update=function(){throw new Error("_update must be implemented by subclass")},e.exports=i},90554:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isHash=function(e){return"string"==typeof e&&44===e.length&&"="===e.charAt(43)},t.encrypt=async function(e,t){if(!n.SEA||!n.SEA.encrypt)throw new Error("SEA is not available");return n.SEA.encrypt(e,t)},t.decrypt=async function(e,t){if(!n.SEA||!n.SEA.decrypt)throw new Error("SEA is not available");return n.SEA.decrypt(e,t)},t.encFor=async function(e,t,r){const i=await n.SEA.secret(r.epub,t);return await n.SEA.encrypt(e,i)},t.decFrom=async function(e,t,r){const i=await n.SEA.secret(t.epub,r);return await n.SEA.decrypt(e,i)},t.hashText=i,t.hashObj=async function(e){let t="string"==typeof e?e:JSON.stringify(e);return{hash:await i(t),hashed:t}},t.secret=async function(e,t){return await n.SEA.secret(e,t)},t.getShortHash=async function(e,t){return await n.SEA.work(e,null,null,{name:"PBKDF2",encode:"hex",salt:t})},t.safeHash=function(e){if(e)return e.replace(/[+=/]/g,o)},t.unsafeHash=function(e){if(e)return e.replace(/[._-]/g,s)},t.safeJSONParse=function(e,t={}){if(!e)return t;if("object"==typeof e)return e;try{return JSON.parse(e)}catch(e){return t}},t.randomUUID=function(){throw new Error("Function not implemented.")};const n=r(54827);async function i(e){if(!n.SEA||!n.SEA.work)throw new Error("SEA is not available");return await n.SEA.work(e,null,null,{name:"SHA-256"})}function o(e){switch(e){case"+":return"-";case"=":return".";case"/":return"_"}}function s(e){switch(e){case"-":return"+";case".":return"=";case"_":return"/"}}},90680:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.switchMap=void 0;var n=r(19724),i=r(65212),o=r(17214);t.switchMap=function(e,t){return i.operate((function(r,i){var s=null,a=0,u=!1,c=function(){return u&&!s&&i.complete()};r.subscribe(o.createOperatorSubscriber(i,(function(r){null==s||s.unsubscribe();var u=0,l=a++;n.innerFrom(e(r,l)).subscribe(s=o.createOperatorSubscriber(i,(function(e){return i.next(t?t(r,e,l,u++):e)}),(function(){s=null,c()})))}),(function(){u=!0,c()})))}))}},90735:(e,t,r)=>{var n=r(56698),i=r(70082);function o(e){i.call(this,e),this.enc="pem"}n(o,i),e.exports=o,o.prototype.encode=function(e,t){for(var r=i.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],o=0;o<r.length;o+=64)n.push(r.slice(o,o+64));return n.push("-----END "+t.label+"-----"),n.join("\n")}},90752:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeToCurve=t.hashToCurve=t.schnorr=t.secp256k1=void 0;const n=r(31766),i=r(39732),o=r(15717),s=r(67031),a=r(4718),u=r(4883),c=r(7836),l=BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),f=BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h=BigInt(1),d=BigInt(2),p=(e,t)=>(e+t/d)/t;function g(e){const t=l,r=BigInt(3),n=BigInt(6),i=BigInt(11),s=BigInt(22),a=BigInt(23),u=BigInt(44),c=BigInt(88),f=e*e*e%t,h=f*f*e%t,p=(0,o.pow2)(h,r,t)*h%t,g=(0,o.pow2)(p,r,t)*h%t,y=(0,o.pow2)(g,d,t)*f%t,m=(0,o.pow2)(y,i,t)*y%t,v=(0,o.pow2)(m,s,t)*m%t,w=(0,o.pow2)(v,u,t)*v%t,E=(0,o.pow2)(w,c,t)*w%t,A=(0,o.pow2)(E,u,t)*v%t,_=(0,o.pow2)(A,r,t)*h%t,S=(0,o.pow2)(_,a,t)*m%t,P=(0,o.pow2)(S,n,t)*f%t,k=(0,o.pow2)(P,d,t);if(!b.eql(b.sqr(k),e))throw new Error("Cannot find square root");return k}const b=(0,o.Field)(l,void 0,void 0,{sqrt:g});t.secp256k1=(0,c.createCurve)({a:BigInt(0),b:BigInt(7),Fp:b,n:f,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),h:BigInt(1),lowS:!0,endo:{beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar:e=>{const t=f,r=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),n=-h*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),i=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),s=r,a=BigInt("0x100000000000000000000000000000000"),u=p(s*e,t),c=p(-n*e,t);let l=(0,o.mod)(e-u*r-c*i,t),d=(0,o.mod)(-u*n-c*s,t);const g=l>a,b=d>a;if(g&&(l=t-l),b&&(d=t-d),l>a||d>a)throw new Error("splitScalar: Endomorphism failed, k="+e);return{k1neg:g,k1:l,k2neg:b,k2:d}}}},n.sha256);const y=BigInt(0),m=e=>"bigint"==typeof e&&y<e&&e<l,v={};function w(e,...t){let r=v[e];if(void 0===r){const t=(0,n.sha256)(Uint8Array.from(e,(e=>e.charCodeAt(0))));r=(0,a.concatBytes)(t,t),v[e]=r}return(0,n.sha256)((0,a.concatBytes)(r,...t))}const E=e=>e.toRawBytes(!0).slice(1),A=e=>(0,a.numberToBytesBE)(e,32),_=e=>(0,o.mod)(e,l),S=e=>(0,o.mod)(e,f),P=t.secp256k1.ProjectivePoint;function k(e){let r=t.secp256k1.utils.normPrivateKeyToScalar(e),n=P.fromPrivateKey(r);return{scalar:n.hasEvenY()?r:S(-r),bytes:E(n)}}function O(e){if(!m(e))throw new Error("bad x: need 0 < x < p");const t=_(e*e);let r=g(_(t*e+BigInt(7)));r%d!==y&&(r=_(-r));const n=new P(e,r,h);return n.assertValidity(),n}function x(...e){return S((0,a.bytesToNumberBE)(w("BIP0340/challenge",...e)))}function M(e,t,r){const n=(0,a.ensureBytes)("signature",e,64),i=(0,a.ensureBytes)("message",t),o=(0,a.ensureBytes)("publicKey",r,32);try{const e=O((0,a.bytesToNumberBE)(o)),t=(0,a.bytesToNumberBE)(n.subarray(0,32));if(!m(t))return!1;const r=(0,a.bytesToNumberBE)(n.subarray(32,64));if(!("bigint"==typeof(l=r)&&y<l&&l<f))return!1;const h=x(A(t),E(e),i),d=(s=e,u=r,c=S(-h),P.BASE.multiplyAndAddUnsafe(s,u,c));return!(!d||!d.hasEvenY()||d.toAffine().x!==t)}catch(e){return!1}var s,u,c,l}t.schnorr={getPublicKey:function(e){return k(e).bytes},sign:function(e,t,r=(0,i.randomBytes)(32)){const n=(0,a.ensureBytes)("message",e),{bytes:o,scalar:s}=k(t),u=(0,a.ensureBytes)("auxRand",r,32),c=A(s^(0,a.bytesToNumberBE)(w("BIP0340/aux",u))),l=w("BIP0340/nonce",c,o,n),f=S((0,a.bytesToNumberBE)(l));if(f===y)throw new Error("sign failed: k is zero");const{bytes:h,scalar:d}=k(f),p=x(h,o,n),g=new Uint8Array(64);if(g.set(h,0),g.set(A(S(d+p*s)),32),!M(g,n,o))throw new Error("sign: Invalid signature produced");return g},verify:M,utils:{randomPrivateKey:t.secp256k1.utils.randomPrivateKey,lift_x:O,pointToBytes:E,numberToBytesBE:a.numberToBytesBE,bytesToNumberBE:a.bytesToNumberBE,taggedHash:w,mod:o.mod}};const B=(()=>(0,u.isogenyMap)(b,[["0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa8c7","0x7d3d4c80bc321d5b9f315cea7fd44c5d595d2fc0bf63b92dfff1044f17c6581","0x534c328d23f234e6e2a413deca25caece4506144037c40314ecbd0b53d9dd262","0x8e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38e38daaaaa88c"],["0xd35771193d94918a9ca34ccbb7b640dd86cd409542f8487d9fe6b745781eb49b","0xedadc6f64383dc1df7c4b2d51b54225406d36b641f5e41bbc52a56612a8c6d14","0x0000000000000000000000000000000000000000000000000000000000000001"],["0x4bda12f684bda12f684bda12f684bda12f684bda12f684bda12f684b8e38e23c","0xc75e0c32d5cb7c0fa9d0a54b12a0a6d5647ab046d686da6fdffc90fc201d71a3","0x29a6194691f91a73715209ef6512e576722830a201be2018a765e85a9ecee931","0x2f684bda12f684bda12f684bda12f684bda12f684bda12f684bda12f38e38d84"],["0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffff93b","0x7a06534bb8bdb49fd5e9e6632722c2989467c1bfc8e8d978dfb425d2685c2573","0x6484aa716545ca2cf3a70c3fa8fe337e0a3d21162f0d6299a7bf8192bfd2a76f","0x0000000000000000000000000000000000000000000000000000000000000001"]].map((e=>e.map((e=>BigInt(e)))))))(),T=(()=>(0,s.mapToCurveSimpleSWU)(b,{A:BigInt("0x3f8731abdd661adca08a5558f0f5d272e953d363cb6f0e5d405447c01a444533"),B:BigInt("1771"),Z:b.create(BigInt("-11"))}))(),I=(()=>(0,u.createHasher)(t.secp256k1.ProjectivePoint,(e=>{const{x:t,y:r}=T(b.create(e[0]));return B(t,r)}),{DST:"secp256k1_XMD:SHA-256_SSWU_RO_",encodeDST:"secp256k1_XMD:SHA-256_SSWU_NU_",p:b.ORDER,m:1,k:128,expand:"xmd",hash:n.sha256}))();t.hashToCurve=I.hashToCurve,t.encodeToCurve=I.encodeToCurve},90993:(e,t,r)=>{var n=r(9673).Reporter,i=r(9673).EncoderBuffer,o=r(9673).DecoderBuffer,s=r(43349),a=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],u=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(a);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;var l=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};l.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;u.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;s(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),s.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(s(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(s(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),a.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return s(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){s(e);var t=this._baseState;return s(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return s(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return s(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return s(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return s(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return s(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,i=r.default,s=!0,a=null;if(null!==r.key&&(a=e.enterKey(r.key)),r.optional){var u=null;if(null!==r.explicit?u=r.explicit:null!==r.implicit?u=r.implicit:null!==r.tag&&(u=r.tag),null!==u||r.any){if(s=this._peekTag(e,u,r.any),e.isError(s))return s}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),s=!0}catch(e){s=!1}e.restore(c)}}if(r.obj&&s&&(n=e.enterObject()),s){if(null!==r.explicit){var l=this._decodeTag(e,r.explicit);if(e.isError(l))return l;e=l}var f=e.offset;if(null===r.use&&null===r.choice){r.any&&(c=e.save());var h=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(h))return h;r.any?i=e.raw(c):e=h}if(t&&t.track&&null!==r.tag&&t.track(e.path(),f,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(i=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(i))return i;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var d=new o(i);i=this._getUse(r.contains,e._reporterState.obj)._decode(d,t)}}return r.obj&&s&&(i=e.leaveObject(n)),null===r.key||null===i&&!0!==s?null!==a&&e.exitKey(a):e.leaveKey(a,r.key,i),i},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),s(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,i=!1;return Object.keys(r.choice).some((function(o){var s=e.save(),a=r.choice[o];try{var u=a._decode(e,t);if(e.isError(u))return!1;n={type:o,value:u},i=!0}catch(t){return e.restore(s),!1}return!0}),this),i?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new i(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var i=this._encodeValue(e,t,r);if(void 0!==i&&!this._skipDefault(i,t,r))return i}},c.prototype._encodeValue=function(e,t,r){var i=this._baseState;if(null===i.parent)return i.children[0]._encode(e,t||new n);var o=null;if(this.reporter=t,i.optional&&void 0===e){if(null===i.default)return;e=i.default}var s=null,a=!1;if(i.any)o=this._createEncoderBuffer(e);else if(i.choice)o=this._encodeChoice(e,t);else if(i.contains)s=this._getUse(i.contains,r)._encode(e,t),a=!0;else if(i.children)s=i.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var i=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),i}),this).filter((function(e){return e})),s=this._createEncoderBuffer(s);else if("seqof"===i.tag||"setof"===i.tag){if(!i.args||1!==i.args.length)return t.error("Too many args for : "+i.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var u=this.clone();u._baseState.implicit=null,s=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),u))}else null!==i.use?o=this._getUse(i.use,r)._encode(e,t):(s=this._encodePrimitive(i.tag,e),a=!0);if(!i.any&&null===i.choice){var c=null!==i.implicit?i.implicit:i.tag,l=null===i.implicit?"universal":"context";null===c?null===i.use&&t.error("Tag could be omitted only for .use()"):null===i.use&&(o=this._encodeComposite(c,a,l,s))}return null!==i.explicit&&(o=this._encodeComposite(i.explicit,!1,"context",o)),o},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||s(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},91386:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function i(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function o(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){i(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=i,t.hash=o,t.exists=s,t.output=a;const u={number:r,bool:n,bytes:i,hash:o,exists:s,output:a};t.default=u},91565:(e,t,r)=>{"use strict";t.randomBytes=t.rng=t.pseudoRandomBytes=t.prng=r(53209),t.createHash=t.Hash=r(47108),t.createHmac=t.Hmac=r(83507);var n=r(55715),i=Object.keys(n),o=["sha1","sha224","sha256","sha384","sha512","md5","rmd160"].concat(i);t.getHashes=function(){return o};var s=r(78396);t.pbkdf2=s.pbkdf2,t.pbkdf2Sync=s.pbkdf2Sync;var a=r(30125);t.Cipher=a.Cipher,t.createCipher=a.createCipher,t.Cipheriv=a.Cipheriv,t.createCipheriv=a.createCipheriv,t.Decipher=a.Decipher,t.createDecipher=a.createDecipher,t.Decipheriv=a.Decipheriv,t.createDecipheriv=a.createDecipheriv,t.getCiphers=a.getCiphers,t.listCiphers=a.listCiphers;var u=r(15380);t.DiffieHellmanGroup=u.DiffieHellmanGroup,t.createDiffieHellmanGroup=u.createDiffieHellmanGroup,t.getDiffieHellman=u.getDiffieHellman,t.createDiffieHellman=u.createDiffieHellman,t.DiffieHellman=u.DiffieHellman;var c=r(20);t.createSign=c.createSign,t.Sign=c.Sign,t.createVerify=c.createVerify,t.Verify=c.Verify,t.createECDH=r(61324);var l=r(97168);t.publicEncrypt=l.publicEncrypt,t.privateEncrypt=l.privateEncrypt,t.publicDecrypt=l.publicDecrypt,t.privateDecrypt=l.privateDecrypt;var f=r(76983);t.randomFill=f.randomFill,t.randomFillSync=f.randomFillSync,t.createCredentials=function(){throw new Error("sorry, createCredentials is not implemented yet\nwe accept pull requests\nhttps://github.com/browserify/crypto-browserify")},t.constants={DH_CHECK_P_NOT_SAFE_PRIME:2,DH_CHECK_P_NOT_PRIME:1,DH_UNABLE_TO_CHECK_GENERATOR:4,DH_NOT_SUITABLE_GENERATOR:8,NPN_ENABLED:1,ALPN_ENABLED:1,RSA_PKCS1_PADDING:1,RSA_SSLV23_PADDING:2,RSA_NO_PADDING:3,RSA_PKCS1_OAEP_PADDING:4,RSA_X931_PADDING:5,RSA_PKCS1_PSS_PADDING:6,POINT_CONVERSION_COMPRESSED:2,POINT_CONVERSION_UNCOMPRESSED:4,POINT_CONVERSION_HYBRID:6}},91705:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DER=t.DERErr=void 0,t._legacyHelperEquat=p,t._legacyHelperNormPriv=g,t.weierstrassN=b,t.weierstrassPoints=function(e){const{CURVE:t,curveOpts:r}=v(e);return function(e,t){const{Fp:r,Fn:n}=t;const o=p(r,e.a,e.b),s=g(n,e.allowedPrivateKeyLengths,e.wrapPrivateKey);return Object.assign({},{CURVE:e,Point:t,ProjectivePoint:t,normPrivateKeyToScalar:s,weierstrassEquation:o,isWithinCurveOrder:function(e){return(0,i.inRange)(e,l,n.ORDER)}})}(e,b(t,r))},t.ecdsa=m,t.weierstrass=function(e){const{CURVE:t,curveOpts:r,ecdsaOpts:n}=function(e){const{CURVE:t,curveOpts:r}=v(e);return{CURVE:t,curveOpts:r,ecdsaOpts:{hash:e.hash,hmac:e.hmac,randomBytes:e.randomBytes,lowS:e.lowS,bits2int:e.bits2int,bits2int_modN:e.bits2int_modN}}}(e);return function(e,t){return Object.assign({},t,{ProjectivePoint:t.Point,CURVE:e})}(e,m(b(t,r),n,r))},t.SWUFpSqrtRatio=w,t.mapToCurveSimpleSWU=function(e,t){(0,s.validateField)(e);const{A:r,B:n,Z:i}=t;if(!e.isValid(r)||!e.isValid(n)||!e.isValid(i))throw new Error("mapToCurveSimpleSWU: invalid opts");const o=w(e,i);if(!e.isOdd)throw new Error("Field does not have .isOdd()");return t=>{let a,u,c,l,f,h,d,p;a=e.sqr(t),a=e.mul(a,i),u=e.sqr(a),u=e.add(u,a),c=e.add(u,e.ONE),c=e.mul(c,n),l=e.cmov(i,e.neg(u),!e.eql(u,e.ZERO)),l=e.mul(l,r),u=e.sqr(c),h=e.sqr(l),f=e.mul(h,r),u=e.add(u,f),u=e.mul(u,c),h=e.mul(h,l),f=e.mul(h,n),u=e.add(u,f),d=e.mul(a,c);const{isValid:g,value:b}=o(u,h);p=e.mul(a,t),p=e.mul(p,b),d=e.cmov(d,c,g),p=e.cmov(p,b,g);const y=e.isOdd(t)===e.isOdd(p);p=e.cmov(e.neg(p),p,y);const m=(0,s.FpInvertBatch)(e,[l],!0)[0];return d=e.mul(d,m),{x:d,y:p}}};const n=r(39615),i=r(58627),o=r(62422),s=r(24967);function a(e){void 0!==e.lowS&&(0,i.abool)("lowS",e.lowS),void 0!==e.prehash&&(0,i.abool)("prehash",e.prehash)}class u extends Error{constructor(e=""){super(e)}}t.DERErr=u,t.DER={Err:u,_tlv:{encode:(e,r)=>{const{Err:n}=t.DER;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(1&r.length)throw new n("tlv.encode: unpadded data");const o=r.length/2,s=(0,i.numberToHexUnpadded)(o);if(s.length/2&128)throw new n("tlv.encode: long form length too big");const a=o>127?(0,i.numberToHexUnpadded)(s.length/2|128):"";return(0,i.numberToHexUnpadded)(e)+a+s+r},decode(e,r){const{Err:n}=t.DER;let i=0;if(e<0||e>256)throw new n("tlv.encode: wrong tag");if(r.length<2||r[i++]!==e)throw new n("tlv.decode: wrong tlv");const o=r[i++];let s=0;if(128&o){const e=127&o;if(!e)throw new n("tlv.decode(long): indefinite length not supported");if(e>4)throw new n("tlv.decode(long): byte length is too big");const t=r.subarray(i,i+e);if(t.length!==e)throw new n("tlv.decode: length bytes not complete");if(0===t[0])throw new n("tlv.decode(long): zero leftmost byte");for(const e of t)s=s<<8|e;if(i+=e,s<128)throw new n("tlv.decode(long): not minimal encoding")}else s=o;const a=r.subarray(i,i+s);if(a.length!==s)throw new n("tlv.decode: wrong value length");return{v:a,l:r.subarray(i+s)}}},_int:{encode(e){const{Err:r}=t.DER;if(e<c)throw new r("integer: negative integers are not allowed");let n=(0,i.numberToHexUnpadded)(e);if(8&Number.parseInt(n[0],16)&&(n="00"+n),1&n.length)throw new r("unexpected DER parsing assertion: unpadded hex");return n},decode(e){const{Err:r}=t.DER;if(128&e[0])throw new r("invalid signature integer: negative");if(0===e[0]&&!(128&e[1]))throw new r("invalid signature integer: unnecessary leading zero");return(0,i.bytesToNumberBE)(e)}},toSig(e){const{Err:r,_int:n,_tlv:o}=t.DER,s=(0,i.ensureBytes)("signature",e),{v:a,l:u}=o.decode(48,s);if(u.length)throw new r("invalid signature: left bytes after parsing");const{v:c,l}=o.decode(2,a),{v:f,l:h}=o.decode(2,l);if(h.length)throw new r("invalid signature: left bytes after parsing");return{r:n.decode(c),s:n.decode(f)}},hexFromSig(e){const{_tlv:r,_int:n}=t.DER,i=r.encode(2,n.encode(e.r))+r.encode(2,n.encode(e.s));return r.encode(48,i)}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e,t,r){return function(n){const i=e.sqr(n),o=e.mul(i,n);return e.add(e.add(o,e.mul(n,t)),r)}}function g(e,t,r){const{BYTES:n}=e;return function(o){let s;if("bigint"==typeof o)s=o;else{let r=(0,i.ensureBytes)("private key",o);if(t){if(!t.includes(2*r.length))throw new Error("invalid private key");const e=new Uint8Array(n);e.set(r,e.length-r.length),r=e}try{s=e.fromBytes(r)}catch(e){throw new Error(`invalid private key: expected ui8a of size ${n}, got ${typeof o}`)}}if(r&&(s=e.create(s)),!e.isValidNot0(s))throw new Error("invalid private key: out of range [1..N-1]");return s}}function b(e,t={}){const{Fp:r,Fn:n}=(0,o._createCurveFields)("weierstrass",e,t),{h:s,n:a}=e;(0,i._validateObject)(t,{},{allowInfinityPoint:"boolean",clearCofactor:"function",isTorsionFree:"function",fromBytes:"function",toBytes:"function",endo:"object",wrapPrivateKey:"boolean"});const{endo:u}=t;if(u&&(!r.is0(e.a)||"bigint"!=typeof u.beta||"function"!=typeof u.splitScalar))throw new Error('invalid endo: expected "beta": bigint and "splitScalar": function');function f(){if(!r.isOdd)throw new Error("compression is not supported: Field does not have .isOdd()")}const b=t.toBytes||function(e,t,n){const{x:o,y:s}=t.toAffine(),a=r.toBytes(o);if((0,i.abool)("isCompressed",n),n){f();const e=!r.isOdd(s);return(0,i.concatBytes)(y(e),a)}return(0,i.concatBytes)(Uint8Array.of(4),a,r.toBytes(s))},m=t.fromBytes||function(e){(0,i.abytes)(e);const t=r.BYTES,n=t+1,o=2*t+1,s=e.length,a=e[0],u=e.subarray(1);if(s!==n||2!==a&&3!==a){if(s===o&&4===a){const e=r.fromBytes(u.subarray(0*t,1*t)),n=r.fromBytes(u.subarray(1*t,2*t));if(!w(e,n))throw new Error("bad point: is not on curve");return{x:e,y:n}}throw new Error(`bad point: got length ${s}, expected compressed=${n} or uncompressed=${o}`)}{const e=r.fromBytes(u);if(!r.isValid(e))throw new Error("bad point: is not on curve, wrong x");const t=v(e);let n;try{n=r.sqrt(t)}catch(e){const t=e instanceof Error?": "+e.message:"";throw new Error("bad point: is not on curve, sqrt error"+t)}return f(),!(1&~a)!==r.isOdd(n)&&(n=r.neg(n)),{x:e,y:n}}},v=p(r,e.a,e.b);function w(e,t){const n=r.sqr(t),i=v(e);return r.eql(n,i)}if(!w(e.Gx,e.Gy))throw new Error("bad curve params: generator point");const E=r.mul(r.pow(e.a,h),d),A=r.mul(r.sqr(e.b),BigInt(27));if(r.is0(r.add(E,A)))throw new Error("bad curve params: a or b");function _(e,t,n=!1){if(!r.isValid(t)||n&&r.is0(t))throw new Error(`bad point coordinate ${e}`);return t}function S(e){if(!(e instanceof x))throw new Error("ProjectivePoint expected")}const P=(0,i.memoized)(((e,t)=>{const{px:n,py:i,pz:o}=e;if(r.eql(o,r.ONE))return{x:n,y:i};const s=e.is0();null==t&&(t=s?r.ONE:r.inv(o));const a=r.mul(n,t),u=r.mul(i,t),c=r.mul(o,t);if(s)return{x:r.ZERO,y:r.ZERO};if(!r.eql(c,r.ONE))throw new Error("invZ was invalid");return{x:a,y:u}})),k=(0,i.memoized)((e=>{if(e.is0()){if(t.allowInfinityPoint&&!r.is0(e.py))return;throw new Error("bad point: ZERO")}const{x:n,y:i}=e.toAffine();if(!r.isValid(n)||!r.isValid(i))throw new Error("bad point: x or y not field elements");if(!w(n,i))throw new Error("bad point: equation left != right");if(!e.isTorsionFree())throw new Error("bad point: not in prime-order subgroup");return!0}));function O(e,t,n,i,s){return n=new x(r.mul(n.px,e),n.py,n.pz),t=(0,o.negateCt)(i,t),n=(0,o.negateCt)(s,n),t.add(n)}class x{constructor(e,t,r){this.px=_("x",e),this.py=_("y",t,!0),this.pz=_("z",r),Object.freeze(this)}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof x)throw new Error("projective point not allowed");return r.is0(t)&&r.is0(n)?x.ZERO:new x(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){return(0,o.normalizeZ)(x,"pz",e)}static fromBytes(e){return(0,i.abytes)(e),x.fromHex(e)}static fromHex(e){const t=x.fromAffine(m((0,i.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){const r=g(n,t.allowedPrivateKeyLengths,t.wrapPrivateKey);return x.BASE.multiply(r(e))}static msm(e,t){return(0,o.pippenger)(x,n,e,t)}precompute(e=8,t=!0){return B.setWindowSize(this,e),t||this.multiply(h),this}_setWindowSize(e){this.precompute(e)}assertValidity(){k(this)}hasEvenY(){const{y:e}=this.toAffine();if(!r.isOdd)throw new Error("Field doesn't support isOdd");return!r.isOdd(e)}equals(e){S(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new x(this.px,r.neg(this.py),this.pz)}double(){const{a:t,b:n}=e,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),u=r.mul(t,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(g,u),l=r.mul(i,l),p=r.mul(t,p),g=r.sub(f,p),g=r.mul(t,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new x(u,c,l)}add(t){S(t);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=t;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const d=e.a,p=r.mul(e.b,h);let g=r.mul(n,s),b=r.mul(i,a),y=r.mul(o,u),m=r.add(n,i),v=r.add(s,a);m=r.mul(m,v),v=r.add(g,b),m=r.sub(m,v),v=r.add(n,o);let w=r.add(s,u);return v=r.mul(v,w),w=r.add(g,y),v=r.sub(v,w),w=r.add(i,o),c=r.add(a,u),w=r.mul(w,c),c=r.add(b,y),w=r.sub(w,c),f=r.mul(d,v),c=r.mul(p,y),f=r.add(c,f),c=r.sub(b,f),f=r.add(b,f),l=r.mul(c,f),b=r.add(g,g),b=r.add(b,g),y=r.mul(d,y),v=r.mul(p,v),b=r.add(b,y),y=r.sub(g,y),y=r.mul(d,y),v=r.add(v,y),g=r.mul(b,v),l=r.add(l,g),g=r.mul(w,v),c=r.mul(m,c),c=r.sub(c,g),g=r.mul(m,b),f=r.mul(w,f),f=r.add(f,g),new x(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(x.ZERO)}multiply(e){const{endo:r}=t;if(!n.isValidNot0(e))throw new Error("invalid scalar: out of range");let i,o;const s=e=>B.wNAFCached(this,e,x.normalizeZ);if(r){const{k1neg:t,k1:n,k2neg:a,k2:u}=r.splitScalar(e),{p:c,f:l}=s(n),{p:f,f:h}=s(u);o=l.add(h),i=O(r.beta,c,f,t,a)}else{const{p:t,f:r}=s(e);i=t,o=r}return x.normalizeZ([i,o])[0]}multiplyUnsafe(e){const{endo:r}=t,i=this;if(!n.isValid(e))throw new Error("invalid scalar: out of range");if(e===c||i.is0())return x.ZERO;if(e===l)return i;if(B.hasPrecomputes(this))return this.multiply(e);if(r){const{k1neg:t,k1:n,k2neg:s,k2:a}=r.splitScalar(e),{p1:u,p2:c}=(0,o.mulEndoUnsafe)(x,i,n,a);return O(r.beta,u,c,t,s)}return B.wNAFCachedUnsafe(i,e)}multiplyAndAddUnsafe(e,t,r){const n=this.multiplyUnsafe(t).add(e.multiplyUnsafe(r));return n.is0()?void 0:n}toAffine(e){return P(this,e)}isTorsionFree(){const{isTorsionFree:e}=t;return s===l||(e?e(x,this):B.wNAFCachedUnsafe(this,a).is0())}clearCofactor(){const{clearCofactor:e}=t;return s===l?this:e?e(x,this):this.multiplyUnsafe(s)}toBytes(e=!0){return(0,i.abool)("isCompressed",e),this.assertValidity(),b(x,this,e)}toRawBytes(e=!0){return this.toBytes(e)}toHex(e=!0){return(0,i.bytesToHex)(this.toBytes(e))}toString(){return`<Point ${this.is0()?"ZERO":this.toHex()}>`}}x.BASE=new x(e.Gx,e.Gy,r.ONE),x.ZERO=new x(r.ZERO,r.ONE,r.ZERO),x.Fp=r,x.Fn=n;const M=n.BITS,B=(0,o.wNAF)(x,t.endo?Math.ceil(M/2):M);return x}function y(e){return Uint8Array.of(e?2:3)}function m(e,r,o={}){(0,i._validateObject)(r,{hash:"function"},{hmac:"function",lowS:"boolean",randomBytes:"function",bits2int:"function",bits2int_modN:"function"});const u=r.randomBytes||i.randomBytes,h=r.hmac||((e,...t)=>(0,n.hmac)(r.hash,e,(0,i.concatBytes)(...t))),{Fp:d,Fn:p}=e,{ORDER:b,BITS:m}=p;function v(e){return e>b>>l}function w(e,t){if(!p.isValidNot0(t))throw new Error(`invalid signature ${e}: out of range 1..CURVE.n`)}class E{constructor(e,t,r){w("r",e),w("s",t),this.r=e,this.s=t,null!=r&&(this.recovery=r),Object.freeze(this)}static fromCompact(e){const t=p.BYTES,r=(0,i.ensureBytes)("compactSignature",e,2*t);return new E(p.fromBytes(r.subarray(0,t)),p.fromBytes(r.subarray(t,2*t)))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,i.ensureBytes)("DER",e));return new E(r,n)}assertValidity(){}addRecoveryBit(e){return new E(this.r,this.s,e)}recoverPublicKey(t){const r=d.ORDER,{r:n,s:o,recovery:s}=this;if(null==s||![0,1,2,3].includes(s))throw new Error("recovery id invalid");if(b*f<r&&s>1)throw new Error("recovery id is ambiguous for h>1 curve");const a=2===s||3===s?n+b:n;if(!d.isValid(a))throw new Error("recovery id 2 or 3 invalid");const u=d.toBytes(a),c=e.fromHex((0,i.concatBytes)(y(!(1&s)),u)),l=p.inv(a),h=k((0,i.ensureBytes)("msgHash",t)),g=p.create(-h*l),m=p.create(o*l),v=e.BASE.multiplyUnsafe(g).add(c.multiplyUnsafe(m));if(v.is0())throw new Error("point at infinify");return v.assertValidity(),v}hasHighS(){return v(this.s)}normalizeS(){return this.hasHighS()?new E(this.r,p.neg(this.s),this.recovery):this}toBytes(e){if("compact"===e)return(0,i.concatBytes)(p.toBytes(this.r),p.toBytes(this.s));if("der"===e)return(0,i.hexToBytes)(t.DER.hexFromSig(this));throw new Error("invalid format")}toDERRawBytes(){return this.toBytes("der")}toDERHex(){return(0,i.bytesToHex)(this.toBytes("der"))}toCompactRawBytes(){return this.toBytes("compact")}toCompactHex(){return(0,i.bytesToHex)(this.toBytes("compact"))}}const A=g(p,o.allowedPrivateKeyLengths,o.wrapPrivateKey),_={isValidPrivateKey(e){try{return A(e),!0}catch(e){return!1}},normPrivateKeyToScalar:A,randomPrivateKey:()=>{const e=b;return(0,s.mapHashToField)(u((0,s.getMinHashLength)(e)),e)},precompute:(t=8,r=e.BASE)=>r.precompute(t,!1)};function S(t){if("bigint"==typeof t)return!1;if(t instanceof e)return!0;const r=(0,i.ensureBytes)("key",t).length,n=d.BYTES,s=n+1,a=2*n+1;return o.allowedPrivateKeyLengths||p.BYTES===s?void 0:r===s||r===a}const P=r.bits2int||function(e){if(e.length>8192)throw new Error("input is too large");const t=(0,i.bytesToNumberBE)(e),r=8*e.length-m;return r>0?t>>BigInt(r):t},k=r.bits2int_modN||function(e){return p.create(P(e))},O=(0,i.bitMask)(m);function x(e){return(0,i.aInRange)("num < 2^"+m,e,c,O),p.toBytes(e)}const M={lowS:r.lowS,prehash:!1},B={lowS:r.lowS,prehash:!1};return e.BASE.precompute(8),Object.freeze({getPublicKey:function(t,r=!0){return e.fromPrivateKey(t).toBytes(r)},getSharedSecret:function(t,r,n=!0){if(!0===S(t))throw new Error("first arg must be private key");if(!1===S(r))throw new Error("second arg must be public key");return e.fromHex(r).multiply(A(t)).toBytes(n)},sign:function(t,n,o=M){const{seed:s,k2sig:f}=function(t,n,o=M){if(["recovered","canonical"].some((e=>e in o)))throw new Error("sign() legacy options not supported");const{hash:s}=r;let{lowS:f,prehash:h,extraEntropy:g}=o;null==f&&(f=!0),t=(0,i.ensureBytes)("msgHash",t),a(o),h&&(t=(0,i.ensureBytes)("prehashed msgHash",s(t)));const b=k(t),y=A(n),m=[x(y),x(b)];if(null!=g&&!1!==g){const e=!0===g?u(d.BYTES):g;m.push((0,i.ensureBytes)("extraEntropy",e))}const w=(0,i.concatBytes)(...m),_=b;return{seed:w,k2sig:function(t){const r=P(t);if(!p.isValidNot0(r))return;const n=p.inv(r),i=e.BASE.multiply(r).toAffine(),o=p.create(i.x);if(o===c)return;const s=p.create(n*p.create(_+o*y));if(s===c)return;let a=(i.x===o?0:2)|Number(i.y&l),u=s;return f&&v(s)&&(u=function(e){return v(e)?p.neg(e):e}(s),a^=1),new E(o,u,a)}}}(t,n,o);return(0,i.createHmacDrbg)(r.hash.outputLen,p.BYTES,h)(s,f)},verify:function(n,o,s,u=B){const c=n;o=(0,i.ensureBytes)("msgHash",o),s=(0,i.ensureBytes)("publicKey",s),a(u);const{lowS:l,prehash:f,format:h}=u;if("strict"in u)throw new Error("options.strict was renamed to lowS");if(void 0!==h&&!["compact","der","js"].includes(h))throw new Error('format must be "compact", "der" or "js"');const d="string"==typeof c||(0,i.isBytes)(c),g=!d&&!h&&"object"==typeof c&&null!==c&&"bigint"==typeof c.r&&"bigint"==typeof c.s;if(!d&&!g)throw new Error("invalid signature, expected Uint8Array, hex string or Signature instance");let b,y;try{if(g){if(void 0!==h&&"js"!==h)throw new Error("invalid format");b=new E(c.r,c.s)}if(d){try{"compact"!==h&&(b=E.fromDER(c))}catch(e){if(!(e instanceof t.DER.Err))throw e}b||"der"===h||(b=E.fromCompact(c))}y=e.fromHex(s)}catch(e){return!1}if(!b)return!1;if(l&&b.hasHighS())return!1;f&&(o=r.hash(o));const{r:m,s:v}=b,w=k(o),A=p.inv(v),_=p.create(w*A),S=p.create(m*A),P=e.BASE.multiplyUnsafe(_).add(y.multiplyUnsafe(S));return!P.is0()&&p.create(P.x)===m},utils:_,Point:e,Signature:E})}function v(e){const t={a:e.a,b:e.b,p:e.Fp.ORDER,n:e.n,h:e.h,Gx:e.Gx,Gy:e.Gy};return{CURVE:t,curveOpts:{Fp:e.Fp,Fn:(0,s.Field)(t.n,e.nBitLength),allowedPrivateKeyLengths:e.allowedPrivateKeyLengths,allowInfinityPoint:e.allowInfinityPoint,endo:e.endo,wrapPrivateKey:e.wrapPrivateKey,isTorsionFree:e.isTorsionFree,clearCofactor:e.clearCofactor,fromBytes:e.fromBytes,toBytes:e.toBytes}}}function w(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,u=(a-l)/f,p=s-l,g=o,b=e.pow(t,a),y=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=b,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,u),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let c=e.mul(s,o);a=e.pow(c,g);let h=e.eql(a,e.ONE);o=e.mul(s,y),a=e.mul(c,n),s=e.cmov(o,s,h),c=e.cmov(a,c,h);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(c,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(c,n),s=e.cmov(o,s,a),c=e.cmov(i,c,a)}return{isValid:h,value:s}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return m}},92052:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.TestTools=t.Immediate=void 0;var r,n=1,i={};function o(e){return e in i&&(delete i[e],!0)}t.Immediate={setImmediate:function(e){var t=n++;return i[t]=!0,r||(r=Promise.resolve()),r.then((function(){return o(t)&&e()})),t},clearImmediate:function(e){o(e)}},t.TestTools={pending:function(){return Object.keys(i).length}}},92070:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reduce=void 0;var n=r(78531),i=r(65212);t.reduce=function(e,t){return i.operate(n.scanInternals(e,t,arguments.length>=2,!1,!0))}},92124:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createHasher=t.isogenyMap=t.hash_to_field=t.expand_message_xof=t.expand_message_xmd=void 0;const n=r(45646),i=r(98421),o=i.bytesToNumberBE;function s(e,t){if(e<0||e>=1<<8*t)throw new Error(`bad I2OSP call: value=${e} length=${t}`);const r=Array.from({length:t}).fill(0);for(let n=t-1;n>=0;n--)r[n]=255&e,e>>>=8;return new Uint8Array(r)}function a(e,t){const r=new Uint8Array(e.length);for(let n=0;n<e.length;n++)r[n]=e[n]^t[n];return r}function u(e){if(!(e instanceof Uint8Array))throw new Error("Uint8Array expected")}function c(e){if(!Number.isSafeInteger(e))throw new Error("number expected")}function l(e,t,r,n){u(e),u(t),c(r),t.length>255&&(t=n((0,i.concatBytes)((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-"),t)));const{outputLen:o,blockLen:l}=n,f=Math.ceil(r/o);if(f>255)throw new Error("Invalid xmd length");const h=(0,i.concatBytes)(t,s(t.length,1)),d=s(0,l),p=s(r,2),g=new Array(f),b=n((0,i.concatBytes)(d,e,p,s(0,1),h));g[0]=n((0,i.concatBytes)(b,s(1,1),h));for(let e=1;e<=f;e++){const t=[a(b,g[e-1]),s(e+1,1),h];g[e]=n((0,i.concatBytes)(...t))}return(0,i.concatBytes)(...g).slice(0,r)}function f(e,t,r,n,o){if(u(e),u(t),c(r),t.length>255){const e=Math.ceil(2*n/8);t=o.create({dkLen:e}).update((0,i.utf8ToBytes)("H2C-OVERSIZE-DST-")).update(t).digest()}if(r>65535||t.length>255)throw new Error("expand_message_xof: invalid lenInBytes");return o.create({dkLen:r}).update(e).update(s(r,2)).update(t).update(s(t.length,1)).digest()}function h(e,t,r){(0,i.validateObject)(r,{DST:"stringOrUint8Array",p:"bigint",m:"isSafeInteger",k:"isSafeInteger",hash:"hash"});const{p:s,k:a,m:h,hash:d,expand:p,DST:g}=r;u(e),c(t);const b=function(e){if(e instanceof Uint8Array)return e;if("string"==typeof e)return(0,i.utf8ToBytes)(e);throw new Error("DST must be Uint8Array or string")}(g),y=s.toString(2).length,m=Math.ceil((y+a)/8),v=t*h*m;let w;if("xmd"===p)w=l(e,b,v,d);else if("xof"===p)w=f(e,b,v,a,d);else{if("_internal_pass"!==p)throw new Error('expand must be "xmd" or "xof"');w=e}const E=new Array(t);for(let e=0;e<t;e++){const t=new Array(h);for(let r=0;r<h;r++){const i=m*(r+e*h),a=w.subarray(i,i+m);t[r]=(0,n.mod)(o(a),s)}E[e]=t}return E}t.expand_message_xmd=l,t.expand_message_xof=f,t.hash_to_field=h,t.isogenyMap=function(e,t){const r=t.map((e=>Array.from(e).reverse()));return(t,n)=>{const[i,o,s,a]=r.map((r=>r.reduce(((r,n)=>e.add(e.mul(r,t),n)))));return t=e.div(i,o),n=e.mul(n,e.div(s,a)),{x:t,y:n}}},t.createHasher=function(e,t,r){if("function"!=typeof t)throw new Error("mapToCurve() must be defined");return{hashToCurve(n,i){const o=h(n,2,{...r,DST:r.DST,...i}),s=e.fromAffine(t(o[0])),a=e.fromAffine(t(o[1])),u=s.add(a).clearCofactor();return u.assertValidity(),u},encodeToCurve(n,i){const o=h(n,1,{...r,DST:r.encodeDST,...i}),s=e.fromAffine(t(o[0])).clearCofactor();return s.assertValidity(),s}}}},92356:(e,t,r)=>{var n=r(50462),i=r(92861).Buffer,o=r(56168),s=r(56698),a=r(25892),u=r(30295),c=r(45122);function l(e,t,r,s){o.call(this);var u=i.alloc(4,0);this._cipher=new n.AES(t);var l=this._cipher.encryptBlock(u);this._ghash=new a(l),r=function(e,t,r){if(12===t.length)return e._finID=i.concat([t,i.from([0,0,0,1])]),i.concat([t,i.from([0,0,0,2])]);var n=new a(r),o=t.length,s=o%16;n.update(t),s&&(s=16-s,n.update(i.alloc(s,0))),n.update(i.alloc(8,0));var u=8*o,l=i.alloc(8);l.writeUIntBE(u,0,8),n.update(l),e._finID=n.state;var f=i.from(e._finID);return c(f),f}(this,r,l),this._prev=i.from(r),this._cache=i.allocUnsafe(0),this._secCache=i.allocUnsafe(0),this._decrypt=s,this._alen=0,this._len=0,this._mode=e,this._authTag=null,this._called=!1}s(l,o),l.prototype._update=function(e){if(!this._called&&this._alen){var t=16-this._alen%16;t<16&&(t=i.alloc(t,0),this._ghash.update(t))}this._called=!0;var r=this._mode.encrypt(this,e);return this._decrypt?this._ghash.update(e):this._ghash.update(r),this._len+=e.length,r},l.prototype._final=function(){if(this._decrypt&&!this._authTag)throw new Error("Unsupported state or unable to authenticate data");var e=u(this._ghash.final(8*this._alen,8*this._len),this._cipher.encryptBlock(this._finID));if(this._decrypt&&function(e,t){var r=0;e.length!==t.length&&r++;for(var n=Math.min(e.length,t.length),i=0;i<n;++i)r+=e[i]^t[i];return r}(e,this._authTag))throw new Error("Unsupported state or unable to authenticate data");this._authTag=e,this._cipher.scrub()},l.prototype.getAuthTag=function(){if(this._decrypt||!i.isBuffer(this._authTag))throw new Error("Attempting to get auth tag in unsupported state");return this._authTag},l.prototype.setAuthTag=function(e){if(!this._decrypt)throw new Error("Attempting to set auth tag in unsupported state");this._authTag=e},l.prototype.setAAD=function(e){if(this._called)throw new Error("Attempting to set AAD in unsupported state");this._ghash.update(e),this._alen+=e.length},e.exports=l},92359:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipLast=void 0;var n=r(87699),i=r(65212),o=r(17214);t.skipLast=function(e){return e<=0?n.identity:i.operate((function(t,r){var n=new Array(e),i=0;return t.subscribe(o.createOperatorSubscriber(r,(function(t){var o=i++;if(o<e)n[o]=t;else{var s=o%e,a=n[s];n[s]=t,r.next(a)}}))),function(){n=null}}))}},92668:()=>{},92794:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mergeAll=t.merge=t.max=t.materialize=t.mapTo=t.map=t.last=t.isEmpty=t.ignoreElements=t.groupBy=t.first=t.findIndex=t.find=t.finalize=t.filter=t.expand=t.exhaustMap=t.exhaustAll=t.exhaust=t.every=t.endWith=t.elementAt=t.distinctUntilKeyChanged=t.distinctUntilChanged=t.distinct=t.dematerialize=t.delayWhen=t.delay=t.defaultIfEmpty=t.debounceTime=t.debounce=t.count=t.connect=t.concatWith=t.concatMapTo=t.concatMap=t.concatAll=t.concat=t.combineLatestWith=t.combineLatest=t.combineLatestAll=t.combineAll=t.catchError=t.bufferWhen=t.bufferToggle=t.bufferTime=t.bufferCount=t.buffer=t.auditTime=t.audit=void 0,t.timeInterval=t.throwIfEmpty=t.throttleTime=t.throttle=t.tap=t.takeWhile=t.takeUntil=t.takeLast=t.take=t.switchScan=t.switchMapTo=t.switchMap=t.switchAll=t.subscribeOn=t.startWith=t.skipWhile=t.skipUntil=t.skipLast=t.skip=t.single=t.shareReplay=t.share=t.sequenceEqual=t.scan=t.sampleTime=t.sample=t.refCount=t.retryWhen=t.retry=t.repeatWhen=t.repeat=t.reduce=t.raceWith=t.race=t.publishReplay=t.publishLast=t.publishBehavior=t.publish=t.pluck=t.partition=t.pairwise=t.onErrorResumeNext=t.observeOn=t.multicast=t.min=t.mergeWith=t.mergeScan=t.mergeMapTo=t.mergeMap=t.flatMap=void 0,t.zipWith=t.zipAll=t.zip=t.withLatestFrom=t.windowWhen=t.windowToggle=t.windowTime=t.windowCount=t.window=t.toArray=t.timestamp=t.timeoutWith=t.timeout=void 0;var n=r(88877);Object.defineProperty(t,"audit",{enumerable:!0,get:function(){return n.audit}});var i=r(51608);Object.defineProperty(t,"auditTime",{enumerable:!0,get:function(){return i.auditTime}});var o=r(10706);Object.defineProperty(t,"buffer",{enumerable:!0,get:function(){return o.buffer}});var s=r(9287);Object.defineProperty(t,"bufferCount",{enumerable:!0,get:function(){return s.bufferCount}});var a=r(41719);Object.defineProperty(t,"bufferTime",{enumerable:!0,get:function(){return a.bufferTime}});var u=r(61778);Object.defineProperty(t,"bufferToggle",{enumerable:!0,get:function(){return u.bufferToggle}});var c=r(56606);Object.defineProperty(t,"bufferWhen",{enumerable:!0,get:function(){return c.bufferWhen}});var l=r(72719);Object.defineProperty(t,"catchError",{enumerable:!0,get:function(){return l.catchError}});var f=r(89244);Object.defineProperty(t,"combineAll",{enumerable:!0,get:function(){return f.combineAll}});var h=r(67933);Object.defineProperty(t,"combineLatestAll",{enumerable:!0,get:function(){return h.combineLatestAll}});var d=r(64948);Object.defineProperty(t,"combineLatest",{enumerable:!0,get:function(){return d.combineLatest}});var p=r(82044);Object.defineProperty(t,"combineLatestWith",{enumerable:!0,get:function(){return p.combineLatestWith}});var g=r(96328);Object.defineProperty(t,"concat",{enumerable:!0,get:function(){return g.concat}});var b=r(70201);Object.defineProperty(t,"concatAll",{enumerable:!0,get:function(){return b.concatAll}});var y=r(29512);Object.defineProperty(t,"concatMap",{enumerable:!0,get:function(){return y.concatMap}});var m=r(19913);Object.defineProperty(t,"concatMapTo",{enumerable:!0,get:function(){return m.concatMapTo}});var v=r(98032);Object.defineProperty(t,"concatWith",{enumerable:!0,get:function(){return v.concatWith}});var w=r(17812);Object.defineProperty(t,"connect",{enumerable:!0,get:function(){return w.connect}});var E=r(88589);Object.defineProperty(t,"count",{enumerable:!0,get:function(){return E.count}});var A=r(3143);Object.defineProperty(t,"debounce",{enumerable:!0,get:function(){return A.debounce}});var _=r(21762);Object.defineProperty(t,"debounceTime",{enumerable:!0,get:function(){return _.debounceTime}});var S=r(58799);Object.defineProperty(t,"defaultIfEmpty",{enumerable:!0,get:function(){return S.defaultIfEmpty}});var P=r(5797);Object.defineProperty(t,"delay",{enumerable:!0,get:function(){return P.delay}});var k=r(72885);Object.defineProperty(t,"delayWhen",{enumerable:!0,get:function(){return k.delayWhen}});var O=r(19818);Object.defineProperty(t,"dematerialize",{enumerable:!0,get:function(){return O.dematerialize}});var x=r(77876);Object.defineProperty(t,"distinct",{enumerable:!0,get:function(){return x.distinct}});var M=r(22044);Object.defineProperty(t,"distinctUntilChanged",{enumerable:!0,get:function(){return M.distinctUntilChanged}});var B=r(76035);Object.defineProperty(t,"distinctUntilKeyChanged",{enumerable:!0,get:function(){return B.distinctUntilKeyChanged}});var T=r(61279);Object.defineProperty(t,"elementAt",{enumerable:!0,get:function(){return T.elementAt}});var I=r(66791);Object.defineProperty(t,"endWith",{enumerable:!0,get:function(){return I.endWith}});var C=r(21361);Object.defineProperty(t,"every",{enumerable:!0,get:function(){return C.every}});var R=r(11464);Object.defineProperty(t,"exhaust",{enumerable:!0,get:function(){return R.exhaust}});var N=r(17977);Object.defineProperty(t,"exhaustAll",{enumerable:!0,get:function(){return N.exhaustAll}});var j=r(86632);Object.defineProperty(t,"exhaustMap",{enumerable:!0,get:function(){return j.exhaustMap}});var U=r(75544);Object.defineProperty(t,"expand",{enumerable:!0,get:function(){return U.expand}});var L=r(85934);Object.defineProperty(t,"filter",{enumerable:!0,get:function(){return L.filter}});var D=r(17802);Object.defineProperty(t,"finalize",{enumerable:!0,get:function(){return D.finalize}});var F=r(98183);Object.defineProperty(t,"find",{enumerable:!0,get:function(){return F.find}});var H=r(29035);Object.defineProperty(t,"findIndex",{enumerable:!0,get:function(){return H.findIndex}});var z=r(19980);Object.defineProperty(t,"first",{enumerable:!0,get:function(){return z.first}});var q=r(5128);Object.defineProperty(t,"groupBy",{enumerable:!0,get:function(){return q.groupBy}});var G=r(2959);Object.defineProperty(t,"ignoreElements",{enumerable:!0,get:function(){return G.ignoreElements}});var W=r(69915);Object.defineProperty(t,"isEmpty",{enumerable:!0,get:function(){return W.isEmpty}});var V=r(32568);Object.defineProperty(t,"last",{enumerable:!0,get:function(){return V.last}});var K=r(26872);Object.defineProperty(t,"map",{enumerable:!0,get:function(){return K.map}});var $=r(13337);Object.defineProperty(t,"mapTo",{enumerable:!0,get:function(){return $.mapTo}});var J=r(75019);Object.defineProperty(t,"materialize",{enumerable:!0,get:function(){return J.materialize}});var Q=r(50096);Object.defineProperty(t,"max",{enumerable:!0,get:function(){return Q.max}});var Z=r(9330);Object.defineProperty(t,"merge",{enumerable:!0,get:function(){return Z.merge}});var Y=r(68087);Object.defineProperty(t,"mergeAll",{enumerable:!0,get:function(){return Y.mergeAll}});var X=r(74613);Object.defineProperty(t,"flatMap",{enumerable:!0,get:function(){return X.flatMap}});var ee=r(67478);Object.defineProperty(t,"mergeMap",{enumerable:!0,get:function(){return ee.mergeMap}});var te=r(76075);Object.defineProperty(t,"mergeMapTo",{enumerable:!0,get:function(){return te.mergeMapTo}});var re=r(16707);Object.defineProperty(t,"mergeScan",{enumerable:!0,get:function(){return re.mergeScan}});var ne=r(79694);Object.defineProperty(t,"mergeWith",{enumerable:!0,get:function(){return ne.mergeWith}});var ie=r(80142);Object.defineProperty(t,"min",{enumerable:!0,get:function(){return ie.min}});var oe=r(18464);Object.defineProperty(t,"multicast",{enumerable:!0,get:function(){return oe.multicast}});var se=r(32071);Object.defineProperty(t,"observeOn",{enumerable:!0,get:function(){return se.observeOn}});var ae=r(95513);Object.defineProperty(t,"onErrorResumeNext",{enumerable:!0,get:function(){return ae.onErrorResumeNext}});var ue=r(26744);Object.defineProperty(t,"pairwise",{enumerable:!0,get:function(){return ue.pairwise}});var ce=r(99516);Object.defineProperty(t,"partition",{enumerable:!0,get:function(){return ce.partition}});var le=r(66355);Object.defineProperty(t,"pluck",{enumerable:!0,get:function(){return le.pluck}});var fe=r(53197);Object.defineProperty(t,"publish",{enumerable:!0,get:function(){return fe.publish}});var he=r(82955);Object.defineProperty(t,"publishBehavior",{enumerable:!0,get:function(){return he.publishBehavior}});var de=r(26569);Object.defineProperty(t,"publishLast",{enumerable:!0,get:function(){return de.publishLast}});var pe=r(68710);Object.defineProperty(t,"publishReplay",{enumerable:!0,get:function(){return pe.publishReplay}});var ge=r(86081);Object.defineProperty(t,"race",{enumerable:!0,get:function(){return ge.race}});var be=r(6677);Object.defineProperty(t,"raceWith",{enumerable:!0,get:function(){return be.raceWith}});var ye=r(92070);Object.defineProperty(t,"reduce",{enumerable:!0,get:function(){return ye.reduce}});var me=r(56131);Object.defineProperty(t,"repeat",{enumerable:!0,get:function(){return me.repeat}});var ve=r(82139);Object.defineProperty(t,"repeatWhen",{enumerable:!0,get:function(){return ve.repeatWhen}});var we=r(3352);Object.defineProperty(t,"retry",{enumerable:!0,get:function(){return we.retry}});var Ee=r(73956);Object.defineProperty(t,"retryWhen",{enumerable:!0,get:function(){return Ee.retryWhen}});var Ae=r(79224);Object.defineProperty(t,"refCount",{enumerable:!0,get:function(){return Ae.refCount}});var _e=r(43434);Object.defineProperty(t,"sample",{enumerable:!0,get:function(){return _e.sample}});var Se=r(44143);Object.defineProperty(t,"sampleTime",{enumerable:!0,get:function(){return Se.sampleTime}});var Pe=r(35565);Object.defineProperty(t,"scan",{enumerable:!0,get:function(){return Pe.scan}});var ke=r(73929);Object.defineProperty(t,"sequenceEqual",{enumerable:!0,get:function(){return ke.sequenceEqual}});var Oe=r(93405);Object.defineProperty(t,"share",{enumerable:!0,get:function(){return Oe.share}});var xe=r(17782);Object.defineProperty(t,"shareReplay",{enumerable:!0,get:function(){return xe.shareReplay}});var Me=r(55440);Object.defineProperty(t,"single",{enumerable:!0,get:function(){return Me.single}});var Be=r(23079);Object.defineProperty(t,"skip",{enumerable:!0,get:function(){return Be.skip}});var Te=r(92359);Object.defineProperty(t,"skipLast",{enumerable:!0,get:function(){return Te.skipLast}});var Ie=r(97783);Object.defineProperty(t,"skipUntil",{enumerable:!0,get:function(){return Ie.skipUntil}});var Ce=r(65774);Object.defineProperty(t,"skipWhile",{enumerable:!0,get:function(){return Ce.skipWhile}});var Re=r(99054);Object.defineProperty(t,"startWith",{enumerable:!0,get:function(){return Re.startWith}});var Ne=r(5455);Object.defineProperty(t,"subscribeOn",{enumerable:!0,get:function(){return Ne.subscribeOn}});var je=r(16201);Object.defineProperty(t,"switchAll",{enumerable:!0,get:function(){return je.switchAll}});var Ue=r(90680);Object.defineProperty(t,"switchMap",{enumerable:!0,get:function(){return Ue.switchMap}});var Le=r(761);Object.defineProperty(t,"switchMapTo",{enumerable:!0,get:function(){return Le.switchMapTo}});var De=r(48461);Object.defineProperty(t,"switchScan",{enumerable:!0,get:function(){return De.switchScan}});var Fe=r(54383);Object.defineProperty(t,"take",{enumerable:!0,get:function(){return Fe.take}});var He=r(87660);Object.defineProperty(t,"takeLast",{enumerable:!0,get:function(){return He.takeLast}});var ze=r(66911);Object.defineProperty(t,"takeUntil",{enumerable:!0,get:function(){return ze.takeUntil}});var qe=r(60598);Object.defineProperty(t,"takeWhile",{enumerable:!0,get:function(){return qe.takeWhile}});var Ge=r(15019);Object.defineProperty(t,"tap",{enumerable:!0,get:function(){return Ge.tap}});var We=r(44880);Object.defineProperty(t,"throttle",{enumerable:!0,get:function(){return We.throttle}});var Ve=r(7245);Object.defineProperty(t,"throttleTime",{enumerable:!0,get:function(){return Ve.throttleTime}});var Ke=r(30632);Object.defineProperty(t,"throwIfEmpty",{enumerable:!0,get:function(){return Ke.throwIfEmpty}});var $e=r(32508);Object.defineProperty(t,"timeInterval",{enumerable:!0,get:function(){return $e.timeInterval}});var Je=r(81713);Object.defineProperty(t,"timeout",{enumerable:!0,get:function(){return Je.timeout}});var Qe=r(50597);Object.defineProperty(t,"timeoutWith",{enumerable:!0,get:function(){return Qe.timeoutWith}});var Ze=r(53866);Object.defineProperty(t,"timestamp",{enumerable:!0,get:function(){return Ze.timestamp}});var Ye=r(73484);Object.defineProperty(t,"toArray",{enumerable:!0,get:function(){return Ye.toArray}});var Xe=r(78072);Object.defineProperty(t,"window",{enumerable:!0,get:function(){return Xe.window}});var et=r(62893);Object.defineProperty(t,"windowCount",{enumerable:!0,get:function(){return et.windowCount}});var tt=r(90037);Object.defineProperty(t,"windowTime",{enumerable:!0,get:function(){return tt.windowTime}});var rt=r(28996);Object.defineProperty(t,"windowToggle",{enumerable:!0,get:function(){return rt.windowToggle}});var nt=r(65156);Object.defineProperty(t,"windowWhen",{enumerable:!0,get:function(){return nt.windowWhen}});var it=r(66975);Object.defineProperty(t,"withLatestFrom",{enumerable:!0,get:function(){return it.withLatestFrom}});var ot=r(26749);Object.defineProperty(t,"zip",{enumerable:!0,get:function(){return ot.zip}});var st=r(5362);Object.defineProperty(t,"zipAll",{enumerable:!0,get:function(){return st.zipAll}});var at=r(36977);Object.defineProperty(t,"zipWith",{enumerable:!0,get:function(){return at.zipWith}})},92861:(e,t,r)=>{var n=r(48287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function s(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=s),s.prototype=Object.create(i.prototype),o(i,s),s.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},s.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},s.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},s.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},92884:(e,t,r)=>{var n=r(30295);t.encrypt=function(e,t){var r=n(t,e._prev);return e._prev=e._cipher.encryptBlock(r),e._prev},t.decrypt=function(e,t){var r=e._prev;e._prev=t;var i=e._cipher.decryptBlock(t);return n(i,r)}},93238:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ripemd160=t.RIPEMD160=void 0;const n=r(31839);t.RIPEMD160=n.RIPEMD160,t.ripemd160=n.ripemd160},93275:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.dateTimestampProvider=void 0,t.dateTimestampProvider={now:function(){return(t.dateTimestampProvider.delegate||Date).now()},delegate:void 0}},93382:(e,t,r)=>{var n=r(92861).Buffer;e.exports=function(e,t,r){if(n.isBuffer(e))return e;if("string"==typeof e)return n.from(e,t);if(ArrayBuffer.isView(e))return n.from(e.buffer);throw new TypeError(r+" must be a string, a Buffer, a typed array or a DataView")}},93405:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.share=void 0;var o=r(19724),s=r(76808),a=r(2708),u=r(65212);function c(e,t){for(var r=[],s=2;s<arguments.length;s++)r[s-2]=arguments[s];if(!0!==t){if(!1!==t){var u=new a.SafeSubscriber({next:function(){u.unsubscribe(),e()}});return o.innerFrom(t.apply(void 0,i([],n(r)))).subscribe(u)}}else e()}t.share=function(e){void 0===e&&(e={});var t=e.connector,r=void 0===t?function(){return new s.Subject}:t,n=e.resetOnError,i=void 0===n||n,l=e.resetOnComplete,f=void 0===l||l,h=e.resetOnRefCountZero,d=void 0===h||h;return function(e){var t,n,s,l=0,h=!1,p=!1,g=function(){null==n||n.unsubscribe(),n=void 0},b=function(){g(),t=s=void 0,h=p=!1},y=function(){var e=t;b(),null==e||e.unsubscribe()};return u.operate((function(e,u){l++,p||h||g();var m=s=null!=s?s:r();u.add((function(){0!==--l||p||h||(n=c(y,d))})),m.subscribe(u),!t&&l>0&&(t=new a.SafeSubscriber({next:function(e){return m.next(e)},error:function(e){p=!0,g(),n=c(b,i,e),m.error(e)},complete:function(){h=!0,g(),n=c(b,f),m.complete()}}),o.innerFrom(e).subscribe(t))}))(e)}}},93728:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.config=void 0,t.config={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},94491:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FetchUrlFeeDataNetworkPlugin=t.FeeDataNetworkPlugin=t.EnsPlugin=t.GasCostPlugin=t.NetworkPlugin=void 0;const n=r(8166),i=r(75347);class o{name;constructor(e){(0,n.defineProperties)(this,{name:e})}clone(){return new o(this.name)}}t.NetworkPlugin=o;class s extends o{effectiveBlock;txBase;txCreate;txDataZero;txDataNonzero;txAccessListStorageKey;txAccessListAddress;constructor(e,t){null==e&&(e=0),super(`org.ethers.network.plugins.GasCost#${e||0}`);const r={effectiveBlock:e};function o(e,n){let o=(t||{})[e];null==o&&(o=n),(0,i.assertArgument)("number"==typeof o,`invalud value for ${e}`,"costs",t),r[e]=o}o("txBase",21e3),o("txCreate",32e3),o("txDataZero",4),o("txDataNonzero",16),o("txAccessListStorageKey",1900),o("txAccessListAddress",2400),(0,n.defineProperties)(this,r)}clone(){return new s(this.effectiveBlock,this)}}t.GasCostPlugin=s;class a extends o{address;targetNetwork;constructor(e,t){super("org.ethers.plugins.network.Ens"),(0,n.defineProperties)(this,{address:e||"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",targetNetwork:null==t?1:t})}clone(){return new a(this.address,this.targetNetwork)}}t.EnsPlugin=a;class u extends o{#Ft;get feeDataFunc(){return this.#Ft}constructor(e){super("org.ethers.plugins.network.FeeData"),this.#Ft=e}async getFeeData(e){return await this.#Ft(e)}clone(){return new u(this.#Ft)}}t.FeeDataNetworkPlugin=u,t.FetchUrlFeeDataNetworkPlugin=class extends o{#Pt;#Ht;get url(){return this.#Pt}get processFunc(){return this.#Ht}constructor(e,t){super("org.ethers.plugins.network.FetchUrlFeeDataPlugin"),this.#Pt=e,this.#Ht=t}clone(){return this}}},94643:(e,t,r)=>{function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},94708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SequenceError=void 0;var n=r(9619);t.SequenceError=n.createErrorClass((function(e){return function(t){e(this),this.name="SequenceError",this.message=t}}))},94808:function(e,t){"use strict";var r=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},n=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.timeoutProvider=void 0,t.timeoutProvider={setTimeout:function(e,i){for(var o=[],s=2;s<arguments.length;s++)o[s-2]=arguments[s];var a=t.timeoutProvider.delegate;return(null==a?void 0:a.setTimeout)?a.setTimeout.apply(a,n([e,i],r(o))):setTimeout.apply(void 0,n([e,i],r(o)))},clearTimeout:function(e){var r=t.timeoutProvider.delegate;return((null==r?void 0:r.clearTimeout)||clearTimeout)(e)},delegate:void 0}},94975:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayLike=void 0,t.isArrayLike=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e}},95184:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SHA2=void 0;const n=r(27302),i=r(74224);class o extends i.Hash{constructor(e,t,r,n){super(),this.blockLen=e,this.outputLen=t,this.padOffset=r,this.isLE=n,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(e),this.view=(0,i.createView)(this.buffer)}update(e){(0,n.exists)(this);const{view:t,buffer:r,blockLen:o}=this,s=(e=(0,i.toBytes)(e)).length;for(let n=0;n<s;){const a=Math.min(o-this.pos,s-n);if(a!==o)r.set(e.subarray(n,n+a),this.pos),this.pos+=a,n+=a,this.pos===o&&(this.process(t,0),this.pos=0);else{const t=(0,i.createView)(e);for(;o<=s-n;n+=o)this.process(t,n)}}return this.length+=e.length,this.roundClean(),this}digestInto(e){(0,n.exists)(this),(0,n.output)(e,this),this.finished=!0;const{buffer:t,view:r,blockLen:o,isLE:s}=this;let{pos:a}=this;t[a++]=128,this.buffer.subarray(a).fill(0),this.padOffset>o-a&&(this.process(r,0),a=0);for(let e=a;e<o;e++)t[e]=0;!function(e,t,r,n){if("function"==typeof e.setBigUint64)return e.setBigUint64(t,r,n);const i=BigInt(32),o=BigInt(4294967295),s=Number(r>>i&o),a=Number(r&o),u=n?4:0,c=n?0:4;e.setUint32(t+u,s,n),e.setUint32(t+c,a,n)}(r,o-8,BigInt(8*this.length),s),this.process(r,0);const u=(0,i.createView)(e),c=this.outputLen;if(c%4)throw new Error("_sha2: outputLen should be aligned to 32bit");const l=c/4,f=this.get();if(l>f.length)throw new Error("_sha2: outputLen bigger than state");for(let e=0;e<l;e++)u.setUint32(4*e,f[e],s)}digest(){const{buffer:e,outputLen:t}=this;this.digestInto(e);const r=e.slice(0,t);return this.destroy(),r}_cloneInto(e){e||(e=new this.constructor),e.set(...this.get());const{blockLen:t,buffer:r,length:n,finished:i,destroyed:o,pos:s}=this;return e.length=n,e.pos=s,e.finished=i,e.destroyed=o,n%t&&e.buffer.set(r),e}}t.SHA2=o},95212:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.encodeRlp=void 0;const n=r(87415);function i(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function o(e){if(Array.isArray(e)){let t=[];if(e.forEach((function(e){t=t.concat(o(e))})),t.length<=55)return t.unshift(192+t.length),t;const r=i(t.length);return r.unshift(247+r.length),r.concat(t)}const t=Array.prototype.slice.call((0,n.getBytes)(e,"object"));if(1===t.length&&t[0]<=127)return t;if(t.length<=55)return t.unshift(128+t.length),t;const r=i(t.length);return r.unshift(183+r.length),r.concat(t)}const s="0123456789abcdef";t.encodeRlp=function(e){let t="0x";for(const r of o(e))t+=s[r>>4],t+=s[15&r];return t}},95462:function(e,t,r){"use strict";var n=this&&this.__generator||function(e,t){var r,n,i,o,s={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(o){return function(a){return function(o){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(i=2&o[0]?n.return:o[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,o[1])).done)return i;switch(n=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return s.label++,{value:o[1],done:!1};case 5:s.label++,n=o[1],o=[0];continue;case 7:o=s.ops.pop(),s.trys.pop();continue;default:if(!((i=(i=s.trys).length>0&&i[i.length-1])||6!==o[0]&&2!==o[0])){s=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){s.label=o[1];break}if(6===o[0]&&s.label<i[1]){s.label=i[1],i=o;break}if(i&&s.label<i[2]){s.label=i[2],s.ops.push(o);break}i[2]&&s.ops.pop(),s.trys.pop();continue}o=t.call(e,s)}catch(e){o=[6,e],n=0}finally{r=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,a])}}},i=this&&this.__await||function(e){return this instanceof i?(this.v=e,this):new i(e)},o=this&&this.__asyncGenerator||function(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n,o=r.apply(e,t||[]),s=[];return n={},a("next"),a("throw"),a("return"),n[Symbol.asyncIterator]=function(){return this},n;function a(e){o[e]&&(n[e]=function(t){return new Promise((function(r,n){s.push([e,t,r,n])>1||u(e,t)}))})}function u(e,t){try{(r=o[e](t)).value instanceof i?Promise.resolve(r.value.v).then(c,l):f(s[0][2],r)}catch(e){f(s[0][3],e)}var r}function c(e){u("next",e)}function l(e){u("throw",e)}function f(e,t){e(t),s.shift(),s.length&&u(s[0][0],s[0][1])}};Object.defineProperty(t,"__esModule",{value:!0}),t.isReadableStreamLike=t.readableStreamLikeToAsyncGenerator=void 0;var s=r(10281);t.readableStreamLikeToAsyncGenerator=function(e){return o(this,arguments,(function(){var t,r,o;return n(this,(function(n){switch(n.label){case 0:t=e.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,i(t.read())];case 3:return r=n.sent(),o=r.value,r.done?[4,i(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,i(o)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return t.releaseLock(),[7];case 10:return[2]}}))}))},t.isReadableStreamLike=function(e){return s.isFunction(null==e?void 0:e.getReader)}},95513:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.onErrorResumeNext=t.onErrorResumeNextWith=void 0;var o=r(7652),s=r(1903);function a(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=o.argsOrArgArray(e);return function(e){return s.onErrorResumeNext.apply(void 0,i([e],n(r)))}}t.onErrorResumeNextWith=a,t.onErrorResumeNext=a},95855:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.InfuraProvider=t.InfuraWebSocketProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371),a=r(50873),u="84842078b09946638c03157f83405213";class c extends a.WebSocketProvider{projectId;projectSecret;constructor(e,t){const r=new l(e,t),i=r._getConnection();(0,n.assert)(!i.credentials,"INFURA WebSocket project secrets unsupported","UNSUPPORTED_OPERATION",{operation:"InfuraProvider.getWebSocketProvider()"}),super(i.url.replace(/^http/i,"ws").replace("/v3/","/ws/v3/"),r._network),(0,n.defineProperties)(this,{projectId:r.projectId,projectSecret:r.projectSecret})}isCommunityResource(){return this.projectId===u}}t.InfuraWebSocketProvider=c;class l extends s.JsonRpcProvider{projectId;projectSecret;constructor(e,t,r){null==e&&(e="mainnet");const i=o.Network.from(e);null==t&&(t=u),null==r&&(r=null),super(l.getRequest(i,t,r),i,{staticNetwork:i}),(0,n.defineProperties)(this,{projectId:t,projectSecret:r})}_getProvider(e){try{return new l(e,this.projectId,this.projectSecret)}catch(e){}return super._getProvider(e)}isCommunityResource(){return this.projectId===u}static getWebSocketProvider(e,t){return new c(e,t)}static getRequest(e,t,r){null==t&&(t=u),null==r&&(r=null);const o=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"mainnet.infura.io";case"goerli":return"goerli.infura.io";case"sepolia":return"sepolia.infura.io";case"arbitrum":return"arbitrum-mainnet.infura.io";case"arbitrum-goerli":return"arbitrum-goerli.infura.io";case"arbitrum-sepolia":return"arbitrum-sepolia.infura.io";case"base":return"base-mainnet.infura.io";case"base-goerlia":case"base-goerli":return"base-goerli.infura.io";case"base-sepolia":return"base-sepolia.infura.io";case"bnb":return"bsc-mainnet.infura.io";case"bnbt":return"bsc-testnet.infura.io";case"linea":return"linea-mainnet.infura.io";case"linea-goerli":return"linea-goerli.infura.io";case"linea-sepolia":return"linea-sepolia.infura.io";case"matic":return"polygon-mainnet.infura.io";case"matic-amoy":return"polygon-amoy.infura.io";case"matic-mumbai":return"polygon-mumbai.infura.io";case"optimism":return"optimism-mainnet.infura.io";case"optimism-goerli":return"optimism-goerli.infura.io";case"optimism-sepolia":return"optimism-sepolia.infura.io"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v3/${t}`);return o.allowGzip=!0,r&&o.setCredentials("",r),t===u&&(o.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("InfuraProvider"),!0)),o}}t.InfuraProvider=l},95936:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.merge=void 0;var n=r(68087),i=r(19724),o=r(44885),s=r(26404),a=r(47058);t.merge=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=s.popScheduler(e),u=s.popNumber(e,1/0),c=e;return c.length?1===c.length?i.innerFrom(c[0]):n.mergeAll(u)(a.from(c,r)):o.EMPTY}},96065:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.solidityPackedSha256=t.solidityPackedKeccak256=t.solidityPacked=void 0;const n=r(30646),i=r(32291),o=r(75347),s=new RegExp("^bytes([0-9]+)$"),a=new RegExp("^(u?int)([0-9]*)$"),u=new RegExp("^(.*)\\[([0-9]*)\\]$");function c(e,t,r){switch(e){case"address":return r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)((0,n.getAddress)(t));case"string":return(0,o.toUtf8Bytes)(t);case"bytes":return(0,o.getBytes)(t);case"bool":return t=t?"0x01":"0x00",r?(0,o.getBytes)((0,o.zeroPadValue)(t,32)):(0,o.getBytes)(t)}let i=e.match(a);if(i){let n="int"===i[1],s=parseInt(i[2]||"256");return(0,o.assertArgument)((!i[2]||i[2]===String(s))&&s%8==0&&0!==s&&s<=256,"invalid number type","type",e),r&&(s=256),n&&(t=(0,o.toTwos)(t,s)),(0,o.getBytes)((0,o.zeroPadValue)((0,o.toBeArray)(t),s/8))}if(i=e.match(s),i){const n=parseInt(i[1]);return(0,o.assertArgument)(String(n)===i[1]&&0!==n&&n<=32,"invalid bytes type","type",e),(0,o.assertArgument)((0,o.dataLength)(t)===n,`invalid value for ${e}`,"value",t),r?(0,o.getBytes)((0,o.zeroPadBytes)(t,32)):t}if(i=e.match(u),i&&Array.isArray(t)){const r=i[1],n=parseInt(i[2]||String(t.length));(0,o.assertArgument)(n===t.length,`invalid array length for ${e}`,"value",t);const s=[];return t.forEach((function(e){s.push(c(r,e,!0))})),(0,o.getBytes)((0,o.concat)(s))}(0,o.assertArgument)(!1,"invalid type","type",e)}function l(e,t){(0,o.assertArgument)(e.length===t.length,"wrong number of values; expected ${ types.length }","values",t);const r=[];return e.forEach((function(e,n){r.push(c(e,t[n]))})),(0,o.hexlify)((0,o.concat)(r))}t.solidityPacked=l,t.solidityPackedKeccak256=function(e,t){return(0,i.keccak256)(l(e,t))},t.solidityPackedSha256=function(e,t){return(0,i.sha256)(l(e,t))}},96153:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0})},96328:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concat=void 0;var o=r(65212),s=r(70201),a=r(26404),u=r(47058);t.concat=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=a.popScheduler(e);return o.operate((function(t,o){s.concatAll()(u.from(i([t],n(e)),r)).subscribe(o)}))}},96534:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(27302),i=r(59975),o=r(74224),[s,a,u]=[[],[],[]],c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(7),d=BigInt(256),p=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let i=c;for(let e=0;e<7;e++)t=(t<<l^(t>>h)*p)%d,t&f&&(i^=l<<(l<<BigInt(e))-l);u.push(i)}const[g,b]=(0,i.split)(u,!0),y=(e,t,r)=>r>32?(0,i.rotlBH)(e,t,r):(0,i.rotlSH)(e,t,r),m=(e,t,r)=>r>32?(0,i.rotlBL)(e,t,r):(0,i.rotlSL)(e,t,r);function v(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,i=(t+2)%10,o=r[i],s=r[i+1],a=y(o,s,1)^r[n],u=m(o,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=u}let t=e[2],i=e[3];for(let r=0;r<24;r++){const n=a[r],o=y(t,i,n),u=m(t,i,n),c=s[r];t=e[c],i=e[c+1],e[c]=o,e[c+1]=u}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=b[n]}r.fill(0)}t.keccakP=v;class w extends o.Hash{constructor(e,t,r,i=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=i,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,o.u32)(this.state)}keccak(){v(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,i=(e=(0,o.toBytes)(e)).length;for(let n=0;n<i;){const o=Math.min(t-this.pos,i-n);for(let t=0;t<o;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,128&t&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,i=e.length;n<i;){this.posOut>=r&&this.keccak();const o=Math.min(r-this.posOut,i-n);e.set(t.subarray(this.posOut,this.posOut+o),n),this.posOut+=o,n+=o}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:i,enableXOF:o}=this;return e||(e=new w(t,r,n,o,i)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=i,e.suffix=r,e.outputLen=n,e.enableXOF=o,e.destroyed=this.destroyed,e}}t.Keccak=w;const E=(e,t,r)=>(0,o.wrapConstructor)((()=>new w(t,e,r)));t.sha3_224=E(6,144,28),t.sha3_256=E(6,136,32),t.sha3_384=E(6,104,48),t.sha3_512=E(6,72,64),t.keccak_224=E(1,144,28),t.keccak_256=E(1,136,32),t.keccak_384=E(1,104,48),t.keccak_512=E(1,72,64);const A=(e,t,r)=>(0,o.wrapXOFConstructorWithOpts)(((n={})=>new w(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=A(31,168,16),t.shake256=A(31,136,32)},96978:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha224=t.sha256=void 0;const n=r(95184),i=r(74224),o=(e,t,r)=>e&t^e&r^t&r,s=new Uint32Array([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),a=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),u=new Uint32Array(64);class c extends n.SHA2{constructor(){super(64,32,8,!1),this.A=0|a[0],this.B=0|a[1],this.C=0|a[2],this.D=0|a[3],this.E=0|a[4],this.F=0|a[5],this.G=0|a[6],this.H=0|a[7]}get(){const{A:e,B:t,C:r,D:n,E:i,F:o,G:s,H:a}=this;return[e,t,r,n,i,o,s,a]}set(e,t,r,n,i,o,s,a){this.A=0|e,this.B=0|t,this.C=0|r,this.D=0|n,this.E=0|i,this.F=0|o,this.G=0|s,this.H=0|a}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t,!1);for(let e=16;e<64;e++){const t=u[e-15],r=u[e-2],n=(0,i.rotr)(t,7)^(0,i.rotr)(t,18)^t>>>3,o=(0,i.rotr)(r,17)^(0,i.rotr)(r,19)^r>>>10;u[e]=o+u[e-7]+n+u[e-16]|0}let{A:r,B:n,C:a,D:c,E:l,F:f,G:h,H:d}=this;for(let e=0;e<64;e++){const t=d+((0,i.rotr)(l,6)^(0,i.rotr)(l,11)^(0,i.rotr)(l,25))+((p=l)&f^~p&h)+s[e]+u[e]|0,g=((0,i.rotr)(r,2)^(0,i.rotr)(r,13)^(0,i.rotr)(r,22))+o(r,n,a)|0;d=h,h=f,f=l,l=c+t|0,c=a,a=n,n=r,r=t+g|0}var p;r=r+this.A|0,n=n+this.B|0,a=a+this.C|0,c=c+this.D|0,l=l+this.E|0,f=f+this.F|0,h=h+this.G|0,d=d+this.H|0,this.set(r,n,a,c,l,f,h,d)}roundClean(){u.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}}class l extends c{constructor(){super(),this.A=-1056596264,this.B=914150663,this.C=812702999,this.D=-150054599,this.E=-4191439,this.F=1750603025,this.G=1694076839,this.H=-1090891868,this.outputLen=28}}t.sha256=(0,i.wrapConstructor)((()=>new c)),t.sha224=(0,i.wrapConstructor)((()=>new l))},97168:(e,t,r)=>{t.publicEncrypt=r(28902),t.privateDecrypt=r(77362),t.privateEncrypt=function(e,r){return t.publicEncrypt(e,r,!0)},t.publicDecrypt=function(e,r){return t.privateDecrypt(e,r,!0)}},97292:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.mapToCurveSimpleSWU=t.SWUFpSqrtRatio=t.weierstrass=t.weierstrassPoints=t.DER=void 0;const n=r(45646),i=r(98421),o=r(98421),s=r(36023),{bytesToNumberBE:a,hexToBytes:u}=i;t.DER={Err:class extends Error{constructor(e=""){super(e)}},_parseInt(e){const{Err:r}=t.DER;if(e.length<2||2!==e[0])throw new r("Invalid signature integer tag");const n=e[1],i=e.subarray(2,n+2);if(!n||i.length!==n)throw new r("Invalid signature integer: wrong length");if(128&i[0])throw new r("Invalid signature integer: negative");if(0===i[0]&&!(128&i[1]))throw new r("Invalid signature integer: unnecessary leading zero");return{d:a(i),l:e.subarray(n+2)}},toSig(e){const{Err:r}=t.DER,n="string"==typeof e?u(e):e;if(!(n instanceof Uint8Array))throw new Error("ui8a expected");let i=n.length;if(i<2||48!=n[0])throw new r("Invalid signature tag");if(n[1]!==i-2)throw new r("Invalid signature: incorrect length");const{d:o,l:s}=t.DER._parseInt(n.subarray(2)),{d:a,l:c}=t.DER._parseInt(s);if(c.length)throw new r("Invalid signature: left bytes after parsing");return{r:o,s:a}},hexFromSig(e){const t=e=>8&Number.parseInt(e[0],16)?"00"+e:e,r=e=>{const t=e.toString(16);return 1&t.length?`0${t}`:t},n=t(r(e.s)),i=t(r(e.r)),o=n.length/2,s=i.length/2,a=r(o),u=r(s);return`30${r(s+o+4)}02${u}${i}02${a}${n}`}};const c=BigInt(0),l=BigInt(1),f=BigInt(2),h=BigInt(3),d=BigInt(4);function p(e){const t=function(e){const t=(0,s.validateBasic)(e);i.validateObject(t,{a:"field",b:"field"},{allowedPrivateKeyLengths:"array",wrapPrivateKey:"boolean",isTorsionFree:"function",clearCofactor:"function",allowInfinityPoint:"boolean",fromBytes:"function",toBytes:"function"});const{endo:r,Fp:n,a:o}=t;if(r){if(!n.eql(o,n.ZERO))throw new Error("Endomorphism can only be defined for Koblitz curves that have a=0");if("object"!=typeof r||"bigint"!=typeof r.beta||"function"!=typeof r.splitScalar)throw new Error("Expected endomorphism with beta: bigint and splitScalar: function")}return Object.freeze({...t})}(e),{Fp:r}=t,a=t.toBytes||((e,t,n)=>{const o=t.toAffine();return i.concatBytes(Uint8Array.from([4]),r.toBytes(o.x),r.toBytes(o.y))}),u=t.fromBytes||(e=>{const t=e.subarray(1);return{x:r.fromBytes(t.subarray(0,r.BYTES)),y:r.fromBytes(t.subarray(r.BYTES,2*r.BYTES))}});function f(e){const{a:n,b:i}=t,o=r.sqr(e),s=r.mul(o,e);return r.add(r.add(s,r.mul(e,n)),i)}if(!r.eql(r.sqr(t.Gy),f(t.Gx)))throw new Error("bad generator point: equation left != right");function d(e){return"bigint"==typeof e&&c<e&&e<t.n}function p(e){if(!d(e))throw new Error("Expected valid bigint: 0 < bigint < curve.n")}function g(e){const{allowedPrivateKeyLengths:r,nByteLength:s,wrapPrivateKey:a,n:u}=t;if(r&&"bigint"!=typeof e){if(e instanceof Uint8Array&&(e=i.bytesToHex(e)),"string"!=typeof e||!r.includes(e.length))throw new Error("Invalid key");e=e.padStart(2*s,"0")}let c;try{c="bigint"==typeof e?e:i.bytesToNumberBE((0,o.ensureBytes)("private key",e,s))}catch(t){throw new Error(`private key must be ${s} bytes, hex or bigint, not ${typeof e}`)}return a&&(c=n.mod(c,u)),p(c),c}const b=new Map;function y(e){if(!(e instanceof m))throw new Error("ProjectivePoint expected")}class m{constructor(e,t,n){if(this.px=e,this.py=t,this.pz=n,null==e||!r.isValid(e))throw new Error("x required");if(null==t||!r.isValid(t))throw new Error("y required");if(null==n||!r.isValid(n))throw new Error("z required")}static fromAffine(e){const{x:t,y:n}=e||{};if(!e||!r.isValid(t)||!r.isValid(n))throw new Error("invalid affine point");if(e instanceof m)throw new Error("projective point not allowed");const i=e=>r.eql(e,r.ZERO);return i(t)&&i(n)?m.ZERO:new m(t,n,r.ONE)}get x(){return this.toAffine().x}get y(){return this.toAffine().y}static normalizeZ(e){const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}static fromHex(e){const t=m.fromAffine(u((0,o.ensureBytes)("pointHex",e)));return t.assertValidity(),t}static fromPrivateKey(e){return m.BASE.multiply(g(e))}_setWindowSize(e){this._WINDOW_SIZE=e,b.delete(this)}assertValidity(){if(this.is0()){if(t.allowInfinityPoint&&!r.is0(this.py))return;throw new Error("bad point: ZERO")}const{x:e,y:n}=this.toAffine();if(!r.isValid(e)||!r.isValid(n))throw new Error("bad point: x or y not FE");const i=r.sqr(n),o=f(e);if(!r.eql(i,o))throw new Error("bad point: equation left != right");if(!this.isTorsionFree())throw new Error("bad point: not in prime-order subgroup")}hasEvenY(){const{y:e}=this.toAffine();if(r.isOdd)return!r.isOdd(e);throw new Error("Field doesn't support isOdd")}equals(e){y(e);const{px:t,py:n,pz:i}=this,{px:o,py:s,pz:a}=e,u=r.eql(r.mul(t,a),r.mul(o,i)),c=r.eql(r.mul(n,a),r.mul(s,i));return u&&c}negate(){return new m(this.px,r.neg(this.py),this.pz)}double(){const{a:e,b:n}=t,i=r.mul(n,h),{px:o,py:s,pz:a}=this;let u=r.ZERO,c=r.ZERO,l=r.ZERO,f=r.mul(o,o),d=r.mul(s,s),p=r.mul(a,a),g=r.mul(o,s);return g=r.add(g,g),l=r.mul(o,a),l=r.add(l,l),u=r.mul(e,l),c=r.mul(i,p),c=r.add(u,c),u=r.sub(d,c),c=r.add(d,c),c=r.mul(u,c),u=r.mul(g,u),l=r.mul(i,l),p=r.mul(e,p),g=r.sub(f,p),g=r.mul(e,g),g=r.add(g,l),l=r.add(f,f),f=r.add(l,f),f=r.add(f,p),f=r.mul(f,g),c=r.add(c,f),p=r.mul(s,a),p=r.add(p,p),f=r.mul(p,g),u=r.sub(u,f),l=r.mul(p,d),l=r.add(l,l),l=r.add(l,l),new m(u,c,l)}add(e){y(e);const{px:n,py:i,pz:o}=this,{px:s,py:a,pz:u}=e;let c=r.ZERO,l=r.ZERO,f=r.ZERO;const d=t.a,p=r.mul(t.b,h);let g=r.mul(n,s),b=r.mul(i,a),v=r.mul(o,u),w=r.add(n,i),E=r.add(s,a);w=r.mul(w,E),E=r.add(g,b),w=r.sub(w,E),E=r.add(n,o);let A=r.add(s,u);return E=r.mul(E,A),A=r.add(g,v),E=r.sub(E,A),A=r.add(i,o),c=r.add(a,u),A=r.mul(A,c),c=r.add(b,v),A=r.sub(A,c),f=r.mul(d,E),c=r.mul(p,v),f=r.add(c,f),c=r.sub(b,f),f=r.add(b,f),l=r.mul(c,f),b=r.add(g,g),b=r.add(b,g),v=r.mul(d,v),E=r.mul(p,E),b=r.add(b,v),v=r.sub(g,v),v=r.mul(d,v),E=r.add(E,v),g=r.mul(b,E),l=r.add(l,g),g=r.mul(A,E),c=r.mul(w,c),c=r.sub(c,g),g=r.mul(w,b),f=r.mul(A,f),f=r.add(f,g),new m(c,l,f)}subtract(e){return this.add(e.negate())}is0(){return this.equals(m.ZERO)}wNAF(e){return w.wNAFCached(this,b,e,(e=>{const t=r.invertBatch(e.map((e=>e.pz)));return e.map(((e,r)=>e.toAffine(t[r]))).map(m.fromAffine)}))}multiplyUnsafe(e){const n=m.ZERO;if(e===c)return n;if(p(e),e===l)return this;const{endo:i}=t;if(!i)return w.unsafeLadder(this,e);let{k1neg:o,k1:s,k2neg:a,k2:u}=i.splitScalar(e),f=n,h=n,d=this;for(;s>c||u>c;)s&l&&(f=f.add(d)),u&l&&(h=h.add(d)),d=d.double(),s>>=l,u>>=l;return o&&(f=f.negate()),a&&(h=h.negate()),h=new m(r.mul(h.px,i.beta),h.py,h.pz),f.add(h)}multiply(e){p(e);let n,i,o=e;const{endo:s}=t;if(s){const{k1neg:e,k1:t,k2neg:a,k2:u}=s.splitScalar(o);let{p:c,f:l}=this.wNAF(t),{p:f,f:h}=this.wNAF(u);c=w.constTimeNegate(e,c),f=w.constTimeNegate(a,f),f=new m(r.mul(f.px,s.beta),f.py,f.pz),n=c.add(f),i=l.add(h)}else{const{p:e,f:t}=this.wNAF(o);n=e,i=t}return m.normalizeZ([n,i])[0]}multiplyAndAddUnsafe(e,t,r){const n=m.BASE,i=(e,t)=>t!==c&&t!==l&&e.equals(n)?e.multiply(t):e.multiplyUnsafe(t),o=i(this,t).add(i(e,r));return o.is0()?void 0:o}toAffine(e){const{px:t,py:n,pz:i}=this,o=this.is0();null==e&&(e=o?r.ONE:r.inv(i));const s=r.mul(t,e),a=r.mul(n,e),u=r.mul(i,e);if(o)return{x:r.ZERO,y:r.ZERO};if(!r.eql(u,r.ONE))throw new Error("invZ was invalid");return{x:s,y:a}}isTorsionFree(){const{h:e,isTorsionFree:r}=t;if(e===l)return!0;if(r)return r(m,this);throw new Error("isTorsionFree() has not been declared for the elliptic curve")}clearCofactor(){const{h:e,clearCofactor:r}=t;return e===l?this:r?r(m,this):this.multiplyUnsafe(t.h)}toRawBytes(e=!0){return this.assertValidity(),a(m,this,e)}toHex(e=!0){return i.bytesToHex(this.toRawBytes(e))}}m.BASE=new m(t.Gx,t.Gy,r.ONE),m.ZERO=new m(r.ZERO,r.ONE,r.ZERO);const v=t.nBitLength,w=(0,s.wNAF)(m,t.endo?Math.ceil(v/2):v);return{CURVE:t,ProjectivePoint:m,normPrivateKeyToScalar:g,weierstrassEquation:f,isWithinCurveOrder:d}}function g(e,t){const r=e.ORDER;let n=c;for(let e=r-l;e%f===c;e/=f)n+=l;const i=n,o=f<<i-l-l,s=o*f,a=(r-l)/s,u=(a-l)/f,p=s-l,g=o,b=e.pow(t,a),y=e.pow(t,(a+l)/f);let m=(t,r)=>{let n=b,o=e.pow(r,p),s=e.sqr(o);s=e.mul(s,r);let a=e.mul(t,s);a=e.pow(a,u),a=e.mul(a,o),o=e.mul(a,r),s=e.mul(a,t);let c=e.mul(s,o);a=e.pow(c,g);let h=e.eql(a,e.ONE);o=e.mul(s,y),a=e.mul(c,n),s=e.cmov(o,s,h),c=e.cmov(a,c,h);for(let t=i;t>l;t--){let r=t-f;r=f<<r-l;let i=e.pow(c,r);const a=e.eql(i,e.ONE);o=e.mul(s,n),n=e.mul(n,n),i=e.mul(c,n),s=e.cmov(o,s,a),c=e.cmov(i,c,a)}return{isValid:h,value:s}};if(e.ORDER%d===h){const r=(e.ORDER-h)/d,n=e.sqrt(e.neg(t));m=(t,i)=>{let o=e.sqr(i);const s=e.mul(t,i);o=e.mul(o,s);let a=e.pow(o,r);a=e.mul(a,s);const u=e.mul(a,n),c=e.mul(e.sqr(a),i),l=e.eql(c,t);return{isValid:l,value:e.cmov(u,a,l)}}}return m}t.weierstrassPoints=p,t.weierstrass=function(e){const r=function(e){const t=(0,s.validateBasic)(e);return i.validateObject(t,{hash:"hash",hmac:"function",randomBytes:"function"},{bits2int:"function",bits2int_modN:"function",lowS:"boolean"}),Object.freeze({lowS:!0,...t})}(e),{Fp:a,n:u}=r,f=a.BYTES+1,h=2*a.BYTES+1;function d(e){return n.mod(e,u)}function g(e){return n.invert(e,u)}const{ProjectivePoint:b,normPrivateKeyToScalar:y,weierstrassEquation:m,isWithinCurveOrder:v}=p({...r,toBytes(e,t,r){const n=t.toAffine(),o=a.toBytes(n.x),s=i.concatBytes;return r?s(Uint8Array.from([t.hasEvenY()?2:3]),o):s(Uint8Array.from([4]),o,a.toBytes(n.y))},fromBytes(e){const t=e.length,r=e[0],n=e.subarray(1);if(t!==f||2!==r&&3!==r){if(t===h&&4===r)return{x:a.fromBytes(n.subarray(0,a.BYTES)),y:a.fromBytes(n.subarray(a.BYTES,2*a.BYTES))};throw new Error(`Point of length ${t} was invalid. Expected ${f} compressed bytes or ${h} uncompressed bytes`)}{const e=i.bytesToNumberBE(n);if(!(c<(o=e)&&o<a.ORDER))throw new Error("Point is not on curve");const t=m(e);let s=a.sqrt(t);return!(1&~r)!=((s&l)===l)&&(s=a.neg(s)),{x:e,y:s}}var o}}),w=e=>i.bytesToHex(i.numberToBytesBE(e,r.nByteLength));function E(e){return e>u>>l}const A=(e,t,r)=>i.bytesToNumberBE(e.slice(t,r));class _{constructor(e,t,r){this.r=e,this.s=t,this.recovery=r,this.assertValidity()}static fromCompact(e){const t=r.nByteLength;return e=(0,o.ensureBytes)("compactSignature",e,2*t),new _(A(e,0,t),A(e,t,2*t))}static fromDER(e){const{r,s:n}=t.DER.toSig((0,o.ensureBytes)("DER",e));return new _(r,n)}assertValidity(){if(!v(this.r))throw new Error("r must be 0 < r < CURVE.n");if(!v(this.s))throw new Error("s must be 0 < s < CURVE.n")}addRecoveryBit(e){return new _(this.r,this.s,e)}recoverPublicKey(e){const{r:t,s:n,recovery:i}=this,s=O((0,o.ensureBytes)("msgHash",e));if(null==i||![0,1,2,3].includes(i))throw new Error("recovery id invalid");const u=2===i||3===i?t+r.n:t;if(u>=a.ORDER)throw new Error("recovery id 2 or 3 invalid");const c=1&i?"03":"02",l=b.fromHex(c+w(u)),f=g(u),h=d(-s*f),p=d(n*f),y=b.BASE.multiplyAndAddUnsafe(l,h,p);if(!y)throw new Error("point at infinify");return y.assertValidity(),y}hasHighS(){return E(this.s)}normalizeS(){return this.hasHighS()?new _(this.r,d(-this.s),this.recovery):this}toDERRawBytes(){return i.hexToBytes(this.toDERHex())}toDERHex(){return t.DER.hexFromSig({r:this.r,s:this.s})}toCompactRawBytes(){return i.hexToBytes(this.toCompactHex())}toCompactHex(){return w(this.r)+w(this.s)}}const S={isValidPrivateKey(e){try{return y(e),!0}catch(e){return!1}},normPrivateKeyToScalar:y,randomPrivateKey:()=>{const e=n.getMinHashLength(r.n);return n.mapHashToField(r.randomBytes(e),r.n)},precompute:(e=8,t=b.BASE)=>(t._setWindowSize(e),t.multiply(BigInt(3)),t)};function P(e){const t=e instanceof Uint8Array,r="string"==typeof e,n=(t||r)&&e.length;return t?n===f||n===h:r?n===2*f||n===2*h:e instanceof b}const k=r.bits2int||function(e){const t=i.bytesToNumberBE(e),n=8*e.length-r.nBitLength;return n>0?t>>BigInt(n):t},O=r.bits2int_modN||function(e){return d(k(e))},x=i.bitMask(r.nBitLength);function M(e){if("bigint"!=typeof e)throw new Error("bigint expected");if(!(c<=e&&e<x))throw new Error(`bigint expected < 2^${r.nBitLength}`);return i.numberToBytesBE(e,r.nByteLength)}const B={lowS:r.lowS,prehash:!1},T={lowS:r.lowS,prehash:!1};return b.BASE._setWindowSize(8),{CURVE:r,getPublicKey:function(e,t=!0){return b.fromPrivateKey(e).toRawBytes(t)},getSharedSecret:function(e,t,r=!0){if(P(e))throw new Error("first arg must be private key");if(!P(t))throw new Error("second arg must be public key");return b.fromHex(t).multiply(y(e)).toRawBytes(r)},sign:function(e,t,n=B){const{seed:s,k2sig:u}=function(e,t,n=B){if(["recovered","canonical"].some((e=>e in n)))throw new Error("sign() legacy options not supported");const{hash:s,randomBytes:u}=r;let{lowS:f,prehash:h,extraEntropy:p}=n;null==f&&(f=!0),e=(0,o.ensureBytes)("msgHash",e),h&&(e=(0,o.ensureBytes)("prehashed msgHash",s(e)));const m=O(e),w=y(t),A=[M(w),M(m)];if(null!=p){const e=!0===p?u(a.BYTES):p;A.push((0,o.ensureBytes)("extraEntropy",e))}const S=i.concatBytes(...A),P=m;return{seed:S,k2sig:function(e){const t=k(e);if(!v(t))return;const r=g(t),n=b.BASE.multiply(t).toAffine(),i=d(n.x);if(i===c)return;const o=d(r*d(P+i*w));if(o===c)return;let s=(n.x===i?0:2)|Number(n.y&l),a=o;return f&&E(o)&&(a=function(e){return E(e)?d(-e):e}(o),s^=1),new _(i,a,s)}}}(e,t,n),f=r;return i.createHmacDrbg(f.hash.outputLen,f.nByteLength,f.hmac)(s,u)},verify:function(e,n,i,s=T){const a=e;if(n=(0,o.ensureBytes)("msgHash",n),i=(0,o.ensureBytes)("publicKey",i),"strict"in s)throw new Error("options.strict was renamed to lowS");const{lowS:u,prehash:c}=s;let l,f;try{if("string"==typeof a||a instanceof Uint8Array)try{l=_.fromDER(a)}catch(e){if(!(e instanceof t.DER.Err))throw e;l=_.fromCompact(a)}else{if("object"!=typeof a||"bigint"!=typeof a.r||"bigint"!=typeof a.s)throw new Error("PARSE");{const{r:e,s:t}=a;l=new _(e,t)}}f=b.fromHex(i)}catch(e){if("PARSE"===e.message)throw new Error("signature must be Signature instance, Uint8Array or hex string");return!1}if(u&&l.hasHighS())return!1;c&&(n=r.hash(n));const{r:h,s:p}=l,y=O(n),m=g(p),v=d(y*m),w=d(h*m),E=b.BASE.multiplyAndAddUnsafe(f,v,w)?.toAffine();return!!E&&d(E.x)===h},ProjectivePoint:b,Signature:_,utils:S}},t.SWUFpSqrtRatio=g,t.mapToCurveSimpleSWU=function(e,t){if(n.validateField(e),!e.isValid(t.A)||!e.isValid(t.B)||!e.isValid(t.Z))throw new Error("mapToCurveSimpleSWU: invalid opts");const r=g(e,t.Z);if(!e.isOdd)throw new Error("Fp.isOdd is not implemented!");return n=>{let i,o,s,a,u,c,l,f;i=e.sqr(n),i=e.mul(i,t.Z),o=e.sqr(i),o=e.add(o,i),s=e.add(o,e.ONE),s=e.mul(s,t.B),a=e.cmov(t.Z,e.neg(o),!e.eql(o,e.ZERO)),a=e.mul(a,t.A),o=e.sqr(s),c=e.sqr(a),u=e.mul(c,t.A),o=e.add(o,u),o=e.mul(o,s),c=e.mul(c,a),u=e.mul(c,t.B),o=e.add(o,u),l=e.mul(i,s);const{isValid:h,value:d}=r(o,c);f=e.mul(i,n),f=e.mul(f,d),l=e.cmov(l,s,h),f=e.cmov(f,d,h);const p=e.isOdd(n)===e.isOdd(f);return f=e.cmov(e.neg(f),f,p),l=e.div(l,a),{x:l,y:f}}}},97314:function(e,t,r){"use strict";var n,i=this&&this.__extends||(n=function(e,t){return n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)Object.prototype.hasOwnProperty.call(t,r)&&(e[r]=t[r])},n(e,t)},function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function r(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(r.prototype=t.prototype,new r)});Object.defineProperty(t,"__esModule",{value:!0}),t.BehaviorSubject=void 0;var o=function(e){function t(t){var r=e.call(this)||this;return r._value=t,r}return i(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var r=e.prototype._subscribe.call(this,t);return!r.closed&&t.next(this._value),r},t.prototype.getValue=function(){var e=this,t=e.hasError,r=e.thrownError,n=e._value;if(t)throw r;return this._throwIfClosed(),n},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(r(76808).Subject);t.BehaviorSubject=o},97570:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.decryptCrowdsaleJson=t.isCrowdsaleJson=void 0;const n=r(8165),i=r(30646),o=r(32291),s=r(23562),a=r(75347),u=r(48634);t.isCrowdsaleJson=function(e){try{if(JSON.parse(e).encseed)return!0}catch(e){}return!1},t.decryptCrowdsaleJson=function(e,t){const r=JSON.parse(e),c=(0,u.getPassword)(t),l=(0,i.getAddress)((0,u.spelunk)(r,"ethaddr:string!")),f=(0,u.looseArrayify)((0,u.spelunk)(r,"encseed:string!"));(0,a.assertArgument)(f&&f.length%16==0,"invalid encseed","json",e);const h=(0,a.getBytes)((0,o.pbkdf2)(c,c,2e3,32,"sha256")).slice(0,16),d=f.slice(0,16),p=f.slice(16),g=new n.CBC(h,d),b=(0,n.pkcs7Strip)((0,a.getBytes)(g.decrypt(p)));let y="";for(let e=0;e<b.length;e++)y+=String.fromCharCode(b[e]);return{address:l,privateKey:(0,s.id)(y)}}},97783:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.skipUntil=void 0;var n=r(65212),i=r(17214),o=r(19724),s=r(5717);t.skipUntil=function(e){return n.operate((function(t,r){var n=!1,a=i.createOperatorSubscriber(r,(function(){null==a||a.unsubscribe(),n=!0}),s.noop);o.innerFrom(e).subscribe(a),t.subscribe(i.createOperatorSubscriber(r,(function(e){return n&&r.next(e)})))}))}},97841:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.AlchemyProvider=void 0;const n=r(75347),i=r(89973),o=r(57698),s=r(42371),a="_gg7wSSi0KMBsdKnGVfHDueq6xMB9EkC";class u extends s.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=o.Network.from(e);null==t&&(t=a),super(u.getRequest(r,t),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new u(e,this.apiKey)}catch(e){}return super._getProvider(e)}async _perform(e){if("getTransactionResult"===e.method){const{trace:t,tx:r}=await(0,n.resolveProperties)({trace:this.send("trace_transaction",[e.hash]),tx:this.getTransaction(e.hash)});if(null==t||null==r)return null;let i,o=!1;try{i=t[0].result.output,o="Reverted"===t[0].error}catch(e){}if(i)return(0,n.assert)(!o,"an error occurred during transaction executions","CALL_EXCEPTION",{action:"getTransactionResult",data:i,reason:null,transaction:r,invocation:null,revert:null}),i;(0,n.assert)(!1,"could not parse trace result","BAD_DATA",{value:t})}return await super._perform(e)}isCommunityResource(){return this.apiKey===a}static getRequest(e,t){null==t&&(t=a);const r=new n.FetchRequest(`https://${function(e){switch(e){case"mainnet":return"eth-mainnet.alchemyapi.io";case"goerli":return"eth-goerli.g.alchemy.com";case"sepolia":return"eth-sepolia.g.alchemy.com";case"arbitrum":return"arb-mainnet.g.alchemy.com";case"arbitrum-goerli":return"arb-goerli.g.alchemy.com";case"arbitrum-sepolia":return"arb-sepolia.g.alchemy.com";case"base":return"base-mainnet.g.alchemy.com";case"base-goerli":return"base-goerli.g.alchemy.com";case"base-sepolia":return"base-sepolia.g.alchemy.com";case"matic":return"polygon-mainnet.g.alchemy.com";case"matic-amoy":return"polygon-amoy.g.alchemy.com";case"matic-mumbai":return"polygon-mumbai.g.alchemy.com";case"optimism":return"opt-mainnet.g.alchemy.com";case"optimism-goerli":return"opt-goerli.g.alchemy.com";case"optimism-sepolia":return"opt-sepolia.g.alchemy.com"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name)}/v2/${t}`);return r.allowGzip=!0,t===a&&(r.retryFunc=async(e,t,r)=>((0,i.showThrottleMessage)("alchemy"),!0)),r}}t.AlchemyProvider=u},98026:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.NullCoder=void 0;const n=r(38869),i=new Uint8Array([]);class o extends n.Coder{constructor(e){super("null","",e,!1)}defaultValue(){return null}encode(e,t){return null!=t&&this._throwError("not null",t),e.writeBytes(i)}decode(e){return e.readBytes(0),null}}t.NullCoder=o},98032:function(e,t,r){"use strict";var n=this&&this.__read||function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,o=r.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t){for(var r=0,n=t.length,i=e.length;r<n;r++,i++)e[i]=t[r];return e};Object.defineProperty(t,"__esModule",{value:!0}),t.concatWith=void 0;var o=r(96328);t.concatWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return o.concat.apply(void 0,i([],n(e)))}},98183:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createFind=t.find=void 0;var n=r(65212),i=r(17214);function o(e,t,r){var n="index"===r;return function(r,o){var s=0;r.subscribe(i.createOperatorSubscriber(o,(function(i){var a=s++;e.call(t,i,a,r)&&(o.next(n?a:i),o.complete())}),(function(){o.next(n?-1:void 0),o.complete()})))}}t.find=function(e,t){return n.operate(o(e,t,"value"))},t.createFind=o},98285:()=>{},98421:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateObject=t.createHmacDrbg=t.bitMask=t.bitSet=t.bitGet=t.bitLen=t.utf8ToBytes=t.equalBytes=t.concatBytes=t.ensureBytes=t.numberToVarBytesBE=t.numberToBytesLE=t.numberToBytesBE=t.bytesToNumberLE=t.bytesToNumberBE=t.hexToBytes=t.hexToNumber=t.numberToHexUnpadded=t.bytesToHex=void 0;const r=BigInt(0),n=BigInt(1),i=BigInt(2),o=e=>e instanceof Uint8Array,s=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));function a(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=s[e[r]];return t}function u(e){const t=e.toString(16);return 1&t.length?`0${t}`:t}function c(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);return BigInt(""===e?"0":`0x${e}`)}function l(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,i=e.slice(n,n+2),o=Number.parseInt(i,16);if(Number.isNaN(o)||o<0)throw new Error("Invalid byte sequence");r[t]=o}return r}function f(e,t){return l(e.toString(16).padStart(2*t,"0"))}function h(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t}t.bytesToHex=a,t.numberToHexUnpadded=u,t.hexToNumber=c,t.hexToBytes=l,t.bytesToNumberBE=function(e){return c(a(e))},t.bytesToNumberLE=function(e){if(!o(e))throw new Error("Uint8Array expected");return c(a(Uint8Array.from(e).reverse()))},t.numberToBytesBE=f,t.numberToBytesLE=function(e,t){return f(e,t).reverse()},t.numberToVarBytesBE=function(e){return l(u(e))},t.ensureBytes=function(e,t,r){let n;if("string"==typeof t)try{n=l(t)}catch(r){throw new Error(`${e} must be valid hex string, got "${t}". Cause: ${r}`)}else{if(!o(t))throw new Error(`${e} must be hex string or Uint8Array`);n=Uint8Array.from(t)}const i=n.length;if("number"==typeof r&&i!==r)throw new Error(`${e} expected ${r} bytes, got ${i}`);return n},t.concatBytes=h,t.equalBytes=function(e,t){if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0},t.utf8ToBytes=function(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))},t.bitLen=function(e){let t;for(t=0;e>r;e>>=n,t+=1);return t},t.bitGet=function(e,t){return e>>BigInt(t)&n},t.bitSet=(e,t,i)=>e|(i?n:r)<<BigInt(t),t.bitMask=e=>(i<<BigInt(e-1))-n;const d=e=>new Uint8Array(e),p=e=>Uint8Array.from(e);t.createHmacDrbg=function(e,t,r){if("number"!=typeof e||e<2)throw new Error("hashLen must be a number");if("number"!=typeof t||t<2)throw new Error("qByteLen must be a number");if("function"!=typeof r)throw new Error("hmacFn must be a function");let n=d(e),i=d(e),o=0;const s=()=>{n.fill(1),i.fill(0),o=0},a=(...e)=>r(i,n,...e),u=(e=d())=>{i=a(p([0]),e),n=a(),0!==e.length&&(i=a(p([1]),e),n=a())},c=()=>{if(o++>=1e3)throw new Error("drbg: tried 1000 values");let e=0;const r=[];for(;e<t;){n=a();const t=n.slice();r.push(t),e+=n.length}return h(...r)};return(e,t)=>{let r;for(s(),u(e);!(r=t(c()));)u();return s(),r}};const g={bigint:e=>"bigint"==typeof e,function:e=>"function"==typeof e,boolean:e=>"boolean"==typeof e,string:e=>"string"==typeof e,stringOrUint8Array:e=>"string"==typeof e||e instanceof Uint8Array,isSafeInteger:e=>Number.isSafeInteger(e),array:e=>Array.isArray(e),field:(e,t)=>t.Fp.isValid(e),hash:e=>"function"==typeof e&&Number.isSafeInteger(e.outputLen)};t.validateObject=function(e,t,r={}){const n=(t,r,n)=>{const i=g[r];if("function"!=typeof i)throw new Error(`Invalid validator "${r}", expected function`);const o=e[t];if(!(n&&void 0===o||i(o,e)))throw new Error(`Invalid param ${String(t)}=${o} (${typeof o}), expected ${r}`)};for(const[e,r]of Object.entries(t))n(e,r,!1);for(const[e,t]of Object.entries(r))n(e,t,!0);return e}},98590:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.connectable=void 0;var n=r(76808),i=r(48051),o=r(35884),s={connector:function(){return new n.Subject},resetOnDisconnect:!0};t.connectable=function(e,t){void 0===t&&(t=s);var r=null,n=t.connector,a=t.resetOnDisconnect,u=void 0===a||a,c=n(),l=new i.Observable((function(e){return c.subscribe(e)}));return l.connect=function(){return r&&!r.closed||(r=o.defer((function(){return e})).subscribe(c),u&&r.add((function(){return c=n()}))),r},l}},99054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.startWith=void 0;var n=r(39546),i=r(26404),o=r(65212);t.startWith=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];var r=i.popScheduler(e);return o.operate((function(t,i){(r?n.concat(e,t,r):n.concat(e,t)).subscribe(i)}))}},99175:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.Hash=t.nextTick=t.swap32IfBE=t.byteSwapIfBE=t.swap8IfBE=t.isLE=void 0,t.isBytes=i,t.anumber=o,t.abytes=s,t.ahash=function(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.createHasher");o(e.outputLen),o(e.blockLen)},t.aexists=function(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")},t.aoutput=function(e,t){s(e);const r=t.outputLen;if(e.length<r)throw new Error("digestInto() expects output buffer of length at least "+r)},t.u8=function(e){return new Uint8Array(e.buffer,e.byteOffset,e.byteLength)},t.u32=function(e){return new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4))},t.clean=function(...e){for(let t=0;t<e.length;t++)e[t].fill(0)},t.createView=function(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)},t.rotr=function(e,t){return e<<32-t|e>>>t},t.rotl=function(e,t){return e<<t|e>>>32-t>>>0},t.byteSwap=a,t.byteSwap32=u,t.bytesToHex=function(e){if(s(e),c)return e.toHex();let t="";for(let r=0;r<e.length;r++)t+=l[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);if(c)return Uint8Array.fromHex(e);const t=e.length,r=t/2;if(t%2)throw new Error("hex string expected, got unpadded hex of length "+t);const n=new Uint8Array(r);for(let t=0,i=0;t<r;t++,i+=2){const r=h(e.charCodeAt(i)),o=h(e.charCodeAt(i+1));if(void 0===r||void 0===o){const t=e[i]+e[i+1];throw new Error('hex string expected, got non-hex character "'+t+'" at index '+i)}n[t]=16*r+o}return n},t.asyncLoop=async function(e,r,n){let i=Date.now();for(let o=0;o<e;o++){n(o);const e=Date.now()-i;e>=0&&e<r||(await(0,t.nextTick)(),i+=e)}},t.utf8ToBytes=d,t.bytesToUtf8=function(e){return(new TextDecoder).decode(e)},t.toBytes=p,t.kdfInputToBytes=function(e){return"string"==typeof e&&(e=d(e)),s(e),e},t.concatBytes=function(...e){let t=0;for(let r=0;r<e.length;r++){const n=e[r];s(n),t+=n.length}const r=new Uint8Array(t);for(let t=0,n=0;t<e.length;t++){const i=e[t];r.set(i,n),n+=i.length}return r},t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!=={}.toString.call(t))throw new Error("options should be object or undefined");return Object.assign(e,t)},t.createHasher=g,t.createOptHasher=b,t.createXOFer=y,t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));if(n.crypto&&"function"==typeof n.crypto.randomBytes)return Uint8Array.from(n.crypto.randomBytes(e));throw new Error("crypto.getRandomValues must be defined")};const n=r(25145);function i(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&"Uint8Array"===e.constructor.name}function o(e){if(!Number.isSafeInteger(e)||e<0)throw new Error("positive integer expected, got "+e)}function s(e,...t){if(!i(e))throw new Error("Uint8Array expected");if(t.length>0&&!t.includes(e.length))throw new Error("Uint8Array expected of length "+t+", got length="+e.length)}function a(e){return e<<24&4278190080|e<<8&16711680|e>>>8&65280|e>>>24&255}function u(e){for(let t=0;t<e.length;t++)e[t]=a(e[t]);return e}t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],t.swap8IfBE=t.isLE?e=>e:e=>a(e),t.byteSwapIfBE=t.swap8IfBE,t.swap32IfBE=t.isLE?e=>e:u;const c=(()=>"function"==typeof Uint8Array.from([]).toHex&&"function"==typeof Uint8Array.fromHex)(),l=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0"))),f={_0:48,_9:57,A:65,F:70,a:97,f:102};function h(e){return e>=f._0&&e<=f._9?e-f._0:e>=f.A&&e<=f.F?e-(f.A-10):e>=f.a&&e<=f.f?e-(f.a-10):void 0}function d(e){if("string"!=typeof e)throw new Error("string expected");return new Uint8Array((new TextEncoder).encode(e))}function p(e){return"string"==typeof e&&(e=d(e)),s(e),e}function g(e){const t=t=>e().update(p(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t}function b(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}function y(e){const t=(t,r)=>e(r).update(p(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t}t.nextTick=async()=>{},t.Hash=class{},t.wrapConstructor=g,t.wrapConstructorWithOpts=b,t.wrapXOFConstructorWithOpts=y},99245:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.queue=t.queueScheduler=void 0;var n=r(31983),i=r(32036);t.queueScheduler=new i.QueueScheduler(n.QueueAction),t.queue=t.queueScheduler},99247:(e,t,r)=>{var n=r(39404),i=r(92861).Buffer;e.exports=function(e,t){return i.from(e.toRed(n.mont(t.modulus)).redPow(new n(t.publicExponent)).fromRed().toArray())}},99349:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BlockscoutProvider=void 0;const n=r(75347),i=r(57698),o=r(42371);class s extends o.JsonRpcProvider{apiKey;constructor(e,t){null==e&&(e="mainnet");const r=i.Network.from(e);null==t&&(t=null),super(s.getRequest(r),r,{staticNetwork:r}),(0,n.defineProperties)(this,{apiKey:t})}_getProvider(e){try{return new s(e,this.apiKey)}catch(e){}return super._getProvider(e)}isCommunityResource(){return null===this.apiKey}getRpcRequest(e){const t=super.getRpcRequest(e);return t&&"eth_estimateGas"===t.method&&1==t.args.length&&(t.args=t.args.slice(),t.args.push("latest")),t}getRpcError(e,t){const r=t?t.error:null;if(r&&-32015===r.code&&!(0,n.isHexString)(r.data||"",!0)){const e={"assert(false)":"01","arithmetic underflow or overflow":"11","division or modulo by zero":"12","out-of-bounds array access; popping on an empty array":"31","out-of-bounds access of an array or bytesN":"32"};let t="";"VM execution error."===r.message?t=e[r.data]||"":e[r.message||""]&&(t=e[r.message||""]),t&&(r.message+=` (reverted: ${r.data})`,r.data="0x4e487b7100000000000000000000000000000000000000000000000000000000000000"+t)}else r&&-32e3===r.code&&"wrong transaction nonce"===r.message&&(r.message+=" (nonce too low)");return super.getRpcError(e,t)}static getRequest(e){const t=new n.FetchRequest(function(e){switch(e){case"mainnet":return"https://eth.blockscout.com/api/eth-rpc";case"sepolia":return"https://eth-sepolia.blockscout.com/api/eth-rpc";case"holesky":return"https://eth-holesky.blockscout.com/api/eth-rpc";case"classic":return"https://etc.blockscout.com/api/eth-rpc";case"arbitrum":return"https://arbitrum.blockscout.com/api/eth-rpc";case"base":return"https://base.blockscout.com/api/eth-rpc";case"base-sepolia":return"https://base-sepolia.blockscout.com/api/eth-rpc";case"matic":return"https://polygon.blockscout.com/api/eth-rpc";case"optimism":return"https://optimism.blockscout.com/api/eth-rpc";case"optimism-sepolia":return"https://optimism-sepolia.blockscout.com/api/eth-rpc";case"xdai":return"https://gnosis.blockscout.com/api/eth-rpc"}(0,n.assertArgument)(!1,"unsupported network","network",e)}(e.name));return t.allowGzip=!0,t}}t.BlockscoutProvider=s},99380:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.iif=void 0;var n=r(35884);t.iif=function(e,t,r){return n.defer((function(){return e()?t:r}))}},99412:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FixedNumber=void 0;const n=r(87415),i=r(1500),o=r(66508),s=r(8166),a=BigInt(-1),u=BigInt(0),c=BigInt(1),l=BigInt(5),f={};let h="0000";for(;h.length<80;)h+=h;function d(e){let t=h;for(;t.length<e;)t+=t;return BigInt("1"+t.substring(0,e))}function p(e,t,r){const n=BigInt(t.width);if(t.signed){const t=c<<n-c;(0,i.assert)(null==r||e>=-t&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=e>u?(0,o.fromTwos)((0,o.mask)(e,n),n):-(0,o.fromTwos)((0,o.mask)(-e,n),n)}else{const t=c<<n;(0,i.assert)(null==r||e>=0&&e<t,"overflow","NUMERIC_FAULT",{operation:r,fault:"overflow",value:e}),e=(e%t+t)%t&t-c}return e}function g(e){"number"==typeof e&&(e=`fixed128x${e}`);let t=!0,r=128,n=18;if("string"==typeof e)if("fixed"===e);else if("ufixed"===e)t=!1;else{const o=e.match(/^(u?)fixed([0-9]+)x([0-9]+)$/);(0,i.assertArgument)(o,"invalid fixed format","format",e),t="u"!==o[1],r=parseInt(o[2]),n=parseInt(o[3])}else if(e){const o=e,s=(e,t,r)=>null==o[e]?r:((0,i.assertArgument)(typeof o[e]===t,"invalid fixed format ("+e+" not "+t+")","format."+e,o[e]),o[e]);t=s("signed","boolean",t),r=s("width","number",r),n=s("decimals","number",n)}return(0,i.assertArgument)(r%8==0,"invalid FixedNumber width (not byte aligned)","format.width",r),(0,i.assertArgument)(n<=80,"invalid FixedNumber decimals (too large)","format.decimals",n),{signed:t,width:r,decimals:n,name:(t?"":"u")+"fixed"+String(r)+"x"+String(n)}}class b{format;#zt;#qt;#Gt;_value;constructor(e,t,r){(0,i.assertPrivate)(e,f,"FixedNumber"),this.#qt=t,this.#zt=r;const n=function(e,t){let r="";e<u&&(r="-",e*=a);let n=e.toString();if(0===t)return r+n;for(;n.length<=t;)n=h+n;const i=n.length-t;for(n=n.substring(0,i)+"."+n.substring(i);"0"===n[0]&&"."!==n[1];)n=n.substring(1);for(;"0"===n[n.length-1]&&"."!==n[n.length-2];)n=n.substring(0,n.length-1);return r+n}(t,r.decimals);(0,s.defineProperties)(this,{format:r.name,_value:n}),this.#Gt=d(r.decimals)}get signed(){return this.#zt.signed}get width(){return this.#zt.width}get decimals(){return this.#zt.decimals}get value(){return this.#qt}#Wt(e){(0,i.assertArgument)(this.format===e.format,"incompatible format; use fixedNumber.toFormat","other",e)}#Vt(e,t){return e=p(e,this.#zt,t),new b(f,e,this.#zt)}#Kt(e,t){return this.#Wt(e),this.#Vt(this.#qt+e.#qt,t)}addUnsafe(e){return this.#Kt(e)}add(e){return this.#Kt(e,"add")}#$t(e,t){return this.#Wt(e),this.#Vt(this.#qt-e.#qt,t)}subUnsafe(e){return this.#$t(e)}sub(e){return this.#$t(e,"sub")}#Jt(e,t){return this.#Wt(e),this.#Vt(this.#qt*e.#qt/this.#Gt,t)}mulUnsafe(e){return this.#Jt(e)}mul(e){return this.#Jt(e,"mul")}mulSignal(e){this.#Wt(e);const t=this.#qt*e.#qt;return(0,i.assert)(t%this.#Gt===u,"precision lost during signalling mul","NUMERIC_FAULT",{operation:"mulSignal",fault:"underflow",value:this}),this.#Vt(t/this.#Gt,"mulSignal")}#Qt(e,t){return(0,i.assert)(e.#qt!==u,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Wt(e),this.#Vt(this.#qt*this.#Gt/e.#qt,t)}divUnsafe(e){return this.#Qt(e)}div(e){return this.#Qt(e,"div")}divSignal(e){(0,i.assert)(e.#qt!==u,"division by zero","NUMERIC_FAULT",{operation:"div",fault:"divide-by-zero",value:this}),this.#Wt(e);const t=this.#qt*this.#Gt;return(0,i.assert)(t%e.#qt===u,"precision lost during signalling div","NUMERIC_FAULT",{operation:"divSignal",fault:"underflow",value:this}),this.#Vt(t/e.#qt,"divSignal")}cmp(e){let t=this.value,r=e.value;const n=this.decimals-e.decimals;return n>0?r*=d(n):n<0&&(t*=d(-n)),t<r?-1:t>r?1:0}eq(e){return 0===this.cmp(e)}lt(e){return this.cmp(e)<0}lte(e){return this.cmp(e)<=0}gt(e){return this.cmp(e)>0}gte(e){return this.cmp(e)>=0}floor(){let e=this.#qt;return this.#qt<u&&(e-=this.#Gt-c),e=this.#qt/this.#Gt*this.#Gt,this.#Vt(e,"floor")}ceiling(){let e=this.#qt;return this.#qt>u&&(e+=this.#Gt-c),e=this.#qt/this.#Gt*this.#Gt,this.#Vt(e,"ceiling")}round(e){if(null==e&&(e=0),e>=this.decimals)return this;const t=this.decimals-e,r=l*d(t-1);let n=this.value+r;const i=d(t);return n=n/i*i,p(n,this.#zt,"round"),new b(f,n,this.#zt)}isZero(){return this.#qt===u}isNegative(){return this.#qt<u}toString(){return this._value}toUnsafeFloat(){return parseFloat(this.toString())}toFormat(e){return b.fromString(this.toString(),e)}static fromValue(e,t,r){const n=null==t?0:(0,o.getNumber)(t),s=g(r);let a=(0,o.getBigInt)(e,"value");const c=n-s.decimals;if(c>0){const t=d(c);(0,i.assert)(a%t===u,"value loses precision for format","NUMERIC_FAULT",{operation:"fromValue",fault:"underflow",value:e}),a/=t}else c<0&&(a*=d(-c));return p(a,s,"fromValue"),new b(f,a,s)}static fromString(e,t){const r=e.match(/^(-?)([0-9]*)\.?([0-9]*)$/);(0,i.assertArgument)(r&&r[2].length+r[3].length>0,"invalid FixedNumber string value","value",e);const n=g(t);let o=r[2]||"0",s=r[3]||"";for(;s.length<n.decimals;)s+=h;(0,i.assert)(s.substring(n.decimals).match(/^0*$/),"too many decimals for format","NUMERIC_FAULT",{operation:"fromString",fault:"underflow",value:e}),s=s.substring(0,n.decimals);const a=BigInt(r[1]+o+s);return p(a,n,"fromString"),new b(f,a,n)}static fromBytes(e,t){let r=(0,o.toBigInt)((0,n.getBytes)(e,"value"));const i=g(t);return i.signed&&(r=(0,o.fromTwos)(r,i.width)),p(r,i,"fromBytes"),new b(f,r,i)}}t.FixedNumber=b},99483:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.sha384=t.sha512_256=t.sha512_224=t.sha512=t.SHA512=void 0;const n=r(95184),i=r(59975),o=r(74224),[s,a]=(()=>i.default.split(["0x428a2f98d728ae22","0x7137449123ef65cd","0xb5c0fbcfec4d3b2f","0xe9b5dba58189dbbc","0x3956c25bf348b538","0x59f111f1b605d019","0x923f82a4af194f9b","0xab1c5ed5da6d8118","0xd807aa98a3030242","0x12835b0145706fbe","0x243185be4ee4b28c","0x550c7dc3d5ffb4e2","0x72be5d74f27b896f","0x80deb1fe3b1696b1","0x9bdc06a725c71235","0xc19bf174cf692694","0xe49b69c19ef14ad2","0xefbe4786384f25e3","0x0fc19dc68b8cd5b5","0x240ca1cc77ac9c65","0x2de92c6f592b0275","0x4a7484aa6ea6e483","0x5cb0a9dcbd41fbd4","0x76f988da831153b5","0x983e5152ee66dfab","0xa831c66d2db43210","0xb00327c898fb213f","0xbf597fc7beef0ee4","0xc6e00bf33da88fc2","0xd5a79147930aa725","0x06ca6351e003826f","0x142929670a0e6e70","0x27b70a8546d22ffc","0x2e1b21385c26c926","0x4d2c6dfc5ac42aed","0x53380d139d95b3df","0x650a73548baf63de","0x766a0abb3c77b2a8","0x81c2c92e47edaee6","0x92722c851482353b","0xa2bfe8a14cf10364","0xa81a664bbc423001","0xc24b8b70d0f89791","0xc76c51a30654be30","0xd192e819d6ef5218","0xd69906245565a910","0xf40e35855771202a","0x106aa07032bbd1b8","0x19a4c116b8d2d0c8","0x1e376c085141ab53","0x2748774cdf8eeb99","0x34b0bcb5e19b48a8","0x391c0cb3c5c95a63","0x4ed8aa4ae3418acb","0x5b9cca4f7763e373","0x682e6ff3d6b2b8a3","0x748f82ee5defb2fc","0x78a5636f43172f60","0x84c87814a1f0ab72","0x8cc702081a6439ec","0x90befffa23631e28","0xa4506cebde82bde9","0xbef9a3f7b2c67915","0xc67178f2e372532b","0xca273eceea26619c","0xd186b8c721c0c207","0xeada7dd6cde0eb1e","0xf57d4f7fee6ed178","0x06f067aa72176fba","0x0a637dc5a2c898a6","0x113f9804bef90dae","0x1b710b35131c471b","0x28db77f523047d84","0x32caab7b40c72493","0x3c9ebe0a15c9bebc","0x431d67c49c100d4c","0x4cc5d4becb3e42b6","0x597f299cfc657e2a","0x5fcb6fab3ad6faec","0x6c44198c4a475817"].map((e=>BigInt(e)))))(),u=new Uint32Array(80),c=new Uint32Array(80);class l extends n.SHA2{constructor(){super(128,64,16,!1),this.Ah=1779033703,this.Al=-205731576,this.Bh=-1150833019,this.Bl=-2067093701,this.Ch=1013904242,this.Cl=-23791573,this.Dh=-1521486534,this.Dl=1595750129,this.Eh=1359893119,this.El=-1377402159,this.Fh=-1694144372,this.Fl=725511199,this.Gh=528734635,this.Gl=-79577749,this.Hh=1541459225,this.Hl=327033209}get(){const{Ah:e,Al:t,Bh:r,Bl:n,Ch:i,Cl:o,Dh:s,Dl:a,Eh:u,El:c,Fh:l,Fl:f,Gh:h,Gl:d,Hh:p,Hl:g}=this;return[e,t,r,n,i,o,s,a,u,c,l,f,h,d,p,g]}set(e,t,r,n,i,o,s,a,u,c,l,f,h,d,p,g){this.Ah=0|e,this.Al=0|t,this.Bh=0|r,this.Bl=0|n,this.Ch=0|i,this.Cl=0|o,this.Dh=0|s,this.Dl=0|a,this.Eh=0|u,this.El=0|c,this.Fh=0|l,this.Fl=0|f,this.Gh=0|h,this.Gl=0|d,this.Hh=0|p,this.Hl=0|g}process(e,t){for(let r=0;r<16;r++,t+=4)u[r]=e.getUint32(t),c[r]=e.getUint32(t+=4);for(let e=16;e<80;e++){const t=0|u[e-15],r=0|c[e-15],n=i.default.rotrSH(t,r,1)^i.default.rotrSH(t,r,8)^i.default.shrSH(t,r,7),o=i.default.rotrSL(t,r,1)^i.default.rotrSL(t,r,8)^i.default.shrSL(t,r,7),s=0|u[e-2],a=0|c[e-2],l=i.default.rotrSH(s,a,19)^i.default.rotrBH(s,a,61)^i.default.shrSH(s,a,6),f=i.default.rotrSL(s,a,19)^i.default.rotrBL(s,a,61)^i.default.shrSL(s,a,6),h=i.default.add4L(o,f,c[e-7],c[e-16]),d=i.default.add4H(h,n,l,u[e-7],u[e-16]);u[e]=0|d,c[e]=0|h}let{Ah:r,Al:n,Bh:o,Bl:l,Ch:f,Cl:h,Dh:d,Dl:p,Eh:g,El:b,Fh:y,Fl:m,Gh:v,Gl:w,Hh:E,Hl:A}=this;for(let e=0;e<80;e++){const t=i.default.rotrSH(g,b,14)^i.default.rotrSH(g,b,18)^i.default.rotrBH(g,b,41),_=i.default.rotrSL(g,b,14)^i.default.rotrSL(g,b,18)^i.default.rotrBL(g,b,41),S=g&y^~g&v,P=b&m^~b&w,k=i.default.add5L(A,_,P,a[e],c[e]),O=i.default.add5H(k,E,t,S,s[e],u[e]),x=0|k,M=i.default.rotrSH(r,n,28)^i.default.rotrBH(r,n,34)^i.default.rotrBH(r,n,39),B=i.default.rotrSL(r,n,28)^i.default.rotrBL(r,n,34)^i.default.rotrBL(r,n,39),T=r&o^r&f^o&f,I=n&l^n&h^l&h;E=0|v,A=0|w,v=0|y,w=0|m,y=0|g,m=0|b,({h:g,l:b}=i.default.add(0|d,0|p,0|O,0|x)),d=0|f,p=0|h,f=0|o,h=0|l,o=0|r,l=0|n;const C=i.default.add3L(x,B,I);r=i.default.add3H(C,O,M,T),n=0|C}({h:r,l:n}=i.default.add(0|this.Ah,0|this.Al,0|r,0|n)),({h:o,l}=i.default.add(0|this.Bh,0|this.Bl,0|o,0|l)),({h:f,l:h}=i.default.add(0|this.Ch,0|this.Cl,0|f,0|h)),({h:d,l:p}=i.default.add(0|this.Dh,0|this.Dl,0|d,0|p)),({h:g,l:b}=i.default.add(0|this.Eh,0|this.El,0|g,0|b)),({h:y,l:m}=i.default.add(0|this.Fh,0|this.Fl,0|y,0|m)),({h:v,l:w}=i.default.add(0|this.Gh,0|this.Gl,0|v,0|w)),({h:E,l:A}=i.default.add(0|this.Hh,0|this.Hl,0|E,0|A)),this.set(r,n,o,l,f,h,d,p,g,b,y,m,v,w,E,A)}roundClean(){u.fill(0),c.fill(0)}destroy(){this.buffer.fill(0),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}}t.SHA512=l;class f extends l{constructor(){super(),this.Ah=-1942145080,this.Al=424955298,this.Bh=1944164710,this.Bl=-1982016298,this.Ch=502970286,this.Cl=855612546,this.Dh=1738396948,this.Dl=1479516111,this.Eh=258812777,this.El=2077511080,this.Fh=2011393907,this.Fl=79989058,this.Gh=1067287976,this.Gl=1780299464,this.Hh=286451373,this.Hl=-1848208735,this.outputLen=28}}class h extends l{constructor(){super(),this.Ah=573645204,this.Al=-64227540,this.Bh=-1621794909,this.Bl=-934517566,this.Ch=596883563,this.Cl=1867755857,this.Dh=-1774684391,this.Dl=1497426621,this.Eh=-1775747358,this.El=-1467023389,this.Fh=-1101128155,this.Fl=1401305490,this.Gh=721525244,this.Gl=746961066,this.Hh=246885852,this.Hl=-2117784414,this.outputLen=32}}class d extends l{constructor(){super(),this.Ah=-876896931,this.Al=-1056596264,this.Bh=1654270250,this.Bl=914150663,this.Ch=-1856437926,this.Cl=812702999,this.Dh=355462360,this.Dl=-150054599,this.Eh=1731405415,this.El=-4191439,this.Fh=-1900787065,this.Fl=1750603025,this.Gh=-619958771,this.Gl=1694076839,this.Hh=1203062813,this.Hl=-1090891868,this.outputLen=48}}t.sha512=(0,o.wrapConstructor)((()=>new l)),t.sha512_224=(0,o.wrapConstructor)((()=>new f)),t.sha512_256=(0,o.wrapConstructor)((()=>new h)),t.sha384=(0,o.wrapConstructor)((()=>new d))},99516:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.partition=void 0;var n=r(14120),i=r(85934);t.partition=function(e,t){return function(r){return[i.filter(e,t)(r),i.filter(n.not(e,t))(r)]}}},99517:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.pipeFromArray=t.pipe=void 0;var n=r(87699);function i(e){return 0===e.length?n.identity:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}t.pipe=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return i(e)},t.pipeFromArray=i}},__webpack_module_cache__={};function __webpack_require__(e){var t=__webpack_module_cache__[e];if(void 0!==t)return t.exports;var r=__webpack_module_cache__[e]={id:e,loaded:!1,exports:{}};return __webpack_modules__[e].call(r.exports,r,r.exports,__webpack_require__),r.loaded=!0,r.exports}__webpack_require__.d=(e,t)=>{for(var r in t)__webpack_require__.o(t,r)&&!__webpack_require__.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},__webpack_require__.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),__webpack_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),__webpack_require__.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},__webpack_require__.nmd=e=>(e.paths=[],e.children||(e.children=[]),e);var __webpack_exports__=__webpack_require__(28156);return __webpack_exports__})()));
3
+ //# sourceMappingURL=shogun-core.js.map