diff --git a/rln-js/404.html b/rln-js/404.html index d55b13c..062a5ec 100644 --- a/rln-js/404.html +++ b/rln-js/404.html @@ -1 +1 @@ -404: This page could not be found.RLN Example

404

This page could not be found.

\ No newline at end of file +404: This page could not be found.RLN Example

404

This page could not be found.

\ No newline at end of file diff --git a/rln-js/_next/static/rjw8bcWMgChuVR1uWZlvT/_buildManifest.js b/rln-js/_next/static/M6oozOb_s2-llEXmo6VaL/_buildManifest.js similarity index 100% rename from rln-js/_next/static/rjw8bcWMgChuVR1uWZlvT/_buildManifest.js rename to rln-js/_next/static/M6oozOb_s2-llEXmo6VaL/_buildManifest.js diff --git a/rln-js/_next/static/rjw8bcWMgChuVR1uWZlvT/_ssgManifest.js b/rln-js/_next/static/M6oozOb_s2-llEXmo6VaL/_ssgManifest.js similarity index 100% rename from rln-js/_next/static/rjw8bcWMgChuVR1uWZlvT/_ssgManifest.js rename to rln-js/_next/static/M6oozOb_s2-llEXmo6VaL/_ssgManifest.js diff --git a/rln-js/_next/static/chunks/240-cd5c5e1cf9cc143f.js b/rln-js/_next/static/chunks/240-09f36703b8ace873.js similarity index 99% rename from rln-js/_next/static/chunks/240-cd5c5e1cf9cc143f.js rename to rln-js/_next/static/chunks/240-09f36703b8ace873.js index e47e0fc..c9f691c 100644 --- a/rln-js/_next/static/chunks/240-cd5c5e1cf9cc143f.js +++ b/rln-js/_next/static/chunks/240-09f36703b8ace873.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[240],{7420:function(){},5856:function(){},6601:function(){},2678:function(){},5819:function(){},4112:function(){},1265:function(){},5539:function(){},4280:function(e,t,r){Promise.resolve().then(r.bind(r,3663))},3663:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return Home}});var n,s,i,a,o,l,c,d,u,h=r(7437);(o||(o={})).FlexHorizontal="flex-horizontal";let Block=e=>{let t="flex-horizontal"===e.type?"items-center justify-between lg:flex":"",r=e.className||"";return(0,h.jsx)("div",{className:"".concat(t," ").concat(r),children:e.children})},Title=e=>(0,h.jsx)("h1",{className:"text-4xl ".concat(e.className||""),children:e.children}),Status=e=>(0,h.jsxs)("p",{className:"text-s",children:[e.text,":"," ",(0,h.jsx)("span",{className:"underline underline-offset-3 decoration-4 decoration-blue-400 dark:decoration-blue-600",children:e.mark})]});var m=r(4660);let g="none",y=(0,m.Ue)(e=>({appStatus:g,setAppStatus:t=>e(e=>({...e,appStatus:t})),ethAccount:"",setEthAccount:t=>e(e=>({...e,ethAccount:t})),chainID:void 0,setChainID:t=>e(e=>({...e,chainID:t})),lastMembershipID:void 0,setLastMembershipID:t=>e(e=>({...e,lastMembershipID:t})),credentials:void 0,setCredentials:t=>e(e=>({...e,credentials:t})),wakuStatus:g,setWakuStatus:t=>e(e=>({...e,wakuStatus:t})),activeCredential:g,setActiveCredential:t=>e(e=>({...e,activeCredential:t})),keystoreCredentials:[],setKeystoreCredentials:t=>e(e=>({...e,keystoreCredentials:t})),activeMembershipID:void 0,setActiveMembershipID:t=>e(e=>({...e,activeMembershipID:t}))}));var x=r(2265),k=r(379),f=r(3981);let isBrowserProviderValid=e=>!!e&&"function"==typeof e.request,isEthereumEvenEmitterValid=e=>!!e&&"function"==typeof e.on&&"function"==typeof e.removeListener;var p=r(3215),v=r.n(p);let b=new(v()).Type("ChatMessage").add(new(v()).Field("timestamp",1,"uint64")).add(new(v()).Field("nick",2,"string")).add(new(v()).Field("text",3,"string"));(n=l||(l={})).WASM_LOADING="WASM Blob download in progress...",n.WASM_FAILED="Failed to download WASM, check console",n.CONTRACT_LOADING="Connecting to RLN contract",n.CONTRACT_FAILED="Failed to connect to RLN contract",n.RLN_INITIALIZED="RLN dependencies initialized",n.KEYSTORE_LOCAL="Keystore initialized from localStore",n.KEYSTORE_NEW="New Keystore was initialized",n.CREDENTIALS_REGISTERING="Registering credentials...",n.CREDENTIALS_REGISTERED="Registered credentials",n.CREDENTIALS_FAILURE="Failed to register credentials, check console",(s=c||(c={})).Status="status",s.Keystore="keystore-changed";let N=new class{async init(){if(this.initialized||this.initializing)return;this.initializing=!0;let e=await this.initRLNWasm();await this.initRLNContract(e),this.emitStatusEvent(l.RLN_INITIALIZED),this.emitKeystoreKeys(),this.initialized=!0,this.initializing=!1}async initRLNWasm(){this.emitStatusEvent(l.WASM_LOADING);try{return this.rlnInstance=await (0,f.Ue)(),this.rlnInstance}catch(e){throw console.error("Failed at fetching WASM and creating RLN instance: ",e),this.emitStatusEvent(l.WASM_FAILED),e}}async initRLNContract(e){this.emitStatusEvent(l.CONTRACT_LOADING);try{this.rlnContract=await f.X.init(e,{registryAddress:f.d$.address,provider:this.ethProvider.getSigner()})}catch(e){throw console.error("Failed to connect to RLN contract: ",e),this.emitStatusEvent(l.CONTRACT_FAILED),e}}initKeystore(){let e=localStorage.getItem("keystore"),t=f.YK.fromString(e||"");return t||f.YK.create()}addEventListener(e,t){return this.emitter.addEventListener(e,t)}removeEventListener(e,t){return this.emitter.removeEventListener(e,t)}emitStatusEvent(e){this.emitter.dispatchEvent(new CustomEvent("status",{detail:e}))}emitKeystoreKeys(){let e=Object.keys(this.keystore.toObject().credentials||{});this.emitter.dispatchEvent(new CustomEvent("keystore-changed",{detail:e}))}async saveKeystore(){localStorage.setItem("keystore",this.keystore.toString()),this.emitKeystoreKeys()}importKeystore(e){this.keystore=f.YK.fromString(e)||f.YK.create(),this.saveKeystore()}constructor(){this.emitter=new EventTarget,this.initialized=!1,this.initializing=!1;let e=window.ethereum;if(!isBrowserProviderValid(e))throw Error("Invalid Ethereum provider present on the page. Check if MetaMask is connected.");this.ethProvider=new k.Q(e,"any"),this.keystore=this.initKeystore()}},useRLN=()=>{let{setAppStatus:e,setKeystoreCredentials:t}=y(),r=x.useRef(void 0);return x.useEffect(()=>{if(r.current||!N)return;let n=!1,statusListener=t=>{e(null==t?void 0:t.detail)};N.addEventListener(c.Status,statusListener);let keystoreListener=e=>{t((null==e?void 0:e.detail)||[])};N.addEventListener(c.Keystore,keystoreListener);let run=async()=>{n||(await (null==N?void 0:N.init()),r.current=N)};return run(),()=>{n=!0,null==N||N.removeEventListener(c.Status,statusListener),null==N||N.removeEventListener(c.Keystore,keystoreListener)}},[r,e]),{rln:r.current}},useWallet=()=>{let{rln:e}=useRLN(),{setEthAccount:t,setChainID:r,setCredentials:n}=y();x.useEffect(()=>{let e=window.ethereum;if(!isEthereumEvenEmitterValid(e)){console.log("Cannot subscribe to ethereum events.");return}let onAccountsChanged=e=>{t(e[0]||"")};e.on("accountsChanged",onAccountsChanged);let onChainChanged=e=>{let t=parseInt(e,16);r(t)};return e.on("chainChanged",onChainChanged),()=>{e.removeListener("chainChanged",onChainChanged),e.removeListener("accountsChanged",onAccountsChanged)}},[t,r]);let s=x.useCallback(async()=>{var t;if(!(null==e?void 0:e.ethProvider)){console.log("Cannot generate credentials, no provider found.");return}let r=e.ethProvider.getSigner(),s=await r.signMessage("".concat("The signature of this message will be used to generate your RLN credentials. Anyone accessing it may send messages on your behalf, please only share with the RLN dApp",". Nonce: ").concat(Math.ceil(1e3*Math.random()))),i=await (null===(t=e.rlnInstance)||void 0===t?void 0:t.generateSeededIdentityCredential(s));n(i)},[e,n]);return{onGenerateCredentials:s}},useContract=()=>{let{rln:e}=useRLN(),{setEthAccount:t,setChainID:r,setLastMembershipID:n}=y(),s=x.useCallback(async()=>{let s=new Promise(async n=>{if(!e){console.log("Cannot fetch wallet, not provider found."),n();return}try{let n=await e.ethProvider.send("eth_requestAccounts",[]);t(n[0]||"");let s=await e.ethProvider.getNetwork();r(s.chainId)}catch(e){console.error("Failed to connect to account: ",e)}n()}),i=new Promise(async t=>{if(!(null==e?void 0:e.rlnContract)||!(null==e?void 0:e.rlnInstance)){console.log("Cannot fetch contract info, no contract found."),t();return}try{await e.rlnContract.fetchMembers(e.rlnInstance),e.rlnContract.subscribeToMembers(e.rlnInstance);let t=e.rlnContract.members.at(-1);t&&n(t.index.toNumber())}catch(e){console.error("Failed to fetch contract state: ",e)}t()});await Promise.any([s,i])},[e,t,r,n]);return{onFetchContract:s}};var C=r(2355);(i=d||(d={})).Status="status",i.Message="message",(a=u||(u={})).INITIALIZING="Initializing",a.WAITING_FOR_PEERS="Waiting for peers",a.STARTING="Starting the node",a.READY="Ready";let E=new class{async init(e){this.initialized||this.initializing||!e.rln.rlnInstance||(this.initializing=!0,this.initEncoder(e),this.decoder=new f.pU(e.rln.rlnInstance,(0,C.UF)(this.contentTopic)),!this.node&&(this.emitStatusEvent("Initializing"),this.node=await (0,C.pq)({defaultBootstrap:!0}),this.emitStatusEvent("Starting the node"),await this.node.start(),this.emitStatusEvent("Waiting for peers"),await (0,C.gT)(this.node),this.emitStatusEvent("Ready"),e.rln.rlnContract&&await this.subscribeToMessages({node:this.node,decoder:this.decoder,rlnContract:e.rln.rlnContract})),this.initialized=!0,this.initializing=!1)}initEncoder(e){let{rln:t,membershipID:r,credentials:n}=e;t.rlnInstance&&(this.encoder=new f.vg((0,C.Mf)({ephemeral:!1,contentTopic:this.contentTopic}),t.rlnInstance,r,n))}async sendMessage(e,t){if(!this.node||!this.encoder)return;let r=new Date,n=b.create({text:t,nick:e,timestamp:Math.floor(r.valueOf()/1e3)}),s=b.encode(n).finish();console.log("Sending message with proof..."),await this.node.lightPush.send(this.encoder,{payload:s,timestamp:r}),console.log("Message sent!")}async subscribeToMessages(e){await e.node.filter.subscribe(e.decoder,t=>{try{let{timestamp:r,nick:n,text:s}=b.decode(t.payload),i="no proof";if(t.rateLimitProof){console.log("Proof received: ",t.rateLimitProof);try{console.time("Proof verification took:");let r=t.verify(e.rlnContract.roots());console.timeEnd("Proof verification took:"),i=r?"verified":"not verified"}catch(e){i="invalid",console.error("Failed to verify proof: ",e)}}this.emitMessageEvent({nick:n,text:s,proofStatus:i,time:new Date(r).toDateString()})}catch(e){console.error("Failed in subscription listener: ",e)}})}addEventListener(e,t){return this.emitter.addEventListener(e,t)}removeEventListener(e,t){return this.emitter.removeEventListener(e,t)}emitStatusEvent(e){this.emitter.dispatchEvent(new CustomEvent("status",{detail:e}))}emitMessageEvent(e){this.emitter.dispatchEvent(new CustomEvent("message",{detail:e}))}constructor(){this.contentTopic="/toy-chat/2/luzhou/proto",this.emitter=new EventTarget,this.initialized=!1,this.initializing=!1}},useWaku=()=>{let e=x.useRef(),[t,r]=x.useState([]),{rln:n}=useRLN(),{activeMembershipID:s,credentials:i,setWakuStatus:a}=y();x.useEffect(()=>{if(!i||!s||!n)return;let statusListener=e=>{a(e.detail||"")};E.addEventListener(d.Status,statusListener);let messagesListener=e=>{r(t=>[...t,e.detail])};E.addEventListener(d.Message,messagesListener);let t=!1,run=async()=>{if(t)return;let r={rln:n,credentials:i,membershipID:s};e.current?e.current.initEncoder(r):(await E.init(r),e.current=E)};return run(),()=>{t=!0,E.removeEventListener(d.Status,statusListener),E.removeEventListener(d.Message,messagesListener)}},[s,i,n,a]);let o=x.useCallback(async(t,r)=>{e.current&&await e.current.sendMessage(t,r)},[e]);return{onSend:o,messages:t}},Header=()=>{let{appStatus:e}=y();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Block,{className:"mb-5",type:o.FlexHorizontal,children:(0,h.jsx)(Title,{children:"Waku RLN"})}),(0,h.jsx)(Status,{text:"Application status",mark:e})]})},Subtitle=e=>(0,h.jsx)("h2",{className:"text-2xl ".concat(e.className||""),children:e.children}),Button=e=>(0,h.jsx)("button",{onClick:e.onClick,className:"".concat(e.className||""," py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"),children:e.children}),Waku_Waku=()=>{let{wakuStatus:e}=y(),{onSend:t,messages:r}=useWaku(),{nick:n,text:s,onNickChange:i,onMessageChange:a,resetText:o}=function(){let[e,t]=x.useState(""),[r,n]=x.useState("");return{nick:e,text:r,resetText:()=>{n("")},onNickChange:e=>{t(e.currentTarget.value||"")},onMessageChange:e=>{n(e.currentTarget.value||"")}}}(),onSendClick=async()=>{await t(n,s),o()},l=x.useMemo(()=>r.map(renderMessage),[r]);return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Subtitle,{children:["Waku",(0,h.jsx)("p",{className:"text-xs",children:"(select credentials to initialize)"})]}),(0,h.jsx)(Status,{text:"Waku status",mark:e}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("label",{htmlFor:"nick-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Your nickname"}),(0,h.jsx)("input",{type:"text",id:"nick-input",placeholder:"Choose a nickname",value:n,onChange:i,className:"w-full mr-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsxs)(Block,{className:"mb-2",children:[(0,h.jsx)("label",{htmlFor:"message-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Message"}),(0,h.jsx)("input",{type:"text",id:"message-input",value:s,onChange:a,placeholder:"Text your message here",className:"w-full mr-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsx)(Button,{onClick:onSendClick,children:"Send"})]}),(0,h.jsxs)(Block,{className:"mt-8",children:[(0,h.jsx)("p",{className:"text-l mb-4",children:"Messages"}),(0,h.jsx)("div",{children:(0,h.jsx)("ul",{children:l})})]})]})};function renderMessage(e){return(0,h.jsxs)("li",{className:"mb-4",children:[(0,h.jsxs)("p",{children:[(0,h.jsx)("span",{className:"text-lg",children:e.nick}),(0,h.jsxs)("span",{className:"text-sm font-bold",children:["(",e.proofStatus,", ",e.time,")"]}),":"]}),(0,h.jsx)("p",{children:e.text})]},"".concat(e.nick,"-").concat(e.time))}let useKeystore=()=>{let{rln:e}=useRLN(),{credentials:t,setActiveCredential:r,setActiveMembershipID:n,setAppStatus:s,setCredentials:i}=y(),a=x.useCallback(async i=>{if(t&&(null==e?void 0:e.rlnContract)&&i)try{s(l.CREDENTIALS_REGISTERING);let a=await e.rlnContract.registerWithKey(t),o=a.index.toNumber(),c=await e.keystore.addCredential({membership:{treeIndex:o,chainId:f.d$.chainId,address:f.d$.address},identity:t},i);r(c),n(o),e.saveKeystore(),s(l.CREDENTIALS_REGISTERED)}catch(e){s(l.CREDENTIALS_FAILURE),console.error("Failed to register to RLN Contract: ",e);return}},[t,e,r,n,s]),o=x.useCallback(async(t,s)=>{if(e&&t&&s)try{let a=await e.keystore.readCredential(t,s);a&&(i(a.identity),r(t),n(a.membership.treeIndex))}catch(e){console.error("Failed to read credentials from Keystore.");return}},[e,r,n,i]);return{onRegisterCredentials:a,onReadCredentials:o}},Keystore=()=>{let{keystoreCredentials:e}=y(),{onGenerateCredentials:t}=useWallet(),{onReadCredentials:r,onRegisterCredentials:n}=useKeystore(),{password:s,onPasswordChanged:i}=function(){let[e,t]=x.useState("");return{password:e,onPasswordChanged:e=>{t(e.currentTarget.value)}}}(),{selectedKeystore:a,onKeystoreChanged:l}=function(){let[e,t]=x.useState("");return{selectedKeystore:e,onKeystoreChanged:e=>{t(e.currentTarget.value||"")}}}(),{onExportKeystore:c,onImportKeystoreFileChange:d}=function(){let{rln:e}=useRLN(),onImportKeystoreFileChange=async t=>{var r,n;let s=null===(n=t.currentTarget)||void 0===n?void 0:null===(r=n.files)||void 0===r?void 0:r[0];if(!s||!e)return;let i=await s.text();e.importKeystore(i)};return{onExportKeystore:()=>{if(!e)return;let t="keystore.json",r=e.keystore.toString(),n=new File([r],t,{type:"application/json"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=t,s.click()},onImportKeystoreFileChange}}(),u=x.useMemo(()=>e.map(e=>(0,h.jsx)("option",{value:e,children:e},e)),[e]);return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)(Subtitle,{children:"Keystore"}),(0,h.jsxs)("div",{children:[(0,h.jsx)(Button,{children:(0,h.jsx)("label",{htmlFor:"keystore-import",className:"cursor-pointer",children:"Import"})}),(0,h.jsx)("input",{id:"keystore-import",type:"file",className:"hidden",onChange:d}),(0,h.jsx)(Button,{className:"ml-2",onClick:c,children:"Export"})]})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("label",{htmlFor:"keystore-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Password(used for reading/saving into Keystore)"}),(0,h.jsx)("input",{type:"text",value:s,id:"keystore-input",onChange:i,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm w-full rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("p",{className:"text-s mb-2",children:"Generate new credentials from wallet"}),(0,h.jsx)(Button,{onClick:t,children:"Generate new credentials"}),(0,h.jsx)(Button,{className:"ml-5",onClick:()=>n(s),children:"Register credentials"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("p",{className:"text-s",children:"Read from Keystore"}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("select",{value:a,onChange:l,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-3/4 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",children:u}),(0,h.jsx)(Button,{onClick:()=>r(a,s),children:"Read credentials"})]})]})]})},BlockchainInfo=()=>{let{ethAccount:e,lastMembershipID:t}=y(),{onFetchContract:r}=useContract();return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Block,{className:"mb-3",type:o.FlexHorizontal,children:[(0,h.jsx)(Subtitle,{children:"Contract"}),(0,h.jsx)(Button,{onClick:r,children:"Fetch state"})]}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Your address"}),(0,h.jsx)("code",{children:e||"Not loaded yet"})]}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Latest membership ID on contract"}),(0,h.jsx)("code",{children:t||"Not loaded yet"})]})]})};var j=r(9710);let KeystoreDetails=()=>{let{credentials:e,activeCredential:t,activeMembershipID:r}=y();return(0,h.jsxs)(Block,{className:"mt-5",children:[(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Keystore hash"}),(0,h.jsx)("code",{children:t||"none"})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Membership ID"}),(0,h.jsx)("code",{children:r||"none"})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Secret Hash"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDSecretHash)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Commitment"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDCommitment)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Nullifier"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDNullifier)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Trapdoor"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDTrapdoor)})]})]})};function renderBytes(e){return e?(0,j.ci)(e):"none"}function Home(){return(0,h.jsxs)("main",{className:"flex min-h-screen flex-col p-24 font-mono max-w-screen-lg m-auto",children:[(0,h.jsx)(Header,{}),(0,h.jsx)(BlockchainInfo,{}),(0,h.jsx)(Keystore,{}),(0,h.jsx)(KeystoreDetails,{}),(0,h.jsx)(Waku_Waku,{})]})}}}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[240],{7420:function(){},5856:function(){},6601:function(){},2678:function(){},5819:function(){},4112:function(){},1265:function(){},5539:function(){},4280:function(e,t,r){Promise.resolve().then(r.bind(r,3663))},3663:function(e,t,r){"use strict";r.r(t),r.d(t,{default:function(){return Home}});var n,s,i,a,o,l,c,d,u,h=r(7437);(o||(o={})).FlexHorizontal="flex-horizontal";let Block=e=>{let t="flex-horizontal"===e.type?"items-center justify-between lg:flex":"",r=e.className||"";return(0,h.jsx)("div",{className:"".concat(t," ").concat(r),children:e.children})},Title=e=>(0,h.jsx)("h1",{className:"text-4xl ".concat(e.className||""),children:e.children}),Status=e=>(0,h.jsxs)("p",{className:"text-s",children:[e.text,":"," ",(0,h.jsx)("span",{className:"underline underline-offset-3 decoration-4 decoration-blue-400 dark:decoration-blue-600",children:e.mark})]});var m=r(4660);let g="none",y=(0,m.Ue)(e=>({appStatus:g,setAppStatus:t=>e(e=>({...e,appStatus:t})),ethAccount:"",setEthAccount:t=>e(e=>({...e,ethAccount:t})),chainID:void 0,setChainID:t=>e(e=>({...e,chainID:t})),lastMembershipID:void 0,setLastMembershipID:t=>e(e=>({...e,lastMembershipID:t})),credentials:void 0,setCredentials:t=>e(e=>({...e,credentials:t})),wakuStatus:g,setWakuStatus:t=>e(e=>({...e,wakuStatus:t})),activeCredential:g,setActiveCredential:t=>e(e=>({...e,activeCredential:t})),keystoreCredentials:[],setKeystoreCredentials:t=>e(e=>({...e,keystoreCredentials:t})),activeMembershipID:void 0,setActiveMembershipID:t=>e(e=>({...e,activeMembershipID:t}))}));var x=r(2265),k=r(379),f=r(2279);let isBrowserProviderValid=e=>!!e&&"function"==typeof e.request,isEthereumEvenEmitterValid=e=>!!e&&"function"==typeof e.on&&"function"==typeof e.removeListener;var p=r(3215),v=r.n(p);let b=new(v()).Type("ChatMessage").add(new(v()).Field("timestamp",1,"uint64")).add(new(v()).Field("nick",2,"string")).add(new(v()).Field("text",3,"string"));(n=l||(l={})).WASM_LOADING="WASM Blob download in progress...",n.WASM_FAILED="Failed to download WASM, check console",n.CONTRACT_LOADING="Connecting to RLN contract",n.CONTRACT_FAILED="Failed to connect to RLN contract",n.RLN_INITIALIZED="RLN dependencies initialized",n.KEYSTORE_LOCAL="Keystore initialized from localStore",n.KEYSTORE_NEW="New Keystore was initialized",n.CREDENTIALS_REGISTERING="Registering credentials...",n.CREDENTIALS_REGISTERED="Registered credentials",n.CREDENTIALS_FAILURE="Failed to register credentials, check console",(s=c||(c={})).Status="status",s.Keystore="keystore-changed";let N=new class{async init(){if(this.initialized||this.initializing)return;this.initializing=!0;let e=await this.initRLNWasm();await this.initRLNContract(e),this.emitStatusEvent(l.RLN_INITIALIZED),this.emitKeystoreKeys(),this.initialized=!0,this.initializing=!1}async initRLNWasm(){this.emitStatusEvent(l.WASM_LOADING);try{return this.rlnInstance=await (0,f.Ue)(),this.rlnInstance}catch(e){throw console.error("Failed at fetching WASM and creating RLN instance: ",e),this.emitStatusEvent(l.WASM_FAILED),e}}async initRLNContract(e){this.emitStatusEvent(l.CONTRACT_LOADING);try{this.rlnContract=await f.X.init(e,{registryAddress:f.d$.address,provider:this.ethProvider.getSigner()})}catch(e){throw console.error("Failed to connect to RLN contract: ",e),this.emitStatusEvent(l.CONTRACT_FAILED),e}}initKeystore(){let e=localStorage.getItem("keystore"),t=f.YK.fromString(e||"");return t||f.YK.create()}addEventListener(e,t){return this.emitter.addEventListener(e,t)}removeEventListener(e,t){return this.emitter.removeEventListener(e,t)}emitStatusEvent(e){this.emitter.dispatchEvent(new CustomEvent("status",{detail:e}))}emitKeystoreKeys(){let e=Object.keys(this.keystore.toObject().credentials||{});this.emitter.dispatchEvent(new CustomEvent("keystore-changed",{detail:e}))}async saveKeystore(){localStorage.setItem("keystore",this.keystore.toString()),this.emitKeystoreKeys()}importKeystore(e){this.keystore=f.YK.fromString(e)||f.YK.create(),this.saveKeystore()}constructor(){this.emitter=new EventTarget,this.initialized=!1,this.initializing=!1;let e=window.ethereum;if(!isBrowserProviderValid(e))throw Error("Invalid Ethereum provider present on the page. Check if MetaMask is connected.");this.ethProvider=new k.Q(e,"any"),this.keystore=this.initKeystore()}},useRLN=()=>{let{setAppStatus:e,setKeystoreCredentials:t}=y(),r=x.useRef(void 0);return x.useEffect(()=>{if(r.current||!N)return;let n=!1,statusListener=t=>{e(null==t?void 0:t.detail)};N.addEventListener(c.Status,statusListener);let keystoreListener=e=>{t((null==e?void 0:e.detail)||[])};N.addEventListener(c.Keystore,keystoreListener);let run=async()=>{n||(await (null==N?void 0:N.init()),r.current=N)};return run(),()=>{n=!0,null==N||N.removeEventListener(c.Status,statusListener),null==N||N.removeEventListener(c.Keystore,keystoreListener)}},[r,e]),{rln:r.current}},useWallet=()=>{let{rln:e}=useRLN(),{setEthAccount:t,setChainID:r,setCredentials:n}=y();x.useEffect(()=>{let e=window.ethereum;if(!isEthereumEvenEmitterValid(e)){console.log("Cannot subscribe to ethereum events.");return}let onAccountsChanged=e=>{t(e[0]||"")};e.on("accountsChanged",onAccountsChanged);let onChainChanged=e=>{let t=parseInt(e,16);r(t)};return e.on("chainChanged",onChainChanged),()=>{e.removeListener("chainChanged",onChainChanged),e.removeListener("accountsChanged",onAccountsChanged)}},[t,r]);let s=x.useCallback(async()=>{var t;if(!(null==e?void 0:e.ethProvider)){console.log("Cannot generate credentials, no provider found.");return}let r=e.ethProvider.getSigner(),s=await r.signMessage("".concat("The signature of this message will be used to generate your RLN credentials. Anyone accessing it may send messages on your behalf, please only share with the RLN dApp",". Nonce: ").concat(Math.ceil(1e3*Math.random()))),i=await (null===(t=e.rlnInstance)||void 0===t?void 0:t.generateSeededIdentityCredential(s));n(i)},[e,n]);return{onGenerateCredentials:s}},useContract=()=>{let{rln:e}=useRLN(),{setEthAccount:t,setChainID:r,setLastMembershipID:n}=y(),s=x.useCallback(async()=>{let s=new Promise(async n=>{if(!e){console.log("Cannot fetch wallet, not provider found."),n();return}try{let n=await e.ethProvider.send("eth_requestAccounts",[]);t(n[0]||"");let s=await e.ethProvider.getNetwork();r(s.chainId)}catch(e){console.error("Failed to connect to account: ",e)}n()}),i=new Promise(async t=>{if(!(null==e?void 0:e.rlnContract)||!(null==e?void 0:e.rlnInstance)){console.log("Cannot fetch contract info, no contract found."),t();return}try{await e.rlnContract.fetchMembers(e.rlnInstance),e.rlnContract.subscribeToMembers(e.rlnInstance);let t=e.rlnContract.members.at(-1);t&&n(t.index.toNumber())}catch(e){console.error("Failed to fetch contract state: ",e)}t()});await Promise.any([s,i])},[e,t,r,n]);return{onFetchContract:s}};var C=r(2355);(i=d||(d={})).Status="status",i.Message="message",(a=u||(u={})).INITIALIZING="Initializing",a.WAITING_FOR_PEERS="Waiting for peers",a.STARTING="Starting the node",a.READY="Ready";let E=new class{async init(e){this.initialized||this.initializing||!e.rln.rlnInstance||(this.initializing=!0,this.initEncoder(e),this.decoder=new f.pU(e.rln.rlnInstance,(0,C.UF)(this.contentTopic)),!this.node&&(this.emitStatusEvent("Initializing"),this.node=await (0,C.pq)({defaultBootstrap:!0}),this.emitStatusEvent("Starting the node"),await this.node.start(),this.emitStatusEvent("Waiting for peers"),await (0,C.gT)(this.node),this.emitStatusEvent("Ready"),e.rln.rlnContract&&await this.subscribeToMessages({node:this.node,decoder:this.decoder,rlnContract:e.rln.rlnContract})),this.initialized=!0,this.initializing=!1)}initEncoder(e){let{rln:t,membershipID:r,credentials:n}=e;t.rlnInstance&&(this.encoder=new f.vg((0,C.Mf)({ephemeral:!1,contentTopic:this.contentTopic}),t.rlnInstance,r,n))}async sendMessage(e,t){if(!this.node||!this.encoder)return;let r=new Date,n=b.create({text:t,nick:e,timestamp:Math.floor(r.valueOf()/1e3)}),s=b.encode(n).finish();console.log("Sending message with proof..."),await this.node.lightPush.send(this.encoder,{payload:s,timestamp:r}),console.log("Message sent!")}async subscribeToMessages(e){await e.node.filter.subscribe(e.decoder,t=>{try{let{timestamp:r,nick:n,text:s}=b.decode(t.payload),i="no proof";if(t.rateLimitProof){console.log("Proof received: ",t.rateLimitProof);try{console.time("Proof verification took:");let r=t.verify(e.rlnContract.roots());console.timeEnd("Proof verification took:"),i=r?"verified":"not verified"}catch(e){i="invalid",console.error("Failed to verify proof: ",e)}}this.emitMessageEvent({nick:n,text:s,proofStatus:i,time:new Date(r).toDateString()})}catch(e){console.error("Failed in subscription listener: ",e)}})}addEventListener(e,t){return this.emitter.addEventListener(e,t)}removeEventListener(e,t){return this.emitter.removeEventListener(e,t)}emitStatusEvent(e){this.emitter.dispatchEvent(new CustomEvent("status",{detail:e}))}emitMessageEvent(e){this.emitter.dispatchEvent(new CustomEvent("message",{detail:e}))}constructor(){this.contentTopic="/toy-chat/2/luzhou/proto",this.emitter=new EventTarget,this.initialized=!1,this.initializing=!1}},useWaku=()=>{let e=x.useRef(),[t,r]=x.useState([]),{rln:n}=useRLN(),{activeMembershipID:s,credentials:i,setWakuStatus:a}=y();x.useEffect(()=>{if(!i||!s||!n)return;let statusListener=e=>{a(e.detail||"")};E.addEventListener(d.Status,statusListener);let messagesListener=e=>{r(t=>[...t,e.detail])};E.addEventListener(d.Message,messagesListener);let t=!1,run=async()=>{if(t)return;let r={rln:n,credentials:i,membershipID:s};e.current?e.current.initEncoder(r):(await E.init(r),e.current=E)};return run(),()=>{t=!0,E.removeEventListener(d.Status,statusListener),E.removeEventListener(d.Message,messagesListener)}},[s,i,n,a]);let o=x.useCallback(async(t,r)=>{e.current&&await e.current.sendMessage(t,r)},[e]);return{onSend:o,messages:t}},Header=()=>{let{appStatus:e}=y();return(0,h.jsxs)(h.Fragment,{children:[(0,h.jsx)(Block,{className:"mb-5",type:o.FlexHorizontal,children:(0,h.jsx)(Title,{children:"Waku RLN"})}),(0,h.jsx)(Status,{text:"Application status",mark:e})]})},Subtitle=e=>(0,h.jsx)("h2",{className:"text-2xl ".concat(e.className||""),children:e.children}),Button=e=>(0,h.jsx)("button",{onClick:e.onClick,className:"".concat(e.className||""," py-2.5 px-5 text-sm font-medium text-gray-900 focus:outline-none bg-white rounded-lg border border-gray-200 hover:bg-gray-100 hover:text-blue-700 focus:z-10 focus:ring-4 focus:ring-gray-200 dark:focus:ring-gray-700 dark:bg-gray-800 dark:text-gray-400 dark:border-gray-600 dark:hover:text-white dark:hover:bg-gray-700"),children:e.children}),Waku_Waku=()=>{let{wakuStatus:e}=y(),{onSend:t,messages:r}=useWaku(),{nick:n,text:s,onNickChange:i,onMessageChange:a,resetText:o}=function(){let[e,t]=x.useState(""),[r,n]=x.useState("");return{nick:e,text:r,resetText:()=>{n("")},onNickChange:e=>{t(e.currentTarget.value||"")},onMessageChange:e=>{n(e.currentTarget.value||"")}}}(),onSendClick=async()=>{await t(n,s),o()},l=x.useMemo(()=>r.map(renderMessage),[r]);return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Subtitle,{children:["Waku",(0,h.jsx)("p",{className:"text-xs",children:"(select credentials to initialize)"})]}),(0,h.jsx)(Status,{text:"Waku status",mark:e}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("label",{htmlFor:"nick-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Your nickname"}),(0,h.jsx)("input",{type:"text",id:"nick-input",placeholder:"Choose a nickname",value:n,onChange:i,className:"w-full mr-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsxs)(Block,{className:"mb-2",children:[(0,h.jsx)("label",{htmlFor:"message-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Message"}),(0,h.jsx)("input",{type:"text",id:"message-input",value:s,onChange:a,placeholder:"Text your message here",className:"w-full mr-2 bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsx)(Button,{onClick:onSendClick,children:"Send"})]}),(0,h.jsxs)(Block,{className:"mt-8",children:[(0,h.jsx)("p",{className:"text-l mb-4",children:"Messages"}),(0,h.jsx)("div",{children:(0,h.jsx)("ul",{children:l})})]})]})};function renderMessage(e){return(0,h.jsxs)("li",{className:"mb-4",children:[(0,h.jsxs)("p",{children:[(0,h.jsx)("span",{className:"text-lg",children:e.nick}),(0,h.jsxs)("span",{className:"text-sm font-bold",children:["(",e.proofStatus,", ",e.time,")"]}),":"]}),(0,h.jsx)("p",{children:e.text})]},"".concat(e.nick,"-").concat(e.time))}let useKeystore=()=>{let{rln:e}=useRLN(),{credentials:t,setActiveCredential:r,setActiveMembershipID:n,setAppStatus:s,setCredentials:i}=y(),a=x.useCallback(async i=>{if(t&&(null==e?void 0:e.rlnContract)&&i)try{s(l.CREDENTIALS_REGISTERING);let a=await e.rlnContract.registerWithKey(t),o=a.index.toNumber(),c=await e.keystore.addCredential({membership:{treeIndex:o,chainId:f.d$.chainId,address:f.d$.address},identity:t},i);r(c),n(o),e.saveKeystore(),s(l.CREDENTIALS_REGISTERED)}catch(e){s(l.CREDENTIALS_FAILURE),console.error("Failed to register to RLN Contract: ",e);return}},[t,e,r,n,s]),o=x.useCallback(async(t,s)=>{if(e&&t&&s)try{let a=await e.keystore.readCredential(t,s);a&&(i(a.identity),r(t),n(a.membership.treeIndex))}catch(e){console.error("Failed to read credentials from Keystore.");return}},[e,r,n,i]);return{onRegisterCredentials:a,onReadCredentials:o}},Keystore=()=>{let{keystoreCredentials:e}=y(),{onGenerateCredentials:t}=useWallet(),{onReadCredentials:r,onRegisterCredentials:n}=useKeystore(),{password:s,onPasswordChanged:i}=function(){let[e,t]=x.useState("");return{password:e,onPasswordChanged:e=>{t(e.currentTarget.value)}}}(),{selectedKeystore:a,onKeystoreChanged:l}=function(){let[e,t]=x.useState("");return{selectedKeystore:e,onKeystoreChanged:e=>{t(e.currentTarget.value||"")}}}(),{onExportKeystore:c,onImportKeystoreFileChange:d}=function(){let{rln:e}=useRLN(),onImportKeystoreFileChange=async t=>{var r,n;let s=null===(n=t.currentTarget)||void 0===n?void 0:null===(r=n.files)||void 0===r?void 0:r[0];if(!s||!e)return;let i=await s.text();e.importKeystore(i)};return{onExportKeystore:()=>{if(!e)return;let t="keystore.json",r=e.keystore.toString(),n=new File([r],t,{type:"application/json"}),s=document.createElement("a");s.href=URL.createObjectURL(n),s.download=t,s.click()},onImportKeystoreFileChange}}(),u=x.useMemo(()=>e.map(e=>(0,h.jsx)("option",{value:e,children:e},e)),[e]);return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)(Subtitle,{children:"Keystore"}),(0,h.jsxs)("div",{children:[(0,h.jsx)(Button,{children:(0,h.jsx)("label",{htmlFor:"keystore-import",className:"cursor-pointer",children:"Import"})}),(0,h.jsx)("input",{id:"keystore-import",type:"file",className:"hidden",onChange:d}),(0,h.jsx)(Button,{className:"ml-2",onClick:c,children:"Export"})]})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("label",{htmlFor:"keystore-input",className:"block mb-2 text-sm font-medium text-gray-900 dark:text-white",children:"Password(used for reading/saving into Keystore)"}),(0,h.jsx)("input",{type:"text",value:s,id:"keystore-input",onChange:i,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm w-full rounded-lg focus:ring-blue-500 focus:border-blue-500 block p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("p",{className:"text-s mb-2",children:"Generate new credentials from wallet"}),(0,h.jsx)(Button,{onClick:t,children:"Generate new credentials"}),(0,h.jsx)(Button,{className:"ml-5",onClick:()=>n(s),children:"Register credentials"})]}),(0,h.jsxs)(Block,{className:"mt-4",children:[(0,h.jsx)("p",{className:"text-s",children:"Read from Keystore"}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("select",{value:a,onChange:l,className:"bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-3/4 p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500",children:u}),(0,h.jsx)(Button,{onClick:()=>r(a,s),children:"Read credentials"})]})]})]})},BlockchainInfo=()=>{let{ethAccount:e,lastMembershipID:t}=y(),{onFetchContract:r}=useContract();return(0,h.jsxs)(Block,{className:"mt-10",children:[(0,h.jsxs)(Block,{className:"mb-3",type:o.FlexHorizontal,children:[(0,h.jsx)(Subtitle,{children:"Contract"}),(0,h.jsx)(Button,{onClick:r,children:"Fetch state"})]}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Your address"}),(0,h.jsx)("code",{children:e||"Not loaded yet"})]}),(0,h.jsxs)(Block,{type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Latest membership ID on contract"}),(0,h.jsx)("code",{children:t||"Not loaded yet"})]})]})};var j=r(9710);let KeystoreDetails=()=>{let{credentials:e,activeCredential:t,activeMembershipID:r}=y();return(0,h.jsxs)(Block,{className:"mt-5",children:[(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Keystore hash"}),(0,h.jsx)("code",{children:t||"none"})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Membership ID"}),(0,h.jsx)("code",{children:r||"none"})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Secret Hash"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDSecretHash)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Commitment"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDCommitment)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Nullifier"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDNullifier)})]}),(0,h.jsxs)(Block,{className:"mt-3",type:o.FlexHorizontal,children:[(0,h.jsx)("p",{children:"Trapdoor"}),(0,h.jsx)("code",{children:renderBytes(null==e?void 0:e.IDTrapdoor)})]})]})};function renderBytes(e){return e?(0,j.ci)(e):"none"}function Home(){return(0,h.jsxs)("main",{className:"flex min-h-screen flex-col p-24 font-mono max-w-screen-lg m-auto",children:[(0,h.jsx)(Header,{}),(0,h.jsx)(BlockchainInfo,{}),(0,h.jsx)(Keystore,{}),(0,h.jsx)(KeystoreDetails,{}),(0,h.jsx)(Waku_Waku,{})]})}}}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/472-904a395439c7cfd8.js b/rln-js/_next/static/chunks/472-904a395439c7cfd8.js deleted file mode 100644 index 9f7c441..0000000 --- a/rln-js/_next/static/chunks/472-904a395439c7cfd8.js +++ /dev/null @@ -1,25 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[472],{5844:function(e,t){"use strict";function getDeploymentIdQueryOrEmptyString(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return getDeploymentIdQueryOrEmptyString}})},2335:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]})},9872:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return addBasePath}});let n=r(8356),a=r(3997);function addBasePath(e,t){return(0,a.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,""))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5354:function(e,t){"use strict";function appBootstrap(e){var t,r;t=self.__next_s,r=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[r,n]=t;return e.then(()=>new Promise((e,t)=>{let a=document.createElement("script");if(n)for(let e in n)"children"!==e&&a.setAttribute(e,n[e]);r?(a.src=r,a.onload=()=>e(),a.onerror=t):n&&(a.innerHTML=n.children,setTimeout(e)),document.head.appendChild(a)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return appBootstrap}}),window.next={version:"13.5.6",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return callServer}});let n=r(3728);async function callServer(e,t){let r=(0,n.getServerActionDispatcher)();if(!r)throw Error("Invariant: missing action dispatcher.");return new Promise((n,a)=>{r({actionId:e,actionArgs:t,resolve:n,reject:a})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},811:function(e,t,r){"use strict";let n,a;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return hydrate}});let o=r(1024),u=r(8533);r(2335);let l=o._(r(4040)),i=u._(r(2265)),s=r(6671),p=r(1852);r(6313);let _=o._(r(2504)),b=r(5231),v=r(4119),m=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),r=0;r{if((0,v.isNextRouterError)(e.error)){e.preventDefault();return}});let E=document,getCacheKey=()=>{let{pathname:e,search:t}=location;return e+t},j=new TextEncoder,C=!1,w=!1,A=null;function nextServerDataCallback(e){if(0===e[0])n=[];else if(1===e[0]){if(!n)throw Error("Unexpected server data: missing bootstrap script.");a?a.enqueue(j.encode(e[1])):n.push(e[1])}else 2===e[0]&&(A=e[1])}let DOMContentLoaded=function(){a&&!w&&(a.close(),w=!0,n=void 0),C=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",DOMContentLoaded,!1):DOMContentLoaded();let F=self.__next_f=self.__next_f||[];F.forEach(nextServerDataCallback),F.push=nextServerDataCallback;let D=new Map;function ServerRoot(e){let{cacheKey:t}=e;i.default.useEffect(()=>{D.delete(t)});let r=function(e){let t=D.get(e);if(t)return t;let r=new ReadableStream({start(e){n&&(n.forEach(t=>{e.enqueue(j.encode(t))}),C&&!w&&(e.close(),w=!0,n=void 0)),a=e}}),o=(0,s.createFromReadableStream)(r,{callServer:b.callServer});return D.set(e,o),o}(t),o=(0,i.use)(r);return o}let U=i.default.StrictMode;function Root(e){let{children:t}=e;return t}function RSCComponent(e){return i.default.createElement(ServerRoot,{...e,cacheKey:getCacheKey()})}function hydrate(){let e=i.default.createElement(U,null,i.default.createElement(p.HeadManagerContext.Provider,{value:{appDir:!0}},i.default.createElement(Root,null,i.default.createElement(RSCComponent,null)))),t={onRecoverableError:_.default},r="__next_error__"===document.documentElement.id;r?l.default.createRoot(E,t).render(e):i.default.startTransition(()=>l.default.hydrateRoot(E,e,{...t,experimental_formState:A}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2019:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(5354);(0,n.appBootstrap)(()=>{r(1055);let{hydrate:e}=r(811);r(3728),r(6954),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1055:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(5844);{let e=r.u;r.u=function(){for(var t=arguments.length,r=Array(t),n=0;n{let e=function(){var e;let t=document.getElementsByName(o)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(o);e.style.cssText="position:absolute";let t=document.createElement("div");t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal";let r=e.attachShadow({mode:"open"});return r.appendChild(t),document.body.appendChild(e),t}}();return u(e),()=>{let e=document.getElementsByTagName(o)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}},[]);let[l,i]=(0,n.useState)(""),s=(0,n.useRef)();return(0,n.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==s.current&&s.current!==e&&i(e),s.current=e},[t]),r?(0,a.createPortal)(l,r):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8343:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RSC:function(){return r},ACTION:function(){return n},NEXT_ROUTER_STATE_TREE:function(){return a},NEXT_ROUTER_PREFETCH:function(){return o},NEXT_URL:function(){return u},RSC_CONTENT_TYPE_HEADER:function(){return l},RSC_VARY_HEADER:function(){return i},FLIGHT_PARAMETERS:function(){return s},NEXT_RSC_UNION_QUERY:function(){return p}});let r="RSC",n="Next-Action",a="Next-Router-State-Tree",o="Next-Router-Prefetch",u="Next-Url",l="text/x-component",i=r+", "+a+", "+o+", "+u,s=[[r],[a],[o]],p="_rsc";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3728:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getServerActionDispatcher:function(){return getServerActionDispatcher},urlToUrlWithoutFlightMarker:function(){return urlToUrlWithoutFlightMarker},default:function(){return AppRouter}});let n=r(8533),a=n._(r(2265)),o=r(6313),u=r(7205),l=r(9706),i=r(2301),s=r(7407),p=r(2327),_=r(9928),b=r(5311),v=r(2169),m=r(9872),E=r(8325),j=r(5138),C=r(6700),w=r(3085),A=r(8343),F=r(3714),D=r(6746),U=new Map,B=null;function getServerActionDispatcher(){return B}let $={refresh:()=>{}};function urlToUrlWithoutFlightMarker(e){let t=new URL(e,location.origin);if(t.searchParams.delete(A.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,r=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-r)}return t}function isExternalURL(e){return e.origin!==window.location.origin}function HistoryUpdater(e){let{tree:t,pushRef:r,canonicalUrl:n,sync:o}=e;return(0,a.useInsertionEffect)(()=>{let e={__NA:!0,tree:t};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==n?(r.pendingPush=!1,window.history.pushState(e,"",n)):window.history.replaceState(e,"",n),o()},[t,r,n,o]),null}let createEmptyCacheNode=()=>({status:o.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map});function Router(e){let{buildId:t,initialHead:r,initialTree:n,initialCanonicalUrl:_,children:A,assetPrefix:z}=e,K=(0,a.useMemo)(()=>(0,b.createInitialRouterState)({buildId:t,children:A,initialCanonicalUrl:_,initialTree:n,initialParallelRoutes:U,isServer:!1,location:window.location,initialHead:r}),[t,A,_,n,r]),[{tree:q,cache:ee,prefetchCache:et,pushRef:er,focusAndScrollRef:en,canonicalUrl:ea,nextUrl:eo},eu,el]=(0,p.useReducerWithReduxDevtools)(u.reducer,K);(0,a.useEffect)(()=>{U=null},[]);let{searchParams:ei,pathname:ec}=(0,a.useMemo)(()=>{let e=new URL(ea,window.location.href);return{searchParams:e.searchParams,pathname:(0,D.hasBasePath)(e.pathname)?(0,F.removeBasePath)(e.pathname):e.pathname}},[ea]),es=(0,a.useCallback)((e,t,r)=>{(0,a.startTransition)(()=>{eu({type:l.ACTION_SERVER_PATCH,flightData:t,previousTree:e,overrideCanonicalUrl:r,cache:createEmptyCacheNode(),mutable:{globalMutable:$}})})},[eu]),ef=(0,a.useCallback)((e,t,r,n)=>{let a=new URL((0,m.addBasePath)(e),location.href);return $.pendingNavigatePath=(0,i.createHrefFromUrl)(a),eu({type:l.ACTION_NAVIGATE,url:a,isExternalUrl:isExternalURL(a),locationSearch:location.search,forceOptimisticNavigation:r,shouldScroll:null==n||n,navigateType:t,cache:createEmptyCacheNode(),mutable:{globalMutable:$}})},[eu]);!function(e){let t=(0,a.useCallback)(t=>{(0,a.startTransition)(()=>{e({...t,type:l.ACTION_SERVER_ACTION,mutable:{globalMutable:$},cache:createEmptyCacheNode()})})},[e]);B=t}(eu);let ed=(0,a.useMemo)(()=>{let e={back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{if((0,v.isBot)(window.navigator.userAgent))return;let r=new URL((0,m.addBasePath)(e),location.href);isExternalURL(r)||(0,a.startTransition)(()=>{var e;eu({type:l.ACTION_PREFETCH,url:r,kind:null!=(e=null==t?void 0:t.kind)?e:l.PrefetchKind.FULL})})},replace:(e,t)=>{void 0===t&&(t={}),(0,a.startTransition)(()=>{var r;ef(e,"replace",!!t.forceOptimisticNavigation,null==(r=t.scroll)||r)})},push:(e,t)=>{void 0===t&&(t={}),(0,a.startTransition)(()=>{var r;ef(e,"push",!!t.forceOptimisticNavigation,null==(r=t.scroll)||r)})},refresh:()=>{(0,a.startTransition)(()=>{eu({type:l.ACTION_REFRESH,cache:createEmptyCacheNode(),mutable:{globalMutable:$},origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}};return e},[eu,ef]);if((0,a.useEffect)(()=>{window.next&&(window.next.router=ed)},[ed]),(0,a.useEffect)(()=>{$.refresh=ed.refresh},[ed.refresh]),(0,a.useEffect)(()=>{function handlePageShow(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.tree)&&eu({type:l.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.tree})}return window.addEventListener("pageshow",handlePageShow),()=>{window.removeEventListener("pageshow",handlePageShow)}},[eu]),er.mpaNavigation){if($.pendingMpaPath!==ea){let e=window.location;er.pendingPush?e.assign(ea):e.replace(ea),$.pendingMpaPath=ea}(0,a.use)((0,w.createInfinitePromise)())}let ep=(0,a.useCallback)(e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,a.startTransition)(()=>{eu({type:l.ACTION_RESTORE,url:new URL(window.location.href),tree:t.tree})})}},[eu]);(0,a.useEffect)(()=>(window.addEventListener("popstate",ep),()=>{window.removeEventListener("popstate",ep)}),[ep]);let eh=(0,a.useMemo)(()=>(0,C.findHeadInCache)(ee,q[1]),[ee,q]),ey=a.default.createElement(j.RedirectBoundary,null,eh,ee.subTreeData,a.default.createElement(E.AppRouterAnnouncer,{tree:q}));return a.default.createElement(a.default.Fragment,null,a.default.createElement(HistoryUpdater,{tree:q,pushRef:er,canonicalUrl:ea,sync:el}),a.default.createElement(s.PathnameContext.Provider,{value:ec},a.default.createElement(s.SearchParamsContext.Provider,{value:ei},a.default.createElement(o.GlobalLayoutRouterContext.Provider,{value:{buildId:t,changeByServerResponse:es,tree:q,focusAndScrollRef:en,nextUrl:eo}},a.default.createElement(o.AppRouterContext.Provider,{value:ed},a.default.createElement(o.LayoutRouterContext.Provider,{value:{childNodes:ee.parallelRoutes,tree:q,url:ea}},ey))))))}function AppRouter(e){let{globalErrorComponent:t,...r}=e;return a.default.createElement(_.ErrorBoundary,{errorComponent:t},a.default.createElement(Router,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3940:function(e,t,r){"use strict";function clientHookInServerComponentError(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return clientHookInServerComponentError}}),r(1024),r(2265),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9928:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ErrorBoundaryHandler:function(){return ErrorBoundaryHandler},GlobalError:function(){return GlobalError},default:function(){return l},ErrorBoundary:function(){return ErrorBoundary}});let n=r(1024),a=n._(r(2265)),o=r(94),u={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};let ErrorBoundaryHandler=class ErrorBoundaryHandler extends a.default.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?a.default.createElement(a.default.Fragment,null,this.props.errorStyles,a.default.createElement(this.props.errorComponent,{error:this.state.error,reset:this.reset})):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}};function GlobalError(e){let{error:t}=e,r=null==t?void 0:t.digest;return a.default.createElement("html",{id:"__next_error__"},a.default.createElement("head",null),a.default.createElement("body",null,a.default.createElement("div",{style:u.error},a.default.createElement("div",null,a.default.createElement("h2",{style:u.text},"Application error: a "+(r?"server":"client")+"-side exception has occurred (see the "+(r?"server logs":"browser console")+" for more information)."),r?a.default.createElement("p",{style:u.text},"Digest: "+r):null))))}let l=GlobalError;function ErrorBoundary(e){let{errorComponent:t,errorStyles:r,children:n}=e,u=(0,o.usePathname)();return t?a.default.createElement(ErrorBoundaryHandler,{pathname:u,errorComponent:t,errorStyles:r},n):a.default.createElement(a.default.Fragment,null,n)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1351:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DYNAMIC_ERROR_CODE:function(){return r},DynamicServerError:function(){return DynamicServerError}});let r="DYNAMIC_SERVER_USAGE";let DynamicServerError=class DynamicServerError extends Error{constructor(e){super("Dynamic server usage: "+e),this.digest=r}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3085:function(e,t){"use strict";let r;function createInfinitePromise(){return r||(r=new Promise(()=>{})),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInfinitePromise",{enumerable:!0,get:function(){return createInfinitePromise}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return isNextRouterError}});let n=r(9273),a=r(8466);function isNextRouterError(e){return e&&e.digest&&((0,a.isRedirectError)(e)||(0,n.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6954:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return OuterLayoutRouter}});let n=r(1024),a=r(8533),o=a._(r(2265)),u=n._(r(4887)),l=r(6313),i=r(8146),s=r(3085),p=r(9928),_=r(8163),b=r(280),v=r(5138),m=r(3170),E=r(1263),j=r(3322),C=r(3559),w=["bottom","height","left","right","top","width","x","y"];function topOfElementInViewport(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}let InnerScrollAndFocusHandler=class InnerScrollAndFocusHandler extends o.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var r;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,r)=>(0,_.matchSegment)(t,e[r]))))return;let n=null,a=e.hashFragment;if(a&&(n="top"===a?document.body:null!=(r=document.getElementById(a))?r:document.getElementsByName(a)[0]),n||(n=u.default.findDOMNode(this)),!(n instanceof Element))return;for(;!(n instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return w.every(e=>0===t[e])}(n);){if(null===n.nextElementSibling)return;n=n.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,b.handleSmoothScroll)(()=>{if(a){n.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!topOfElementInViewport(n,t)&&(e.scrollTop=0,topOfElementInViewport(n,t)||n.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,n.focus()}}}};function ScrollAndFocusHandler(e){let{segmentPath:t,children:r}=e,n=(0,o.useContext)(l.GlobalLayoutRouterContext);if(!n)throw Error("invariant global layout router not mounted");return o.default.createElement(InnerScrollAndFocusHandler,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef},r)}function InnerLayoutRouter(e){let{parallelRouterKey:t,url:r,childNodes:n,childProp:a,segmentPath:u,tree:p,cacheKey:b}=e,v=(0,o.useContext)(l.GlobalLayoutRouterContext);if(!v)throw Error("invariant global layout router not mounted");let{buildId:m,changeByServerResponse:E,tree:j}=v,w=n.get(b);if(a&&null!==a.current&&(w?w.status===l.CacheStates.LAZY_INITIALIZED&&(w.status=l.CacheStates.READY,w.subTreeData=a.current):(w={status:l.CacheStates.READY,data:null,subTreeData:a.current,parallelRoutes:new Map},n.set(b,w))),!w||w.status===l.CacheStates.LAZY_INITIALIZED){let e=function walkAddRefetch(e,t){if(e){let[r,n]=e,a=2===e.length;if((0,_.matchSegment)(t[0],r)&&t[1].hasOwnProperty(n)){if(a){let e=walkAddRefetch(void 0,t[1][n]);return[t[0],{...t[1],[n]:[e[0],e[1],e[2],"refetch"]}]}return[t[0],{...t[1],[n]:walkAddRefetch(e.slice(2),t[1][n])}]}}return t}(["",...u],j);w={status:l.CacheStates.DATA_FETCH,data:(0,C.createRecordFromThenable)((0,i.fetchServerResponse)(new URL(r,location.origin),e,v.nextUrl,m)),subTreeData:null,head:w&&w.status===l.CacheStates.LAZY_INITIALIZED?w.head:void 0,parallelRoutes:w&&w.status===l.CacheStates.LAZY_INITIALIZED?w.parallelRoutes:new Map},n.set(b,w)}if(!w)throw Error("Child node should always exist");if(w.subTreeData&&w.data)throw Error("Child node should not have both subTreeData and data");if(w.data){let[e,t]=(0,o.use)(w.data);w.data=null,setTimeout(()=>{(0,o.startTransition)(()=>{E(j,e,t)})}),(0,o.use)((0,s.createInfinitePromise)())}w.subTreeData||(0,o.use)((0,s.createInfinitePromise)());let A=o.default.createElement(l.LayoutRouterContext.Provider,{value:{tree:p[1][t],childNodes:w.parallelRoutes,url:r}},w.subTreeData);return A}function LoadingBoundary(e){let{children:t,loading:r,loadingStyles:n,hasLoading:a}=e;return a?o.default.createElement(o.Suspense,{fallback:o.default.createElement(o.default.Fragment,null,n,r)},t):o.default.createElement(o.default.Fragment,null,t)}function OuterLayoutRouter(e){let{parallelRouterKey:t,segmentPath:r,childProp:n,error:a,errorStyles:u,templateStyles:i,loading:s,loadingStyles:b,hasLoading:C,template:w,notFound:A,notFoundStyles:F,styles:D}=e,U=(0,o.useContext)(l.LayoutRouterContext);if(!U)throw Error("invariant expected layout router to be mounted");let{childNodes:B,tree:$,url:z}=U,K=B.get(t);K||(K=new Map,B.set(t,K));let q=$[1][t][0],ee=n.segment,et=(0,E.getSegmentValue)(q),er=[q];return o.default.createElement(o.default.Fragment,null,D,er.map(e=>{let D=(0,_.matchSegment)(e,ee),U=(0,E.getSegmentValue)(e),B=(0,j.createRouterCacheKey)(e);return o.default.createElement(l.TemplateContext.Provider,{key:(0,j.createRouterCacheKey)(e,!0),value:o.default.createElement(ScrollAndFocusHandler,{segmentPath:r},o.default.createElement(p.ErrorBoundary,{errorComponent:a,errorStyles:u},o.default.createElement(LoadingBoundary,{hasLoading:C,loading:s,loadingStyles:b},o.default.createElement(m.NotFoundBoundary,{notFound:A,notFoundStyles:F},o.default.createElement(v.RedirectBoundary,null,o.default.createElement(InnerLayoutRouter,{parallelRouterKey:t,url:z,tree:$,childNodes:K,childProp:D?n:null,segmentPath:r,cacheKey:B,isActive:et===U}))))))},i,w)}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8163:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{matchSegment:function(){return matchSegment},canSegmentBeOverridden:function(){return canSegmentBeOverridden}});let n=r(5682),matchSegment=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],canSegmentBeOverridden=(e,t)=>{var r;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(r=(0,n.getSegmentParam)(e))?void 0:r.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return ReadonlyURLSearchParams},useSearchParams:function(){return useSearchParams},usePathname:function(){return usePathname},ServerInsertedHTMLContext:function(){return i.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return i.useServerInsertedHTML},useRouter:function(){return useRouter},useParams:function(){return useParams},useSelectedLayoutSegments:function(){return useSelectedLayoutSegments},useSelectedLayoutSegment:function(){return useSelectedLayoutSegment},redirect:function(){return s.redirect},permanentRedirect:function(){return s.permanentRedirect},RedirectType:function(){return s.RedirectType},notFound:function(){return p.notFound}});let n=r(2265),a=r(6313),o=r(7407),u=r(3940),l=r(1263),i=r(3972),s=r(8466),p=r(9273),_=Symbol("internal for urlsearchparams readonly");function readonlyURLSearchParamsError(){return Error("ReadonlyURLSearchParams cannot be modified")}let ReadonlyURLSearchParams=class ReadonlyURLSearchParams{[Symbol.iterator](){return this[_][Symbol.iterator]()}append(){throw readonlyURLSearchParamsError()}delete(){throw readonlyURLSearchParamsError()}set(){throw readonlyURLSearchParamsError()}sort(){throw readonlyURLSearchParamsError()}constructor(e){this[_]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}};function useSearchParams(){(0,u.clientHookInServerComponentError)("useSearchParams");let e=(0,n.useContext)(o.SearchParamsContext),t=(0,n.useMemo)(()=>e?new ReadonlyURLSearchParams(e):null,[e]);return t}function usePathname(){return(0,u.clientHookInServerComponentError)("usePathname"),(0,n.useContext)(o.PathnameContext)}function useRouter(){(0,u.clientHookInServerComponentError)("useRouter");let e=(0,n.useContext)(a.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function useParams(){(0,u.clientHookInServerComponentError)("useParams");let e=(0,n.useContext)(a.GlobalLayoutRouterContext),t=(0,n.useContext)(o.PathParamsContext);return(0,n.useMemo)(()=>(null==e?void 0:e.tree)?function getSelectedParams(e,t){void 0===t&&(t={});let r=e[1];for(let e of Object.values(r)){let r=e[0],n=Array.isArray(r),a=n?r[1]:r;if(!a||a.startsWith("__PAGE__"))continue;let o=n&&("c"===r[2]||"oc"===r[2]);o?t[r[0]]=r[1].split("/"):n&&(t[r[0]]=r[1]),t=getSelectedParams(e,t)}return t}(e.tree):t,[null==e?void 0:e.tree,t])}function useSelectedLayoutSegments(e){void 0===e&&(e="children"),(0,u.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,n.useContext)(a.LayoutRouterContext);return function getSelectedLayoutSegmentPath(e,t,r,n){let a;if(void 0===r&&(r=!0),void 0===n&&(n=[]),r)a=e[1][t];else{var o;let t=e[1];a=null!=(o=t.children)?o:Object.values(t)[0]}if(!a)return n;let u=a[0],i=(0,l.getSegmentValue)(u);return!i||i.startsWith("__PAGE__")?n:(n.push(i),getSelectedLayoutSegmentPath(a,t,!1,n))}(t,e)}function useSelectedLayoutSegment(e){void 0===e&&(e="children"),(0,u.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=useSelectedLayoutSegments(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3170:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return NotFoundBoundary}});let n=r(1024),a=n._(r(2265)),o=r(94);let NotFoundErrorBoundary=class NotFoundErrorBoundary extends a.default.Component{static getDerivedStateFromError(e){if((null==e?void 0:e.digest)==="NEXT_NOT_FOUND")return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?a.default.createElement(a.default.Fragment,null,a.default.createElement("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}};function NotFoundBoundary(e){let{notFound:t,notFoundStyles:r,asNotFound:n,children:u}=e,l=(0,o.usePathname)();return t?a.default.createElement(NotFoundErrorBoundary,{pathname:l,notFound:t,notFoundStyles:r,asNotFound:n},u):a.default.createElement(a.default.Fragment,null,u)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9273:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{notFound:function(){return notFound},isNotFoundError:function(){return isNotFoundError}});let r="NEXT_NOT_FOUND";function notFound(){let e=Error(r);throw e.digest=r,e}function isNotFoundError(e){return(null==e?void 0:e.digest)===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return PromiseQueue}});let n=r(4677),a=r(6249);var o=a._("_maxConcurrency"),u=a._("_runningCount"),l=a._("_queue"),i=a._("_processNext");let PromiseQueue=class PromiseQueue{enqueue(e){let t,r;let a=new Promise((e,n)=>{t=e,r=n}),task=async()=>{try{n._(this,u)[u]++;let r=await e();t(r)}catch(e){r(e)}finally{n._(this,u)[u]--,n._(this,i)[i]()}};return n._(this,l)[l].push({promiseFn:a,task}),n._(this,i)[i](),a}bump(e){let t=n._(this,l)[l].findIndex(t=>t.promiseFn===e);if(t>-1){let e=n._(this,l)[l].splice(t,1)[0];n._(this,l)[l].unshift(e),n._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:processNext}),Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),n._(this,o)[o]=e,n._(this,u)[u]=0,n._(this,l)[l]=[]}};function processNext(e){if(void 0===e&&(e=!1),(n._(this,u)[u]0){var t;null==(t=n._(this,l)[l].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5138:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectErrorBoundary:function(){return RedirectErrorBoundary},RedirectBoundary:function(){return RedirectBoundary}});let n=r(8533),a=n._(r(2265)),o=r(94),u=r(8466);function HandleRedirect(e){let{redirect:t,reset:r,redirectType:n}=e,l=(0,o.useRouter)();return(0,a.useEffect)(()=>{a.default.startTransition(()=>{n===u.RedirectType.push?l.push(t,{}):l.replace(t,{}),r()})},[t,n,r,l]),null}let RedirectErrorBoundary=class RedirectErrorBoundary extends a.default.Component{static getDerivedStateFromError(e){if((0,u.isRedirectError)(e)){let t=(0,u.getURLFromRedirectError)(e),r=(0,u.getRedirectTypeFromError)(e);return{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?a.default.createElement(HandleRedirect,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}};function RedirectBoundary(e){let{children:t}=e,r=(0,o.useRouter)();return a.default.createElement(RedirectErrorBoundary,{router:r},t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8466:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return getRedirectError},redirect:function(){return redirect},permanentRedirect:function(){return permanentRedirect},isRedirectError:function(){return isRedirectError},getURLFromRedirectError:function(){return getURLFromRedirectError},getRedirectTypeFromError:function(){return getRedirectTypeFromError}});let o=r(228),u="NEXT_REDIRECT";function getRedirectError(e,t,r){void 0===r&&(r=!1);let n=Error(u);n.digest=u+";"+t+";"+e+";"+r;let a=o.requestAsyncStorage.getStore();return a&&(n.mutableCookies=a.mutableCookies),n}function redirect(e,t){throw void 0===t&&(t="replace"),getRedirectError(e,t,!1)}function permanentRedirect(e,t){throw void 0===t&&(t="replace"),getRedirectError(e,t,!0)}function isRedirectError(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,r,n,a]=e.digest.split(";",4);return t===u&&("replace"===r||"push"===r)&&"string"==typeof n&&("true"===a||"false"===a)}function getURLFromRedirectError(e){return isRedirectError(e)?e.digest.split(";",3)[2]:null}function getRedirectTypeFromError(e){if(!isRedirectError(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(a=n||(n={})).push="push",a.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7264:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return RenderFromTemplateContext}});let n=r(8533),a=n._(r(2265)),o=r(6313);function RenderFromTemplateContext(){let e=(0,a.useContext)(o.TemplateContext);return a.default.createElement(a.default.Fragment,null,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},228:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return a}});let n=r(7346),a=(0,n.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2713:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return applyFlightData}});let n=r(6313),a=r(782),o=r(1956);function applyFlightData(e,t,r,u){void 0===u&&(u=!1);let[l,i,s]=r.slice(-3);return null!==i&&(3===r.length?(t.status=n.CacheStates.READY,t.subTreeData=i,(0,a.fillLazyItemsTillLeafWithHead)(t,e,l,s,u)):(t.status=n.CacheStates.READY,t.subTreeData=e.subTreeData,t.parallelRoutes=new Map(e.parallelRoutes),(0,o.fillCacheWithNewSubTreeData)(t,e,r,u)),!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function applyRouterStatePatchToTree(e,t,r){let a;let[o,u,,,l]=t;if(1===e.length){let e=applyPatch(t,r);return e}let[i,s]=e;if(!(0,n.matchSegment)(i,o))return null;let p=2===e.length;if(p)a=applyPatch(u[s],r);else if(null===(a=applyRouterStatePatchToTree(e.slice(2),u[s],r)))return null;let _=[e[0],{...u,[s]:a}];return l&&(_[4]=!0),_}}});let n=r(8163);function applyPatch(e,t){let[r,a]=e,[o,u]=t;if("__DEFAULT__"===o&&"__DEFAULT__"!==r)return e;if((0,n.matchSegment)(r,o)){let t={};for(let e in a){let r=void 0!==u[e];r?t[e]=applyPatch(a[e],u[e]):t[e]=a[e]}for(let e in u)t[e]||(t[e]=u[e]);let n=[r,t];return e[2]&&(n[2]=e[2]),e[3]&&(n[3]=e[3]),e[4]&&(n[4]=e[4]),n}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2082:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{extractPathFromFlightRouterState:function(){return extractPathFromFlightRouterState},computeChangedPath:function(){return computeChangedPath}});let n=r(4507),a=r(1706),o=r(8163),removeLeadingSlash=e=>"/"===e[0]?e.slice(1):e,segmentToPathname=e=>"string"==typeof e?e:e[1];function normalizeSegments(e){return e.reduce((e,t)=>""===(t=removeLeadingSlash(t))||(0,a.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function extractPathFromFlightRouterState(e){var t;let r=Array.isArray(e[0])?e[0][1]:e[0];if("__DEFAULT__"===r||n.INTERCEPTION_ROUTE_MARKERS.some(e=>r.startsWith(e)))return;if(r.startsWith("__PAGE__"))return"";let a=[r],o=null!=(t=e[1])?t:{},u=o.children?extractPathFromFlightRouterState(o.children):void 0;if(void 0!==u)a.push(u);else for(let[e,t]of Object.entries(o)){if("children"===e)continue;let r=extractPathFromFlightRouterState(t);void 0!==r&&a.push(r)}return normalizeSegments(a)}function computeChangedPath(e,t){let r=function computeChangedPathImpl(e,t){let[r,a]=e,[u,l]=t,i=segmentToPathname(r),s=segmentToPathname(u);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>i.startsWith(e)||s.startsWith(e)))return"";if(!(0,o.matchSegment)(r,u)){var p;return null!=(p=extractPathFromFlightRouterState(t))?p:""}for(let e in a)if(l[e]){let t=computeChangedPathImpl(a[e],l[e]);if(null!==t)return segmentToPathname(u)+"/"+t}return null}(e,t);return null==r||"/"===r?r:normalizeSegments(r.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2301:function(e,t){"use strict";function createHrefFromUrl(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return createHrefFromUrl}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5311:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return createInitialRouterState}});let n=r(6313),a=r(2301),o=r(782),u=r(2082);function createInitialRouterState(e){var t;let{buildId:r,initialTree:l,children:i,initialCanonicalUrl:s,initialParallelRoutes:p,isServer:_,location:b,initialHead:v}=e,m={status:n.CacheStates.READY,data:null,subTreeData:i,parallelRoutes:_?new Map:p};return(null===p||0===p.size)&&(0,o.fillLazyItemsTillLeafWithHead)(m,void 0,l,v),{buildId:r,tree:l,cache:m,prefetchCache:new Map,pushRef:{pendingPush:!1,mpaNavigation:!1},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:b?(0,a.createHrefFromUrl)(b):s,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(l)||(null==b?void 0:b.pathname))?t:null}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},180:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createOptimisticTree",{enumerable:!0,get:function(){return function createOptimisticTree(e,t,r){let a;let[o,u,l,i,s]=t||[null,{}],p=e[0],_=1===e.length,b=null!==o&&(0,n.matchSegment)(o,p),v=Object.keys(u).length>1,m=!t||!b||v,E={};if(null!==o&&b&&(E=u),!_&&!v){let t=createOptimisticTree(e.slice(1),E?E.children:null,r||m);a=t}let j=[p,{...E,...a?{children:a}:{}}];return l&&(j[2]=l),!r&&m?j[3]="refetch":b&&i&&(j[3]=i),b&&s&&(j[4]=s),j}}});let n=r(8163);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3559:function(e,t){"use strict";function createRecordFromThenable(e){return e.status="pending",e.then(t=>{"pending"===e.status&&(e.status="fulfilled",e.value=t)},t=>{"pending"===e.status&&(e.status="rejected",e.reason=t)}),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRecordFromThenable",{enumerable:!0,get:function(){return createRecordFromThenable}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3322:function(e,t){"use strict";function createRouterCacheKey(e,t){return void 0===t&&(t=!1),Array.isArray(e)?(e[0]+"|"+e[1]+"|"+e[2]).toLowerCase():t&&e.startsWith("__PAGE__")?"__PAGE__":e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return createRouterCacheKey}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8146:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return fetchServerResponse}});let n=r(8343),a=r(3728),o=r(5231),u=r(9706),l=r(6360),{createFromFetch:i}=r(6671);function doMpaNavigation(e){return[(0,a.urlToUrlWithoutFlightMarker)(e).toString(),void 0]}async function fetchServerResponse(e,t,r,s,p){let _={[n.RSC]:"1",[n.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};p===u.PrefetchKind.AUTO&&(_[n.NEXT_ROUTER_PREFETCH]="1"),r&&(_[n.NEXT_URL]=r);let b=(0,l.hexHash)([_[n.NEXT_ROUTER_PREFETCH]||"0",_[n.NEXT_ROUTER_STATE_TREE],_[n.NEXT_URL]].join(","));try{let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(n.NEXT_RSC_UNION_QUERY,b);let r=await fetch(t,{credentials:"same-origin",headers:_}),u=(0,a.urlToUrlWithoutFlightMarker)(r.url),l=r.redirected?u:void 0,p=r.headers.get("content-type")||"",v=p===n.RSC_CONTENT_TYPE_HEADER;if(v||(v=p.startsWith("text/plain")),!v||!r.ok)return e.hash&&(u.hash=e.hash),doMpaNavigation(u.toString());let[m,E]=await i(Promise.resolve(r),{callServer:o.callServer});if(s!==m)return doMpaNavigation(r.url);return[E,l]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6443:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function fillCacheWithDataProperty(e,t,r,o,u){void 0===u&&(u=!1);let l=r.length<=2,[i,s]=r,p=(0,a.createRouterCacheKey)(s),_=t.parallelRoutes.get(i);if(!_||u&&t.parallelRoutes.size>1)return{bailOptimistic:!0};let b=e.parallelRoutes.get(i);b&&b!==_||(b=new Map(_),e.parallelRoutes.set(i,b));let v=_.get(p),m=b.get(p);if(l){m&&m.data&&m!==v||b.set(p,{status:n.CacheStates.DATA_FETCH,data:o(),subTreeData:null,parallelRoutes:new Map});return}if(!m||!v){m||b.set(p,{status:n.CacheStates.DATA_FETCH,data:o(),subTreeData:null,parallelRoutes:new Map});return}return m===v&&(m={status:m.status,data:m.data,subTreeData:m.subTreeData,parallelRoutes:new Map(m.parallelRoutes)},b.set(p,m)),fillCacheWithDataProperty(m,v,r.slice(2),o)}}});let n=r(6313),a=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1956:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function fillCacheWithNewSubTreeData(e,t,r,l){let i=r.length<=5,[s,p]=r,_=(0,u.createRouterCacheKey)(p),b=t.parallelRoutes.get(s);if(!b)return;let v=e.parallelRoutes.get(s);v&&v!==b||(v=new Map(b),e.parallelRoutes.set(s,v));let m=b.get(_),E=v.get(_);if(i){E&&E.data&&E!==m||(E={status:n.CacheStates.READY,data:null,subTreeData:r[3],parallelRoutes:m?new Map(m.parallelRoutes):new Map},m&&(0,a.invalidateCacheByRouterState)(E,m,r[2]),(0,o.fillLazyItemsTillLeafWithHead)(E,m,r[2],r[4],l),v.set(_,E));return}E&&m&&(E===m&&(E={status:E.status,data:E.data,subTreeData:E.subTreeData,parallelRoutes:new Map(E.parallelRoutes)},v.set(_,E)),fillCacheWithNewSubTreeData(E,m,r.slice(2),l))}}});let n=r(6313),a=r(5303),o=r(782),u=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},782:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function fillLazyItemsTillLeafWithHead(e,t,r,o,u){let l=0===Object.keys(r[1]).length;if(l){e.head=o;return}for(let l in r[1]){let i=r[1][l],s=i[0],p=(0,a.createRouterCacheKey)(s);if(t){let r=t.parallelRoutes.get(l);if(r){let t=new Map(r),a=t.get(p),s=u&&a?{status:a.status,data:a.data,subTreeData:a.subTreeData,parallelRoutes:new Map(a.parallelRoutes)}:{status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map(null==a?void 0:a.parallelRoutes)};t.set(p,s),fillLazyItemsTillLeafWithHead(s,a,i,o,u),e.parallelRoutes.set(l,t);continue}}let _={status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},b=e.parallelRoutes.get(l);b?b.set(p,_):e.parallelRoutes.set(l,new Map([[p,_]])),fillLazyItemsTillLeafWithHead(_,void 0,i,o,u)}}}});let n=r(6313),a=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2800:function(e,t){"use strict";var r,n;function getPrefetchEntryCacheStatus(e){let{kind:t,prefetchTime:r,lastUsedTime:n}=e;return Date.now()<(null!=n?n:r)+3e4?n?"reusable":"fresh":"auto"===t&&Date.now()["children",e]).flat(),v=(0,s.fillCacheWithDataProperty)(i,e.cache,b,()=>(_||(_=(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,u,e.nextUrl,e.buildId))),_),!0);if(!(null==v?void 0:v.bailOptimistic))return B.previousTree=e.tree,B.patchedTree=u,B.pendingPush=et,B.hashFragment=q,B.shouldScroll=z,B.scrollableSegments=[],B.cache=i,B.canonicalUrl=ee,e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),{data:_?(0,o.createRecordFromThenable)(Promise.resolve(_)):null,kind:m.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:Date.now()}),(0,E.handleMutable)(e,B)}if(!en){let t=(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,void 0)),n={data:(0,o.createRecordFromThenable)(Promise.resolve(t)),kind:m.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:null};e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),n),en=n}let ea=(0,C.getPrefetchEntryCacheStatus)(en),{treeAtTimeOfPrefetch:eo,data:eu}=en;A.prefetchQueue.bump(eu);let[el,ei]=(0,u.readRecordValue)(eu);if(en.lastUsedTime||(en.lastUsedTime=Date.now()),"string"==typeof el)return handleExternalUrl(e,B,el,et);let ec=e.tree,es=e.cache,ef=[];for(let t of el){let u=t.slice(0,-4),l=t.slice(-3)[0],p=["",...u],m=(0,_.applyRouterStatePatchToTree)(p,ec,l);if(null===m&&(m=(0,_.applyRouterStatePatchToTree)(p,eo,l)),null!==m){if((0,v.isNavigatingToNewRootLayout)(ec,m))return handleExternalUrl(e,B,ee,et);let _=(0,j.applyFlightData)(es,U,t,"auto"===en.kind&&ea===C.PrefetchCacheEntryStatus.reusable);_||ea!==C.PrefetchCacheEntryStatus.stale||(_=function(e,t,r,a,o){let u=!1;e.status=n.CacheStates.READY,e.subTreeData=t.subTreeData,e.parallelRoutes=new Map(t.parallelRoutes);let l=generateSegmentsFromPatch(a).map(e=>[...r,...e]);for(let r of l){let n=(0,s.fillCacheWithDataProperty)(e,t,r,o);(null==n?void 0:n.bailOptimistic)||(u=!0)}return u}(U,es,u,l,()=>(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,ec,e.nextUrl,e.buildId))));let E=(0,b.shouldHardNavigate)(p,ec);for(let e of(E?(U.status=n.CacheStates.READY,U.subTreeData=es.subTreeData,(0,i.invalidateCacheBelowFlightSegmentPath)(U,es,u),B.cache=U):_&&(B.cache=U),es=U,ec=m,generateSegmentsFromPatch(l))){let t=[...u,...e];"__DEFAULT__"!==t[t.length-1]&&ef.push(t)}}}return B.previousTree=e.tree,B.patchedTree=ec,B.canonicalUrl=ei?(0,l.createHrefFromUrl)(ei):ee,B.pendingPush=et,B.scrollableSegments=ef,B.hashFragment=q,B.shouldScroll=z,(0,E.handleMutable)(e,B)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3709:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{prefetchQueue:function(){return p},prefetchReducer:function(){return prefetchReducer}});let n=r(2301),a=r(8146),o=r(9706),u=r(3559),l=r(3627),i=r(8343),s=r(839),p=new s.PromiseQueue(5);function prefetchReducer(e,t){(0,l.prunePrefetchCache)(e.prefetchCache);let{url:r}=t;r.searchParams.delete(i.NEXT_RSC_UNION_QUERY);let s=(0,n.createHrefFromUrl)(r,!1),_=e.prefetchCache.get(s);if(_&&(_.kind===o.PrefetchKind.TEMPORARY&&e.prefetchCache.set(s,{..._,kind:t.kind}),!(_.kind===o.PrefetchKind.AUTO&&t.kind===o.PrefetchKind.FULL)))return e;let b=(0,u.createRecordFromThenable)(p.enqueue(()=>(0,a.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,t.kind)));return e.prefetchCache.set(s,{treeAtTimeOfPrefetch:e.tree,data:b,kind:t.kind,prefetchTime:Date.now(),lastUsedTime:null}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3627:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prunePrefetchCache",{enumerable:!0,get:function(){return prunePrefetchCache}});let n=r(2800);function prunePrefetchCache(e){for(let[t,r]of e)(0,n.getPrefetchEntryCacheStatus)(r)===n.PrefetchCacheEntryStatus.expired&&e.delete(t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2701:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return refreshReducer}});let n=r(8146),a=r(3559),o=r(929),u=r(2301),l=r(8934),i=r(2782),s=r(8640),p=r(8543),_=r(6313),b=r(782);function refreshReducer(e,t){let{cache:r,mutable:v,origin:m}=t,E=e.canonicalUrl,j=e.tree,C=JSON.stringify(v.previousTree)===JSON.stringify(j);if(C)return(0,p.handleMutable)(e,v);r.data||(r.data=(0,a.createRecordFromThenable)((0,n.fetchServerResponse)(new URL(E,m),[j[0],j[1],j[2],"refetch"],e.nextUrl,e.buildId)));let[w,A]=(0,o.readRecordValue)(r.data);if("string"==typeof w)return(0,s.handleExternalUrl)(e,v,w,e.pushRef.pendingPush);for(let t of(r.data=null,w)){if(3!==t.length)return console.log("REFRESH FAILED"),e;let[n]=t,a=(0,l.applyRouterStatePatchToTree)([""],j,n);if(null===a)throw Error("SEGMENT MISMATCH");if((0,i.isNavigatingToNewRootLayout)(j,a))return(0,s.handleExternalUrl)(e,v,E,e.pushRef.pendingPush);let o=A?(0,u.createHrefFromUrl)(A):void 0;A&&(v.canonicalUrl=o);let[p,m]=t.slice(-2);null!==p&&(r.status=_.CacheStates.READY,r.subTreeData=p,(0,b.fillLazyItemsTillLeafWithHead)(r,void 0,n,m),v.cache=r,v.prefetchCache=new Map),v.previousTree=j,v.patchedTree=a,v.canonicalUrl=E,j=a}return(0,p.handleMutable)(e,v)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1705:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return restoreReducer}});let n=r(2301);function restoreReducer(e,t){let{url:r,tree:a}=t,o=(0,n.createHrefFromUrl)(r);return{buildId:e.buildId,canonicalUrl:o,pushRef:e.pushRef,focusAndScrollRef:e.focusAndScrollRef,cache:e.cache,prefetchCache:e.prefetchCache,tree:a,nextUrl:r.pathname}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1383:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return serverActionReducer}});let n=r(5231),a=r(8343),o=r(3559),u=r(929),l=r(9872),i=r(2301),s=r(8640),p=r(8934),_=r(2782),b=r(6313),v=r(8543),m=r(782),{createFromFetch:E,encodeReply:j}=r(6671);async function fetchServerAction(e,t){let r,{actionId:o,actionArgs:u}=t,i=await j(u),s=await fetch("",{method:"POST",headers:{Accept:a.RSC_CONTENT_TYPE_HEADER,[a.ACTION]:o,[a.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...e.nextUrl?{[a.NEXT_URL]:e.nextUrl}:{}},body:i}),p=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");r={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){r={paths:[],tag:!1,cookie:!1}}let _=p?new URL((0,l.addBasePath)(p),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===a.RSC_CONTENT_TYPE_HEADER){let e=await E(Promise.resolve(s),{callServer:n.callServer});if(p){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:_,revalidatedParts:r}}let[t,[,a]]=null!=e?e:[];return{actionResult:t,actionFlightData:a,redirectLocation:_,revalidatedParts:r}}return{redirectLocation:_,revalidatedParts:r}}function serverActionReducer(e,t){let{mutable:r,cache:n,resolve:a,reject:l}=t,E=e.canonicalUrl,j=e.tree,C=JSON.stringify(r.previousTree)===JSON.stringify(j);if(C)return(0,v.handleMutable)(e,r);if(r.inFlightServerAction){if("fulfilled"!==r.inFlightServerAction.status&&r.globalMutable.pendingNavigatePath&&r.globalMutable.pendingNavigatePath!==E)return r.inFlightServerAction.then(()=>{r.actionResultResolved||(r.inFlightServerAction=null,r.globalMutable.pendingNavigatePath=void 0,r.globalMutable.refresh(),r.actionResultResolved=!0)},()=>{}),e}else r.inFlightServerAction=(0,o.createRecordFromThenable)(fetchServerAction(e,t));try{let{actionResult:t,actionFlightData:o,redirectLocation:l}=(0,u.readRecordValue)(r.inFlightServerAction);if(l&&(e.pushRef.pendingPush=!0,r.pendingPush=!0),r.previousTree=e.tree,!o){if(r.actionResultResolved||(a(t),r.actionResultResolved=!0),l)return(0,s.handleExternalUrl)(e,r,l.href,e.pushRef.pendingPush);return e}if("string"==typeof o)return(0,s.handleExternalUrl)(e,r,o,e.pushRef.pendingPush);for(let t of(r.inFlightServerAction=null,o)){if(3!==t.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[a]=t,o=(0,p.applyRouterStatePatchToTree)([""],j,a);if(null===o)throw Error("SEGMENT MISMATCH");if((0,_.isNavigatingToNewRootLayout)(j,o))return(0,s.handleExternalUrl)(e,r,E,e.pushRef.pendingPush);let[u,l]=t.slice(-2);null!==u&&(n.status=b.CacheStates.READY,n.subTreeData=u,(0,m.fillLazyItemsTillLeafWithHead)(n,void 0,a,l),r.cache=n,r.prefetchCache=new Map),r.previousTree=j,r.patchedTree=o,r.canonicalUrl=E,j=o}if(l){let e=(0,i.createHrefFromUrl)(l,!1);r.canonicalUrl=e}return r.actionResultResolved||(a(t),r.actionResultResolved=!0),(0,v.handleMutable)(e,r)}catch(t){if("rejected"===t.status)return r.actionResultResolved||(l(t.reason),r.actionResultResolved=!0),e;throw t}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5330:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return serverPatchReducer}});let n=r(2301),a=r(8934),o=r(2782),u=r(8640),l=r(2713),i=r(8543);function serverPatchReducer(e,t){let{flightData:r,previousTree:s,overrideCanonicalUrl:p,cache:_,mutable:b}=t,v=JSON.stringify(s)===JSON.stringify(e.tree);if(!v)return console.log("TREE MISMATCH"),e;if(b.previousTree)return(0,i.handleMutable)(e,b);if("string"==typeof r)return(0,u.handleExternalUrl)(e,b,r,e.pushRef.pendingPush);let m=e.tree,E=e.cache;for(let t of r){let r=t.slice(0,-4),[i]=t.slice(-3,-2),s=(0,a.applyRouterStatePatchToTree)(["",...r],m,i);if(null===s)throw Error("SEGMENT MISMATCH");if((0,o.isNavigatingToNewRootLayout)(m,s))return(0,u.handleExternalUrl)(e,b,e.canonicalUrl,e.pushRef.pendingPush);let v=p?(0,n.createHrefFromUrl)(p):void 0;v&&(b.canonicalUrl=v),(0,l.applyFlightData)(E,_,t),b.previousTree=m,b.patchedTree=s,b.cache=_,E=_,m=s}return(0,i.handleMutable)(e,b)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9706:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PrefetchKind:function(){return r},ACTION_REFRESH:function(){return a},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return u},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return s},ACTION_SERVER_ACTION:function(){return p}});let a="refresh",o="navigate",u="restore",l="server-patch",i="prefetch",s="fast-refresh",p="server-action";(n=r||(r={})).AUTO="auto",n.FULL="full",n.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7205:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return reducer}});let n=r(9706),a=r(8640),o=r(5330),u=r(1705),l=r(2701),i=r(3709),s=r(3682),p=r(1383),reducer=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,a.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,o.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,u.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,l.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,s.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,p.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3006:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function shouldHardNavigate(e,t){let[r,a]=t,[o,u]=e;if(!(0,n.matchSegment)(o,r))return!!Array.isArray(o);let l=e.length<=2;return!l&&shouldHardNavigate(e.slice(2),a[u])}}});let n=r(8163);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8519:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return createSearchParamsBailoutProxy}});let n=r(2004);function createSearchParamsBailoutProxy(){return new Proxy({},{get(e,t){"string"==typeof t&&(0,n.staticGenerationBailout)("searchParams."+t)}})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8985:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return a}});let n=r(7346),a=(0,n.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2004:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationBailout",{enumerable:!0,get:function(){return staticGenerationBailout}});let n=r(1351),a=r(8985);let StaticGenBailoutError=class StaticGenBailoutError extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}};function formatErrorMessage(e,t){let{dynamic:r,link:n}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:"")}let staticGenerationBailout=(e,t)=>{let r=a.staticGenerationAsyncStorage.getStore();if(null==r?void 0:r.forceStatic)return!0;if(null==r?void 0:r.dynamicShouldError){var o;throw new StaticGenBailoutError(formatErrorMessage(e,{...t,dynamic:null!=(o=null==t?void 0:t.dynamic)?o:"error"}))}if(!r||(r.revalidate=0,(null==t?void 0:t.dynamic)||(r.staticPrefetchBailout=!0)),null==r?void 0:r.isStaticGeneration){let a=new n.DynamicServerError(formatErrorMessage(e,{...t,link:"https://nextjs.org/docs/messages/dynamic-server-error"}));throw r.dynamicUsageDescription=e,r.dynamicUsageStack=a.stack,a}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8297:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return StaticGenerationSearchParamsBailoutProvider}});let n=r(1024),a=n._(r(2265)),o=r(8519);function StaticGenerationSearchParamsBailoutProvider(e){let{Component:t,propsForComponent:r,isStaticGeneration:n}=e;if(n){let e=(0,o.createSearchParamsBailoutProxy)();return a.default.createElement(t,{searchParams:e,...r})}return a.default.createElement(t,r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2327:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useReducerWithReduxDevtools",{enumerable:!0,get:function(){return useReducerWithReduxDevtools}});let n=r(2265);function normalizeRouterState(e){if(e instanceof Map){let t={};for(let[r,n]of e.entries()){if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n._bundlerConfig){t[r]="FlightData";continue}}t[r]=normalizeRouterState(n)}return t}if("object"==typeof e&&null!==e){let t={};for(let r in e){let n=e[r];if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n.hasOwnProperty("_bundlerConfig")){t[r]="FlightData";continue}}t[r]=normalizeRouterState(n)}return t}return Array.isArray(e)?e.map(normalizeRouterState):e}let useReducerWithReduxDevtools=function(e,t){let r=(0,n.useRef)(),a=(0,n.useRef)();(0,n.useEffect)(()=>{if(!r.current&&!1!==a.current){if(void 0===a.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){a.current=!1;return}return r.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),r.current&&r.current.init(normalizeRouterState(t)),()=>{r.current=void 0}}},[t]);let[o,u]=(0,n.useReducer)((t,n)=>{let a=e(t,n);return r.current&&r.current.send(n,normalizeRouterState(a)),a},t),l=(0,n.useCallback)(()=>{r.current&&r.current.send({type:"RENDER_SYNC"},normalizeRouterState(o))},[o]);return[o,u,l]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6746:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return hasBasePath}});let n=r(1446);function hasBasePath(e){return(0,n.pathHasPrefix)(e,"")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3997:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return normalizePathTrailingSlash}});let n=r(9006),a=r(9466),normalizePathTrailingSlash=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:o}=(0,a.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+o};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2504:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return onRecoverableError}});let n=r(1283);function onRecoverableError(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};e.digest!==n.NEXT_DYNAMIC_NO_SSR_CODE&&t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3714:function(e,t,r){"use strict";function removeBasePath(e){return e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return removeBasePath}}),r(6746),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6313:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{CacheStates:function(){return n},AppRouterContext:function(){return l},LayoutRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return s},TemplateContext:function(){return p}});let o=r(1024),u=o._(r(2265));(a=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",a.DATA_FETCH="DATAFETCH",a.READY="READY";let l=u.default.createContext(null),i=u.default.createContext(null),s=u.default.createContext(null),p=u.default.createContext(null)},6360:function(e,t){"use strict";function djb2Hash(e){let t=5381;for(let r=0;r!t||(0,a.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function normalizeRscPath(e,t){return t?e.replace(/\.rsc($|\?)/,"$1"):e}},280:function(e,t){"use strict";function handleSmoothScroll(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return handleSmoothScroll}})},2169:function(e,t){"use strict";function isBot(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return isBot}})},9466:function(e,t){"use strict";function parsePath(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return parsePath}})},1446:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return pathHasPrefix}});let n=r(9466);function pathHasPrefix(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},9006:function(e,t){"use strict";function removeTrailingSlash(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return removeTrailingSlash}})},1706:function(e,t){"use strict";function isGroupSegment(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isGroupSegment",{enumerable:!0,get:function(){return isGroupSegment}})},3972:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return useServerInsertedHTML}});let n=r(8533),a=n._(r(2265)),o=a.default.createContext(null);function useServerInsertedHTML(e){let t=(0,a.useContext)(o);t&&t(e)}},7346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return createAsyncLocalStorage}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");let FakeAsyncLocalStorage=class FakeAsyncLocalStorage{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}};let n=globalThis.AsyncLocalStorage;function createAsyncLocalStorage(){return n?new n:new FakeAsyncLocalStorage}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4040:function(e,t,r){"use strict";var n=r(4887);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},4887:function(e,t,r){"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}(),e.exports=r(4417)},7950:function(e,t,r){"use strict";/** - * @license React - * react-server-dom-webpack-client.browser.production.min.js - * - * Copyright (c) Meta Platforms, Inc. and affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var n=r(4887),a=r(2265),o={stream:!0},u=new Map;function x(e){var t=r(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function y(){}var l=new Map,i=r.u;r.u=function(e){var t=l.get(e);return void 0!==t?t:i(e)};var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,p=Symbol.for("react.element"),_=Symbol.for("react.provider"),b=Symbol.for("react.server_context"),v=Symbol.for("react.lazy"),m=Symbol.for("react.default_value"),E=Symbol.iterator,j=Array.isArray,C=new WeakMap,w=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function L(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function ia(e){switch(e.status){case"resolved_model":M(e);break;case"resolved_module":N(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":throw e;default:throw e.reason}}function O(e,t){for(var r=0;rp?(b=p,p=3,i++):(b=0,p=3);continue;case 2:44===(E=a[i++])?p=4:v=v<<4|(96a.length&&(E=-1)}var j=a.byteOffset+i;if(-1>>1,a=e[n];if(0>>1;ng(l,r))ig(s,l)?(e[n]=s,e[i]=r,n=i):(e[n]=l,e[u]=r,n=u);else if(ig(s,r))e[n]=s,e[i]=r,n=i;else break}}return t}function g(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var r,n=performance;t.unstable_now=function(){return n.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var u=[],l=[],i=1,s=null,p=3,_=!1,b=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,E="function"==typeof clearTimeout?clearTimeout:null,j="undefined"!=typeof setImmediate?setImmediate:null;function G(e){for(var t=h(l);null!==t;){if(null===t.callback)k(l);else if(t.startTime<=e)k(l),t.sortIndex=t.expirationTime,f(u,t);else break;t=h(l)}}function H(e){if(v=!1,G(e),!b){if(null!==h(u))b=!0,I();else{var t=h(l);null!==t&&J(H,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C=!1,w=-1,A=5,F=-1;function O(){return!(t.unstable_now()-Fe&&O());){var o=s.callback;if("function"==typeof o){s.callback=null,p=s.priorityLevel;var i=o(s.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){s.callback=i,G(e),n=!0;break t}s===h(u)&&k(u),G(e)}else k(u);s=h(u)}if(null!==s)n=!0;else{var m=h(l);null!==m&&J(H,m.startTime-e),n=!1}}break e}finally{s=null,p=a,_=!1}n=void 0}}finally{n?r():C=!1}}}if("function"==typeof j)r=function(){j(P)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,U=D.port2;D.port1.onmessage=P,r=function(){U.postMessage(null)}}else r=function(){m(P,0)};function I(){C||(C=!0,r())}function J(e,r){w=m(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){b||_||(b=!0,I())},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=n,f(l,e),null===h(u)&&e===h(l)&&(v?(E(w),w=-1):v=!0,J(H,n-a))):(e.sortIndex=o,f(u,e),b||_||(b=!0,I())),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},8261:function(e,t,r){"use strict";e.exports=r(1756)},5682:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return getSegmentParam}});let n=r(4507);function getSegmentParam(e){let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:"dynamic",param:e.slice(1,-1)}:null}},4507:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return a},isInterceptionRouteAppPath:function(){return isInterceptionRouteAppPath},extractInterceptionRouteInformation:function(){return extractInterceptionRouteInformation}});let n=r(3701),a=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(e){return void 0!==e.split("/").find(e=>a.find(t=>e.startsWith(t)))}function extractInterceptionRouteInformation(e){let t,r,o;for(let n of e.split("/"))if(r=a.find(e=>n.startsWith(e))){[t,o]=e.split(r,2);break}if(!t||!r||!o)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":o="/"===t?`/${o}`:t+"/"+o;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);o=t.split("/").slice(0,-1).concat(o).join("/");break;case"(...)":o="/"+o;break;case"(..)(..)":let u=t.split("/");if(u.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=u.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},4677:function(e,t,r){"use strict";function _class_private_field_loose_base(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}r.r(t),r.d(t,{_:function(){return _class_private_field_loose_base},_class_private_field_loose_base:function(){return _class_private_field_loose_base}})},6249:function(e,t,r){"use strict";r.r(t),r.d(t,{_:function(){return _class_private_field_loose_key},_class_private_field_loose_key:function(){return _class_private_field_loose_key}});var n=0;function _class_private_field_loose_key(e){return"__private_"+n+++"_"+e}},1024:function(e,t,r){"use strict";function _interop_require_default(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return _interop_require_default},_interop_require_default:function(){return _interop_require_default}})},8533:function(e,t,r){"use strict";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interop_require_wildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=a?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}r.r(t),r.d(t,{_:function(){return _interop_require_wildcard},_interop_require_wildcard:function(){return _interop_require_wildcard}})}}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/472-b67fb1eb570cfe5d.js b/rln-js/_next/static/chunks/472-b67fb1eb570cfe5d.js new file mode 100644 index 0000000..81a8f06 --- /dev/null +++ b/rln-js/_next/static/chunks/472-b67fb1eb570cfe5d.js @@ -0,0 +1,25 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[472],{5844:function(e,t){"use strict";function getDeploymentIdQueryOrEmptyString(){return""}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return getDeploymentIdQueryOrEmptyString}})},2335:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var e=/\((.*)\)/.exec(this.toString());return e?e[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(e,t){return t=this.concat.apply([],this),e>1&&t.some(Array.isArray)?t.flat(e-1):t},Array.prototype.flatMap=function(e,t){return this.map(e,t).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(e){if("function"!=typeof e)return this.then(e,e);var t=this.constructor||Promise;return this.then(function(r){return t.resolve(e()).then(function(){return r})},function(r){return t.resolve(e()).then(function(){throw r})})}),Object.fromEntries||(Object.fromEntries=function(e){return Array.from(e).reduce(function(e,t){return e[t[0]]=t[1],e},{})}),Array.prototype.at||(Array.prototype.at=function(e){var t=Math.trunc(e)||0;if(t<0&&(t+=this.length),!(t<0||t>=this.length))return this[t]})},9872:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"addBasePath",{enumerable:!0,get:function(){return addBasePath}});let n=r(8356),a=r(3997);function addBasePath(e,t){return(0,a.normalizePathTrailingSlash)((0,n.addPathPrefix)(e,"/rln-js"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5354:function(e,t){"use strict";function appBootstrap(e){var t,r;t=self.__next_s,r=()=>{e()},t&&t.length?t.reduce((e,t)=>{let[r,n]=t;return e.then(()=>new Promise((e,t)=>{let a=document.createElement("script");if(n)for(let e in n)"children"!==e&&a.setAttribute(e,n[e]);r?(a.src=r,a.onload=()=>e(),a.onerror=t):n&&(a.innerHTML=n.children,setTimeout(e)),document.head.appendChild(a)}))},Promise.resolve()).catch(e=>{console.error(e)}).then(()=>{r()}):r()}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"appBootstrap",{enumerable:!0,get:function(){return appBootstrap}}),window.next={version:"13.5.6",appDir:!0},("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5231:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"callServer",{enumerable:!0,get:function(){return callServer}});let n=r(3728);async function callServer(e,t){let r=(0,n.getServerActionDispatcher)();if(!r)throw Error("Invariant: missing action dispatcher.");return new Promise((n,a)=>{r({actionId:e,actionArgs:t,resolve:n,reject:a})})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},811:function(e,t,r){"use strict";let n,a;Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hydrate",{enumerable:!0,get:function(){return hydrate}});let o=r(1024),u=r(8533);r(2335);let l=o._(r(4040)),i=u._(r(2265)),s=r(6671),p=r(1852);r(6313);let _=o._(r(2504)),b=r(5231),v=r(4119),m=window.console.error;window.console.error=function(){for(var e=arguments.length,t=Array(e),r=0;r{if((0,v.isNextRouterError)(e.error)){e.preventDefault();return}});let E=document,getCacheKey=()=>{let{pathname:e,search:t}=location;return e+t},j=new TextEncoder,C=!1,w=!1,A=null;function nextServerDataCallback(e){if(0===e[0])n=[];else if(1===e[0]){if(!n)throw Error("Unexpected server data: missing bootstrap script.");a?a.enqueue(j.encode(e[1])):n.push(e[1])}else 2===e[0]&&(A=e[1])}let DOMContentLoaded=function(){a&&!w&&(a.close(),w=!0,n=void 0),C=!0};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",DOMContentLoaded,!1):DOMContentLoaded();let F=self.__next_f=self.__next_f||[];F.forEach(nextServerDataCallback),F.push=nextServerDataCallback;let D=new Map;function ServerRoot(e){let{cacheKey:t}=e;i.default.useEffect(()=>{D.delete(t)});let r=function(e){let t=D.get(e);if(t)return t;let r=new ReadableStream({start(e){n&&(n.forEach(t=>{e.enqueue(j.encode(t))}),C&&!w&&(e.close(),w=!0,n=void 0)),a=e}}),o=(0,s.createFromReadableStream)(r,{callServer:b.callServer});return D.set(e,o),o}(t),o=(0,i.use)(r);return o}let U=i.default.StrictMode;function Root(e){let{children:t}=e;return t}function RSCComponent(e){return i.default.createElement(ServerRoot,{...e,cacheKey:getCacheKey()})}function hydrate(){let e=i.default.createElement(U,null,i.default.createElement(p.HeadManagerContext.Provider,{value:{appDir:!0}},i.default.createElement(Root,null,i.default.createElement(RSCComponent,null)))),t={onRecoverableError:_.default},r="__next_error__"===document.documentElement.id;r?l.default.createRoot(E,t).render(e):i.default.startTransition(()=>l.default.hydrateRoot(E,e,{...t,experimental_formState:A}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2019:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0});let n=r(5354);(0,n.appBootstrap)(()=>{r(1055);let{hydrate:e}=r(811);r(3728),r(6954),e()}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1055:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(5844);{let e=r.u;r.u=function(){for(var t=arguments.length,r=Array(t),n=0;n{let e=function(){var e;let t=document.getElementsByName(o)[0];if(null==t?void 0:null==(e=t.shadowRoot)?void 0:e.childNodes[0])return t.shadowRoot.childNodes[0];{let e=document.createElement(o);e.style.cssText="position:absolute";let t=document.createElement("div");t.ariaLive="assertive",t.id="__next-route-announcer__",t.role="alert",t.style.cssText="position:absolute;border:0;height:1px;margin:-1px;padding:0;width:1px;clip:rect(0 0 0 0);overflow:hidden;white-space:nowrap;word-wrap:normal";let r=e.attachShadow({mode:"open"});return r.appendChild(t),document.body.appendChild(e),t}}();return u(e),()=>{let e=document.getElementsByTagName(o)[0];(null==e?void 0:e.isConnected)&&document.body.removeChild(e)}},[]);let[l,i]=(0,n.useState)(""),s=(0,n.useRef)();return(0,n.useEffect)(()=>{let e="";if(document.title)e=document.title;else{let t=document.querySelector("h1");t&&(e=t.innerText||t.textContent||"")}void 0!==s.current&&s.current!==e&&i(e),s.current=e},[t]),r?(0,a.createPortal)(l,r):null}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8343:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RSC:function(){return r},ACTION:function(){return n},NEXT_ROUTER_STATE_TREE:function(){return a},NEXT_ROUTER_PREFETCH:function(){return o},NEXT_URL:function(){return u},RSC_CONTENT_TYPE_HEADER:function(){return l},RSC_VARY_HEADER:function(){return i},FLIGHT_PARAMETERS:function(){return s},NEXT_RSC_UNION_QUERY:function(){return p}});let r="RSC",n="Next-Action",a="Next-Router-State-Tree",o="Next-Router-Prefetch",u="Next-Url",l="text/x-component",i=r+", "+a+", "+o+", "+u,s=[[r],[a],[o]],p="_rsc";("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3728:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{getServerActionDispatcher:function(){return getServerActionDispatcher},urlToUrlWithoutFlightMarker:function(){return urlToUrlWithoutFlightMarker},default:function(){return AppRouter}});let n=r(8533),a=n._(r(2265)),o=r(6313),u=r(7205),l=r(9706),i=r(2301),s=r(7407),p=r(2327),_=r(9928),b=r(5311),v=r(2169),m=r(9872),E=r(8325),j=r(5138),C=r(6700),w=r(3085),A=r(8343),F=r(3714),D=r(6746),U=new Map,B=null;function getServerActionDispatcher(){return B}let $={refresh:()=>{}};function urlToUrlWithoutFlightMarker(e){let t=new URL(e,location.origin);if(t.searchParams.delete(A.NEXT_RSC_UNION_QUERY),t.pathname.endsWith(".txt")){let{pathname:e}=t,r=e.endsWith("/index.txt")?10:4;t.pathname=e.slice(0,-r)}return t}function isExternalURL(e){return e.origin!==window.location.origin}function HistoryUpdater(e){let{tree:t,pushRef:r,canonicalUrl:n,sync:o}=e;return(0,a.useInsertionEffect)(()=>{let e={__NA:!0,tree:t};r.pendingPush&&(0,i.createHrefFromUrl)(new URL(window.location.href))!==n?(r.pendingPush=!1,window.history.pushState(e,"",n)):window.history.replaceState(e,"",n),o()},[t,r,n,o]),null}let createEmptyCacheNode=()=>({status:o.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map});function Router(e){let{buildId:t,initialHead:r,initialTree:n,initialCanonicalUrl:_,children:A,assetPrefix:z}=e,K=(0,a.useMemo)(()=>(0,b.createInitialRouterState)({buildId:t,children:A,initialCanonicalUrl:_,initialTree:n,initialParallelRoutes:U,isServer:!1,location:window.location,initialHead:r}),[t,A,_,n,r]),[{tree:q,cache:ee,prefetchCache:et,pushRef:er,focusAndScrollRef:en,canonicalUrl:ea,nextUrl:eo},eu,el]=(0,p.useReducerWithReduxDevtools)(u.reducer,K);(0,a.useEffect)(()=>{U=null},[]);let{searchParams:ei,pathname:ec}=(0,a.useMemo)(()=>{let e=new URL(ea,window.location.href);return{searchParams:e.searchParams,pathname:(0,D.hasBasePath)(e.pathname)?(0,F.removeBasePath)(e.pathname):e.pathname}},[ea]),es=(0,a.useCallback)((e,t,r)=>{(0,a.startTransition)(()=>{eu({type:l.ACTION_SERVER_PATCH,flightData:t,previousTree:e,overrideCanonicalUrl:r,cache:createEmptyCacheNode(),mutable:{globalMutable:$}})})},[eu]),ef=(0,a.useCallback)((e,t,r,n)=>{let a=new URL((0,m.addBasePath)(e),location.href);return $.pendingNavigatePath=(0,i.createHrefFromUrl)(a),eu({type:l.ACTION_NAVIGATE,url:a,isExternalUrl:isExternalURL(a),locationSearch:location.search,forceOptimisticNavigation:r,shouldScroll:null==n||n,navigateType:t,cache:createEmptyCacheNode(),mutable:{globalMutable:$}})},[eu]);!function(e){let t=(0,a.useCallback)(t=>{(0,a.startTransition)(()=>{e({...t,type:l.ACTION_SERVER_ACTION,mutable:{globalMutable:$},cache:createEmptyCacheNode()})})},[e]);B=t}(eu);let ed=(0,a.useMemo)(()=>{let e={back:()=>window.history.back(),forward:()=>window.history.forward(),prefetch:(e,t)=>{if((0,v.isBot)(window.navigator.userAgent))return;let r=new URL((0,m.addBasePath)(e),location.href);isExternalURL(r)||(0,a.startTransition)(()=>{var e;eu({type:l.ACTION_PREFETCH,url:r,kind:null!=(e=null==t?void 0:t.kind)?e:l.PrefetchKind.FULL})})},replace:(e,t)=>{void 0===t&&(t={}),(0,a.startTransition)(()=>{var r;ef(e,"replace",!!t.forceOptimisticNavigation,null==(r=t.scroll)||r)})},push:(e,t)=>{void 0===t&&(t={}),(0,a.startTransition)(()=>{var r;ef(e,"push",!!t.forceOptimisticNavigation,null==(r=t.scroll)||r)})},refresh:()=>{(0,a.startTransition)(()=>{eu({type:l.ACTION_REFRESH,cache:createEmptyCacheNode(),mutable:{globalMutable:$},origin:window.location.origin})})},fastRefresh:()=>{throw Error("fastRefresh can only be used in development mode. Please use refresh instead.")}};return e},[eu,ef]);if((0,a.useEffect)(()=>{window.next&&(window.next.router=ed)},[ed]),(0,a.useEffect)(()=>{$.refresh=ed.refresh},[ed.refresh]),(0,a.useEffect)(()=>{function handlePageShow(e){var t;e.persisted&&(null==(t=window.history.state)?void 0:t.tree)&&eu({type:l.ACTION_RESTORE,url:new URL(window.location.href),tree:window.history.state.tree})}return window.addEventListener("pageshow",handlePageShow),()=>{window.removeEventListener("pageshow",handlePageShow)}},[eu]),er.mpaNavigation){if($.pendingMpaPath!==ea){let e=window.location;er.pendingPush?e.assign(ea):e.replace(ea),$.pendingMpaPath=ea}(0,a.use)((0,w.createInfinitePromise)())}let ep=(0,a.useCallback)(e=>{let{state:t}=e;if(t){if(!t.__NA){window.location.reload();return}(0,a.startTransition)(()=>{eu({type:l.ACTION_RESTORE,url:new URL(window.location.href),tree:t.tree})})}},[eu]);(0,a.useEffect)(()=>(window.addEventListener("popstate",ep),()=>{window.removeEventListener("popstate",ep)}),[ep]);let eh=(0,a.useMemo)(()=>(0,C.findHeadInCache)(ee,q[1]),[ee,q]),ey=a.default.createElement(j.RedirectBoundary,null,eh,ee.subTreeData,a.default.createElement(E.AppRouterAnnouncer,{tree:q}));return a.default.createElement(a.default.Fragment,null,a.default.createElement(HistoryUpdater,{tree:q,pushRef:er,canonicalUrl:ea,sync:el}),a.default.createElement(s.PathnameContext.Provider,{value:ec},a.default.createElement(s.SearchParamsContext.Provider,{value:ei},a.default.createElement(o.GlobalLayoutRouterContext.Provider,{value:{buildId:t,changeByServerResponse:es,tree:q,focusAndScrollRef:en,nextUrl:eo}},a.default.createElement(o.AppRouterContext.Provider,{value:ed},a.default.createElement(o.LayoutRouterContext.Provider,{value:{childNodes:ee.parallelRoutes,tree:q,url:ea}},ey))))))}function AppRouter(e){let{globalErrorComponent:t,...r}=e;return a.default.createElement(_.ErrorBoundary,{errorComponent:t},a.default.createElement(Router,r))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3940:function(e,t,r){"use strict";function clientHookInServerComponentError(e){}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"clientHookInServerComponentError",{enumerable:!0,get:function(){return clientHookInServerComponentError}}),r(1024),r(2265),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9928:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ErrorBoundaryHandler:function(){return ErrorBoundaryHandler},GlobalError:function(){return GlobalError},default:function(){return l},ErrorBoundary:function(){return ErrorBoundary}});let n=r(1024),a=n._(r(2265)),o=r(94),u={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},text:{fontSize:"14px",fontWeight:400,lineHeight:"28px",margin:"0 8px"}};let ErrorBoundaryHandler=class ErrorBoundaryHandler extends a.default.Component{static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.error?{error:null,previousPathname:e.pathname}:{error:t.error,previousPathname:e.pathname}}render(){return this.state.error?a.default.createElement(a.default.Fragment,null,this.props.errorStyles,a.default.createElement(this.props.errorComponent,{error:this.state.error,reset:this.reset})):this.props.children}constructor(e){super(e),this.reset=()=>{this.setState({error:null})},this.state={error:null,previousPathname:this.props.pathname}}};function GlobalError(e){let{error:t}=e,r=null==t?void 0:t.digest;return a.default.createElement("html",{id:"__next_error__"},a.default.createElement("head",null),a.default.createElement("body",null,a.default.createElement("div",{style:u.error},a.default.createElement("div",null,a.default.createElement("h2",{style:u.text},"Application error: a "+(r?"server":"client")+"-side exception has occurred (see the "+(r?"server logs":"browser console")+" for more information)."),r?a.default.createElement("p",{style:u.text},"Digest: "+r):null))))}let l=GlobalError;function ErrorBoundary(e){let{errorComponent:t,errorStyles:r,children:n}=e,u=(0,o.usePathname)();return t?a.default.createElement(ErrorBoundaryHandler,{pathname:u,errorComponent:t,errorStyles:r},n):a.default.createElement(a.default.Fragment,null,n)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1351:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{DYNAMIC_ERROR_CODE:function(){return r},DynamicServerError:function(){return DynamicServerError}});let r="DYNAMIC_SERVER_USAGE";let DynamicServerError=class DynamicServerError extends Error{constructor(e){super("Dynamic server usage: "+e),this.digest=r}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3085:function(e,t){"use strict";let r;function createInfinitePromise(){return r||(r=new Promise(()=>{})),r}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInfinitePromise",{enumerable:!0,get:function(){return createInfinitePromise}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4119:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isNextRouterError",{enumerable:!0,get:function(){return isNextRouterError}});let n=r(9273),a=r(8466);function isNextRouterError(e){return e&&e.digest&&((0,a.isRedirectError)(e)||(0,n.isNotFoundError)(e))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6954:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return OuterLayoutRouter}});let n=r(1024),a=r(8533),o=a._(r(2265)),u=n._(r(4887)),l=r(6313),i=r(8146),s=r(3085),p=r(9928),_=r(8163),b=r(280),v=r(5138),m=r(3170),E=r(1263),j=r(3322),C=r(3559),w=["bottom","height","left","right","top","width","x","y"];function topOfElementInViewport(e,t){let r=e.getBoundingClientRect();return r.top>=0&&r.top<=t}let InnerScrollAndFocusHandler=class InnerScrollAndFocusHandler extends o.default.Component{componentDidMount(){this.handlePotentialScroll()}componentDidUpdate(){this.props.focusAndScrollRef.apply&&this.handlePotentialScroll()}render(){return this.props.children}constructor(...e){super(...e),this.handlePotentialScroll=()=>{let{focusAndScrollRef:e,segmentPath:t}=this.props;if(e.apply){var r;if(0!==e.segmentPaths.length&&!e.segmentPaths.some(e=>t.every((t,r)=>(0,_.matchSegment)(t,e[r]))))return;let n=null,a=e.hashFragment;if(a&&(n="top"===a?document.body:null!=(r=document.getElementById(a))?r:document.getElementsByName(a)[0]),n||(n=u.default.findDOMNode(this)),!(n instanceof Element))return;for(;!(n instanceof HTMLElement)||function(e){if(["sticky","fixed"].includes(getComputedStyle(e).position))return!0;let t=e.getBoundingClientRect();return w.every(e=>0===t[e])}(n);){if(null===n.nextElementSibling)return;n=n.nextElementSibling}e.apply=!1,e.hashFragment=null,e.segmentPaths=[],(0,b.handleSmoothScroll)(()=>{if(a){n.scrollIntoView();return}let e=document.documentElement,t=e.clientHeight;!topOfElementInViewport(n,t)&&(e.scrollTop=0,topOfElementInViewport(n,t)||n.scrollIntoView())},{dontForceLayout:!0,onlyHashChange:e.onlyHashChange}),e.onlyHashChange=!1,n.focus()}}}};function ScrollAndFocusHandler(e){let{segmentPath:t,children:r}=e,n=(0,o.useContext)(l.GlobalLayoutRouterContext);if(!n)throw Error("invariant global layout router not mounted");return o.default.createElement(InnerScrollAndFocusHandler,{segmentPath:t,focusAndScrollRef:n.focusAndScrollRef},r)}function InnerLayoutRouter(e){let{parallelRouterKey:t,url:r,childNodes:n,childProp:a,segmentPath:u,tree:p,cacheKey:b}=e,v=(0,o.useContext)(l.GlobalLayoutRouterContext);if(!v)throw Error("invariant global layout router not mounted");let{buildId:m,changeByServerResponse:E,tree:j}=v,w=n.get(b);if(a&&null!==a.current&&(w?w.status===l.CacheStates.LAZY_INITIALIZED&&(w.status=l.CacheStates.READY,w.subTreeData=a.current):(w={status:l.CacheStates.READY,data:null,subTreeData:a.current,parallelRoutes:new Map},n.set(b,w))),!w||w.status===l.CacheStates.LAZY_INITIALIZED){let e=function walkAddRefetch(e,t){if(e){let[r,n]=e,a=2===e.length;if((0,_.matchSegment)(t[0],r)&&t[1].hasOwnProperty(n)){if(a){let e=walkAddRefetch(void 0,t[1][n]);return[t[0],{...t[1],[n]:[e[0],e[1],e[2],"refetch"]}]}return[t[0],{...t[1],[n]:walkAddRefetch(e.slice(2),t[1][n])}]}}return t}(["",...u],j);w={status:l.CacheStates.DATA_FETCH,data:(0,C.createRecordFromThenable)((0,i.fetchServerResponse)(new URL(r,location.origin),e,v.nextUrl,m)),subTreeData:null,head:w&&w.status===l.CacheStates.LAZY_INITIALIZED?w.head:void 0,parallelRoutes:w&&w.status===l.CacheStates.LAZY_INITIALIZED?w.parallelRoutes:new Map},n.set(b,w)}if(!w)throw Error("Child node should always exist");if(w.subTreeData&&w.data)throw Error("Child node should not have both subTreeData and data");if(w.data){let[e,t]=(0,o.use)(w.data);w.data=null,setTimeout(()=>{(0,o.startTransition)(()=>{E(j,e,t)})}),(0,o.use)((0,s.createInfinitePromise)())}w.subTreeData||(0,o.use)((0,s.createInfinitePromise)());let A=o.default.createElement(l.LayoutRouterContext.Provider,{value:{tree:p[1][t],childNodes:w.parallelRoutes,url:r}},w.subTreeData);return A}function LoadingBoundary(e){let{children:t,loading:r,loadingStyles:n,hasLoading:a}=e;return a?o.default.createElement(o.Suspense,{fallback:o.default.createElement(o.default.Fragment,null,n,r)},t):o.default.createElement(o.default.Fragment,null,t)}function OuterLayoutRouter(e){let{parallelRouterKey:t,segmentPath:r,childProp:n,error:a,errorStyles:u,templateStyles:i,loading:s,loadingStyles:b,hasLoading:C,template:w,notFound:A,notFoundStyles:F,styles:D}=e,U=(0,o.useContext)(l.LayoutRouterContext);if(!U)throw Error("invariant expected layout router to be mounted");let{childNodes:B,tree:$,url:z}=U,K=B.get(t);K||(K=new Map,B.set(t,K));let q=$[1][t][0],ee=n.segment,et=(0,E.getSegmentValue)(q),er=[q];return o.default.createElement(o.default.Fragment,null,D,er.map(e=>{let D=(0,_.matchSegment)(e,ee),U=(0,E.getSegmentValue)(e),B=(0,j.createRouterCacheKey)(e);return o.default.createElement(l.TemplateContext.Provider,{key:(0,j.createRouterCacheKey)(e,!0),value:o.default.createElement(ScrollAndFocusHandler,{segmentPath:r},o.default.createElement(p.ErrorBoundary,{errorComponent:a,errorStyles:u},o.default.createElement(LoadingBoundary,{hasLoading:C,loading:s,loadingStyles:b},o.default.createElement(m.NotFoundBoundary,{notFound:A,notFoundStyles:F},o.default.createElement(v.RedirectBoundary,null,o.default.createElement(InnerLayoutRouter,{parallelRouterKey:t,url:z,tree:$,childNodes:K,childProp:D?n:null,segmentPath:r,cacheKey:B,isActive:et===U}))))))},i,w)}))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8163:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{matchSegment:function(){return matchSegment},canSegmentBeOverridden:function(){return canSegmentBeOverridden}});let n=r(5682),matchSegment=(e,t)=>"string"==typeof e?"string"==typeof t&&e===t:"string"!=typeof t&&e[0]===t[0]&&e[1]===t[1],canSegmentBeOverridden=(e,t)=>{var r;return!Array.isArray(e)&&!!Array.isArray(t)&&(null==(r=(0,n.getSegmentParam)(e))?void 0:r.param)===t[0]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},94:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ReadonlyURLSearchParams:function(){return ReadonlyURLSearchParams},useSearchParams:function(){return useSearchParams},usePathname:function(){return usePathname},ServerInsertedHTMLContext:function(){return i.ServerInsertedHTMLContext},useServerInsertedHTML:function(){return i.useServerInsertedHTML},useRouter:function(){return useRouter},useParams:function(){return useParams},useSelectedLayoutSegments:function(){return useSelectedLayoutSegments},useSelectedLayoutSegment:function(){return useSelectedLayoutSegment},redirect:function(){return s.redirect},permanentRedirect:function(){return s.permanentRedirect},RedirectType:function(){return s.RedirectType},notFound:function(){return p.notFound}});let n=r(2265),a=r(6313),o=r(7407),u=r(3940),l=r(1263),i=r(3972),s=r(8466),p=r(9273),_=Symbol("internal for urlsearchparams readonly");function readonlyURLSearchParamsError(){return Error("ReadonlyURLSearchParams cannot be modified")}let ReadonlyURLSearchParams=class ReadonlyURLSearchParams{[Symbol.iterator](){return this[_][Symbol.iterator]()}append(){throw readonlyURLSearchParamsError()}delete(){throw readonlyURLSearchParamsError()}set(){throw readonlyURLSearchParamsError()}sort(){throw readonlyURLSearchParamsError()}constructor(e){this[_]=e,this.entries=e.entries.bind(e),this.forEach=e.forEach.bind(e),this.get=e.get.bind(e),this.getAll=e.getAll.bind(e),this.has=e.has.bind(e),this.keys=e.keys.bind(e),this.values=e.values.bind(e),this.toString=e.toString.bind(e),this.size=e.size}};function useSearchParams(){(0,u.clientHookInServerComponentError)("useSearchParams");let e=(0,n.useContext)(o.SearchParamsContext),t=(0,n.useMemo)(()=>e?new ReadonlyURLSearchParams(e):null,[e]);return t}function usePathname(){return(0,u.clientHookInServerComponentError)("usePathname"),(0,n.useContext)(o.PathnameContext)}function useRouter(){(0,u.clientHookInServerComponentError)("useRouter");let e=(0,n.useContext)(a.AppRouterContext);if(null===e)throw Error("invariant expected app router to be mounted");return e}function useParams(){(0,u.clientHookInServerComponentError)("useParams");let e=(0,n.useContext)(a.GlobalLayoutRouterContext),t=(0,n.useContext)(o.PathParamsContext);return(0,n.useMemo)(()=>(null==e?void 0:e.tree)?function getSelectedParams(e,t){void 0===t&&(t={});let r=e[1];for(let e of Object.values(r)){let r=e[0],n=Array.isArray(r),a=n?r[1]:r;if(!a||a.startsWith("__PAGE__"))continue;let o=n&&("c"===r[2]||"oc"===r[2]);o?t[r[0]]=r[1].split("/"):n&&(t[r[0]]=r[1]),t=getSelectedParams(e,t)}return t}(e.tree):t,[null==e?void 0:e.tree,t])}function useSelectedLayoutSegments(e){void 0===e&&(e="children"),(0,u.clientHookInServerComponentError)("useSelectedLayoutSegments");let{tree:t}=(0,n.useContext)(a.LayoutRouterContext);return function getSelectedLayoutSegmentPath(e,t,r,n){let a;if(void 0===r&&(r=!0),void 0===n&&(n=[]),r)a=e[1][t];else{var o;let t=e[1];a=null!=(o=t.children)?o:Object.values(t)[0]}if(!a)return n;let u=a[0],i=(0,l.getSegmentValue)(u);return!i||i.startsWith("__PAGE__")?n:(n.push(i),getSelectedLayoutSegmentPath(a,t,!1,n))}(t,e)}function useSelectedLayoutSegment(e){void 0===e&&(e="children"),(0,u.clientHookInServerComponentError)("useSelectedLayoutSegment");let t=useSelectedLayoutSegments(e);return 0===t.length?null:t[0]}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3170:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"NotFoundBoundary",{enumerable:!0,get:function(){return NotFoundBoundary}});let n=r(1024),a=n._(r(2265)),o=r(94);let NotFoundErrorBoundary=class NotFoundErrorBoundary extends a.default.Component{static getDerivedStateFromError(e){if((null==e?void 0:e.digest)==="NEXT_NOT_FOUND")return{notFoundTriggered:!0};throw e}static getDerivedStateFromProps(e,t){return e.pathname!==t.previousPathname&&t.notFoundTriggered?{notFoundTriggered:!1,previousPathname:e.pathname}:{notFoundTriggered:t.notFoundTriggered,previousPathname:e.pathname}}render(){return this.state.notFoundTriggered?a.default.createElement(a.default.Fragment,null,a.default.createElement("meta",{name:"robots",content:"noindex"}),!1,this.props.notFoundStyles,this.props.notFound):this.props.children}constructor(e){super(e),this.state={notFoundTriggered:!!e.asNotFound,previousPathname:e.pathname}}};function NotFoundBoundary(e){let{notFound:t,notFoundStyles:r,asNotFound:n,children:u}=e,l=(0,o.usePathname)();return t?a.default.createElement(NotFoundErrorBoundary,{pathname:l,notFound:t,notFoundStyles:r,asNotFound:n},u):a.default.createElement(a.default.Fragment,null,u)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9273:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{notFound:function(){return notFound},isNotFoundError:function(){return isNotFoundError}});let r="NEXT_NOT_FOUND";function notFound(){let e=Error(r);throw e.digest=r,e}function isNotFoundError(e){return(null==e?void 0:e.digest)===r}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},839:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"PromiseQueue",{enumerable:!0,get:function(){return PromiseQueue}});let n=r(4677),a=r(6249);var o=a._("_maxConcurrency"),u=a._("_runningCount"),l=a._("_queue"),i=a._("_processNext");let PromiseQueue=class PromiseQueue{enqueue(e){let t,r;let a=new Promise((e,n)=>{t=e,r=n}),task=async()=>{try{n._(this,u)[u]++;let r=await e();t(r)}catch(e){r(e)}finally{n._(this,u)[u]--,n._(this,i)[i]()}};return n._(this,l)[l].push({promiseFn:a,task}),n._(this,i)[i](),a}bump(e){let t=n._(this,l)[l].findIndex(t=>t.promiseFn===e);if(t>-1){let e=n._(this,l)[l].splice(t,1)[0];n._(this,l)[l].unshift(e),n._(this,i)[i](!0)}}constructor(e=5){Object.defineProperty(this,i,{value:processNext}),Object.defineProperty(this,o,{writable:!0,value:void 0}),Object.defineProperty(this,u,{writable:!0,value:void 0}),Object.defineProperty(this,l,{writable:!0,value:void 0}),n._(this,o)[o]=e,n._(this,u)[u]=0,n._(this,l)[l]=[]}};function processNext(e){if(void 0===e&&(e=!1),(n._(this,u)[u]0){var t;null==(t=n._(this,l)[l].shift())||t.task()}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5138:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectErrorBoundary:function(){return RedirectErrorBoundary},RedirectBoundary:function(){return RedirectBoundary}});let n=r(8533),a=n._(r(2265)),o=r(94),u=r(8466);function HandleRedirect(e){let{redirect:t,reset:r,redirectType:n}=e,l=(0,o.useRouter)();return(0,a.useEffect)(()=>{a.default.startTransition(()=>{n===u.RedirectType.push?l.push(t,{}):l.replace(t,{}),r()})},[t,n,r,l]),null}let RedirectErrorBoundary=class RedirectErrorBoundary extends a.default.Component{static getDerivedStateFromError(e){if((0,u.isRedirectError)(e)){let t=(0,u.getURLFromRedirectError)(e),r=(0,u.getRedirectTypeFromError)(e);return{redirect:t,redirectType:r}}throw e}render(){let{redirect:e,redirectType:t}=this.state;return null!==e&&null!==t?a.default.createElement(HandleRedirect,{redirect:e,redirectType:t,reset:()=>this.setState({redirect:null})}):this.props.children}constructor(e){super(e),this.state={redirect:null,redirectType:null}}};function RedirectBoundary(e){let{children:t}=e,r=(0,o.useRouter)();return a.default.createElement(RedirectErrorBoundary,{router:r},t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8466:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{RedirectType:function(){return n},getRedirectError:function(){return getRedirectError},redirect:function(){return redirect},permanentRedirect:function(){return permanentRedirect},isRedirectError:function(){return isRedirectError},getURLFromRedirectError:function(){return getURLFromRedirectError},getRedirectTypeFromError:function(){return getRedirectTypeFromError}});let o=r(228),u="NEXT_REDIRECT";function getRedirectError(e,t,r){void 0===r&&(r=!1);let n=Error(u);n.digest=u+";"+t+";"+e+";"+r;let a=o.requestAsyncStorage.getStore();return a&&(n.mutableCookies=a.mutableCookies),n}function redirect(e,t){throw void 0===t&&(t="replace"),getRedirectError(e,t,!1)}function permanentRedirect(e,t){throw void 0===t&&(t="replace"),getRedirectError(e,t,!0)}function isRedirectError(e){if("string"!=typeof(null==e?void 0:e.digest))return!1;let[t,r,n,a]=e.digest.split(";",4);return t===u&&("replace"===r||"push"===r)&&"string"==typeof n&&("true"===a||"false"===a)}function getURLFromRedirectError(e){return isRedirectError(e)?e.digest.split(";",3)[2]:null}function getRedirectTypeFromError(e){if(!isRedirectError(e))throw Error("Not a redirect error");return e.digest.split(";",3)[1]}(a=n||(n={})).push="push",a.replace="replace",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7264:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return RenderFromTemplateContext}});let n=r(8533),a=n._(r(2265)),o=r(6313);function RenderFromTemplateContext(){let e=(0,a.useContext)(o.TemplateContext);return a.default.createElement(a.default.Fragment,null,e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},228:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"requestAsyncStorage",{enumerable:!0,get:function(){return a}});let n=r(7346),a=(0,n.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2713:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyFlightData",{enumerable:!0,get:function(){return applyFlightData}});let n=r(6313),a=r(782),o=r(1956);function applyFlightData(e,t,r,u){void 0===u&&(u=!1);let[l,i,s]=r.slice(-3);return null!==i&&(3===r.length?(t.status=n.CacheStates.READY,t.subTreeData=i,(0,a.fillLazyItemsTillLeafWithHead)(t,e,l,s,u)):(t.status=n.CacheStates.READY,t.subTreeData=e.subTreeData,t.parallelRoutes=new Map(e.parallelRoutes),(0,o.fillCacheWithNewSubTreeData)(t,e,r,u)),!0)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8934:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"applyRouterStatePatchToTree",{enumerable:!0,get:function(){return function applyRouterStatePatchToTree(e,t,r){let a;let[o,u,,,l]=t;if(1===e.length){let e=applyPatch(t,r);return e}let[i,s]=e;if(!(0,n.matchSegment)(i,o))return null;let p=2===e.length;if(p)a=applyPatch(u[s],r);else if(null===(a=applyRouterStatePatchToTree(e.slice(2),u[s],r)))return null;let _=[e[0],{...u,[s]:a}];return l&&(_[4]=!0),_}}});let n=r(8163);function applyPatch(e,t){let[r,a]=e,[o,u]=t;if("__DEFAULT__"===o&&"__DEFAULT__"!==r)return e;if((0,n.matchSegment)(r,o)){let t={};for(let e in a){let r=void 0!==u[e];r?t[e]=applyPatch(a[e],u[e]):t[e]=a[e]}for(let e in u)t[e]||(t[e]=u[e]);let n=[r,t];return e[2]&&(n[2]=e[2]),e[3]&&(n[3]=e[3]),e[4]&&(n[4]=e[4]),n}return t}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2082:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{extractPathFromFlightRouterState:function(){return extractPathFromFlightRouterState},computeChangedPath:function(){return computeChangedPath}});let n=r(4507),a=r(1706),o=r(8163),removeLeadingSlash=e=>"/"===e[0]?e.slice(1):e,segmentToPathname=e=>"string"==typeof e?e:e[1];function normalizeSegments(e){return e.reduce((e,t)=>""===(t=removeLeadingSlash(t))||(0,a.isGroupSegment)(t)?e:e+"/"+t,"")||"/"}function extractPathFromFlightRouterState(e){var t;let r=Array.isArray(e[0])?e[0][1]:e[0];if("__DEFAULT__"===r||n.INTERCEPTION_ROUTE_MARKERS.some(e=>r.startsWith(e)))return;if(r.startsWith("__PAGE__"))return"";let a=[r],o=null!=(t=e[1])?t:{},u=o.children?extractPathFromFlightRouterState(o.children):void 0;if(void 0!==u)a.push(u);else for(let[e,t]of Object.entries(o)){if("children"===e)continue;let r=extractPathFromFlightRouterState(t);void 0!==r&&a.push(r)}return normalizeSegments(a)}function computeChangedPath(e,t){let r=function computeChangedPathImpl(e,t){let[r,a]=e,[u,l]=t,i=segmentToPathname(r),s=segmentToPathname(u);if(n.INTERCEPTION_ROUTE_MARKERS.some(e=>i.startsWith(e)||s.startsWith(e)))return"";if(!(0,o.matchSegment)(r,u)){var p;return null!=(p=extractPathFromFlightRouterState(t))?p:""}for(let e in a)if(l[e]){let t=computeChangedPathImpl(a[e],l[e]);if(null!==t)return segmentToPathname(u)+"/"+t}return null}(e,t);return null==r||"/"===r?r:normalizeSegments(r.split("/"))}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2301:function(e,t){"use strict";function createHrefFromUrl(e,t){return void 0===t&&(t=!0),e.pathname+e.search+(t?e.hash:"")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createHrefFromUrl",{enumerable:!0,get:function(){return createHrefFromUrl}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5311:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createInitialRouterState",{enumerable:!0,get:function(){return createInitialRouterState}});let n=r(6313),a=r(2301),o=r(782),u=r(2082);function createInitialRouterState(e){var t;let{buildId:r,initialTree:l,children:i,initialCanonicalUrl:s,initialParallelRoutes:p,isServer:_,location:b,initialHead:v}=e,m={status:n.CacheStates.READY,data:null,subTreeData:i,parallelRoutes:_?new Map:p};return(null===p||0===p.size)&&(0,o.fillLazyItemsTillLeafWithHead)(m,void 0,l,v),{buildId:r,tree:l,cache:m,prefetchCache:new Map,pushRef:{pendingPush:!1,mpaNavigation:!1},focusAndScrollRef:{apply:!1,onlyHashChange:!1,hashFragment:null,segmentPaths:[]},canonicalUrl:b?(0,a.createHrefFromUrl)(b):s,nextUrl:null!=(t=(0,u.extractPathFromFlightRouterState)(l)||(null==b?void 0:b.pathname))?t:null}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},180:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createOptimisticTree",{enumerable:!0,get:function(){return function createOptimisticTree(e,t,r){let a;let[o,u,l,i,s]=t||[null,{}],p=e[0],_=1===e.length,b=null!==o&&(0,n.matchSegment)(o,p),v=Object.keys(u).length>1,m=!t||!b||v,E={};if(null!==o&&b&&(E=u),!_&&!v){let t=createOptimisticTree(e.slice(1),E?E.children:null,r||m);a=t}let j=[p,{...E,...a?{children:a}:{}}];return l&&(j[2]=l),!r&&m?j[3]="refetch":b&&i&&(j[3]=i),b&&s&&(j[4]=s),j}}});let n=r(8163);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3559:function(e,t){"use strict";function createRecordFromThenable(e){return e.status="pending",e.then(t=>{"pending"===e.status&&(e.status="fulfilled",e.value=t)},t=>{"pending"===e.status&&(e.status="rejected",e.reason=t)}),e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRecordFromThenable",{enumerable:!0,get:function(){return createRecordFromThenable}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3322:function(e,t){"use strict";function createRouterCacheKey(e,t){return void 0===t&&(t=!1),Array.isArray(e)?(e[0]+"|"+e[1]+"|"+e[2]).toLowerCase():t&&e.startsWith("__PAGE__")?"__PAGE__":e}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createRouterCacheKey",{enumerable:!0,get:function(){return createRouterCacheKey}}),("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8146:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fetchServerResponse",{enumerable:!0,get:function(){return fetchServerResponse}});let n=r(8343),a=r(3728),o=r(5231),u=r(9706),l=r(6360),{createFromFetch:i}=r(6671);function doMpaNavigation(e){return[(0,a.urlToUrlWithoutFlightMarker)(e).toString(),void 0]}async function fetchServerResponse(e,t,r,s,p){let _={[n.RSC]:"1",[n.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(t))};p===u.PrefetchKind.AUTO&&(_[n.NEXT_ROUTER_PREFETCH]="1"),r&&(_[n.NEXT_URL]=r);let b=(0,l.hexHash)([_[n.NEXT_ROUTER_PREFETCH]||"0",_[n.NEXT_ROUTER_STATE_TREE],_[n.NEXT_URL]].join(","));try{let t=new URL(e);t.pathname.endsWith("/")?t.pathname+="index.txt":t.pathname+=".txt",t.searchParams.set(n.NEXT_RSC_UNION_QUERY,b);let r=await fetch(t,{credentials:"same-origin",headers:_}),u=(0,a.urlToUrlWithoutFlightMarker)(r.url),l=r.redirected?u:void 0,p=r.headers.get("content-type")||"",v=p===n.RSC_CONTENT_TYPE_HEADER;if(v||(v=p.startsWith("text/plain")),!v||!r.ok)return e.hash&&(u.hash=e.hash),doMpaNavigation(u.toString());let[m,E]=await i(Promise.resolve(r),{callServer:o.callServer});if(s!==m)return doMpaNavigation(r.url);return[E,l]}catch(t){return console.error("Failed to fetch RSC payload for "+e+". Falling back to browser navigation.",t),[e.toString(),void 0]}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6443:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithDataProperty",{enumerable:!0,get:function(){return function fillCacheWithDataProperty(e,t,r,o,u){void 0===u&&(u=!1);let l=r.length<=2,[i,s]=r,p=(0,a.createRouterCacheKey)(s),_=t.parallelRoutes.get(i);if(!_||u&&t.parallelRoutes.size>1)return{bailOptimistic:!0};let b=e.parallelRoutes.get(i);b&&b!==_||(b=new Map(_),e.parallelRoutes.set(i,b));let v=_.get(p),m=b.get(p);if(l){m&&m.data&&m!==v||b.set(p,{status:n.CacheStates.DATA_FETCH,data:o(),subTreeData:null,parallelRoutes:new Map});return}if(!m||!v){m||b.set(p,{status:n.CacheStates.DATA_FETCH,data:o(),subTreeData:null,parallelRoutes:new Map});return}return m===v&&(m={status:m.status,data:m.data,subTreeData:m.subTreeData,parallelRoutes:new Map(m.parallelRoutes)},b.set(p,m)),fillCacheWithDataProperty(m,v,r.slice(2),o)}}});let n=r(6313),a=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1956:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillCacheWithNewSubTreeData",{enumerable:!0,get:function(){return function fillCacheWithNewSubTreeData(e,t,r,l){let i=r.length<=5,[s,p]=r,_=(0,u.createRouterCacheKey)(p),b=t.parallelRoutes.get(s);if(!b)return;let v=e.parallelRoutes.get(s);v&&v!==b||(v=new Map(b),e.parallelRoutes.set(s,v));let m=b.get(_),E=v.get(_);if(i){E&&E.data&&E!==m||(E={status:n.CacheStates.READY,data:null,subTreeData:r[3],parallelRoutes:m?new Map(m.parallelRoutes):new Map},m&&(0,a.invalidateCacheByRouterState)(E,m,r[2]),(0,o.fillLazyItemsTillLeafWithHead)(E,m,r[2],r[4],l),v.set(_,E));return}E&&m&&(E===m&&(E={status:E.status,data:E.data,subTreeData:E.subTreeData,parallelRoutes:new Map(E.parallelRoutes)},v.set(_,E)),fillCacheWithNewSubTreeData(E,m,r.slice(2),l))}}});let n=r(6313),a=r(5303),o=r(782),u=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},782:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"fillLazyItemsTillLeafWithHead",{enumerable:!0,get:function(){return function fillLazyItemsTillLeafWithHead(e,t,r,o,u){let l=0===Object.keys(r[1]).length;if(l){e.head=o;return}for(let l in r[1]){let i=r[1][l],s=i[0],p=(0,a.createRouterCacheKey)(s);if(t){let r=t.parallelRoutes.get(l);if(r){let t=new Map(r),a=t.get(p),s=u&&a?{status:a.status,data:a.data,subTreeData:a.subTreeData,parallelRoutes:new Map(a.parallelRoutes)}:{status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map(null==a?void 0:a.parallelRoutes)};t.set(p,s),fillLazyItemsTillLeafWithHead(s,a,i,o,u),e.parallelRoutes.set(l,t);continue}}let _={status:n.CacheStates.LAZY_INITIALIZED,data:null,subTreeData:null,parallelRoutes:new Map},b=e.parallelRoutes.get(l);b?b.set(p,_):e.parallelRoutes.set(l,new Map([[p,_]])),fillLazyItemsTillLeafWithHead(_,void 0,i,o,u)}}}});let n=r(6313),a=r(3322);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2800:function(e,t){"use strict";var r,n;function getPrefetchEntryCacheStatus(e){let{kind:t,prefetchTime:r,lastUsedTime:n}=e;return Date.now()<(null!=n?n:r)+3e4?n?"reusable":"fresh":"auto"===t&&Date.now()["children",e]).flat(),v=(0,s.fillCacheWithDataProperty)(i,e.cache,b,()=>(_||(_=(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,u,e.nextUrl,e.buildId))),_),!0);if(!(null==v?void 0:v.bailOptimistic))return B.previousTree=e.tree,B.patchedTree=u,B.pendingPush=et,B.hashFragment=q,B.shouldScroll=z,B.scrollableSegments=[],B.cache=i,B.canonicalUrl=ee,e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),{data:_?(0,o.createRecordFromThenable)(Promise.resolve(_)):null,kind:m.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:Date.now()}),(0,E.handleMutable)(e,B)}if(!en){let t=(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,void 0)),n={data:(0,o.createRecordFromThenable)(Promise.resolve(t)),kind:m.PrefetchKind.TEMPORARY,prefetchTime:Date.now(),treeAtTimeOfPrefetch:e.tree,lastUsedTime:null};e.prefetchCache.set((0,l.createHrefFromUrl)(r,!1),n),en=n}let ea=(0,C.getPrefetchEntryCacheStatus)(en),{treeAtTimeOfPrefetch:eo,data:eu}=en;A.prefetchQueue.bump(eu);let[el,ei]=(0,u.readRecordValue)(eu);if(en.lastUsedTime||(en.lastUsedTime=Date.now()),"string"==typeof el)return handleExternalUrl(e,B,el,et);let ec=e.tree,es=e.cache,ef=[];for(let t of el){let u=t.slice(0,-4),l=t.slice(-3)[0],p=["",...u],m=(0,_.applyRouterStatePatchToTree)(p,ec,l);if(null===m&&(m=(0,_.applyRouterStatePatchToTree)(p,eo,l)),null!==m){if((0,v.isNavigatingToNewRootLayout)(ec,m))return handleExternalUrl(e,B,ee,et);let _=(0,j.applyFlightData)(es,U,t,"auto"===en.kind&&ea===C.PrefetchCacheEntryStatus.reusable);_||ea!==C.PrefetchCacheEntryStatus.stale||(_=function(e,t,r,a,o){let u=!1;e.status=n.CacheStates.READY,e.subTreeData=t.subTreeData,e.parallelRoutes=new Map(t.parallelRoutes);let l=generateSegmentsFromPatch(a).map(e=>[...r,...e]);for(let r of l){let n=(0,s.fillCacheWithDataProperty)(e,t,r,o);(null==n?void 0:n.bailOptimistic)||(u=!0)}return u}(U,es,u,l,()=>(0,o.createRecordFromThenable)((0,a.fetchServerResponse)(r,ec,e.nextUrl,e.buildId))));let E=(0,b.shouldHardNavigate)(p,ec);for(let e of(E?(U.status=n.CacheStates.READY,U.subTreeData=es.subTreeData,(0,i.invalidateCacheBelowFlightSegmentPath)(U,es,u),B.cache=U):_&&(B.cache=U),es=U,ec=m,generateSegmentsFromPatch(l))){let t=[...u,...e];"__DEFAULT__"!==t[t.length-1]&&ef.push(t)}}}return B.previousTree=e.tree,B.patchedTree=ec,B.canonicalUrl=ei?(0,l.createHrefFromUrl)(ei):ee,B.pendingPush=et,B.scrollableSegments=ef,B.hashFragment=q,B.shouldScroll=z,(0,E.handleMutable)(e,B)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3709:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{prefetchQueue:function(){return p},prefetchReducer:function(){return prefetchReducer}});let n=r(2301),a=r(8146),o=r(9706),u=r(3559),l=r(3627),i=r(8343),s=r(839),p=new s.PromiseQueue(5);function prefetchReducer(e,t){(0,l.prunePrefetchCache)(e.prefetchCache);let{url:r}=t;r.searchParams.delete(i.NEXT_RSC_UNION_QUERY);let s=(0,n.createHrefFromUrl)(r,!1),_=e.prefetchCache.get(s);if(_&&(_.kind===o.PrefetchKind.TEMPORARY&&e.prefetchCache.set(s,{..._,kind:t.kind}),!(_.kind===o.PrefetchKind.AUTO&&t.kind===o.PrefetchKind.FULL)))return e;let b=(0,u.createRecordFromThenable)(p.enqueue(()=>(0,a.fetchServerResponse)(r,e.tree,e.nextUrl,e.buildId,t.kind)));return e.prefetchCache.set(s,{treeAtTimeOfPrefetch:e.tree,data:b,kind:t.kind,prefetchTime:Date.now(),lastUsedTime:null}),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3627:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"prunePrefetchCache",{enumerable:!0,get:function(){return prunePrefetchCache}});let n=r(2800);function prunePrefetchCache(e){for(let[t,r]of e)(0,n.getPrefetchEntryCacheStatus)(r)===n.PrefetchCacheEntryStatus.expired&&e.delete(t)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2701:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"refreshReducer",{enumerable:!0,get:function(){return refreshReducer}});let n=r(8146),a=r(3559),o=r(929),u=r(2301),l=r(8934),i=r(2782),s=r(8640),p=r(8543),_=r(6313),b=r(782);function refreshReducer(e,t){let{cache:r,mutable:v,origin:m}=t,E=e.canonicalUrl,j=e.tree,C=JSON.stringify(v.previousTree)===JSON.stringify(j);if(C)return(0,p.handleMutable)(e,v);r.data||(r.data=(0,a.createRecordFromThenable)((0,n.fetchServerResponse)(new URL(E,m),[j[0],j[1],j[2],"refetch"],e.nextUrl,e.buildId)));let[w,A]=(0,o.readRecordValue)(r.data);if("string"==typeof w)return(0,s.handleExternalUrl)(e,v,w,e.pushRef.pendingPush);for(let t of(r.data=null,w)){if(3!==t.length)return console.log("REFRESH FAILED"),e;let[n]=t,a=(0,l.applyRouterStatePatchToTree)([""],j,n);if(null===a)throw Error("SEGMENT MISMATCH");if((0,i.isNavigatingToNewRootLayout)(j,a))return(0,s.handleExternalUrl)(e,v,E,e.pushRef.pendingPush);let o=A?(0,u.createHrefFromUrl)(A):void 0;A&&(v.canonicalUrl=o);let[p,m]=t.slice(-2);null!==p&&(r.status=_.CacheStates.READY,r.subTreeData=p,(0,b.fillLazyItemsTillLeafWithHead)(r,void 0,n,m),v.cache=r,v.prefetchCache=new Map),v.previousTree=j,v.patchedTree=a,v.canonicalUrl=E,j=a}return(0,p.handleMutable)(e,v)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1705:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"restoreReducer",{enumerable:!0,get:function(){return restoreReducer}});let n=r(2301);function restoreReducer(e,t){let{url:r,tree:a}=t,o=(0,n.createHrefFromUrl)(r);return{buildId:e.buildId,canonicalUrl:o,pushRef:e.pushRef,focusAndScrollRef:e.focusAndScrollRef,cache:e.cache,prefetchCache:e.prefetchCache,tree:a,nextUrl:r.pathname}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},1383:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverActionReducer",{enumerable:!0,get:function(){return serverActionReducer}});let n=r(5231),a=r(8343),o=r(3559),u=r(929),l=r(9872),i=r(2301),s=r(8640),p=r(8934),_=r(2782),b=r(6313),v=r(8543),m=r(782),{createFromFetch:E,encodeReply:j}=r(6671);async function fetchServerAction(e,t){let r,{actionId:o,actionArgs:u}=t,i=await j(u),s=await fetch("",{method:"POST",headers:{Accept:a.RSC_CONTENT_TYPE_HEADER,[a.ACTION]:o,[a.NEXT_ROUTER_STATE_TREE]:encodeURIComponent(JSON.stringify(e.tree)),...e.nextUrl?{[a.NEXT_URL]:e.nextUrl}:{}},body:i}),p=s.headers.get("x-action-redirect");try{let e=JSON.parse(s.headers.get("x-action-revalidated")||"[[],0,0]");r={paths:e[0]||[],tag:!!e[1],cookie:e[2]}}catch(e){r={paths:[],tag:!1,cookie:!1}}let _=p?new URL((0,l.addBasePath)(p),new URL(e.canonicalUrl,window.location.href)):void 0;if(s.headers.get("content-type")===a.RSC_CONTENT_TYPE_HEADER){let e=await E(Promise.resolve(s),{callServer:n.callServer});if(p){let[,t]=null!=e?e:[];return{actionFlightData:t,redirectLocation:_,revalidatedParts:r}}let[t,[,a]]=null!=e?e:[];return{actionResult:t,actionFlightData:a,redirectLocation:_,revalidatedParts:r}}return{redirectLocation:_,revalidatedParts:r}}function serverActionReducer(e,t){let{mutable:r,cache:n,resolve:a,reject:l}=t,E=e.canonicalUrl,j=e.tree,C=JSON.stringify(r.previousTree)===JSON.stringify(j);if(C)return(0,v.handleMutable)(e,r);if(r.inFlightServerAction){if("fulfilled"!==r.inFlightServerAction.status&&r.globalMutable.pendingNavigatePath&&r.globalMutable.pendingNavigatePath!==E)return r.inFlightServerAction.then(()=>{r.actionResultResolved||(r.inFlightServerAction=null,r.globalMutable.pendingNavigatePath=void 0,r.globalMutable.refresh(),r.actionResultResolved=!0)},()=>{}),e}else r.inFlightServerAction=(0,o.createRecordFromThenable)(fetchServerAction(e,t));try{let{actionResult:t,actionFlightData:o,redirectLocation:l}=(0,u.readRecordValue)(r.inFlightServerAction);if(l&&(e.pushRef.pendingPush=!0,r.pendingPush=!0),r.previousTree=e.tree,!o){if(r.actionResultResolved||(a(t),r.actionResultResolved=!0),l)return(0,s.handleExternalUrl)(e,r,l.href,e.pushRef.pendingPush);return e}if("string"==typeof o)return(0,s.handleExternalUrl)(e,r,o,e.pushRef.pendingPush);for(let t of(r.inFlightServerAction=null,o)){if(3!==t.length)return console.log("SERVER ACTION APPLY FAILED"),e;let[a]=t,o=(0,p.applyRouterStatePatchToTree)([""],j,a);if(null===o)throw Error("SEGMENT MISMATCH");if((0,_.isNavigatingToNewRootLayout)(j,o))return(0,s.handleExternalUrl)(e,r,E,e.pushRef.pendingPush);let[u,l]=t.slice(-2);null!==u&&(n.status=b.CacheStates.READY,n.subTreeData=u,(0,m.fillLazyItemsTillLeafWithHead)(n,void 0,a,l),r.cache=n,r.prefetchCache=new Map),r.previousTree=j,r.patchedTree=o,r.canonicalUrl=E,j=o}if(l){let e=(0,i.createHrefFromUrl)(l,!1);r.canonicalUrl=e}return r.actionResultResolved||(a(t),r.actionResultResolved=!0),(0,v.handleMutable)(e,r)}catch(t){if("rejected"===t.status)return r.actionResultResolved||(l(t.reason),r.actionResultResolved=!0),e;throw t}}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},5330:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"serverPatchReducer",{enumerable:!0,get:function(){return serverPatchReducer}});let n=r(2301),a=r(8934),o=r(2782),u=r(8640),l=r(2713),i=r(8543);function serverPatchReducer(e,t){let{flightData:r,previousTree:s,overrideCanonicalUrl:p,cache:_,mutable:b}=t,v=JSON.stringify(s)===JSON.stringify(e.tree);if(!v)return console.log("TREE MISMATCH"),e;if(b.previousTree)return(0,i.handleMutable)(e,b);if("string"==typeof r)return(0,u.handleExternalUrl)(e,b,r,e.pushRef.pendingPush);let m=e.tree,E=e.cache;for(let t of r){let r=t.slice(0,-4),[i]=t.slice(-3,-2),s=(0,a.applyRouterStatePatchToTree)(["",...r],m,i);if(null===s)throw Error("SEGMENT MISMATCH");if((0,o.isNavigatingToNewRootLayout)(m,s))return(0,u.handleExternalUrl)(e,b,e.canonicalUrl,e.pushRef.pendingPush);let v=p?(0,n.createHrefFromUrl)(p):void 0;v&&(b.canonicalUrl=v),(0,l.applyFlightData)(E,_,t),b.previousTree=m,b.patchedTree=s,b.cache=_,E=_,m=s}return(0,i.handleMutable)(e,b)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},9706:function(e,t){"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{PrefetchKind:function(){return r},ACTION_REFRESH:function(){return a},ACTION_NAVIGATE:function(){return o},ACTION_RESTORE:function(){return u},ACTION_SERVER_PATCH:function(){return l},ACTION_PREFETCH:function(){return i},ACTION_FAST_REFRESH:function(){return s},ACTION_SERVER_ACTION:function(){return p}});let a="refresh",o="navigate",u="restore",l="server-patch",i="prefetch",s="fast-refresh",p="server-action";(n=r||(r={})).AUTO="auto",n.FULL="full",n.TEMPORARY="temporary",("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},7205:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"reducer",{enumerable:!0,get:function(){return reducer}});let n=r(9706),a=r(8640),o=r(5330),u=r(1705),l=r(2701),i=r(3709),s=r(3682),p=r(1383),reducer=function(e,t){switch(t.type){case n.ACTION_NAVIGATE:return(0,a.navigateReducer)(e,t);case n.ACTION_SERVER_PATCH:return(0,o.serverPatchReducer)(e,t);case n.ACTION_RESTORE:return(0,u.restoreReducer)(e,t);case n.ACTION_REFRESH:return(0,l.refreshReducer)(e,t);case n.ACTION_FAST_REFRESH:return(0,s.fastRefreshReducer)(e,t);case n.ACTION_PREFETCH:return(0,i.prefetchReducer)(e,t);case n.ACTION_SERVER_ACTION:return(0,p.serverActionReducer)(e,t);default:throw Error("Unknown action")}};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3006:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"shouldHardNavigate",{enumerable:!0,get:function(){return function shouldHardNavigate(e,t){let[r,a]=t,[o,u]=e;if(!(0,n.matchSegment)(o,r))return!!Array.isArray(o);let l=e.length<=2;return!l&&shouldHardNavigate(e.slice(2),a[u])}}});let n=r(8163);("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8519:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createSearchParamsBailoutProxy",{enumerable:!0,get:function(){return createSearchParamsBailoutProxy}});let n=r(2004);function createSearchParamsBailoutProxy(){return new Proxy({},{get(e,t){"string"==typeof t&&(0,n.staticGenerationBailout)("searchParams."+t)}})}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8985:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationAsyncStorage",{enumerable:!0,get:function(){return a}});let n=r(7346),a=(0,n.createAsyncLocalStorage)();("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2004:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"staticGenerationBailout",{enumerable:!0,get:function(){return staticGenerationBailout}});let n=r(1351),a=r(8985);let StaticGenBailoutError=class StaticGenBailoutError extends Error{constructor(...e){super(...e),this.code="NEXT_STATIC_GEN_BAILOUT"}};function formatErrorMessage(e,t){let{dynamic:r,link:n}=t||{};return"Page"+(r?' with `dynamic = "'+r+'"`':"")+" couldn't be rendered statically because it used `"+e+"`."+(n?" See more info here: "+n:"")}let staticGenerationBailout=(e,t)=>{let r=a.staticGenerationAsyncStorage.getStore();if(null==r?void 0:r.forceStatic)return!0;if(null==r?void 0:r.dynamicShouldError){var o;throw new StaticGenBailoutError(formatErrorMessage(e,{...t,dynamic:null!=(o=null==t?void 0:t.dynamic)?o:"error"}))}if(!r||(r.revalidate=0,(null==t?void 0:t.dynamic)||(r.staticPrefetchBailout=!0)),null==r?void 0:r.isStaticGeneration){let a=new n.DynamicServerError(formatErrorMessage(e,{...t,link:"https://nextjs.org/docs/messages/dynamic-server-error"}));throw r.dynamicUsageDescription=e,r.dynamicUsageStack=a.stack,a}return!1};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},8297:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return StaticGenerationSearchParamsBailoutProvider}});let n=r(1024),a=n._(r(2265)),o=r(8519);function StaticGenerationSearchParamsBailoutProvider(e){let{Component:t,propsForComponent:r,isStaticGeneration:n}=e;if(n){let e=(0,o.createSearchParamsBailoutProxy)();return a.default.createElement(t,{searchParams:e,...r})}return a.default.createElement(t,r)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2327:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"useReducerWithReduxDevtools",{enumerable:!0,get:function(){return useReducerWithReduxDevtools}});let n=r(2265);function normalizeRouterState(e){if(e instanceof Map){let t={};for(let[r,n]of e.entries()){if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n._bundlerConfig){t[r]="FlightData";continue}}t[r]=normalizeRouterState(n)}return t}if("object"==typeof e&&null!==e){let t={};for(let r in e){let n=e[r];if("function"==typeof n){t[r]="fn()";continue}if("object"==typeof n&&null!==n){if(n.$$typeof){t[r]=n.$$typeof.toString();continue}if(n.hasOwnProperty("_bundlerConfig")){t[r]="FlightData";continue}}t[r]=normalizeRouterState(n)}return t}return Array.isArray(e)?e.map(normalizeRouterState):e}let useReducerWithReduxDevtools=function(e,t){let r=(0,n.useRef)(),a=(0,n.useRef)();(0,n.useEffect)(()=>{if(!r.current&&!1!==a.current){if(void 0===a.current&&void 0===window.__REDUX_DEVTOOLS_EXTENSION__){a.current=!1;return}return r.current=window.__REDUX_DEVTOOLS_EXTENSION__.connect({instanceId:8e3,name:"next-router"}),r.current&&r.current.init(normalizeRouterState(t)),()=>{r.current=void 0}}},[t]);let[o,u]=(0,n.useReducer)((t,n)=>{let a=e(t,n);return r.current&&r.current.send(n,normalizeRouterState(a)),a},t),l=(0,n.useCallback)(()=>{r.current&&r.current.send({type:"RENDER_SYNC"},normalizeRouterState(o))},[o]);return[o,u,l]};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6746:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"hasBasePath",{enumerable:!0,get:function(){return hasBasePath}});let n=r(1446);function hasBasePath(e){return(0,n.pathHasPrefix)(e,"/rln-js")}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3997:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return normalizePathTrailingSlash}});let n=r(9006),a=r(9466),normalizePathTrailingSlash=e=>{if(!e.startsWith("/"))return e;let{pathname:t,query:r,hash:o}=(0,a.parsePath)(e);return""+(0,n.removeTrailingSlash)(t)+r+o};("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},2504:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return onRecoverableError}});let n=r(1283);function onRecoverableError(e){let t="function"==typeof reportError?reportError:e=>{window.console.error(e)};e.digest!==n.NEXT_DYNAMIC_NO_SSR_CODE&&t(e)}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},3714:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeBasePath",{enumerable:!0,get:function(){return removeBasePath}}),r(6746);let n="/rln-js";function removeBasePath(e){return 0===n.length||(e=e.slice(n.length)).startsWith("/")||(e="/"+e),e}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},6313:function(e,t,r){"use strict";var n,a;Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{CacheStates:function(){return n},AppRouterContext:function(){return l},LayoutRouterContext:function(){return i},GlobalLayoutRouterContext:function(){return s},TemplateContext:function(){return p}});let o=r(1024),u=o._(r(2265));(a=n||(n={})).LAZY_INITIALIZED="LAZYINITIALIZED",a.DATA_FETCH="DATAFETCH",a.READY="READY";let l=u.default.createContext(null),i=u.default.createContext(null),s=u.default.createContext(null),p=u.default.createContext(null)},6360:function(e,t){"use strict";function djb2Hash(e){let t=5381;for(let r=0;r!t||(0,a.isGroupSegment)(t)||"@"===t[0]||("page"===t||"route"===t)&&r===n.length-1?e:e+"/"+t,""))}function normalizeRscPath(e,t){return t?e.replace(/\.rsc($|\?)/,"$1"):e}},280:function(e,t){"use strict";function handleSmoothScroll(e,t){if(void 0===t&&(t={}),t.onlyHashChange){e();return}let r=document.documentElement,n=r.style.scrollBehavior;r.style.scrollBehavior="auto",t.dontForceLayout||r.getClientRects(),e(),r.style.scrollBehavior=n}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"handleSmoothScroll",{enumerable:!0,get:function(){return handleSmoothScroll}})},2169:function(e,t){"use strict";function isBot(e){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(e)}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isBot",{enumerable:!0,get:function(){return isBot}})},9466:function(e,t){"use strict";function parsePath(e){let t=e.indexOf("#"),r=e.indexOf("?"),n=r>-1&&(t<0||r-1?{pathname:e.substring(0,n?r:t),query:n?e.substring(r,t>-1?t:void 0):"",hash:t>-1?e.slice(t):""}:{pathname:e,query:"",hash:""}}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"parsePath",{enumerable:!0,get:function(){return parsePath}})},1446:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"pathHasPrefix",{enumerable:!0,get:function(){return pathHasPrefix}});let n=r(9466);function pathHasPrefix(e,t){if("string"!=typeof e)return!1;let{pathname:r}=(0,n.parsePath)(e);return r===t||r.startsWith(t+"/")}},9006:function(e,t){"use strict";function removeTrailingSlash(e){return e.replace(/\/$/,"")||"/"}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"removeTrailingSlash",{enumerable:!0,get:function(){return removeTrailingSlash}})},1706:function(e,t){"use strict";function isGroupSegment(e){return"("===e[0]&&e.endsWith(")")}Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"isGroupSegment",{enumerable:!0,get:function(){return isGroupSegment}})},3972:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{ServerInsertedHTMLContext:function(){return o},useServerInsertedHTML:function(){return useServerInsertedHTML}});let n=r(8533),a=n._(r(2265)),o=a.default.createContext(null);function useServerInsertedHTML(e){let t=(0,a.useContext)(o);t&&t(e)}},7346:function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"createAsyncLocalStorage",{enumerable:!0,get:function(){return createAsyncLocalStorage}});let r=Error("Invariant: AsyncLocalStorage accessed in runtime where it is not available");let FakeAsyncLocalStorage=class FakeAsyncLocalStorage{disable(){throw r}getStore(){}run(){throw r}exit(){throw r}enterWith(){throw r}};let n=globalThis.AsyncLocalStorage;function createAsyncLocalStorage(){return n?new n:new FakeAsyncLocalStorage}("function"==typeof t.default||"object"==typeof t.default&&null!==t.default)&&void 0===t.default.__esModule&&(Object.defineProperty(t.default,"__esModule",{value:!0}),Object.assign(t.default,t),e.exports=t.default)},4040:function(e,t,r){"use strict";var n=r(4887);t.createRoot=n.createRoot,t.hydrateRoot=n.hydrateRoot},4887:function(e,t,r){"use strict";!function checkDCE(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(checkDCE)}catch(e){console.error(e)}}(),e.exports=r(4417)},7950:function(e,t,r){"use strict";/** + * @license React + * react-server-dom-webpack-client.browser.production.min.js + * + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var n=r(4887),a=r(2265),o={stream:!0},u=new Map;function x(e){var t=r(e);return"function"!=typeof t.then||"fulfilled"===t.status?null:(t.then(function(e){t.status="fulfilled",t.value=e},function(e){t.status="rejected",t.reason=e}),t)}function y(){}var l=new Map,i=r.u;r.u=function(e){var t=l.get(e);return void 0!==t?t:i(e)};var s=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.Dispatcher,p=Symbol.for("react.element"),_=Symbol.for("react.provider"),b=Symbol.for("react.server_context"),v=Symbol.for("react.lazy"),m=Symbol.for("react.default_value"),E=Symbol.iterator,j=Array.isArray,C=new WeakMap,w=a.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ContextRegistry;function L(e,t,r,n){this.status=e,this.value=t,this.reason=r,this._response=n}function ia(e){switch(e.status){case"resolved_model":M(e);break;case"resolved_module":N(e)}switch(e.status){case"fulfilled":return e.value;case"pending":case"blocked":throw e;default:throw e.reason}}function O(e,t){for(var r=0;rp?(b=p,p=3,i++):(b=0,p=3);continue;case 2:44===(E=a[i++])?p=4:v=v<<4|(96a.length&&(E=-1)}var j=a.byteOffset+i;if(-1>>1,a=e[n];if(0>>1;ng(l,r))ig(s,l)?(e[n]=s,e[i]=r,n=i):(e[n]=l,e[u]=r,n=u);else if(ig(s,r))e[n]=s,e[i]=r,n=i;else break}}return t}function g(e,t){var r=e.sortIndex-t.sortIndex;return 0!==r?r:e.id-t.id}if(t.unstable_now=void 0,"object"==typeof performance&&"function"==typeof performance.now){var r,n=performance;t.unstable_now=function(){return n.now()}}else{var a=Date,o=a.now();t.unstable_now=function(){return a.now()-o}}var u=[],l=[],i=1,s=null,p=3,_=!1,b=!1,v=!1,m="function"==typeof setTimeout?setTimeout:null,E="function"==typeof clearTimeout?clearTimeout:null,j="undefined"!=typeof setImmediate?setImmediate:null;function G(e){for(var t=h(l);null!==t;){if(null===t.callback)k(l);else if(t.startTime<=e)k(l),t.sortIndex=t.expirationTime,f(u,t);else break;t=h(l)}}function H(e){if(v=!1,G(e),!b){if(null!==h(u))b=!0,I();else{var t=h(l);null!==t&&J(H,t.startTime-e)}}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var C=!1,w=-1,A=5,F=-1;function O(){return!(t.unstable_now()-Fe&&O());){var o=s.callback;if("function"==typeof o){s.callback=null,p=s.priorityLevel;var i=o(s.expirationTime<=e);if(e=t.unstable_now(),"function"==typeof i){s.callback=i,G(e),n=!0;break t}s===h(u)&&k(u),G(e)}else k(u);s=h(u)}if(null!==s)n=!0;else{var m=h(l);null!==m&&J(H,m.startTime-e),n=!1}}break e}finally{s=null,p=a,_=!1}n=void 0}}finally{n?r():C=!1}}}if("function"==typeof j)r=function(){j(P)};else if("undefined"!=typeof MessageChannel){var D=new MessageChannel,U=D.port2;D.port1.onmessage=P,r=function(){U.postMessage(null)}}else r=function(){m(P,0)};function I(){C||(C=!0,r())}function J(e,r){w=m(function(){e(t.unstable_now())},r)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){b||_||(b=!0,I())},t.unstable_forceFrameRate=function(e){0>e||125a?(e.sortIndex=n,f(l,e),null===h(u)&&e===h(l)&&(v?(E(w),w=-1):v=!0,J(H,n-a))):(e.sortIndex=o,f(u,e),b||_||(b=!0,I())),e},t.unstable_shouldYield=O,t.unstable_wrapCallback=function(e){var t=p;return function(){var r=p;p=t;try{return e.apply(this,arguments)}finally{p=r}}}},8261:function(e,t,r){"use strict";e.exports=r(1756)},5682:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"getSegmentParam",{enumerable:!0,get:function(){return getSegmentParam}});let n=r(4507);function getSegmentParam(e){let t=n.INTERCEPTION_ROUTE_MARKERS.find(t=>e.startsWith(t));return(t&&(e=e.slice(t.length)),e.startsWith("[[...")&&e.endsWith("]]"))?{type:"optional-catchall",param:e.slice(5,-2)}:e.startsWith("[...")&&e.endsWith("]")?{type:"catchall",param:e.slice(4,-1)}:e.startsWith("[")&&e.endsWith("]")?{type:"dynamic",param:e.slice(1,-1)}:null}},4507:function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),function(e,t){for(var r in t)Object.defineProperty(e,r,{enumerable:!0,get:t[r]})}(t,{INTERCEPTION_ROUTE_MARKERS:function(){return a},isInterceptionRouteAppPath:function(){return isInterceptionRouteAppPath},extractInterceptionRouteInformation:function(){return extractInterceptionRouteInformation}});let n=r(3701),a=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(e){return void 0!==e.split("/").find(e=>a.find(t=>e.startsWith(t)))}function extractInterceptionRouteInformation(e){let t,r,o;for(let n of e.split("/"))if(r=a.find(e=>n.startsWith(e))){[t,o]=e.split(r,2);break}if(!t||!r||!o)throw Error(`Invalid interception route: ${e}. Must be in the format //(..|...|..)(..)/`);switch(t=(0,n.normalizeAppPath)(t),r){case"(.)":o="/"===t?`/${o}`:t+"/"+o;break;case"(..)":if("/"===t)throw Error(`Invalid interception route: ${e}. Cannot use (..) marker at the root level, use (.) instead.`);o=t.split("/").slice(0,-1).concat(o).join("/");break;case"(...)":o="/"+o;break;case"(..)(..)":let u=t.split("/");if(u.length<=2)throw Error(`Invalid interception route: ${e}. Cannot use (..)(..) marker at the root level or one level up.`);o=u.slice(0,-2).concat(o).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:t,interceptedRoute:o}}},4677:function(e,t,r){"use strict";function _class_private_field_loose_base(e,t){if(!Object.prototype.hasOwnProperty.call(e,t))throw TypeError("attempted to use private field on non-instance");return e}r.r(t),r.d(t,{_:function(){return _class_private_field_loose_base},_class_private_field_loose_base:function(){return _class_private_field_loose_base}})},6249:function(e,t,r){"use strict";r.r(t),r.d(t,{_:function(){return _class_private_field_loose_key},_class_private_field_loose_key:function(){return _class_private_field_loose_key}});var n=0;function _class_private_field_loose_key(e){return"__private_"+n+++"_"+e}},1024:function(e,t,r){"use strict";function _interop_require_default(e){return e&&e.__esModule?e:{default:e}}r.r(t),r.d(t,{_:function(){return _interop_require_default},_interop_require_default:function(){return _interop_require_default}})},8533:function(e,t,r){"use strict";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,r=new WeakMap;return(_getRequireWildcardCache=function(e){return e?r:t})(e)}function _interop_require_wildcard(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var r=_getRequireWildcardCache(t);if(r&&r.has(e))return r.get(e);var n={},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in e)if("default"!==o&&Object.prototype.hasOwnProperty.call(e,o)){var u=a?Object.getOwnPropertyDescriptor(e,o):null;u&&(u.get||u.set)?Object.defineProperty(n,o,u):n[o]=e[o]}return n.default=e,r&&r.set(e,n),n}r.r(t),r.d(t,{_:function(){return _interop_require_wildcard},_interop_require_wildcard:function(){return _interop_require_wildcard}})}}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/822-38a22d62478b24fa.js b/rln-js/_next/static/chunks/782-d7aa94b30b6e6632.js similarity index 85% rename from rln-js/_next/static/chunks/822-38a22d62478b24fa.js rename to rln-js/_next/static/chunks/782-d7aa94b30b6e6632.js index 7accc81..9683711 100644 --- a/rln-js/_next/static/chunks/822-38a22d62478b24fa.js +++ b/rln-js/_next/static/chunks/782-d7aa94b30b6e6632.js @@ -1,5 +1,5 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[822],{1376:function(O,U,$){"use strict";O.exports=$.p+"static/media/rln.74fdf8f1.wasm"},3019:function(O,U,$){"use strict";O.exports=$.p+"static/media/rln_final.8e7b6e79.zkey"},632:function(O,U,$){"use strict";O.exports=$.p+"static/media/rln_wasm_bg.b774b68e.wasm"},3121:function(O,U,$){"use strict";var J=this&&this.__awaiter||function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};Object.defineProperty(U,"__esModule",{value:!0}),U.verifyChecksum=U.checksum=U.defaultSha256Module=void 0;let en=$(8207),es=$(9449);function defaultSha256Module(){return{function:"sha256"}}function checksumData(O,U){return es.concatBytes(O.slice(16),U)}function checksum(O,U,$){if("sha256"===O.function)return Promise.resolve(en.sha256(checksumData(U,$)));throw Error("Invalid checksum type")}function verifyChecksum(O,U,$){return J(this,void 0,void 0,function*(){if("sha256"===O.function)return es.equalsBytes(es.hexToBytes(O.message),en.sha256(checksumData(U,$)));throw Error("Invalid checksum type")})}U.defaultSha256Module=defaultSha256Module,U.checksum=checksum,U.verifyChecksum=verifyChecksum},4589:function(O,U,$){"use strict";var J=this&&this.__awaiter||function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};Object.defineProperty(U,"__esModule",{value:!0}),U.cipherDecrypt=U.cipherEncrypt=U.defaultAes128CtrModule=void 0;let en=$(4610),es=$(215),eo=$(9449);function defaultAes128CtrModule(){return{function:"aes-128-ctr",params:{iv:eo.bytesToHex(en.getRandomBytesSync(16))}}}function cipherEncrypt(O,U,$){return J(this,void 0,void 0,function*(){if("aes-128-ctr"===O.function)try{return yield es.encrypt($,U,eo.hexToBytes(O.params.iv),O.function,!1)}catch(O){throw Error("Unable to encrypt")}else throw Error("Invalid cipher type")})}function cipherDecrypt(O,U){return J(this,void 0,void 0,function*(){if("aes-128-ctr"===O.function)try{return yield es.decrypt(eo.hexToBytes(O.message),U,eo.hexToBytes(O.params.iv),O.function,!1)}catch(O){throw Error("Unable to decrypt")}else throw Error("Invalid cipher type")})}U.defaultAes128CtrModule=defaultAes128CtrModule,U.cipherEncrypt=cipherEncrypt,U.cipherDecrypt=cipherDecrypt},2172:function(O,U,$){"use strict";var J=this&&this.__awaiter||function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};Object.defineProperty(U,"__esModule",{value:!0}),U.Keystore=void 0;let en=$(9686),es=$(3121),eo=$(4589),ea=$(5852),eu=$(7041);let Keystore=class Keystore{constructor(O){this.version=O.version,this.uuid=O.uuid,this.description=O.description,this.path=O.path,this.pubkey=O.pubkey,this.crypto={kdf:Object.assign({},O.crypto.kdf),checksum:Object.assign({},O.crypto.checksum),cipher:Object.assign({},O.crypto.cipher)}}static create(O,U,$,eu,ef=null,eg=en.defaultPbkdfModule(),ev=es.defaultSha256Module(),e_=eo.defaultAes128CtrModule()){return J(this,void 0,void 0,function*(){let J=yield ea.create(O,U,$,eu,ef,eg,ev,e_);return new Keystore(J)})}static fromObject(O){return eu.validateKeystore(O),new Keystore(O)}static parse(O){return Keystore.fromObject(JSON.parse(O))}decrypt(O){return J(this,void 0,void 0,function*(){return ea.decrypt(this,O)})}verifyPassword(O){return J(this,void 0,void 0,function*(){return ea.verifyPassword(this,O)})}toObject(){return Object.assign({},this)}stringify(){return JSON.stringify(this.toObject(),null,2)}};U.Keystore=Keystore},5852:function(O,U,$){"use strict";var J=this&&this.__awaiter||function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};Object.defineProperty(U,"__esModule",{value:!0}),U.decrypt=U.verifyPassword=U.create=U.defaultAes128CtrModule=U.defaultSha256Module=U.defaultScryptModule=U.defaultPbkdfModule=void 0;let en=$(6509),es=$(9686);Object.defineProperty(U,"defaultPbkdfModule",{enumerable:!0,get:function(){return es.defaultPbkdfModule}}),Object.defineProperty(U,"defaultScryptModule",{enumerable:!0,get:function(){return es.defaultScryptModule}});let eo=$(3121);Object.defineProperty(U,"defaultSha256Module",{enumerable:!0,get:function(){return eo.defaultSha256Module}});let ea=$(4589);Object.defineProperty(U,"defaultAes128CtrModule",{enumerable:!0,get:function(){return ea.defaultAes128CtrModule}});let eu=$(6357),ef=$(9449);function create(O,U,$,eg,ev=null,e_=es.defaultPbkdfModule(),ew=eo.defaultSha256Module(),eE=ea.defaultAes128CtrModule()){return J(this,void 0,void 0,function*(){let J=yield es.kdf(e_,eu.normalizePassword(O)),eS=yield ea.cipherEncrypt(eE,J.slice(0,16),U);return{version:4,uuid:en.v4(),description:ev||void 0,path:eg,pubkey:ef.bytesToHex($),crypto:{kdf:{function:e_.function,params:Object.assign({},e_.params),message:""},checksum:{function:ew.function,params:{},message:ef.bytesToHex((yield eo.checksum(ew,J,eS)))},cipher:{function:eE.function,params:Object.assign({},eE.params),message:ef.bytesToHex(eS)}}}})}function verifyPassword(O,U){return J(this,void 0,void 0,function*(){let $=yield es.kdf(O.crypto.kdf,eu.normalizePassword(U)),J=ef.hexToBytes(O.crypto.cipher.message);return eo.verifyChecksum(O.crypto.checksum,$,J)})}function decrypt(O,U){return J(this,void 0,void 0,function*(){let $=yield es.kdf(O.crypto.kdf,eu.normalizePassword(U)),J=ef.hexToBytes(O.crypto.cipher.message);if(!(yield eo.verifyChecksum(O.crypto.checksum,$,J)))throw Error("Invalid password");return ea.cipherDecrypt(O.crypto.cipher,$.slice(0,16))})}U.create=create,U.verifyPassword=verifyPassword,U.decrypt=decrypt},8063:function(O,U,$){"use strict";var J=this&&this.__createBinding||(Object.create?function(O,U,$,J){void 0===J&&(J=$),Object.defineProperty(O,J,{enumerable:!0,get:function(){return U[$]}})}:function(O,U,$,J){void 0===J&&(J=$),O[J]=U[$]}),en=this&&this.__exportStar||function(O,U){for(var $ in O)"default"===$||U.hasOwnProperty($)||J(U,O,$)};Object.defineProperty(U,"__esModule",{value:!0}),en($(1474),U),en($(5852),U),en($(2172),U),en($(7041),U)},9686:function(O,U,$){"use strict";var J=this&&this.__awaiter||function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};Object.defineProperty(U,"__esModule",{value:!0}),U.kdf=U.defaultScryptModule=U.defaultPbkdfModule=void 0;let en=$(4610),es=$(1406),eo=$(4468),ea=$(9449);function defaultPbkdfModule(){return{function:"pbkdf2",params:{dklen:32,c:262144,prf:"hmac-sha256",salt:ea.bytesToHex(en.getRandomBytesSync(32))}}}function defaultScryptModule(){return{function:"scrypt",params:{dklen:32,n:262144,r:8,p:1,salt:ea.bytesToHex(en.getRandomBytesSync(32))}}}function kdf(O,U){return J(this,void 0,void 0,function*(){if("pbkdf2"===O.function)return yield doPbkdf2(O.params,U);if("scrypt"===O.function)return yield doScrypt(O.params,U);throw Error("Invalid kdf type")})}function doPbkdf2(O,U){return J(this,void 0,void 0,function*(){return es.pbkdf2(U,ea.hexToBytes(O.salt),O.c,O.dklen,O.prf.slice(5))})}function doScrypt(O,U){return J(this,void 0,void 0,function*(){return eo.scrypt(U,ea.hexToBytes(O.salt),O.n,O.p,O.r,O.dklen)})}U.defaultPbkdfModule=defaultPbkdfModule,U.defaultScryptModule=defaultScryptModule,U.kdf=kdf},6357:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.normalizePassword=void 0;let J=$(9449);function normalizePassword(O){return"string"==typeof O?J.utf8ToBytes(O.normalize("NFKD")):O}U.normalizePassword=normalizePassword},1318:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.Keystore=void 0,U.Keystore=validate19;let $=RegExp("^pbkdf2$","u"),J=RegExp("^hmac-sha256$","u"),en=RegExp("^$","u"),es=RegExp("^scrypt$","u"),eo=RegExp("^([A-Fa-f0-9]{2}){32}$","u");function validate12(O,{instancePath:U="",parentData:ea,parentDataProperty:eu,rootData:ef=O}={}){let eg=null,ev=0,e_=ev,ew=ev;if(ev===ew){if(!O||"object"!=typeof O||Array.isArray(O))return validate12.errors=[{instancePath:U,schemaPath:"#/definitions/Module/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.function&&($="function")||void 0===O.message&&($="message")||void 0===O.params&&($="params"))return validate12.errors=[{instancePath:U,schemaPath:"#/definitions/Module/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.function){let $=ev;if("string"!=typeof O.function)return validate12.errors=[{instancePath:U+"/function",schemaPath:"#/definitions/Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eE=$===ev}else var eE=!0;if(eE){if(void 0!==O.params){let $=O.params,J=ev;if(!($&&"object"==typeof $&&!Array.isArray($)))return validate12.errors=[{instancePath:U+"/params",schemaPath:"#/definitions/Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var eE=J===ev}else var eE=!0;if(eE){if(void 0!==O.message){let $=ev;if("string"!=typeof O.message)return validate12.errors=[{instancePath:U+"/message",schemaPath:"#/definitions/Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eE=$===ev}else var eE=!0}}}}var eS=e_===ev;if(eS){let ea=ev,eu=ev,ef=!1,e_=null,ew=ev,eE=ev;if(ev===eE){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let J=O.function,en=ev;if(ev===en){if("string"==typeof J){if(!$.test(J)){let O={instancePath:U+"/function",schemaPath:"#/definitions/Pbkdf2Module/properties/function/pattern",keyword:"pattern",params:{pattern:"^pbkdf2$"},message:'must match pattern "^pbkdf2$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/Pbkdf2Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eA=en===ev}else var eA=!0;if(eA){if(void 0!==O.params){let $=O.params,en=ev;if(ev===en){if($&&"object"==typeof $&&!Array.isArray($)){let O;if(void 0===$.dklen&&(O="dklen")||void 0===$.c&&(O="c")||void 0===$.prf&&(O="prf")||void 0===$.salt&&(O="salt")){let $={instancePath:U+"/params",schemaPath:"#/definitions/Pbkdf2Module/properties/params/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};null===eg?eg=[$]:eg.push($),ev++}else{if(void 0!==$.dklen){let O=$.dklen,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/dklen/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/dklen/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eI=J===ev}else var eI=!0;if(eI){if(void 0!==$.c){let O=$.c,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/c",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/c/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/c",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/c/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eI=J===ev}else var eI=!0;if(eI){if(void 0!==$.prf){let O=$.prf,en=ev;if(ev===en){if("string"==typeof O){if(!J.test(O)){let O={instancePath:U+"/params/prf",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/prf/pattern",keyword:"pattern",params:{pattern:"^hmac-sha256$"},message:'must match pattern "^hmac-sha256$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/params/prf",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/prf/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eI=en===ev}else var eI=!0;if(eI){if(void 0!==$.salt){let O=ev;if("string"!=typeof $.salt){let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/salt/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}var eI=O===ev}else var eI=!0}}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Pbkdf2Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eA=en===ev}else var eA=!0;if(eA){if(void 0!==O.message){let $=O.message,J=ev;if(ev===J){if("string"==typeof $){if(!en.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Pbkdf2Module/properties/message/pattern",keyword:"pattern",params:{pattern:"^$"},message:'must match pattern "^$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Pbkdf2Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eA=J===ev}else var eA=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Pbkdf2Module/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eP=ew===ev;eP&&(ef=!0,e_=0);let eR=ev,eC=ev;if(ev===eC){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=ev;if(ev===J){if("string"==typeof $){if(!es.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/ScryptModule/properties/function/pattern",keyword:"pattern",params:{pattern:"^scrypt$"},message:'must match pattern "^scrypt$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/ScryptModule/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0;if(ek){if(void 0!==O.params){let $=O.params,J=ev;if(ev===J){if($&&"object"==typeof $&&!Array.isArray($)){let O;if(void 0===$.dklen&&(O="dklen")||void 0===$.n&&(O="n")||void 0===$.p&&(O="p")||void 0===$.r&&(O="r")||void 0===$.salt&&(O="salt")){let $={instancePath:U+"/params",schemaPath:"#/definitions/ScryptModule/properties/params/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};null===eg?eg=[$]:eg.push($),ev++}else{if(void 0!==$.dklen){let O=$.dklen,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/ScryptModule/properties/params/properties/dklen/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/ScryptModule/properties/params/properties/dklen/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.n){let O=$.n,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/n",schemaPath:"#/definitions/ScryptModule/properties/params/properties/n/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/n",schemaPath:"#/definitions/ScryptModule/properties/params/properties/n/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.p){let O=$.p,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/p",schemaPath:"#/definitions/ScryptModule/properties/params/properties/p/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/p",schemaPath:"#/definitions/ScryptModule/properties/params/properties/p/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.r){let O=$.r,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/r",schemaPath:"#/definitions/ScryptModule/properties/params/properties/r/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/r",schemaPath:"#/definitions/ScryptModule/properties/params/properties/r/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.salt){let O=$.salt,J=ev;if(ev===J){if("string"==typeof O){if(!eo.test(O)){let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/ScryptModule/properties/params/properties/salt/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/ScryptModule/properties/params/properties/salt/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eT=J===ev}else var eT=!0}}}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/ScryptModule/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0;if(ek){if(void 0!==O.message){let $=O.message,J=ev;if(ev===J){if("string"==typeof $){if(!en.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/ScryptModule/properties/message/pattern",keyword:"pattern",params:{pattern:"^$"},message:'must match pattern "^$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/ScryptModule/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/ScryptModule/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eP=eR===ev;if(eP&&ef?(ef=!1,e_=[e_,1]):eP&&(ef=!0,e_=1),ef)ev=eu,null!==eg&&(eu?eg.length=eu:eg=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:e_},message:"must match exactly one schema in oneOf"};return null===eg?eg=[O]:eg.push(O),ev++,validate12.errors=eg,!1}var eS=ea===ev}return validate12.errors=eg,0===ev}let ea=RegExp("^sha256$","u");function validate14(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eu=0,ef=eu,eg=eu;if(eu===eg){if(!O||"object"!=typeof O||Array.isArray(O))return validate14.errors=[{instancePath:U,schemaPath:"#/definitions/Module/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.function&&($="function")||void 0===O.message&&($="message")||void 0===O.params&&($="params"))return validate14.errors=[{instancePath:U,schemaPath:"#/definitions/Module/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.function){let $=eu;if("string"!=typeof O.function)return validate14.errors=[{instancePath:U+"/function",schemaPath:"#/definitions/Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ev=$===eu}else var ev=!0;if(ev){if(void 0!==O.params){let $=O.params,J=eu;if(!($&&"object"==typeof $&&!Array.isArray($)))return validate14.errors=[{instancePath:U+"/params",schemaPath:"#/definitions/Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ev=J===eu}else var ev=!0;if(ev){if(void 0!==O.message){let $=eu;if("string"!=typeof O.message)return validate14.errors=[{instancePath:U+"/message",schemaPath:"#/definitions/Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ev=$===eu}else var ev=!0}}}}var e_=ef===eu;if(e_){let $=eu,J=eu,en=!1,ef=null,eg=eu,ev=eu;if(eu===ev){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=eu;if(eu===J){if("string"==typeof $){if(!ea.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/Sha2Module/properties/function/pattern",keyword:"pattern",params:{pattern:"^sha256$"},message:'must match pattern "^sha256$"'};null===es?es=[O]:es.push(O),eu++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/Sha2Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0;if(ew){if(void 0!==O.params){let $=O.params,J=eu;if(eu===J){if($&&"object"==typeof $&&!Array.isArray($))for(let O in $){let $={instancePath:U+"/params",schemaPath:"#/definitions/Sha2Module/properties/params/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"};null===es?es=[$]:es.push($),eu++;break}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Sha2Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0;if(ew){if(void 0!==O.message){let $=O.message,J=eu;if(eu===J){if("string"==typeof $){if(!eo.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Sha2Module/properties/message/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===es?es=[O]:es.push(O),eu++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Sha2Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Sha2Module/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),eu++}}if(eg===eu&&(en=!0,ef=0),en)eu=J,null!==es&&(J?es.length=J:es=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:ef},message:"must match exactly one schema in oneOf"};return null===es?es=[O]:es.push(O),eu++,validate14.errors=es,!1}var e_=$===eu}return validate14.errors=es,0===eu}let eu=RegExp("^aes-128-ctr$","u"),ef=RegExp("^([A-Fa-f0-9]{2}){16}$","u");function validate16(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,ea=0,eg=ea,ev=ea;if(ea===ev){if(!O||"object"!=typeof O||Array.isArray(O))return validate16.errors=[{instancePath:U,schemaPath:"#/definitions/Module/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.function&&($="function")||void 0===O.message&&($="message")||void 0===O.params&&($="params"))return validate16.errors=[{instancePath:U,schemaPath:"#/definitions/Module/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.function){let $=ea;if("string"!=typeof O.function)return validate16.errors=[{instancePath:U+"/function",schemaPath:"#/definitions/Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var e_=$===ea}else var e_=!0;if(e_){if(void 0!==O.params){let $=O.params,J=ea;if(!($&&"object"==typeof $&&!Array.isArray($)))return validate16.errors=[{instancePath:U+"/params",schemaPath:"#/definitions/Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var e_=J===ea}else var e_=!0;if(e_){if(void 0!==O.message){let $=ea;if("string"!=typeof O.message)return validate16.errors=[{instancePath:U+"/message",schemaPath:"#/definitions/Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var e_=$===ea}else var e_=!0}}}}var ew=eg===ea;if(ew){let $=ea,J=ea,en=!1,eg=null,ev=ea,e_=ea;if(ea===e_){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=ea;if(ea===J){if("string"==typeof $){if(!eu.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/Aes128CtrModule/properties/function/pattern",keyword:"pattern",params:{pattern:"^aes-128-ctr$"},message:'must match pattern "^aes-128-ctr$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/Aes128CtrModule/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0;if(eE){if(void 0!==O.params){let $=O.params,J=ea;if(ea===J){if($&&"object"==typeof $&&!Array.isArray($)){let O;if(void 0===$.iv&&(O="iv")){let $={instancePath:U+"/params",schemaPath:"#/definitions/Aes128CtrModule/properties/params/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};null===es?es=[$]:es.push($),ea++}else if(void 0!==$.iv){let O=$.iv,J=ea;if(ea===J){if("string"==typeof O){if(!ef.test(O)){let O={instancePath:U+"/params/iv",schemaPath:"#/definitions/Aes128CtrModule/properties/params/properties/iv/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){16}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){16}$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/params/iv",schemaPath:"#/definitions/Aes128CtrModule/properties/params/properties/iv/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Aes128CtrModule/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0;if(eE){if(void 0!==O.message){let $=O.message,J=ea;if(ea===J){if("string"==typeof $){if(!eo.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Aes128CtrModule/properties/message/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Aes128CtrModule/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Aes128CtrModule/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),ea++}}if(ev===ea&&(en=!0,eg=0),en)ea=J,null!==es&&(J?es.length=J:es=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:eg},message:"must match exactly one schema in oneOf"};return null===es?es=[O]:es.push(O),ea++,validate16.errors=es,!1}var ew=$===ea}return validate16.errors=es,0===ea}let eg=RegExp("^([A-Fa-f0-9]{2}){48}$","u"),ev=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function validate19(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return validate19.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.crypto&&($="crypto")||void 0===O.path&&($="path")||void 0===O.uuid&&($="uuid")||void 0===O.version&&($="version"))return validate19.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.crypto){let $=O.crypto,J=eo;if(eo===J){if(!$||"object"!=typeof $||Array.isArray($))return validate19.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let O;if(void 0===$.kdf&&(O="kdf")||void 0===$.checksum&&(O="checksum")||void 0===$.cipher&&(O="cipher"))return validate19.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"}],!1;if(void 0!==$.kdf){let O=eo;validate12($.kdf,{instancePath:U+"/crypto/kdf",parentData:$,parentDataProperty:"kdf",rootData:en})||(eo=(es=null===es?validate12.errors:es.concat(validate12.errors)).length);var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.checksum){let O=eo;validate14($.checksum,{instancePath:U+"/crypto/checksum",parentData:$,parentDataProperty:"checksum",rootData:en})||(eo=(es=null===es?validate14.errors:es.concat(validate14.errors)).length);var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.cipher){let O=eo;validate16($.cipher,{instancePath:U+"/crypto/cipher",parentData:$,parentDataProperty:"cipher",rootData:en})||(eo=(es=null===es?validate16.errors:es.concat(validate16.errors)).length);var ea=O===eo}else var ea=!0}}}}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.pubkey){let $=O.pubkey,J=eo;if(eo===J){if("string"!=typeof $)return validate19.errors=[{instancePath:U+"/pubkey",schemaPath:"#/properties/pubkey/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!eg.test($))return validate19.errors=[{instancePath:U+"/pubkey",schemaPath:"#/properties/pubkey/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){48}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){48}$"'}],!1}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.path){let $=eo;if("string"!=typeof O.path)return validate19.errors=[{instancePath:U+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eu=$===eo}else var eu=!0;if(eu){if(void 0!==O.description){let $=eo;if("string"!=typeof O.description)return validate19.errors=[{instancePath:U+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eu=$===eo}else var eu=!0;if(eu){if(void 0!==O.uuid){let $=O.uuid,J=eo;if(eo===J&&eo===J){if("string"!=typeof $)return validate19.errors=[{instancePath:U+"/uuid",schemaPath:"#/properties/uuid/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!ev.test($))return validate19.errors=[{instancePath:U+"/uuid",schemaPath:"#/properties/uuid/format",keyword:"format",params:{format:"uuid"},message:'must match format "uuid"'}],!1}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.version){let $=O.version,J=eo;if(!("number"==typeof $&&!($%1)&&!isNaN($)&&isFinite($)))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(eo===J&&"number"==typeof $&&isFinite($)){if($>4||isNaN($))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:4},message:"must be <= 4"}],!1;if($<4||isNaN($))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:4},message:"must be >= 4"}],!1}var eu=J===eo}else var eu=!0}}}}}}return validate19.errors=es,0===eo}},7041:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.isValidKeystore=U.validateKeystore=U.schemaValidationErrors=void 0;let J=$(1318),en=J.Keystore;function schemaValidationErrors(O){let U=en(O);return U?null:en.errors}function validateKeystore(O){let U=schemaValidationErrors(O);if(U)throw Error(U.map(O=>`${O.instancePath}: ${O.message}`).join("\n"))}function isValidKeystore(O){return!schemaValidationErrors(O)}U.schemaValidationErrors=schemaValidationErrors,U.validateKeystore=validateKeystore,U.isValidKeystore=isValidKeystore},1474:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0})},4390:function(O,U){"use strict";function number(O){if(!Number.isSafeInteger(O)||O<0)throw Error(`Wrong positive integer: ${O}`)}function bool(O){if("boolean"!=typeof O)throw Error(`Expected boolean, not ${O}`)}function bytes(O,...U){if(!(O instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(U.length>0&&!U.includes(O.length))throw TypeError(`Expected Uint8Array of length ${U}, not of length=${O.length}`)}function hash(O){if("function"!=typeof O||"function"!=typeof O.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(O.outputLen),number(O.blockLen)}function exists(O,U=!0){if(O.destroyed)throw Error("Hash instance has been destroyed");if(U&&O.finished)throw Error("Hash#digest() has already been called")}function output(O,U){bytes(O);let $=U.outputLen;if(O.length<$)throw Error(`digestInto() expects output buffer of length at least ${$}`)}Object.defineProperty(U,"__esModule",{value:!0}),U.output=U.exists=U.hash=U.bytes=U.bool=U.number=void 0,U.number=number,U.bool=bool,U.bytes=bytes,U.hash=hash,U.exists=exists,U.output=output;let $={number,bool,bytes,hash,exists,output};U.default=$},2495:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.SHA2=void 0;let J=$(4390),en=$(5158);function setBigUint64(O,U,$,J){if("function"==typeof O.setBigUint64)return O.setBigUint64(U,$,J);let en=BigInt(32),es=BigInt(4294967295),eo=Number($>>en&es),ea=Number($&es),eu=J?4:0,ef=J?0:4;O.setUint32(U+eu,eo,J),O.setUint32(U+ef,ea,J)}let SHA2=class SHA2 extends en.Hash{constructor(O,U,$,J){super(),this.blockLen=O,this.outputLen=U,this.padOffset=$,this.isLE=J,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(O),this.view=(0,en.createView)(this.buffer)}update(O){J.default.exists(this);let{view:U,buffer:$,blockLen:es}=this;O=(0,en.toBytes)(O);let eo=O.length;for(let J=0;Jes-ea&&(this.process($,0),ea=0);for(let O=ea;Oev.length)throw Error("_sha2: outputLen bigger than state");for(let O=0;O>J&$)}:{h:0|Number(O>>J&$),l:0|Number(O&$)}}function split(O,U=!1){let $=new Uint32Array(O.length),J=new Uint32Array(O.length);for(let en=0;enBigInt(O>>>0)<>>0);U.toBig=toBig;let shrSH=(O,U,$)=>O>>>$,shrSL=(O,U,$)=>O<<32-$|U>>>$,rotrSH=(O,U,$)=>O>>>$|U<<32-$,rotrSL=(O,U,$)=>O<<32-$|U>>>$,rotrBH=(O,U,$)=>O<<64-$|U>>>$-32,rotrBL=(O,U,$)=>O>>>$-32|U<<64-$,rotr32H=(O,U)=>U,rotr32L=(O,U)=>O,rotlSH=(O,U,$)=>O<<$|U>>>32-$,rotlSL=(O,U,$)=>U<<$|O>>>32-$,rotlBH=(O,U,$)=>U<<$-32|O>>>64-$,rotlBL=(O,U,$)=>O<<$-32|U>>>64-$;function add(O,U,$,J){let en=(U>>>0)+(J>>>0);return{h:O+$+(en/4294967296|0)|0,l:0|en}}U.add=add;let add3L=(O,U,$)=>(O>>>0)+(U>>>0)+($>>>0),add3H=(O,U,$,J)=>U+$+J+(O/4294967296|0)|0,add4L=(O,U,$,J)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0),add4H=(O,U,$,J,en)=>U+$+J+en+(O/4294967296|0)|0,add5L=(O,U,$,J,en)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0)+(en>>>0),add5H=(O,U,$,J,en,es)=>U+$+J+en+es+(O/4294967296|0)|0,en={fromBig,split,toBig:U.toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L};U.default=en},9761:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.crypto=void 0,U.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},8119:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.hmac=void 0;let J=$(4390),en=$(5158);let HMAC=class HMAC extends en.Hash{constructor(O,U){super(),this.finished=!1,this.destroyed=!1,J.default.hash(O);let $=(0,en.toBytes)(U);if(this.iHash=O.create(),"function"!=typeof this.iHash.update)throw TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let es=this.blockLen,eo=new Uint8Array(es);eo.set($.length>es?O.create().update($).digest():$);for(let O=0;Onew HMAC(O,U).update($).digest();U.hmac=hmac,U.hmac.create=(O,U)=>new HMAC(O,U)},4618:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.pbkdf2Async=U.pbkdf2=void 0;let J=$(4390),en=$(8119),es=$(5158);function pbkdf2Init(O,U,$,eo){J.default.hash(O);let ea=(0,es.checkOpts)({dkLen:32,asyncTick:10},eo),{c:eu,dkLen:ef,asyncTick:eg}=ea;if(J.default.number(eu),J.default.number(ef),J.default.number(eg),eu<1)throw Error("PBKDF2: iterations (c) should be >= 1");let ev=(0,es.toBytes)(U),e_=(0,es.toBytes)($),ew=new Uint8Array(ef),eE=en.hmac.create(O,ev),eS=eE._cloneInto().update(e_);return{c:eu,dkLen:ef,asyncTick:eg,DK:ew,PRF:eE,PRFSalt:eS}}function pbkdf2Output(O,U,$,J,en){return O.destroy(),U.destroy(),J&&J.destroy(),en.fill(0),$}function pbkdf2(O,U,$,J){let en;let{c:eo,dkLen:ea,DK:eu,PRF:ef,PRFSalt:eg}=pbkdf2Init(O,U,$,J),ev=new Uint8Array(4),e_=(0,es.createView)(ev),ew=new Uint8Array(ef.outputLen);for(let O=1,U=0;U{eg._cloneInto(en).update(eE).digestInto(eE);for(let O=0;O<$.length;O++)$[O]^=eE[O]})}return pbkdf2Output(eg,ev,ef,en,eE)}U.pbkdf2=pbkdf2,U.pbkdf2Async=pbkdf2Async},6906:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.scryptAsync=U.scrypt=void 0;let J=$(4390),en=$(938),es=$(4618),eo=$(5158),rotl=(O,U)=>O<>>32-U;function XorAndSalsa(O,U,$,J,en,es){let eo=O[U++]^$[J++],ea=O[U++]^$[J++],eu=O[U++]^$[J++],ef=O[U++]^$[J++],eg=O[U++]^$[J++],ev=O[U++]^$[J++],e_=O[U++]^$[J++],ew=O[U++]^$[J++],eE=O[U++]^$[J++],eS=O[U++]^$[J++],eA=O[U++]^$[J++],eI=O[U++]^$[J++],eP=O[U++]^$[J++],ek=O[U++]^$[J++],eT=O[U++]^$[J++],eR=O[U++]^$[J++],eC=eo,eB=ea,eN=eu,eD=ef,eM=eg,eO=ev,eL=e_,eU=ew,eF=eE,eK=eS,ej=eA,eH=eI,eq=eP,eV=ek,eG=eT,e$=eR;for(let O=0;O<8;O+=2)eM^=rotl(eC+eq|0,7),eF^=rotl(eM+eC|0,9),eq^=rotl(eF+eM|0,13),eC^=rotl(eq+eF|0,18),eK^=rotl(eO+eB|0,7),eV^=rotl(eK+eO|0,9),eB^=rotl(eV+eK|0,13),eO^=rotl(eB+eV|0,18),eG^=rotl(ej+eL|0,7),eN^=rotl(eG+ej|0,9),eL^=rotl(eN+eG|0,13),ej^=rotl(eL+eN|0,18),eD^=rotl(e$+eH|0,7),eU^=rotl(eD+e$|0,9),eH^=rotl(eU+eD|0,13),e$^=rotl(eH+eU|0,18),eB^=rotl(eC+eD|0,7),eN^=rotl(eB+eC|0,9),eD^=rotl(eN+eB|0,13),eC^=rotl(eD+eN|0,18),eL^=rotl(eO+eM|0,7),eU^=rotl(eL+eO|0,9),eM^=rotl(eU+eL|0,13),eO^=rotl(eM+eU|0,18),eH^=rotl(ej+eK|0,7),eF^=rotl(eH+ej|0,9),eK^=rotl(eF+eH|0,13),ej^=rotl(eK+eF|0,18),eq^=rotl(e$+eG|0,7),eV^=rotl(eq+e$|0,9),eG^=rotl(eV+eq|0,13),e$^=rotl(eG+eV|0,18);en[es++]=eo+eC|0,en[es++]=ea+eB|0,en[es++]=eu+eN|0,en[es++]=ef+eD|0,en[es++]=eg+eM|0,en[es++]=ev+eO|0,en[es++]=e_+eL|0,en[es++]=ew+eU|0,en[es++]=eE+eF|0,en[es++]=eS+eK|0,en[es++]=eA+ej|0,en[es++]=eI+eH|0,en[es++]=eP+eq|0,en[es++]=ek+eV|0,en[es++]=eT+eG|0,en[es++]=eR+e$|0}function BlockMix(O,U,$,J,en){let es=J+0,eo=J+16*en;for(let J=0;J<16;J++)$[eo+J]=O[U+(2*en-1)*16+J];for(let J=0;J0&&(eo+=16),XorAndSalsa($,es,O,U+=16,$,eo)}function scryptInit(O,U,$){let ea=(0,eo.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},$),{N:eu,r:ef,p:eg,dkLen:ev,asyncTick:e_,maxmem:ew,onProgress:eE}=ea;if(J.default.number(eu),J.default.number(ef),J.default.number(eg),J.default.number(ev),J.default.number(e_),J.default.number(ew),void 0!==eE&&"function"!=typeof eE)throw Error("progressCb should be function");let eS=128*ef,eA=eS/4;if(eu<=1||(eu&eu-1)!=0||eu>=2**(eS/8)||eu>4294967296)throw Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(eg<0||eg>(4294967296-1)*32/eS)throw Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(ev<0||ev>(4294967296-1)*32)throw Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let eI=eS*(eu+eg);if(eI>ew)throw Error(`Scrypt: parameters too large, ${eI} (128 * r * (N + p)) > ${ew} (maxmem)`);let eP=(0,es.pbkdf2)(en.sha256,O,U,{c:1,dkLen:eS*eg}),ek=(0,eo.u32)(eP),eT=(0,eo.u32)(new Uint8Array(eS*eu)),eR=(0,eo.u32)(new Uint8Array(eS)),blockMixCb=()=>{};if(eE){let O=2*eu*eg,U=Math.max(Math.floor(O/1e4),1),$=0;blockMixCb=()=>{$++,eE&&(!($%U)||$===O)&&eE($/O)}}return{N:eu,r:ef,p:eg,dkLen:ev,blockSize32:eA,V:eT,B32:ek,B:eP,tmp:eR,blockMixCb,asyncTick:e_}}function scryptOutput(O,U,$,J,eo){let ea=(0,es.pbkdf2)(en.sha256,O,$,{c:1,dkLen:U});return $.fill(0),J.fill(0),eo.fill(0),ea}function scrypt(O,U,$){let{N:J,r:en,p:es,dkLen:eo,blockSize32:ea,V:eu,B32:ef,B:eg,tmp:ev,blockMixCb:e_}=scryptInit(O,U,$);for(let O=0;O{BlockMix(ef,$,ef,$+=eu,en),ew()}),BlockMix(ef,(J-1)*eu,eg,U,en),ew(),await (0,eo.asyncLoop)(J,eE,O=>{let $=eg[U+eu-16]%J;for(let O=0;OO&U^~O&$,Maj=(O,U,$)=>O&U^O&$^U&$,es=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]),eo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ea=new Uint32Array(64);let SHA256=class SHA256 extends J.SHA2{constructor(){super(64,32,8,!1),this.A=0|eo[0],this.B=0|eo[1],this.C=0|eo[2],this.D=0|eo[3],this.E=0|eo[4],this.F=0|eo[5],this.G=0|eo[6],this.H=0|eo[7]}get(){let{A:O,B:U,C:$,D:J,E:en,F:es,G:eo,H:ea}=this;return[O,U,$,J,en,es,eo,ea]}set(O,U,$,J,en,es,eo,ea){this.A=0|O,this.B=0|U,this.C=0|$,this.D=0|J,this.E=0|en,this.F=0|es,this.G=0|eo,this.H=0|ea}process(O,U){for(let $=0;$<16;$++,U+=4)ea[$]=O.getUint32(U,!1);for(let O=16;O<64;O++){let U=ea[O-15],$=ea[O-2],J=(0,en.rotr)(U,7)^(0,en.rotr)(U,18)^U>>>3,es=(0,en.rotr)($,17)^(0,en.rotr)($,19)^$>>>10;ea[O]=es+ea[O-7]+J+ea[O-16]|0}let{A:$,B:J,C:eo,D:eu,E:ef,F:eg,G:ev,H:e_}=this;for(let O=0;O<64;O++){let U=(0,en.rotr)(ef,6)^(0,en.rotr)(ef,11)^(0,en.rotr)(ef,25),ew=e_+U+Chi(ef,eg,ev)+es[O]+ea[O]|0,eE=(0,en.rotr)($,2)^(0,en.rotr)($,13)^(0,en.rotr)($,22),eS=eE+Maj($,J,eo)|0;e_=ev,ev=eg,eg=ef,ef=eu+ew|0,eu=eo,eo=J,J=$,$=ew+eS|0}$=$+this.A|0,J=J+this.B|0,eo=eo+this.C|0,eu=eu+this.D|0,ef=ef+this.E|0,eg=eg+this.F|0,ev=ev+this.G|0,e_=e_+this.H|0,this.set($,J,eo,eu,ef,eg,ev,e_)}roundClean(){ea.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let SHA224=class SHA224 extends SHA256{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}};U.sha256=(0,en.wrapConstructor)(()=>new SHA256),U.sha224=(0,en.wrapConstructor)(()=>new SHA224)},1791:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.sha384=U.sha512_256=U.sha512_224=U.sha512=U.SHA512=void 0;let J=$(2495),en=$(3991),es=$(5158),[eo,ea]=en.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(O=>BigInt(O))),eu=new Uint32Array(80),ef=new Uint32Array(80);let SHA512=class SHA512 extends J.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(){let{Ah:O,Al:U,Bh:$,Bl:J,Ch:en,Cl:es,Dh:eo,Dl:ea,Eh:eu,El:ef,Fh:eg,Fl:ev,Gh:e_,Gl:ew,Hh:eE,Hl:eS}=this;return[O,U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS]}set(O,U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS){this.Ah=0|O,this.Al=0|U,this.Bh=0|$,this.Bl=0|J,this.Ch=0|en,this.Cl=0|es,this.Dh=0|eo,this.Dl=0|ea,this.Eh=0|eu,this.El=0|ef,this.Fh=0|eg,this.Fl=0|ev,this.Gh=0|e_,this.Gl=0|ew,this.Hh=0|eE,this.Hl=0|eS}process(O,U){for(let $=0;$<16;$++,U+=4)eu[$]=O.getUint32(U),ef[$]=O.getUint32(U+=4);for(let O=16;O<80;O++){let U=0|eu[O-15],$=0|ef[O-15],J=en.default.rotrSH(U,$,1)^en.default.rotrSH(U,$,8)^en.default.shrSH(U,$,7),es=en.default.rotrSL(U,$,1)^en.default.rotrSL(U,$,8)^en.default.shrSL(U,$,7),eo=0|eu[O-2],ea=0|ef[O-2],eg=en.default.rotrSH(eo,ea,19)^en.default.rotrBH(eo,ea,61)^en.default.shrSH(eo,ea,6),ev=en.default.rotrSL(eo,ea,19)^en.default.rotrBL(eo,ea,61)^en.default.shrSL(eo,ea,6),e_=en.default.add4L(es,ev,ef[O-7],ef[O-16]),ew=en.default.add4H(e_,J,eg,eu[O-7],eu[O-16]);eu[O]=0|ew,ef[O]=0|e_}let{Ah:$,Al:J,Bh:es,Bl:eg,Ch:ev,Cl:e_,Dh:ew,Dl:eE,Eh:eS,El:eA,Fh:eI,Fl:eP,Gh:ek,Gl:eT,Hh:eR,Hl:eC}=this;for(let O=0;O<80;O++){let U=en.default.rotrSH(eS,eA,14)^en.default.rotrSH(eS,eA,18)^en.default.rotrBH(eS,eA,41),eB=en.default.rotrSL(eS,eA,14)^en.default.rotrSL(eS,eA,18)^en.default.rotrBL(eS,eA,41),eN=eS&eI^~eS&ek,eD=eA&eP^~eA&eT,eM=en.default.add5L(eC,eB,eD,ea[O],ef[O]),eO=en.default.add5H(eM,eR,U,eN,eo[O],eu[O]),eL=0|eM,eU=en.default.rotrSH($,J,28)^en.default.rotrBH($,J,34)^en.default.rotrBH($,J,39),eF=en.default.rotrSL($,J,28)^en.default.rotrBL($,J,34)^en.default.rotrBL($,J,39),eK=$&es^$&ev^es&ev,ej=J&eg^J&e_^eg&e_;eR=0|ek,eC=0|eT,ek=0|eI,eT=0|eP,eI=0|eS,eP=0|eA,({h:eS,l:eA}=en.default.add(0|ew,0|eE,0|eO,0|eL)),ew=0|ev,eE=0|e_,ev=0|es,e_=0|eg,es=0|$,eg=0|J;let eH=en.default.add3L(eL,eF,ej);$=en.default.add3H(eH,eO,eU,eK),J=0|eH}({h:$,l:J}=en.default.add(0|this.Ah,0|this.Al,0|$,0|J)),({h:es,l:eg}=en.default.add(0|this.Bh,0|this.Bl,0|es,0|eg)),({h:ev,l:e_}=en.default.add(0|this.Ch,0|this.Cl,0|ev,0|e_)),({h:ew,l:eE}=en.default.add(0|this.Dh,0|this.Dl,0|ew,0|eE)),({h:eS,l:eA}=en.default.add(0|this.Eh,0|this.El,0|eS,0|eA)),({h:eI,l:eP}=en.default.add(0|this.Fh,0|this.Fl,0|eI,0|eP)),({h:ek,l:eT}=en.default.add(0|this.Gh,0|this.Gl,0|ek,0|eT)),({h:eR,l:eC}=en.default.add(0|this.Hh,0|this.Hl,0|eR,0|eC)),this.set($,J,es,eg,ev,e_,ew,eE,eS,eA,eI,eP,ek,eT,eR,eC)}roundClean(){eu.fill(0),ef.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)}};U.SHA512=SHA512;let SHA512_224=class SHA512_224 extends SHA512{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}};let SHA512_256=class SHA512_256 extends SHA512{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}};let SHA384=class SHA384 extends SHA512{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}};U.sha512=(0,es.wrapConstructor)(()=>new SHA512),U.sha512_224=(0,es.wrapConstructor)(()=>new SHA512_224),U.sha512_256=(0,es.wrapConstructor)(()=>new SHA512_256),U.sha384=(0,es.wrapConstructor)(()=>new SHA384)},5158:function(O,U,$){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(U,"__esModule",{value:!0}),U.randomBytes=U.wrapConstructorWithOpts=U.wrapConstructor=U.checkOpts=U.Hash=U.concatBytes=U.toBytes=U.utf8ToBytes=U.asyncLoop=U.nextTick=U.hexToBytes=U.bytesToHex=U.isLE=U.rotr=U.createView=U.u32=U.u8=void 0;let J=$(9761),u8=O=>new Uint8Array(O.buffer,O.byteOffset,O.byteLength);U.u8=u8;let u32=O=>new Uint32Array(O.buffer,O.byteOffset,Math.floor(O.byteLength/4));U.u32=u32;let createView=O=>new DataView(O.buffer,O.byteOffset,O.byteLength);U.createView=createView;let rotr=(O,U)=>O<<32-U|O>>>U;if(U.rotr=rotr,U.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!U.isLE)throw Error("Non little-endian hardware is not supported");let en=Array.from({length:256},(O,U)=>U.toString(16).padStart(2,"0"));function bytesToHex(O){if(!(O instanceof Uint8Array))throw Error("Uint8Array expected");let U="";for(let $=0;${};async function asyncLoop(O,$,J){let en=Date.now();for(let es=0;es=0&&O<$||(await (0,U.nextTick)(),en+=O)}}function utf8ToBytes(O){if("string"!=typeof O)throw TypeError(`utf8ToBytes expected string, got ${typeof O}`);return new TextEncoder().encode(O)}function toBytes(O){if("string"==typeof O&&(O=utf8ToBytes(O)),!(O instanceof Uint8Array))throw TypeError(`Expected input type is Uint8Array (got ${typeof O})`);return O}function concatBytes(...O){if(!O.every(O=>O instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===O.length)return O[0];let U=O.reduce((O,U)=>O+U.length,0),$=new Uint8Array(U);for(let U=0,J=0;U"[object Object]"===Object.prototype.toString.call(O)&&O.constructor===Object;function checkOpts(O,U){if(void 0!==U&&("object"!=typeof U||!isPlainObject(U)))throw TypeError("Options should be object or undefined");let $=Object.assign(O,U);return $}function wrapConstructor(O){let hashC=U=>O().update(toBytes(U)).digest(),U=O();return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=()=>O(),hashC}function wrapConstructorWithOpts(O){let hashC=(U,$)=>O($).update(toBytes(U)).digest(),U=O({});return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=U=>O(U),hashC}function randomBytes(O=32){if(J.crypto.web)return J.crypto.web.getRandomValues(new Uint8Array(O));if(J.crypto.node)return new Uint8Array(J.crypto.node.randomBytes(O).buffer);throw Error("The environment doesn't have randomBytes function")}U.checkOpts=checkOpts,U.wrapConstructor=wrapConstructor,U.wrapConstructorWithOpts=wrapConstructorWithOpts,U.randomBytes=randomBytes},215:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.decrypt=U.encrypt=void 0;let J=$(9761),en=$(9449);function validateOpt(O,U,$){if(!$.startsWith("aes-"))throw Error(`AES submodule doesn't support mode ${$}`);if(16!==U.length)throw Error("AES: wrong IV length");if($.startsWith("aes-128")&&16!==O.length||$.startsWith("aes-256")&&32!==O.length)throw Error("AES: wrong key length")}async function getBrowserKey(O,U,$){let en;if(!J.crypto.web)throw Error("Browser crypto not available.");if(["aes-128-cbc","aes-256-cbc"].includes(O)&&(en="cbc"),["aes-128-ctr","aes-256-ctr"].includes(O)&&(en="ctr"),!en)throw Error("AES: unsupported mode");let es=await J.crypto.web.subtle.importKey("raw",U,{name:`AES-${en.toUpperCase()}`,length:8*U.length},!0,["encrypt","decrypt"]);return[es,{name:`aes-${en}`,iv:$,counter:$,length:128}]}async function encrypt(O,U,$,es="aes-128-ctr",eo=!0){if(validateOpt(U,$,es),J.crypto.web){let[en,ea]=await getBrowserKey(es,U,$),eu=await J.crypto.web.subtle.encrypt(ea,en,O),ef=new Uint8Array(eu);return eo||"aes-cbc"!==ea.name||O.length%16||(ef=ef.slice(0,-16)),ef}if(J.crypto.node){let ea=J.crypto.node.createCipheriv(es,U,$);return ea.setAutoPadding(eo),(0,en.concatBytes)(ea.update(O),ea.final())}throw Error("The environment doesn't have AES module")}async function getPadding(O,U,$,J){let en=O.slice(-16);for(let O=0;O<16;O++)en[O]^=16^$[O];let es=await encrypt(en,U,$,J);return es.slice(0,16)}async function decrypt(O,U,$,es="aes-128-ctr",eo=!0){if(validateOpt(U,$,es),J.crypto.web){let[ea,eu]=await getBrowserKey(es,U,$);if(!eo&&"aes-cbc"===eu.name){let J=await getPadding(O,U,$,es);O=(0,en.concatBytes)(O,J)}let ef=await J.crypto.web.subtle.decrypt(eu,ea,O),eg=new Uint8Array(ef);if("aes-cbc"===eu.name){let J=await encrypt(eg,U,$,es);if(!(0,en.equalsBytes)(J,O))throw Error("AES: wrong padding")}return eg}if(J.crypto.node){let ea=J.crypto.node.createDecipheriv(es,U,$);return ea.setAutoPadding(eo),(0,en.concatBytes)(ea.update(O),ea.final())}throw Error("The environment doesn't have AES module")}U.encrypt=encrypt,U.decrypt=decrypt},1406:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.pbkdf2Sync=U.pbkdf2=void 0;let J=$(4618),en=$(938),es=$(1791),eo=$(9449);async function pbkdf2(O,U,$,ea,eu){if(!["sha256","sha512"].includes(eu))throw Error("Only sha256 and sha512 are supported");return(0,eo.assertBytes)(O),(0,eo.assertBytes)(U),(0,J.pbkdf2Async)("sha256"===eu?en.sha256:es.sha512,O,U,{c:$,dkLen:ea})}function pbkdf2Sync(O,U,$,ea,eu){if(!["sha256","sha512"].includes(eu))throw Error("Only sha256 and sha512 are supported");return(0,eo.assertBytes)(O),(0,eo.assertBytes)(U),(0,J.pbkdf2)("sha256"===eu?en.sha256:es.sha512,O,U,{c:$,dkLen:ea})}U.pbkdf2=pbkdf2,U.pbkdf2Sync=pbkdf2Sync},4610:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.getRandomBytes=U.getRandomBytesSync=void 0;let J=$(5158);function getRandomBytesSync(O){return(0,J.randomBytes)(O)}async function getRandomBytes(O){return(0,J.randomBytes)(O)}U.getRandomBytesSync=getRandomBytesSync,U.getRandomBytes=getRandomBytes},4468:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.scryptSync=U.scrypt=void 0;let J=$(6906),en=$(9449);async function scrypt(O,U,$,es,eo,ea,eu){return(0,en.assertBytes)(O),(0,en.assertBytes)(U),(0,J.scryptAsync)(O,U,{N:$,r:eo,p:es,dkLen:ea,onProgress:eu})}function scryptSync(O,U,$,es,eo,ea,eu){return(0,en.assertBytes)(O),(0,en.assertBytes)(U),(0,J.scrypt)(O,U,{N:$,r:eo,p:es,dkLen:ea,onProgress:eu})}U.scrypt=scrypt,U.scryptSync=scryptSync},8207:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.sha256=void 0;let J=$(938),en=$(9449);U.sha256=(0,en.wrapHash)(J.sha256)},9449:function(O,U,$){"use strict";O=$.nmd(O);var J=this&&this.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(U,"__esModule",{value:!0}),U.crypto=U.wrapHash=U.equalsBytes=U.hexToBytes=U.bytesToUtf8=U.utf8ToBytes=U.createView=U.concatBytes=U.toHex=U.bytesToHex=U.assertBytes=U.assertBool=void 0;let en=J($(4390)),es=$(5158),eo=en.default.bool;U.assertBool=eo;let ea=en.default.bytes;U.assertBytes=ea;var eu=$(5158);function bytesToUtf8(O){if(!(O instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof O}`);return new TextDecoder().decode(O)}function hexToBytes(O){let U=O.startsWith("0x")?O.substring(2):O;return(0,es.hexToBytes)(U)}function equalsBytes(O,U){if(O.length!==U.length)return!1;for(let $=0;$(en.default.bytes(U),O(U))}Object.defineProperty(U,"bytesToHex",{enumerable:!0,get:function(){return eu.bytesToHex}}),Object.defineProperty(U,"toHex",{enumerable:!0,get:function(){return eu.bytesToHex}}),Object.defineProperty(U,"concatBytes",{enumerable:!0,get:function(){return eu.concatBytes}}),Object.defineProperty(U,"createView",{enumerable:!0,get:function(){return eu.createView}}),Object.defineProperty(U,"utf8ToBytes",{enumerable:!0,get:function(){return eu.utf8ToBytes}}),U.bytesToUtf8=bytesToUtf8,U.hexToBytes=hexToBytes,U.equalsBytes=equalsBytes,U.wrapHash=wrapHash,U.crypto=(()=>{let U="object"==typeof self&&"crypto"in self?self.crypto:void 0,$="function"==typeof O.require&&O.require.bind(O);return{node:$&&!U?$("crypto"):void 0,web:U}})()},6509:function(O,U,$){"use strict";$.r(U),$.d(U,{NIL:function(){return eA},parse:function(){return esm_browser_parse},stringify:function(){return esm_browser_stringify},v1:function(){return esm_browser_v1},v3:function(){return eE},v4:function(){return esm_browser_v4},v5:function(){return eS},validate:function(){return esm_browser_validate},version:function(){return esm_browser_version}});var J,en,es,eo=new Uint8Array(16);function rng(){if(!J&&!(J="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(eo)}for(var ea=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,esm_browser_validate=function(O){return"string"==typeof O&&ea.test(O)},eu=[],ef=0;ef<256;++ef)eu.push((ef+256).toString(16).substr(1));var esm_browser_stringify=function(O){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,$=(eu[O[U+0]]+eu[O[U+1]]+eu[O[U+2]]+eu[O[U+3]]+"-"+eu[O[U+4]]+eu[O[U+5]]+"-"+eu[O[U+6]]+eu[O[U+7]]+"-"+eu[O[U+8]]+eu[O[U+9]]+"-"+eu[O[U+10]]+eu[O[U+11]]+eu[O[U+12]]+eu[O[U+13]]+eu[O[U+14]]+eu[O[U+15]]).toLowerCase();if(!esm_browser_validate($))throw TypeError("Stringified UUID is invalid");return $},eg=0,ev=0,esm_browser_v1=function(O,U,$){var J=U&&$||0,eo=U||Array(16),ea=(O=O||{}).node||en,eu=void 0!==O.clockseq?O.clockseq:es;if(null==ea||null==eu){var ef=O.random||(O.rng||rng)();null==ea&&(ea=en=[1|ef[0],ef[1],ef[2],ef[3],ef[4],ef[5]]),null==eu&&(eu=es=(ef[6]<<8|ef[7])&16383)}var e_=void 0!==O.msecs?O.msecs:Date.now(),ew=void 0!==O.nsecs?O.nsecs:ev+1,eE=e_-eg+(ew-ev)/1e4;if(eE<0&&void 0===O.clockseq&&(eu=eu+1&16383),(eE<0||e_>eg)&&void 0===O.nsecs&&(ew=0),ew>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");eg=e_,ev=ew,es=eu;var eS=((268435455&(e_+=122192928e5))*1e4+ew)%4294967296;eo[J++]=eS>>>24&255,eo[J++]=eS>>>16&255,eo[J++]=eS>>>8&255,eo[J++]=255&eS;var eA=e_/4294967296*1e4&268435455;eo[J++]=eA>>>8&255,eo[J++]=255&eA,eo[J++]=eA>>>24&15|16,eo[J++]=eA>>>16&255,eo[J++]=eu>>>8|128,eo[J++]=255&eu;for(var eI=0;eI<6;++eI)eo[J+eI]=ea[eI];return U||esm_browser_stringify(eo)},esm_browser_parse=function(O){if(!esm_browser_validate(O))throw TypeError("Invalid UUID");var U,$=new Uint8Array(16);return $[0]=(U=parseInt(O.slice(0,8),16))>>>24,$[1]=U>>>16&255,$[2]=U>>>8&255,$[3]=255&U,$[4]=(U=parseInt(O.slice(9,13),16))>>>8,$[5]=255&U,$[6]=(U=parseInt(O.slice(14,18),16))>>>8,$[7]=255&U,$[8]=(U=parseInt(O.slice(19,23),16))>>>8,$[9]=255&U,$[10]=(U=parseInt(O.slice(24,36),16))/1099511627776&255,$[11]=U/4294967296&255,$[12]=U>>>24&255,$[13]=U>>>16&255,$[14]=U>>>8&255,$[15]=255&U,$};function stringToBytes(O){O=unescape(encodeURIComponent(O));for(var U=[],$=0;$>5]>>>en%32&255,eo=parseInt(J.charAt(es>>>4&15)+J.charAt(15&es),16);U.push(eo)}return U}function getOutputLength(O){return(O+64>>>9<<4)+14+1}function wordsToMd5(O,U){O[U>>5]|=128<>5]|=(255&O[J/8])<>16)+(U>>16)+($>>16)<<16|65535&$}function bitRotateLeft(O,U){return O<>>32-U}function md5cmn(O,U,$,J,en,es){return safeAdd(bitRotateLeft(safeAdd(safeAdd(U,O),safeAdd(J,es)),en),$)}function md5ff(O,U,$,J,en,es,eo){return md5cmn(U&$|~U&J,O,U,en,es,eo)}function md5gg(O,U,$,J,en,es,eo){return md5cmn(U&J|$&~J,O,U,en,es,eo)}function md5hh(O,U,$,J,en,es,eo){return md5cmn(U^$^J,O,U,en,es,eo)}function md5ii(O,U,$,J,en,es,eo){return md5cmn($^(U|~J),O,U,en,es,eo)}var eE=v35("v3",48,function(O){if("string"==typeof O){var U=unescape(encodeURIComponent(O));O=new Uint8Array(U.length);for(var $=0;$>>32-U}var eS=v35("v5",80,function(O){var U=[1518500249,1859775393,2400959708,3395469782],$=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof O){var J=unescape(encodeURIComponent(O));O=[];for(var en=0;en>>0;eP=eI,eI=eA,eA=ROTL(eS,30)>>>0,eS=eE,eE=eR}$[0]=$[0]+eE>>>0,$[1]=$[1]+eS>>>0,$[2]=$[2]+eA>>>0,$[3]=$[3]+eI>>>0,$[4]=$[4]+eP>>>0}return[$[0]>>24&255,$[0]>>16&255,$[0]>>8&255,255&$[0],$[1]>>24&255,$[1]>>16&255,$[1]>>8&255,255&$[1],$[2]>>24&255,$[2]>>16&255,$[2]>>8&255,255&$[2],$[3]>>24&255,$[3]>>16&255,$[3]>>8&255,255&$[3],$[4]>>24&255,$[4]>>16&255,$[4]>>8&255,255&$[4]]}),eA="00000000-0000-0000-0000-000000000000",esm_browser_version=function(O){if(!esm_browser_validate(O))throw TypeError("Invalid UUID");return parseInt(O.substr(14,1),16)}},4999:function(O,U,$){"use strict";$.d(U,{Sg:function(){return ForkEvent},zt:function(){return Provider}});var J=$(2278),en=$(7213),es=$(6288);let eo="abstract-provider/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let ea=new es.Yd(eo);let ForkEvent=class ForkEvent extends en.dk{static isForkEvent(O){return!!(O&&O._isForkEvent)}};let Provider=class Provider{constructor(){ea.checkAbstract(new.target,Provider),(0,en.zG)(this,"_isProvider",!0)}getFeeData(){return __awaiter(this,void 0,void 0,function*(){let{block:O,gasPrice:U}=yield(0,en.mE)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(O=>null)}),$=null,es=null,eo=null;return O&&O.baseFeePerGas&&($=O.baseFeePerGas,eo=J.O$.from("1500000000"),es=O.baseFeePerGas.mul(2).add(eo)),{lastBaseFeePerGas:$,maxFeePerGas:es,maxPriorityFeePerGas:eo,gasPrice:U}})}addListener(O,U){return this.on(O,U)}removeListener(O,U){return this.off(O,U)}static isProvider(O){return!!(O&&O._isProvider)}}},4941:function(O,U,$){"use strict";$.d(U,{E:function(){return Signer},b:function(){return VoidSigner}});var J=$(7213),en=$(6288);let es="abstract-signer/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let eo=new en.Yd(es),ea=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],eu=[en.Yd.errors.INSUFFICIENT_FUNDS,en.Yd.errors.NONCE_EXPIRED,en.Yd.errors.REPLACEMENT_UNDERPRICED];let Signer=class Signer{constructor(){eo.checkAbstract(new.target,Signer),(0,J.zG)(this,"_isSigner",!0)}getBalance(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),O)})}getTransactionCount(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),O)})}estimateGas(O){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let U=yield(0,J.mE)(this.checkTransaction(O));return yield this.provider.estimateGas(U)})}call(O,U){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("call");let $=yield(0,J.mE)(this.checkTransaction(O));return yield this.provider.call($,U)})}sendTransaction(O){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let U=yield this.populateTransaction(O),$=yield this.signTransaction(U);return yield this.provider.sendTransaction($)})}getChainId(){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("getChainId");let O=yield this.provider.getNetwork();return O.chainId})}getGasPrice(){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(O)})}checkTransaction(O){for(let U in O)-1===ea.indexOf(U)&&eo.throwArgumentError("invalid transaction key: "+U,"transaction",O);let U=(0,J.DC)(O);return null==U.from?U.from=this.getAddress():U.from=Promise.all([Promise.resolve(U.from),this.getAddress()]).then(U=>(U[0].toLowerCase()!==U[1].toLowerCase()&&eo.throwArgumentError("from address mismatch","transaction",O),U[0])),U}populateTransaction(O){return __awaiter(this,void 0,void 0,function*(){let U=yield(0,J.mE)(this.checkTransaction(O));null!=U.to&&(U.to=Promise.resolve(U.to).then(O=>__awaiter(this,void 0,void 0,function*(){if(null==O)return null;let U=yield this.resolveName(O);return null==U&&eo.throwArgumentError("provided ENS name resolves to null","tx.to",O),U})),U.to.catch(O=>{}));let $=null!=U.maxFeePerGas||null!=U.maxPriorityFeePerGas;if(null!=U.gasPrice&&(2===U.type||$)?eo.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",O):(0===U.type||1===U.type)&&$&&eo.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",O),(2===U.type||null==U.type)&&null!=U.maxFeePerGas&&null!=U.maxPriorityFeePerGas)U.type=2;else if(0===U.type||1===U.type)null==U.gasPrice&&(U.gasPrice=this.getGasPrice());else{let O=yield this.getFeeData();if(null==U.type){if(null!=O.maxFeePerGas&&null!=O.maxPriorityFeePerGas){if(U.type=2,null!=U.gasPrice){let O=U.gasPrice;delete U.gasPrice,U.maxFeePerGas=O,U.maxPriorityFeePerGas=O}else null==U.maxFeePerGas&&(U.maxFeePerGas=O.maxFeePerGas),null==U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=O.maxPriorityFeePerGas)}else null!=O.gasPrice?($&&eo.throwError("network does not support EIP-1559",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==U.gasPrice&&(U.gasPrice=O.gasPrice),U.type=0):eo.throwError("failed to get consistent fee data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}else 2===U.type&&(null==U.maxFeePerGas&&(U.maxFeePerGas=O.maxFeePerGas),null==U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=O.maxPriorityFeePerGas))}return null==U.nonce&&(U.nonce=this.getTransactionCount("pending")),null==U.gasLimit&&(U.gasLimit=this.estimateGas(U).catch(O=>{if(eu.indexOf(O.code)>=0)throw O;return eo.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:O,tx:U})})),null==U.chainId?U.chainId=this.getChainId():U.chainId=Promise.all([Promise.resolve(U.chainId),this.getChainId()]).then(U=>(0!==U[1]&&U[0]!==U[1]&&eo.throwArgumentError("chainId address mismatch","transaction",O),U[0])),yield(0,J.mE)(U)})}_checkProvider(O){this.provider||eo.throwError("missing provider",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:O||"_checkProvider"})}static isSigner(O){return!!(O&&O._isSigner)}};let VoidSigner=class VoidSigner extends Signer{constructor(O,U){super(),(0,J.zG)(this,"address",O),(0,J.zG)(this,"provider",U||null)}getAddress(){return Promise.resolve(this.address)}_fail(O,U){return Promise.resolve().then(()=>{eo.throwError(O,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:U})})}signMessage(O){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(O){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(O,U,$){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(O){return new VoidSigner(this.address,O)}}},8994:function(O,U,$){"use strict";$.d(U,{Kn:function(){return getAddress},CR:function(){return getContractAddress}});var J=$(7273),en=$(2278),es=$(4184),eo=$(7054),ea=$(6288);let eu="address/5.7.0",ef=new ea.Yd(eu);function getChecksumAddress(O){(0,J.A7)(O,20)||ef.throwArgumentError("invalid address","address",O),O=O.toLowerCase();let U=O.substring(2).split(""),$=new Uint8Array(40);for(let O=0;O<40;O++)$[O]=U[O].charCodeAt(0);let en=(0,J.lE)((0,es.w)($));for(let O=0;O<40;O+=2)en[O>>1]>>4>=8&&(U[O]=U[O].toUpperCase()),(15&en[O>>1])>=8&&(U[O+1]=U[O+1].toUpperCase());return"0x"+U.join("")}let eg=9007199254740991;function log10(O){return Math.log10?Math.log10(O):Math.log(O)/Math.LN10}let ev={};for(let O=0;O<10;O++)ev[String(O)]=String(O);for(let O=0;O<26;O++)ev[String.fromCharCode(65+O)]=String(10+O);let e_=Math.floor(log10(eg));function ibanChecksum(O){let U=(O=(O=O.toUpperCase()).substring(4)+O.substring(0,2)+"00").split("").map(O=>ev[O]).join("");for(;U.length>=e_;){let O=U.substring(0,e_);U=parseInt(O,10)%97+U.substring(O.length)}let $=String(98-parseInt(U,10)%97);for(;$.length<2;)$="0"+$;return $}function getAddress(O){let U=null;if("string"!=typeof O&&ef.throwArgumentError("invalid address","address",O),O.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==O.substring(0,2)&&(O="0x"+O),U=getChecksumAddress(O),O.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&U!==O&&ef.throwArgumentError("bad address checksum","address",O);else if(O.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(O.substring(2,4)!==ibanChecksum(O)&&ef.throwArgumentError("bad icap checksum","address",O),U=(0,en.g$)(O.substring(4));U.length<40;)U="0"+U;U=getChecksumAddress("0x"+U)}else ef.throwArgumentError("invalid address","address",O);return U}function getContractAddress(O){let U=null;try{U=getAddress(O.from)}catch(U){ef.throwArgumentError("missing from address","transaction",O)}let $=(0,J.G1)((0,J.lE)(en.O$.from(O.nonce).toHexString()));return getAddress((0,J.p3)((0,es.w)((0,eo.c)([U,$])),12))}},2278:function(O,U,$){"use strict";$.d(U,{O$:function(){return BigNumber},g$:function(){return _base36To16}});var J=$(6662),en=$.n(J),es=$(7273),eo=$(6288);let ea="bignumber/5.7.0";var eu=en().BN;let ef=new eo.Yd(ea),eg={},ev=9007199254740991,e_=!1;let BigNumber=class BigNumber{constructor(O,U){O!==eg&&ef.throwError("cannot call constructor directly; use BigNumber.from",eo.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=U,this._isBigNumber=!0,Object.freeze(this)}fromTwos(O){return toBigNumber(toBN(this).fromTwos(O))}toTwos(O){return toBigNumber(toBN(this).toTwos(O))}abs(){return"-"===this._hex[0]?BigNumber.from(this._hex.substring(1)):this}add(O){return toBigNumber(toBN(this).add(toBN(O)))}sub(O){return toBigNumber(toBN(this).sub(toBN(O)))}div(O){let U=BigNumber.from(O);return U.isZero()&&throwFault("division-by-zero","div"),toBigNumber(toBN(this).div(toBN(O)))}mul(O){return toBigNumber(toBN(this).mul(toBN(O)))}mod(O){let U=toBN(O);return U.isNeg()&&throwFault("division-by-zero","mod"),toBigNumber(toBN(this).umod(U))}pow(O){let U=toBN(O);return U.isNeg()&&throwFault("negative-power","pow"),toBigNumber(toBN(this).pow(U))}and(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","and"),toBigNumber(toBN(this).and(U))}or(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","or"),toBigNumber(toBN(this).or(U))}xor(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","xor"),toBigNumber(toBN(this).xor(U))}mask(O){return(this.isNegative()||O<0)&&throwFault("negative-width","mask"),toBigNumber(toBN(this).maskn(O))}shl(O){return(this.isNegative()||O<0)&&throwFault("negative-width","shl"),toBigNumber(toBN(this).shln(O))}shr(O){return(this.isNegative()||O<0)&&throwFault("negative-width","shr"),toBigNumber(toBN(this).shrn(O))}eq(O){return toBN(this).eq(toBN(O))}lt(O){return toBN(this).lt(toBN(O))}lte(O){return toBN(this).lte(toBN(O))}gt(O){return toBN(this).gt(toBN(O))}gte(O){return toBN(this).gte(toBN(O))}isNegative(){return"-"===this._hex[0]}isZero(){return toBN(this).isZero()}toNumber(){try{return toBN(this).toNumber()}catch(O){throwFault("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(O){}return ef.throwError("this platform does not support BigInt",eo.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?e_||(e_=!0,ef.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?ef.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",eo.Yd.errors.UNEXPECTED_ARGUMENT,{}):ef.throwError("BigNumber.toString does not accept parameters",eo.Yd.errors.UNEXPECTED_ARGUMENT,{})),toBN(this).toString(10)}toHexString(){return this._hex}toJSON(O){return{type:"BigNumber",hex:this.toHexString()}}static from(O){if(O instanceof BigNumber)return O;if("string"==typeof O)return O.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(eg,toHex(O)):O.match(/^-?[0-9]+$/)?new BigNumber(eg,toHex(new eu(O))):ef.throwArgumentError("invalid BigNumber string","value",O);if("number"==typeof O)return O%1&&throwFault("underflow","BigNumber.from",O),(O>=ev||O<=-ev)&&throwFault("overflow","BigNumber.from",O),BigNumber.from(String(O));let U=O;if("bigint"==typeof U)return BigNumber.from(U.toString());if((0,es._t)(U))return BigNumber.from((0,es.Dv)(U));if(U){if(U.toHexString){let O=U.toHexString();if("string"==typeof O)return BigNumber.from(O)}else{let O=U._hex;if(null==O&&"BigNumber"===U.type&&(O=U.hex),"string"==typeof O&&((0,es.A7)(O)||"-"===O[0]&&(0,es.A7)(O.substring(1))))return BigNumber.from(O)}}return ef.throwArgumentError("invalid BigNumber value","value",O)}static isBigNumber(O){return!!(O&&O._isBigNumber)}};function toHex(O){if("string"!=typeof O)return toHex(O.toString(16));if("-"===O[0])return("-"===(O=O.substring(1))[0]&&ef.throwArgumentError("invalid hex","value",O),"0x00"===(O=toHex(O)))?O:"-"+O;if("0x"!==O.substring(0,2)&&(O="0x"+O),"0x"===O)return"0x00";for(O.length%2&&(O="0x0"+O.substring(2));O.length>4&&"0x00"===O.substring(0,4);)O="0x"+O.substring(4);return O}function toBigNumber(O){return BigNumber.from(toHex(O))}function toBN(O){let U=BigNumber.from(O).toHexString();return"-"===U[0]?new eu("-"+U.substring(3),16):new eu(U.substring(2),16)}function throwFault(O,U,$){let J={fault:O,operation:U};return null!=$&&(J.value=$),ef.throwError(O,eo.Yd.errors.NUMERIC_FAULT,J)}function _base36To16(O){return new eu(O,36).toString(16)}},7273:function(O,U,$){"use strict";$.d(U,{lE:function(){return arrayify},zo:function(){return concat},xs:function(){return hexConcat},E1:function(){return hexDataLength},p3:function(){return hexDataSlice},$P:function(){return hexValue},$m:function(){return hexZeroPad},Dv:function(){return hexlify},_t:function(){return isBytes},Zq:function(){return isBytesLike},A7:function(){return isHexString},N:function(){return splitSignature},G1:function(){return stripZeros},Bu:function(){return zeroPad}});var J=$(6288);let en="bytes/5.7.0",es=new J.Yd(en);function isHexable(O){return!!O.toHexString}function addSlice(O){return O.slice||(O.slice=function(){let U=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(O,U)))}),O}function isBytesLike(O){return isHexString(O)&&!(O.length%2)||isBytes(O)}function isInteger(O){return"number"==typeof O&&O==O&&O%1==0}function isBytes(O){if(null==O)return!1;if(O.constructor===Uint8Array)return!0;if("string"==typeof O||!isInteger(O.length)||O.length<0)return!1;for(let U=0;U=256)return!1}return!0}function arrayify(O,U){if(U||(U={}),"number"==typeof O){es.checkSafeUint53(O,"invalid arrayify value");let U=[];for(;O;)U.unshift(255&O),O=parseInt(String(O/256));return 0===U.length&&U.push(0),addSlice(new Uint8Array(U))}if(U.allowMissingPrefix&&"string"==typeof O&&"0x"!==O.substring(0,2)&&(O="0x"+O),isHexable(O)&&(O=O.toHexString()),isHexString(O)){let $=O.substring(2);$.length%2&&("left"===U.hexPad?$="0"+$:"right"===U.hexPad?$+="0":es.throwArgumentError("hex data is odd-length","value",O));let J=[];for(let O=0;O<$.length;O+=2)J.push(parseInt($.substring(O,O+2),16));return addSlice(new Uint8Array(J))}return isBytes(O)?addSlice(new Uint8Array(O)):es.throwArgumentError("invalid arrayify value","value",O)}function concat(O){let U=O.map(O=>arrayify(O)),$=U.reduce((O,U)=>O+U.length,0),J=new Uint8Array($);return U.reduce((O,U)=>(J.set(U,O),O+U.length),0),addSlice(J)}function stripZeros(O){let U=arrayify(O);if(0===U.length)return U;let $=0;for(;$U&&es.throwArgumentError("value out of range","value",arguments[0]);let $=new Uint8Array(U);return $.set(O,U-O.length),addSlice($)}function isHexString(O,U){return"string"==typeof O&&!!O.match(/^0x[0-9A-Fa-f]*$/)&&(!U||O.length===2+2*U)}let eo="0123456789abcdef";function hexlify(O,U){if(U||(U={}),"number"==typeof O){es.checkSafeUint53(O,"invalid hexlify value");let U="";for(;O;)U=eo[15&O]+U,O=Math.floor(O/16);return U.length?(U.length%2&&(U="0"+U),"0x"+U):"0x00"}if("bigint"==typeof O)return(O=O.toString(16)).length%2?"0x0"+O:"0x"+O;if(U.allowMissingPrefix&&"string"==typeof O&&"0x"!==O.substring(0,2)&&(O="0x"+O),isHexable(O))return O.toHexString();if(isHexString(O))return O.length%2&&("left"===U.hexPad?O="0x0"+O.substring(2):"right"===U.hexPad?O+="0":es.throwArgumentError("hex data is odd-length","value",O)),O.toLowerCase();if(isBytes(O)){let U="0x";for(let $=0;$>4]+eo[15&J]}return U}return es.throwArgumentError("invalid hexlify value","value",O)}function hexDataLength(O){if("string"!=typeof O)O=hexlify(O);else if(!isHexString(O)||O.length%2)return null;return(O.length-2)/2}function hexDataSlice(O,U,$){return("string"!=typeof O?O=hexlify(O):(!isHexString(O)||O.length%2)&&es.throwArgumentError("invalid hexData","value",O),U=2+2*U,null!=$)?"0x"+O.substring(U,2+2*$):"0x"+O.substring(U)}function hexConcat(O){let U="0x";return O.forEach(O=>{U+=hexlify(O).substring(2)}),U}function hexValue(O){let U=hexStripZeros(hexlify(O,{hexPad:"left"}));return"0x"===U?"0x0":U}function hexStripZeros(O){"string"!=typeof O&&(O=hexlify(O)),isHexString(O)||es.throwArgumentError("invalid hex string","value",O),O=O.substring(2);let U=0;for(;U2*U+2&&es.throwArgumentError("value out of range","value",arguments[1]);O.length<2*U+2;)O="0x0"+O.substring(2);return O}function splitSignature(O){let U={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(isBytesLike(O)){let $=arrayify(O);64===$.length?(U.v=27+($[32]>>7),$[32]&=127,U.r=hexlify($.slice(0,32)),U.s=hexlify($.slice(32,64))):65===$.length?(U.r=hexlify($.slice(0,32)),U.s=hexlify($.slice(32,64)),U.v=$[64]):es.throwArgumentError("invalid signature string","signature",O),U.v<27&&(0===U.v||1===U.v?U.v+=27:es.throwArgumentError("signature invalid v byte","signature",O)),U.recoveryParam=1-U.v%2,U.recoveryParam&&($[32]|=128),U._vs=hexlify($.slice(32,64))}else{if(U.r=O.r,U.s=O.s,U.v=O.v,U.recoveryParam=O.recoveryParam,U._vs=O._vs,null!=U._vs){let $=zeroPad(arrayify(U._vs),32);U._vs=hexlify($);let J=$[0]>=128?1:0;null==U.recoveryParam?U.recoveryParam=J:U.recoveryParam!==J&&es.throwArgumentError("signature recoveryParam mismatch _vs","signature",O),$[0]&=127;let en=hexlify($);null==U.s?U.s=en:U.s!==en&&es.throwArgumentError("signature v mismatch _vs","signature",O)}if(null==U.recoveryParam)null==U.v?es.throwArgumentError("signature missing v and recoveryParam","signature",O):0===U.v||1===U.v?U.recoveryParam=U.v:U.recoveryParam=1-U.v%2;else if(null==U.v)U.v=27+U.recoveryParam;else{let $=0===U.v||1===U.v?U.v:1-U.v%2;U.recoveryParam!==$&&es.throwArgumentError("signature recoveryParam mismatch v","signature",O)}null!=U.r&&isHexString(U.r)?U.r=hexZeroPad(U.r,32):es.throwArgumentError("signature missing or invalid r","signature",O),null!=U.s&&isHexString(U.s)?U.s=hexZeroPad(U.s,32):es.throwArgumentError("signature missing or invalid s","signature",O);let $=arrayify(U.s);$[0]>=128&&es.throwArgumentError("signature s out of range","signature",O),U.recoveryParam&&($[0]|=128);let J=hexlify($);U._vs&&(isHexString(U._vs)||es.throwArgumentError("signature invalid _vs","signature",O),U._vs=hexZeroPad(U._vs,32)),null==U._vs?U._vs=J:U._vs!==J&&es.throwArgumentError("signature _vs mismatch v and s","signature",O)}return U.yParityAndS=U._vs,U.compact=U.r+U.yParityAndS.substring(2),U}},5572:function(O,U,$){"use strict";$.d(U,{d:function(){return J}});let J="0x0000000000000000000000000000000000000000"},3690:function(O,U,$){"use strict";$.d(U,{Bz:function(){return ea},_Y:function(){return es},fh:function(){return eo},tL:function(){return en}});var J=$(2278);let en=J.O$.from(-1),es=J.O$.from(0),eo=J.O$.from(1),ea=J.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},6339:function(O,U,$){"use strict";$.d(U,{id:function(){return id}});var J=$(4184),en=$(8337);function id(O){return(0,J.w)((0,en.Y0)(O))}},4184:function(O,U,$){"use strict";$.d(U,{w:function(){return keccak256}});var J=$(6398),en=$.n(J),es=$(7273);function keccak256(O){return"0x"+en().keccak_256((0,es.lE)(O))}},6288:function(O,U,$){"use strict";var J,en;$.d(U,{Yd:function(){return Logger}});let es="logger/5.7.0",eo=!1,ea=!1,eu={debug:1,default:2,info:2,warning:3,error:4,off:5},ef=2,eg=null;function _checkNormalize(){try{let O=[];if(["NFD","NFC","NFKD","NFKC"].forEach(U=>{try{if("test"!=="test".normalize(U))throw Error("bad normalize")}catch($){O.push(U)}}),O.length)throw Error("missing "+O.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(O){return O.message}return null}let ev=_checkNormalize();!function(O){O.DEBUG="DEBUG",O.INFO="INFO",O.WARNING="WARNING",O.ERROR="ERROR",O.OFF="OFF"}(J||(J={})),function(O){O.UNKNOWN_ERROR="UNKNOWN_ERROR",O.NOT_IMPLEMENTED="NOT_IMPLEMENTED",O.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",O.NETWORK_ERROR="NETWORK_ERROR",O.SERVER_ERROR="SERVER_ERROR",O.TIMEOUT="TIMEOUT",O.BUFFER_OVERRUN="BUFFER_OVERRUN",O.NUMERIC_FAULT="NUMERIC_FAULT",O.MISSING_NEW="MISSING_NEW",O.INVALID_ARGUMENT="INVALID_ARGUMENT",O.MISSING_ARGUMENT="MISSING_ARGUMENT",O.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",O.CALL_EXCEPTION="CALL_EXCEPTION",O.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",O.NONCE_EXPIRED="NONCE_EXPIRED",O.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",O.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",O.TRANSACTION_REPLACED="TRANSACTION_REPLACED",O.ACTION_REJECTED="ACTION_REJECTED"}(en||(en={}));let e_="0123456789abcdef";let Logger=class Logger{constructor(O){Object.defineProperty(this,"version",{enumerable:!0,value:O,writable:!1})}_log(O,U){let $=O.toLowerCase();null==eu[$]&&this.throwArgumentError("invalid log level name","logLevel",O),ef>eu[$]||console.log.apply(console,U)}debug(...O){this._log(Logger.levels.DEBUG,O)}info(...O){this._log(Logger.levels.INFO,O)}warn(...O){this._log(Logger.levels.WARNING,O)}makeError(O,U,$){if(ea)return this.makeError("censored error",U,{});U||(U=Logger.errors.UNKNOWN_ERROR),$||($={});let J=[];Object.keys($).forEach(O=>{let U=$[O];try{if(U instanceof Uint8Array){let $="";for(let O=0;O>4]+e_[15&U[O]];J.push(O+"=Uint8Array(0x"+$+")")}else J.push(O+"="+JSON.stringify(U))}catch(U){J.push(O+"="+JSON.stringify($[O].toString()))}}),J.push(`code=${U}`),J.push(`version=${this.version}`);let es=O,eo="";switch(U){case en.NUMERIC_FAULT:{eo="NUMERIC_FAULT";let U=O;switch(U){case"overflow":case"underflow":case"division-by-zero":eo+="-"+U;break;case"negative-power":case"negative-width":eo+="-unsupported";break;case"unbound-bitwise-result":eo+="-unbound-result"}break}case en.CALL_EXCEPTION:case en.INSUFFICIENT_FUNDS:case en.MISSING_NEW:case en.NONCE_EXPIRED:case en.REPLACEMENT_UNDERPRICED:case en.TRANSACTION_REPLACED:case en.UNPREDICTABLE_GAS_LIMIT:eo=U}eo&&(O+=" [ See: https://links.ethers.org/v5-errors-"+eo+" ]"),J.length&&(O+=" ("+J.join(", ")+")");let eu=Error(O);return eu.reason=es,eu.code=U,Object.keys($).forEach(function(O){eu[O]=$[O]}),eu}throwError(O,U,$){throw this.makeError(O,U,$)}throwArgumentError(O,U,$){return this.throwError(O,Logger.errors.INVALID_ARGUMENT,{argument:U,value:$})}assert(O,U,$,J){O||this.throwError(U,$,J)}assertArgument(O,U,$,J){O||this.throwArgumentError(U,$,J)}checkNormalize(O){null==O&&(O="platform missing String.prototype.normalize"),ev&&this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ev})}checkSafeUint53(O,U){"number"==typeof O&&(null==U&&(U="value not safe"),(O<0||O>=9007199254740991)&&this.throwError(U,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:O}),O%1&&this.throwError(U,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:O}))}checkArgumentCount(O,U,$){$=$?": "+$:"",OU&&this.throwError("too many arguments"+$,Logger.errors.UNEXPECTED_ARGUMENT,{count:O,expectedCount:U})}checkNew(O,U){(O===Object||null==O)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:U.name})}checkAbstract(O,U){O===U?this.throwError("cannot instantiate abstract class "+JSON.stringify(U.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:O.name,operation:"new"}):(O===Object||null==O)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:U.name})}static globalLogger(){return eg||(eg=new Logger(es)),eg}static setCensorship(O,U){if(!O&&U&&this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),eo){if(!O)return;this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ea=!!O,eo=!!U}static setLogLevel(O){let U=eu[O.toLowerCase()];if(null==U){Logger.globalLogger().warn("invalid log level - "+O);return}ef=U}static from(O){return new Logger(O)}};Logger.errors=en,Logger.levels=J},7213:function(O,U,$){"use strict";$.d(U,{dk:function(){return Description},uj:function(){return checkProperties},p$:function(){return deepCopy},zG:function(){return defineReadOnly},tu:function(){return getStatic},mE:function(){return resolveProperties},DC:function(){return shallowCopy}});var J=$(6288);let en="properties/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let es=new J.Yd(en);function defineReadOnly(O,U,$){Object.defineProperty(O,U,{enumerable:!0,value:$,writable:!1})}function getStatic(O,U){for(let $=0;$<32;$++){if(O[U])return O[U];if(!O.prototype||"object"!=typeof O.prototype)break;O=Object.getPrototypeOf(O.prototype).constructor}return null}function resolveProperties(O){return __awaiter(this,void 0,void 0,function*(){let U=Object.keys(O).map(U=>{let $=O[U];return Promise.resolve($).then(O=>({key:U,value:O}))}),$=yield Promise.all(U);return $.reduce((O,U)=>(O[U.key]=U.value,O),{})})}function checkProperties(O,U){O&&"object"==typeof O||es.throwArgumentError("invalid object","object",O),Object.keys(O).forEach($=>{U[$]||es.throwArgumentError("invalid object key - "+$,"transaction:"+$,O)})}function shallowCopy(O){let U={};for(let $ in O)U[$]=O[$];return U}let eo={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function _isFrozen(O){if(null==O||eo[typeof O])return!0;if(Array.isArray(O)||"object"==typeof O){if(!Object.isFrozen(O))return!1;let U=Object.keys(O);for(let $=0;$deepCopy(O)));if("object"==typeof O){let U={};for(let $ in O){let J=O[$];void 0!==J&&defineReadOnly(U,$,deepCopy(J))}return U}return es.throwArgumentError(`Cannot deepCopy ${typeof O}`,"object",O)}function deepCopy(O){return _deepCopy(O)}let Description=class Description{constructor(O){for(let U in O)this[U]=deepCopy(O[U])}}},379:function(O,U,$){"use strict";$.d(U,{Q:function(){return Web3Provider}});var J=$(7213),en=$(6288);let es="providers/5.7.2";var eo=$(4941),ea=$(2278),eu=$(7273),ef=$(8994),eg=$(4184);let ev="hash/5.7.0";var e_=$(6339),__awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let ew=new en.Yd(ev),eE=new Uint8Array(32);eE.fill(0);let eS=ea.O$.from(-1),eA=ea.O$.from(0),eI=ea.O$.from(1),eP=ea.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hexPadRight(O){let U=(0,eu.lE)(O),$=U.length%32;return $?(0,eu.xs)([U,eE.slice($)]):(0,eu.Dv)(U)}let ek=(0,eu.$m)(eI.toHexString(),32),eT=(0,eu.$m)(eA.toHexString(),32),eR={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},eC=["name","version","chainId","verifyingContract","salt"];function checkString(O){return function(U){return"string"!=typeof U&&ew.throwArgumentError(`invalid domain value for ${JSON.stringify(O)}`,`domain.${O}`,U),U}}let eB={name:checkString("name"),version:checkString("version"),chainId:function(O){try{return ea.O$.from(O).toString()}catch(O){}return ew.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",O)},verifyingContract:function(O){try{return(0,ef.Kn)(O).toLowerCase()}catch(O){}return ew.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",O)},salt:function(O){try{let U=(0,eu.lE)(O);if(32!==U.length)throw Error("bad length");return(0,eu.Dv)(U)}catch(O){}return ew.throwArgumentError('invalid domain value "salt"',"domain.salt",O)}};function getBaseEncoder(O){{let U=O.match(/^(u?)int(\d*)$/);if(U){let $=""===U[1],J=parseInt(U[2]||"256");(J%8!=0||J>256||U[2]&&U[2]!==String(J))&&ew.throwArgumentError("invalid numeric width","type",O);let en=eP.mask($?J-1:J),es=$?en.add(eI).mul(eS):eA;return function(U){let $=ea.O$.from(U);return($.lt(es)||$.gt(en))&&ew.throwArgumentError(`value out-of-bounds for ${O}`,"value",U),(0,eu.$m)($.toTwos(256).toHexString(),32)}}}{let U=O.match(/^bytes(\d+)$/);if(U){let $=parseInt(U[1]);return(0===$||$>32||U[1]!==String($))&&ew.throwArgumentError("invalid bytes width","type",O),function(U){let J=(0,eu.lE)(U);return J.length!==$&&ew.throwArgumentError(`invalid length for ${O}`,"value",U),hexPadRight(U)}}}switch(O){case"address":return function(O){return(0,eu.$m)((0,ef.Kn)(O),32)};case"bool":return function(O){return O?ek:eT};case"bytes":return function(O){return(0,eg.w)(O)};case"string":return function(O){return(0,e_.id)(O)}}return null}function encodeType(O,U){return`${O}(${U.map(({name:O,type:U})=>U+" "+O).join(",")})`}let TypedDataEncoder=class TypedDataEncoder{constructor(O){(0,J.zG)(this,"types",Object.freeze((0,J.p$)(O))),(0,J.zG)(this,"_encoderCache",{}),(0,J.zG)(this,"_types",{});let U={},$={},en={};for(let J in Object.keys(O).forEach(O=>{U[O]={},$[O]=[],en[O]={}}),O){let en={};O[J].forEach(es=>{en[es.name]&&ew.throwArgumentError(`duplicate variable name ${JSON.stringify(es.name)} in ${JSON.stringify(J)}`,"types",O),en[es.name]=!0;let eo=es.type.match(/^([^\x5b]*)(\x5b|$)/)[1];eo===J&&ew.throwArgumentError(`circular type reference to ${JSON.stringify(eo)}`,"types",O);let ea=getBaseEncoder(eo);ea||($[eo]||ew.throwArgumentError(`unknown type ${JSON.stringify(eo)}`,"types",O),$[eo].push(J),U[J][eo]=!0)})}let es=Object.keys($).filter(O=>0===$[O].length);function checkCircular(J,es){es[J]&&ew.throwArgumentError(`circular type reference to ${JSON.stringify(J)}`,"types",O),es[J]=!0,Object.keys(U[J]).forEach(O=>{$[O]&&(checkCircular(O,es),Object.keys(es).forEach(U=>{en[U][O]=!0}))}),delete es[J]}for(let U in 0===es.length?ew.throwArgumentError("missing primary type","types",O):es.length>1&&ew.throwArgumentError(`ambiguous primary types or unused types: ${es.map(O=>JSON.stringify(O)).join(", ")}`,"types",O),(0,J.zG)(this,"primaryType",es[0]),checkCircular(this.primaryType,{}),en){let $=Object.keys(en[U]);$.sort(),this._types[U]=encodeType(U,O[U])+$.map(U=>encodeType(U,O[U])).join("")}}getEncoder(O){let U=this._encoderCache[O];return U||(U=this._encoderCache[O]=this._getEncoder(O)),U}_getEncoder(O){{let U=getBaseEncoder(O);if(U)return U}let U=O.match(/^(.*)(\x5b(\d*)\x5d)$/);if(U){let O=U[1],$=this.getEncoder(O),J=parseInt(U[3]);return U=>{J>=0&&U.length!==J&&ew.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",U);let en=U.map($);return this._types[O]&&(en=en.map(eg.w)),(0,eg.w)((0,eu.xs)(en))}}let $=this.types[O];if($){let U=(0,e_.id)(this._types[O]);return O=>{let J=$.map(({name:U,type:$})=>{let J=this.getEncoder($)(O[U]);return this._types[$]?(0,eg.w)(J):J});return J.unshift(U),(0,eu.xs)(J)}}return ew.throwArgumentError(`unknown type: ${O}`,"type",O)}encodeType(O){let U=this._types[O];return U||ew.throwArgumentError(`unknown type: ${JSON.stringify(O)}`,"name",O),U}encodeData(O,U){return this.getEncoder(O)(U)}hashStruct(O,U){return(0,eg.w)(this.encodeData(O,U))}encode(O){return this.encodeData(this.primaryType,O)}hash(O){return this.hashStruct(this.primaryType,O)}_visit(O,U,$){{let J=getBaseEncoder(O);if(J)return $(O,U)}let J=O.match(/^(.*)(\x5b(\d*)\x5d)$/);if(J){let O=J[1],en=parseInt(J[3]);return en>=0&&U.length!==en&&ew.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",U),U.map(U=>this._visit(O,U,$))}let en=this.types[O];return en?en.reduce((O,{name:J,type:en})=>(O[J]=this._visit(en,U[J],$),O),{}):ew.throwArgumentError(`unknown type: ${O}`,"type",O)}visit(O,U){return this._visit(this.primaryType,O,U)}static from(O){return new TypedDataEncoder(O)}static getPrimaryType(O){return TypedDataEncoder.from(O).primaryType}static hashStruct(O,U,$){return TypedDataEncoder.from(U).hashStruct(O,$)}static hashDomain(O){let U=[];for(let $ in O){let J=eR[$];J||ew.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify($)}`,"domain",O),U.push({name:$,type:J})}return U.sort((O,U)=>eC.indexOf(O.name)-eC.indexOf(U.name)),TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:U},O)}static encode(O,U,$){return(0,eu.xs)(["0x1901",TypedDataEncoder.hashDomain(O),TypedDataEncoder.from(U).hash($)])}static hash(O,U,$){return(0,eg.w)(TypedDataEncoder.encode(O,U,$))}static resolveNames(O,U,$,en){return __awaiter(this,void 0,void 0,function*(){O=(0,J.DC)(O);let es={};O.verifyingContract&&!(0,eu.A7)(O.verifyingContract,20)&&(es[O.verifyingContract]="0x");let eo=TypedDataEncoder.from(U);for(let O in eo.visit($,(O,U)=>("address"!==O||(0,eu.A7)(U,20)||(es[U]="0x"),U)),es)es[O]=yield en(O);return O.verifyingContract&&es[O.verifyingContract]&&(O.verifyingContract=es[O.verifyingContract]),{domain:O,value:$=eo.visit($,(O,U)=>"address"===O&&es[U]?es[U]:U)}})}static getPayload(O,U,$){TypedDataEncoder.hashDomain(O);let en={},es=[];eC.forEach(U=>{let $=O[U];null!=$&&(en[U]=eB[U]($),es.push({name:U,type:eR[U]}))});let eo=TypedDataEncoder.from(U),ef=(0,J.DC)(U);return ef.EIP712Domain?ew.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",U):ef.EIP712Domain=es,eo.encode($),{types:ef,domain:en,primaryType:eo.primaryType,message:eo.visit($,(O,U)=>{if(O.match(/^bytes(\d*)/))return(0,eu.Dv)((0,eu.lE)(U));if(O.match(/^u?int/))return ea.O$.from(U).toString();switch(O){case"address":return U.toLowerCase();case"bool":return!!U;case"string":return"string"!=typeof U&&ew.throwArgumentError("invalid string","value",U),U}return ew.throwArgumentError("unsupported type","type",O)})}}};var eN=$(8337),eD=$(2501);function decode(O){O=atob(O);let U=[];for(let $=0;${es[U.toLowerCase()]=O}):J.headers.keys().forEach(O=>{es[O.toLowerCase()]=J.headers.get(O)}),{headers:es,statusCode:J.status,statusMessage:J.statusText,body:(0,eu.lE)(new Uint8Array(en))}})}var lib_esm_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let eO=new en.Yd(eM);function staller(O){return new Promise(U=>{setTimeout(U,O)})}function bodyify(O,U){if(null==O)return null;if("string"==typeof O)return O;if((0,eu.Zq)(O)){if(U&&("text"===U.split("/")[0]||"application/json"===U.split(";")[0].trim()))try{return(0,eN.ZN)(O)}catch(O){}return(0,eu.Dv)(O)}return O}function unpercent(O){return(0,eN.Y0)(O.replace(/%([0-9a-f][0-9a-f])/gi,(O,U)=>String.fromCharCode(parseInt(U,16))))}function _fetchData(O,U,$){let es="object"==typeof O&&null!=O.throttleLimit?O.throttleLimit:12;eO.assertArgument(es>0&&es%1==0,"invalid connection throttle limit","connection.throttleLimit",es);let eo="object"==typeof O?O.throttleCallback:null,ea="object"==typeof O&&"number"==typeof O.throttleSlotInterval?O.throttleSlotInterval:100;eO.assertArgument(ea>0&&ea%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",ea);let eu="object"==typeof O&&!!O.errorPassThrough,ef={},eg=null,ev={method:"GET"},e_=!1,ew=12e4;if("string"==typeof O)eg=O;else if("object"==typeof O){if((null==O||null==O.url)&&eO.throwArgumentError("missing URL","connection.url",O),eg=O.url,"number"==typeof O.timeout&&O.timeout>0&&(ew=O.timeout),O.headers)for(let U in O.headers)ef[U.toLowerCase()]={key:U,value:String(O.headers[U])},["if-none-match","if-modified-since"].indexOf(U.toLowerCase())>=0&&(e_=!0);if(ev.allowGzip=!!O.allowGzip,null!=O.user&&null!=O.password){"https:"!==eg.substring(0,6)&&!0!==O.allowInsecureAuthentication&&eO.throwError("basic authentication requires a secure https url",en.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:eg,user:O.user,password:"[REDACTED]"});let U=O.user+":"+O.password;ef.authorization={key:"Authorization",value:"Basic "+encode((0,eN.Y0)(U))}}null!=O.skipFetchSetup&&(ev.skipFetchSetup=!!O.skipFetchSetup),null!=O.fetchOptions&&(ev.fetchOptions=(0,J.DC)(O.fetchOptions))}let eE=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),eS=eg?eg.match(eE):null;if(eS)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":eS[1]||"text/plain"},body:eS[2]?decode(eS[3]):unpercent(eS[3])},U=O.body;return $&&(U=$(O.body,O)),Promise.resolve(U)}catch(O){eO.throwError("processing response error",en.Yd.errors.SERVER_ERROR,{body:bodyify(eS[1],eS[2]),error:O,requestBody:null,requestMethod:"GET",url:eg})}U&&(ev.method="POST",ev.body=U,null==ef["content-type"]&&(ef["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==ef["content-length"]&&(ef["content-length"]={key:"Content-Length",value:String(U.length)}));let eA={};Object.keys(ef).forEach(O=>{let U=ef[O];eA[U.key]=U.value}),ev.headers=eA;let eI=function(){let O=null,U=new Promise(function(U,$){ew&&(O=setTimeout(()=>{null!=O&&(O=null,$(eO.makeError("timeout",en.Yd.errors.TIMEOUT,{requestBody:bodyify(ev.body,eA["content-type"]),requestMethod:ev.method,timeout:ew,url:eg})))},ew))}),cancel=function(){null!=O&&(clearTimeout(O),O=null)};return{promise:U,cancel}}(),eP=function(){return lib_esm_awaiter(this,void 0,void 0,function*(){for(let O=0;O=300)&&(eI.cancel(),eO.throwError("bad response",en.Yd.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:bodyify(J,U.headers?U.headers["content-type"]:null),requestBody:bodyify(ev.body,eA["content-type"]),requestMethod:ev.method,url:eg})),$)try{let O=yield $(J,U);return eI.cancel(),O}catch($){if($.throttleRetry&&O{let J=null;if(null!=O)try{J=JSON.parse((0,eN.ZN)(O))}catch(U){eO.throwError("invalid JSON",en.Yd.errors.SERVER_ERROR,{body:O,error:U})}return $&&(J=$(J,U)),J},es=null;if(null!=U){es=(0,eN.Y0)(U);let $="string"==typeof O?{url:O}:(0,J.DC)(O);if($.headers){let O=0!==Object.keys($.headers).filter(O=>"content-type"===O.toLowerCase()).length;O||($.headers=(0,J.DC)($.headers),$.headers["content-type"]="application/json")}else $.headers={"content-type":"application/json"};O=$}return _fetchData(O,es,processJsonFunc)}function poll(O,U){return U||(U={}),null==(U=(0,J.DC)(U)).floor&&(U.floor=0),null==U.ceiling&&(U.ceiling=1e4),null==U.interval&&(U.interval=250),new Promise(function($,J){let en=null,es=!1,cancel=()=>!es&&(es=!0,en&&clearTimeout(en),!0);U.timeout&&(en=setTimeout(()=>{cancel()&&J(Error("timeout"))},U.timeout));let eo=U.retryLimit,ea=0;function check(){return O().then(function(O){if(void 0!==O)cancel()&&$(O);else if(U.oncePoll)U.oncePoll.once("poll",check);else if(U.onceBlock)U.onceBlock.once("block",check);else if(!es){if(++ea>eo){cancel()&&J(Error("retry limit reached"));return}let O=U.interval*parseInt(String(Math.random()*Math.pow(2,ea)));OU.ceiling&&(O=U.ceiling),setTimeout(check,O)}return null},function(O){cancel()&&J(O)})}check()})}var eL=$(4999);let BaseX=class BaseX{constructor(O){(0,J.zG)(this,"alphabet",O),(0,J.zG)(this,"base",O.length),(0,J.zG)(this,"_alphabetMap",{}),(0,J.zG)(this,"_leader",O.charAt(0));for(let U=0;U0;)$.push(J%this.base),J=J/this.base|0}let J="";for(let O=0;0===U[O]&&O=0;--O)J+=this.alphabet[$[O]];return J}decode(O){if("string"!=typeof O)throw TypeError("Expected String");let U=[];if(0===O.length)return new Uint8Array(U);U.push(0);for(let $=0;$>=8;for(;en>0;)U.push(255&en),en>>=8}for(let $=0;O[$]===this._leader&&$0&&Array.isArray(O)?flatDeep(O,U-1):$.push(O)})};return flatDeep(O,U),$}function fromEntries(O){let U={};for(let $=0;$>--ea&1}let ef=31,eg=Math.pow(2,ef),ev=eg>>>1,e_=ev>>1,ew=eg-1,eE=0;for(let O=0;O1;){let $=U+es>>>1;O>>1|read_bit(),eo=eo<<1^ev,ea=(ea^ev)<<1|ev|1;eA=eo,eI=1+ea-eo}let eP=$-4;return eS.map(U=>{switch(U-eP){case 3:return eP+65792+(O[eo++]<<16|O[eo++]<<8|O[eo++]);case 2:return eP+256+(O[eo++]<<8|O[eo++]);case 1:return eP+O[eo++];default:return U-1}})}function read_payload(O){let U=0;return()=>O[U++]}function read_compressed_payload(O){return read_payload(decode_arithmetic(O))}function signed(O){return 1&O?~O>>1:O>>1}function read_counts(O,U){let $=Array(O);for(let J=0;JU[O]):$}function read_mapped_map(O){let U=[];for(;;){let $=O();if(0==$)break;U.push(read_linear_table($,O))}for(;;){let $=O()-1;if($<0)break;U.push(read_replacement_table($,O))}return fromEntries(flat(U))}function read_zero_terminated_array(O){let U=[];for(;;){let $=O();if(0==$)break;U.push($)}return U}function read_transposed(O,U,$){let J=Array(O).fill(void 0).map(()=>[]);for(let en=0;enJ[U].push(O));return J}function read_linear_table(O,U){let $=1+U(),J=U(),en=read_zero_terminated_array(U);return flat(read_transposed(en.length,1+O,U).map((O,U)=>{let es=O[0],eo=O.slice(1);return Array(en[U]).fill(void 0).map((O,U)=>{let en=U*J;return[es+U*$,eo.map(O=>O+en)]})}))}function read_replacement_table(O,U){return read_transposed(1+U(),1+O,U).map(O=>[O[0],O.slice(1)])}function read_emoji_trie(O){let U=read_member_array(O).sort((O,U)=>O-U);return read();function read(){let $=[];for(;;){let J=read_member_array(O,U);if(0==J.length)break;$.push({set:new Set(J),node:read()})}$.sort((O,U)=>U.set.size-O.set.size);let J=O();return{branches:$,valid:J%3,fe0f:!!(1&(J=J/3|0)),save:1==(J>>=1),check:2==J}}}function getData(){return read_compressed_payload(decode("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}let eK=getData(),ej=new Set(read_member_array(eK)),eH=new Set(read_member_array(eK)),eq=read_mapped_map(eK),eV=read_emoji_trie(eK),eG=45,e$=95;function explode_cp(O){return(0,eN.XL)(O)}function filter_fe0f(O){return O.filter(O=>65039!=O)}function ens_normalize_post_check(O){for(let U of O.split(".")){let O=explode_cp(U);try{for(let U=O.lastIndexOf(e$)-1;U>=0;U--)if(O[U]!==e$)throw Error("underscore only allowed at start");if(O.length>=4&&O.every(O=>O<128)&&O[2]===eG&&O[3]===eG)throw Error("invalid label extension")}catch(O){throw Error(`Invalid label "${U}": ${O.message}`)}}return O}function ens_normalize(O){return ens_normalize_post_check(normalize(O,filter_fe0f))}function normalize(O,U){let $=explode_cp(O).reverse(),J=[];for(;$.length;){let O=consume_emoji_reversed($);if(O){J.push(...U(O));continue}let en=$.pop();if(ej.has(en)){J.push(en);continue}if(eH.has(en))continue;let es=eq[en];if(es){J.push(...es);continue}throw Error(`Disallowed codepoint: 0x${en.toString(16).toUpperCase()}`)}return ens_normalize_post_check(nfc(String.fromCodePoint(...J)))}function nfc(O){return O.normalize("NFC")}function consume_emoji_reversed(O,U){var $;let J,en;let es=eV,eo=[],ea=O.length;for(U&&(U.length=0);ea;){let eu=O[--ea];if(!(es=null===($=es.branches.find(O=>O.set.has(eu)))||void 0===$?void 0:$.node))break;if(es.save)en=eu;else if(es.check&&eu===en)break;eo.push(eu),es.fe0f&&(eo.push(65039),ea>0&&65039==O[ea-1]&&ea--),es.valid&&(J=eo.slice(),2==es.valid&&J.splice(1,1),U&&U.push(...O.slice(ea).reverse()),O.length=ea)}return J}let eW=new en.Yd(ev),eY=new Uint8Array(32);function checkComponent(O){if(0===O.length)throw Error("invalid ENS name; empty component");return O}function ensNameSplit(O){let U=(0,eN.Y0)(ens_normalize(O)),$=[];if(0===O.length)return $;let J=0;for(let O=0;O=U.length)throw Error("invalid ENS name; empty component");return $.push(checkComponent(U.slice(J))),$}function namehash(O){"string"!=typeof O&&eW.throwArgumentError("invalid ENS name; not a string","name",O);let U=eY,$=ensNameSplit(O);for(;$.length;)U=(0,eg.w)((0,eu.zo)([U,(0,eg.w)($.pop())]));return(0,eu.Dv)(U)}function dnsEncode(O){return(0,eu.Dv)((0,eu.zo)(ensNameSplit(O).map(O=>{if(O.length>63)throw Error("invalid DNS encoded entry; length exceeds 63 bytes");let U=new Uint8Array(O.length+1);return U.set(O,1),U[0]=U.length-1,U})))+"00"}eY.fill(0);let eJ="networks/5.7.1",eQ=new en.Yd(eJ);function isRenetworkable(O){return O&&"function"==typeof O.renetwork}function ethDefaultProvider(O){let func=function(U,$){null==$&&($={});let J=[];if(U.InfuraProvider&&"-"!==$.infura)try{J.push(new U.InfuraProvider(O,$.infura))}catch(O){}if(U.EtherscanProvider&&"-"!==$.etherscan)try{J.push(new U.EtherscanProvider(O,$.etherscan))}catch(O){}if(U.AlchemyProvider&&"-"!==$.alchemy)try{J.push(new U.AlchemyProvider(O,$.alchemy))}catch(O){}if(U.PocketProvider&&"-"!==$.pocket){let en=["goerli","ropsten","rinkeby","sepolia"];try{let es=new U.PocketProvider(O,$.pocket);es.network&&-1===en.indexOf(es.network.name)&&J.push(es)}catch(O){}}if(U.CloudflareProvider&&"-"!==$.cloudflare)try{J.push(new U.CloudflareProvider(O))}catch(O){}if(U.AnkrProvider&&"-"!==$.ankr)try{let en=["ropsten"],es=new U.AnkrProvider(O,$.ankr);es.network&&-1===en.indexOf(es.network.name)&&J.push(es)}catch(O){}if(0===J.length)return null;if(U.FallbackProvider){let en=1;return null!=$.quorum?en=$.quorum:"homestead"===O&&(en=2),new U.FallbackProvider(J,en)}return J[0]};return func.renetwork=function(O){return ethDefaultProvider(O)},func}function etcDefaultProvider(O,U){let func=function($,J){return $.JsonRpcProvider?new $.JsonRpcProvider(O,U):null};return func.renetwork=function(U){return etcDefaultProvider(O,U)},func}let eZ={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ethDefaultProvider("homestead")},eX={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ethDefaultProvider("ropsten")},e0={chainId:63,name:"classicMordor",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/mordor","classicMordor")},e1={unspecified:{chainId:0,name:"unspecified"},homestead:eZ,mainnet:eZ,morden:{chainId:2,name:"morden"},ropsten:eX,testnet:eX,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ethDefaultProvider("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ethDefaultProvider("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ethDefaultProvider("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ethDefaultProvider("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:e0,classicTestnet:e0,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ethDefaultProvider("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ethDefaultProvider("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function getNetwork(O){if(null==O)return null;if("number"==typeof O){for(let U in e1){let $=e1[U];if($.chainId===O)return{name:$.name,chainId:$.chainId,ensAddress:$.ensAddress||null,_defaultProvider:$._defaultProvider||null}}return{chainId:O,name:"unknown"}}if("string"==typeof O){let U=e1[O];return null==U?null:{name:U.name,chainId:U.chainId,ensAddress:U.ensAddress,_defaultProvider:U._defaultProvider||null}}let U=e1[O.name];if(!U)return"number"!=typeof O.chainId&&eQ.throwArgumentError("invalid network chainId","network",O),O;0!==O.chainId&&O.chainId!==U.chainId&&eQ.throwArgumentError("network chainId mismatch","network",O);let $=O._defaultProvider||null;return null==$&&U._defaultProvider&&($=isRenetworkable(U._defaultProvider)?U._defaultProvider.renetwork(O):U._defaultProvider),{name:O.name,chainId:U.chainId,ensAddress:O.ensAddress||U.ensAddress||null,_defaultProvider:$}}var e3=$(5336),e6=$.n(e3);let e5="sha2/5.7.0";function sha256(O){return"0x"+e6().sha256().update((0,eu.lE)(O)).digest("hex")}new en.Yd(e5);var e9=$(6942),e7=$.n(e9),te=$(5572);let tt=new en.Yd(es);let Formatter=class Formatter{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let O={},U=this.address.bind(this),$=this.bigNumber.bind(this),en=this.blockTag.bind(this),es=this.data.bind(this),eo=this.hash.bind(this),ea=this.hex.bind(this),eu=this.number.bind(this),ef=this.type.bind(this),strictData=O=>this.data(O,!0);return O.transaction={hash:eo,type:ef,accessList:Formatter.allowNull(this.accessList.bind(this),null),blockHash:Formatter.allowNull(eo,null),blockNumber:Formatter.allowNull(eu,null),transactionIndex:Formatter.allowNull(eu,null),confirmations:Formatter.allowNull(eu,null),from:U,gasPrice:Formatter.allowNull($),maxPriorityFeePerGas:Formatter.allowNull($),maxFeePerGas:Formatter.allowNull($),gasLimit:$,to:Formatter.allowNull(U,null),value:$,nonce:eu,data:es,r:Formatter.allowNull(this.uint256),s:Formatter.allowNull(this.uint256),v:Formatter.allowNull(eu),creates:Formatter.allowNull(U,null),raw:Formatter.allowNull(es)},O.transactionRequest={from:Formatter.allowNull(U),nonce:Formatter.allowNull(eu),gasLimit:Formatter.allowNull($),gasPrice:Formatter.allowNull($),maxPriorityFeePerGas:Formatter.allowNull($),maxFeePerGas:Formatter.allowNull($),to:Formatter.allowNull(U),value:Formatter.allowNull($),data:Formatter.allowNull(strictData),type:Formatter.allowNull(eu),accessList:Formatter.allowNull(this.accessList.bind(this),null)},O.receiptLog={transactionIndex:eu,blockNumber:eu,transactionHash:eo,address:U,topics:Formatter.arrayOf(eo),data:es,logIndex:eu,blockHash:eo},O.receipt={to:Formatter.allowNull(this.address,null),from:Formatter.allowNull(this.address,null),contractAddress:Formatter.allowNull(U,null),transactionIndex:eu,root:Formatter.allowNull(ea),gasUsed:$,logsBloom:Formatter.allowNull(es),blockHash:eo,transactionHash:eo,logs:Formatter.arrayOf(this.receiptLog.bind(this)),blockNumber:eu,confirmations:Formatter.allowNull(eu,null),cumulativeGasUsed:$,effectiveGasPrice:Formatter.allowNull($),status:Formatter.allowNull(eu),type:ef},O.block={hash:Formatter.allowNull(eo),parentHash:eo,number:eu,timestamp:eu,nonce:Formatter.allowNull(ea),difficulty:this.difficulty.bind(this),gasLimit:$,gasUsed:$,miner:Formatter.allowNull(U),extraData:es,transactions:Formatter.allowNull(Formatter.arrayOf(eo)),baseFeePerGas:Formatter.allowNull($)},O.blockWithTransactions=(0,J.DC)(O.block),O.blockWithTransactions.transactions=Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))),O.filter={fromBlock:Formatter.allowNull(en,void 0),toBlock:Formatter.allowNull(en,void 0),blockHash:Formatter.allowNull(eo,void 0),address:Formatter.allowNull(U,void 0),topics:Formatter.allowNull(this.topics.bind(this),void 0)},O.filterLog={blockNumber:Formatter.allowNull(eu),blockHash:Formatter.allowNull(eo),transactionIndex:eu,removed:Formatter.allowNull(this.boolean.bind(this)),address:U,data:Formatter.allowFalsish(es,"0x"),topics:Formatter.arrayOf(eo),transactionHash:eo,logIndex:eu},O}accessList(O){return(0,eD.z7)(O||[])}number(O){return"0x"===O?0:ea.O$.from(O).toNumber()}type(O){return"0x"===O||null==O?0:ea.O$.from(O).toNumber()}bigNumber(O){return ea.O$.from(O)}boolean(O){if("boolean"==typeof O)return O;if("string"==typeof O){if("true"===(O=O.toLowerCase()))return!0;if("false"===O)return!1}throw Error("invalid boolean - "+O)}hex(O,U){return"string"==typeof O&&(U||"0x"===O.substring(0,2)||(O="0x"+O),(0,eu.A7)(O))?O.toLowerCase():tt.throwArgumentError("invalid hash","value",O)}data(O,U){let $=this.hex(O,U);if($.length%2!=0)throw Error("invalid data; odd-length - "+O);return $}address(O){return(0,ef.Kn)(O)}callAddress(O){if(!(0,eu.A7)(O,32))return null;let U=(0,ef.Kn)((0,eu.p3)(O,12));return U===te.d?null:U}contractAddress(O){return(0,ef.CR)(O)}blockTag(O){if(null==O)return"latest";if("earliest"===O)return"0x0";switch(O){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return O}if("number"==typeof O||(0,eu.A7)(O))return(0,eu.$P)(O);throw Error("invalid blockTag")}hash(O,U){let $=this.hex(O,U);return 32!==(0,eu.E1)($)?tt.throwArgumentError("invalid hash","value",O):$}difficulty(O){if(null==O)return null;let U=ea.O$.from(O);try{return U.toNumber()}catch(O){}return null}uint256(O){if(!(0,eu.A7)(O))throw Error("invalid uint256");return(0,eu.$m)(O,32)}_block(O,U){null!=O.author&&null==O.miner&&(O.miner=O.author);let $=null!=O._difficulty?O._difficulty:O.difficulty,J=Formatter.check(U,O);return J._difficulty=null==$?null:ea.O$.from($),J}block(O){return this._block(O,this.formats.block)}blockWithTransactions(O){return this._block(O,this.formats.blockWithTransactions)}transactionRequest(O){return Formatter.check(this.formats.transactionRequest,O)}transactionResponse(O){null!=O.gas&&null==O.gasLimit&&(O.gasLimit=O.gas),O.to&&ea.O$.from(O.to).isZero()&&(O.to="0x0000000000000000000000000000000000000000"),null!=O.input&&null==O.data&&(O.data=O.input),null==O.to&&null==O.creates&&(O.creates=this.contractAddress(O)),(1===O.type||2===O.type)&&null==O.accessList&&(O.accessList=[]);let U=Formatter.check(this.formats.transaction,O);if(null!=O.chainId){let $=O.chainId;(0,eu.A7)($)&&($=ea.O$.from($).toNumber()),U.chainId=$}else{let $=O.networkId;null==$&&null==U.v&&($=O.chainId),(0,eu.A7)($)&&($=ea.O$.from($).toNumber()),"number"!=typeof $&&null!=U.v&&(($=(U.v-35)/2)<0&&($=0),$=parseInt($)),"number"!=typeof $&&($=0),U.chainId=$}return U.blockHash&&"x"===U.blockHash.replace(/0/g,"")&&(U.blockHash=null),U}transaction(O){return(0,eD.Qc)(O)}receiptLog(O){return Formatter.check(this.formats.receiptLog,O)}receipt(O){let U=Formatter.check(this.formats.receipt,O);if(null!=U.root){if(U.root.length<=4){let O=ea.O$.from(U.root).toNumber();0===O||1===O?(null!=U.status&&U.status!==O&&tt.throwArgumentError("alt-root-status/status mismatch","value",{root:U.root,status:U.status}),U.status=O,delete U.root):tt.throwArgumentError("invalid alt-root-status","value.root",U.root)}else 66!==U.root.length&&tt.throwArgumentError("invalid root hash","value.root",U.root)}return null!=U.status&&(U.byzantium=!0),U}topics(O){return Array.isArray(O)?O.map(O=>this.topics(O)):null!=O?this.hash(O,!0):null}filter(O){return Formatter.check(this.formats.filter,O)}filterLog(O){return Formatter.check(this.formats.filterLog,O)}static check(O,U){let $={};for(let J in O)try{let en=O[J](U[J]);void 0!==en&&($[J]=en)}catch(O){throw O.checkKey=J,O.checkValue=U[J],O}return $}static allowNull(O,U){return function($){return null==$?U:O($)}}static allowFalsish(O,U){return function($){return $?O($):U}}static arrayOf(O){return function(U){if(!Array.isArray(U))throw Error("not an array");let $=[];return U.forEach(function(U){$.push(O(U))}),$}}};var base_provider_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tr=new en.Yd(es),ta=10;function checkTopic(O){return null==O?"null":(32!==(0,eu.E1)(O)&&tr.throwArgumentError("invalid topic","topic",O),O.toLowerCase())}function serializeTopics(O){for(O=O.slice();O.length>0&&null==O[O.length-1];)O.pop();return O.map(O=>{if(!Array.isArray(O))return checkTopic(O);{let U={};O.forEach(O=>{U[checkTopic(O)]=!0});let $=Object.keys(U);return $.sort(),$.join("|")}}).join("&")}function deserializeTopics(O){return""===O?[]:O.split(/&/g).map(O=>{if(""===O)return[];let U=O.split("|").map(O=>"null"===O?null:O);return 1===U.length?U[0]:U})}function getEventTag(O){if("string"==typeof O){if(O=O.toLowerCase(),32===(0,eu.E1)(O))return"tx:"+O;if(-1===O.indexOf(":"))return O}else if(Array.isArray(O))return"filter:*:"+serializeTopics(O);else if(eL.Sg.isForkEvent(O))throw tr.warn("not implemented"),Error("not implemented");else if(O&&"object"==typeof O)return"filter:"+(O.address||"*")+":"+serializeTopics(O.topics||[]);throw Error("invalid event - "+O)}function getTime(){return new Date().getTime()}function stall(O){return new Promise(U=>{setTimeout(U,O)})}let tu=["block","network","pending","poll"];let Event=class Event{constructor(O,U,$){(0,J.zG)(this,"tag",O),(0,J.zG)(this,"listener",U),(0,J.zG)(this,"once",$),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let O=this.tag.split(":");return"tx"!==O[0]?null:O[1]}get filter(){let O=this.tag.split(":");if("filter"!==O[0])return null;let U=O[1],$=deserializeTopics(O[2]),J={};return $.length>0&&(J.topics=$),U&&"*"!==U&&(J.address=U),J}pollable(){return this.tag.indexOf(":")>=0||tu.indexOf(this.tag)>=0}};let th={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bytes32ify(O){return(0,eu.$m)(ea.O$.from(O).toHexString(),32)}function base58Encode(O){return eU.encode((0,eu.zo)([O,(0,eu.p3)(sha256(sha256(O)),0,4)]))}let td=RegExp("^(ipfs)://(.*)$","i"),tf=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),td,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(O,U){try{return(0,eN.ZN)(_parseBytes(O,U))}catch(O){}return null}function _parseBytes(O,U){if("0x"===O)return null;let $=ea.O$.from((0,eu.p3)(O,U,U+32)).toNumber(),J=ea.O$.from((0,eu.p3)(O,$,$+32)).toNumber();return(0,eu.p3)(O,$+32,$+32+J)}function getIpfsLink(O){return O.match(/^ipfs:\/\/ipfs\//i)?O=O.substring(12):O.match(/^ipfs:\/\//i)?O=O.substring(7):tr.throwArgumentError("unsupported IPFS format","link",O),`https://gateway.ipfs.io/ipfs/${O}`}function numPad(O){let U=(0,eu.lE)(O);if(U.length>32)throw Error("internal; should not happen");let $=new Uint8Array(32);return $.set(U,32-U.length),$}function bytesPad(O){if(O.length%32==0)return O;let U=new Uint8Array(32*Math.ceil(O.length/32));return U.set(O),U}function encodeBytes(O){let U=[],$=0;for(let J=0;Jea.O$.from(O).eq(1)).catch(O=>{if(O.code===en.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,O})),this._supportsEip2544}_fetch(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){let $={to:this.address,ccipReadEnabled:!0,data:(0,eu.xs)([O,namehash(this.name),U||"0x"])},J=!1;(yield this.supportsWildcard())&&(J=!0,$.data=(0,eu.xs)(["0x9061b923",encodeBytes([dnsEncode(this.name),$.data])]));try{let O=yield this.provider.call($);return(0,eu.lE)(O).length%32==4&&tr.throwError("resolver threw error",en.Yd.errors.CALL_EXCEPTION,{transaction:$,data:O}),J&&(O=_parseBytes(O,0)),O}catch(O){if(O.code===en.Yd.errors.CALL_EXCEPTION)return null;throw O}})}_fetchBytes(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this._fetch(O,U);return null!=$?_parseBytes($,0):null})}_getAddress(O,U){let $=th[String(O)];if(null==$&&tr.throwError(`unsupported coin type: ${O}`,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${O})`}),"eth"===$.ilk)return this.provider.formatter.address(U);let J=(0,eu.lE)(U);if(null!=$.p2pkh){let O=U.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(O){let U=parseInt(O[1],16);if(O[2].length===2*U&&U>=1&&U<=75)return base58Encode((0,eu.zo)([[$.p2pkh],"0x"+O[2]]))}}if(null!=$.p2sh){let O=U.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(O){let U=parseInt(O[1],16);if(O[2].length===2*U&&U>=1&&U<=75)return base58Encode((0,eu.zo)([[$.p2sh],"0x"+O[2]]))}}if(null!=$.prefix){let O=J[1],U=J[0];if(0===U?20!==O&&32!==O&&(U=-1):U=-1,U>=0&&J.length===2+O&&O>=1&&O<=75){let O=e7().toWords(J.slice(2));return O.unshift(U),e7().encode($.prefix,O)}}return null}getAddress(O){return base_provider_awaiter(this,void 0,void 0,function*(){if(null==O&&(O=60),60===O)try{let O=yield this._fetch("0x3b3b57de");if("0x"===O||O===eF)return null;return this.provider.formatter.callAddress(O)}catch(O){if(O.code===en.Yd.errors.CALL_EXCEPTION)return null;throw O}let U=yield this._fetchBytes("0xf1cb7e06",bytes32ify(O));if(null==U||"0x"===U)return null;let $=this._getAddress(O,U);return null==$&&tr.throwError("invalid or unsupported coin data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${O})`,coinType:O,data:U}),$})}getAvatar(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=[{type:"name",content:this.name}];try{let U=yield this.getText("avatar");if(null==U)return null;for(let $=0;$O[U]);return"sia://"+U}return tr.throwError("invalid or unsupported content hash data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:O})})}getText(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=(0,eN.Y0)(O);(U=(0,eu.zo)([bytes32ify(64),bytes32ify(U.length),U])).length%32!=0&&(U=(0,eu.zo)([U,(0,eu.$m)("0x",32-O.length%32)]));let $=yield this._fetchBytes("0x59d1d43c",(0,eu.Dv)(U));return null==$||"0x"===$?null:(0,eN.ZN)($)})}};let tp=null,tg=1;let BaseProvider=class BaseProvider extends eL.zt{constructor(O){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,J.zG)(this,"anyNetwork","any"===O),this.anyNetwork&&(O=this.detectNetwork()),O instanceof Promise)this._networkPromise=O,O.catch(O=>{}),this._ready().catch(O=>{});else{let U=(0,J.tu)(new.target,"getNetwork")(O);U?((0,J.zG)(this,"_network",U),this.emit("network",U,null)):tr.throwArgumentError("invalid network","network",O)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return base_provider_awaiter(this,void 0,void 0,function*(){if(null==this._network){let O=null;if(this._networkPromise)try{O=yield this._networkPromise}catch(O){}null==O&&(O=yield this.detectNetwork()),O||tr.throwError("no network detected",en.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=O:(0,J.zG)(this,"_network",O),this.emit("network",O,null))}return this._network})}get ready(){return poll(()=>this._ready().then(O=>O,O=>{if(O.code!==en.Yd.errors.NETWORK_ERROR||"noNetwork"!==O.event)throw O}))}static getFormatter(){return null==tp&&(tp=new Formatter),tp}static getNetwork(O){return getNetwork(null==O?"homestead":O)}ccipReadFetch(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){if(this.disableCcipRead||0===$.length)return null;let J=O.to.toLowerCase(),es=U.toLowerCase(),eo=[];for(let O=0;O<$.length;O++){let U=$[O],ea=U.replace("{sender}",J).replace("{data}",es),eu=U.indexOf("{data}")>=0?null:JSON.stringify({data:es,sender:J}),ef=yield fetchJson({url:ea,errorPassThrough:!0},eu,(O,U)=>(O.status=U.statusCode,O));if(ef.data)return ef.data;let eg=ef.message||"unknown error";if(ef.status>=400&&ef.status<500)return tr.throwError(`response not found during CCIP fetch: ${eg}`,en.Yd.errors.SERVER_ERROR,{url:U,errorMessage:eg});eo.push(eg)}return tr.throwError(`error encountered during CCIP fetch: ${eo.map(O=>JSON.stringify(O)).join(", ")}`,en.Yd.errors.SERVER_ERROR,{urls:$,errorMessages:eo})})}_getInternalBlockNumber(O){return base_provider_awaiter(this,void 0,void 0,function*(){if(yield this._ready(),O>0)for(;this._internalBlockNumber;){let U=this._internalBlockNumber;try{let $=yield U;if(getTime()-$.respTime<=O)return $.blockNumber;break}catch(O){if(this._internalBlockNumber===U)break}}let U=getTime(),$=(0,J.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(O=>null,O=>O)}).then(({blockNumber:O,networkError:J})=>{if(J)throw this._internalBlockNumber===$&&(this._internalBlockNumber=null),J;let en=getTime();return(O=ea.O$.from(O).toNumber()){this._internalBlockNumber===$&&(this._internalBlockNumber=null)}),(yield $).blockNumber})}poll(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=tg++,U=[],$=null;try{$=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(O){this.emit("error",O);return}if(this._setFastBlockNumber($),this.emit("poll",O,$),$===this._lastBlockNumber){this.emit("didPoll",O);return}if(-2===this._emitted.block&&(this._emitted.block=$-1),Math.abs(this._emitted.block-$)>1e3)tr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${$})`),this.emit("error",tr.makeError("network block skew detected",en.Yd.errors.NETWORK_ERROR,{blockNumber:$,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",$);else for(let O=this._emitted.block+1;O<=$;O++)this.emit("block",O);this._emitted.block!==$&&(this._emitted.block=$,Object.keys(this._emitted).forEach(O=>{if("block"===O)return;let U=this._emitted[O];"pending"!==U&&$-U>12&&delete this._emitted[O]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=$-1),this._events.forEach(O=>{switch(O.type){case"tx":{let $=O.hash,J=this.getTransactionReceipt($).then(O=>(O&&null!=O.blockNumber&&(this._emitted["t:"+$]=O.blockNumber,this.emit($,O)),null)).catch(O=>{this.emit("error",O)});U.push(J);break}case"filter":if(!O._inflight){O._inflight=!0,-2===O._lastBlockNumber&&(O._lastBlockNumber=$-1);let J=O.filter;J.fromBlock=O._lastBlockNumber+1,J.toBlock=$;let en=J.toBlock-this._maxFilterBlockRange;en>J.fromBlock&&(J.fromBlock=en),J.fromBlock<0&&(J.fromBlock=0);let es=this.getLogs(J).then(U=>{O._inflight=!1,0!==U.length&&U.forEach(U=>{U.blockNumber>O._lastBlockNumber&&(O._lastBlockNumber=U.blockNumber),this._emitted["b:"+U.blockHash]=U.blockNumber,this._emitted["t:"+U.transactionHash]=U.blockNumber,this.emit(J,U)})}).catch(U=>{this.emit("error",U),O._inflight=!1});U.push(es)}}}),this._lastBlockNumber=$,Promise.all(U).then(()=>{this.emit("didPoll",O)}).catch(O=>{this.emit("error",O)})})}resetEventsBlock(O){this._lastBlockNumber=O-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return base_provider_awaiter(this,void 0,void 0,function*(){return tr.throwError("provider does not support network detection",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=yield this._ready(),U=yield this.detectNetwork();if(O.chainId!==U.chainId){if(this.anyNetwork)return this._network=U,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",U,O),yield stall(0),this._network;let $=tr.makeError("underlying network changed",en.Yd.errors.NETWORK_ERROR,{event:"changed",network:O,detectedNetwork:U});throw this.emit("error",$),$}return O})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(O=>{this._setFastBlockNumber(O)},O=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(O){O&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!O&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(O){if("number"!=typeof O||O<=0||parseInt(String(O))!=O)throw Error("invalid polling interval");this._pollingInterval=O,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let O=getTime();return O-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=O,this._fastBlockNumberPromise=this.getBlockNumber().then(O=>((null==this._fastBlockNumber||O>this._fastBlockNumber)&&(this._fastBlockNumber=O),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(O){(null==this._fastBlockNumber||!(Othis._fastBlockNumber)&&(this._fastBlockNumber=O,this._fastBlockNumberPromise=Promise.resolve(O)))}waitForTransaction(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){return this._waitForTransaction(O,null==U?1:U,$||0,null)})}_waitForTransaction(O,U,$,J){return base_provider_awaiter(this,void 0,void 0,function*(){let es=yield this.getTransactionReceipt(O);return(es?es.confirmations:0)>=U?es:new Promise((es,eo)=>{let ea=[],eu=!1,alreadyDone=function(){return!!eu||(eu=!0,ea.forEach(O=>{O()}),!1)},minedHandler=O=>{O.confirmations{this.removeListener(O,minedHandler)}),J){let $=J.startBlock,es=null,replaceHandler=ea=>base_provider_awaiter(this,void 0,void 0,function*(){eu||(yield stall(1e3),this.getTransactionCount(J.from).then(ef=>base_provider_awaiter(this,void 0,void 0,function*(){if(!eu){if(ef<=J.nonce)$=ea;else{{let U=yield this.getTransaction(O);if(U&&null!=U.blockNumber)return}for(null==es&&(es=$-3){eu||this.once("block",replaceHandler)}))});if(eu)return;this.once("block",replaceHandler),ea.push(()=>{this.removeListener("block",replaceHandler)})}if("number"==typeof $&&$>0){let O=setTimeout(()=>{alreadyDone()||eo(tr.makeError("timeout exceeded",en.Yd.errors.TIMEOUT,{timeout:$}))},$);O.unref&&O.unref(),ea.push(()=>{clearTimeout(O)})}})})}getBlockNumber(){return base_provider_awaiter(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let O=yield this.perform("getGasPrice",{});try{return ea.O$.from(O)}catch(U){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:O,error:U})}})}getBalance(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getBalance",$);try{return ea.O$.from(es)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getBalance",params:$,result:es,error:O})}})}getTransactionCount(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getTransactionCount",$);try{return ea.O$.from(es).toNumber()}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:$,result:es,error:O})}})}getCode(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getCode",$);try{return(0,eu.Dv)(es)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getCode",params:$,result:es,error:O})}})}getStorageAt(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let es=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag($),position:Promise.resolve(U).then(O=>(0,eu.$P)(O))}),eo=yield this.perform("getStorageAt",es);try{return(0,eu.Dv)(eo)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:es,result:eo,error:O})}})}_wrapTransaction(O,U,$){if(null!=U&&32!==(0,eu.E1)(U))throw Error("invalid response - sendTransaction");let J=O;return null!=U&&O.hash!==U&&tr.throwError("Transaction hash mismatch from Provider.sendTransaction.",en.Yd.errors.UNKNOWN_ERROR,{expectedHash:O.hash,returnedHash:U}),J.wait=(U,J)=>base_provider_awaiter(this,void 0,void 0,function*(){let es;null==U&&(U=1),null==J&&(J=0),0!==U&&null!=$&&(es={data:O.data,from:O.from,nonce:O.nonce,to:O.to,value:O.value,startBlock:$});let eo=yield this._waitForTransaction(O.hash,U,J,es);return null==eo&&0===U?null:(this._emitted["t:"+O.hash]=eo.blockNumber,0===eo.status&&tr.throwError("transaction failed",en.Yd.errors.CALL_EXCEPTION,{transactionHash:O.hash,transaction:O,receipt:eo}),eo)}),J}sendTransaction(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let U=yield Promise.resolve(O).then(O=>(0,eu.Dv)(O)),$=this.formatter.transaction(O);null==$.confirmations&&($.confirmations=0);let J=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let O=yield this.perform("sendTransaction",{signedTransaction:U});return this._wrapTransaction($,O,J)}catch(O){throw O.transaction=$,O.transactionHash=$.hash,O}})}_getTransactionRequest(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=yield O,$={};return["from","to"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?this._getAddress(O):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?ea.O$.from(O):null))}),["type"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>null!=O?O:null))}),U.accessList&&($.accessList=this.formatter.accessList(U.accessList)),["data"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?(0,eu.Dv)(O):null))}),this.formatter.transactionRequest((yield(0,J.mE)($)))})}_getFilter(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O;let U={};return null!=O.address&&(U.address=this._getAddress(O.address)),["blockHash","topics"].forEach($=>{null!=O[$]&&(U[$]=O[$])}),["fromBlock","toBlock"].forEach($=>{null!=O[$]&&(U[$]=this._getBlockTag(O[$]))}),this.formatter.filter((yield(0,J.mE)(U)))})}_call(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){$>=ta&&tr.throwError("CCIP read exceeded maximum redirections",en.Yd.errors.SERVER_ERROR,{redirects:$,transaction:O});let J=O.to,es=yield this.perform("call",{transaction:O,blockTag:U});if($>=0&&"latest"===U&&null!=J&&"0x556f1830"===es.substring(0,10)&&(0,eu.E1)(es)%32==4)try{let eo=(0,eu.p3)(es,4),ef=(0,eu.p3)(eo,0,32);ea.O$.from(ef).eq(J)||tr.throwError("CCIP Read sender did not match",en.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:O,data:es});let eg=[],ev=ea.O$.from((0,eu.p3)(eo,32,64)).toNumber(),e_=ea.O$.from((0,eu.p3)(eo,ev,ev+32)).toNumber(),ew=(0,eu.p3)(eo,ev+32);for(let U=0;Ubase_provider_awaiter(this,void 0,void 0,function*(){let O=yield this.perform("getBlock",J);if(null==O)return null!=J.blockHash&&null==this._emitted["b:"+J.blockHash]||null!=J.blockTag&&$>this._emitted.block?null:void 0;if(U){let U=null;for(let $=0;$this._wrapTransaction(O)),$}return this.formatter.block(O)}),{oncePoll:this})})}getBlock(O){return this._getBlock(O,!1)}getBlockWithTransactions(O){return this._getBlock(O,!0)}getTransaction(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork(),O=yield O;let U={transactionHash:this.formatter.hash(O,!0)};return poll(()=>base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this.perform("getTransaction",U);if(null==$)return null==this._emitted["t:"+O]?null:void 0;let J=this.formatter.transactionResponse($);if(null==J.blockNumber)J.confirmations=0;else if(null==J.confirmations){let O=yield this._getInternalBlockNumber(100+2*this.pollingInterval),U=O-J.blockNumber+1;U<=0&&(U=1),J.confirmations=U}return this._wrapTransaction(J)}),{oncePoll:this})})}getTransactionReceipt(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork(),O=yield O;let U={transactionHash:this.formatter.hash(O,!0)};return poll(()=>base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this.perform("getTransactionReceipt",U);if(null==$)return null==this._emitted["t:"+O]?null:void 0;if(null==$.blockHash)return;let J=this.formatter.receipt($);if(null==J.blockNumber)J.confirmations=0;else if(null==J.confirmations){let O=yield this._getInternalBlockNumber(100+2*this.pollingInterval),U=O-J.blockNumber+1;U<=0&&(U=1),J.confirmations=U}return J}),{oncePoll:this})})}getLogs(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let U=yield(0,J.mE)({filter:this._getFilter(O)}),$=yield this.perform("getLogs",U);return $.forEach(O=>{null==O.removed&&(O.removed=!1)}),Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))($)})}getEtherPrice(){return base_provider_awaiter(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(O){return base_provider_awaiter(this,void 0,void 0,function*(){if("number"==typeof(O=yield O)&&O<0){O%1&&tr.throwArgumentError("invalid BlockTag","blockTag",O);let U=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return(U+=O)<0&&(U=0),this.formatter.blockTag(U)}return this.formatter.blockTag(O)})}getResolver(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=O;for(;;){if(""===U||"."===U||"eth"!==O&&"eth"===U)return null;let $=yield this._getResolver(U,"getResolver");if(null!=$){let J=new Resolver(this,$,O);if(U!==O&&!(yield J.supportsWildcard()))return null;return J}U=U.split(".").slice(1).join(".")}})}_getResolver(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){null==U&&(U="ENS");let $=yield this.getNetwork();$.ensAddress||tr.throwError("network does not support ENS",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:U,network:$.name});try{let U=yield this.call({to:$.ensAddress,data:"0x0178b8bf"+namehash(O).substring(2)});return this.formatter.callAddress(U)}catch(O){}return null})}resolveName(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O;try{return Promise.resolve(this.formatter.address(O))}catch(U){if((0,eu.A7)(O))throw U}"string"!=typeof O&&tr.throwArgumentError("invalid ENS name","name",O);let U=yield this.getResolver(O);return U?yield U.getAddress():null})}lookupAddress(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O,O=this.formatter.address(O);let U=O.substring(2).toLowerCase()+".addr.reverse",$=yield this._getResolver(U,"lookupAddress");if(null==$)return null;let J=_parseString((yield this.call({to:$,data:"0x691f3431"+namehash(U).substring(2)})),0),en=yield this.resolveName(J);return en!=O?null:J})}getAvatar(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=null;if((0,eu.A7)(O)){let $=this.formatter.address(O),J=$.substring(2).toLowerCase()+".addr.reverse",es=yield this._getResolver(J,"getAvatar");if(!es)return null;U=new Resolver(this,es,J);try{let O=yield U.getAvatar();if(O)return O.url}catch(O){if(O.code!==en.Yd.errors.CALL_EXCEPTION)throw O}try{let O=_parseString((yield this.call({to:es,data:"0x691f3431"+namehash(J).substring(2)})),0);U=yield this.getResolver(O)}catch(O){if(O.code!==en.Yd.errors.CALL_EXCEPTION)throw O;return null}}else if(!(U=yield this.getResolver(O)))return null;let $=yield U.getAvatar();return null==$?null:$.url})}perform(O,U){return tr.throwError(O+" not implemented",en.Yd.errors.NOT_IMPLEMENTED,{operation:O})}_startEvent(O){this.polling=this._events.filter(O=>O.pollable()).length>0}_stopEvent(O){this.polling=this._events.filter(O=>O.pollable()).length>0}_addEventListener(O,U,$){let J=new Event(getEventTag(O),U,$);return this._events.push(J),this._startEvent(J),this}on(O,U){return this._addEventListener(O,U,!1)}once(O,U){return this._addEventListener(O,U,!0)}emit(O,...U){let $=!1,J=[],en=getEventTag(O);return this._events=this._events.filter(O=>O.tag!==en||(setTimeout(()=>{O.listener.apply(this,U)},0),$=!0,!O.once||(J.push(O),!1))),J.forEach(O=>{this._stopEvent(O)}),$}listenerCount(O){if(!O)return this._events.length;let U=getEventTag(O);return this._events.filter(O=>O.tag===U).length}listeners(O){if(null==O)return this._events.map(O=>O.listener);let U=getEventTag(O);return this._events.filter(O=>O.tag===U).map(O=>O.listener)}off(O,U){if(null==U)return this.removeAllListeners(O);let $=[],J=!1,en=getEventTag(O);return this._events=this._events.filter(O=>O.tag!==en||O.listener!=U||!!J||(J=!0,$.push(O),!1)),$.forEach(O=>{this._stopEvent(O)}),this}removeAllListeners(O){let U=[];if(null==O)U=this._events,this._events=[];else{let $=getEventTag(O);this._events=this._events.filter(O=>O.tag!==$||(U.push(O),!1))}return U.forEach(O=>{this._stopEvent(O)}),this}};var json_rpc_provider_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tm=new en.Yd(es),ty=["call","estimateGas"];function spelunk(O,U){if(null==O)return null;if("string"==typeof O.message&&O.message.match("reverted")){let $=(0,eu.A7)(O.data)?O.data:null;if(!U||$)return{message:O.message,data:$}}if("object"==typeof O){for(let $ in O){let J=spelunk(O[$],U);if(J)return J}return null}if("string"==typeof O)try{return spelunk(JSON.parse(O),U)}catch(O){}return null}function checkError(O,U,$){let J=$.transaction||$.signedTransaction;if("call"===O){let O=spelunk(U,!0);if(O)return O.data;tm.throwError("missing revert data in call exception; Transaction reverted without a reason string",en.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:J,error:U})}if("estimateGas"===O){let $=spelunk(U.body,!1);null==$&&($=spelunk(U,!1)),$&&tm.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:$.message,method:O,transaction:J,error:U})}let es=U.message;throw U.code===en.Yd.errors.SERVER_ERROR&&U.error&&"string"==typeof U.error.message?es=U.error.message:"string"==typeof U.body?es=U.body:"string"==typeof U.responseText&&(es=U.responseText),(es=(es||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&tm.throwError("insufficient funds for intrinsic transaction cost",en.Yd.errors.INSUFFICIENT_FUNDS,{error:U,method:O,transaction:J}),es.match(/nonce (is )?too low/i)&&tm.throwError("nonce has already been used",en.Yd.errors.NONCE_EXPIRED,{error:U,method:O,transaction:J}),es.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&tm.throwError("replacement fee too low",en.Yd.errors.REPLACEMENT_UNDERPRICED,{error:U,method:O,transaction:J}),es.match(/only replay-protected/i)&&tm.throwError("legacy pre-eip-155 transactions not supported",en.Yd.errors.UNSUPPORTED_OPERATION,{error:U,method:O,transaction:J}),ty.indexOf(O)>=0&&es.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&tm.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:U,method:O,transaction:J}),U}function timer(O){return new Promise(function(U){setTimeout(U,O)})}function getResult(O){if(O.error){let U=Error(O.error.message);throw U.code=O.error.code,U.data=O.error.data,U}return O.result}function getLowerCase(O){return O?O.toLowerCase():O}let tb={};let JsonRpcSigner=class JsonRpcSigner extends eo.E{constructor(O,U,$){if(super(),O!==tb)throw Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,J.zG)(this,"provider",U),null==$&&($=0),"string"==typeof $?((0,J.zG)(this,"_address",this.provider.formatter.address($)),(0,J.zG)(this,"_index",null)):"number"==typeof $?((0,J.zG)(this,"_index",$),(0,J.zG)(this,"_address",null)):tm.throwArgumentError("invalid address or index","addressOrIndex",$)}connect(O){return tm.throwError("cannot alter JSON-RPC Signer connection",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UncheckedJsonRpcSigner(tb,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(O=>(O.length<=this._index&&tm.throwError("unknown account #"+this._index,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(O[this._index])))}sendUncheckedTransaction(O){O=(0,J.DC)(O);let U=this.getAddress().then(O=>(O&&(O=O.toLowerCase()),O));if(null==O.gasLimit){let $=(0,J.DC)(O);$.from=U,O.gasLimit=this.provider.estimateGas($)}return null!=O.to&&(O.to=Promise.resolve(O.to).then(O=>json_rpc_provider_awaiter(this,void 0,void 0,function*(){if(null==O)return null;let U=yield this.provider.resolveName(O);return null==U&&tm.throwArgumentError("provided ENS name resolves to null","tx.to",O),U}))),(0,J.mE)({tx:(0,J.mE)(O),sender:U}).then(({tx:U,sender:$})=>{null!=U.from?U.from.toLowerCase()!==$&&tm.throwArgumentError("from address mismatch","transaction",O):U.from=$;let J=this.provider.constructor.hexlifyTransaction(U,{from:!0});return this.provider.send("eth_sendTransaction",[J]).then(O=>O,O=>("string"==typeof O.message&&O.message.match(/user denied/i)&&tm.throwError("user rejected transaction",en.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:U}),checkError("sendTransaction",O,J)))})}signTransaction(O){return tm.throwError("signing transactions is unsupported",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),$=yield this.sendUncheckedTransaction(O);try{return yield poll(()=>json_rpc_provider_awaiter(this,void 0,void 0,function*(){let O=yield this.provider.getTransaction($);if(null!==O)return this.provider._wrapTransaction(O,$,U)}),{oncePoll:this.provider})}catch(O){throw O.transactionHash=$,O}})}signMessage(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U="string"==typeof O?(0,eN.Y0)(O):O,$=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,eu.Dv)(U),$.toLowerCase()])}catch(U){throw"string"==typeof U.message&&U.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:$,messageData:O}),U}})}_legacySignMessage(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U="string"==typeof O?(0,eN.Y0)(O):O,$=yield this.getAddress();try{return yield this.provider.send("eth_sign",[$.toLowerCase(),(0,eu.Dv)(U)])}catch(U){throw"string"==typeof U.message&&U.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:$,messageData:O}),U}})}_signTypedData(O,U,$){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let J=yield TypedDataEncoder.resolveNames(O,U,$,O=>this.provider.resolveName(O)),es=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[es.toLowerCase(),JSON.stringify(TypedDataEncoder.getPayload(J.domain,U,J.value))])}catch(O){throw"string"==typeof O.message&&O.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:es,messageData:{domain:J.domain,types:U,value:J.value}}),O}})}unlock(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U=this.provider,$=yield this.getAddress();return U.send("personal_unlockAccount",[$.toLowerCase(),O,null])})}};let UncheckedJsonRpcSigner=class UncheckedJsonRpcSigner extends JsonRpcSigner{sendTransaction(O){return this.sendUncheckedTransaction(O).then(O=>({hash:O,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:U=>this.provider.waitForTransaction(O,U)}))}};let tv={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let JsonRpcProvider=class JsonRpcProvider extends BaseProvider{constructor(O,U){let $=U;null==$&&($=new Promise((O,U)=>{setTimeout(()=>{this.detectNetwork().then(U=>{O(U)},O=>{U(O)})},0)})),super($),O||(O=(0,J.tu)(this.constructor,"defaultUrl")()),"string"==typeof O?(0,J.zG)(this,"connection",Object.freeze({url:O})):(0,J.zG)(this,"connection",Object.freeze((0,J.DC)(O))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){yield timer(0);let O=null;try{O=yield this.send("eth_chainId",[])}catch(U){try{O=yield this.send("net_version",[])}catch(O){}}if(null!=O){let U=(0,J.tu)(this.constructor,"getNetwork");try{return U(ea.O$.from(O).toNumber())}catch(U){return tm.throwError("could not detect network",en.Yd.errors.NETWORK_ERROR,{chainId:O,event:"invalidNetwork",serverError:U})}}return tm.throwError("could not detect network",en.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(O){return new JsonRpcSigner(tb,this,O)}getUncheckedSigner(O){return this.getSigner(O).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(O=>O.map(O=>this.formatter.address(O)))}send(O,U){let $={method:O,params:U,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,J.p$)($),provider:this});let en=["eth_chainId","eth_blockNumber"].indexOf(O)>=0;if(en&&this._cache[O])return this._cache[O];let es=fetchJson(this.connection,JSON.stringify($),getResult).then(O=>(this.emit("debug",{action:"response",request:$,response:O,provider:this}),O),O=>{throw this.emit("debug",{action:"response",error:O,request:$,provider:this}),O});return en&&(this._cache[O]=es,setTimeout(()=>{this._cache[O]=null},0)),es}prepareRequest(O,U){switch(O){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(U.address),U.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(U.address),U.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(U.address),U.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(U.address),(0,eu.$m)(U.position,32),U.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[U.signedTransaction]];case"getBlock":if(U.blockTag)return["eth_getBlockByNumber",[U.blockTag,!!U.includeTransactions]];if(U.blockHash)return["eth_getBlockByHash",[U.blockHash,!!U.includeTransactions]];break;case"getTransaction":return["eth_getTransactionByHash",[U.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[U.transactionHash]];case"call":{let O=(0,J.tu)(this.constructor,"hexlifyTransaction");return["eth_call",[O(U.transaction,{from:!0}),U.blockTag]]}case"estimateGas":{let O=(0,J.tu)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[O(U.transaction,{from:!0})]]}case"getLogs":return U.filter&&null!=U.filter.address&&(U.filter.address=getLowerCase(U.filter.address)),["eth_getLogs",[U.filter]]}return null}perform(O,U){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){if("call"===O||"estimateGas"===O){let O=U.transaction;if(O&&null!=O.type&&ea.O$.from(O.type).isZero()&&null==O.maxFeePerGas&&null==O.maxPriorityFeePerGas){let $=yield this.getFeeData();null==$.maxFeePerGas&&null==$.maxPriorityFeePerGas&&((U=(0,J.DC)(U)).transaction=(0,J.DC)(O),delete U.transaction.type)}}let $=this.prepareRequest(O,U);null==$&&tm.throwError(O+" not implemented",en.Yd.errors.NOT_IMPLEMENTED,{operation:O});try{return yield this.send($[0],$[1])}catch($){return checkError(O,$,U)}})}_startEvent(O){"pending"===O.tag&&this._startPending(),super._startEvent(O)}_startPending(){if(null!=this._pendingFilter)return;let O=this,U=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=U,U.then(function($){function poll(){O.send("eth_getFilterChanges",[$]).then(function($){if(O._pendingFilter!=U)return null;let J=Promise.resolve();return $.forEach(function(U){O._emitted["t:"+U.toLowerCase()]="pending",J=J.then(function(){return O.getTransaction(U).then(function(U){return O.emit("pending",U),null})})}),J.then(function(){return timer(1e3)})}).then(function(){if(O._pendingFilter!=U){O.send("eth_uninstallFilter",[$]);return}return setTimeout(function(){poll()},0),null}).catch(O=>{})}return poll(),$}).catch(O=>{})}_stopEvent(O){"pending"===O.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(O)}static hexlifyTransaction(O,U){let $=(0,J.DC)(tv);if(U)for(let O in U)U[O]&&($[O]=!0);(0,J.uj)(O,$);let en={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(U){if(null==O[U])return;let $=(0,eu.$P)(ea.O$.from(O[U]));"gasLimit"===U&&(U="gas"),en[U]=$}),["from","to","data"].forEach(function(U){null!=O[U]&&(en[U]=(0,eu.Dv)(O[U]))}),O.accessList&&(en.accessList=(0,eD.z7)(O.accessList)),en}};let t_=new en.Yd(es),tw=1;function buildWeb3LegacyFetcher(O,U){let $="Web3LegacyFetcher";return function(O,en){let es={method:O,params:en,id:tw++,jsonrpc:"2.0"};return new Promise((O,en)=>{this.emit("debug",{action:"request",fetcher:$,request:(0,J.p$)(es),provider:this}),U(es,(U,J)=>{if(U)return this.emit("debug",{action:"response",fetcher:$,error:U,request:es,provider:this}),en(U);if(this.emit("debug",{action:"response",fetcher:$,request:es,response:J,provider:this}),J.error){let O=Error(J.error.message);return O.code=J.error.code,O.data=J.error.data,en(O)}O(J.result)})})}}function buildEip1193Fetcher(O){return function(U,$){null==$&&($=[]);let en={method:U,params:$};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,J.p$)(en),provider:this}),O.request(en).then(O=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:en,response:O,provider:this}),O),O=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:en,error:O,provider:this}),O})}}let Web3Provider=class Web3Provider extends JsonRpcProvider{constructor(O,U){null==O&&t_.throwArgumentError("missing provider","provider",O);let $=null,en=null,es=null;"function"==typeof O?($="unknown:",en=O):(($=O.host||O.path||"")||!O.isMetaMask||($="metamask"),es=O,O.request?(""===$&&($="eip-1193:"),en=buildEip1193Fetcher(O)):O.sendAsync?en=buildWeb3LegacyFetcher(O,O.sendAsync.bind(O)):O.send?en=buildWeb3LegacyFetcher(O,O.send.bind(O)):t_.throwArgumentError("unsupported provider","provider",O),$||($="unknown:")),super($,U),(0,J.zG)(this,"jsonRpcFetchFunc",en),(0,J.zG)(this,"provider",es)}send(O,U){return this.jsonRpcFetchFunc(O,U)}}},7054:function(O,U,$){"use strict";$.d(U,{J:function(){return decode},c:function(){return encode}});var J=$(7273),en=$(6288);let es="rlp/5.7.0",eo=new en.Yd(es);function arrayifyInteger(O){let U=[];for(;O;)U.unshift(255&O),O>>=8;return U}function unarrayifyInteger(O,U,$){let J=0;for(let en=0;en<$;en++)J=256*J+O[U+en];return J}function _encode(O){if(Array.isArray(O)){let U=[];if(O.forEach(function(O){U=U.concat(_encode(O))}),U.length<=55)return U.unshift(192+U.length),U;let $=arrayifyInteger(U.length);return $.unshift(247+$.length),$.concat(U)}(0,J.Zq)(O)||eo.throwArgumentError("RLP object must be BytesLike","object",O);let U=Array.prototype.slice.call((0,J.lE)(O));if(1===U.length&&U[0]<=127)return U;if(U.length<=55)return U.unshift(128+U.length),U;let $=arrayifyInteger(U.length);return $.unshift(183+$.length),$.concat(U)}function encode(O){return(0,J.Dv)(_encode(O))}function _decodeChildren(O,U,$,J){let es=[];for(;$U+1+J&&eo.throwError("child data too short",en.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+J,result:es}}function _decode(O,U){if(0===O.length&&eo.throwError("data too short",en.Yd.errors.BUFFER_OVERRUN,{}),O[U]>=248){let $=O[U]-247;U+1+$>O.length&&eo.throwError("data short segment too short",en.Yd.errors.BUFFER_OVERRUN,{});let J=unarrayifyInteger(O,U+1,$);return U+1+$+J>O.length&&eo.throwError("data long segment too short",en.Yd.errors.BUFFER_OVERRUN,{}),_decodeChildren(O,U,U+1+$,$+J)}if(O[U]>=192){let $=O[U]-192;return U+1+$>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{}),_decodeChildren(O,U,U+1,$)}if(O[U]>=184){let $=O[U]-183;U+1+$>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{});let es=unarrayifyInteger(O,U+1,$);U+1+$+es>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{});let ea=(0,J.Dv)(O.slice(U+1+$,U+1+$+es));return{consumed:1+$+es,result:ea}}if(O[U]>=128){let $=O[U]-128;U+1+$>O.length&&eo.throwError("data too short",en.Yd.errors.BUFFER_OVERRUN,{});let es=(0,J.Dv)(O.slice(U+1,U+1+$));return{consumed:1+$,result:es}}return{consumed:1,result:(0,J.Dv)(O[U])}}function decode(O){let U=(0,J.lE)(O),$=_decode(U,0);return $.consumed!==U.length&&eo.throwArgumentError("invalid rlp data","data",O),$.result}},8337:function(O,U,$){"use strict";$.d(U,{Y0:function(){return toUtf8Bytes},XL:function(){return toUtf8CodePoints},ZN:function(){return toUtf8String}});var J,en,es=$(7273),eo=$(6288);let ea="strings/5.7.0",eu=new eo.Yd(ea);function errorFunc(O,U,$,J,en){return eu.throwArgumentError(`invalid codepoint at offset ${U}; ${O}`,"bytes",$)}function ignoreFunc(O,U,$,J,es){if(O===en.BAD_PREFIX||O===en.UNEXPECTED_CONTINUE){let O=0;for(let J=U+1;J<$.length&&$[J]>>6==2;J++)O++;return O}return O===en.OVERRUN?$.length-U-1:0}function replaceFunc(O,U,$,J,es){return O===en.OVERLONG?(J.push(es),0):(J.push(65533),ignoreFunc(O,U,$,J,es))}!function(O){O.current="",O.NFC="NFC",O.NFD="NFD",O.NFKC="NFKC",O.NFKD="NFKD"}(J||(J={})),function(O){O.UNEXPECTED_CONTINUE="unexpected continuation byte",O.BAD_PREFIX="bad codepoint prefix",O.OVERRUN="string overrun",O.MISSING_CONTINUE="missing continuation byte",O.OUT_OF_RANGE="out of UTF-8 range",O.UTF16_SURROGATE="UTF-16 surrogate",O.OVERLONG="overlong representation"}(en||(en={}));let ef=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(O,U){null==U&&(U=ef.error),O=(0,es.lE)(O);let $=[],J=0;for(;J>7==0){$.push(es);continue}let eo=null,ea=null;if((224&es)==192)eo=1,ea=127;else if((240&es)==224)eo=2,ea=2047;else if((248&es)==240)eo=3,ea=65535;else{(192&es)==128?J+=U(en.UNEXPECTED_CONTINUE,J-1,O,$):J+=U(en.BAD_PREFIX,J-1,O,$);continue}if(J-1+eo>=O.length){J+=U(en.OVERRUN,J-1,O,$);continue}let eu=es&(1<<8-eo-1)-1;for(let es=0;es1114111){J+=U(en.OUT_OF_RANGE,J-1-eo,O,$,eu);continue}if(eu>=55296&&eu<=57343){J+=U(en.UTF16_SURROGATE,J-1-eo,O,$,eu);continue}if(eu<=ea){J+=U(en.OVERLONG,J-1-eo,O,$,eu);continue}$.push(eu)}}return $}function toUtf8Bytes(O,U=J.current){U!=J.current&&(eu.checkNormalize(),O=O.normalize(U));let $=[];for(let U=0;U>6|192),$.push(63&J|128);else if((64512&J)==55296){U++;let en=O.charCodeAt(U);if(U>=O.length||(64512&en)!=56320)throw Error("invalid utf-8 string");let es=65536+((1023&J)<<10)+(1023&en);$.push(es>>18|240),$.push(es>>12&63|128),$.push(es>>6&63|128),$.push(63&es|128)}else $.push(J>>12|224),$.push(J>>6&63|128),$.push(63&J|128)}return(0,es.lE)($)}function _toUtf8String(O){return O.map(O=>O<=65535?String.fromCharCode(O):String.fromCharCode(((O-=65536)>>10&1023)+55296,(1023&O)+56320)).join("")}function toUtf8String(O,U){return _toUtf8String(getUtf8CodePoints(O,U))}function toUtf8CodePoints(O,U=J.current){return getUtf8CodePoints(toUtf8Bytes(O,U))}},2501:function(O,U,$){"use strict";$.d(U,{z7:function(){return accessListify},Qc:function(){return parse}});var J,en=$(8994),es=$(2278),eo=$(7273),ea=$(3690),eu=$(4184),ef=$(7054),eg=$(6662),ev=$.n(eg),e_=$(5336),ew=$.n(e_);function createCommonjsModule(O,U,$){return O($={path:U,exports:{},require:function(O,U){return commonjsRequire(O,null==U?$.path:U)}},$.exports),$.exports}function commonjsRequire(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==$.g?$.g:"undefined"!=typeof self&&self;var eE=assert;function assert(O,U){if(!O)throw Error(U||"Assertion failed")}assert.equal=function(O,U,$){if(O!=U)throw Error($||"Assertion failed: "+O+" != "+U)};var eS=createCommonjsModule(function(O,U){var $=U;function toArray(O,U){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if("string"!=typeof O){for(var J=0;J>8,eo=255&en;es?$.push(es,eo):$.push(eo)}return $}function zero2(O){return 1===O.length?"0"+O:O}function toHex(O){for(var U="",$=0;$(en>>1)-1?(en>>1)-eu:eu,es.isubn(ea)):ea=0,J[eo]=ea,es.iushrn(1)}return J}function getJSF(O,U){var $=[[],[]];O=O.clone(),U=U.clone();for(var J=0,en=0;O.cmpn(-J)>0||U.cmpn(-en)>0;){var es,eo,ea,eu=O.andln(3)+J&3,ef=U.andln(3)+en&3;3===eu&&(eu=-1),3===ef&&(ef=-1),eo=(1&eu)==0?0:(3==(es=O.andln(7)+J&7)||5===es)&&2===ef?-eu:eu,$[0].push(eo),ea=(1&ef)==0?0:(3==(es=U.andln(7)+en&7)||5===es)&&2===eu?-ef:ef,$[1].push(ea),2*J===eo+1&&(J=1-J),2*en===ea+1&&(en=1-en),O.iushrn(1),U.iushrn(1)}return $}function cachedProperty(O,U,$){var J="_"+U;O.prototype[U]=function(){return void 0!==this[J]?this[J]:this[J]=$.call(this)}}function parseBytes(O){return"string"==typeof O?$.toArray(O,"hex"):O}function intFromLE(O){return new(ev())(O,"hex","le")}$.assert=eE,$.toArray=eS.toArray,$.zero2=eS.zero2,$.toHex=eS.toHex,$.encode=eS.encode,$.getNAF=getNAF,$.getJSF=getJSF,$.cachedProperty=cachedProperty,$.parseBytes=parseBytes,$.intFromLE=intFromLE}),eI=eA.getNAF,eP=eA.getJSF,ek=eA.assert;function BaseCurve(O,U){this.type=O,this.p=new(ev())(U.p,16),this.red=U.prime?ev().red(U.prime):ev().mont(this.p),this.zero=new(ev())(0).toRed(this.red),this.one=new(ev())(1).toRed(this.red),this.two=new(ev())(2).toRed(this.red),this.n=U.n&&new(ev())(U.n,16),this.g=U.g&&this.pointFromJSON(U.g,U.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var $=this.n&&this.p.div(this.n);!$||$.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var eT=BaseCurve;function BasePoint(O,U){this.curve=O,this.type=U,this.precomputed=null}BaseCurve.prototype.point=function(){throw Error("Not implemented")},BaseCurve.prototype.validate=function(){throw Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function(O,U){ek(O.precomputed);var $,J,en=O._getDoubles(),es=eI(U,1,this._bitLength),eo=(1<=$;eu--)J=(J<<1)+es[eu];ea.push(J)}for(var ef=this.jpoint(null,null,null),eg=this.jpoint(null,null,null),ev=eo;ev>0;ev--){for($=0;$=0;ea--){for(var eu=0;ea>=0&&0===es[ea];ea--)eu++;if(ea>=0&&eu++,eo=eo.dblp(eu),ea<0)break;var ef=es[ea];ek(0!==ef),eo="affine"===O.type?ef>0?eo.mixedAdd(en[ef-1>>1]):eo.mixedAdd(en[-ef-1>>1].neg()):ef>0?eo.add(en[ef-1>>1]):eo.add(en[-ef-1>>1].neg())}return"affine"===O.type?eo.toP():eo},BaseCurve.prototype._wnafMulAdd=function(O,U,$,J,en){var es,eo,ea,eu=this._wnafT1,ef=this._wnafT2,eg=this._wnafT3,ev=0;for(es=0;es=1;es-=2){var ew=es-1,eE=es;if(1!==eu[ew]||1!==eu[eE]){eg[ew]=eI($[ew],eu[ew],this._bitLength),eg[eE]=eI($[eE],eu[eE],this._bitLength),ev=Math.max(eg[ew].length,ev),ev=Math.max(eg[eE].length,ev);continue}var eS=[U[ew],null,null,U[eE]];0===U[ew].y.cmp(U[eE].y)?(eS[1]=U[ew].add(U[eE]),eS[2]=U[ew].toJ().mixedAdd(U[eE].neg())):0===U[ew].y.cmp(U[eE].y.redNeg())?(eS[1]=U[ew].toJ().mixedAdd(U[eE]),eS[2]=U[ew].add(U[eE].neg())):(eS[1]=U[ew].toJ().mixedAdd(U[eE]),eS[2]=U[ew].toJ().mixedAdd(U[eE].neg()));var eA=[-3,-1,-5,-7,0,7,5,1,3],ek=eP($[ew],$[eE]);for(eo=0,ev=Math.max(ek[0].length,ev),eg[ew]=Array(ev),eg[eE]=Array(ev);eo=0;es--){for(var eN=0;es>=0;){var eD=!0;for(eo=0;eo=0&&eN++,eC=eC.dblp(eN),es<0)break;for(eo=0;eo0?ea=ef[eo][eM-1>>1]:eM<0&&(ea=ef[eo][-eM-1>>1].neg()),eC="affine"===ea.type?eC.mixedAdd(ea):eC.add(ea))}}for(es=0;es=Math.ceil((O.bitLength()+1)/U.step)},BasePoint.prototype._getDoubles=function(O,U){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var $=[this],J=this,en=0;enen[0].cmp(en[1])?en[0]:en[1]).toRed(this.red)}if(O.lambda)$=new(ev())(O.lambda,16);else{var es=this._getEndoRoots(this.n);0===this.g.mul(es[0]).x.cmp(this.g.x.redMul(U))?$=es[0]:($=es[1],eC(0===this.g.mul($).x.cmp(this.g.x.redMul(U))))}return J=O.basis?O.basis.map(function(O){return{a:new(ev())(O.a,16),b:new(ev())(O.b,16)}}):this._getEndoBasis($),{beta:U,lambda:$,basis:J}}},ShortCurve.prototype._getEndoRoots=function(O){var U=O===this.p?this.red:ev().mont(O),$=new(ev())(2).toRed(U).redInvm(),J=$.redNeg(),en=new(ev())(3).toRed(U).redNeg().redSqrt().redMul($);return[J.redAdd(en).fromRed(),J.redSub(en).fromRed()]},ShortCurve.prototype._getEndoBasis=function(O){for(var U,$,J,en,es,eo,ea,eu,ef,eg=this.n.ushrn(Math.floor(this.n.bitLength()/2)),e_=O,ew=this.n.clone(),eE=new(ev())(1),eS=new(ev())(0),eA=new(ev())(0),eI=new(ev())(1),eP=0;0!==e_.cmpn(0);){var ek=ew.div(e_);eu=ew.sub(ek.mul(e_)),ef=eA.sub(ek.mul(eE));var eT=eI.sub(ek.mul(eS));if(!J&&0>eu.cmp(eg))U=ea.neg(),$=eE,J=eu.neg(),en=ef;else if(J&&2==++eP)break;ea=eu,ew=e_,e_=eu,eA=eE,eE=ef,eI=eS,eS=eT}es=eu.neg(),eo=ef;var eR=J.sqr().add(en.sqr());return es.sqr().add(eo.sqr()).cmp(eR)>=0&&(es=U,eo=$),J.negative&&(J=J.neg(),en=en.neg()),es.negative&&(es=es.neg(),eo=eo.neg()),[{a:J,b:en},{a:es,b:eo}]},ShortCurve.prototype._endoSplit=function(O){var U=this.endo.basis,$=U[0],J=U[1],en=J.b.mul(O).divRound(this.n),es=$.b.neg().mul(O).divRound(this.n),eo=en.mul($.a),ea=es.mul(J.a),eu=en.mul($.b),ef=es.mul(J.b);return{k1:O.sub(eo).sub(ea),k2:eu.add(ef).neg()}},ShortCurve.prototype.pointFromX=function(O,U){(O=new(ev())(O,16)).red||(O=O.toRed(this.red));var $=O.redSqr().redMul(O).redIAdd(O.redMul(this.a)).redIAdd(this.b),J=$.redSqrt();if(0!==J.redSqr().redSub($).cmp(this.zero))throw Error("invalid point");var en=J.fromRed().isOdd();return(U&&!en||!U&&en)&&(J=J.redNeg()),this.point(O,J)},ShortCurve.prototype.validate=function(O){if(O.inf)return!0;var U=O.x,$=O.y,J=this.a.redMul(U),en=U.redSqr().redMul(U).redIAdd(J).redIAdd(this.b);return 0===$.redSqr().redISub(en).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function(O,U,$){for(var J=this._endoWnafT1,en=this._endoWnafT2,es=0;es":""},Point.prototype.isInfinity=function(){return this.inf},Point.prototype.add=function(O){if(this.inf)return O;if(O.inf)return this;if(this.eq(O))return this.dbl();if(this.neg().eq(O)||0===this.x.cmp(O.x))return this.curve.point(null,null);var U=this.y.redSub(O.y);0!==U.cmpn(0)&&(U=U.redMul(this.x.redSub(O.x).redInvm()));var $=U.redSqr().redISub(this.x).redISub(O.x),J=U.redMul(this.x.redSub($)).redISub(this.y);return this.curve.point($,J)},Point.prototype.dbl=function(){if(this.inf)return this;var O=this.y.redAdd(this.y);if(0===O.cmpn(0))return this.curve.point(null,null);var U=this.curve.a,$=this.x.redSqr(),J=O.redInvm(),en=$.redAdd($).redIAdd($).redIAdd(U).redMul(J),es=en.redSqr().redISub(this.x.redAdd(this.x)),eo=en.redMul(this.x.redSub(es)).redISub(this.y);return this.curve.point(es,eo)},Point.prototype.getX=function(){return this.x.fromRed()},Point.prototype.getY=function(){return this.y.fromRed()},Point.prototype.mul=function(O){return(O=new(ev())(O,16),this.isInfinity())?this:this._hasDoubles(O)?this.curve._fixedNafMul(this,O):this.curve.endo?this.curve._endoWnafMulAdd([this],[O]):this.curve._wnafMul(this,O)},Point.prototype.mulAdd=function(O,U,$){var J=[this,U],en=[O,$];return this.curve.endo?this.curve._endoWnafMulAdd(J,en):this.curve._wnafMulAdd(1,J,en,2)},Point.prototype.jmulAdd=function(O,U,$){var J=[this,U],en=[O,$];return this.curve.endo?this.curve._endoWnafMulAdd(J,en,!0):this.curve._wnafMulAdd(1,J,en,2,!0)},Point.prototype.eq=function(O){return this===O||this.inf===O.inf&&(this.inf||0===this.x.cmp(O.x)&&0===this.y.cmp(O.y))},Point.prototype.neg=function(O){if(this.inf)return this;var U=this.curve.point(this.x,this.y.redNeg());if(O&&this.precomputed){var $=this.precomputed,negate=function(O){return O.neg()};U.precomputed={naf:$.naf&&{wnd:$.naf.wnd,points:$.naf.points.map(negate)},doubles:$.doubles&&{step:$.doubles.step,points:$.doubles.points.map(negate)}}}return U},Point.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},eR(JPoint,eT.BasePoint),ShortCurve.prototype.jpoint=function(O,U,$){return new JPoint(this,O,U,$)},JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var O=this.z.redInvm(),U=O.redSqr(),$=this.x.redMul(U),J=this.y.redMul(U).redMul(O);return this.curve.point($,J)},JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function(O){if(this.isInfinity())return O;if(O.isInfinity())return this;var U=O.z.redSqr(),$=this.z.redSqr(),J=this.x.redMul(U),en=O.x.redMul($),es=this.y.redMul(U.redMul(O.z)),eo=O.y.redMul($.redMul(this.z)),ea=J.redSub(en),eu=es.redSub(eo);if(0===ea.cmpn(0))return 0!==eu.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ef=ea.redSqr(),eg=ef.redMul(ea),ev=J.redMul(ef),e_=eu.redSqr().redIAdd(eg).redISub(ev).redISub(ev),ew=eu.redMul(ev.redISub(e_)).redISub(es.redMul(eg)),eE=this.z.redMul(O.z).redMul(ea);return this.curve.jpoint(e_,ew,eE)},JPoint.prototype.mixedAdd=function(O){if(this.isInfinity())return O.toJ();if(O.isInfinity())return this;var U=this.z.redSqr(),$=this.x,J=O.x.redMul(U),en=this.y,es=O.y.redMul(U).redMul(this.z),eo=$.redSub(J),ea=en.redSub(es);if(0===eo.cmpn(0))return 0!==ea.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eu=eo.redSqr(),ef=eu.redMul(eo),eg=$.redMul(eu),ev=ea.redSqr().redIAdd(ef).redISub(eg).redISub(eg),e_=ea.redMul(eg.redISub(ev)).redISub(en.redMul(ef)),ew=this.z.redMul(eo);return this.curve.jpoint(ev,e_,ew)},JPoint.prototype.dblp=function(O){if(0===O||this.isInfinity())return this;if(!O)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var U,$=this;for(U=0;U=0)return!1;if($.redIAdd(en),0===this.x.cmp($))return!0}},JPoint.prototype.inspect=function(){return this.isInfinity()?"":""},JPoint.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var eN=createCommonjsModule(function(O,U){var $=U;$.base=eT,$.short=eB,$.mont=null,$.edwards=null}),eD=createCommonjsModule(function(O,U){var $,J=U,en=eA.assert;function PresetCurve(O){"short"===O.type?this.curve=new eN.short(O):"edwards"===O.type?this.curve=new eN.edwards(O):this.curve=new eN.mont(O),this.g=this.curve.g,this.n=this.curve.n,this.hash=O.hash,en(this.g.validate(),"Invalid curve"),en(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(O,U){Object.defineProperty(J,O,{configurable:!0,enumerable:!0,get:function(){var $=new PresetCurve(U);return Object.defineProperty(J,O,{configurable:!0,enumerable:!0,value:$}),$}})}J.PresetCurve=PresetCurve,defineCurve("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:ew().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("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:ew().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("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:ew().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("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:ew().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"]}),defineCurve("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:ew().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"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ew().sha256,gRed:!1,g:["9"]}),defineCurve("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:ew().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{$=null.crash()}catch(O){$=void 0}defineCurve("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:ew().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",$]})});function HmacDRBG(O){if(!(this instanceof HmacDRBG))return new HmacDRBG(O);this.hash=O.hash,this.predResist=!!O.predResist,this.outLen=this.hash.outSize,this.minEntropy=O.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var U=eS.toArray(O.entropy,O.entropyEnc||"hex"),$=eS.toArray(O.nonce,O.nonceEnc||"hex"),J=eS.toArray(O.pers,O.persEnc||"hex");eE(U.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(U,$,J)}var eM=HmacDRBG;HmacDRBG.prototype._init=function(O,U,$){var J=O.concat(U).concat($);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var en=0;en=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(O.concat($||[])),this._reseed=1},HmacDRBG.prototype.generate=function(O,U,$,J){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof U&&(J=$,$=U,U=null),$&&($=eS.toArray($,J||"hex"),this._update($));for(var en=[];en.length"};var eU=eA.assert;function Signature(O,U){if(O instanceof Signature)return O;this._importDER(O,U)||(eU(O.r&&O.s,"Signature without r or s"),this.r=new(ev())(O.r,16),this.s=new(ev())(O.s,16),void 0===O.recoveryParam?this.recoveryParam=null:this.recoveryParam=O.recoveryParam)}var eF=Signature;function Position(){this.place=0}function getLength(O,U){var $=O[U.place++];if(!(128&$))return $;var J=15&$;if(0===J||J>4)return!1;for(var en=0,es=0,eo=U.place;es>>=0;return!(en<=127)&&(U.place=eo,en)}function rmPadding(O){for(var U=0,$=O.length-1;!O[U]&&!(128&O[U+1])&&U<$;)U++;return 0===U?O:O.slice(U)}function constructLength(O,U){if(U<128){O.push(U);return}var $=1+(Math.log(U)/Math.LN2>>>3);for(O.push(128|$);--$;)O.push(U>>>($<<3)&255);O.push(U)}Signature.prototype._importDER=function(O,U){O=eA.toArray(O,U);var $=new Position;if(48!==O[$.place++])return!1;var J=getLength(O,$);if(!1===J||J+$.place!==O.length||2!==O[$.place++])return!1;var en=getLength(O,$);if(!1===en)return!1;var es=O.slice($.place,en+$.place);if($.place+=en,2!==O[$.place++])return!1;var eo=getLength(O,$);if(!1===eo||O.length!==eo+$.place)return!1;var ea=O.slice($.place,eo+$.place);if(0===es[0]){if(!(128&es[1]))return!1;es=es.slice(1)}if(0===ea[0]){if(!(128&ea[1]))return!1;ea=ea.slice(1)}return this.r=new(ev())(es),this.s=new(ev())(ea),this.recoveryParam=null,!0},Signature.prototype.toDER=function(O){var U=this.r.toArray(),$=this.s.toArray();for(128&U[0]&&(U=[0].concat(U)),128&$[0]&&($=[0].concat($)),U=rmPadding(U),$=rmPadding($);!$[0]&&!(128&$[1]);)$=$.slice(1);var J=[2];constructLength(J,U.length),(J=J.concat(U)).push(2),constructLength(J,$.length);var en=J.concat($),es=[48];return constructLength(es,en.length),es=es.concat(en),eA.encode(es,O)};var rand=function(){throw Error("unsupported")},eK=eA.assert;function EC(O){if(!(this instanceof EC))return new EC(O);"string"==typeof O&&(eK(Object.prototype.hasOwnProperty.call(eD,O),"Unknown curve "+O),O=eD[O]),O instanceof eD.PresetCurve&&(O={curve:O}),this.curve=O.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=O.curve.g,this.g.precompute(O.curve.n.bitLength()+1),this.hash=O.hash||O.curve.hash}var ej=EC;EC.prototype.keyPair=function(O){return new eL(this,O)},EC.prototype.keyFromPrivate=function(O,U){return eL.fromPrivate(this,O,U)},EC.prototype.keyFromPublic=function(O,U){return eL.fromPublic(this,O,U)},EC.prototype.genKeyPair=function(O){O||(O={});for(var U=new eM({hash:this.hash,pers:O.pers,persEnc:O.persEnc||"utf8",entropy:O.entropy||rand(this.hash.hmacStrength),entropyEnc:O.entropy&&O.entropyEnc||"utf8",nonce:this.n.toArray()}),$=this.n.byteLength(),J=this.n.sub(new(ev())(2));;){var en=new(ev())(U.generate($));if(!(en.cmp(J)>0))return en.iaddn(1),this.keyFromPrivate(en)}},EC.prototype._truncateToN=function(O,U){var $=8*O.byteLength()-this.n.bitLength();return($>0&&(O=O.ushrn($)),!U&&O.cmp(this.n)>=0)?O.sub(this.n):O},EC.prototype.sign=function(O,U,$,J){"object"==typeof $&&(J=$,$=null),J||(J={}),U=this.keyFromPrivate(U,$),O=this._truncateToN(new(ev())(O,16));for(var en=this.n.byteLength(),es=U.getPrivate().toArray("be",en),eo=O.toArray("be",en),ea=new eM({hash:this.hash,entropy:es,nonce:eo,pers:J.pers,persEnc:J.persEnc||"utf8"}),eu=this.n.sub(new(ev())(1)),ef=0;;ef++){var eg=J.k?J.k(ef):new(ev())(ea.generate(this.n.byteLength()));if(!(0>=(eg=this._truncateToN(eg,!0)).cmpn(1)||eg.cmp(eu)>=0)){var e_=this.g.mul(eg);if(!e_.isInfinity()){var ew=e_.getX(),eE=ew.umod(this.n);if(0!==eE.cmpn(0)){var eS=eg.invm(this.n).mul(eE.mul(U.getPrivate()).iadd(O));if(0!==(eS=eS.umod(this.n)).cmpn(0)){var eA=(e_.getY().isOdd()?1:0)|(0!==ew.cmp(eE)?2:0);return J.canonical&&eS.cmp(this.nh)>0&&(eS=this.n.sub(eS),eA^=1),new eF({r:eE,s:eS,recoveryParam:eA})}}}}}},EC.prototype.verify=function(O,U,$,J){O=this._truncateToN(new(ev())(O,16)),$=this.keyFromPublic($,J);var en,es=(U=new eF(U,"hex")).r,eo=U.s;if(0>es.cmpn(1)||es.cmp(this.n)>=0||0>eo.cmpn(1)||eo.cmp(this.n)>=0)return!1;var ea=eo.invm(this.n),eu=ea.mul(O).umod(this.n),ef=ea.mul(es).umod(this.n);return this.curve._maxwellTrick?!(en=this.g.jmulAdd(eu,$.getPublic(),ef)).isInfinity()&&en.eqXToP(es):!(en=this.g.mulAdd(eu,$.getPublic(),ef)).isInfinity()&&0===en.getX().umod(this.n).cmp(es)},EC.prototype.recoverPubKey=function(O,U,$,J){eK((3&$)===$,"The recovery param is more than two bits"),U=new eF(U,J);var en=this.n,es=new(ev())(O),eo=U.r,ea=U.s,eu=1&$,ef=$>>1;if(eo.cmp(this.curve.p.umod(this.curve.n))>=0&&ef)throw Error("Unable to find sencond key candinate");eo=ef?this.curve.pointFromX(eo.add(this.curve.n),eu):this.curve.pointFromX(eo,eu);var eg=U.r.invm(en),e_=en.sub(es).mul(eg).umod(en),ew=ea.mul(eg).umod(en);return this.g.mulAdd(e_,eo,ew)},EC.prototype.getKeyRecoveryParam=function(O,U,$,J){if(null!==(U=new eF(U,J)).recoveryParam)return U.recoveryParam;for(var en,es=0;es<4;es++){try{en=this.recoverPubKey(O,U,es)}catch(O){continue}if(en.eq($))return es}throw Error("Unable to find valid recovery factor")};var eH=createCommonjsModule(function(O,U){var $=U;$.version="6.5.4",$.utils=eA,$.rand=function(){throw Error("unsupported")},$.curve=eN,$.curves=eD,$.ec=ej,$.eddsa=null}).ec,eq=$(7213),eV=$(6288);let eG="signing-key/5.7.0",e$=new eV.Yd(eG),eW=null;function getCurve(){return eW||(eW=new eH("secp256k1")),eW}let SigningKey=class SigningKey{constructor(O){(0,eq.zG)(this,"curve","secp256k1"),(0,eq.zG)(this,"privateKey",(0,eo.Dv)(O)),32!==(0,eo.E1)(this.privateKey)&&e$.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey));(0,eq.zG)(this,"publicKey","0x"+U.getPublic(!1,"hex")),(0,eq.zG)(this,"compressedPublicKey","0x"+U.getPublic(!0,"hex")),(0,eq.zG)(this,"_isSigningKey",!0)}_addPoint(O){let U=getCurve().keyFromPublic((0,eo.lE)(this.publicKey)),$=getCurve().keyFromPublic((0,eo.lE)(O));return"0x"+U.pub.add($.pub).encodeCompressed("hex")}signDigest(O){let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey)),$=(0,eo.lE)(O);32!==$.length&&e$.throwArgumentError("bad digest length","digest",O);let J=U.sign($,{canonical:!0});return(0,eo.N)({recoveryParam:J.recoveryParam,r:(0,eo.$m)("0x"+J.r.toString(16),32),s:(0,eo.$m)("0x"+J.s.toString(16),32)})}computeSharedSecret(O){let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey)),$=getCurve().keyFromPublic((0,eo.lE)(computePublicKey(O)));return(0,eo.$m)("0x"+U.derive($.getPublic()).toString(16),32)}static isSigningKey(O){return!!(O&&O._isSigningKey)}};function recoverPublicKey(O,U){let $=(0,eo.N)(U),J={r:(0,eo.lE)($.r),s:(0,eo.lE)($.s)};return"0x"+getCurve().recoverPubKey((0,eo.lE)(O),J,$.recoveryParam).encode("hex",!1)}function computePublicKey(O,U){let $=(0,eo.lE)(O);if(32===$.length){let O=new SigningKey($);return U?"0x"+getCurve().keyFromPrivate($).getPublic(!0,"hex"):O.publicKey}return 33===$.length?U?(0,eo.Dv)($):"0x"+getCurve().keyFromPublic($).getPublic(!1,"hex"):65===$.length?U?"0x"+getCurve().keyFromPublic($).getPublic(!0,"hex"):(0,eo.Dv)($):e$.throwArgumentError("invalid public or private key","key","[REDACTED]")}let eY="transactions/5.7.0",eJ=new eV.Yd(eY);function handleAddress(O){return"0x"===O?null:(0,en.Kn)(O)}function handleNumber(O){return"0x"===O?ea._Y:es.O$.from(O)}function computeAddress(O){let U=computePublicKey(O);return(0,en.Kn)((0,eo.p3)((0,eu.w)((0,eo.p3)(U,1)),12))}function recoverAddress(O,U){return computeAddress(recoverPublicKey((0,eo.lE)(O),U))}function formatNumber(O,U){let $=(0,eo.G1)(es.O$.from(O).toHexString());return $.length>32&&eJ.throwArgumentError("invalid length for "+U,"transaction:"+U,O),$}function accessSetify(O,U){return{address:(0,en.Kn)(O),storageKeys:(U||[]).map((U,$)=>(32!==(0,eo.E1)(U)&&eJ.throwArgumentError("invalid access list storageKey",`accessList[${O}:${$}]`,U),U.toLowerCase()))}}function accessListify(O){if(Array.isArray(O))return O.map((O,U)=>Array.isArray(O)?(O.length>2&&eJ.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${U}]`,O),accessSetify(O[0],O[1])):accessSetify(O.address,O.storageKeys));let U=Object.keys(O).map(U=>{let $=O[U].reduce((O,U)=>(O[U]=!0,O),{});return accessSetify(U,Object.keys($).sort())});return U.sort((O,U)=>O.address.localeCompare(U.address)),U}function formatAccessList(O){return accessListify(O).map(O=>[O.address,O.storageKeys])}function _serializeEip1559(O,U){if(null!=O.gasPrice){let U=es.O$.from(O.gasPrice),$=es.O$.from(O.maxFeePerGas||0);U.eq($)||eJ.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:U,maxFeePerGas:$})}let $=[formatNumber(O.chainId||0,"chainId"),formatNumber(O.nonce||0,"nonce"),formatNumber(O.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(O.maxFeePerGas||0,"maxFeePerGas"),formatNumber(O.gasLimit||0,"gasLimit"),null!=O.to?(0,en.Kn)(O.to):"0x",formatNumber(O.value||0,"value"),O.data||"0x",formatAccessList(O.accessList||[])];if(U){let O=(0,eo.N)(U);$.push(formatNumber(O.recoveryParam,"recoveryParam")),$.push((0,eo.G1)(O.r)),$.push((0,eo.G1)(O.s))}return(0,eo.xs)(["0x02",ef.c($)])}function _serializeEip2930(O,U){let $=[formatNumber(O.chainId||0,"chainId"),formatNumber(O.nonce||0,"nonce"),formatNumber(O.gasPrice||0,"gasPrice"),formatNumber(O.gasLimit||0,"gasLimit"),null!=O.to?(0,en.Kn)(O.to):"0x",formatNumber(O.value||0,"value"),O.data||"0x",formatAccessList(O.accessList||[])];if(U){let O=(0,eo.N)(U);$.push(formatNumber(O.recoveryParam,"recoveryParam")),$.push((0,eo.G1)(O.r)),$.push((0,eo.G1)(O.s))}return(0,eo.xs)(["0x01",ef.c($)])}function _parseEipSignature(O,U,$){try{let $=handleNumber(U[0]).toNumber();if(0!==$&&1!==$)throw Error("bad recid");O.v=$}catch(O){eJ.throwArgumentError("invalid v for transaction type: 1","v",U[0])}O.r=(0,eo.$m)(U[1],32),O.s=(0,eo.$m)(U[2],32);try{let U=(0,eu.w)($(O));O.from=recoverAddress(U,{r:O.r,s:O.s,recoveryParam:O.v})}catch(O){}}function _parseEip1559(O){let U=ef.J(O.slice(1));9!==U.length&&12!==U.length&&eJ.throwArgumentError("invalid component count for transaction type: 2","payload",(0,eo.Dv)(O));let $=handleNumber(U[2]),J=handleNumber(U[3]),en={type:2,chainId:handleNumber(U[0]).toNumber(),nonce:handleNumber(U[1]).toNumber(),maxPriorityFeePerGas:$,maxFeePerGas:J,gasPrice:null,gasLimit:handleNumber(U[4]),to:handleAddress(U[5]),value:handleNumber(U[6]),data:U[7],accessList:accessListify(U[8])};return 9===U.length||(en.hash=(0,eu.w)(O),_parseEipSignature(en,U.slice(9),_serializeEip1559)),en}function _parseEip2930(O){let U=ef.J(O.slice(1));8!==U.length&&11!==U.length&&eJ.throwArgumentError("invalid component count for transaction type: 1","payload",(0,eo.Dv)(O));let $={type:1,chainId:handleNumber(U[0]).toNumber(),nonce:handleNumber(U[1]).toNumber(),gasPrice:handleNumber(U[2]),gasLimit:handleNumber(U[3]),to:handleAddress(U[4]),value:handleNumber(U[5]),data:U[6],accessList:accessListify(U[7])};return 8===U.length||($.hash=(0,eu.w)(O),_parseEipSignature($,U.slice(8),_serializeEip2930)),$}function _parse(O){let U=ef.J(O);9!==U.length&&6!==U.length&&eJ.throwArgumentError("invalid raw transaction","rawTransaction",O);let $={nonce:handleNumber(U[0]).toNumber(),gasPrice:handleNumber(U[1]),gasLimit:handleNumber(U[2]),to:handleAddress(U[3]),value:handleNumber(U[4]),data:U[5],chainId:0};if(6===U.length)return $;try{$.v=es.O$.from(U[6]).toNumber()}catch(O){return $}if($.r=(0,eo.$m)(U[7],32),$.s=(0,eo.$m)(U[8],32),es.O$.from($.r).isZero()&&es.O$.from($.s).isZero())$.chainId=$.v,$.v=0;else{$.chainId=Math.floor(($.v-35)/2),$.chainId<0&&($.chainId=0);let J=$.v-27,en=U.slice(0,6);0!==$.chainId&&(en.push((0,eo.Dv)($.chainId)),en.push("0x"),en.push("0x"),J-=2*$.chainId+8);let es=(0,eu.w)(ef.c(en));try{$.from=recoverAddress(es,{r:(0,eo.Dv)($.r),s:(0,eo.Dv)($.s),recoveryParam:J})}catch(O){}$.hash=(0,eu.w)(O)}return $.type=null,$}function parse(O){let U=(0,eo.lE)(O);if(U[0]>127)return _parse(U);switch(U[0]){case 1:return _parseEip2930(U);case 2:return _parseEip1559(U)}return eJ.throwError(`unsupported transaction type: ${U[0]}`,eV.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:U[0]})}!function(O){O[O.legacy=0]="legacy",O[O.eip2930=1]="eip2930",O[O.eip1559=2]="eip1559"}(J||(J={}))},2790:function(O){"use strict";function asPromise(O,U){for(var $=Array(arguments.length-1),J=0,en=2,es=!0;en1&&"="===O.charAt(U);)++$;return Math.ceil(3*O.length)/4-$};for(var J=Array(64),en=Array(123),es=0;es<64;)en[J[es]=es<26?es+65:es<52?es+71:es<62?es-4:es-59|43]=es++;$.encode=function(O,U,$){for(var en,es=null,eo=[],ea=0,eu=0;U<$;){var ef=O[U++];switch(eu){case 0:eo[ea++]=J[ef>>2],en=(3&ef)<<4,eu=1;break;case 1:eo[ea++]=J[en|ef>>4],en=(15&ef)<<2,eu=2;break;case 2:eo[ea++]=J[en|ef>>6],eo[ea++]=J[63&ef],eu=0}ea>8191&&((es||(es=[])).push(String.fromCharCode.apply(String,eo)),ea=0)}return(eu&&(eo[ea++]=J[en],eo[ea++]=61,1===eu&&(eo[ea++]=61)),es)?(ea&&es.push(String.fromCharCode.apply(String,eo.slice(0,ea))),es.join("")):String.fromCharCode.apply(String,eo.slice(0,ea))};var eo="invalid encoding";$.decode=function(O,U,$){for(var J,es=$,ea=0,eu=0;eu1)break;if(void 0===(ef=en[ef]))throw Error(eo);switch(ea){case 0:J=ef,ea=1;break;case 1:U[$++]=J<<2|(48&ef)>>4,J=ef,ea=2;break;case 2:U[$++]=(15&J)<<4|(60&ef)>>2,J=ef,ea=3;break;case 3:U[$++]=(3&J)<<6|ef,ea=0}}if(1===ea)throw Error(eo);return $-es},$.test=function(O){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(O)}},8919:function(O){"use strict";function codegen(O,U){"string"==typeof O&&(U=O,O=void 0);var $=[];function Codegen(O){if("string"!=typeof O){var U=toString();if(codegen.verbose&&console.log("codegen: "+U),U="return "+U,O){for(var J=Object.keys(O),en=Array(J.length+1),es=Array(J.length),eo=0;eo0?0:2147483648,$,J);else if(isNaN(U))O(2143289344,$,J);else if(U>34028234663852886e22)O((en<<31|2139095040)>>>0,$,J);else if(U<11754943508222875e-54)O((en<<31|Math.round(U/1401298464324817e-60))>>>0,$,J);else{var es=Math.floor(Math.log(U)/Math.LN2),eo=8388607&Math.round(U*Math.pow(2,-es)*8388608);O((en<<31|es+127<<23|eo)>>>0,$,J)}}function readFloat_ieee754(O,U,$){var J=O(U,$),en=(J>>31)*2+1,es=J>>>23&255,eo=8388607&J;return 255===es?eo?NaN:en*(1/0):0===es?1401298464324817e-60*en*eo:en*Math.pow(2,es-150)*(eo+8388608)}O.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),O.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),O.readFloatLE=readFloat_ieee754.bind(null,readUintLE),O.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}(),"undefined"!=typeof Float64Array?function(){var U=new Float64Array([-0]),$=new Uint8Array(U.buffer),J=128===$[7];function writeDouble_f64_cpy(O,J,en){U[0]=O,J[en]=$[0],J[en+1]=$[1],J[en+2]=$[2],J[en+3]=$[3],J[en+4]=$[4],J[en+5]=$[5],J[en+6]=$[6],J[en+7]=$[7]}function writeDouble_f64_rev(O,J,en){U[0]=O,J[en]=$[7],J[en+1]=$[6],J[en+2]=$[5],J[en+3]=$[4],J[en+4]=$[3],J[en+5]=$[2],J[en+6]=$[1],J[en+7]=$[0]}function readDouble_f64_cpy(O,J){return $[0]=O[J],$[1]=O[J+1],$[2]=O[J+2],$[3]=O[J+3],$[4]=O[J+4],$[5]=O[J+5],$[6]=O[J+6],$[7]=O[J+7],U[0]}function readDouble_f64_rev(O,J){return $[7]=O[J],$[6]=O[J+1],$[5]=O[J+2],$[4]=O[J+3],$[3]=O[J+4],$[2]=O[J+5],$[1]=O[J+6],$[0]=O[J+7],U[0]}O.writeDoubleLE=J?writeDouble_f64_cpy:writeDouble_f64_rev,O.writeDoubleBE=J?writeDouble_f64_rev:writeDouble_f64_cpy,O.readDoubleLE=J?readDouble_f64_cpy:readDouble_f64_rev,O.readDoubleBE=J?readDouble_f64_rev:readDouble_f64_cpy}():function(){function writeDouble_ieee754(O,U,$,J,en,es){var eo,ea=J<0?1:0;if(ea&&(J=-J),0===J)O(0,en,es+U),O(1/J>0?0:2147483648,en,es+$);else if(isNaN(J))O(0,en,es+U),O(2146959360,en,es+$);else if(J>17976931348623157e292)O(0,en,es+U),O((ea<<31|2146435072)>>>0,en,es+$);else if(J<22250738585072014e-324)O((eo=J/5e-324)>>>0,en,es+U),O((ea<<31|eo/4294967296)>>>0,en,es+$);else{var eu=Math.floor(Math.log(J)/Math.LN2);1024===eu&&(eu=1023),O(4503599627370496*(eo=J*Math.pow(2,-eu))>>>0,en,es+U),O((ea<<31|eu+1023<<20|1048576*eo&1048575)>>>0,en,es+$)}}function readDouble_ieee754(O,U,$,J,en){var es=O(J,en+U),eo=O(J,en+$),ea=(eo>>31)*2+1,eu=eo>>>20&2047,ef=4294967296*(1048575&eo)+es;return 2047===eu?ef?NaN:ea*(1/0):0===eu?5e-324*ea*ef:ea*Math.pow(2,eu-1075)*(ef+4503599627370496)}O.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),O.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),O.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),O.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}(),O}function writeUintLE(O,U,$){U[$]=255&O,U[$+1]=O>>>8&255,U[$+2]=O>>>16&255,U[$+3]=O>>>24}function writeUintBE(O,U,$){U[$]=O>>>24,U[$+1]=O>>>16&255,U[$+2]=O>>>8&255,U[$+3]=255&O}function readUintLE(O,U){return(O[U]|O[U+1]<<8|O[U+2]<<16|O[U+3]<<24)>>>0}function readUintBE(O,U){return(O[U]<<24|O[U+1]<<16|O[U+2]<<8|O[U+3])>>>0}O.exports=factory(factory)},4962:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},2041:function(O,U){"use strict";var $=U,J=$.isAbsolute=function(O){return/^(?:\/|\w+:)/.test(O)},en=$.normalize=function(O){var U=(O=O.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),$=J(O),en="";$&&(en=U.shift()+"/");for(var es=0;es0&&".."!==U[es-1]?U.splice(--es,2):$?U.splice(es,1):++es:"."===U[es]?U.splice(es,1):++es;return en+U.join("/")};$.resolve=function(O,U,$){return($||(U=en(U)),J(U))?U:($||(O=en(O)),(O=O.replace(/(?:\/|^)[^/]+$/,"")).length?en(O+"/"+U):U)}},3505:function(O){"use strict";function pool(O,U,$){var J=$||8192,en=J>>>1,es=null,eo=J;return function($){if($<1||$>en)return O($);eo+$>J&&(es=O(J),eo=0);var ea=U.call(es,eo,eo+=$);return 7&eo&&(eo=(7|eo)+1),ea}}O.exports=pool},6503:function(O,U){"use strict";var $=U;$.length=function(O){for(var U=0,$=0,J=0;J191&&J<224?es[eo++]=(31&J)<<6|63&O[U++]:J>239&&J<365?(J=((7&J)<<18|(63&O[U++])<<12|(63&O[U++])<<6|63&O[U++])-65536,es[eo++]=55296+(J>>10),es[eo++]=56320+(1023&J)):es[eo++]=(15&J)<<12|(63&O[U++])<<6|63&O[U++],eo>8191&&((en||(en=[])).push(String.fromCharCode.apply(String,es)),eo=0);return en?(eo&&en.push(String.fromCharCode.apply(String,es.slice(0,eo))),en.join("")):String.fromCharCode.apply(String,es.slice(0,eo))},$.write=function(O,U,$){for(var J,en,es=$,eo=0;eo>6|192:((64512&J)==55296&&(64512&(en=O.charCodeAt(eo+1)))==56320?(J=65536+((1023&J)<<10)+(1023&en),++eo,U[$++]=J>>18|240,U[$++]=J>>12&63|128):U[$++]=J>>12|224,U[$++]=J>>6&63|128),U[$++]=63&J|128);return $-es}},9055:function(O,U,$){var J,en=$(2601);!function(){"use strict";var es="input is invalid type",eo="finalize already called",ea="object"==typeof window,eu=ea?window:{};eu.JS_SHA3_NO_WINDOW&&(ea=!1);var ef=!ea&&"object"==typeof self;!eu.JS_SHA3_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node?eu=$.g:ef&&(eu=self);for(var eg=!eu.JS_SHA3_NO_COMMON_JS&&O.exports,ev=$.amdO,e_=!eu.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ew="0123456789abcdef".split(""),eE=[31,7936,2031616,520093696],eS=[4,1024,262144,67108864],eA=[1,256,65536,16777216],eI=[6,1536,393216,100663296],eP=[0,8,16,24],ek=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],eT=[224,256,384,512],eR=[128,256],eC=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136},eN=eu.JS_SHA3_NO_NODE_JS||!Array.isArray?function(O){return"[object Array]"===Object.prototype.toString.call(O)}:Array.isArray,eD=e_&&(eu.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)?function(O){return"object"==typeof O&&O.buffer&&O.buffer.constructor===ArrayBuffer}:ArrayBuffer.isView,formatMessage=function(O){var U=typeof O;if("string"===U)return[O,!0];if("object"!==U||null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)return[new Uint8Array(O),!1];if(!eN(O)&&!eD(O))throw Error(es);return[O,!1]},empty=function(O){return 0===formatMessage(O)[0].length},createOutputMethod=function(O,U,$){return function(J){return new Keccak(O,U,O).update(J)[$]()}},createShakeOutputMethod=function(O,U,$){return function(J,en){return new Keccak(O,U,en).update(J)[$]()}},createCshakeOutputMethod=function(O,U,$){return function(U,J,en,es){return eO["cshake"+O].update(U,J,en,es)[$]()}},createKmacOutputMethod=function(O,U,$){return function(U,J,en,es){return eO["kmac"+O].update(U,J,en,es)[$]()}},createOutputMethods=function(O,U,$,J){for(var en=0;en>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=(31&$)>>3;for(var J=0;J<50;++J)this.s[J]=0}function Kmac(O,U,$){Keccak.call(this,O,U,$)}Keccak.prototype.update=function(O){if(this.finalized)throw Error(eo);var U=formatMessage(O);O=U[0];for(var $,J,en=U[1],es=this.blocks,ea=this.byteCount,eu=O.length,ef=this.blockCount,eg=0,ev=this.s;eg>2]|=J<>2]|=(192|J>>6)<=57344?es[$>>2]|=(224|J>>12)<>2]|=(240|J>>18)<>2]|=(128|J>>12&63)<>2]|=(128|J>>6&63)<>2]|=(128|63&J)<>2]|=O[eg]<=ea){for(this.start=$-ea,this.block=es[ef],$=0;$>=8,$=255&O;$>0;)en.unshift($),O>>=8,$=255&O,++J;return U?en.push(J):en.unshift(J),this.update(en),en.length},Keccak.prototype.encodeString=function(O){var U=formatMessage(O);O=U[0];var $=U[1],J=0,en=O.length;if($)for(var es=0;es=57344?J+=3:(eo=65536+((1023&eo)<<10|1023&O.charCodeAt(++es)),J+=4)}else J=en;return J+=this.encode(8*J),this.update(O),J},Keccak.prototype.bytepad=function(O,U){for(var $=this.encode(U),J=0;J>2]|=this.padding[3&U],this.lastByteIndex===this.byteCount)for(U=1,O[0]=O[$];U<$+1;++U)O[U]=0;for(O[$-1]|=2147483648,U=0;U<$;++U)J[U]^=O[U];f(J)}},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea="";eo>4&15]+ew[15&O]+ew[O>>12&15]+ew[O>>8&15]+ew[O>>20&15]+ew[O>>16&15]+ew[O>>28&15]+ew[O>>24&15];eo%U==0&&(f($),es=0)}return en&&(ea+=ew[(O=$[es])>>4&15]+ew[15&O],en>1&&(ea+=ew[O>>12&15]+ew[O>>8&15]),en>2&&(ea+=ew[O>>20&15]+ew[O>>16&15])),ea},Keccak.prototype.arrayBuffer=function(){this.finalize();var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea=this.outputBits>>3;O=new ArrayBuffer(en?J+1<<2:ea);for(var eu=new Uint32Array(O);eo>8&255,eu[O+2]=U>>16&255,eu[O+3]=U>>24&255;ea%$==0&&f(J)}return es&&(O=ea<<2,U=J[eo],eu[O]=255&U,es>1&&(eu[O+1]=U>>8&255),es>2&&(eu[O+2]=U>>16&255)),eu},Kmac.prototype=new Keccak,Kmac.prototype.finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(O){var U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS,eA,eI,eP,eT,eR,eC,eB,eN,eD,eM,eO,eL,eU,eF,eK,ej,eH,eq,eV,eG,e$,eW,eY,eJ,eQ,eZ,eX,e0,e1,e3,e6,e5,e9,e7,te,tt,tr,ta,tu,th,td,tf,tp,tg,tm,ty,tb,tv;for(J=0;J<48;J+=2)en=O[0]^O[10]^O[20]^O[30]^O[40],es=O[1]^O[11]^O[21]^O[31]^O[41],eo=O[2]^O[12]^O[22]^O[32]^O[42],ea=O[3]^O[13]^O[23]^O[33]^O[43],eu=O[4]^O[14]^O[24]^O[34]^O[44],ef=O[5]^O[15]^O[25]^O[35]^O[45],eg=O[6]^O[16]^O[26]^O[36]^O[46],ev=O[7]^O[17]^O[27]^O[37]^O[47],e_=O[8]^O[18]^O[28]^O[38]^O[48],ew=O[9]^O[19]^O[29]^O[39]^O[49],U=e_^(eo<<1|ea>>>31),$=ew^(ea<<1|eo>>>31),O[0]^=U,O[1]^=$,O[10]^=U,O[11]^=$,O[20]^=U,O[21]^=$,O[30]^=U,O[31]^=$,O[40]^=U,O[41]^=$,U=en^(eu<<1|ef>>>31),$=es^(ef<<1|eu>>>31),O[2]^=U,O[3]^=$,O[12]^=U,O[13]^=$,O[22]^=U,O[23]^=$,O[32]^=U,O[33]^=$,O[42]^=U,O[43]^=$,U=eo^(eg<<1|ev>>>31),$=ea^(ev<<1|eg>>>31),O[4]^=U,O[5]^=$,O[14]^=U,O[15]^=$,O[24]^=U,O[25]^=$,O[34]^=U,O[35]^=$,O[44]^=U,O[45]^=$,U=eu^(e_<<1|ew>>>31),$=ef^(ew<<1|e_>>>31),O[6]^=U,O[7]^=$,O[16]^=U,O[17]^=$,O[26]^=U,O[27]^=$,O[36]^=U,O[37]^=$,O[46]^=U,O[47]^=$,U=eg^(en<<1|es>>>31),$=ev^(es<<1|en>>>31),O[8]^=U,O[9]^=$,O[18]^=U,O[19]^=$,O[28]^=U,O[29]^=$,O[38]^=U,O[39]^=$,O[48]^=U,O[49]^=$,eE=O[0],eS=O[1],e6=O[11]<<4|O[10]>>>28,e5=O[10]<<4|O[11]>>>28,eU=O[20]<<3|O[21]>>>29,eF=O[21]<<3|O[20]>>>29,tm=O[31]<<9|O[30]>>>23,ty=O[30]<<9|O[31]>>>23,eX=O[40]<<18|O[41]>>>14,e0=O[41]<<18|O[40]>>>14,eV=O[2]<<1|O[3]>>>31,eG=O[3]<<1|O[2]>>>31,eA=O[13]<<12|O[12]>>>20,eI=O[12]<<12|O[13]>>>20,e9=O[22]<<10|O[23]>>>22,e7=O[23]<<10|O[22]>>>22,eK=O[33]<<13|O[32]>>>19,ej=O[32]<<13|O[33]>>>19,tb=O[42]<<2|O[43]>>>30,tv=O[43]<<2|O[42]>>>30,tu=O[5]<<30|O[4]>>>2,th=O[4]<<30|O[5]>>>2,e$=O[14]<<6|O[15]>>>26,eW=O[15]<<6|O[14]>>>26,eP=O[25]<<11|O[24]>>>21,eT=O[24]<<11|O[25]>>>21,te=O[34]<<15|O[35]>>>17,tt=O[35]<<15|O[34]>>>17,eH=O[45]<<29|O[44]>>>3,eq=O[44]<<29|O[45]>>>3,eD=O[6]<<28|O[7]>>>4,eM=O[7]<<28|O[6]>>>4,td=O[17]<<23|O[16]>>>9,tf=O[16]<<23|O[17]>>>9,eY=O[26]<<25|O[27]>>>7,eJ=O[27]<<25|O[26]>>>7,eR=O[36]<<21|O[37]>>>11,eC=O[37]<<21|O[36]>>>11,tr=O[47]<<24|O[46]>>>8,ta=O[46]<<24|O[47]>>>8,e1=O[8]<<27|O[9]>>>5,e3=O[9]<<27|O[8]>>>5,eO=O[18]<<20|O[19]>>>12,eL=O[19]<<20|O[18]>>>12,tp=O[29]<<7|O[28]>>>25,tg=O[28]<<7|O[29]>>>25,eQ=O[38]<<8|O[39]>>>24,eZ=O[39]<<8|O[38]>>>24,eB=O[48]<<14|O[49]>>>18,eN=O[49]<<14|O[48]>>>18,O[0]=eE^~eA&eP,O[1]=eS^~eI&eT,O[10]=eD^~eO&eU,O[11]=eM^~eL&eF,O[20]=eV^~e$&eY,O[21]=eG^~eW&eJ,O[30]=e1^~e6&e9,O[31]=e3^~e5&e7,O[40]=tu^~td&tp,O[41]=th^~tf&tg,O[2]=eA^~eP&eR,O[3]=eI^~eT&eC,O[12]=eO^~eU&eK,O[13]=eL^~eF&ej,O[22]=e$^~eY&eQ,O[23]=eW^~eJ&eZ,O[32]=e6^~e9&te,O[33]=e5^~e7&tt,O[42]=td^~tp&tm,O[43]=tf^~tg&ty,O[4]=eP^~eR&eB,O[5]=eT^~eC&eN,O[14]=eU^~eK&eH,O[15]=eF^~ej&eq,O[24]=eY^~eQ&eX,O[25]=eJ^~eZ&e0,O[34]=e9^~te&tr,O[35]=e7^~tt&ta,O[44]=tp^~tm&tb,O[45]=tg^~ty&tv,O[6]=eR^~eB&eE,O[7]=eC^~eN&eS,O[16]=eK^~eH&eD,O[17]=ej^~eq&eM,O[26]=eQ^~eX&eV,O[27]=eZ^~e0&eG,O[36]=te^~tr&e1,O[37]=tt^~ta&e3,O[46]=tm^~tb&tu,O[47]=ty^~tv&th,O[8]=eB^~eE&eA,O[9]=eN^~eS&eI,O[18]=eH^~eD&eO,O[19]=eq^~eM&eL,O[28]=eX^~eV&e$,O[29]=e0^~eG&eW,O[38]=tr^~e1&e6,O[39]=ta^~e3&e5,O[48]=tb^~tu&td,O[49]=tv^~th&tf,O[0]^=ek[J],O[1]^=ek[J+1]};if(eg)O.exports=eO;else{for(eU=0;eU127)break;es[en+eo]=U}if(eo!==J){0!==eo&&(O=O.slice(eo)),en=$(en,J,J=eo+3*O.length);let U=getUint8Memory0().subarray(en+eo,en+J),es=eg(O,U);eo+=es.written}return eu=eo,en}function isLikeNone(O){return null==O}let ev=null;function getInt32Memory0(){return(null===ev||0===ev.byteLength)&&(ev=new Int32Array(J.memory.buffer)),ev}function debugString(O){let U;let $=typeof O;if("number"==$||"boolean"==$||null==O)return`${O}`;if("string"==$)return`"${O}"`;if("symbol"==$){let U=O.description;return null==U?"Symbol":`Symbol(${U})`}if("function"==$){let U=O.name;return"string"==typeof U&&U.length>0?`Function(${U})`:"Function"}if(Array.isArray(O)){let U=O.length,$="[";U>0&&($+=debugString(O[0]));for(let J=1;J1))return toString.call(O);if("Object"==(U=J[1]))try{return"Object("+JSON.stringify(O)+")"}catch(O){return"Object"}return O instanceof Error?`${O.name}: ${O.message} -${O.stack}`:U}function init_panic_hook(){J.init_panic_hook()}function newRLN(O,U,$){try{let eo=J.__wbindgen_add_to_stack_pointer(-16);J.newRLN(eo,O,addHeapObject(U),addHeapObject($));var en=getInt32Memory0()[eo/4+0],es=getInt32Memory0()[eo/4+1];if(getInt32Memory0()[eo/4+2])throw takeObject(es);return en}finally{J.__wbindgen_add_to_stack_pointer(16)}}function getSerializedRLNWitness(O,U){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.getSerializedRLNWitness(es,O,addHeapObject(U));var $=getInt32Memory0()[es/4+0],en=getInt32Memory0()[es/4+1];if(getInt32Memory0()[es/4+2])throw takeObject(en);return takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function insertMember(O,U){try{let en=J.__wbindgen_add_to_stack_pointer(-16);J.insertMember(en,O,addHeapObject(U));var $=getInt32Memory0()[en/4+0];if(getInt32Memory0()[en/4+1])throw takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function setLeavesFrom(O,U,$){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.setLeavesFrom(es,O,U,addHeapObject($));var en=getInt32Memory0()[es/4+0];if(getInt32Memory0()[es/4+1])throw takeObject(en)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function deleteLeaf(O,U){try{let en=J.__wbindgen_add_to_stack_pointer(-16);J.deleteLeaf(en,O,U);var $=getInt32Memory0()[en/4+0];if(getInt32Memory0()[en/4+1])throw takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function RLNWitnessToJson(O,U){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.RLNWitnessToJson(es,O,addHeapObject(U));var $=getInt32Memory0()[es/4+0],en=getInt32Memory0()[es/4+1];if(getInt32Memory0()[es/4+2])throw takeObject(en);return takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}let e_=null;function getUint32Memory0(){return(null===e_||0===e_.byteLength)&&(e_=new Uint32Array(J.memory.buffer)),e_}function passArrayJsValueToWasm0(O,U){let $=U(4*O.length),J=getUint32Memory0();for(let U=0;U>>0]=takeObject($)},U.wbg.__wbg_toString_91b13ec0b518b06b=function(){return handleError(function(O,U){let $=getObject(O).toString(U);return addHeapObject($)},arguments)},U.wbg.__wbg_call_9495de66fdbe016b=function(){return handleError(function(O,U,$){let J=getObject(O).call(getObject(U),getObject($));return addHeapObject(J)},arguments)},U.wbg.__wbg_set_388c4c6422704173=function(O,U,$){let J=getObject(O).set(getObject(U),getObject($));return addHeapObject(J)},U.wbg.__wbg_fromEntries_47a432d7604fc06a=function(){return handleError(function(O){let U=Object.fromEntries(getObject(O));return addHeapObject(U)},arguments)},U.wbg.__wbg_buffer_cf65c07de34b9a08=function(O){let U=getObject(O).buffer;return addHeapObject(U)},U.wbg.__wbg_newwithbyteoffsetandlength_9fb2f11355ecadf5=function(O,U,$){let J=new Uint8Array(getObject(O),U>>>0,$>>>0);return addHeapObject(J)},U.wbg.__wbg_new_537b7341ce90bb31=function(O){let U=new Uint8Array(getObject(O));return addHeapObject(U)},U.wbg.__wbg_set_17499e8aa4003ebd=function(O,U,$){getObject(O).set(getObject(U),$>>>0)},U.wbg.__wbg_length_27a2afe8ab42b09f=function(O){let U=getObject(O).length;return U},U.wbg.__wbg_newwithlength_b56c882b57805732=function(O){let U=new Uint8Array(O>>>0);return addHeapObject(U)},U.wbg.__wbg_subarray_7526649b91a252a6=function(O,U,$){let J=getObject(O).subarray(U>>>0,$>>>0);return addHeapObject(J)},U.wbg.__wbindgen_debug_string=function(O,U){let $=debugString(getObject(U)),en=passStringToWasm0($,J.__wbindgen_malloc,J.__wbindgen_realloc),es=eu;getInt32Memory0()[O/4+1]=es,getInt32Memory0()[O/4+0]=en},U.wbg.__wbindgen_throw=function(O,U){throw Error(getStringFromWasm0(O,U))},U.wbg.__wbindgen_memory=function(){let O=J.memory;return addHeapObject(O)},U}function finalizeInit(O,U){return J=O.exports,init.__wbindgen_wasm_module=U,ev=null,e_=null,eo=null,J}async function init(O){void 0===O&&(O=new $.U($(632)));let U=getImports();("string"==typeof O||"function"==typeof Request&&O instanceof Request||"function"==typeof URL&&O instanceof URL)&&(O=fetch(O));let{instance:J,module:en}=await load(await O,U);return finalizeInit(J,en)}U.ZP=init},6942:function(O){"use strict";for(var U="qpzry9x8gf2tvdw0s3jn54khce6mua7l",$={},J=0;J>25;return(33554431&O)<<5^996825010&-(U>>0&1)^642813549&-(U>>1&1)^513874426&-(U>>2&1)^1027748829&-(U>>3&1)^705979059&-(U>>4&1)}function prefixChk(O){for(var U=1,$=0;$126)return"Invalid prefix ("+O+")";U=polymodStep(U)^J>>5}for($=0,U=polymodStep(U);$J)throw TypeError("Exceeds length limit");var en=prefixChk(O=O.toLowerCase());if("string"==typeof en)throw Error(en);for(var es=O+"1",eo=0;eo<$.length;++eo){var ea=$[eo];if(ea>>5!=0)throw Error("Non 5-bit word");en=polymodStep(en)^ea,es+=U.charAt(ea)}for(eo=0;eo<6;++eo)en=polymodStep(en);for(en^=1,eo=0;eo<6;++eo){var eu=en>>(5-eo)*5&31;es+=U.charAt(eu)}return es}function __decode(O,U){if(U=U||90,O.length<8)return O+" too short";if(O.length>U)return"Exceeds length limit";var J=O.toLowerCase(),en=O.toUpperCase();if(O!==J&&O!==en)return"Mixed-case string "+O;var es=(O=J).lastIndexOf("1");if(-1===es)return"No separator character for "+O;if(0===es)return"Missing prefix for "+O;var eo=O.slice(0,es),ea=O.slice(es+1);if(ea.length<6)return"Data too short";var eu=prefixChk(eo);if("string"==typeof eu)return eu;for(var ef=[],eg=0;eg=ea.length||ef.push(e_)}return 1!==eu?"Invalid checksum for "+O:{prefix:eo,words:ef}}function decodeUnsafe(){var O=__decode.apply(null,arguments);if("object"==typeof O)return O}function decode(O){var U=__decode.apply(null,arguments);if("object"==typeof U)return U;throw Error(U)}function convert(O,U,$,J){for(var en=0,es=0,eo=(1<<$)-1,ea=[],eu=0;eu=$;)ea.push(en>>(es-=$)&eo);if(J)es>0&&ea.push(en<<$-es&eo);else{if(es>=U)return"Excess padding";if(en<<$-es&eo)return"Non-zero padding"}return ea}function toWordsUnsafe(O){var U=convert(O,8,5,!0);if(Array.isArray(U))return U}function toWords(O){var U=convert(O,8,5,!0);if(Array.isArray(U))return U;throw Error(U)}function fromWordsUnsafe(O){var U=convert(O,5,8,!1);if(Array.isArray(U))return U}function fromWords(O){var U=convert(O,5,8,!1);if(Array.isArray(U))return U;throw Error(U)}O.exports={decodeUnsafe:decodeUnsafe,decode:decode,encode:encode,toWordsUnsafe:toWordsUnsafe,toWords:toWords,fromWordsUnsafe:fromWordsUnsafe,fromWords:fromWords}},6662:function(O,U,$){!function(O,U){"use strict";function assert(O,U){if(!O)throw Error(U||"Assertion failed")}function inherits(O,U){O.super_=U;var TempCtor=function(){};TempCtor.prototype=U.prototype,O.prototype=new TempCtor,O.prototype.constructor=O}function BN(O,U,$){if(BN.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,null!==O&&(("le"===U||"be"===U)&&($=U,U=10),this._init(O||0,U||10,$||"be"))}"object"==typeof O?O.exports=BN:U.BN=BN,BN.BN=BN,BN.wordSize=26;try{J="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:$(6601).Buffer}catch(O){}function parseHex4Bits(O,U){var $=O.charCodeAt(U);return $>=48&&$<=57?$-48:$>=65&&$<=70?$-55:$>=97&&$<=102?$-87:void assert(!1,"Invalid character in "+O)}function parseHexByte(O,U,$){var J=parseHex4Bits(O,$);return $-1>=U&&(J|=parseHex4Bits(O,$-1)<<4),J}function parseBase(O,U,$,J){for(var en=0,es=0,eo=Math.min(O.length,$),ea=U;ea=49?eu-49+10:eu>=17?eu-17+10:eu,assert(eu>=0&&es0?O:U},BN.min=function(O,U){return 0>O.cmp(U)?O:U},BN.prototype._init=function(O,U,$){if("number"==typeof O)return this._initNumber(O,U,$);if("object"==typeof O)return this._initArray(O,U,$);"hex"===U&&(U=16),assert(U===(0|U)&&U>=2&&U<=36);var J=0;"-"===(O=O.toString().replace(/\s+/g,""))[0]&&(J++,this.negative=1),J=0;es-=3)en=O[es]|O[es-1]<<8|O[es-2]<<16,this.words[J]|=en<>>26-eo&67108863,(eo+=24)>=26&&(eo-=26,J++);else if("le"===$)for(es=0,J=0;es>>26-eo&67108863,(eo+=24)>=26&&(eo-=26,J++);return this._strip()},BN.prototype._parseHex=function(O,U,$){this.length=Math.ceil((O.length-U)/6),this.words=Array(this.length);for(var J,en=0;en=U;en-=2)J=parseHexByte(O,U,en)<=18?(es-=18,eo+=1,this.words[eo]|=J>>>26):es+=8;else for(en=(O.length-U)%2==0?U+1:U;en=18?(es-=18,eo+=1,this.words[eo]|=J>>>26):es+=8;this._strip()},BN.prototype._parseBase=function(O,U,$){this.words=[0],this.length=1;for(var J=0,en=1;en<=67108863;en*=U)J++;J--,en=en/U|0;for(var es=O.length-$,eo=es%J,ea=Math.min(es,es-eo)+$,eu=0,ef=$;ef1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(O){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?""}var J,en=["","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"],es=[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],eo=[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];BN.prototype.toString=function(O,U){if(U=0|U||1,16===(O=O||10)||"hex"===O){$="";for(var $,J=0,ea=0,eu=0;eu>>24-J&16777215,(J+=2)>=26&&(J-=26,eu--),$=0!==ea||eu!==this.length-1?en[6-eg.length]+eg+$:eg+$}for(0!==ea&&($=ea.toString(16)+$);$.length%U!=0;)$="0"+$;return 0!==this.negative&&($="-"+$),$}if(O===(0|O)&&O>=2&&O<=36){var ev=es[O],e_=eo[O];$="";var ew=this.clone();for(ew.negative=0;!ew.isZero();){var eE=ew.modrn(e_).toString(O);$=(ew=ew.idivn(e_)).isZero()?eE+$:en[ev-eE.length]+eE+$}for(this.isZero()&&($="0"+$);$.length%U!=0;)$="0"+$;return 0!==this.negative&&($="-"+$),$}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var O=this.words[0];return 2===this.length?O+=67108864*this.words[1]:3===this.length&&1===this.words[2]?O+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-O:O},BN.prototype.toJSON=function(){return this.toString(16,2)},J&&(BN.prototype.toBuffer=function(O,U){return this.toArrayLike(J,O,U)}),BN.prototype.toArray=function(O,U){return this.toArrayLike(Array,O,U)};var allocate=function(O,U){return O.allocUnsafe?O.allocUnsafe(U):new O(U)};function toBitArray(O){for(var U=Array(O.bitLength()),$=0;$>>en&1}return U}function smallMulTo(O,U,$){$.negative=U.negative^O.negative;var J=O.length+U.length|0;$.length=J,J=J-1|0;var en=0|O.words[0],es=0|U.words[0],eo=en*es,ea=67108863&eo,eu=eo/67108864|0;$.words[0]=ea;for(var ef=1;ef>>26,ev=67108863&eu,e_=Math.min(ef,U.length-1),ew=Math.max(0,ef-O.length+1);ew<=e_;ew++){var eE=ef-ew|0;eg+=(eo=(en=0|O.words[eE])*(es=0|U.words[ew])+ev)/67108864|0,ev=67108863&eo}$.words[ef]=0|ev,eu=0|eg}return 0!==eu?$.words[ef]=0|eu:$.length--,$._strip()}BN.prototype.toArrayLike=function(O,U,$){this._strip();var J=this.byteLength(),en=$||Math.max(1,J);assert(J<=en,"byte array longer than desired length"),assert(en>0,"Requested array length <= 0");var es=allocate(O,en);return this["_toArrayLike"+("le"===U?"LE":"BE")](es,J),es},BN.prototype._toArrayLikeLE=function(O,U){for(var $=0,J=0,en=0,es=0;en>8&255),$>16&255),6===es?($>24&255),J=0,es=0):(J=eo>>>24,es+=2)}if($=0&&(O[$--]=eo>>8&255),$>=0&&(O[$--]=eo>>16&255),6===es?($>=0&&(O[$--]=eo>>24&255),J=0,es=0):(J=eo>>>24,es+=2)}if($>=0)for(O[$--]=J;$>=0;)O[$--]=0},Math.clz32?BN.prototype._countBits=function(O){return 32-Math.clz32(O)}:BN.prototype._countBits=function(O){var U=O,$=0;return U>=4096&&($+=13,U>>>=13),U>=64&&($+=7,U>>>=7),U>=8&&($+=4,U>>>=4),U>=2&&($+=2,U>>>=2),$+U},BN.prototype._zeroBits=function(O){if(0===O)return 26;var U=O,$=0;return(8191&U)==0&&($+=13,U>>>=13),(127&U)==0&&($+=7,U>>>=7),(15&U)==0&&($+=4,U>>>=4),(3&U)==0&&($+=2,U>>>=2),(1&U)==0&&$++,$},BN.prototype.bitLength=function(){var O=this.words[this.length-1],U=this._countBits(O);return(this.length-1)*26+U},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,U=0;UO.length?this.clone().ior(O):O.clone().ior(this)},BN.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},BN.prototype.iuand=function(O){var U;U=this.length>O.length?O:this;for(var $=0;$O.length?this.clone().iand(O):O.clone().iand(this)},BN.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},BN.prototype.iuxor=function(O){this.length>O.length?(U=this,$=O):(U=O,$=this);for(var U,$,J=0;J<$.length;J++)this.words[J]=U.words[J]^$.words[J];if(this!==U)for(;JO.length?this.clone().ixor(O):O.clone().ixor(this)},BN.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},BN.prototype.inotn=function(O){assert("number"==typeof O&&O>=0);var U=0|Math.ceil(O/26),$=O%26;this._expand(U),$>0&&U--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-$),this._strip()},BN.prototype.notn=function(O){return this.clone().inotn(O)},BN.prototype.setn=function(O,U){assert("number"==typeof O&&O>=0);var $=O/26|0,J=O%26;return this._expand($+1),U?this.words[$]=this.words[$]|1<O.length?($=this,J=O):($=O,J=this);for(var U,$,J,en=0,es=0;es>>26;for(;0!==en&&es<$.length;es++)U=(0|$.words[es])+en,this.words[es]=67108863&U,en=U>>>26;if(this.length=$.length,0!==en)this.words[this.length]=en,this.length++;else if($!==this)for(;es<$.length;es++)this.words[es]=$.words[es];return this},BN.prototype.add=function(O){var U;return 0!==O.negative&&0===this.negative?(O.negative=0,U=this.sub(O),O.negative^=1,U):0===O.negative&&0!==this.negative?(this.negative=0,U=O.sub(this),this.negative=1,U):this.length>O.length?this.clone().iadd(O):O.clone().iadd(this)},BN.prototype.isub=function(O){if(0!==O.negative){O.negative=0;var U,$,J=this.iadd(O);return O.negative=1,J._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var en=this.cmp(O);if(0===en)return this.negative=0,this.length=1,this.words[0]=0,this;en>0?(U=this,$=O):(U=O,$=this);for(var es=0,eo=0;eo<$.length;eo++)es=(J=(0|U.words[eo])-(0|$.words[eo])+es)>>26,this.words[eo]=67108863&J;for(;0!==es&&eo>26,this.words[eo]=67108863&J;if(0===es&&eo>>13,ew=0|eo[1],eE=8191&ew,eS=ew>>>13,eA=0|eo[2],eI=8191&eA,eP=eA>>>13,ek=0|eo[3],eT=8191&ek,eR=ek>>>13,eC=0|eo[4],eB=8191&eC,eN=eC>>>13,eD=0|eo[5],eM=8191&eD,eO=eD>>>13,eL=0|eo[6],eU=8191&eL,eF=eL>>>13,eK=0|eo[7],ej=8191&eK,eH=eK>>>13,eq=0|eo[8],eV=8191&eq,eG=eq>>>13,e$=0|eo[9],eW=8191&e$,eY=e$>>>13,eJ=0|ea[0],eQ=8191&eJ,eZ=eJ>>>13,eX=0|ea[1],e0=8191&eX,e1=eX>>>13,e3=0|ea[2],e6=8191&e3,e5=e3>>>13,e9=0|ea[3],e7=8191&e9,te=e9>>>13,tt=0|ea[4],tr=8191&tt,ta=tt>>>13,tu=0|ea[5],th=8191&tu,td=tu>>>13,tf=0|ea[6],tp=8191&tf,tg=tf>>>13,tm=0|ea[7],ty=8191&tm,tb=tm>>>13,tv=0|ea[8],t_=8191&tv,tw=tv>>>13,tE=0|ea[9],tS=8191&tE,tA=tE>>>13;$.negative=O.negative^U.negative,$.length=19;var tI=(ef+(J=Math.imul(ev,eQ))|0)+((8191&(en=(en=Math.imul(ev,eZ))+Math.imul(e_,eQ)|0))<<13)|0;ef=((es=Math.imul(e_,eZ))+(en>>>13)|0)+(tI>>>26)|0,tI&=67108863,J=Math.imul(eE,eQ),en=(en=Math.imul(eE,eZ))+Math.imul(eS,eQ)|0,es=Math.imul(eS,eZ);var tP=(ef+(J=J+Math.imul(ev,e0)|0)|0)+((8191&(en=(en=en+Math.imul(ev,e1)|0)+Math.imul(e_,e0)|0))<<13)|0;ef=((es=es+Math.imul(e_,e1)|0)+(en>>>13)|0)+(tP>>>26)|0,tP&=67108863,J=Math.imul(eI,eQ),en=(en=Math.imul(eI,eZ))+Math.imul(eP,eQ)|0,es=Math.imul(eP,eZ),J=J+Math.imul(eE,e0)|0,en=(en=en+Math.imul(eE,e1)|0)+Math.imul(eS,e0)|0,es=es+Math.imul(eS,e1)|0;var tk=(ef+(J=J+Math.imul(ev,e6)|0)|0)+((8191&(en=(en=en+Math.imul(ev,e5)|0)+Math.imul(e_,e6)|0))<<13)|0;ef=((es=es+Math.imul(e_,e5)|0)+(en>>>13)|0)+(tk>>>26)|0,tk&=67108863,J=Math.imul(eT,eQ),en=(en=Math.imul(eT,eZ))+Math.imul(eR,eQ)|0,es=Math.imul(eR,eZ),J=J+Math.imul(eI,e0)|0,en=(en=en+Math.imul(eI,e1)|0)+Math.imul(eP,e0)|0,es=es+Math.imul(eP,e1)|0,J=J+Math.imul(eE,e6)|0,en=(en=en+Math.imul(eE,e5)|0)+Math.imul(eS,e6)|0,es=es+Math.imul(eS,e5)|0;var tT=(ef+(J=J+Math.imul(ev,e7)|0)|0)+((8191&(en=(en=en+Math.imul(ev,te)|0)+Math.imul(e_,e7)|0))<<13)|0;ef=((es=es+Math.imul(e_,te)|0)+(en>>>13)|0)+(tT>>>26)|0,tT&=67108863,J=Math.imul(eB,eQ),en=(en=Math.imul(eB,eZ))+Math.imul(eN,eQ)|0,es=Math.imul(eN,eZ),J=J+Math.imul(eT,e0)|0,en=(en=en+Math.imul(eT,e1)|0)+Math.imul(eR,e0)|0,es=es+Math.imul(eR,e1)|0,J=J+Math.imul(eI,e6)|0,en=(en=en+Math.imul(eI,e5)|0)+Math.imul(eP,e6)|0,es=es+Math.imul(eP,e5)|0,J=J+Math.imul(eE,e7)|0,en=(en=en+Math.imul(eE,te)|0)+Math.imul(eS,e7)|0,es=es+Math.imul(eS,te)|0;var tR=(ef+(J=J+Math.imul(ev,tr)|0)|0)+((8191&(en=(en=en+Math.imul(ev,ta)|0)+Math.imul(e_,tr)|0))<<13)|0;ef=((es=es+Math.imul(e_,ta)|0)+(en>>>13)|0)+(tR>>>26)|0,tR&=67108863,J=Math.imul(eM,eQ),en=(en=Math.imul(eM,eZ))+Math.imul(eO,eQ)|0,es=Math.imul(eO,eZ),J=J+Math.imul(eB,e0)|0,en=(en=en+Math.imul(eB,e1)|0)+Math.imul(eN,e0)|0,es=es+Math.imul(eN,e1)|0,J=J+Math.imul(eT,e6)|0,en=(en=en+Math.imul(eT,e5)|0)+Math.imul(eR,e6)|0,es=es+Math.imul(eR,e5)|0,J=J+Math.imul(eI,e7)|0,en=(en=en+Math.imul(eI,te)|0)+Math.imul(eP,e7)|0,es=es+Math.imul(eP,te)|0,J=J+Math.imul(eE,tr)|0,en=(en=en+Math.imul(eE,ta)|0)+Math.imul(eS,tr)|0,es=es+Math.imul(eS,ta)|0;var tC=(ef+(J=J+Math.imul(ev,th)|0)|0)+((8191&(en=(en=en+Math.imul(ev,td)|0)+Math.imul(e_,th)|0))<<13)|0;ef=((es=es+Math.imul(e_,td)|0)+(en>>>13)|0)+(tC>>>26)|0,tC&=67108863,J=Math.imul(eU,eQ),en=(en=Math.imul(eU,eZ))+Math.imul(eF,eQ)|0,es=Math.imul(eF,eZ),J=J+Math.imul(eM,e0)|0,en=(en=en+Math.imul(eM,e1)|0)+Math.imul(eO,e0)|0,es=es+Math.imul(eO,e1)|0,J=J+Math.imul(eB,e6)|0,en=(en=en+Math.imul(eB,e5)|0)+Math.imul(eN,e6)|0,es=es+Math.imul(eN,e5)|0,J=J+Math.imul(eT,e7)|0,en=(en=en+Math.imul(eT,te)|0)+Math.imul(eR,e7)|0,es=es+Math.imul(eR,te)|0,J=J+Math.imul(eI,tr)|0,en=(en=en+Math.imul(eI,ta)|0)+Math.imul(eP,tr)|0,es=es+Math.imul(eP,ta)|0,J=J+Math.imul(eE,th)|0,en=(en=en+Math.imul(eE,td)|0)+Math.imul(eS,th)|0,es=es+Math.imul(eS,td)|0;var tB=(ef+(J=J+Math.imul(ev,tp)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tg)|0)+Math.imul(e_,tp)|0))<<13)|0;ef=((es=es+Math.imul(e_,tg)|0)+(en>>>13)|0)+(tB>>>26)|0,tB&=67108863,J=Math.imul(ej,eQ),en=(en=Math.imul(ej,eZ))+Math.imul(eH,eQ)|0,es=Math.imul(eH,eZ),J=J+Math.imul(eU,e0)|0,en=(en=en+Math.imul(eU,e1)|0)+Math.imul(eF,e0)|0,es=es+Math.imul(eF,e1)|0,J=J+Math.imul(eM,e6)|0,en=(en=en+Math.imul(eM,e5)|0)+Math.imul(eO,e6)|0,es=es+Math.imul(eO,e5)|0,J=J+Math.imul(eB,e7)|0,en=(en=en+Math.imul(eB,te)|0)+Math.imul(eN,e7)|0,es=es+Math.imul(eN,te)|0,J=J+Math.imul(eT,tr)|0,en=(en=en+Math.imul(eT,ta)|0)+Math.imul(eR,tr)|0,es=es+Math.imul(eR,ta)|0,J=J+Math.imul(eI,th)|0,en=(en=en+Math.imul(eI,td)|0)+Math.imul(eP,th)|0,es=es+Math.imul(eP,td)|0,J=J+Math.imul(eE,tp)|0,en=(en=en+Math.imul(eE,tg)|0)+Math.imul(eS,tp)|0,es=es+Math.imul(eS,tg)|0;var tN=(ef+(J=J+Math.imul(ev,ty)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tb)|0)+Math.imul(e_,ty)|0))<<13)|0;ef=((es=es+Math.imul(e_,tb)|0)+(en>>>13)|0)+(tN>>>26)|0,tN&=67108863,J=Math.imul(eV,eQ),en=(en=Math.imul(eV,eZ))+Math.imul(eG,eQ)|0,es=Math.imul(eG,eZ),J=J+Math.imul(ej,e0)|0,en=(en=en+Math.imul(ej,e1)|0)+Math.imul(eH,e0)|0,es=es+Math.imul(eH,e1)|0,J=J+Math.imul(eU,e6)|0,en=(en=en+Math.imul(eU,e5)|0)+Math.imul(eF,e6)|0,es=es+Math.imul(eF,e5)|0,J=J+Math.imul(eM,e7)|0,en=(en=en+Math.imul(eM,te)|0)+Math.imul(eO,e7)|0,es=es+Math.imul(eO,te)|0,J=J+Math.imul(eB,tr)|0,en=(en=en+Math.imul(eB,ta)|0)+Math.imul(eN,tr)|0,es=es+Math.imul(eN,ta)|0,J=J+Math.imul(eT,th)|0,en=(en=en+Math.imul(eT,td)|0)+Math.imul(eR,th)|0,es=es+Math.imul(eR,td)|0,J=J+Math.imul(eI,tp)|0,en=(en=en+Math.imul(eI,tg)|0)+Math.imul(eP,tp)|0,es=es+Math.imul(eP,tg)|0,J=J+Math.imul(eE,ty)|0,en=(en=en+Math.imul(eE,tb)|0)+Math.imul(eS,ty)|0,es=es+Math.imul(eS,tb)|0;var tD=(ef+(J=J+Math.imul(ev,t_)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tw)|0)+Math.imul(e_,t_)|0))<<13)|0;ef=((es=es+Math.imul(e_,tw)|0)+(en>>>13)|0)+(tD>>>26)|0,tD&=67108863,J=Math.imul(eW,eQ),en=(en=Math.imul(eW,eZ))+Math.imul(eY,eQ)|0,es=Math.imul(eY,eZ),J=J+Math.imul(eV,e0)|0,en=(en=en+Math.imul(eV,e1)|0)+Math.imul(eG,e0)|0,es=es+Math.imul(eG,e1)|0,J=J+Math.imul(ej,e6)|0,en=(en=en+Math.imul(ej,e5)|0)+Math.imul(eH,e6)|0,es=es+Math.imul(eH,e5)|0,J=J+Math.imul(eU,e7)|0,en=(en=en+Math.imul(eU,te)|0)+Math.imul(eF,e7)|0,es=es+Math.imul(eF,te)|0,J=J+Math.imul(eM,tr)|0,en=(en=en+Math.imul(eM,ta)|0)+Math.imul(eO,tr)|0,es=es+Math.imul(eO,ta)|0,J=J+Math.imul(eB,th)|0,en=(en=en+Math.imul(eB,td)|0)+Math.imul(eN,th)|0,es=es+Math.imul(eN,td)|0,J=J+Math.imul(eT,tp)|0,en=(en=en+Math.imul(eT,tg)|0)+Math.imul(eR,tp)|0,es=es+Math.imul(eR,tg)|0,J=J+Math.imul(eI,ty)|0,en=(en=en+Math.imul(eI,tb)|0)+Math.imul(eP,ty)|0,es=es+Math.imul(eP,tb)|0,J=J+Math.imul(eE,t_)|0,en=(en=en+Math.imul(eE,tw)|0)+Math.imul(eS,t_)|0,es=es+Math.imul(eS,tw)|0;var tM=(ef+(J=J+Math.imul(ev,tS)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tA)|0)+Math.imul(e_,tS)|0))<<13)|0;ef=((es=es+Math.imul(e_,tA)|0)+(en>>>13)|0)+(tM>>>26)|0,tM&=67108863,J=Math.imul(eW,e0),en=(en=Math.imul(eW,e1))+Math.imul(eY,e0)|0,es=Math.imul(eY,e1),J=J+Math.imul(eV,e6)|0,en=(en=en+Math.imul(eV,e5)|0)+Math.imul(eG,e6)|0,es=es+Math.imul(eG,e5)|0,J=J+Math.imul(ej,e7)|0,en=(en=en+Math.imul(ej,te)|0)+Math.imul(eH,e7)|0,es=es+Math.imul(eH,te)|0,J=J+Math.imul(eU,tr)|0,en=(en=en+Math.imul(eU,ta)|0)+Math.imul(eF,tr)|0,es=es+Math.imul(eF,ta)|0,J=J+Math.imul(eM,th)|0,en=(en=en+Math.imul(eM,td)|0)+Math.imul(eO,th)|0,es=es+Math.imul(eO,td)|0,J=J+Math.imul(eB,tp)|0,en=(en=en+Math.imul(eB,tg)|0)+Math.imul(eN,tp)|0,es=es+Math.imul(eN,tg)|0,J=J+Math.imul(eT,ty)|0,en=(en=en+Math.imul(eT,tb)|0)+Math.imul(eR,ty)|0,es=es+Math.imul(eR,tb)|0,J=J+Math.imul(eI,t_)|0,en=(en=en+Math.imul(eI,tw)|0)+Math.imul(eP,t_)|0,es=es+Math.imul(eP,tw)|0;var tO=(ef+(J=J+Math.imul(eE,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eE,tA)|0)+Math.imul(eS,tS)|0))<<13)|0;ef=((es=es+Math.imul(eS,tA)|0)+(en>>>13)|0)+(tO>>>26)|0,tO&=67108863,J=Math.imul(eW,e6),en=(en=Math.imul(eW,e5))+Math.imul(eY,e6)|0,es=Math.imul(eY,e5),J=J+Math.imul(eV,e7)|0,en=(en=en+Math.imul(eV,te)|0)+Math.imul(eG,e7)|0,es=es+Math.imul(eG,te)|0,J=J+Math.imul(ej,tr)|0,en=(en=en+Math.imul(ej,ta)|0)+Math.imul(eH,tr)|0,es=es+Math.imul(eH,ta)|0,J=J+Math.imul(eU,th)|0,en=(en=en+Math.imul(eU,td)|0)+Math.imul(eF,th)|0,es=es+Math.imul(eF,td)|0,J=J+Math.imul(eM,tp)|0,en=(en=en+Math.imul(eM,tg)|0)+Math.imul(eO,tp)|0,es=es+Math.imul(eO,tg)|0,J=J+Math.imul(eB,ty)|0,en=(en=en+Math.imul(eB,tb)|0)+Math.imul(eN,ty)|0,es=es+Math.imul(eN,tb)|0,J=J+Math.imul(eT,t_)|0,en=(en=en+Math.imul(eT,tw)|0)+Math.imul(eR,t_)|0,es=es+Math.imul(eR,tw)|0;var tL=(ef+(J=J+Math.imul(eI,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eI,tA)|0)+Math.imul(eP,tS)|0))<<13)|0;ef=((es=es+Math.imul(eP,tA)|0)+(en>>>13)|0)+(tL>>>26)|0,tL&=67108863,J=Math.imul(eW,e7),en=(en=Math.imul(eW,te))+Math.imul(eY,e7)|0,es=Math.imul(eY,te),J=J+Math.imul(eV,tr)|0,en=(en=en+Math.imul(eV,ta)|0)+Math.imul(eG,tr)|0,es=es+Math.imul(eG,ta)|0,J=J+Math.imul(ej,th)|0,en=(en=en+Math.imul(ej,td)|0)+Math.imul(eH,th)|0,es=es+Math.imul(eH,td)|0,J=J+Math.imul(eU,tp)|0,en=(en=en+Math.imul(eU,tg)|0)+Math.imul(eF,tp)|0,es=es+Math.imul(eF,tg)|0,J=J+Math.imul(eM,ty)|0,en=(en=en+Math.imul(eM,tb)|0)+Math.imul(eO,ty)|0,es=es+Math.imul(eO,tb)|0,J=J+Math.imul(eB,t_)|0,en=(en=en+Math.imul(eB,tw)|0)+Math.imul(eN,t_)|0,es=es+Math.imul(eN,tw)|0;var tU=(ef+(J=J+Math.imul(eT,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eT,tA)|0)+Math.imul(eR,tS)|0))<<13)|0;ef=((es=es+Math.imul(eR,tA)|0)+(en>>>13)|0)+(tU>>>26)|0,tU&=67108863,J=Math.imul(eW,tr),en=(en=Math.imul(eW,ta))+Math.imul(eY,tr)|0,es=Math.imul(eY,ta),J=J+Math.imul(eV,th)|0,en=(en=en+Math.imul(eV,td)|0)+Math.imul(eG,th)|0,es=es+Math.imul(eG,td)|0,J=J+Math.imul(ej,tp)|0,en=(en=en+Math.imul(ej,tg)|0)+Math.imul(eH,tp)|0,es=es+Math.imul(eH,tg)|0,J=J+Math.imul(eU,ty)|0,en=(en=en+Math.imul(eU,tb)|0)+Math.imul(eF,ty)|0,es=es+Math.imul(eF,tb)|0,J=J+Math.imul(eM,t_)|0,en=(en=en+Math.imul(eM,tw)|0)+Math.imul(eO,t_)|0,es=es+Math.imul(eO,tw)|0;var tF=(ef+(J=J+Math.imul(eB,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eB,tA)|0)+Math.imul(eN,tS)|0))<<13)|0;ef=((es=es+Math.imul(eN,tA)|0)+(en>>>13)|0)+(tF>>>26)|0,tF&=67108863,J=Math.imul(eW,th),en=(en=Math.imul(eW,td))+Math.imul(eY,th)|0,es=Math.imul(eY,td),J=J+Math.imul(eV,tp)|0,en=(en=en+Math.imul(eV,tg)|0)+Math.imul(eG,tp)|0,es=es+Math.imul(eG,tg)|0,J=J+Math.imul(ej,ty)|0,en=(en=en+Math.imul(ej,tb)|0)+Math.imul(eH,ty)|0,es=es+Math.imul(eH,tb)|0,J=J+Math.imul(eU,t_)|0,en=(en=en+Math.imul(eU,tw)|0)+Math.imul(eF,t_)|0,es=es+Math.imul(eF,tw)|0;var tK=(ef+(J=J+Math.imul(eM,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eM,tA)|0)+Math.imul(eO,tS)|0))<<13)|0;ef=((es=es+Math.imul(eO,tA)|0)+(en>>>13)|0)+(tK>>>26)|0,tK&=67108863,J=Math.imul(eW,tp),en=(en=Math.imul(eW,tg))+Math.imul(eY,tp)|0,es=Math.imul(eY,tg),J=J+Math.imul(eV,ty)|0,en=(en=en+Math.imul(eV,tb)|0)+Math.imul(eG,ty)|0,es=es+Math.imul(eG,tb)|0,J=J+Math.imul(ej,t_)|0,en=(en=en+Math.imul(ej,tw)|0)+Math.imul(eH,t_)|0,es=es+Math.imul(eH,tw)|0;var tj=(ef+(J=J+Math.imul(eU,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eU,tA)|0)+Math.imul(eF,tS)|0))<<13)|0;ef=((es=es+Math.imul(eF,tA)|0)+(en>>>13)|0)+(tj>>>26)|0,tj&=67108863,J=Math.imul(eW,ty),en=(en=Math.imul(eW,tb))+Math.imul(eY,ty)|0,es=Math.imul(eY,tb),J=J+Math.imul(eV,t_)|0,en=(en=en+Math.imul(eV,tw)|0)+Math.imul(eG,t_)|0,es=es+Math.imul(eG,tw)|0;var tH=(ef+(J=J+Math.imul(ej,tS)|0)|0)+((8191&(en=(en=en+Math.imul(ej,tA)|0)+Math.imul(eH,tS)|0))<<13)|0;ef=((es=es+Math.imul(eH,tA)|0)+(en>>>13)|0)+(tH>>>26)|0,tH&=67108863,J=Math.imul(eW,t_),en=(en=Math.imul(eW,tw))+Math.imul(eY,t_)|0,es=Math.imul(eY,tw);var tq=(ef+(J=J+Math.imul(eV,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eV,tA)|0)+Math.imul(eG,tS)|0))<<13)|0;ef=((es=es+Math.imul(eG,tA)|0)+(en>>>13)|0)+(tq>>>26)|0,tq&=67108863;var tz=(ef+(J=Math.imul(eW,tS))|0)+((8191&(en=(en=Math.imul(eW,tA))+Math.imul(eY,tS)|0))<<13)|0;return ef=((es=Math.imul(eY,tA))+(en>>>13)|0)+(tz>>>26)|0,tz&=67108863,eu[0]=tI,eu[1]=tP,eu[2]=tk,eu[3]=tT,eu[4]=tR,eu[5]=tC,eu[6]=tB,eu[7]=tN,eu[8]=tD,eu[9]=tM,eu[10]=tO,eu[11]=tL,eu[12]=tU,eu[13]=tF,eu[14]=tK,eu[15]=tj,eu[16]=tH,eu[17]=tq,eu[18]=tz,0!==ef&&(eu[19]=ef,$.length++),$};function bigMulTo(O,U,$){$.negative=U.negative^O.negative,$.length=O.length+U.length;for(var J=0,en=0,es=0;es<$.length-1;es++){var eo=en;en=0;for(var ea=67108863&J,eu=Math.min(es,U.length-1),ef=Math.max(0,es-O.length+1);ef<=eu;ef++){var eg=es-ef,ev=(0|O.words[eg])*(0|U.words[ef]),e_=67108863&ev;eo=eo+(ev/67108864|0)|0,ea=67108863&(e_=e_+ea|0),en+=(eo=eo+(e_>>>26)|0)>>>26,eo&=67108863}$.words[es]=ea,J=eo,eo=en}return 0!==J?$.words[es]=J:$.length--,$._strip()}function jumboMulTo(O,U,$){return bigMulTo(O,U,$)}function FFTM(O,U){this.x=O,this.y=U}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(O,U){var $=this.length+O.length;return 10===this.length&&10===O.length?comb10MulTo(this,O,U):$<63?smallMulTo(this,O,U):$<1024?bigMulTo(this,O,U):jumboMulTo(this,O,U)},FFTM.prototype.makeRBT=function(O){for(var U=Array(O),$=BN.prototype._countBits(O)-1,J=0;J>=1;return J},FFTM.prototype.permute=function(O,U,$,J,en,es){for(var eo=0;eo>>=1)en++;return 1<>>=13,$[2*es+1]=8191&en,en>>>=13;for(es=2*U;es>=26,$+=(en/67108864|0)+(es>>>26),this.words[J]=67108863&es}return 0!==$&&(this.words[J]=$,this.length++),U?this.ineg():this},BN.prototype.muln=function(O){return this.clone().imuln(O)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(O){var U=toBitArray(O);if(0===U.length)return new BN(1);for(var $=this,J=0;J=0);var U,$=O%26,J=(O-$)/26,en=67108863>>>26-$<<26-$;if(0!==$){var es=0;for(U=0;U>>26-$}es&&(this.words[U]=es,this.length++)}if(0!==J){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U=0),J=U?(U-U%26)/26:0;var J,en=O%26,es=Math.min((O-en)/26,this.length),eo=67108863^67108863>>>en<es)for(this.length-=es,eu=0;eu=0&&(0!==ef||eu>=J);eu--){var eg=0|this.words[eu];this.words[eu]=ef<<26-en|eg>>>en,ef=eg&eo}return ea&&0!==ef&&(ea.words[ea.length++]=ef),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function(O,U,$){return assert(0===this.negative),this.iushrn(O,U,$)},BN.prototype.shln=function(O){return this.clone().ishln(O)},BN.prototype.ushln=function(O){return this.clone().iushln(O)},BN.prototype.shrn=function(O){return this.clone().ishrn(O)},BN.prototype.ushrn=function(O){return this.clone().iushrn(O)},BN.prototype.testn=function(O){assert("number"==typeof O&&O>=0);var U=O%26,$=(O-U)/26,J=1<=0);var U=O%26,$=(O-U)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=$)return this;if(0!==U&&$++,this.length=Math.min($,this.length),0!==U){var J=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},BN.prototype.isubn=function(O){if(assert("number"==typeof O),assert(O<67108864),O<0)return this.iaddn(-O);if(0!==this.negative)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(ea/67108864|0),this.words[J+$]=67108863&en}for(;J>26,this.words[J+$]=67108863&en;if(0===eo)return this._strip();for(assert(-1===eo),eo=0,J=0;J>26,this.words[J]=67108863&en;return this.negative=1,this._strip()},BN.prototype._wordDiv=function(O,U){var $,J=this.length-O.length,en=this.clone(),es=O,eo=0|es.words[es.length-1];0!=(J=26-this._countBits(eo))&&(es=es.ushln(J),en.iushln(J),eo=0|es.words[es.length-1]);var ea=en.length-es.length;if("mod"!==U){($=new BN(null)).length=ea+1,$.words=Array($.length);for(var eu=0;eu<$.length;eu++)$.words[eu]=0}var ef=en.clone()._ishlnsubmul(es,1,ea);0===ef.negative&&(en=ef,$&&($.words[ea]=1));for(var eg=ea-1;eg>=0;eg--){var ev=(0|en.words[es.length+eg])*67108864+(0|en.words[es.length+eg-1]);for(ev=Math.min(ev/eo|0,67108863),en._ishlnsubmul(es,ev,eg);0!==en.negative;)ev--,en.negative=0,en._ishlnsubmul(es,1,eg),en.isZero()||(en.negative^=1);$&&($.words[eg]=ev)}return $&&$._strip(),en._strip(),"div"!==U&&0!==J&&en.iushrn(J),{div:$||null,mod:en}},BN.prototype.divmod=function(O,U,$){var J,en,es;return(assert(!O.isZero()),this.isZero())?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===O.negative?(es=this.neg().divmod(O,U),"mod"!==U&&(J=es.div.neg()),"div"!==U&&(en=es.mod.neg(),$&&0!==en.negative&&en.iadd(O)),{div:J,mod:en}):0===this.negative&&0!==O.negative?(es=this.divmod(O.neg(),U),"mod"!==U&&(J=es.div.neg()),{div:J,mod:es.mod}):(this.negative&O.negative)!=0?(es=this.neg().divmod(O.neg(),U),"div"!==U&&(en=es.mod.neg(),$&&0!==en.negative&&en.isub(O)),{div:es.div,mod:en}):O.length>this.length||0>this.cmp(O)?{div:new BN(0),mod:this}:1===O.length?"div"===U?{div:this.divn(O.words[0]),mod:null}:"mod"===U?{div:null,mod:new BN(this.modrn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new BN(this.modrn(O.words[0]))}:this._wordDiv(O,U)},BN.prototype.div=function(O){return this.divmod(O,"div",!1).div},BN.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},BN.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},BN.prototype.divRound=function(O){var U=this.divmod(O);if(U.mod.isZero())return U.div;var $=0!==U.div.negative?U.mod.isub(O):U.mod,J=O.ushrn(1),en=O.andln(1),es=$.cmp(J);return es<0||1===en&&0===es?U.div:0!==U.div.negative?U.div.isubn(1):U.div.iaddn(1)},BN.prototype.modrn=function(O){var U=O<0;U&&(O=-O),assert(O<=67108863);for(var $=67108864%O,J=0,en=this.length-1;en>=0;en--)J=($*J+(0|this.words[en]))%O;return U?-J:J},BN.prototype.modn=function(O){return this.modrn(O)},BN.prototype.idivn=function(O){var U=O<0;U&&(O=-O),assert(O<=67108863);for(var $=0,J=this.length-1;J>=0;J--){var en=(0|this.words[J])+67108864*$;this.words[J]=en/O|0,$=en%O}return this._strip(),U?this.ineg():this},BN.prototype.divn=function(O){return this.clone().idivn(O)},BN.prototype.egcd=function(O){assert(0===O.negative),assert(!O.isZero());var U=this,$=O.clone();U=0!==U.negative?U.umod(O):U.clone();for(var J=new BN(1),en=new BN(0),es=new BN(0),eo=new BN(1),ea=0;U.isEven()&&$.isEven();)U.iushrn(1),$.iushrn(1),++ea;for(var eu=$.clone(),ef=U.clone();!U.isZero();){for(var eg=0,ev=1;(U.words[0]&ev)==0&&eg<26;++eg,ev<<=1);if(eg>0)for(U.iushrn(eg);eg-- >0;)(J.isOdd()||en.isOdd())&&(J.iadd(eu),en.isub(ef)),J.iushrn(1),en.iushrn(1);for(var e_=0,ew=1;($.words[0]&ew)==0&&e_<26;++e_,ew<<=1);if(e_>0)for($.iushrn(e_);e_-- >0;)(es.isOdd()||eo.isOdd())&&(es.iadd(eu),eo.isub(ef)),es.iushrn(1),eo.iushrn(1);U.cmp($)>=0?(U.isub($),J.isub(es),en.isub(eo)):($.isub(U),es.isub(J),eo.isub(en))}return{a:es,b:eo,gcd:$.iushln(ea)}},BN.prototype._invmp=function(O){assert(0===O.negative),assert(!O.isZero());var U,$=this,J=O.clone();$=0!==$.negative?$.umod(O):$.clone();for(var en=new BN(1),es=new BN(0),eo=J.clone();$.cmpn(1)>0&&J.cmpn(1)>0;){for(var ea=0,eu=1;($.words[0]&eu)==0&&ea<26;++ea,eu<<=1);if(ea>0)for($.iushrn(ea);ea-- >0;)en.isOdd()&&en.iadd(eo),en.iushrn(1);for(var ef=0,eg=1;(J.words[0]&eg)==0&&ef<26;++ef,eg<<=1);if(ef>0)for(J.iushrn(ef);ef-- >0;)es.isOdd()&&es.iadd(eo),es.iushrn(1);$.cmp(J)>=0?($.isub(J),en.isub(es)):(J.isub($),es.isub(en))}return 0>(U=0===$.cmpn(1)?en:es).cmpn(0)&&U.iadd(O),U},BN.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var U=this.clone(),$=O.clone();U.negative=0,$.negative=0;for(var J=0;U.isEven()&&$.isEven();J++)U.iushrn(1),$.iushrn(1);for(;;){for(;U.isEven();)U.iushrn(1);for(;$.isEven();)$.iushrn(1);var en=U.cmp($);if(en<0){var es=U;U=$,$=es}else if(0===en||0===$.cmpn(1))break;U.isub($)}return $.iushln(J)},BN.prototype.invm=function(O){return this.egcd(O).a.umod(O)},BN.prototype.isEven=function(){return(1&this.words[0])==0},BN.prototype.isOdd=function(){return(1&this.words[0])==1},BN.prototype.andln=function(O){return this.words[0]&O},BN.prototype.bincn=function(O){assert("number"==typeof O);var U=O%26,$=(O-U)/26,J=1<>>26,eo&=67108863,this.words[es]=eo}return 0!==en&&(this.words[es]=en,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(O){var U,$=O<0;if(0!==this.negative&&!$)return -1;if(0===this.negative&&$)return 1;if(this._strip(),this.length>1)U=1;else{$&&(O=-O),assert(O<=67108863,"Number is too big");var J=0|this.words[0];U=J===O?0:JO.length)return 1;if(this.length=0;$--){var J=0|this.words[$],en=0|O.words[$];if(J!==en){Jen&&(U=1);break}}return U},BN.prototype.gtn=function(O){return 1===this.cmpn(O)},BN.prototype.gt=function(O){return 1===this.cmp(O)},BN.prototype.gten=function(O){return this.cmpn(O)>=0},BN.prototype.gte=function(O){return this.cmp(O)>=0},BN.prototype.ltn=function(O){return -1===this.cmpn(O)},BN.prototype.lt=function(O){return -1===this.cmp(O)},BN.prototype.lten=function(O){return 0>=this.cmpn(O)},BN.prototype.lte=function(O){return 0>=this.cmp(O)},BN.prototype.eqn=function(O){return 0===this.cmpn(O)},BN.prototype.eq=function(O){return 0===this.cmp(O)},BN.red=function(O){return new Red(O)},BN.prototype.toRed=function(O){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),O.convertTo(this)._forceRed(O)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(O){return this.red=O,this},BN.prototype.forceRed=function(O){return assert(!this.red,"Already a number in reduction context"),this._forceRed(O)},BN.prototype.redAdd=function(O){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},BN.prototype.redIAdd=function(O){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},BN.prototype.redSub=function(O){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},BN.prototype.redISub=function(O){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},BN.prototype.redShl=function(O){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},BN.prototype.redMul=function(O){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},BN.prototype.redIMul=function(O){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(O){return assert(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var ea={k256:null,p224:null,p192:null,p25519:null};function MPrime(O,U){this.name=O,this.p=new BN(U,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(O){if("string"==typeof O){var U=BN._prime(O);this.m=U.p,this.prime=U}else assert(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}function Mont(O){Red.call(this,O),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function(){var O=new BN(null);return O.words=Array(Math.ceil(this.n/13)),O},MPrime.prototype.ireduce=function(O){var U,$=O;do this.split($,this.tmp),U=($=($=this.imulK($)).iadd(this.tmp)).bitLength();while(U>this.n);var J=U0?$.isub(this.p):void 0!==$.strip?$.strip():$._strip(),$},MPrime.prototype.split=function(O,U){O.iushrn(this.n,0,U)},MPrime.prototype.imulK=function(O){return O.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(O,U){for(var $=4194303,J=Math.min(O.length,9),en=0;en>>22,es=eo}es>>>=22,O.words[en-10]=es,0===es&&O.length>10?O.length-=10:O.length-=9},K256.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var U=0,$=0;$>>=26,O.words[$]=en,U=J}return 0!==U&&(O.words[O.length++]=U),O},BN._prime=function(O){var U;if(ea[O])return ea[O];if("k256"===O)U=new K256;else if("p224"===O)U=new P224;else if("p192"===O)U=new P192;else if("p25519"===O)U=new P25519;else throw Error("Unknown prime "+O);return ea[O]=U,U},Red.prototype._verify1=function(O){assert(0===O.negative,"red works only with positives"),assert(O.red,"red works only with red numbers")},Red.prototype._verify2=function(O,U){assert((O.negative|U.negative)==0,"red works only with positives"),assert(O.red&&O.red===U.red,"red works only with red numbers")},Red.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):(move(O,O.umod(this.m)._forceRed(this)),O)},Red.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},Red.prototype.add=function(O,U){this._verify2(O,U);var $=O.add(U);return $.cmp(this.m)>=0&&$.isub(this.m),$._forceRed(this)},Red.prototype.iadd=function(O,U){this._verify2(O,U);var $=O.iadd(U);return $.cmp(this.m)>=0&&$.isub(this.m),$},Red.prototype.sub=function(O,U){this._verify2(O,U);var $=O.sub(U);return 0>$.cmpn(0)&&$.iadd(this.m),$._forceRed(this)},Red.prototype.isub=function(O,U){this._verify2(O,U);var $=O.isub(U);return 0>$.cmpn(0)&&$.iadd(this.m),$},Red.prototype.shl=function(O,U){return this._verify1(O),this.imod(O.ushln(U))},Red.prototype.imul=function(O,U){return this._verify2(O,U),this.imod(O.imul(U))},Red.prototype.mul=function(O,U){return this._verify2(O,U),this.imod(O.mul(U))},Red.prototype.isqr=function(O){return this.imul(O,O.clone())},Red.prototype.sqr=function(O){return this.mul(O,O)},Red.prototype.sqrt=function(O){if(O.isZero())return O.clone();var U=this.m.andln(3);if(assert(U%2==1),3===U){var $=this.m.add(new BN(1)).iushrn(2);return this.pow(O,$)}for(var J=this.m.subn(1),en=0;!J.isZero()&&0===J.andln(1);)en++,J.iushrn(1);assert(!J.isZero());var es=new BN(1).toRed(this),eo=es.redNeg(),ea=this.m.subn(1).iushrn(1),eu=this.m.bitLength();for(eu=new BN(2*eu*eu).toRed(this);0!==this.pow(eu,ea).cmp(eo);)eu.redIAdd(eo);for(var ef=this.pow(eu,J),eg=this.pow(O,J.addn(1).iushrn(1)),ev=this.pow(O,J),e_=en;0!==ev.cmp(es);){for(var ew=ev,eE=0;0!==ew.cmp(es);eE++)ew=ew.redSqr();assert(eE=0;en--){for(var ef=U.words[en],eg=eu-1;eg>=0;eg--){var ev=ef>>eg&1;if(es!==J[0]&&(es=this.sqr(es)),0===ev&&0===eo){ea=0;continue}eo<<=1,eo|=ev,(++ea===$||0===en&&0===eg)&&(es=this.mul(es,J[eo]),ea=0,eo=0)}eu=26}return es},Red.prototype.convertTo=function(O){var U=O.umod(this.m);return U===O?U.clone():U},Red.prototype.convertFrom=function(O){var U=O.clone();return U.red=null,U},BN.mont=function(O){return new Mont(O)},inherits(Mont,Red),Mont.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},Mont.prototype.convertFrom=function(O){var U=this.imod(O.mul(this.rinv));return U.red=null,U},Mont.prototype.imul=function(O,U){if(O.isZero()||U.isZero())return O.words[0]=0,O.length=1,O;var $=O.imul(U),J=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),en=$.isub(J).iushrn(this.shift),es=en;return en.cmp(this.m)>=0?es=en.isub(this.m):0>en.cmpn(0)&&(es=en.iadd(this.m)),es._forceRed(this)},Mont.prototype.mul=function(O,U){if(O.isZero()||U.isZero())return new BN(0)._forceRed(this);var $=O.mul(U),J=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),en=$.isub(J).iushrn(this.shift),es=en;return en.cmp(this.m)>=0?es=en.isub(this.m):0>en.cmpn(0)&&(es=en.iadd(this.m)),es._forceRed(this)},Mont.prototype.invm=function(O){return this.imod(O._invmp(this.m).mul(this.r2))._forceRed(this)}}(O=$.nmd(O),this)},4461:function(O,U,$){var J=$(2601);function useColors(){return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function formatArgs(U){if(U[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+U[0]+(this.useColors?"%c ":" ")+"+"+O.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;U.splice(1,0,$,"color: inherit");let J=0,en=0;U[0].replace(/%[a-zA-Z%]/g,O=>{"%%"!==O&&(J++,"%c"===O&&(en=J))}),U.splice(en,0,$)}function save(O){try{O?U.storage.setItem("debug",O):U.storage.removeItem("debug")}catch(O){}}function load(){let O;try{O=U.storage.getItem("debug")}catch(O){}return!O&&void 0!==J&&"env"in J&&(O=J.env.DEBUG),O}function localstorage(){try{return localStorage}catch(O){}}U.formatArgs=formatArgs,U.save=save,U.load=load,U.useColors=useColors,U.storage=localstorage(),U.destroy=(()=>{let O=!1;return()=>{O||(O=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),U.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],U.log=console.debug||console.log||(()=>{}),O.exports=$(4239)(U);let{formatters:en}=O.exports;en.j=function(O){try{return JSON.stringify(O)}catch(O){return"[UnexpectedJSONParseError]: "+O.message}}},4239:function(O,U,$){function setup(O){function selectColor(O){let U=0;for(let $=0;${if("%%"===U)return"%";es++;let en=createDebug.formatters[J];if("function"==typeof en){let J=O[es];U=en.call($,J),O.splice(es,1),es--}return U}),createDebug.formatArgs.call($,O);let eo=$.log||createDebug.log;eo.apply($,O)}return debug.namespace=O,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(O),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==en?en:($!==createDebug.namespaces&&($=createDebug.namespaces,J=createDebug.enabled(O)),J),set:O=>{en=O}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(O,U){let $=createDebug(this.namespace+(void 0===U?":":U)+O);return $.log=this.log,$}function enable(O){let U;createDebug.save(O),createDebug.namespaces=O,createDebug.names=[],createDebug.skips=[];let $=("string"==typeof O?O:"").split(/[\s,]+/),J=$.length;for(U=0;U"-"+O)].join(",");return createDebug.enable(""),O}function enabled(O){let U,$;if("*"===O[O.length-1])return!0;for(U=0,$=createDebug.skips.length;U<$;U++)if(createDebug.skips[U].test(O))return!1;for(U=0,$=createDebug.names.length;U<$;U++)if(createDebug.names[U].test(O))return!0;return!1}function toNamespace(O){return O.toString().substring(2,O.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(O){return O instanceof Error?O.stack||O.message:O}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=coerce,createDebug.disable=disable,createDebug.enable=enable,createDebug.enabled=enabled,createDebug.humanize=$(438),createDebug.destroy=destroy,Object.keys(O).forEach(U=>{createDebug[U]=O[U]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=selectColor,createDebug.enable(createDebug.load()),createDebug}O.exports=setup},2185:function(O){"use strict";function Denque(O,U){var U=U||{};this._capacity=U.capacity,this._head=0,this._tail=0,Array.isArray(O)?this._fromArray(O):(this._capacityMask=3,this._list=[,,,,])}Denque.prototype.peekAt=function(O){var U=O;if(U===(0|U)){var $=this.size();if(!(U>=$)&&!(U<-$))return U<0&&(U+=$),U=this._head+U&this._capacityMask,this._list[U]}},Denque.prototype.get=function(O){return this.peekAt(O)},Denque.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},Denque.prototype.peekFront=function(){return this.peek()},Denque.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(Denque.prototype,"length",{get:function(){return this.size()}}),Denque.prototype.size=function(){return this._head===this._tail?0:this._headthis._capacity&&this.pop(),this._head1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),U}},Denque.prototype.push=function(O){if(0==arguments.length)return this.size();var U=this._tail;return(this._list[U]=O,this._tail=U+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head1e4&&O<=U>>>2&&this._shrinkArray(),$}},Denque.prototype.removeOne=function(O){var U,$=O;if($===(0|$)&&this._head!==this._tail){var J=this.size(),en=this._list.length;if(!($>=J)&&!($<-J)){$<0&&($+=J),$=this._head+$&this._capacityMask;var es=this._list[$];if(O0;U--)this._list[$]=this._list[$=$-1+en&this._capacityMask];this._list[$]=void 0,this._head=this._head+1+en&this._capacityMask}else{for(U=J-1-O;U>0;U--)this._list[$]=this._list[$=$+1+en&this._capacityMask];this._list[$]=void 0,this._tail=this._tail-1+en&this._capacityMask}return es}}},Denque.prototype.remove=function(O,U){var $,J,en=O,es=U;if(en===(0|en)&&this._head!==this._tail){var eo=this.size(),ea=this._list.length;if(!(en>=eo)&&!(en<-eo)&&!(U<1)){if(en<0&&(en+=eo),1===U||!U)return($=[,])[0]=this.removeOne(en),$;if(0===en&&en+U>=eo)return $=this.toArray(),this.clear(),$;for(en+U>eo&&(U=eo-en),$=Array(U),J=0;J0;J--)this._list[en=en+1+ea&this._capacityMask]=void 0;return $}if(0===O){for(this._head=this._head+U+ea&this._capacityMask,J=U-1;J>0;J--)this._list[en=en+1+ea&this._capacityMask]=void 0;return $}if(en0;J--)this.unshift(this._list[en=en-1+ea&this._capacityMask]);for(en=this._head-1+ea&this._capacityMask;es>0;)this._list[en=en-1+ea&this._capacityMask]=void 0,es--;O<0&&(this._tail=en)}else{for(this._tail=en,en=en+U+ea&this._capacityMask,J=eo-(U+O);J>0;J--)this.push(this._list[en++]);for(en=this._tail;es>0;)this._list[en=en+1+ea&this._capacityMask]=void 0,es--}return this._head<2&&this._tail>1e4&&this._tail<=ea>>>2&&this._shrinkArray(),$}}},Denque.prototype.splice=function(O,U){var $=O;if($===(0|$)){var J=this.size();if($<0&&($+=J),!($>J)){if(!(arguments.length>2))return this.remove($,U);var en,es,eo,ea=arguments.length,eu=this._list.length,ef=2;if(!J||$0&&(this._head=this._head+$+eu&this._capacityMask)):(eo=this.remove($,U),this._head=this._head+$+eu&this._capacityMask);ea>ef;)this.unshift(arguments[--ea]);for(en=$;en>0;en--)this.unshift(es[en-1])}else{var eg=(es=Array(J-($+U))).length;for(en=0;enthis._tail){for($=this._head;$>>=1,this._capacityMask>>>=1},Denque.prototype._nextPowerOf2=function(O){return Math.max(1<(this.addEventListener(O,$,U),()=>this.removeEventListener(O,$,U)),$)},en.EventIterator},9831:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});let EventQueue=class EventQueue{constructor(){this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}push(O){if(this.isStopped)return;let U={value:O,done:!1};if(this.pullQueue.length){let O=this.pullQueue.shift();O&&O.resolve(U)}else this.pushQueue.push(Promise.resolve(U)),void 0!==this.highWaterMark&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn(`EventIterator queue reached ${this.pushQueue.length} items`))}stop(){if(!this.isStopped){for(let O of(this.isStopped=!0,this.remove(),this.pullQueue))O.resolve({value:void 0,done:!0});this.pullQueue.length=0}}fail(O){if(!this.isStopped){if(this.isStopped=!0,this.remove(),this.pullQueue.length){for(let U of this.pullQueue)U.reject(O);this.pullQueue.length=0}else{let U=Promise.reject(O);U.catch(()=>{}),this.pushQueue.push(U)}}}remove(){Promise.resolve().then(()=>{this.removeCallback&&this.removeCallback()})}[Symbol.asyncIterator](){return{next:O=>{let U=this.pushQueue.shift();return U?(void 0!==this.lowWaterMark&&this.pushQueue.length<=this.lowWaterMark&&this.isPaused&&(this.isPaused=!1,this.eventHandlers.lowWater&&this.eventHandlers.lowWater()),U):this.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise((O,U)=>{this.pullQueue.push({resolve:O,reject:U})})},return:()=>(this.isStopped=!0,this.pushQueue.length=0,this.remove(),Promise.resolve({value:void 0,done:!0}))}}};let EventIterator=class EventIterator{constructor(O,{highWaterMark:U=100,lowWaterMark:$=1}={}){let J=new EventQueue;J.highWaterMark=U,J.lowWaterMark=$,J.removeCallback=O({push:O=>J.push(O),stop:()=>J.stop(),fail:O=>J.fail(O),on:(O,U)=>{J.eventHandlers[O]=U}})||(()=>{}),this[Symbol.asyncIterator]=()=>J[Symbol.asyncIterator](),Object.freeze(this)}};U.EventIterator=EventIterator,U.default=EventIterator},8729:function(O){"use strict";var U=Object.prototype.hasOwnProperty,$="~";function Events(){}function EE(O,U,$){this.fn=O,this.context=U,this.once=$||!1}function addListener(O,U,J,en,es){if("function"!=typeof J)throw TypeError("The listener must be a function");var eo=new EE(J,en||O,es),ea=$?$+U:U;return O._events[ea]?O._events[ea].fn?O._events[ea]=[O._events[ea],eo]:O._events[ea].push(eo):(O._events[ea]=eo,O._eventsCount++),O}function clearEvent(O,U){0==--O._eventsCount?O._events=new Events:delete O._events[U]}function EventEmitter(){this._events=new Events,this._eventsCount=0}Object.create&&(Events.prototype=Object.create(null),new Events().__proto__||($=!1)),EventEmitter.prototype.eventNames=function(){var O,J,en=[];if(0===this._eventsCount)return en;for(J in O=this._events)U.call(O,J)&&en.push($?J.slice(1):J);return Object.getOwnPropertySymbols?en.concat(Object.getOwnPropertySymbols(O)):en},EventEmitter.prototype.listeners=function(O){var U=$?$+O:O,J=this._events[U];if(!J)return[];if(J.fn)return[J.fn];for(var en=0,es=J.length,eo=Array(es);en0&&eo.length>en&&!eo.warned){eo.warned=!0;var en,es,eo,ea=Error("Possible EventEmitter memory leak detected. "+eo.length+" "+String(U)+" listeners added. Use emitter.setMaxListeners() to increase limit");ea.name="MaxListenersExceededWarning",ea.emitter=O,ea.type=U,ea.count=eo.length,ProcessEmitWarning(ea)}return O}function onceWrapper(){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 _onceWrap(O,U,$){var J={fired:!1,wrapFn:void 0,target:O,type:U,listener:$},en=onceWrapper.bind(J);return en.listener=$,J.wrapFn=en,en}function _listeners(O,U,$){var J=O._events;if(void 0===J)return[];var en=J[U];return void 0===en?[]:"function"==typeof en?$?[en.listener||en]:[en]:$?unwrapListeners(en):arrayClone(en,en.length)}function listenerCount(O){var U=this._events;if(void 0!==U){var $=U[O];if("function"==typeof $)return 1;if(void 0!==$)return $.length}return 0}function arrayClone(O,U){for(var $=Array(U),J=0;J0&&(eo=U[0]),eo instanceof Error)throw eo;var eo,ea=Error("Unhandled error."+(eo?" ("+eo.message+")":""));throw ea.context=eo,ea}var eu=es[O];if(void 0===eu)return!1;if("function"==typeof eu)J(eu,this,U);else for(var ef=eu.length,eg=arrayClone(eu,ef),$=0;$=0;es--)if($[es]===U||$[es].listener===U){eo=$[es].listener,en=es;break}if(en<0)return this;0===en?$.shift():spliceOne($,en),1===$.length&&(J[O]=$[0]),void 0!==J.removeListener&&this.emit("removeListener",O,eo||U)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(O){var U,$,J;if(void 0===($=this._events))return this;if(void 0===$.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==$[O]&&(0==--this._eventsCount?this._events=Object.create(null):delete $[O]),this;if(0==arguments.length){var en,es=Object.keys($);for(J=0;J=0;J--)this.removeListener(O,U[J]);return this},EventEmitter.prototype.listeners=function(O){return _listeners(this,O,!0)},EventEmitter.prototype.rawListeners=function(O){return _listeners(this,O,!1)},EventEmitter.listenerCount=function(O,U){return"function"==typeof O.listenerCount?O.listenerCount(U):listenerCount.call(O,U)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?U(this._events):[]}},5336:function(O,U,$){var J=U;J.utils=$(5794),J.common=$(9619),J.sha=$(3610),J.ripemd=$(7721),J.hmac=$(6432),J.sha1=J.sha.sha1,J.sha256=J.sha.sha256,J.sha224=J.sha.sha224,J.sha384=J.sha.sha384,J.sha512=J.sha.sha512,J.ripemd160=J.ripemd.ripemd160},9619:function(O,U,$){"use strict";var J=$(5794),en=$(8786);function BlockHash(){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}U.BlockHash=BlockHash,BlockHash.prototype.update=function(O,U){if(O=J.toArray(O,U),this.pending?this.pending=this.pending.concat(O):this.pending=O,this.pendingTotal+=O.length,this.pending.length>=this._delta8){var $=(O=this.pending).length%this._delta8;this.pending=O.slice(O.length-$,O.length),0===this.pending.length&&(this.pending=null),O=J.join32(O,0,O.length-$,this.endian);for(var en=0;en>>24&255,J[en++]=O>>>16&255,J[en++]=O>>>8&255,J[en++]=255&O}else for(es=8,J[en++]=255&O,J[en++]=O>>>8&255,J[en++]=O>>>16&255,J[en++]=O>>>24&255,J[en++]=0,J[en++]=0,J[en++]=0,J[en++]=0;esthis.blockSize&&(O=new this.Hash().update(O).digest()),en(O.length<=this.blockSize);for(var U=O.length;U>>3}function g1_256(O){return J(O,17)^J(O,19)^O>>>10}U.ft_1=ft_1,U.ch32=ch32,U.maj32=maj32,U.p32=p32,U.s0_256=s0_256,U.s1_256=s1_256,U.g0_256=g0_256,U.g1_256=g1_256},5794:function(O,U,$){"use strict";var J=$(8786),en=$(5335);function isSurrogatePair(O,U){return(64512&O.charCodeAt(U))==55296&&!(U<0)&&!(U+1>=O.length)&&(64512&O.charCodeAt(U+1))==56320}function toArray(O,U){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if("string"==typeof O){if(U){if("hex"===U)for((O=O.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(O="0"+O),en=0;en>6|192:(isSurrogatePair(O,en)?(es=65536+((1023&es)<<10)+(1023&O.charCodeAt(++en)),$[J++]=es>>18|240,$[J++]=es>>12&63|128):$[J++]=es>>12|224,$[J++]=es>>6&63|128),$[J++]=63&es|128)}}else for(en=0;en>>24|O>>>8&65280|O<<8&16711680|(255&O)<<24)>>>0}function toHex32(O,U){for(var $="",J=0;J>>0;return ea}function split32(O,U){for(var $=Array(4*O.length),J=0,en=0;J>>24,$[en+1]=es>>>16&255,$[en+2]=es>>>8&255,$[en+3]=255&es):($[en+3]=es>>>24,$[en+2]=es>>>16&255,$[en+1]=es>>>8&255,$[en]=255&es)}return $}function rotr32(O,U){return O>>>U|O<<32-U}function rotl32(O,U){return O<>>32-U}function sum32(O,U){return O+U>>>0}function sum32_3(O,U,$){return O+U+$>>>0}function sum32_4(O,U,$,J){return O+U+$+J>>>0}function sum32_5(O,U,$,J,en){return O+U+$+J+en>>>0}function sum64(O,U,$,J){var en=O[U],es=J+O[U+1]>>>0,eo=(es>>0,O[U+1]=es}function sum64_hi(O,U,$,J){return(U+J>>>0>>0}function sum64_lo(O,U,$,J){return U+J>>>0}function sum64_4_hi(O,U,$,J,en,es,eo,ea){var eu,ef=U;return O+$+en+eo+(eu=0+((ef=ef+J>>>0)>>0)>>0)>>0}function sum64_4_lo(O,U,$,J,en,es,eo,ea){return U+J+es+ea>>>0}function sum64_5_hi(O,U,$,J,en,es,eo,ea,eu,ef){var eg,ev=U;return O+$+en+eo+eu+(eg=0+((ev=ev+J>>>0)>>0)>>0)>>0)>>0}function sum64_5_lo(O,U,$,J,en,es,eo,ea,eu,ef){return U+J+es+ea+ef>>>0}function rotr64_hi(O,U,$){return(U<<32-$|O>>>$)>>>0}function rotr64_lo(O,U,$){return(O<<32-$|U>>>$)>>>0}function shr64_hi(O,U,$){return O>>>$}function shr64_lo(O,U,$){return(O<<32-$|U>>>$)>>>0}U.inherits=en,U.toArray=toArray,U.toHex=toHex,U.htonl=htonl,U.toHex32=toHex32,U.zero2=zero2,U.zero8=zero8,U.join32=join32,U.split32=split32,U.rotr32=rotr32,U.rotl32=rotl32,U.sum32=sum32,U.sum32_3=sum32_3,U.sum32_4=sum32_4,U.sum32_5=sum32_5,U.sum64=sum64,U.sum64_hi=sum64_hi,U.sum64_lo=sum64_lo,U.sum64_4_hi=sum64_4_hi,U.sum64_4_lo=sum64_4_lo,U.sum64_5_hi=sum64_5_hi,U.sum64_5_lo=sum64_5_lo,U.rotr64_hi=rotr64_hi,U.rotr64_lo=rotr64_lo,U.shr64_hi=shr64_hi,U.shr64_lo=shr64_lo},7935:function(O,U,$){var J,en=$(2601);!function(){"use strict";var U="object"==typeof window?window:{};!U.HI_BASE32_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node&&(U=$.g);var es=!U.HI_BASE32_NO_COMMON_JS&&O.exports,eo=$.amdO,ea="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),eu={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},ef=[0,0,0,0,0,0,0,0],throwInvalidUtf8=function(O,U){U.length>10&&(U="..."+U.substr(-10));var $=Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+O+" bytes: "+U+" <-");throw $.position=O,$},toUtf8String=function(O){for(var U,$,J="",en=O.length,es=0,eo=0;es191&&U<=223?($=31&U,eo=1):U<=239?($=15&U,eo=2):U<=247?($=7&U,eo=3):throwInvalidUtf8(es,J);for(var ea=0;ea191)&&throwInvalidUtf8(es,J),$<<=6,$+=63&U;$>=55296&&$<=57343&&throwInvalidUtf8(es,J),$>1114111&&throwInvalidUtf8(es,J),$<=65535?J+=String.fromCharCode($):($-=65536,J+=String.fromCharCode(($>>10)+55296)+String.fromCharCode((1023&$)+56320))}return J},decodeAsBytes=function(O){if(""===O)return[];if(!/^[A-Z2-7=]+$/.test(O))throw Error("Invalid base32 characters");O=O.replace(/=/g,"");for(var U,$,J,en,es,eo,ea,ef,eg=[],ev=0,e_=O.length,ew=0,eE=e_>>3<<3;ew>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255,eg[ev++]=(es<<7|eo<<2|ea>>>3)&255,eg[ev++]=(ea<<5|ef)&255;var eS=e_-eE;return 2===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255):4===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255):5===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255):7===eS&&(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ea=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255,eg[ev++]=(es<<7|eo<<2|ea>>>3)&255),eg},encodeAscii=function(O){for(var U,$,J,en,es,eo="",eu=O.length,ef=0,eg=5*parseInt(eu/5);ef>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es];var ev=eu-eg;return 1===ev?eo+=ea[(U=O.charCodeAt(ef))>>>3]+ea[U<<2&31]+"======":2===ev?(U=O.charCodeAt(ef++),$=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===ev?(U=O.charCodeAt(ef++),$=O.charCodeAt(ef++),J=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):4===ev&&(U=O.charCodeAt(ef++),$=O.charCodeAt(ef++),J=O.charCodeAt(ef++),en=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"="),eo},encodeUtf8=function(O){var U,$,J,en,es,eo,eu,eg=!1,ev="",e_=0,ew=0,eE=0,eS=O.length;if(""===O)return ev;do{for(ef[0]=ef[5],ef[1]=ef[6],ef[2]=ef[7],eu=ew;e_>6:(eo<55296||eo>=57344?ef[eu++]=224|eo>>12:(eo=65536+((1023&eo)<<10|1023&O.charCodeAt(++e_)),ef[eu++]=240|eo>>18,ef[eu++]=128|eo>>12&63),ef[eu++]=128|eo>>6&63),ef[eu++]=128|63&eo);eE+=eu-ew,ew=eu-5,e_===eS&&++e_,e_>eS&&eu<6&&(eg=!0),U=ef[0],eu>4?($=ef[1],J=ef[2],en=ef[3],es=ef[4],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es]):1===eu?ev+=ea[U>>>3]+ea[U<<2&31]+"======":2===eu?($=ef[1],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===eu?($=ef[1],J=ef[2],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):($=ef[1],J=ef[2],en=ef[3],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"=")}while(!eg);return ev},encodeBytes=function(O){for(var U,$,J,en,es,eo="",eu=O.length,ef=0,eg=5*parseInt(eu/5);ef>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es];var ev=eu-eg;return 1===ev?eo+=ea[(U=O[ef])>>>3]+ea[U<<2&31]+"======":2===ev?(U=O[ef++],$=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===ev?(U=O[ef++],$=O[ef++],J=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):4===ev&&(U=O[ef++],$=O[ef++],J=O[ef++],en=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"="),eo},decode=function(O,U){if(!U)return toUtf8String(decodeAsBytes(O));if(""===O)return"";if(!/^[A-Z2-7=]+$/.test(O))throw Error("Invalid base32 characters");var $,J,en,es,eo,ea,ef,eg,ev="",e_=O.indexOf("=");-1===e_&&(e_=O.length);for(var ew=0,eE=e_>>3<<3;ew>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)+String.fromCharCode((eo<<7|ea<<2|ef>>>3)&255)+String.fromCharCode((ef<<5|eg)&255);var eS=e_-eE;return 2===eS?ev+=String.fromCharCode((($=eu[O.charAt(ew++)])<<3|(J=eu[O.charAt(ew++)])>>>2)&255):4===eS?($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)):5===eS?($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)):7===eS&&($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ea=eu[O.charAt(ew++)],ef=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)+String.fromCharCode((eo<<7|ea<<2|ef>>>3)&255)),ev},eg={encode:function(O,U){var $="string"!=typeof O;return($&&O.constructor===ArrayBuffer&&(O=new Uint8Array(O)),$)?encodeBytes(O):U?encodeAscii(O):encodeUtf8(O)},decode:decode};decode.asBytes=decodeAsBytes,es?O.exports=eg:(U.base32=eg,eo&&void 0!==(J=(function(){return eg}).call(eg,$,eg,O))&&(O.exports=J))}()},5335:function(O){"function"==typeof Object.create?O.exports=function(O,U){U&&(O.super_=U,O.prototype=Object.create(U.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}))}:O.exports=function(O,U){if(U){O.super_=U;var TempCtor=function(){};TempCtor.prototype=U.prototype,O.prototype=new TempCtor,O.prototype.constructor=O}}},9173:function(O){!function(U){"use strict";let $="(0?\\d+|0x[a-f0-9]+)",J={fourOctet:RegExp(`^${$}\\.${$}\\.${$}\\.${$}$`,"i"),threeOctet:RegExp(`^${$}\\.${$}\\.${$}$`,"i"),twoOctet:RegExp(`^${$}\\.${$}$`,"i"),longValue:RegExp(`^${$}$`,"i")},en=RegExp("^0[0-7]+$","i"),es=RegExp("^0x[a-f0-9]+$","i"),eo="%[0-9a-z]{1,}",ea="(?:[0-9a-f]+::?)+",eu={zoneIndex:RegExp(eo,"i"),native:RegExp(`^(::)?(${ea})?([0-9a-f]+)?(::)?(${eo})?$`,"i"),deprecatedTransitional:RegExp(`^(?:::)(${$}\\.${$}\\.${$}\\.${$}(${eo})?)$`,"i"),transitional:RegExp(`^((?:${ea})|(?:::)(?:${ea})?)${$}\\.${$}\\.${$}\\.${$}(${eo})?$`,"i")};function expandIPv6(O,U){let $,J;if(O.indexOf("::")!==O.lastIndexOf("::"))return null;let en=0,es=-1,eo=(O.match(eu.zoneIndex)||[])[0];for(eo&&(eo=eo.substring(1),O=O.replace(/%.+$/,""));(es=O.indexOf(":",es+1))>=0;)en++;if("::"===O.substr(0,2)&&en--,"::"===O.substr(-2,2)&&en--,en>U)return null;for(J=U-en,$=":";J--;)$+="0:";return":"===(O=O.replace("::",$))[0]&&(O=O.slice(1)),":"===O[O.length-1]&&(O=O.slice(0,-1)),{parts:U=function(){let U=O.split(":"),$=[];for(let O=0;O0;){if((en=$-J)<0&&(en=0),O[es]>>en!=U[es]>>en)return!1;J-=$,es+=1}return!0}function parseIntAuto(O){if(es.test(O))return parseInt(O,16);if("0"===O[0]&&!isNaN(parseInt(O[1],10))){if(en.test(O))return parseInt(O,8);throw Error(`ipaddr: cannot parse ${O} as octal`)}return parseInt(O,10)}function padPart(O,U){for(;O.length=0;O-=1){if(!((U=this.octets[O])in es)||($=es[U],en&&0!==$))return null;8!==$&&(en=!0),J+=$}return 32-J},IPv4.prototype.range=function(){return ef.subnetMatch(this,this.SpecialRanges)},IPv4.prototype.toByteArray=function(){return this.octets.slice(0)},IPv4.prototype.toIPv4MappedAddress=function(){return ef.IPv6.parse(`::ffff:${this.toString()}`)},IPv4.prototype.toNormalizedString=function(){return this.toString()},IPv4.prototype.toString=function(){return this.octets.join(".")},IPv4}(),ef.IPv4.broadcastAddressFromCIDR=function(O){try{let U=this.parseCIDR(O),$=U[0].toByteArray(),J=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],es=0;for(;es<4;)en.push(parseInt($[es],10)|255^parseInt(J[es],10)),es++;return new this(en)}catch(O){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},ef.IPv4.isIPv4=function(O){return null!==this.parser(O)},ef.IPv4.isValid=function(O){try{return new this(this.parser(O)),!0}catch(O){return!1}},ef.IPv4.isValidFourPartDecimal=function(O){return!!(ef.IPv4.isValid(O)&&O.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},ef.IPv4.networkAddressFromCIDR=function(O){let U,$,J,en,es;try{for(J=(U=this.parseCIDR(O))[0].toByteArray(),es=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],$=0;$<4;)en.push(parseInt(J[$],10)&parseInt(es[$],10)),$++;return new this(en)}catch(O){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},ef.IPv4.parse=function(O){let U=this.parser(O);if(null===U)throw Error("ipaddr: string is not formatted like an IPv4 Address");return new this(U)},ef.IPv4.parseCIDR=function(O){let U;if(U=O.match(/^(.+)\/(\d+)$/)){let O=parseInt(U[2]);if(O>=0&&O<=32){let $=[this.parse(U[1]),O];return Object.defineProperty($,"toString",{value:function(){return this.join("/")}}),$}}throw Error("ipaddr: string is not formatted like an IPv4 CIDR range")},ef.IPv4.parser=function(O){let U,$;if(U=O.match(J.fourOctet))return function(){let O=U.slice(1,6),$=[];for(let U=0;U4294967295||$<0)throw Error("ipaddr: address outside defined range");return(function(){let O;let U=[];for(O=0;O<=24;O+=8)U.push($>>O&255);return U})().reverse()}return(U=O.match(J.twoOctet))?function(){let O=U.slice(1,4),J=[];if(($=parseIntAuto(O[1]))>16777215||$<0)throw Error("ipaddr: address outside defined range");return J.push(parseIntAuto(O[0])),J.push($>>16&255),J.push($>>8&255),J.push(255&$),J}():(U=O.match(J.threeOctet))?function(){let O=U.slice(1,5),J=[];if(($=parseIntAuto(O[2]))>65535||$<0)throw Error("ipaddr: address outside defined range");return J.push(parseIntAuto(O[0])),J.push(parseIntAuto(O[1])),J.push($>>8&255),J.push(255&$),J}():null},ef.IPv4.subnetMaskFromPrefixLength=function(O){if((O=parseInt(O))<0||O>32)throw Error("ipaddr: invalid IPv4 prefix length");let U=[0,0,0,0],$=0,J=Math.floor(O/8);for(;$=0;es-=1){if(!((O=this.parts[es])in en)||(U=en[O],J&&0!==U))return null;16!==U&&(J=!0),$+=U}return 128-$},IPv6.prototype.range=function(){return ef.subnetMatch(this,this.SpecialRanges)},IPv6.prototype.toByteArray=function(){let O;let U=[],$=this.parts;for(let J=0;J<$.length;J++)U.push((O=$[J])>>8),U.push(255&O);return U},IPv6.prototype.toFixedLengthString=function(){let O=(function(){let O=[];for(let U=0;U>8,255&U,$>>8,255&$])},IPv6.prototype.toNormalizedString=function(){let O=(function(){let O=[];for(let U=0;Uen&&(J=O.index,en=O[0].length);return en<0?$:`${$.substring(0,J)}::${$.substring(J+en)}`},IPv6.prototype.toString=function(){return this.toRFC5952String()},IPv6}(),ef.IPv6.broadcastAddressFromCIDR=function(O){try{let U=this.parseCIDR(O),$=U[0].toByteArray(),J=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],es=0;for(;es<16;)en.push(parseInt($[es],10)|255^parseInt(J[es],10)),es++;return new this(en)}catch(O){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${O})`)}},ef.IPv6.isIPv6=function(O){return null!==this.parser(O)},ef.IPv6.isValid=function(O){if("string"==typeof O&&-1===O.indexOf(":"))return!1;try{let U=this.parser(O);return new this(U.parts,U.zoneId),!0}catch(O){return!1}},ef.IPv6.networkAddressFromCIDR=function(O){let U,$,J,en,es;try{for(J=(U=this.parseCIDR(O))[0].toByteArray(),es=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],$=0;$<16;)en.push(parseInt(J[$],10)&parseInt(es[$],10)),$++;return new this(en)}catch(O){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${O})`)}},ef.IPv6.parse=function(O){let U=this.parser(O);if(null===U.parts)throw Error("ipaddr: string is not formatted like an IPv6 Address");return new this(U.parts,U.zoneId)},ef.IPv6.parseCIDR=function(O){let U,$,J;if(($=O.match(/^(.+)\/(\d+)$/))&&(U=parseInt($[2]))>=0&&U<=128)return Object.defineProperty(J=[this.parse($[1]),U],"toString",{value:function(){return this.join("/")}}),J;throw Error("ipaddr: string is not formatted like an IPv6 CIDR range")},ef.IPv6.parser=function(O){let U,$,J,en,es,eo;if(J=O.match(eu.deprecatedTransitional))return this.parser(`::ffff:${J[1]}`);if(eu.native.test(O))return expandIPv6(O,8);if((J=O.match(eu.transitional))&&(eo=J[6]||"",(U=expandIPv6(J[1].slice(0,-1)+eo,6)).parts)){for($=0,es=[parseInt(J[2]),parseInt(J[3]),parseInt(J[4]),parseInt(J[5])];$128)throw Error("ipaddr: invalid IPv6 prefix length");let U=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$=0,J=Math.floor(O/8);for(;$=0)}O.exports=isElectron},361:function(O){"use strict";O.exports=O=>{if("[object Object]"!==Object.prototype.toString.call(O))return!1;let U=Object.getPrototypeOf(O);return null===U||U===Object.prototype}},2543:function(O,U,$){"use strict";let{URLWithLegacySupport:J,format:en,URLSearchParams:es,defaultBase:eo}=$(8608),ea=$(6926);O.exports={URL:J,URLSearchParams:es,format:en,relative:ea,defaultBase:eo}},6926:function(O,U,$){"use strict";let{URLWithLegacySupport:J,format:en}=$(8608);O.exports=(O,U={},$={},es)=>{let eo,ea=U.protocol?U.protocol.replace(":",""):"http";ea=($[ea]||es||ea)+":";try{eo=new J(O)}catch(O){eo={}}let eu=Object.assign({},U,{protocol:ea||eo.protocol,host:U.host||eo.host});return new J(O,en(eu)).toString()}},8608:function(O){"use strict";let U="undefined"!=typeof navigator&&"ReactNative"===navigator.product;function getDefaultBase(){return U?"http://localhost":self.location?self.location.protocol+"//"+self.location.host:""}let $=self.URL,J=getDefaultBase();let URLWithLegacySupport=class URLWithLegacySupport{constructor(O="",U=J){this.super=new $(O,U),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(O){this.super.hash=O}set host(O){this.super.host=O}set hostname(O){this.super.hostname=O}set href(O){this.super.href=O}set password(O){this.super.password=O}set pathname(O){this.super.pathname=O}set port(O){this.super.port=O}set protocol(O){this.super.protocol=O}set search(O){this.super.search=O}set username(O){this.super.username=O}static createObjectURL(O){return $.createObjectURL(O)}static revokeObjectURL(O){$.revokeObjectURL(O)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}};function format(O){if("string"==typeof O){let U=new $(O);return U.toString()}if(!(O instanceof $)){let U=O.username&&O.password?`${O.username}:${O.password}@`:"",$=O.auth?O.auth+"@":"",J=O.port?":"+O.port:"",en=O.protocol?O.protocol+"//":"",es=O.host||"",eo=O.hostname||"",ea=O.search||(O.query?"?"+O.query:""),eu=O.hash||"",ef=O.pathname||"",eg=O.path||ef+ea;return`${en}${U||$}${es||eo+J}${eg}${eu}`}}O.exports={URLWithLegacySupport,URLSearchParams:self.URLSearchParams,defaultBase:J,format}},6398:function(O,U,$){var J,en=$(2601);!function(){"use strict";var es="input is invalid type",eo="finalize already called",ea="object"==typeof window,eu=ea?window:{};eu.JS_SHA3_NO_WINDOW&&(ea=!1);var ef=!ea&&"object"==typeof self;!eu.JS_SHA3_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node?eu=$.g:ef&&(eu=self);var eg=!eu.JS_SHA3_NO_COMMON_JS&&O.exports,ev=$.amdO,e_=!eu.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ew="0123456789abcdef".split(""),eE=[31,7936,2031616,520093696],eS=[4,1024,262144,67108864],eA=[1,256,65536,16777216],eI=[6,1536,393216,100663296],eP=[0,8,16,24],ek=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],eT=[224,256,384,512],eR=[128,256],eC=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136};(eu.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return"[object Array]"===Object.prototype.toString.call(O)}),e_&&(eu.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return"object"==typeof O&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var createOutputMethod=function(O,U,$){return function(J){return new Keccak(O,U,O).update(J)[$]()}},createShakeOutputMethod=function(O,U,$){return function(J,en){return new Keccak(O,U,en).update(J)[$]()}},createCshakeOutputMethod=function(O,U,$){return function(U,J,en,es){return eD["cshake"+O].update(U,J,en,es)[$]()}},createKmacOutputMethod=function(O,U,$){return function(U,J,en,es){return eD["kmac"+O].update(U,J,en,es)[$]()}},createOutputMethods=function(O,U,$,J){for(var en=0;en>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=(31&$)>>3;for(var J=0;J<50;++J)this.s[J]=0}function Kmac(O,U,$){Keccak.call(this,O,U,$)}Keccak.prototype.update=function(O){if(this.finalized)throw Error(eo);var U,$=typeof O;if("string"!==$){if("object"===$){if(null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!e_||!ArrayBuffer.isView(O)))throw Error(es)}else throw Error(es);U=!0}for(var J,en,ea=this.blocks,eu=this.byteCount,ef=O.length,eg=this.blockCount,ev=0,ew=this.s;ev>2]|=O[ev]<>2]|=en<>2]|=(192|en>>6)<=57344?ea[J>>2]|=(224|en>>12)<>2]|=(240|en>>18)<>2]|=(128|en>>12&63)<>2]|=(128|en>>6&63)<>2]|=(128|63&en)<=eu){for(this.start=J-eu,this.block=ea[eg],J=0;J>=8,$=255&O;$>0;)en.unshift($),O>>=8,$=255&O,++J;return U?en.push(J):en.unshift(J),this.update(en),en.length},Keccak.prototype.encodeString=function(O){var U,$=typeof O;if("string"!==$){if("object"===$){if(null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!e_||!ArrayBuffer.isView(O)))throw Error(es)}else throw Error(es);U=!0}var J=0,en=O.length;if(U)J=en;else for(var eo=0;eo=57344?J+=3:(ea=65536+((1023&ea)<<10|1023&O.charCodeAt(++eo)),J+=4)}return J+=this.encode(8*J),this.update(O),J},Keccak.prototype.bytepad=function(O,U){for(var $=this.encode(U),J=0;J>2]|=this.padding[3&U],this.lastByteIndex===this.byteCount)for(U=1,O[0]=O[$];U<$+1;++U)O[U]=0;for(O[$-1]|=2147483648,U=0;U<$;++U)J[U]^=O[U];f(J)}},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea="";eo>4&15]+ew[15&O]+ew[O>>12&15]+ew[O>>8&15]+ew[O>>20&15]+ew[O>>16&15]+ew[O>>28&15]+ew[O>>24&15];eo%U==0&&(f($),es=0)}return en&&(ea+=ew[(O=$[es])>>4&15]+ew[15&O],en>1&&(ea+=ew[O>>12&15]+ew[O>>8&15]),en>2&&(ea+=ew[O>>20&15]+ew[O>>16&15])),ea},Keccak.prototype.arrayBuffer=function(){this.finalize();var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea=this.outputBits>>3;O=new ArrayBuffer(en?J+1<<2:ea);for(var eu=new Uint32Array(O);eo>8&255,eu[O+2]=U>>16&255,eu[O+3]=U>>24&255;ea%$==0&&f(J)}return es&&(O=ea<<2,U=J[eo],eu[O]=255&U,es>1&&(eu[O+1]=U>>8&255),es>2&&(eu[O+2]=U>>16&255)),eu},Kmac.prototype=new Keccak,Kmac.prototype.finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(O){var U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS,eA,eI,eP,eT,eR,eC,eB,eN,eD,eM,eO,eL,eU,eF,eK,ej,eH,eq,eV,eG,e$,eW,eY,eJ,eQ,eZ,eX,e0,e1,e3,e6,e5,e9,e7,te,tt,tr,ta,tu,th,td,tf,tp,tg,tm,ty,tb,tv;for(J=0;J<48;J+=2)en=O[0]^O[10]^O[20]^O[30]^O[40],es=O[1]^O[11]^O[21]^O[31]^O[41],eo=O[2]^O[12]^O[22]^O[32]^O[42],ea=O[3]^O[13]^O[23]^O[33]^O[43],eu=O[4]^O[14]^O[24]^O[34]^O[44],ef=O[5]^O[15]^O[25]^O[35]^O[45],eg=O[6]^O[16]^O[26]^O[36]^O[46],ev=O[7]^O[17]^O[27]^O[37]^O[47],e_=O[8]^O[18]^O[28]^O[38]^O[48],ew=O[9]^O[19]^O[29]^O[39]^O[49],U=e_^(eo<<1|ea>>>31),$=ew^(ea<<1|eo>>>31),O[0]^=U,O[1]^=$,O[10]^=U,O[11]^=$,O[20]^=U,O[21]^=$,O[30]^=U,O[31]^=$,O[40]^=U,O[41]^=$,U=en^(eu<<1|ef>>>31),$=es^(ef<<1|eu>>>31),O[2]^=U,O[3]^=$,O[12]^=U,O[13]^=$,O[22]^=U,O[23]^=$,O[32]^=U,O[33]^=$,O[42]^=U,O[43]^=$,U=eo^(eg<<1|ev>>>31),$=ea^(ev<<1|eg>>>31),O[4]^=U,O[5]^=$,O[14]^=U,O[15]^=$,O[24]^=U,O[25]^=$,O[34]^=U,O[35]^=$,O[44]^=U,O[45]^=$,U=eu^(e_<<1|ew>>>31),$=ef^(ew<<1|e_>>>31),O[6]^=U,O[7]^=$,O[16]^=U,O[17]^=$,O[26]^=U,O[27]^=$,O[36]^=U,O[37]^=$,O[46]^=U,O[47]^=$,U=eg^(en<<1|es>>>31),$=ev^(es<<1|en>>>31),O[8]^=U,O[9]^=$,O[18]^=U,O[19]^=$,O[28]^=U,O[29]^=$,O[38]^=U,O[39]^=$,O[48]^=U,O[49]^=$,eE=O[0],eS=O[1],e6=O[11]<<4|O[10]>>>28,e5=O[10]<<4|O[11]>>>28,eU=O[20]<<3|O[21]>>>29,eF=O[21]<<3|O[20]>>>29,tm=O[31]<<9|O[30]>>>23,ty=O[30]<<9|O[31]>>>23,eX=O[40]<<18|O[41]>>>14,e0=O[41]<<18|O[40]>>>14,eV=O[2]<<1|O[3]>>>31,eG=O[3]<<1|O[2]>>>31,eA=O[13]<<12|O[12]>>>20,eI=O[12]<<12|O[13]>>>20,e9=O[22]<<10|O[23]>>>22,e7=O[23]<<10|O[22]>>>22,eK=O[33]<<13|O[32]>>>19,ej=O[32]<<13|O[33]>>>19,tb=O[42]<<2|O[43]>>>30,tv=O[43]<<2|O[42]>>>30,tu=O[5]<<30|O[4]>>>2,th=O[4]<<30|O[5]>>>2,e$=O[14]<<6|O[15]>>>26,eW=O[15]<<6|O[14]>>>26,eP=O[25]<<11|O[24]>>>21,eT=O[24]<<11|O[25]>>>21,te=O[34]<<15|O[35]>>>17,tt=O[35]<<15|O[34]>>>17,eH=O[45]<<29|O[44]>>>3,eq=O[44]<<29|O[45]>>>3,eD=O[6]<<28|O[7]>>>4,eM=O[7]<<28|O[6]>>>4,td=O[17]<<23|O[16]>>>9,tf=O[16]<<23|O[17]>>>9,eY=O[26]<<25|O[27]>>>7,eJ=O[27]<<25|O[26]>>>7,eR=O[36]<<21|O[37]>>>11,eC=O[37]<<21|O[36]>>>11,tr=O[47]<<24|O[46]>>>8,ta=O[46]<<24|O[47]>>>8,e1=O[8]<<27|O[9]>>>5,e3=O[9]<<27|O[8]>>>5,eO=O[18]<<20|O[19]>>>12,eL=O[19]<<20|O[18]>>>12,tp=O[29]<<7|O[28]>>>25,tg=O[28]<<7|O[29]>>>25,eQ=O[38]<<8|O[39]>>>24,eZ=O[39]<<8|O[38]>>>24,eB=O[48]<<14|O[49]>>>18,eN=O[49]<<14|O[48]>>>18,O[0]=eE^~eA&eP,O[1]=eS^~eI&eT,O[10]=eD^~eO&eU,O[11]=eM^~eL&eF,O[20]=eV^~e$&eY,O[21]=eG^~eW&eJ,O[30]=e1^~e6&e9,O[31]=e3^~e5&e7,O[40]=tu^~td&tp,O[41]=th^~tf&tg,O[2]=eA^~eP&eR,O[3]=eI^~eT&eC,O[12]=eO^~eU&eK,O[13]=eL^~eF&ej,O[22]=e$^~eY&eQ,O[23]=eW^~eJ&eZ,O[32]=e6^~e9&te,O[33]=e5^~e7&tt,O[42]=td^~tp&tm,O[43]=tf^~tg&ty,O[4]=eP^~eR&eB,O[5]=eT^~eC&eN,O[14]=eU^~eK&eH,O[15]=eF^~ej&eq,O[24]=eY^~eQ&eX,O[25]=eJ^~eZ&e0,O[34]=e9^~te&tr,O[35]=e7^~tt&ta,O[44]=tp^~tm&tb,O[45]=tg^~ty&tv,O[6]=eR^~eB&eE,O[7]=eC^~eN&eS,O[16]=eK^~eH&eD,O[17]=ej^~eq&eM,O[26]=eQ^~eX&eV,O[27]=eZ^~e0&eG,O[36]=te^~tr&e1,O[37]=tt^~ta&e3,O[46]=tm^~tb&tu,O[47]=ty^~tv&th,O[8]=eB^~eE&eA,O[9]=eN^~eS&eI,O[18]=eH^~eD&eO,O[19]=eq^~eM&eL,O[28]=eX^~eV&e$,O[29]=e0^~eG&eW,O[38]=tr^~e1&e6,O[39]=ta^~e3&e5,O[48]=tb^~tu&td,O[49]=tv^~th&tf,O[0]^=ek[J],O[1]^=ek[J+1]};if(eg)O.exports=eD;else{for(eO=0;eOObject.defineProperty(O,U,{value:$,writable:!0,enumerable:!0,configurable:!0}),eo=this,ea={concatArrays:!1,ignoreUndefined:!1},getEnumerableOwnPropertyKeys=O=>{let U=[];for(let $ in O)en.call(O,$)&&U.push($);if(Object.getOwnPropertySymbols){let $=Object.getOwnPropertySymbols(O);for(let J of $)es.call(O,J)&&U.push(J)}return U};function clone(O){return Array.isArray(O)?cloneArray(O):J(O)?cloneOptionObject(O):O}function cloneArray(O){let U=O.slice(0,0);return getEnumerableOwnPropertyKeys(O).forEach($=>{defineProperty(U,$,clone(O[$]))}),U}function cloneOptionObject(O){let U=null===Object.getPrototypeOf(O)?Object.create(null):{};return getEnumerableOwnPropertyKeys(O).forEach($=>{defineProperty(U,$,clone(O[$]))}),U}let mergeKeys=(O,U,$,J)=>($.forEach($=>{void 0===U[$]&&J.ignoreUndefined||($ in O&&O[$]!==Object.getPrototypeOf(O)?defineProperty(O,$,merge(O[$],U[$],J)):defineProperty(O,$,clone(U[$])))}),O),concatArrays=(O,U,$)=>{let J=O.slice(0,0),es=0;return[O,U].forEach(U=>{let eo=[];for(let $=0;$!eo.includes(O)),$)}),J};function merge(O,U,$){return $.concatArrays&&Array.isArray(O)&&Array.isArray(U)?concatArrays(O,U,$):J(U)&&J(O)?mergeKeys(O,U,getEnumerableOwnPropertyKeys(U),$):clone(U)}O.exports=function(...O){let U=merge(clone(ea),this!==eo&&this||{},ea),$={_:{}};for(let en of O)if(void 0!==en){if(!J(en))throw TypeError("`"+en+"` is not an Option Object");$=merge($,{_:en},U)}return $._}},8786:function(O){function assert(O,U){if(!O)throw Error(U||"Assertion failed")}O.exports=assert,assert.equal=function(O,U,$){if(O!=U)throw Error($||"Assertion failed: "+O+" != "+U)}},438:function(O){var U=1e3,$=6e4,J=36e5,en=864e5,es=6048e5,eo=315576e5;function parse(O){if(!((O=String(O)).length>100)){var ea=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(ea){var eu=parseFloat(ea[1]);switch((ea[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return eu*eo;case"weeks":case"week":case"w":return eu*es;case"days":case"day":case"d":return eu*en;case"hours":case"hour":case"hrs":case"hr":case"h":return eu*J;case"minutes":case"minute":case"mins":case"min":case"m":return eu*$;case"seconds":case"second":case"secs":case"sec":case"s":return eu*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return eu;default:return}}}}function fmtShort(O){var es=Math.abs(O);return es>=en?Math.round(O/en)+"d":es>=J?Math.round(O/J)+"h":es>=$?Math.round(O/$)+"m":es>=U?Math.round(O/U)+"s":O+"ms"}function fmtLong(O){var es=Math.abs(O);return es>=en?plural(O,es,en,"day"):es>=J?plural(O,es,J,"hour"):es>=$?plural(O,es,$,"minute"):es>=U?plural(O,es,U,"second"):O+" ms"}function plural(O,U,$,J){var en=U>=1.5*$;return Math.round(O/$)+" "+J+(en?"s":"")}O.exports=function(O,U){U=U||{};var $=typeof O;if("string"===$&&O.length>0)return parse(O);if("number"===$&&isFinite(O))return U.long?fmtLong(O):fmtShort(O);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))}},5194:function(O,U){(function(){var O,$,J,en,es,eo,ea,eu;eu=function(O){return[(-16777216&O)>>>24,(16711680&O)>>>16,(65280&O)>>>8,255&O].join(".")},ea=function(O){var U,J,en,es,eo,ea;for(U=[],en=es=0;es<=3&&0!==O.length;en=++es){if(en>0){if("."!==O[0])throw Error("Invalid IP");O=O.substring(1)}eo=(ea=$(O))[0],J=ea[1],O=O.substring(J),U.push(eo)}if(0!==O.length)throw Error("Invalid IP");switch(U.length){case 1:if(U[0]>4294967295)throw Error("Invalid IP");return U[0]>>>0;case 2:if(U[0]>255||U[1]>16777215)throw Error("Invalid IP");return(U[0]<<24|U[1])>>>0;case 3:if(U[0]>255||U[1]>255||U[2]>65535)throw Error("Invalid IP");return(U[0]<<24|U[1]<<16|U[2])>>>0;case 4:if(U[0]>255||U[1]>255||U[2]>255||U[3]>255)throw Error("Invalid IP");return(U[0]<<24|U[1]<<16|U[2]<<8|U[3])>>>0;default:throw Error("Invalid IP")}},en=(J=function(O){return O.charCodeAt(0)})("0"),eo=J("a"),es=J("A"),$=function(O){var U,$,ea,eu,ef;for(eu=0,U=10,$="9",ea=0,O.length>1&&"0"===O[ea]&&("x"===O[ea+1]||"X"===O[ea+1]?(ea+=2,U=16):"0"<=O[ea+1]&&O[ea+1]<="9"&&(ea++,U=8,$="7")),ef=ea;ea>>0;else if(16===U){if("a"<=O[ea]&&O[ea]<="f")eu=eu*U+(10+J(O[ea])-eo)>>>0;else if("A"<=O[ea]&&O[ea]<="F")eu=eu*U+(10+J(O[ea])-es)>>>0;else break}else break;if(eu>4294967295)throw Error("too large");ea++}if(ea===ef)throw Error("empty octet");return[eu,ea]},O=function(){function Netmask(O,U){var $,J,en;if("string"!=typeof O)throw Error("Missing `net' parameter");if(U||(O=(en=O.split("/",2))[0],U=en[1]),U||(U=32),"string"==typeof U&&U.indexOf(".")>-1){try{this.maskLong=ea(U)}catch(O){throw Error("Invalid mask: "+U)}for($=J=32;J>=0;$=--J)if(this.maskLong===4294967295<<32-$>>>0){this.bitmask=$;break}}else if(U||0===U)this.bitmask=parseInt(U,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0);else throw Error("Invalid mask: empty");try{this.netLong=(ea(O)&this.maskLong)>>>0}catch(U){throw Error("Invalid net address: "+O)}if(!(this.bitmask<=32))throw Error("Invalid mask for ip4: "+U);this.size=Math.pow(2,32-this.bitmask),this.base=eu(this.netLong),this.mask=eu(this.maskLong),this.hostmask=eu(~this.maskLong),this.first=this.bitmask<=30?eu(this.netLong+1):this.base,this.last=this.bitmask<=30?eu(this.netLong+this.size-2):eu(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?eu(this.netLong+this.size-1):void 0}return Netmask.prototype.contains=function(O){return("string"==typeof O&&(O.indexOf("/")>0||4!==O.split(".").length)&&(O=new Netmask(O)),O instanceof Netmask)?this.contains(O.base)&&this.contains(O.broadcast||O.last):(ea(O)&this.maskLong)>>>0==(this.netLong&this.maskLong)>>>0},Netmask.prototype.next=function(O){return null==O&&(O=1),new Netmask(eu(this.netLong+this.size*O),this.mask)},Netmask.prototype.forEach=function(O){var U,$,J;for(J=ea(this.first),$=ea(this.last),U=0;J<=$;)O(eu(J),J,U),U++,J++},Netmask.prototype.toString=function(){return this.base+"/"+this.bitmask},Netmask}(),U.ip2long=ea,U.long2ip=eu,U.Netmask=O}).call(this)},2601:function(O,U,$){"use strict";var J,en;O.exports=(null==(J=$.g.process)?void 0:J.env)&&"object"==typeof(null==(en=$.g.process)?void 0:en.env)?$.g.process:$(8960)},8960:function(O){var U="/";!function(){var $={229:function(O){var U,$,J,en=O.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(O){if(U===setTimeout)return setTimeout(O,0);if((U===defaultSetTimout||!U)&&setTimeout)return U=setTimeout,setTimeout(O,0);try{return U(O,0)}catch($){try{return U.call(null,O,0)}catch($){return U.call(this,O,0)}}}function runClearTimeout(O){if($===clearTimeout)return clearTimeout(O);if(($===defaultClearTimeout||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(O);try{return $(O)}catch(U){try{return $.call(null,O)}catch(U){return $.call(this,O)}}}!function(){try{U="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(O){U=defaultSetTimout}try{$="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(O){$=defaultClearTimeout}}();var es=[],eo=!1,ea=-1;function cleanUpNextTick(){eo&&J&&(eo=!1,J.length?es=J.concat(es):ea=-1,es.length&&drainQueue())}function drainQueue(){if(!eo){var O=runTimeout(cleanUpNextTick);eo=!0;for(var U=es.length;U;){for(J=es,es=[];++ea1)for(var $=1;$=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eI=J===ev}else var eI=!0;if(eI){if(void 0!==$.c){let O=$.c,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/c",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/c/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/c",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/c/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eI=J===ev}else var eI=!0;if(eI){if(void 0!==$.prf){let O=$.prf,en=ev;if(ev===en){if("string"==typeof O){if(!J.test(O)){let O={instancePath:U+"/params/prf",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/prf/pattern",keyword:"pattern",params:{pattern:"^hmac-sha256$"},message:'must match pattern "^hmac-sha256$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/params/prf",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/prf/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eI=en===ev}else var eI=!0;if(eI){if(void 0!==$.salt){let O=ev;if("string"!=typeof $.salt){let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/Pbkdf2Module/properties/params/properties/salt/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}var eI=O===ev}else var eI=!0}}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Pbkdf2Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eA=en===ev}else var eA=!0;if(eA){if(void 0!==O.message){let $=O.message,J=ev;if(ev===J){if("string"==typeof $){if(!en.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Pbkdf2Module/properties/message/pattern",keyword:"pattern",params:{pattern:"^$"},message:'must match pattern "^$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Pbkdf2Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eA=J===ev}else var eA=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Pbkdf2Module/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eP=ew===ev;eP&&(ef=!0,e_=0);let eR=ev,eC=ev;if(ev===eC){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=ev;if(ev===J){if("string"==typeof $){if(!es.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/ScryptModule/properties/function/pattern",keyword:"pattern",params:{pattern:"^scrypt$"},message:'must match pattern "^scrypt$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/ScryptModule/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0;if(ek){if(void 0!==O.params){let $=O.params,J=ev;if(ev===J){if($&&"object"==typeof $&&!Array.isArray($)){let O;if(void 0===$.dklen&&(O="dklen")||void 0===$.n&&(O="n")||void 0===$.p&&(O="p")||void 0===$.r&&(O="r")||void 0===$.salt&&(O="salt")){let $={instancePath:U+"/params",schemaPath:"#/definitions/ScryptModule/properties/params/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};null===eg?eg=[$]:eg.push($),ev++}else{if(void 0!==$.dklen){let O=$.dklen,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/ScryptModule/properties/params/properties/dklen/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/dklen",schemaPath:"#/definitions/ScryptModule/properties/params/properties/dklen/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.n){let O=$.n,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/n",schemaPath:"#/definitions/ScryptModule/properties/params/properties/n/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/n",schemaPath:"#/definitions/ScryptModule/properties/params/properties/n/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.p){let O=$.p,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/p",schemaPath:"#/definitions/ScryptModule/properties/params/properties/p/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/p",schemaPath:"#/definitions/ScryptModule/properties/params/properties/p/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.r){let O=$.r,J=ev;if(!("number"==typeof O&&!(O%1)&&!isNaN(O)&&isFinite(O))){let O={instancePath:U+"/params/r",schemaPath:"#/definitions/ScryptModule/properties/params/properties/r/type",keyword:"type",params:{type:"integer"},message:"must be integer"};null===eg?eg=[O]:eg.push(O),ev++}if(ev===J&&"number"==typeof O&&isFinite(O)&&(O<0||isNaN(O))){let O={instancePath:U+"/params/r",schemaPath:"#/definitions/ScryptModule/properties/params/properties/r/minimum",keyword:"minimum",params:{comparison:">=",limit:0},message:"must be >= 0"};null===eg?eg=[O]:eg.push(O),ev++}var eT=J===ev}else var eT=!0;if(eT){if(void 0!==$.salt){let O=$.salt,J=ev;if(ev===J){if("string"==typeof O){if(!eo.test(O)){let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/ScryptModule/properties/params/properties/salt/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/params/salt",schemaPath:"#/definitions/ScryptModule/properties/params/properties/salt/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var eT=J===ev}else var eT=!0}}}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/ScryptModule/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0;if(ek){if(void 0!==O.message){let $=O.message,J=ev;if(ev===J){if("string"==typeof $){if(!en.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/ScryptModule/properties/message/pattern",keyword:"pattern",params:{pattern:"^$"},message:'must match pattern "^$"'};null===eg?eg=[O]:eg.push(O),ev++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/ScryptModule/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===eg?eg=[O]:eg.push(O),ev++}}var ek=J===ev}else var ek=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/ScryptModule/type",keyword:"type",params:{type:"object"},message:"must be object"};null===eg?eg=[O]:eg.push(O),ev++}}var eP=eR===ev;if(eP&&ef?(ef=!1,e_=[e_,1]):eP&&(ef=!0,e_=1),ef)ev=eu,null!==eg&&(eu?eg.length=eu:eg=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:e_},message:"must match exactly one schema in oneOf"};return null===eg?eg=[O]:eg.push(O),ev++,validate12.errors=eg,!1}var eS=ea===ev}return validate12.errors=eg,0===ev}let ea=RegExp("^sha256$","u");function validate14(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eu=0,ef=eu,eg=eu;if(eu===eg){if(!O||"object"!=typeof O||Array.isArray(O))return validate14.errors=[{instancePath:U,schemaPath:"#/definitions/Module/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.function&&($="function")||void 0===O.message&&($="message")||void 0===O.params&&($="params"))return validate14.errors=[{instancePath:U,schemaPath:"#/definitions/Module/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.function){let $=eu;if("string"!=typeof O.function)return validate14.errors=[{instancePath:U+"/function",schemaPath:"#/definitions/Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ev=$===eu}else var ev=!0;if(ev){if(void 0!==O.params){let $=O.params,J=eu;if(!($&&"object"==typeof $&&!Array.isArray($)))return validate14.errors=[{instancePath:U+"/params",schemaPath:"#/definitions/Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ev=J===eu}else var ev=!0;if(ev){if(void 0!==O.message){let $=eu;if("string"!=typeof O.message)return validate14.errors=[{instancePath:U+"/message",schemaPath:"#/definitions/Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ev=$===eu}else var ev=!0}}}}var e_=ef===eu;if(e_){let $=eu,J=eu,en=!1,ef=null,eg=eu,ev=eu;if(eu===ev){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=eu;if(eu===J){if("string"==typeof $){if(!ea.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/Sha2Module/properties/function/pattern",keyword:"pattern",params:{pattern:"^sha256$"},message:'must match pattern "^sha256$"'};null===es?es=[O]:es.push(O),eu++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/Sha2Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0;if(ew){if(void 0!==O.params){let $=O.params,J=eu;if(eu===J){if($&&"object"==typeof $&&!Array.isArray($))for(let O in $){let $={instancePath:U+"/params",schemaPath:"#/definitions/Sha2Module/properties/params/additionalProperties",keyword:"additionalProperties",params:{additionalProperty:O},message:"must NOT have additional properties"};null===es?es=[$]:es.push($),eu++;break}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Sha2Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0;if(ew){if(void 0!==O.message){let $=O.message,J=eu;if(eu===J){if("string"==typeof $){if(!eo.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Sha2Module/properties/message/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===es?es=[O]:es.push(O),eu++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Sha2Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),eu++}}var ew=J===eu}else var ew=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Sha2Module/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),eu++}}if(eg===eu&&(en=!0,ef=0),en)eu=J,null!==es&&(J?es.length=J:es=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:ef},message:"must match exactly one schema in oneOf"};return null===es?es=[O]:es.push(O),eu++,validate14.errors=es,!1}var e_=$===eu}return validate14.errors=es,0===eu}let eu=RegExp("^aes-128-ctr$","u"),ef=RegExp("^([A-Fa-f0-9]{2}){16}$","u");function validate16(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,ea=0,eg=ea,ev=ea;if(ea===ev){if(!O||"object"!=typeof O||Array.isArray(O))return validate16.errors=[{instancePath:U,schemaPath:"#/definitions/Module/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.function&&($="function")||void 0===O.message&&($="message")||void 0===O.params&&($="params"))return validate16.errors=[{instancePath:U,schemaPath:"#/definitions/Module/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.function){let $=ea;if("string"!=typeof O.function)return validate16.errors=[{instancePath:U+"/function",schemaPath:"#/definitions/Module/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var e_=$===ea}else var e_=!0;if(e_){if(void 0!==O.params){let $=O.params,J=ea;if(!($&&"object"==typeof $&&!Array.isArray($)))return validate16.errors=[{instancePath:U+"/params",schemaPath:"#/definitions/Module/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var e_=J===ea}else var e_=!0;if(e_){if(void 0!==O.message){let $=ea;if("string"!=typeof O.message)return validate16.errors=[{instancePath:U+"/message",schemaPath:"#/definitions/Module/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var e_=$===ea}else var e_=!0}}}}var ew=eg===ea;if(ew){let $=ea,J=ea,en=!1,eg=null,ev=ea,e_=ea;if(ea===e_){if(O&&"object"==typeof O&&!Array.isArray(O)){if(void 0!==O.function){let $=O.function,J=ea;if(ea===J){if("string"==typeof $){if(!eu.test($)){let O={instancePath:U+"/function",schemaPath:"#/definitions/Aes128CtrModule/properties/function/pattern",keyword:"pattern",params:{pattern:"^aes-128-ctr$"},message:'must match pattern "^aes-128-ctr$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/function",schemaPath:"#/definitions/Aes128CtrModule/properties/function/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0;if(eE){if(void 0!==O.params){let $=O.params,J=ea;if(ea===J){if($&&"object"==typeof $&&!Array.isArray($)){let O;if(void 0===$.iv&&(O="iv")){let $={instancePath:U+"/params",schemaPath:"#/definitions/Aes128CtrModule/properties/params/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"};null===es?es=[$]:es.push($),ea++}else if(void 0!==$.iv){let O=$.iv,J=ea;if(ea===J){if("string"==typeof O){if(!ef.test(O)){let O={instancePath:U+"/params/iv",schemaPath:"#/definitions/Aes128CtrModule/properties/params/properties/iv/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){16}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){16}$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/params/iv",schemaPath:"#/definitions/Aes128CtrModule/properties/params/properties/iv/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}}}else{let O={instancePath:U+"/params",schemaPath:"#/definitions/Aes128CtrModule/properties/params/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0;if(eE){if(void 0!==O.message){let $=O.message,J=ea;if(ea===J){if("string"==typeof $){if(!eo.test($)){let O={instancePath:U+"/message",schemaPath:"#/definitions/Aes128CtrModule/properties/message/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){32}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){32}$"'};null===es?es=[O]:es.push(O),ea++}}else{let O={instancePath:U+"/message",schemaPath:"#/definitions/Aes128CtrModule/properties/message/type",keyword:"type",params:{type:"string"},message:"must be string"};null===es?es=[O]:es.push(O),ea++}}var eE=J===ea}else var eE=!0}}}else{let O={instancePath:U,schemaPath:"#/definitions/Aes128CtrModule/type",keyword:"type",params:{type:"object"},message:"must be object"};null===es?es=[O]:es.push(O),ea++}}if(ev===ea&&(en=!0,eg=0),en)ea=J,null!==es&&(J?es.length=J:es=null);else{let O={instancePath:U,schemaPath:"#/allOf/1/oneOf",keyword:"oneOf",params:{passingSchemas:eg},message:"must match exactly one schema in oneOf"};return null===es?es=[O]:es.push(O),ea++,validate16.errors=es,!1}var ew=$===ea}return validate16.errors=es,0===ea}let eg=RegExp("^([A-Fa-f0-9]{2}){48}$","u"),ev=/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i;function validate19(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return validate19.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.crypto&&($="crypto")||void 0===O.path&&($="path")||void 0===O.uuid&&($="uuid")||void 0===O.version&&($="version"))return validate19.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.crypto){let $=O.crypto,J=eo;if(eo===J){if(!$||"object"!=typeof $||Array.isArray($))return validate19.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let O;if(void 0===$.kdf&&(O="kdf")||void 0===$.checksum&&(O="checksum")||void 0===$.cipher&&(O="cipher"))return validate19.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"}],!1;if(void 0!==$.kdf){let O=eo;validate12($.kdf,{instancePath:U+"/crypto/kdf",parentData:$,parentDataProperty:"kdf",rootData:en})||(eo=(es=null===es?validate12.errors:es.concat(validate12.errors)).length);var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.checksum){let O=eo;validate14($.checksum,{instancePath:U+"/crypto/checksum",parentData:$,parentDataProperty:"checksum",rootData:en})||(eo=(es=null===es?validate14.errors:es.concat(validate14.errors)).length);var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.cipher){let O=eo;validate16($.cipher,{instancePath:U+"/crypto/cipher",parentData:$,parentDataProperty:"cipher",rootData:en})||(eo=(es=null===es?validate16.errors:es.concat(validate16.errors)).length);var ea=O===eo}else var ea=!0}}}}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.pubkey){let $=O.pubkey,J=eo;if(eo===J){if("string"!=typeof $)return validate19.errors=[{instancePath:U+"/pubkey",schemaPath:"#/properties/pubkey/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!eg.test($))return validate19.errors=[{instancePath:U+"/pubkey",schemaPath:"#/properties/pubkey/pattern",keyword:"pattern",params:{pattern:"^([A-Fa-f0-9]{2}){48}$"},message:'must match pattern "^([A-Fa-f0-9]{2}){48}$"'}],!1}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.path){let $=eo;if("string"!=typeof O.path)return validate19.errors=[{instancePath:U+"/path",schemaPath:"#/properties/path/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eu=$===eo}else var eu=!0;if(eu){if(void 0!==O.description){let $=eo;if("string"!=typeof O.description)return validate19.errors=[{instancePath:U+"/description",schemaPath:"#/properties/description/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var eu=$===eo}else var eu=!0;if(eu){if(void 0!==O.uuid){let $=O.uuid,J=eo;if(eo===J&&eo===J){if("string"!=typeof $)return validate19.errors=[{instancePath:U+"/uuid",schemaPath:"#/properties/uuid/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;if(!ev.test($))return validate19.errors=[{instancePath:U+"/uuid",schemaPath:"#/properties/uuid/format",keyword:"format",params:{format:"uuid"},message:'must match format "uuid"'}],!1}var eu=J===eo}else var eu=!0;if(eu){if(void 0!==O.version){let $=O.version,J=eo;if(!("number"==typeof $&&!($%1)&&!isNaN($)&&isFinite($)))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"integer"},message:"must be integer"}],!1;if(eo===J&&"number"==typeof $&&isFinite($)){if($>4||isNaN($))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/maximum",keyword:"maximum",params:{comparison:"<=",limit:4},message:"must be <= 4"}],!1;if($<4||isNaN($))return validate19.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/minimum",keyword:"minimum",params:{comparison:">=",limit:4},message:"must be >= 4"}],!1}var eu=J===eo}else var eu=!0}}}}}}return validate19.errors=es,0===eo}},7041:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.isValidKeystore=U.validateKeystore=U.schemaValidationErrors=void 0;let J=$(1318),en=J.Keystore;function schemaValidationErrors(O){let U=en(O);return U?null:en.errors}function validateKeystore(O){let U=schemaValidationErrors(O);if(U)throw Error(U.map(O=>`${O.instancePath}: ${O.message}`).join("\n"))}function isValidKeystore(O){return!schemaValidationErrors(O)}U.schemaValidationErrors=schemaValidationErrors,U.validateKeystore=validateKeystore,U.isValidKeystore=isValidKeystore},1474:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0})},4390:function(O,U){"use strict";function number(O){if(!Number.isSafeInteger(O)||O<0)throw Error(`Wrong positive integer: ${O}`)}function bool(O){if("boolean"!=typeof O)throw Error(`Expected boolean, not ${O}`)}function bytes(O,...U){if(!(O instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(U.length>0&&!U.includes(O.length))throw TypeError(`Expected Uint8Array of length ${U}, not of length=${O.length}`)}function hash(O){if("function"!=typeof O||"function"!=typeof O.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(O.outputLen),number(O.blockLen)}function exists(O,U=!0){if(O.destroyed)throw Error("Hash instance has been destroyed");if(U&&O.finished)throw Error("Hash#digest() has already been called")}function output(O,U){bytes(O);let $=U.outputLen;if(O.length<$)throw Error(`digestInto() expects output buffer of length at least ${$}`)}Object.defineProperty(U,"__esModule",{value:!0}),U.output=U.exists=U.hash=U.bytes=U.bool=U.number=void 0,U.number=number,U.bool=bool,U.bytes=bytes,U.hash=hash,U.exists=exists,U.output=output;let $={number,bool,bytes,hash,exists,output};U.default=$},2495:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.SHA2=void 0;let J=$(4390),en=$(5158);function setBigUint64(O,U,$,J){if("function"==typeof O.setBigUint64)return O.setBigUint64(U,$,J);let en=BigInt(32),es=BigInt(4294967295),eo=Number($>>en&es),ea=Number($&es),eu=J?4:0,ef=J?0:4;O.setUint32(U+eu,eo,J),O.setUint32(U+ef,ea,J)}let SHA2=class SHA2 extends en.Hash{constructor(O,U,$,J){super(),this.blockLen=O,this.outputLen=U,this.padOffset=$,this.isLE=J,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(O),this.view=(0,en.createView)(this.buffer)}update(O){J.default.exists(this);let{view:U,buffer:$,blockLen:es}=this;O=(0,en.toBytes)(O);let eo=O.length;for(let J=0;Jes-ea&&(this.process($,0),ea=0);for(let O=ea;Oev.length)throw Error("_sha2: outputLen bigger than state");for(let O=0;O>J&$)}:{h:0|Number(O>>J&$),l:0|Number(O&$)}}function split(O,U=!1){let $=new Uint32Array(O.length),J=new Uint32Array(O.length);for(let en=0;enBigInt(O>>>0)<>>0);U.toBig=toBig;let shrSH=(O,U,$)=>O>>>$,shrSL=(O,U,$)=>O<<32-$|U>>>$,rotrSH=(O,U,$)=>O>>>$|U<<32-$,rotrSL=(O,U,$)=>O<<32-$|U>>>$,rotrBH=(O,U,$)=>O<<64-$|U>>>$-32,rotrBL=(O,U,$)=>O>>>$-32|U<<64-$,rotr32H=(O,U)=>U,rotr32L=(O,U)=>O,rotlSH=(O,U,$)=>O<<$|U>>>32-$,rotlSL=(O,U,$)=>U<<$|O>>>32-$,rotlBH=(O,U,$)=>U<<$-32|O>>>64-$,rotlBL=(O,U,$)=>O<<$-32|U>>>64-$;function add(O,U,$,J){let en=(U>>>0)+(J>>>0);return{h:O+$+(en/4294967296|0)|0,l:0|en}}U.add=add;let add3L=(O,U,$)=>(O>>>0)+(U>>>0)+($>>>0),add3H=(O,U,$,J)=>U+$+J+(O/4294967296|0)|0,add4L=(O,U,$,J)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0),add4H=(O,U,$,J,en)=>U+$+J+en+(O/4294967296|0)|0,add5L=(O,U,$,J,en)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0)+(en>>>0),add5H=(O,U,$,J,en,es)=>U+$+J+en+es+(O/4294967296|0)|0,en={fromBig,split,toBig:U.toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L};U.default=en},9761:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.crypto=void 0,U.crypto={node:void 0,web:"object"==typeof self&&"crypto"in self?self.crypto:void 0}},8119:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.hmac=void 0;let J=$(4390),en=$(5158);let HMAC=class HMAC extends en.Hash{constructor(O,U){super(),this.finished=!1,this.destroyed=!1,J.default.hash(O);let $=(0,en.toBytes)(U);if(this.iHash=O.create(),"function"!=typeof this.iHash.update)throw TypeError("Expected instance of class which extends utils.Hash");this.blockLen=this.iHash.blockLen,this.outputLen=this.iHash.outputLen;let es=this.blockLen,eo=new Uint8Array(es);eo.set($.length>es?O.create().update($).digest():$);for(let O=0;Onew HMAC(O,U).update($).digest();U.hmac=hmac,U.hmac.create=(O,U)=>new HMAC(O,U)},4618:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.pbkdf2Async=U.pbkdf2=void 0;let J=$(4390),en=$(8119),es=$(5158);function pbkdf2Init(O,U,$,eo){J.default.hash(O);let ea=(0,es.checkOpts)({dkLen:32,asyncTick:10},eo),{c:eu,dkLen:ef,asyncTick:eg}=ea;if(J.default.number(eu),J.default.number(ef),J.default.number(eg),eu<1)throw Error("PBKDF2: iterations (c) should be >= 1");let ev=(0,es.toBytes)(U),e_=(0,es.toBytes)($),ew=new Uint8Array(ef),eE=en.hmac.create(O,ev),eS=eE._cloneInto().update(e_);return{c:eu,dkLen:ef,asyncTick:eg,DK:ew,PRF:eE,PRFSalt:eS}}function pbkdf2Output(O,U,$,J,en){return O.destroy(),U.destroy(),J&&J.destroy(),en.fill(0),$}function pbkdf2(O,U,$,J){let en;let{c:eo,dkLen:ea,DK:eu,PRF:ef,PRFSalt:eg}=pbkdf2Init(O,U,$,J),ev=new Uint8Array(4),e_=(0,es.createView)(ev),ew=new Uint8Array(ef.outputLen);for(let O=1,U=0;U{eg._cloneInto(en).update(eE).digestInto(eE);for(let O=0;O<$.length;O++)$[O]^=eE[O]})}return pbkdf2Output(eg,ev,ef,en,eE)}U.pbkdf2=pbkdf2,U.pbkdf2Async=pbkdf2Async},6906:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.scryptAsync=U.scrypt=void 0;let J=$(4390),en=$(938),es=$(4618),eo=$(5158),rotl=(O,U)=>O<>>32-U;function XorAndSalsa(O,U,$,J,en,es){let eo=O[U++]^$[J++],ea=O[U++]^$[J++],eu=O[U++]^$[J++],ef=O[U++]^$[J++],eg=O[U++]^$[J++],ev=O[U++]^$[J++],e_=O[U++]^$[J++],ew=O[U++]^$[J++],eE=O[U++]^$[J++],eS=O[U++]^$[J++],eA=O[U++]^$[J++],eI=O[U++]^$[J++],eP=O[U++]^$[J++],ek=O[U++]^$[J++],eT=O[U++]^$[J++],eR=O[U++]^$[J++],eC=eo,eB=ea,eN=eu,eD=ef,eM=eg,eO=ev,eL=e_,eU=ew,eF=eE,eK=eS,ej=eA,eH=eI,eq=eP,eV=ek,eG=eT,e$=eR;for(let O=0;O<8;O+=2)eM^=rotl(eC+eq|0,7),eF^=rotl(eM+eC|0,9),eq^=rotl(eF+eM|0,13),eC^=rotl(eq+eF|0,18),eK^=rotl(eO+eB|0,7),eV^=rotl(eK+eO|0,9),eB^=rotl(eV+eK|0,13),eO^=rotl(eB+eV|0,18),eG^=rotl(ej+eL|0,7),eN^=rotl(eG+ej|0,9),eL^=rotl(eN+eG|0,13),ej^=rotl(eL+eN|0,18),eD^=rotl(e$+eH|0,7),eU^=rotl(eD+e$|0,9),eH^=rotl(eU+eD|0,13),e$^=rotl(eH+eU|0,18),eB^=rotl(eC+eD|0,7),eN^=rotl(eB+eC|0,9),eD^=rotl(eN+eB|0,13),eC^=rotl(eD+eN|0,18),eL^=rotl(eO+eM|0,7),eU^=rotl(eL+eO|0,9),eM^=rotl(eU+eL|0,13),eO^=rotl(eM+eU|0,18),eH^=rotl(ej+eK|0,7),eF^=rotl(eH+ej|0,9),eK^=rotl(eF+eH|0,13),ej^=rotl(eK+eF|0,18),eq^=rotl(e$+eG|0,7),eV^=rotl(eq+e$|0,9),eG^=rotl(eV+eq|0,13),e$^=rotl(eG+eV|0,18);en[es++]=eo+eC|0,en[es++]=ea+eB|0,en[es++]=eu+eN|0,en[es++]=ef+eD|0,en[es++]=eg+eM|0,en[es++]=ev+eO|0,en[es++]=e_+eL|0,en[es++]=ew+eU|0,en[es++]=eE+eF|0,en[es++]=eS+eK|0,en[es++]=eA+ej|0,en[es++]=eI+eH|0,en[es++]=eP+eq|0,en[es++]=ek+eV|0,en[es++]=eT+eG|0,en[es++]=eR+e$|0}function BlockMix(O,U,$,J,en){let es=J+0,eo=J+16*en;for(let J=0;J<16;J++)$[eo+J]=O[U+(2*en-1)*16+J];for(let J=0;J0&&(eo+=16),XorAndSalsa($,es,O,U+=16,$,eo)}function scryptInit(O,U,$){let ea=(0,eo.checkOpts)({dkLen:32,asyncTick:10,maxmem:1073742848},$),{N:eu,r:ef,p:eg,dkLen:ev,asyncTick:e_,maxmem:ew,onProgress:eE}=ea;if(J.default.number(eu),J.default.number(ef),J.default.number(eg),J.default.number(ev),J.default.number(e_),J.default.number(ew),void 0!==eE&&"function"!=typeof eE)throw Error("progressCb should be function");let eS=128*ef,eA=eS/4;if(eu<=1||(eu&eu-1)!=0||eu>=2**(eS/8)||eu>4294967296)throw Error("Scrypt: N must be larger than 1, a power of 2, less than 2^(128 * r / 8) and less than 2^32");if(eg<0||eg>(4294967296-1)*32/eS)throw Error("Scrypt: p must be a positive integer less than or equal to ((2^32 - 1) * 32) / (128 * r)");if(ev<0||ev>(4294967296-1)*32)throw Error("Scrypt: dkLen should be positive integer less than or equal to (2^32 - 1) * 32");let eI=eS*(eu+eg);if(eI>ew)throw Error(`Scrypt: parameters too large, ${eI} (128 * r * (N + p)) > ${ew} (maxmem)`);let eP=(0,es.pbkdf2)(en.sha256,O,U,{c:1,dkLen:eS*eg}),ek=(0,eo.u32)(eP),eT=(0,eo.u32)(new Uint8Array(eS*eu)),eR=(0,eo.u32)(new Uint8Array(eS)),blockMixCb=()=>{};if(eE){let O=2*eu*eg,U=Math.max(Math.floor(O/1e4),1),$=0;blockMixCb=()=>{$++,eE&&(!($%U)||$===O)&&eE($/O)}}return{N:eu,r:ef,p:eg,dkLen:ev,blockSize32:eA,V:eT,B32:ek,B:eP,tmp:eR,blockMixCb,asyncTick:e_}}function scryptOutput(O,U,$,J,eo){let ea=(0,es.pbkdf2)(en.sha256,O,$,{c:1,dkLen:U});return $.fill(0),J.fill(0),eo.fill(0),ea}function scrypt(O,U,$){let{N:J,r:en,p:es,dkLen:eo,blockSize32:ea,V:eu,B32:ef,B:eg,tmp:ev,blockMixCb:e_}=scryptInit(O,U,$);for(let O=0;O{BlockMix(ef,$,ef,$+=eu,en),ew()}),BlockMix(ef,(J-1)*eu,eg,U,en),ew(),await (0,eo.asyncLoop)(J,eE,O=>{let $=eg[U+eu-16]%J;for(let O=0;OO&U^~O&$,Maj=(O,U,$)=>O&U^O&$^U&$,es=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]),eo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ea=new Uint32Array(64);let SHA256=class SHA256 extends J.SHA2{constructor(){super(64,32,8,!1),this.A=0|eo[0],this.B=0|eo[1],this.C=0|eo[2],this.D=0|eo[3],this.E=0|eo[4],this.F=0|eo[5],this.G=0|eo[6],this.H=0|eo[7]}get(){let{A:O,B:U,C:$,D:J,E:en,F:es,G:eo,H:ea}=this;return[O,U,$,J,en,es,eo,ea]}set(O,U,$,J,en,es,eo,ea){this.A=0|O,this.B=0|U,this.C=0|$,this.D=0|J,this.E=0|en,this.F=0|es,this.G=0|eo,this.H=0|ea}process(O,U){for(let $=0;$<16;$++,U+=4)ea[$]=O.getUint32(U,!1);for(let O=16;O<64;O++){let U=ea[O-15],$=ea[O-2],J=(0,en.rotr)(U,7)^(0,en.rotr)(U,18)^U>>>3,es=(0,en.rotr)($,17)^(0,en.rotr)($,19)^$>>>10;ea[O]=es+ea[O-7]+J+ea[O-16]|0}let{A:$,B:J,C:eo,D:eu,E:ef,F:eg,G:ev,H:e_}=this;for(let O=0;O<64;O++){let U=(0,en.rotr)(ef,6)^(0,en.rotr)(ef,11)^(0,en.rotr)(ef,25),ew=e_+U+Chi(ef,eg,ev)+es[O]+ea[O]|0,eE=(0,en.rotr)($,2)^(0,en.rotr)($,13)^(0,en.rotr)($,22),eS=eE+Maj($,J,eo)|0;e_=ev,ev=eg,eg=ef,ef=eu+ew|0,eu=eo,eo=J,J=$,$=ew+eS|0}$=$+this.A|0,J=J+this.B|0,eo=eo+this.C|0,eu=eu+this.D|0,ef=ef+this.E|0,eg=eg+this.F|0,ev=ev+this.G|0,e_=e_+this.H|0,this.set($,J,eo,eu,ef,eg,ev,e_)}roundClean(){ea.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let SHA224=class SHA224 extends SHA256{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}};U.sha256=(0,en.wrapConstructor)(()=>new SHA256),U.sha224=(0,en.wrapConstructor)(()=>new SHA224)},1791:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.sha384=U.sha512_256=U.sha512_224=U.sha512=U.SHA512=void 0;let J=$(2495),en=$(3991),es=$(5158),[eo,ea]=en.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(O=>BigInt(O))),eu=new Uint32Array(80),ef=new Uint32Array(80);let SHA512=class SHA512 extends J.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(){let{Ah:O,Al:U,Bh:$,Bl:J,Ch:en,Cl:es,Dh:eo,Dl:ea,Eh:eu,El:ef,Fh:eg,Fl:ev,Gh:e_,Gl:ew,Hh:eE,Hl:eS}=this;return[O,U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS]}set(O,U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS){this.Ah=0|O,this.Al=0|U,this.Bh=0|$,this.Bl=0|J,this.Ch=0|en,this.Cl=0|es,this.Dh=0|eo,this.Dl=0|ea,this.Eh=0|eu,this.El=0|ef,this.Fh=0|eg,this.Fl=0|ev,this.Gh=0|e_,this.Gl=0|ew,this.Hh=0|eE,this.Hl=0|eS}process(O,U){for(let $=0;$<16;$++,U+=4)eu[$]=O.getUint32(U),ef[$]=O.getUint32(U+=4);for(let O=16;O<80;O++){let U=0|eu[O-15],$=0|ef[O-15],J=en.default.rotrSH(U,$,1)^en.default.rotrSH(U,$,8)^en.default.shrSH(U,$,7),es=en.default.rotrSL(U,$,1)^en.default.rotrSL(U,$,8)^en.default.shrSL(U,$,7),eo=0|eu[O-2],ea=0|ef[O-2],eg=en.default.rotrSH(eo,ea,19)^en.default.rotrBH(eo,ea,61)^en.default.shrSH(eo,ea,6),ev=en.default.rotrSL(eo,ea,19)^en.default.rotrBL(eo,ea,61)^en.default.shrSL(eo,ea,6),e_=en.default.add4L(es,ev,ef[O-7],ef[O-16]),ew=en.default.add4H(e_,J,eg,eu[O-7],eu[O-16]);eu[O]=0|ew,ef[O]=0|e_}let{Ah:$,Al:J,Bh:es,Bl:eg,Ch:ev,Cl:e_,Dh:ew,Dl:eE,Eh:eS,El:eA,Fh:eI,Fl:eP,Gh:ek,Gl:eT,Hh:eR,Hl:eC}=this;for(let O=0;O<80;O++){let U=en.default.rotrSH(eS,eA,14)^en.default.rotrSH(eS,eA,18)^en.default.rotrBH(eS,eA,41),eB=en.default.rotrSL(eS,eA,14)^en.default.rotrSL(eS,eA,18)^en.default.rotrBL(eS,eA,41),eN=eS&eI^~eS&ek,eD=eA&eP^~eA&eT,eM=en.default.add5L(eC,eB,eD,ea[O],ef[O]),eO=en.default.add5H(eM,eR,U,eN,eo[O],eu[O]),eL=0|eM,eU=en.default.rotrSH($,J,28)^en.default.rotrBH($,J,34)^en.default.rotrBH($,J,39),eF=en.default.rotrSL($,J,28)^en.default.rotrBL($,J,34)^en.default.rotrBL($,J,39),eK=$&es^$&ev^es&ev,ej=J&eg^J&e_^eg&e_;eR=0|ek,eC=0|eT,ek=0|eI,eT=0|eP,eI=0|eS,eP=0|eA,({h:eS,l:eA}=en.default.add(0|ew,0|eE,0|eO,0|eL)),ew=0|ev,eE=0|e_,ev=0|es,e_=0|eg,es=0|$,eg=0|J;let eH=en.default.add3L(eL,eF,ej);$=en.default.add3H(eH,eO,eU,eK),J=0|eH}({h:$,l:J}=en.default.add(0|this.Ah,0|this.Al,0|$,0|J)),({h:es,l:eg}=en.default.add(0|this.Bh,0|this.Bl,0|es,0|eg)),({h:ev,l:e_}=en.default.add(0|this.Ch,0|this.Cl,0|ev,0|e_)),({h:ew,l:eE}=en.default.add(0|this.Dh,0|this.Dl,0|ew,0|eE)),({h:eS,l:eA}=en.default.add(0|this.Eh,0|this.El,0|eS,0|eA)),({h:eI,l:eP}=en.default.add(0|this.Fh,0|this.Fl,0|eI,0|eP)),({h:ek,l:eT}=en.default.add(0|this.Gh,0|this.Gl,0|ek,0|eT)),({h:eR,l:eC}=en.default.add(0|this.Hh,0|this.Hl,0|eR,0|eC)),this.set($,J,es,eg,ev,e_,ew,eE,eS,eA,eI,eP,ek,eT,eR,eC)}roundClean(){eu.fill(0),ef.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)}};U.SHA512=SHA512;let SHA512_224=class SHA512_224 extends SHA512{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}};let SHA512_256=class SHA512_256 extends SHA512{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}};let SHA384=class SHA384 extends SHA512{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}};U.sha512=(0,es.wrapConstructor)(()=>new SHA512),U.sha512_224=(0,es.wrapConstructor)(()=>new SHA512_224),U.sha512_256=(0,es.wrapConstructor)(()=>new SHA512_256),U.sha384=(0,es.wrapConstructor)(()=>new SHA384)},5158:function(O,U,$){"use strict";/*! noble-hashes - MIT License (c) 2022 Paul Miller (paulmillr.com) */Object.defineProperty(U,"__esModule",{value:!0}),U.randomBytes=U.wrapConstructorWithOpts=U.wrapConstructor=U.checkOpts=U.Hash=U.concatBytes=U.toBytes=U.utf8ToBytes=U.asyncLoop=U.nextTick=U.hexToBytes=U.bytesToHex=U.isLE=U.rotr=U.createView=U.u32=U.u8=void 0;let J=$(9761),u8=O=>new Uint8Array(O.buffer,O.byteOffset,O.byteLength);U.u8=u8;let u32=O=>new Uint32Array(O.buffer,O.byteOffset,Math.floor(O.byteLength/4));U.u32=u32;let createView=O=>new DataView(O.buffer,O.byteOffset,O.byteLength);U.createView=createView;let rotr=(O,U)=>O<<32-U|O>>>U;if(U.rotr=rotr,U.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!U.isLE)throw Error("Non little-endian hardware is not supported");let en=Array.from({length:256},(O,U)=>U.toString(16).padStart(2,"0"));function bytesToHex(O){if(!(O instanceof Uint8Array))throw Error("Uint8Array expected");let U="";for(let $=0;${};async function asyncLoop(O,$,J){let en=Date.now();for(let es=0;es=0&&O<$||(await (0,U.nextTick)(),en+=O)}}function utf8ToBytes(O){if("string"!=typeof O)throw TypeError(`utf8ToBytes expected string, got ${typeof O}`);return new TextEncoder().encode(O)}function toBytes(O){if("string"==typeof O&&(O=utf8ToBytes(O)),!(O instanceof Uint8Array))throw TypeError(`Expected input type is Uint8Array (got ${typeof O})`);return O}function concatBytes(...O){if(!O.every(O=>O instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===O.length)return O[0];let U=O.reduce((O,U)=>O+U.length,0),$=new Uint8Array(U);for(let U=0,J=0;U"[object Object]"===Object.prototype.toString.call(O)&&O.constructor===Object;function checkOpts(O,U){if(void 0!==U&&("object"!=typeof U||!isPlainObject(U)))throw TypeError("Options should be object or undefined");let $=Object.assign(O,U);return $}function wrapConstructor(O){let hashC=U=>O().update(toBytes(U)).digest(),U=O();return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=()=>O(),hashC}function wrapConstructorWithOpts(O){let hashC=(U,$)=>O($).update(toBytes(U)).digest(),U=O({});return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=U=>O(U),hashC}function randomBytes(O=32){if(J.crypto.web)return J.crypto.web.getRandomValues(new Uint8Array(O));if(J.crypto.node)return new Uint8Array(J.crypto.node.randomBytes(O).buffer);throw Error("The environment doesn't have randomBytes function")}U.checkOpts=checkOpts,U.wrapConstructor=wrapConstructor,U.wrapConstructorWithOpts=wrapConstructorWithOpts,U.randomBytes=randomBytes},215:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.decrypt=U.encrypt=void 0;let J=$(9761),en=$(9449);function validateOpt(O,U,$){if(!$.startsWith("aes-"))throw Error(`AES submodule doesn't support mode ${$}`);if(16!==U.length)throw Error("AES: wrong IV length");if($.startsWith("aes-128")&&16!==O.length||$.startsWith("aes-256")&&32!==O.length)throw Error("AES: wrong key length")}async function getBrowserKey(O,U,$){let en;if(!J.crypto.web)throw Error("Browser crypto not available.");if(["aes-128-cbc","aes-256-cbc"].includes(O)&&(en="cbc"),["aes-128-ctr","aes-256-ctr"].includes(O)&&(en="ctr"),!en)throw Error("AES: unsupported mode");let es=await J.crypto.web.subtle.importKey("raw",U,{name:`AES-${en.toUpperCase()}`,length:8*U.length},!0,["encrypt","decrypt"]);return[es,{name:`aes-${en}`,iv:$,counter:$,length:128}]}async function encrypt(O,U,$,es="aes-128-ctr",eo=!0){if(validateOpt(U,$,es),J.crypto.web){let[en,ea]=await getBrowserKey(es,U,$),eu=await J.crypto.web.subtle.encrypt(ea,en,O),ef=new Uint8Array(eu);return eo||"aes-cbc"!==ea.name||O.length%16||(ef=ef.slice(0,-16)),ef}if(J.crypto.node){let ea=J.crypto.node.createCipheriv(es,U,$);return ea.setAutoPadding(eo),(0,en.concatBytes)(ea.update(O),ea.final())}throw Error("The environment doesn't have AES module")}async function getPadding(O,U,$,J){let en=O.slice(-16);for(let O=0;O<16;O++)en[O]^=16^$[O];let es=await encrypt(en,U,$,J);return es.slice(0,16)}async function decrypt(O,U,$,es="aes-128-ctr",eo=!0){if(validateOpt(U,$,es),J.crypto.web){let[ea,eu]=await getBrowserKey(es,U,$);if(!eo&&"aes-cbc"===eu.name){let J=await getPadding(O,U,$,es);O=(0,en.concatBytes)(O,J)}let ef=await J.crypto.web.subtle.decrypt(eu,ea,O),eg=new Uint8Array(ef);if("aes-cbc"===eu.name){let J=await encrypt(eg,U,$,es);if(!(0,en.equalsBytes)(J,O))throw Error("AES: wrong padding")}return eg}if(J.crypto.node){let ea=J.crypto.node.createDecipheriv(es,U,$);return ea.setAutoPadding(eo),(0,en.concatBytes)(ea.update(O),ea.final())}throw Error("The environment doesn't have AES module")}U.encrypt=encrypt,U.decrypt=decrypt},1406:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.pbkdf2Sync=U.pbkdf2=void 0;let J=$(4618),en=$(938),es=$(1791),eo=$(9449);async function pbkdf2(O,U,$,ea,eu){if(!["sha256","sha512"].includes(eu))throw Error("Only sha256 and sha512 are supported");return(0,eo.assertBytes)(O),(0,eo.assertBytes)(U),(0,J.pbkdf2Async)("sha256"===eu?en.sha256:es.sha512,O,U,{c:$,dkLen:ea})}function pbkdf2Sync(O,U,$,ea,eu){if(!["sha256","sha512"].includes(eu))throw Error("Only sha256 and sha512 are supported");return(0,eo.assertBytes)(O),(0,eo.assertBytes)(U),(0,J.pbkdf2)("sha256"===eu?en.sha256:es.sha512,O,U,{c:$,dkLen:ea})}U.pbkdf2=pbkdf2,U.pbkdf2Sync=pbkdf2Sync},4610:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.getRandomBytes=U.getRandomBytesSync=void 0;let J=$(5158);function getRandomBytesSync(O){return(0,J.randomBytes)(O)}async function getRandomBytes(O){return(0,J.randomBytes)(O)}U.getRandomBytesSync=getRandomBytesSync,U.getRandomBytes=getRandomBytes},4468:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.scryptSync=U.scrypt=void 0;let J=$(6906),en=$(9449);async function scrypt(O,U,$,es,eo,ea,eu){return(0,en.assertBytes)(O),(0,en.assertBytes)(U),(0,J.scryptAsync)(O,U,{N:$,r:eo,p:es,dkLen:ea,onProgress:eu})}function scryptSync(O,U,$,es,eo,ea,eu){return(0,en.assertBytes)(O),(0,en.assertBytes)(U),(0,J.scrypt)(O,U,{N:$,r:eo,p:es,dkLen:ea,onProgress:eu})}U.scrypt=scrypt,U.scryptSync=scryptSync},8207:function(O,U,$){"use strict";Object.defineProperty(U,"__esModule",{value:!0}),U.sha256=void 0;let J=$(938),en=$(9449);U.sha256=(0,en.wrapHash)(J.sha256)},9449:function(O,U,$){"use strict";O=$.nmd(O);var J=this&&this.__importDefault||function(O){return O&&O.__esModule?O:{default:O}};Object.defineProperty(U,"__esModule",{value:!0}),U.crypto=U.wrapHash=U.equalsBytes=U.hexToBytes=U.bytesToUtf8=U.utf8ToBytes=U.createView=U.concatBytes=U.toHex=U.bytesToHex=U.assertBytes=U.assertBool=void 0;let en=J($(4390)),es=$(5158),eo=en.default.bool;U.assertBool=eo;let ea=en.default.bytes;U.assertBytes=ea;var eu=$(5158);function bytesToUtf8(O){if(!(O instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof O}`);return new TextDecoder().decode(O)}function hexToBytes(O){let U=O.startsWith("0x")?O.substring(2):O;return(0,es.hexToBytes)(U)}function equalsBytes(O,U){if(O.length!==U.length)return!1;for(let $=0;$(en.default.bytes(U),O(U))}Object.defineProperty(U,"bytesToHex",{enumerable:!0,get:function(){return eu.bytesToHex}}),Object.defineProperty(U,"toHex",{enumerable:!0,get:function(){return eu.bytesToHex}}),Object.defineProperty(U,"concatBytes",{enumerable:!0,get:function(){return eu.concatBytes}}),Object.defineProperty(U,"createView",{enumerable:!0,get:function(){return eu.createView}}),Object.defineProperty(U,"utf8ToBytes",{enumerable:!0,get:function(){return eu.utf8ToBytes}}),U.bytesToUtf8=bytesToUtf8,U.hexToBytes=hexToBytes,U.equalsBytes=equalsBytes,U.wrapHash=wrapHash,U.crypto=(()=>{let U="object"==typeof self&&"crypto"in self?self.crypto:void 0,$="function"==typeof O.require&&O.require.bind(O);return{node:$&&!U?$("crypto"):void 0,web:U}})()},6509:function(O,U,$){"use strict";$.r(U),$.d(U,{NIL:function(){return eA},parse:function(){return esm_browser_parse},stringify:function(){return esm_browser_stringify},v1:function(){return esm_browser_v1},v3:function(){return eE},v4:function(){return esm_browser_v4},v5:function(){return eS},validate:function(){return esm_browser_validate},version:function(){return esm_browser_version}});var J,en,es,eo=new Uint8Array(16);function rng(){if(!J&&!(J="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(eo)}for(var ea=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,esm_browser_validate=function(O){return"string"==typeof O&&ea.test(O)},eu=[],ef=0;ef<256;++ef)eu.push((ef+256).toString(16).substr(1));var esm_browser_stringify=function(O){var U=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,$=(eu[O[U+0]]+eu[O[U+1]]+eu[O[U+2]]+eu[O[U+3]]+"-"+eu[O[U+4]]+eu[O[U+5]]+"-"+eu[O[U+6]]+eu[O[U+7]]+"-"+eu[O[U+8]]+eu[O[U+9]]+"-"+eu[O[U+10]]+eu[O[U+11]]+eu[O[U+12]]+eu[O[U+13]]+eu[O[U+14]]+eu[O[U+15]]).toLowerCase();if(!esm_browser_validate($))throw TypeError("Stringified UUID is invalid");return $},eg=0,ev=0,esm_browser_v1=function(O,U,$){var J=U&&$||0,eo=U||Array(16),ea=(O=O||{}).node||en,eu=void 0!==O.clockseq?O.clockseq:es;if(null==ea||null==eu){var ef=O.random||(O.rng||rng)();null==ea&&(ea=en=[1|ef[0],ef[1],ef[2],ef[3],ef[4],ef[5]]),null==eu&&(eu=es=(ef[6]<<8|ef[7])&16383)}var e_=void 0!==O.msecs?O.msecs:Date.now(),ew=void 0!==O.nsecs?O.nsecs:ev+1,eE=e_-eg+(ew-ev)/1e4;if(eE<0&&void 0===O.clockseq&&(eu=eu+1&16383),(eE<0||e_>eg)&&void 0===O.nsecs&&(ew=0),ew>=1e4)throw Error("uuid.v1(): Can't create more than 10M uuids/sec");eg=e_,ev=ew,es=eu;var eS=((268435455&(e_+=122192928e5))*1e4+ew)%4294967296;eo[J++]=eS>>>24&255,eo[J++]=eS>>>16&255,eo[J++]=eS>>>8&255,eo[J++]=255&eS;var eA=e_/4294967296*1e4&268435455;eo[J++]=eA>>>8&255,eo[J++]=255&eA,eo[J++]=eA>>>24&15|16,eo[J++]=eA>>>16&255,eo[J++]=eu>>>8|128,eo[J++]=255&eu;for(var eI=0;eI<6;++eI)eo[J+eI]=ea[eI];return U||esm_browser_stringify(eo)},esm_browser_parse=function(O){if(!esm_browser_validate(O))throw TypeError("Invalid UUID");var U,$=new Uint8Array(16);return $[0]=(U=parseInt(O.slice(0,8),16))>>>24,$[1]=U>>>16&255,$[2]=U>>>8&255,$[3]=255&U,$[4]=(U=parseInt(O.slice(9,13),16))>>>8,$[5]=255&U,$[6]=(U=parseInt(O.slice(14,18),16))>>>8,$[7]=255&U,$[8]=(U=parseInt(O.slice(19,23),16))>>>8,$[9]=255&U,$[10]=(U=parseInt(O.slice(24,36),16))/1099511627776&255,$[11]=U/4294967296&255,$[12]=U>>>24&255,$[13]=U>>>16&255,$[14]=U>>>8&255,$[15]=255&U,$};function stringToBytes(O){O=unescape(encodeURIComponent(O));for(var U=[],$=0;$>5]>>>en%32&255,eo=parseInt(J.charAt(es>>>4&15)+J.charAt(15&es),16);U.push(eo)}return U}function getOutputLength(O){return(O+64>>>9<<4)+14+1}function wordsToMd5(O,U){O[U>>5]|=128<>5]|=(255&O[J/8])<>16)+(U>>16)+($>>16)<<16|65535&$}function bitRotateLeft(O,U){return O<>>32-U}function md5cmn(O,U,$,J,en,es){return safeAdd(bitRotateLeft(safeAdd(safeAdd(U,O),safeAdd(J,es)),en),$)}function md5ff(O,U,$,J,en,es,eo){return md5cmn(U&$|~U&J,O,U,en,es,eo)}function md5gg(O,U,$,J,en,es,eo){return md5cmn(U&J|$&~J,O,U,en,es,eo)}function md5hh(O,U,$,J,en,es,eo){return md5cmn(U^$^J,O,U,en,es,eo)}function md5ii(O,U,$,J,en,es,eo){return md5cmn($^(U|~J),O,U,en,es,eo)}var eE=v35("v3",48,function(O){if("string"==typeof O){var U=unescape(encodeURIComponent(O));O=new Uint8Array(U.length);for(var $=0;$>>32-U}var eS=v35("v5",80,function(O){var U=[1518500249,1859775393,2400959708,3395469782],$=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof O){var J=unescape(encodeURIComponent(O));O=[];for(var en=0;en>>0;eP=eI,eI=eA,eA=ROTL(eS,30)>>>0,eS=eE,eE=eR}$[0]=$[0]+eE>>>0,$[1]=$[1]+eS>>>0,$[2]=$[2]+eA>>>0,$[3]=$[3]+eI>>>0,$[4]=$[4]+eP>>>0}return[$[0]>>24&255,$[0]>>16&255,$[0]>>8&255,255&$[0],$[1]>>24&255,$[1]>>16&255,$[1]>>8&255,255&$[1],$[2]>>24&255,$[2]>>16&255,$[2]>>8&255,255&$[2],$[3]>>24&255,$[3]>>16&255,$[3]>>8&255,255&$[3],$[4]>>24&255,$[4]>>16&255,$[4]>>8&255,255&$[4]]}),eA="00000000-0000-0000-0000-000000000000",esm_browser_version=function(O){if(!esm_browser_validate(O))throw TypeError("Invalid UUID");return parseInt(O.substr(14,1),16)}},4999:function(O,U,$){"use strict";$.d(U,{Sg:function(){return ForkEvent},zt:function(){return Provider}});var J=$(2278),en=$(7213),es=$(6288);let eo="abstract-provider/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let ea=new es.Yd(eo);let ForkEvent=class ForkEvent extends en.dk{static isForkEvent(O){return!!(O&&O._isForkEvent)}};let Provider=class Provider{constructor(){ea.checkAbstract(new.target,Provider),(0,en.zG)(this,"_isProvider",!0)}getFeeData(){return __awaiter(this,void 0,void 0,function*(){let{block:O,gasPrice:U}=yield(0,en.mE)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch(O=>null)}),$=null,es=null,eo=null;return O&&O.baseFeePerGas&&($=O.baseFeePerGas,eo=J.O$.from("1500000000"),es=O.baseFeePerGas.mul(2).add(eo)),{lastBaseFeePerGas:$,maxFeePerGas:es,maxPriorityFeePerGas:eo,gasPrice:U}})}addListener(O,U){return this.on(O,U)}removeListener(O,U){return this.off(O,U)}static isProvider(O){return!!(O&&O._isProvider)}}},4941:function(O,U,$){"use strict";$.d(U,{E:function(){return Signer},b:function(){return VoidSigner}});var J=$(7213),en=$(6288);let es="abstract-signer/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let eo=new en.Yd(es),ea=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],eu=[en.Yd.errors.INSUFFICIENT_FUNDS,en.Yd.errors.NONCE_EXPIRED,en.Yd.errors.REPLACEMENT_UNDERPRICED];let Signer=class Signer{constructor(){eo.checkAbstract(new.target,Signer),(0,J.zG)(this,"_isSigner",!0)}getBalance(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),O)})}getTransactionCount(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),O)})}estimateGas(O){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("estimateGas");let U=yield(0,J.mE)(this.checkTransaction(O));return yield this.provider.estimateGas(U)})}call(O,U){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("call");let $=yield(0,J.mE)(this.checkTransaction(O));return yield this.provider.call($,U)})}sendTransaction(O){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("sendTransaction");let U=yield this.populateTransaction(O),$=yield this.signTransaction(U);return yield this.provider.sendTransaction($)})}getChainId(){return __awaiter(this,void 0,void 0,function*(){this._checkProvider("getChainId");let O=yield this.provider.getNetwork();return O.chainId})}getGasPrice(){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()})}getFeeData(){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()})}resolveName(O){return __awaiter(this,void 0,void 0,function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(O)})}checkTransaction(O){for(let U in O)-1===ea.indexOf(U)&&eo.throwArgumentError("invalid transaction key: "+U,"transaction",O);let U=(0,J.DC)(O);return null==U.from?U.from=this.getAddress():U.from=Promise.all([Promise.resolve(U.from),this.getAddress()]).then(U=>(U[0].toLowerCase()!==U[1].toLowerCase()&&eo.throwArgumentError("from address mismatch","transaction",O),U[0])),U}populateTransaction(O){return __awaiter(this,void 0,void 0,function*(){let U=yield(0,J.mE)(this.checkTransaction(O));null!=U.to&&(U.to=Promise.resolve(U.to).then(O=>__awaiter(this,void 0,void 0,function*(){if(null==O)return null;let U=yield this.resolveName(O);return null==U&&eo.throwArgumentError("provided ENS name resolves to null","tx.to",O),U})),U.to.catch(O=>{}));let $=null!=U.maxFeePerGas||null!=U.maxPriorityFeePerGas;if(null!=U.gasPrice&&(2===U.type||$)?eo.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",O):(0===U.type||1===U.type)&&$&&eo.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",O),(2===U.type||null==U.type)&&null!=U.maxFeePerGas&&null!=U.maxPriorityFeePerGas)U.type=2;else if(0===U.type||1===U.type)null==U.gasPrice&&(U.gasPrice=this.getGasPrice());else{let O=yield this.getFeeData();if(null==U.type){if(null!=O.maxFeePerGas&&null!=O.maxPriorityFeePerGas){if(U.type=2,null!=U.gasPrice){let O=U.gasPrice;delete U.gasPrice,U.maxFeePerGas=O,U.maxPriorityFeePerGas=O}else null==U.maxFeePerGas&&(U.maxFeePerGas=O.maxFeePerGas),null==U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=O.maxPriorityFeePerGas)}else null!=O.gasPrice?($&&eo.throwError("network does not support EIP-1559",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==U.gasPrice&&(U.gasPrice=O.gasPrice),U.type=0):eo.throwError("failed to get consistent fee data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"})}else 2===U.type&&(null==U.maxFeePerGas&&(U.maxFeePerGas=O.maxFeePerGas),null==U.maxPriorityFeePerGas&&(U.maxPriorityFeePerGas=O.maxPriorityFeePerGas))}return null==U.nonce&&(U.nonce=this.getTransactionCount("pending")),null==U.gasLimit&&(U.gasLimit=this.estimateGas(U).catch(O=>{if(eu.indexOf(O.code)>=0)throw O;return eo.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:O,tx:U})})),null==U.chainId?U.chainId=this.getChainId():U.chainId=Promise.all([Promise.resolve(U.chainId),this.getChainId()]).then(U=>(0!==U[1]&&U[0]!==U[1]&&eo.throwArgumentError("chainId address mismatch","transaction",O),U[0])),yield(0,J.mE)(U)})}_checkProvider(O){this.provider||eo.throwError("missing provider",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:O||"_checkProvider"})}static isSigner(O){return!!(O&&O._isSigner)}};let VoidSigner=class VoidSigner extends Signer{constructor(O,U){super(),(0,J.zG)(this,"address",O),(0,J.zG)(this,"provider",U||null)}getAddress(){return Promise.resolve(this.address)}_fail(O,U){return Promise.resolve().then(()=>{eo.throwError(O,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:U})})}signMessage(O){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(O){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(O,U,$){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(O){return new VoidSigner(this.address,O)}}},8994:function(O,U,$){"use strict";$.d(U,{Kn:function(){return getAddress},CR:function(){return getContractAddress}});var J=$(7273),en=$(2278),es=$(4184),eo=$(7054),ea=$(6288);let eu="address/5.7.0",ef=new ea.Yd(eu);function getChecksumAddress(O){(0,J.A7)(O,20)||ef.throwArgumentError("invalid address","address",O),O=O.toLowerCase();let U=O.substring(2).split(""),$=new Uint8Array(40);for(let O=0;O<40;O++)$[O]=U[O].charCodeAt(0);let en=(0,J.lE)((0,es.w)($));for(let O=0;O<40;O+=2)en[O>>1]>>4>=8&&(U[O]=U[O].toUpperCase()),(15&en[O>>1])>=8&&(U[O+1]=U[O+1].toUpperCase());return"0x"+U.join("")}let eg=9007199254740991;function log10(O){return Math.log10?Math.log10(O):Math.log(O)/Math.LN10}let ev={};for(let O=0;O<10;O++)ev[String(O)]=String(O);for(let O=0;O<26;O++)ev[String.fromCharCode(65+O)]=String(10+O);let e_=Math.floor(log10(eg));function ibanChecksum(O){let U=(O=(O=O.toUpperCase()).substring(4)+O.substring(0,2)+"00").split("").map(O=>ev[O]).join("");for(;U.length>=e_;){let O=U.substring(0,e_);U=parseInt(O,10)%97+U.substring(O.length)}let $=String(98-parseInt(U,10)%97);for(;$.length<2;)$="0"+$;return $}function getAddress(O){let U=null;if("string"!=typeof O&&ef.throwArgumentError("invalid address","address",O),O.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==O.substring(0,2)&&(O="0x"+O),U=getChecksumAddress(O),O.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&U!==O&&ef.throwArgumentError("bad address checksum","address",O);else if(O.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(O.substring(2,4)!==ibanChecksum(O)&&ef.throwArgumentError("bad icap checksum","address",O),U=(0,en.g$)(O.substring(4));U.length<40;)U="0"+U;U=getChecksumAddress("0x"+U)}else ef.throwArgumentError("invalid address","address",O);return U}function getContractAddress(O){let U=null;try{U=getAddress(O.from)}catch(U){ef.throwArgumentError("missing from address","transaction",O)}let $=(0,J.G1)((0,J.lE)(en.O$.from(O.nonce).toHexString()));return getAddress((0,J.p3)((0,es.w)((0,eo.c)([U,$])),12))}},2278:function(O,U,$){"use strict";$.d(U,{O$:function(){return BigNumber},g$:function(){return _base36To16}});var J=$(6662),en=$.n(J),es=$(7273),eo=$(6288);let ea="bignumber/5.7.0";var eu=en().BN;let ef=new eo.Yd(ea),eg={},ev=9007199254740991,e_=!1;let BigNumber=class BigNumber{constructor(O,U){O!==eg&&ef.throwError("cannot call constructor directly; use BigNumber.from",eo.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=U,this._isBigNumber=!0,Object.freeze(this)}fromTwos(O){return toBigNumber(toBN(this).fromTwos(O))}toTwos(O){return toBigNumber(toBN(this).toTwos(O))}abs(){return"-"===this._hex[0]?BigNumber.from(this._hex.substring(1)):this}add(O){return toBigNumber(toBN(this).add(toBN(O)))}sub(O){return toBigNumber(toBN(this).sub(toBN(O)))}div(O){let U=BigNumber.from(O);return U.isZero()&&throwFault("division-by-zero","div"),toBigNumber(toBN(this).div(toBN(O)))}mul(O){return toBigNumber(toBN(this).mul(toBN(O)))}mod(O){let U=toBN(O);return U.isNeg()&&throwFault("division-by-zero","mod"),toBigNumber(toBN(this).umod(U))}pow(O){let U=toBN(O);return U.isNeg()&&throwFault("negative-power","pow"),toBigNumber(toBN(this).pow(U))}and(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","and"),toBigNumber(toBN(this).and(U))}or(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","or"),toBigNumber(toBN(this).or(U))}xor(O){let U=toBN(O);return(this.isNegative()||U.isNeg())&&throwFault("unbound-bitwise-result","xor"),toBigNumber(toBN(this).xor(U))}mask(O){return(this.isNegative()||O<0)&&throwFault("negative-width","mask"),toBigNumber(toBN(this).maskn(O))}shl(O){return(this.isNegative()||O<0)&&throwFault("negative-width","shl"),toBigNumber(toBN(this).shln(O))}shr(O){return(this.isNegative()||O<0)&&throwFault("negative-width","shr"),toBigNumber(toBN(this).shrn(O))}eq(O){return toBN(this).eq(toBN(O))}lt(O){return toBN(this).lt(toBN(O))}lte(O){return toBN(this).lte(toBN(O))}gt(O){return toBN(this).gt(toBN(O))}gte(O){return toBN(this).gte(toBN(O))}isNegative(){return"-"===this._hex[0]}isZero(){return toBN(this).isZero()}toNumber(){try{return toBN(this).toNumber()}catch(O){throwFault("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(O){}return ef.throwError("this platform does not support BigInt",eo.Yd.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?e_||(e_=!0,ef.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?ef.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",eo.Yd.errors.UNEXPECTED_ARGUMENT,{}):ef.throwError("BigNumber.toString does not accept parameters",eo.Yd.errors.UNEXPECTED_ARGUMENT,{})),toBN(this).toString(10)}toHexString(){return this._hex}toJSON(O){return{type:"BigNumber",hex:this.toHexString()}}static from(O){if(O instanceof BigNumber)return O;if("string"==typeof O)return O.match(/^-?0x[0-9a-f]+$/i)?new BigNumber(eg,toHex(O)):O.match(/^-?[0-9]+$/)?new BigNumber(eg,toHex(new eu(O))):ef.throwArgumentError("invalid BigNumber string","value",O);if("number"==typeof O)return O%1&&throwFault("underflow","BigNumber.from",O),(O>=ev||O<=-ev)&&throwFault("overflow","BigNumber.from",O),BigNumber.from(String(O));let U=O;if("bigint"==typeof U)return BigNumber.from(U.toString());if((0,es._t)(U))return BigNumber.from((0,es.Dv)(U));if(U){if(U.toHexString){let O=U.toHexString();if("string"==typeof O)return BigNumber.from(O)}else{let O=U._hex;if(null==O&&"BigNumber"===U.type&&(O=U.hex),"string"==typeof O&&((0,es.A7)(O)||"-"===O[0]&&(0,es.A7)(O.substring(1))))return BigNumber.from(O)}}return ef.throwArgumentError("invalid BigNumber value","value",O)}static isBigNumber(O){return!!(O&&O._isBigNumber)}};function toHex(O){if("string"!=typeof O)return toHex(O.toString(16));if("-"===O[0])return("-"===(O=O.substring(1))[0]&&ef.throwArgumentError("invalid hex","value",O),"0x00"===(O=toHex(O)))?O:"-"+O;if("0x"!==O.substring(0,2)&&(O="0x"+O),"0x"===O)return"0x00";for(O.length%2&&(O="0x0"+O.substring(2));O.length>4&&"0x00"===O.substring(0,4);)O="0x"+O.substring(4);return O}function toBigNumber(O){return BigNumber.from(toHex(O))}function toBN(O){let U=BigNumber.from(O).toHexString();return"-"===U[0]?new eu("-"+U.substring(3),16):new eu(U.substring(2),16)}function throwFault(O,U,$){let J={fault:O,operation:U};return null!=$&&(J.value=$),ef.throwError(O,eo.Yd.errors.NUMERIC_FAULT,J)}function _base36To16(O){return new eu(O,36).toString(16)}},7273:function(O,U,$){"use strict";$.d(U,{lE:function(){return arrayify},zo:function(){return concat},xs:function(){return hexConcat},E1:function(){return hexDataLength},p3:function(){return hexDataSlice},$P:function(){return hexValue},$m:function(){return hexZeroPad},Dv:function(){return hexlify},_t:function(){return isBytes},Zq:function(){return isBytesLike},A7:function(){return isHexString},N:function(){return splitSignature},G1:function(){return stripZeros},Bu:function(){return zeroPad}});var J=$(6288);let en="bytes/5.7.0",es=new J.Yd(en);function isHexable(O){return!!O.toHexString}function addSlice(O){return O.slice||(O.slice=function(){let U=Array.prototype.slice.call(arguments);return addSlice(new Uint8Array(Array.prototype.slice.apply(O,U)))}),O}function isBytesLike(O){return isHexString(O)&&!(O.length%2)||isBytes(O)}function isInteger(O){return"number"==typeof O&&O==O&&O%1==0}function isBytes(O){if(null==O)return!1;if(O.constructor===Uint8Array)return!0;if("string"==typeof O||!isInteger(O.length)||O.length<0)return!1;for(let U=0;U=256)return!1}return!0}function arrayify(O,U){if(U||(U={}),"number"==typeof O){es.checkSafeUint53(O,"invalid arrayify value");let U=[];for(;O;)U.unshift(255&O),O=parseInt(String(O/256));return 0===U.length&&U.push(0),addSlice(new Uint8Array(U))}if(U.allowMissingPrefix&&"string"==typeof O&&"0x"!==O.substring(0,2)&&(O="0x"+O),isHexable(O)&&(O=O.toHexString()),isHexString(O)){let $=O.substring(2);$.length%2&&("left"===U.hexPad?$="0"+$:"right"===U.hexPad?$+="0":es.throwArgumentError("hex data is odd-length","value",O));let J=[];for(let O=0;O<$.length;O+=2)J.push(parseInt($.substring(O,O+2),16));return addSlice(new Uint8Array(J))}return isBytes(O)?addSlice(new Uint8Array(O)):es.throwArgumentError("invalid arrayify value","value",O)}function concat(O){let U=O.map(O=>arrayify(O)),$=U.reduce((O,U)=>O+U.length,0),J=new Uint8Array($);return U.reduce((O,U)=>(J.set(U,O),O+U.length),0),addSlice(J)}function stripZeros(O){let U=arrayify(O);if(0===U.length)return U;let $=0;for(;$U&&es.throwArgumentError("value out of range","value",arguments[0]);let $=new Uint8Array(U);return $.set(O,U-O.length),addSlice($)}function isHexString(O,U){return"string"==typeof O&&!!O.match(/^0x[0-9A-Fa-f]*$/)&&(!U||O.length===2+2*U)}let eo="0123456789abcdef";function hexlify(O,U){if(U||(U={}),"number"==typeof O){es.checkSafeUint53(O,"invalid hexlify value");let U="";for(;O;)U=eo[15&O]+U,O=Math.floor(O/16);return U.length?(U.length%2&&(U="0"+U),"0x"+U):"0x00"}if("bigint"==typeof O)return(O=O.toString(16)).length%2?"0x0"+O:"0x"+O;if(U.allowMissingPrefix&&"string"==typeof O&&"0x"!==O.substring(0,2)&&(O="0x"+O),isHexable(O))return O.toHexString();if(isHexString(O))return O.length%2&&("left"===U.hexPad?O="0x0"+O.substring(2):"right"===U.hexPad?O+="0":es.throwArgumentError("hex data is odd-length","value",O)),O.toLowerCase();if(isBytes(O)){let U="0x";for(let $=0;$>4]+eo[15&J]}return U}return es.throwArgumentError("invalid hexlify value","value",O)}function hexDataLength(O){if("string"!=typeof O)O=hexlify(O);else if(!isHexString(O)||O.length%2)return null;return(O.length-2)/2}function hexDataSlice(O,U,$){return("string"!=typeof O?O=hexlify(O):(!isHexString(O)||O.length%2)&&es.throwArgumentError("invalid hexData","value",O),U=2+2*U,null!=$)?"0x"+O.substring(U,2+2*$):"0x"+O.substring(U)}function hexConcat(O){let U="0x";return O.forEach(O=>{U+=hexlify(O).substring(2)}),U}function hexValue(O){let U=hexStripZeros(hexlify(O,{hexPad:"left"}));return"0x"===U?"0x0":U}function hexStripZeros(O){"string"!=typeof O&&(O=hexlify(O)),isHexString(O)||es.throwArgumentError("invalid hex string","value",O),O=O.substring(2);let U=0;for(;U2*U+2&&es.throwArgumentError("value out of range","value",arguments[1]);O.length<2*U+2;)O="0x0"+O.substring(2);return O}function splitSignature(O){let U={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(isBytesLike(O)){let $=arrayify(O);64===$.length?(U.v=27+($[32]>>7),$[32]&=127,U.r=hexlify($.slice(0,32)),U.s=hexlify($.slice(32,64))):65===$.length?(U.r=hexlify($.slice(0,32)),U.s=hexlify($.slice(32,64)),U.v=$[64]):es.throwArgumentError("invalid signature string","signature",O),U.v<27&&(0===U.v||1===U.v?U.v+=27:es.throwArgumentError("signature invalid v byte","signature",O)),U.recoveryParam=1-U.v%2,U.recoveryParam&&($[32]|=128),U._vs=hexlify($.slice(32,64))}else{if(U.r=O.r,U.s=O.s,U.v=O.v,U.recoveryParam=O.recoveryParam,U._vs=O._vs,null!=U._vs){let $=zeroPad(arrayify(U._vs),32);U._vs=hexlify($);let J=$[0]>=128?1:0;null==U.recoveryParam?U.recoveryParam=J:U.recoveryParam!==J&&es.throwArgumentError("signature recoveryParam mismatch _vs","signature",O),$[0]&=127;let en=hexlify($);null==U.s?U.s=en:U.s!==en&&es.throwArgumentError("signature v mismatch _vs","signature",O)}if(null==U.recoveryParam)null==U.v?es.throwArgumentError("signature missing v and recoveryParam","signature",O):0===U.v||1===U.v?U.recoveryParam=U.v:U.recoveryParam=1-U.v%2;else if(null==U.v)U.v=27+U.recoveryParam;else{let $=0===U.v||1===U.v?U.v:1-U.v%2;U.recoveryParam!==$&&es.throwArgumentError("signature recoveryParam mismatch v","signature",O)}null!=U.r&&isHexString(U.r)?U.r=hexZeroPad(U.r,32):es.throwArgumentError("signature missing or invalid r","signature",O),null!=U.s&&isHexString(U.s)?U.s=hexZeroPad(U.s,32):es.throwArgumentError("signature missing or invalid s","signature",O);let $=arrayify(U.s);$[0]>=128&&es.throwArgumentError("signature s out of range","signature",O),U.recoveryParam&&($[0]|=128);let J=hexlify($);U._vs&&(isHexString(U._vs)||es.throwArgumentError("signature invalid _vs","signature",O),U._vs=hexZeroPad(U._vs,32)),null==U._vs?U._vs=J:U._vs!==J&&es.throwArgumentError("signature _vs mismatch v and s","signature",O)}return U.yParityAndS=U._vs,U.compact=U.r+U.yParityAndS.substring(2),U}},5572:function(O,U,$){"use strict";$.d(U,{d:function(){return J}});let J="0x0000000000000000000000000000000000000000"},3690:function(O,U,$){"use strict";$.d(U,{Bz:function(){return ea},_Y:function(){return es},fh:function(){return eo},tL:function(){return en}});var J=$(2278);let en=J.O$.from(-1),es=J.O$.from(0),eo=J.O$.from(1),ea=J.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},6339:function(O,U,$){"use strict";$.d(U,{id:function(){return id}});var J=$(4184),en=$(8337);function id(O){return(0,J.w)((0,en.Y0)(O))}},4184:function(O,U,$){"use strict";$.d(U,{w:function(){return keccak256}});var J=$(6398),en=$.n(J),es=$(7273);function keccak256(O){return"0x"+en().keccak_256((0,es.lE)(O))}},6288:function(O,U,$){"use strict";var J,en;$.d(U,{Yd:function(){return Logger}});let es="logger/5.7.0",eo=!1,ea=!1,eu={debug:1,default:2,info:2,warning:3,error:4,off:5},ef=2,eg=null;function _checkNormalize(){try{let O=[];if(["NFD","NFC","NFKD","NFKC"].forEach(U=>{try{if("test"!=="test".normalize(U))throw Error("bad normalize")}catch($){O.push(U)}}),O.length)throw Error("missing "+O.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw Error("broken implementation")}catch(O){return O.message}return null}let ev=_checkNormalize();!function(O){O.DEBUG="DEBUG",O.INFO="INFO",O.WARNING="WARNING",O.ERROR="ERROR",O.OFF="OFF"}(J||(J={})),function(O){O.UNKNOWN_ERROR="UNKNOWN_ERROR",O.NOT_IMPLEMENTED="NOT_IMPLEMENTED",O.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",O.NETWORK_ERROR="NETWORK_ERROR",O.SERVER_ERROR="SERVER_ERROR",O.TIMEOUT="TIMEOUT",O.BUFFER_OVERRUN="BUFFER_OVERRUN",O.NUMERIC_FAULT="NUMERIC_FAULT",O.MISSING_NEW="MISSING_NEW",O.INVALID_ARGUMENT="INVALID_ARGUMENT",O.MISSING_ARGUMENT="MISSING_ARGUMENT",O.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",O.CALL_EXCEPTION="CALL_EXCEPTION",O.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",O.NONCE_EXPIRED="NONCE_EXPIRED",O.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",O.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",O.TRANSACTION_REPLACED="TRANSACTION_REPLACED",O.ACTION_REJECTED="ACTION_REJECTED"}(en||(en={}));let e_="0123456789abcdef";let Logger=class Logger{constructor(O){Object.defineProperty(this,"version",{enumerable:!0,value:O,writable:!1})}_log(O,U){let $=O.toLowerCase();null==eu[$]&&this.throwArgumentError("invalid log level name","logLevel",O),ef>eu[$]||console.log.apply(console,U)}debug(...O){this._log(Logger.levels.DEBUG,O)}info(...O){this._log(Logger.levels.INFO,O)}warn(...O){this._log(Logger.levels.WARNING,O)}makeError(O,U,$){if(ea)return this.makeError("censored error",U,{});U||(U=Logger.errors.UNKNOWN_ERROR),$||($={});let J=[];Object.keys($).forEach(O=>{let U=$[O];try{if(U instanceof Uint8Array){let $="";for(let O=0;O>4]+e_[15&U[O]];J.push(O+"=Uint8Array(0x"+$+")")}else J.push(O+"="+JSON.stringify(U))}catch(U){J.push(O+"="+JSON.stringify($[O].toString()))}}),J.push(`code=${U}`),J.push(`version=${this.version}`);let es=O,eo="";switch(U){case en.NUMERIC_FAULT:{eo="NUMERIC_FAULT";let U=O;switch(U){case"overflow":case"underflow":case"division-by-zero":eo+="-"+U;break;case"negative-power":case"negative-width":eo+="-unsupported";break;case"unbound-bitwise-result":eo+="-unbound-result"}break}case en.CALL_EXCEPTION:case en.INSUFFICIENT_FUNDS:case en.MISSING_NEW:case en.NONCE_EXPIRED:case en.REPLACEMENT_UNDERPRICED:case en.TRANSACTION_REPLACED:case en.UNPREDICTABLE_GAS_LIMIT:eo=U}eo&&(O+=" [ See: https://links.ethers.org/v5-errors-"+eo+" ]"),J.length&&(O+=" ("+J.join(", ")+")");let eu=Error(O);return eu.reason=es,eu.code=U,Object.keys($).forEach(function(O){eu[O]=$[O]}),eu}throwError(O,U,$){throw this.makeError(O,U,$)}throwArgumentError(O,U,$){return this.throwError(O,Logger.errors.INVALID_ARGUMENT,{argument:U,value:$})}assert(O,U,$,J){O||this.throwError(U,$,J)}assertArgument(O,U,$,J){O||this.throwArgumentError(U,$,J)}checkNormalize(O){null==O&&(O="platform missing String.prototype.normalize"),ev&&this.throwError("platform missing String.prototype.normalize",Logger.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:ev})}checkSafeUint53(O,U){"number"==typeof O&&(null==U&&(U="value not safe"),(O<0||O>=9007199254740991)&&this.throwError(U,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:O}),O%1&&this.throwError(U,Logger.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:O}))}checkArgumentCount(O,U,$){$=$?": "+$:"",OU&&this.throwError("too many arguments"+$,Logger.errors.UNEXPECTED_ARGUMENT,{count:O,expectedCount:U})}checkNew(O,U){(O===Object||null==O)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:U.name})}checkAbstract(O,U){O===U?this.throwError("cannot instantiate abstract class "+JSON.stringify(U.name)+" directly; use a sub-class",Logger.errors.UNSUPPORTED_OPERATION,{name:O.name,operation:"new"}):(O===Object||null==O)&&this.throwError("missing new",Logger.errors.MISSING_NEW,{name:U.name})}static globalLogger(){return eg||(eg=new Logger(es)),eg}static setCensorship(O,U){if(!O&&U&&this.globalLogger().throwError("cannot permanently disable censorship",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),eo){if(!O)return;this.globalLogger().throwError("error censorship permanent",Logger.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}ea=!!O,eo=!!U}static setLogLevel(O){let U=eu[O.toLowerCase()];if(null==U){Logger.globalLogger().warn("invalid log level - "+O);return}ef=U}static from(O){return new Logger(O)}};Logger.errors=en,Logger.levels=J},7213:function(O,U,$){"use strict";$.d(U,{dk:function(){return Description},uj:function(){return checkProperties},p$:function(){return deepCopy},zG:function(){return defineReadOnly},tu:function(){return getStatic},mE:function(){return resolveProperties},DC:function(){return shallowCopy}});var J=$(6288);let en="properties/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let es=new J.Yd(en);function defineReadOnly(O,U,$){Object.defineProperty(O,U,{enumerable:!0,value:$,writable:!1})}function getStatic(O,U){for(let $=0;$<32;$++){if(O[U])return O[U];if(!O.prototype||"object"!=typeof O.prototype)break;O=Object.getPrototypeOf(O.prototype).constructor}return null}function resolveProperties(O){return __awaiter(this,void 0,void 0,function*(){let U=Object.keys(O).map(U=>{let $=O[U];return Promise.resolve($).then(O=>({key:U,value:O}))}),$=yield Promise.all(U);return $.reduce((O,U)=>(O[U.key]=U.value,O),{})})}function checkProperties(O,U){O&&"object"==typeof O||es.throwArgumentError("invalid object","object",O),Object.keys(O).forEach($=>{U[$]||es.throwArgumentError("invalid object key - "+$,"transaction:"+$,O)})}function shallowCopy(O){let U={};for(let $ in O)U[$]=O[$];return U}let eo={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function _isFrozen(O){if(null==O||eo[typeof O])return!0;if(Array.isArray(O)||"object"==typeof O){if(!Object.isFrozen(O))return!1;let U=Object.keys(O);for(let $=0;$deepCopy(O)));if("object"==typeof O){let U={};for(let $ in O){let J=O[$];void 0!==J&&defineReadOnly(U,$,deepCopy(J))}return U}return es.throwArgumentError(`Cannot deepCopy ${typeof O}`,"object",O)}function deepCopy(O){return _deepCopy(O)}let Description=class Description{constructor(O){for(let U in O)this[U]=deepCopy(O[U])}}},379:function(O,U,$){"use strict";$.d(U,{Q:function(){return Web3Provider}});var J=$(7213),en=$(6288);let es="providers/5.7.2";var eo=$(4941),ea=$(2278),eu=$(7273),ef=$(8994),eg=$(4184);let ev="hash/5.7.0";var e_=$(6339),__awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let ew=new en.Yd(ev),eE=new Uint8Array(32);eE.fill(0);let eS=ea.O$.from(-1),eA=ea.O$.from(0),eI=ea.O$.from(1),eP=ea.O$.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff");function hexPadRight(O){let U=(0,eu.lE)(O),$=U.length%32;return $?(0,eu.xs)([U,eE.slice($)]):(0,eu.Dv)(U)}let ek=(0,eu.$m)(eI.toHexString(),32),eT=(0,eu.$m)(eA.toHexString(),32),eR={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},eC=["name","version","chainId","verifyingContract","salt"];function checkString(O){return function(U){return"string"!=typeof U&&ew.throwArgumentError(`invalid domain value for ${JSON.stringify(O)}`,`domain.${O}`,U),U}}let eB={name:checkString("name"),version:checkString("version"),chainId:function(O){try{return ea.O$.from(O).toString()}catch(O){}return ew.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",O)},verifyingContract:function(O){try{return(0,ef.Kn)(O).toLowerCase()}catch(O){}return ew.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",O)},salt:function(O){try{let U=(0,eu.lE)(O);if(32!==U.length)throw Error("bad length");return(0,eu.Dv)(U)}catch(O){}return ew.throwArgumentError('invalid domain value "salt"',"domain.salt",O)}};function getBaseEncoder(O){{let U=O.match(/^(u?)int(\d*)$/);if(U){let $=""===U[1],J=parseInt(U[2]||"256");(J%8!=0||J>256||U[2]&&U[2]!==String(J))&&ew.throwArgumentError("invalid numeric width","type",O);let en=eP.mask($?J-1:J),es=$?en.add(eI).mul(eS):eA;return function(U){let $=ea.O$.from(U);return($.lt(es)||$.gt(en))&&ew.throwArgumentError(`value out-of-bounds for ${O}`,"value",U),(0,eu.$m)($.toTwos(256).toHexString(),32)}}}{let U=O.match(/^bytes(\d+)$/);if(U){let $=parseInt(U[1]);return(0===$||$>32||U[1]!==String($))&&ew.throwArgumentError("invalid bytes width","type",O),function(U){let J=(0,eu.lE)(U);return J.length!==$&&ew.throwArgumentError(`invalid length for ${O}`,"value",U),hexPadRight(U)}}}switch(O){case"address":return function(O){return(0,eu.$m)((0,ef.Kn)(O),32)};case"bool":return function(O){return O?ek:eT};case"bytes":return function(O){return(0,eg.w)(O)};case"string":return function(O){return(0,e_.id)(O)}}return null}function encodeType(O,U){return`${O}(${U.map(({name:O,type:U})=>U+" "+O).join(",")})`}let TypedDataEncoder=class TypedDataEncoder{constructor(O){(0,J.zG)(this,"types",Object.freeze((0,J.p$)(O))),(0,J.zG)(this,"_encoderCache",{}),(0,J.zG)(this,"_types",{});let U={},$={},en={};for(let J in Object.keys(O).forEach(O=>{U[O]={},$[O]=[],en[O]={}}),O){let en={};O[J].forEach(es=>{en[es.name]&&ew.throwArgumentError(`duplicate variable name ${JSON.stringify(es.name)} in ${JSON.stringify(J)}`,"types",O),en[es.name]=!0;let eo=es.type.match(/^([^\x5b]*)(\x5b|$)/)[1];eo===J&&ew.throwArgumentError(`circular type reference to ${JSON.stringify(eo)}`,"types",O);let ea=getBaseEncoder(eo);ea||($[eo]||ew.throwArgumentError(`unknown type ${JSON.stringify(eo)}`,"types",O),$[eo].push(J),U[J][eo]=!0)})}let es=Object.keys($).filter(O=>0===$[O].length);function checkCircular(J,es){es[J]&&ew.throwArgumentError(`circular type reference to ${JSON.stringify(J)}`,"types",O),es[J]=!0,Object.keys(U[J]).forEach(O=>{$[O]&&(checkCircular(O,es),Object.keys(es).forEach(U=>{en[U][O]=!0}))}),delete es[J]}for(let U in 0===es.length?ew.throwArgumentError("missing primary type","types",O):es.length>1&&ew.throwArgumentError(`ambiguous primary types or unused types: ${es.map(O=>JSON.stringify(O)).join(", ")}`,"types",O),(0,J.zG)(this,"primaryType",es[0]),checkCircular(this.primaryType,{}),en){let $=Object.keys(en[U]);$.sort(),this._types[U]=encodeType(U,O[U])+$.map(U=>encodeType(U,O[U])).join("")}}getEncoder(O){let U=this._encoderCache[O];return U||(U=this._encoderCache[O]=this._getEncoder(O)),U}_getEncoder(O){{let U=getBaseEncoder(O);if(U)return U}let U=O.match(/^(.*)(\x5b(\d*)\x5d)$/);if(U){let O=U[1],$=this.getEncoder(O),J=parseInt(U[3]);return U=>{J>=0&&U.length!==J&&ew.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",U);let en=U.map($);return this._types[O]&&(en=en.map(eg.w)),(0,eg.w)((0,eu.xs)(en))}}let $=this.types[O];if($){let U=(0,e_.id)(this._types[O]);return O=>{let J=$.map(({name:U,type:$})=>{let J=this.getEncoder($)(O[U]);return this._types[$]?(0,eg.w)(J):J});return J.unshift(U),(0,eu.xs)(J)}}return ew.throwArgumentError(`unknown type: ${O}`,"type",O)}encodeType(O){let U=this._types[O];return U||ew.throwArgumentError(`unknown type: ${JSON.stringify(O)}`,"name",O),U}encodeData(O,U){return this.getEncoder(O)(U)}hashStruct(O,U){return(0,eg.w)(this.encodeData(O,U))}encode(O){return this.encodeData(this.primaryType,O)}hash(O){return this.hashStruct(this.primaryType,O)}_visit(O,U,$){{let J=getBaseEncoder(O);if(J)return $(O,U)}let J=O.match(/^(.*)(\x5b(\d*)\x5d)$/);if(J){let O=J[1],en=parseInt(J[3]);return en>=0&&U.length!==en&&ew.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",U),U.map(U=>this._visit(O,U,$))}let en=this.types[O];return en?en.reduce((O,{name:J,type:en})=>(O[J]=this._visit(en,U[J],$),O),{}):ew.throwArgumentError(`unknown type: ${O}`,"type",O)}visit(O,U){return this._visit(this.primaryType,O,U)}static from(O){return new TypedDataEncoder(O)}static getPrimaryType(O){return TypedDataEncoder.from(O).primaryType}static hashStruct(O,U,$){return TypedDataEncoder.from(U).hashStruct(O,$)}static hashDomain(O){let U=[];for(let $ in O){let J=eR[$];J||ew.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify($)}`,"domain",O),U.push({name:$,type:J})}return U.sort((O,U)=>eC.indexOf(O.name)-eC.indexOf(U.name)),TypedDataEncoder.hashStruct("EIP712Domain",{EIP712Domain:U},O)}static encode(O,U,$){return(0,eu.xs)(["0x1901",TypedDataEncoder.hashDomain(O),TypedDataEncoder.from(U).hash($)])}static hash(O,U,$){return(0,eg.w)(TypedDataEncoder.encode(O,U,$))}static resolveNames(O,U,$,en){return __awaiter(this,void 0,void 0,function*(){O=(0,J.DC)(O);let es={};O.verifyingContract&&!(0,eu.A7)(O.verifyingContract,20)&&(es[O.verifyingContract]="0x");let eo=TypedDataEncoder.from(U);for(let O in eo.visit($,(O,U)=>("address"!==O||(0,eu.A7)(U,20)||(es[U]="0x"),U)),es)es[O]=yield en(O);return O.verifyingContract&&es[O.verifyingContract]&&(O.verifyingContract=es[O.verifyingContract]),{domain:O,value:$=eo.visit($,(O,U)=>"address"===O&&es[U]?es[U]:U)}})}static getPayload(O,U,$){TypedDataEncoder.hashDomain(O);let en={},es=[];eC.forEach(U=>{let $=O[U];null!=$&&(en[U]=eB[U]($),es.push({name:U,type:eR[U]}))});let eo=TypedDataEncoder.from(U),ef=(0,J.DC)(U);return ef.EIP712Domain?ew.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",U):ef.EIP712Domain=es,eo.encode($),{types:ef,domain:en,primaryType:eo.primaryType,message:eo.visit($,(O,U)=>{if(O.match(/^bytes(\d*)/))return(0,eu.Dv)((0,eu.lE)(U));if(O.match(/^u?int/))return ea.O$.from(U).toString();switch(O){case"address":return U.toLowerCase();case"bool":return!!U;case"string":return"string"!=typeof U&&ew.throwArgumentError("invalid string","value",U),U}return ew.throwArgumentError("unsupported type","type",O)})}}};var eN=$(8337),eD=$(2501);function decode(O){O=atob(O);let U=[];for(let $=0;${es[U.toLowerCase()]=O}):J.headers.keys().forEach(O=>{es[O.toLowerCase()]=J.headers.get(O)}),{headers:es,statusCode:J.status,statusMessage:J.statusText,body:(0,eu.lE)(new Uint8Array(en))}})}var lib_esm_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let eO=new en.Yd(eM);function staller(O){return new Promise(U=>{setTimeout(U,O)})}function bodyify(O,U){if(null==O)return null;if("string"==typeof O)return O;if((0,eu.Zq)(O)){if(U&&("text"===U.split("/")[0]||"application/json"===U.split(";")[0].trim()))try{return(0,eN.ZN)(O)}catch(O){}return(0,eu.Dv)(O)}return O}function unpercent(O){return(0,eN.Y0)(O.replace(/%([0-9a-f][0-9a-f])/gi,(O,U)=>String.fromCharCode(parseInt(U,16))))}function _fetchData(O,U,$){let es="object"==typeof O&&null!=O.throttleLimit?O.throttleLimit:12;eO.assertArgument(es>0&&es%1==0,"invalid connection throttle limit","connection.throttleLimit",es);let eo="object"==typeof O?O.throttleCallback:null,ea="object"==typeof O&&"number"==typeof O.throttleSlotInterval?O.throttleSlotInterval:100;eO.assertArgument(ea>0&&ea%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",ea);let eu="object"==typeof O&&!!O.errorPassThrough,ef={},eg=null,ev={method:"GET"},e_=!1,ew=12e4;if("string"==typeof O)eg=O;else if("object"==typeof O){if((null==O||null==O.url)&&eO.throwArgumentError("missing URL","connection.url",O),eg=O.url,"number"==typeof O.timeout&&O.timeout>0&&(ew=O.timeout),O.headers)for(let U in O.headers)ef[U.toLowerCase()]={key:U,value:String(O.headers[U])},["if-none-match","if-modified-since"].indexOf(U.toLowerCase())>=0&&(e_=!0);if(ev.allowGzip=!!O.allowGzip,null!=O.user&&null!=O.password){"https:"!==eg.substring(0,6)&&!0!==O.allowInsecureAuthentication&&eO.throwError("basic authentication requires a secure https url",en.Yd.errors.INVALID_ARGUMENT,{argument:"url",url:eg,user:O.user,password:"[REDACTED]"});let U=O.user+":"+O.password;ef.authorization={key:"Authorization",value:"Basic "+encode((0,eN.Y0)(U))}}null!=O.skipFetchSetup&&(ev.skipFetchSetup=!!O.skipFetchSetup),null!=O.fetchOptions&&(ev.fetchOptions=(0,J.DC)(O.fetchOptions))}let eE=RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),eS=eg?eg.match(eE):null;if(eS)try{let O={statusCode:200,statusMessage:"OK",headers:{"content-type":eS[1]||"text/plain"},body:eS[2]?decode(eS[3]):unpercent(eS[3])},U=O.body;return $&&(U=$(O.body,O)),Promise.resolve(U)}catch(O){eO.throwError("processing response error",en.Yd.errors.SERVER_ERROR,{body:bodyify(eS[1],eS[2]),error:O,requestBody:null,requestMethod:"GET",url:eg})}U&&(ev.method="POST",ev.body=U,null==ef["content-type"]&&(ef["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==ef["content-length"]&&(ef["content-length"]={key:"Content-Length",value:String(U.length)}));let eA={};Object.keys(ef).forEach(O=>{let U=ef[O];eA[U.key]=U.value}),ev.headers=eA;let eI=function(){let O=null,U=new Promise(function(U,$){ew&&(O=setTimeout(()=>{null!=O&&(O=null,$(eO.makeError("timeout",en.Yd.errors.TIMEOUT,{requestBody:bodyify(ev.body,eA["content-type"]),requestMethod:ev.method,timeout:ew,url:eg})))},ew))}),cancel=function(){null!=O&&(clearTimeout(O),O=null)};return{promise:U,cancel}}(),eP=function(){return lib_esm_awaiter(this,void 0,void 0,function*(){for(let O=0;O=300)&&(eI.cancel(),eO.throwError("bad response",en.Yd.errors.SERVER_ERROR,{status:U.statusCode,headers:U.headers,body:bodyify(J,U.headers?U.headers["content-type"]:null),requestBody:bodyify(ev.body,eA["content-type"]),requestMethod:ev.method,url:eg})),$)try{let O=yield $(J,U);return eI.cancel(),O}catch($){if($.throttleRetry&&O{let J=null;if(null!=O)try{J=JSON.parse((0,eN.ZN)(O))}catch(U){eO.throwError("invalid JSON",en.Yd.errors.SERVER_ERROR,{body:O,error:U})}return $&&(J=$(J,U)),J},es=null;if(null!=U){es=(0,eN.Y0)(U);let $="string"==typeof O?{url:O}:(0,J.DC)(O);if($.headers){let O=0!==Object.keys($.headers).filter(O=>"content-type"===O.toLowerCase()).length;O||($.headers=(0,J.DC)($.headers),$.headers["content-type"]="application/json")}else $.headers={"content-type":"application/json"};O=$}return _fetchData(O,es,processJsonFunc)}function poll(O,U){return U||(U={}),null==(U=(0,J.DC)(U)).floor&&(U.floor=0),null==U.ceiling&&(U.ceiling=1e4),null==U.interval&&(U.interval=250),new Promise(function($,J){let en=null,es=!1,cancel=()=>!es&&(es=!0,en&&clearTimeout(en),!0);U.timeout&&(en=setTimeout(()=>{cancel()&&J(Error("timeout"))},U.timeout));let eo=U.retryLimit,ea=0;function check(){return O().then(function(O){if(void 0!==O)cancel()&&$(O);else if(U.oncePoll)U.oncePoll.once("poll",check);else if(U.onceBlock)U.onceBlock.once("block",check);else if(!es){if(++ea>eo){cancel()&&J(Error("retry limit reached"));return}let O=U.interval*parseInt(String(Math.random()*Math.pow(2,ea)));OU.ceiling&&(O=U.ceiling),setTimeout(check,O)}return null},function(O){cancel()&&J(O)})}check()})}var eL=$(4999);let BaseX=class BaseX{constructor(O){(0,J.zG)(this,"alphabet",O),(0,J.zG)(this,"base",O.length),(0,J.zG)(this,"_alphabetMap",{}),(0,J.zG)(this,"_leader",O.charAt(0));for(let U=0;U0;)$.push(J%this.base),J=J/this.base|0}let J="";for(let O=0;0===U[O]&&O=0;--O)J+=this.alphabet[$[O]];return J}decode(O){if("string"!=typeof O)throw TypeError("Expected String");let U=[];if(0===O.length)return new Uint8Array(U);U.push(0);for(let $=0;$>=8;for(;en>0;)U.push(255&en),en>>=8}for(let $=0;O[$]===this._leader&&$0&&Array.isArray(O)?flatDeep(O,U-1):$.push(O)})};return flatDeep(O,U),$}function fromEntries(O){let U={};for(let $=0;$>--ea&1}let ef=31,eg=Math.pow(2,ef),ev=eg>>>1,e_=ev>>1,ew=eg-1,eE=0;for(let O=0;O1;){let $=U+es>>>1;O>>1|read_bit(),eo=eo<<1^ev,ea=(ea^ev)<<1|ev|1;eA=eo,eI=1+ea-eo}let eP=$-4;return eS.map(U=>{switch(U-eP){case 3:return eP+65792+(O[eo++]<<16|O[eo++]<<8|O[eo++]);case 2:return eP+256+(O[eo++]<<8|O[eo++]);case 1:return eP+O[eo++];default:return U-1}})}function read_payload(O){let U=0;return()=>O[U++]}function read_compressed_payload(O){return read_payload(decode_arithmetic(O))}function signed(O){return 1&O?~O>>1:O>>1}function read_counts(O,U){let $=Array(O);for(let J=0;JU[O]):$}function read_mapped_map(O){let U=[];for(;;){let $=O();if(0==$)break;U.push(read_linear_table($,O))}for(;;){let $=O()-1;if($<0)break;U.push(read_replacement_table($,O))}return fromEntries(flat(U))}function read_zero_terminated_array(O){let U=[];for(;;){let $=O();if(0==$)break;U.push($)}return U}function read_transposed(O,U,$){let J=Array(O).fill(void 0).map(()=>[]);for(let en=0;enJ[U].push(O));return J}function read_linear_table(O,U){let $=1+U(),J=U(),en=read_zero_terminated_array(U);return flat(read_transposed(en.length,1+O,U).map((O,U)=>{let es=O[0],eo=O.slice(1);return Array(en[U]).fill(void 0).map((O,U)=>{let en=U*J;return[es+U*$,eo.map(O=>O+en)]})}))}function read_replacement_table(O,U){return read_transposed(1+U(),1+O,U).map(O=>[O[0],O.slice(1)])}function read_emoji_trie(O){let U=read_member_array(O).sort((O,U)=>O-U);return read();function read(){let $=[];for(;;){let J=read_member_array(O,U);if(0==J.length)break;$.push({set:new Set(J),node:read()})}$.sort((O,U)=>U.set.size-O.set.size);let J=O();return{branches:$,valid:J%3,fe0f:!!(1&(J=J/3|0)),save:1==(J>>=1),check:2==J}}}function getData(){return read_compressed_payload(decode("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))}let eK=getData(),ej=new Set(read_member_array(eK)),eH=new Set(read_member_array(eK)),eq=read_mapped_map(eK),eV=read_emoji_trie(eK),eG=45,e$=95;function explode_cp(O){return(0,eN.XL)(O)}function filter_fe0f(O){return O.filter(O=>65039!=O)}function ens_normalize_post_check(O){for(let U of O.split(".")){let O=explode_cp(U);try{for(let U=O.lastIndexOf(e$)-1;U>=0;U--)if(O[U]!==e$)throw Error("underscore only allowed at start");if(O.length>=4&&O.every(O=>O<128)&&O[2]===eG&&O[3]===eG)throw Error("invalid label extension")}catch(O){throw Error(`Invalid label "${U}": ${O.message}`)}}return O}function ens_normalize(O){return ens_normalize_post_check(normalize(O,filter_fe0f))}function normalize(O,U){let $=explode_cp(O).reverse(),J=[];for(;$.length;){let O=consume_emoji_reversed($);if(O){J.push(...U(O));continue}let en=$.pop();if(ej.has(en)){J.push(en);continue}if(eH.has(en))continue;let es=eq[en];if(es){J.push(...es);continue}throw Error(`Disallowed codepoint: 0x${en.toString(16).toUpperCase()}`)}return ens_normalize_post_check(nfc(String.fromCodePoint(...J)))}function nfc(O){return O.normalize("NFC")}function consume_emoji_reversed(O,U){var $;let J,en;let es=eV,eo=[],ea=O.length;for(U&&(U.length=0);ea;){let eu=O[--ea];if(!(es=null===($=es.branches.find(O=>O.set.has(eu)))||void 0===$?void 0:$.node))break;if(es.save)en=eu;else if(es.check&&eu===en)break;eo.push(eu),es.fe0f&&(eo.push(65039),ea>0&&65039==O[ea-1]&&ea--),es.valid&&(J=eo.slice(),2==es.valid&&J.splice(1,1),U&&U.push(...O.slice(ea).reverse()),O.length=ea)}return J}let eW=new en.Yd(ev),eY=new Uint8Array(32);function checkComponent(O){if(0===O.length)throw Error("invalid ENS name; empty component");return O}function ensNameSplit(O){let U=(0,eN.Y0)(ens_normalize(O)),$=[];if(0===O.length)return $;let J=0;for(let O=0;O=U.length)throw Error("invalid ENS name; empty component");return $.push(checkComponent(U.slice(J))),$}function namehash(O){"string"!=typeof O&&eW.throwArgumentError("invalid ENS name; not a string","name",O);let U=eY,$=ensNameSplit(O);for(;$.length;)U=(0,eg.w)((0,eu.zo)([U,(0,eg.w)($.pop())]));return(0,eu.Dv)(U)}function dnsEncode(O){return(0,eu.Dv)((0,eu.zo)(ensNameSplit(O).map(O=>{if(O.length>63)throw Error("invalid DNS encoded entry; length exceeds 63 bytes");let U=new Uint8Array(O.length+1);return U.set(O,1),U[0]=U.length-1,U})))+"00"}eY.fill(0);let eJ="networks/5.7.1",eQ=new en.Yd(eJ);function isRenetworkable(O){return O&&"function"==typeof O.renetwork}function ethDefaultProvider(O){let func=function(U,$){null==$&&($={});let J=[];if(U.InfuraProvider&&"-"!==$.infura)try{J.push(new U.InfuraProvider(O,$.infura))}catch(O){}if(U.EtherscanProvider&&"-"!==$.etherscan)try{J.push(new U.EtherscanProvider(O,$.etherscan))}catch(O){}if(U.AlchemyProvider&&"-"!==$.alchemy)try{J.push(new U.AlchemyProvider(O,$.alchemy))}catch(O){}if(U.PocketProvider&&"-"!==$.pocket){let en=["goerli","ropsten","rinkeby","sepolia"];try{let es=new U.PocketProvider(O,$.pocket);es.network&&-1===en.indexOf(es.network.name)&&J.push(es)}catch(O){}}if(U.CloudflareProvider&&"-"!==$.cloudflare)try{J.push(new U.CloudflareProvider(O))}catch(O){}if(U.AnkrProvider&&"-"!==$.ankr)try{let en=["ropsten"],es=new U.AnkrProvider(O,$.ankr);es.network&&-1===en.indexOf(es.network.name)&&J.push(es)}catch(O){}if(0===J.length)return null;if(U.FallbackProvider){let en=1;return null!=$.quorum?en=$.quorum:"homestead"===O&&(en=2),new U.FallbackProvider(J,en)}return J[0]};return func.renetwork=function(O){return ethDefaultProvider(O)},func}function etcDefaultProvider(O,U){let func=function($,J){return $.JsonRpcProvider?new $.JsonRpcProvider(O,U):null};return func.renetwork=function(U){return etcDefaultProvider(O,U)},func}let eZ={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:ethDefaultProvider("homestead")},eX={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:ethDefaultProvider("ropsten")},e0={chainId:63,name:"classicMordor",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/mordor","classicMordor")},e1={unspecified:{chainId:0,name:"unspecified"},homestead:eZ,mainnet:eZ,morden:{chainId:2,name:"morden"},ropsten:eX,testnet:eX,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:ethDefaultProvider("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:ethDefaultProvider("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:ethDefaultProvider("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:ethDefaultProvider("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:e0,classicTestnet:e0,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:etcDefaultProvider("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:ethDefaultProvider("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:ethDefaultProvider("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function getNetwork(O){if(null==O)return null;if("number"==typeof O){for(let U in e1){let $=e1[U];if($.chainId===O)return{name:$.name,chainId:$.chainId,ensAddress:$.ensAddress||null,_defaultProvider:$._defaultProvider||null}}return{chainId:O,name:"unknown"}}if("string"==typeof O){let U=e1[O];return null==U?null:{name:U.name,chainId:U.chainId,ensAddress:U.ensAddress,_defaultProvider:U._defaultProvider||null}}let U=e1[O.name];if(!U)return"number"!=typeof O.chainId&&eQ.throwArgumentError("invalid network chainId","network",O),O;0!==O.chainId&&O.chainId!==U.chainId&&eQ.throwArgumentError("network chainId mismatch","network",O);let $=O._defaultProvider||null;return null==$&&U._defaultProvider&&($=isRenetworkable(U._defaultProvider)?U._defaultProvider.renetwork(O):U._defaultProvider),{name:O.name,chainId:U.chainId,ensAddress:O.ensAddress||U.ensAddress||null,_defaultProvider:$}}var e3=$(5336),e6=$.n(e3);let e5="sha2/5.7.0";function sha256(O){return"0x"+e6().sha256().update((0,eu.lE)(O)).digest("hex")}new en.Yd(e5);var e9=$(6942),e7=$.n(e9),te=$(5572);let tt=new en.Yd(es);let Formatter=class Formatter{constructor(){this.formats=this.getDefaultFormats()}getDefaultFormats(){let O={},U=this.address.bind(this),$=this.bigNumber.bind(this),en=this.blockTag.bind(this),es=this.data.bind(this),eo=this.hash.bind(this),ea=this.hex.bind(this),eu=this.number.bind(this),ef=this.type.bind(this),strictData=O=>this.data(O,!0);return O.transaction={hash:eo,type:ef,accessList:Formatter.allowNull(this.accessList.bind(this),null),blockHash:Formatter.allowNull(eo,null),blockNumber:Formatter.allowNull(eu,null),transactionIndex:Formatter.allowNull(eu,null),confirmations:Formatter.allowNull(eu,null),from:U,gasPrice:Formatter.allowNull($),maxPriorityFeePerGas:Formatter.allowNull($),maxFeePerGas:Formatter.allowNull($),gasLimit:$,to:Formatter.allowNull(U,null),value:$,nonce:eu,data:es,r:Formatter.allowNull(this.uint256),s:Formatter.allowNull(this.uint256),v:Formatter.allowNull(eu),creates:Formatter.allowNull(U,null),raw:Formatter.allowNull(es)},O.transactionRequest={from:Formatter.allowNull(U),nonce:Formatter.allowNull(eu),gasLimit:Formatter.allowNull($),gasPrice:Formatter.allowNull($),maxPriorityFeePerGas:Formatter.allowNull($),maxFeePerGas:Formatter.allowNull($),to:Formatter.allowNull(U),value:Formatter.allowNull($),data:Formatter.allowNull(strictData),type:Formatter.allowNull(eu),accessList:Formatter.allowNull(this.accessList.bind(this),null)},O.receiptLog={transactionIndex:eu,blockNumber:eu,transactionHash:eo,address:U,topics:Formatter.arrayOf(eo),data:es,logIndex:eu,blockHash:eo},O.receipt={to:Formatter.allowNull(this.address,null),from:Formatter.allowNull(this.address,null),contractAddress:Formatter.allowNull(U,null),transactionIndex:eu,root:Formatter.allowNull(ea),gasUsed:$,logsBloom:Formatter.allowNull(es),blockHash:eo,transactionHash:eo,logs:Formatter.arrayOf(this.receiptLog.bind(this)),blockNumber:eu,confirmations:Formatter.allowNull(eu,null),cumulativeGasUsed:$,effectiveGasPrice:Formatter.allowNull($),status:Formatter.allowNull(eu),type:ef},O.block={hash:Formatter.allowNull(eo),parentHash:eo,number:eu,timestamp:eu,nonce:Formatter.allowNull(ea),difficulty:this.difficulty.bind(this),gasLimit:$,gasUsed:$,miner:Formatter.allowNull(U),extraData:es,transactions:Formatter.allowNull(Formatter.arrayOf(eo)),baseFeePerGas:Formatter.allowNull($)},O.blockWithTransactions=(0,J.DC)(O.block),O.blockWithTransactions.transactions=Formatter.allowNull(Formatter.arrayOf(this.transactionResponse.bind(this))),O.filter={fromBlock:Formatter.allowNull(en,void 0),toBlock:Formatter.allowNull(en,void 0),blockHash:Formatter.allowNull(eo,void 0),address:Formatter.allowNull(U,void 0),topics:Formatter.allowNull(this.topics.bind(this),void 0)},O.filterLog={blockNumber:Formatter.allowNull(eu),blockHash:Formatter.allowNull(eo),transactionIndex:eu,removed:Formatter.allowNull(this.boolean.bind(this)),address:U,data:Formatter.allowFalsish(es,"0x"),topics:Formatter.arrayOf(eo),transactionHash:eo,logIndex:eu},O}accessList(O){return(0,eD.z7)(O||[])}number(O){return"0x"===O?0:ea.O$.from(O).toNumber()}type(O){return"0x"===O||null==O?0:ea.O$.from(O).toNumber()}bigNumber(O){return ea.O$.from(O)}boolean(O){if("boolean"==typeof O)return O;if("string"==typeof O){if("true"===(O=O.toLowerCase()))return!0;if("false"===O)return!1}throw Error("invalid boolean - "+O)}hex(O,U){return"string"==typeof O&&(U||"0x"===O.substring(0,2)||(O="0x"+O),(0,eu.A7)(O))?O.toLowerCase():tt.throwArgumentError("invalid hash","value",O)}data(O,U){let $=this.hex(O,U);if($.length%2!=0)throw Error("invalid data; odd-length - "+O);return $}address(O){return(0,ef.Kn)(O)}callAddress(O){if(!(0,eu.A7)(O,32))return null;let U=(0,ef.Kn)((0,eu.p3)(O,12));return U===te.d?null:U}contractAddress(O){return(0,ef.CR)(O)}blockTag(O){if(null==O)return"latest";if("earliest"===O)return"0x0";switch(O){case"earliest":return"0x0";case"latest":case"pending":case"safe":case"finalized":return O}if("number"==typeof O||(0,eu.A7)(O))return(0,eu.$P)(O);throw Error("invalid blockTag")}hash(O,U){let $=this.hex(O,U);return 32!==(0,eu.E1)($)?tt.throwArgumentError("invalid hash","value",O):$}difficulty(O){if(null==O)return null;let U=ea.O$.from(O);try{return U.toNumber()}catch(O){}return null}uint256(O){if(!(0,eu.A7)(O))throw Error("invalid uint256");return(0,eu.$m)(O,32)}_block(O,U){null!=O.author&&null==O.miner&&(O.miner=O.author);let $=null!=O._difficulty?O._difficulty:O.difficulty,J=Formatter.check(U,O);return J._difficulty=null==$?null:ea.O$.from($),J}block(O){return this._block(O,this.formats.block)}blockWithTransactions(O){return this._block(O,this.formats.blockWithTransactions)}transactionRequest(O){return Formatter.check(this.formats.transactionRequest,O)}transactionResponse(O){null!=O.gas&&null==O.gasLimit&&(O.gasLimit=O.gas),O.to&&ea.O$.from(O.to).isZero()&&(O.to="0x0000000000000000000000000000000000000000"),null!=O.input&&null==O.data&&(O.data=O.input),null==O.to&&null==O.creates&&(O.creates=this.contractAddress(O)),(1===O.type||2===O.type)&&null==O.accessList&&(O.accessList=[]);let U=Formatter.check(this.formats.transaction,O);if(null!=O.chainId){let $=O.chainId;(0,eu.A7)($)&&($=ea.O$.from($).toNumber()),U.chainId=$}else{let $=O.networkId;null==$&&null==U.v&&($=O.chainId),(0,eu.A7)($)&&($=ea.O$.from($).toNumber()),"number"!=typeof $&&null!=U.v&&(($=(U.v-35)/2)<0&&($=0),$=parseInt($)),"number"!=typeof $&&($=0),U.chainId=$}return U.blockHash&&"x"===U.blockHash.replace(/0/g,"")&&(U.blockHash=null),U}transaction(O){return(0,eD.Qc)(O)}receiptLog(O){return Formatter.check(this.formats.receiptLog,O)}receipt(O){let U=Formatter.check(this.formats.receipt,O);if(null!=U.root){if(U.root.length<=4){let O=ea.O$.from(U.root).toNumber();0===O||1===O?(null!=U.status&&U.status!==O&&tt.throwArgumentError("alt-root-status/status mismatch","value",{root:U.root,status:U.status}),U.status=O,delete U.root):tt.throwArgumentError("invalid alt-root-status","value.root",U.root)}else 66!==U.root.length&&tt.throwArgumentError("invalid root hash","value.root",U.root)}return null!=U.status&&(U.byzantium=!0),U}topics(O){return Array.isArray(O)?O.map(O=>this.topics(O)):null!=O?this.hash(O,!0):null}filter(O){return Formatter.check(this.formats.filter,O)}filterLog(O){return Formatter.check(this.formats.filterLog,O)}static check(O,U){let $={};for(let J in O)try{let en=O[J](U[J]);void 0!==en&&($[J]=en)}catch(O){throw O.checkKey=J,O.checkValue=U[J],O}return $}static allowNull(O,U){return function($){return null==$?U:O($)}}static allowFalsish(O,U){return function($){return $?O($):U}}static arrayOf(O){return function(U){if(!Array.isArray(U))throw Error("not an array");let $=[];return U.forEach(function(U){$.push(O(U))}),$}}};var base_provider_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tr=new en.Yd(es),ta=10;function checkTopic(O){return null==O?"null":(32!==(0,eu.E1)(O)&&tr.throwArgumentError("invalid topic","topic",O),O.toLowerCase())}function serializeTopics(O){for(O=O.slice();O.length>0&&null==O[O.length-1];)O.pop();return O.map(O=>{if(!Array.isArray(O))return checkTopic(O);{let U={};O.forEach(O=>{U[checkTopic(O)]=!0});let $=Object.keys(U);return $.sort(),$.join("|")}}).join("&")}function deserializeTopics(O){return""===O?[]:O.split(/&/g).map(O=>{if(""===O)return[];let U=O.split("|").map(O=>"null"===O?null:O);return 1===U.length?U[0]:U})}function getEventTag(O){if("string"==typeof O){if(O=O.toLowerCase(),32===(0,eu.E1)(O))return"tx:"+O;if(-1===O.indexOf(":"))return O}else if(Array.isArray(O))return"filter:*:"+serializeTopics(O);else if(eL.Sg.isForkEvent(O))throw tr.warn("not implemented"),Error("not implemented");else if(O&&"object"==typeof O)return"filter:"+(O.address||"*")+":"+serializeTopics(O.topics||[]);throw Error("invalid event - "+O)}function getTime(){return new Date().getTime()}function stall(O){return new Promise(U=>{setTimeout(U,O)})}let tu=["block","network","pending","poll"];let Event=class Event{constructor(O,U,$){(0,J.zG)(this,"tag",O),(0,J.zG)(this,"listener",U),(0,J.zG)(this,"once",$),this._lastBlockNumber=-2,this._inflight=!1}get event(){switch(this.type){case"tx":return this.hash;case"filter":return this.filter}return this.tag}get type(){return this.tag.split(":")[0]}get hash(){let O=this.tag.split(":");return"tx"!==O[0]?null:O[1]}get filter(){let O=this.tag.split(":");if("filter"!==O[0])return null;let U=O[1],$=deserializeTopics(O[2]),J={};return $.length>0&&(J.topics=$),U&&"*"!==U&&(J.address=U),J}pollable(){return this.tag.indexOf(":")>=0||tu.indexOf(this.tag)>=0}};let th={0:{symbol:"btc",p2pkh:0,p2sh:5,prefix:"bc"},2:{symbol:"ltc",p2pkh:48,p2sh:50,prefix:"ltc"},3:{symbol:"doge",p2pkh:30,p2sh:22},60:{symbol:"eth",ilk:"eth"},61:{symbol:"etc",ilk:"eth"},700:{symbol:"xdai",ilk:"eth"}};function bytes32ify(O){return(0,eu.$m)(ea.O$.from(O).toHexString(),32)}function base58Encode(O){return eU.encode((0,eu.zo)([O,(0,eu.p3)(sha256(sha256(O)),0,4)]))}let td=RegExp("^(ipfs)://(.*)$","i"),tf=[RegExp("^(https)://(.*)$","i"),RegExp("^(data):(.*)$","i"),td,RegExp("^eip155:[0-9]+/(erc[0-9]+):(.*)$","i")];function _parseString(O,U){try{return(0,eN.ZN)(_parseBytes(O,U))}catch(O){}return null}function _parseBytes(O,U){if("0x"===O)return null;let $=ea.O$.from((0,eu.p3)(O,U,U+32)).toNumber(),J=ea.O$.from((0,eu.p3)(O,$,$+32)).toNumber();return(0,eu.p3)(O,$+32,$+32+J)}function getIpfsLink(O){return O.match(/^ipfs:\/\/ipfs\//i)?O=O.substring(12):O.match(/^ipfs:\/\//i)?O=O.substring(7):tr.throwArgumentError("unsupported IPFS format","link",O),`https://gateway.ipfs.io/ipfs/${O}`}function numPad(O){let U=(0,eu.lE)(O);if(U.length>32)throw Error("internal; should not happen");let $=new Uint8Array(32);return $.set(U,32-U.length),$}function bytesPad(O){if(O.length%32==0)return O;let U=new Uint8Array(32*Math.ceil(O.length/32));return U.set(O),U}function encodeBytes(O){let U=[],$=0;for(let J=0;Jea.O$.from(O).eq(1)).catch(O=>{if(O.code===en.Yd.errors.CALL_EXCEPTION)return!1;throw this._supportsEip2544=null,O})),this._supportsEip2544}_fetch(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){let $={to:this.address,ccipReadEnabled:!0,data:(0,eu.xs)([O,namehash(this.name),U||"0x"])},J=!1;(yield this.supportsWildcard())&&(J=!0,$.data=(0,eu.xs)(["0x9061b923",encodeBytes([dnsEncode(this.name),$.data])]));try{let O=yield this.provider.call($);return(0,eu.lE)(O).length%32==4&&tr.throwError("resolver threw error",en.Yd.errors.CALL_EXCEPTION,{transaction:$,data:O}),J&&(O=_parseBytes(O,0)),O}catch(O){if(O.code===en.Yd.errors.CALL_EXCEPTION)return null;throw O}})}_fetchBytes(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this._fetch(O,U);return null!=$?_parseBytes($,0):null})}_getAddress(O,U){let $=th[String(O)];if(null==$&&tr.throwError(`unsupported coin type: ${O}`,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${O})`}),"eth"===$.ilk)return this.provider.formatter.address(U);let J=(0,eu.lE)(U);if(null!=$.p2pkh){let O=U.match(/^0x76a9([0-9a-f][0-9a-f])([0-9a-f]*)88ac$/);if(O){let U=parseInt(O[1],16);if(O[2].length===2*U&&U>=1&&U<=75)return base58Encode((0,eu.zo)([[$.p2pkh],"0x"+O[2]]))}}if(null!=$.p2sh){let O=U.match(/^0xa9([0-9a-f][0-9a-f])([0-9a-f]*)87$/);if(O){let U=parseInt(O[1],16);if(O[2].length===2*U&&U>=1&&U<=75)return base58Encode((0,eu.zo)([[$.p2sh],"0x"+O[2]]))}}if(null!=$.prefix){let O=J[1],U=J[0];if(0===U?20!==O&&32!==O&&(U=-1):U=-1,U>=0&&J.length===2+O&&O>=1&&O<=75){let O=e7().toWords(J.slice(2));return O.unshift(U),e7().encode($.prefix,O)}}return null}getAddress(O){return base_provider_awaiter(this,void 0,void 0,function*(){if(null==O&&(O=60),60===O)try{let O=yield this._fetch("0x3b3b57de");if("0x"===O||O===eF)return null;return this.provider.formatter.callAddress(O)}catch(O){if(O.code===en.Yd.errors.CALL_EXCEPTION)return null;throw O}let U=yield this._fetchBytes("0xf1cb7e06",bytes32ify(O));if(null==U||"0x"===U)return null;let $=this._getAddress(O,U);return null==$&&tr.throwError("invalid or unsupported coin data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:`getAddress(${O})`,coinType:O,data:U}),$})}getAvatar(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=[{type:"name",content:this.name}];try{let U=yield this.getText("avatar");if(null==U)return null;for(let $=0;$O[U]);return"sia://"+U}return tr.throwError("invalid or unsupported content hash data",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getContentHash()",data:O})})}getText(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=(0,eN.Y0)(O);(U=(0,eu.zo)([bytes32ify(64),bytes32ify(U.length),U])).length%32!=0&&(U=(0,eu.zo)([U,(0,eu.$m)("0x",32-O.length%32)]));let $=yield this._fetchBytes("0x59d1d43c",(0,eu.Dv)(U));return null==$||"0x"===$?null:(0,eN.ZN)($)})}};let tp=null,tg=1;let BaseProvider=class BaseProvider extends eL.zt{constructor(O){if(super(),this._events=[],this._emitted={block:-2},this.disableCcipRead=!1,this.formatter=new.target.getFormatter(),(0,J.zG)(this,"anyNetwork","any"===O),this.anyNetwork&&(O=this.detectNetwork()),O instanceof Promise)this._networkPromise=O,O.catch(O=>{}),this._ready().catch(O=>{});else{let U=(0,J.tu)(new.target,"getNetwork")(O);U?((0,J.zG)(this,"_network",U),this.emit("network",U,null)):tr.throwArgumentError("invalid network","network",O)}this._maxInternalBlockNumber=-1024,this._lastBlockNumber=-2,this._maxFilterBlockRange=10,this._pollingInterval=4e3,this._fastQueryDate=0}_ready(){return base_provider_awaiter(this,void 0,void 0,function*(){if(null==this._network){let O=null;if(this._networkPromise)try{O=yield this._networkPromise}catch(O){}null==O&&(O=yield this.detectNetwork()),O||tr.throwError("no network detected",en.Yd.errors.UNKNOWN_ERROR,{}),null==this._network&&(this.anyNetwork?this._network=O:(0,J.zG)(this,"_network",O),this.emit("network",O,null))}return this._network})}get ready(){return poll(()=>this._ready().then(O=>O,O=>{if(O.code!==en.Yd.errors.NETWORK_ERROR||"noNetwork"!==O.event)throw O}))}static getFormatter(){return null==tp&&(tp=new Formatter),tp}static getNetwork(O){return getNetwork(null==O?"homestead":O)}ccipReadFetch(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){if(this.disableCcipRead||0===$.length)return null;let J=O.to.toLowerCase(),es=U.toLowerCase(),eo=[];for(let O=0;O<$.length;O++){let U=$[O],ea=U.replace("{sender}",J).replace("{data}",es),eu=U.indexOf("{data}")>=0?null:JSON.stringify({data:es,sender:J}),ef=yield fetchJson({url:ea,errorPassThrough:!0},eu,(O,U)=>(O.status=U.statusCode,O));if(ef.data)return ef.data;let eg=ef.message||"unknown error";if(ef.status>=400&&ef.status<500)return tr.throwError(`response not found during CCIP fetch: ${eg}`,en.Yd.errors.SERVER_ERROR,{url:U,errorMessage:eg});eo.push(eg)}return tr.throwError(`error encountered during CCIP fetch: ${eo.map(O=>JSON.stringify(O)).join(", ")}`,en.Yd.errors.SERVER_ERROR,{urls:$,errorMessages:eo})})}_getInternalBlockNumber(O){return base_provider_awaiter(this,void 0,void 0,function*(){if(yield this._ready(),O>0)for(;this._internalBlockNumber;){let U=this._internalBlockNumber;try{let $=yield U;if(getTime()-$.respTime<=O)return $.blockNumber;break}catch(O){if(this._internalBlockNumber===U)break}}let U=getTime(),$=(0,J.mE)({blockNumber:this.perform("getBlockNumber",{}),networkError:this.getNetwork().then(O=>null,O=>O)}).then(({blockNumber:O,networkError:J})=>{if(J)throw this._internalBlockNumber===$&&(this._internalBlockNumber=null),J;let en=getTime();return(O=ea.O$.from(O).toNumber()){this._internalBlockNumber===$&&(this._internalBlockNumber=null)}),(yield $).blockNumber})}poll(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=tg++,U=[],$=null;try{$=yield this._getInternalBlockNumber(100+this.pollingInterval/2)}catch(O){this.emit("error",O);return}if(this._setFastBlockNumber($),this.emit("poll",O,$),$===this._lastBlockNumber){this.emit("didPoll",O);return}if(-2===this._emitted.block&&(this._emitted.block=$-1),Math.abs(this._emitted.block-$)>1e3)tr.warn(`network block skew detected; skipping block events (emitted=${this._emitted.block} blockNumber${$})`),this.emit("error",tr.makeError("network block skew detected",en.Yd.errors.NETWORK_ERROR,{blockNumber:$,event:"blockSkew",previousBlockNumber:this._emitted.block})),this.emit("block",$);else for(let O=this._emitted.block+1;O<=$;O++)this.emit("block",O);this._emitted.block!==$&&(this._emitted.block=$,Object.keys(this._emitted).forEach(O=>{if("block"===O)return;let U=this._emitted[O];"pending"!==U&&$-U>12&&delete this._emitted[O]})),-2===this._lastBlockNumber&&(this._lastBlockNumber=$-1),this._events.forEach(O=>{switch(O.type){case"tx":{let $=O.hash,J=this.getTransactionReceipt($).then(O=>(O&&null!=O.blockNumber&&(this._emitted["t:"+$]=O.blockNumber,this.emit($,O)),null)).catch(O=>{this.emit("error",O)});U.push(J);break}case"filter":if(!O._inflight){O._inflight=!0,-2===O._lastBlockNumber&&(O._lastBlockNumber=$-1);let J=O.filter;J.fromBlock=O._lastBlockNumber+1,J.toBlock=$;let en=J.toBlock-this._maxFilterBlockRange;en>J.fromBlock&&(J.fromBlock=en),J.fromBlock<0&&(J.fromBlock=0);let es=this.getLogs(J).then(U=>{O._inflight=!1,0!==U.length&&U.forEach(U=>{U.blockNumber>O._lastBlockNumber&&(O._lastBlockNumber=U.blockNumber),this._emitted["b:"+U.blockHash]=U.blockNumber,this._emitted["t:"+U.transactionHash]=U.blockNumber,this.emit(J,U)})}).catch(U=>{this.emit("error",U),O._inflight=!1});U.push(es)}}}),this._lastBlockNumber=$,Promise.all(U).then(()=>{this.emit("didPoll",O)}).catch(O=>{this.emit("error",O)})})}resetEventsBlock(O){this._lastBlockNumber=O-1,this.polling&&this.poll()}get network(){return this._network}detectNetwork(){return base_provider_awaiter(this,void 0,void 0,function*(){return tr.throwError("provider does not support network detection",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"provider.detectNetwork"})})}getNetwork(){return base_provider_awaiter(this,void 0,void 0,function*(){let O=yield this._ready(),U=yield this.detectNetwork();if(O.chainId!==U.chainId){if(this.anyNetwork)return this._network=U,this._lastBlockNumber=-2,this._fastBlockNumber=null,this._fastBlockNumberPromise=null,this._fastQueryDate=0,this._emitted.block=-2,this._maxInternalBlockNumber=-1024,this._internalBlockNumber=null,this.emit("network",U,O),yield stall(0),this._network;let $=tr.makeError("underlying network changed",en.Yd.errors.NETWORK_ERROR,{event:"changed",network:O,detectedNetwork:U});throw this.emit("error",$),$}return O})}get blockNumber(){return this._getInternalBlockNumber(100+this.pollingInterval/2).then(O=>{this._setFastBlockNumber(O)},O=>{}),null!=this._fastBlockNumber?this._fastBlockNumber:-1}get polling(){return null!=this._poller}set polling(O){O&&!this._poller?(this._poller=setInterval(()=>{this.poll()},this.pollingInterval),this._bootstrapPoll||(this._bootstrapPoll=setTimeout(()=>{this.poll(),this._bootstrapPoll=setTimeout(()=>{this._poller||this.poll(),this._bootstrapPoll=null},this.pollingInterval)},0))):!O&&this._poller&&(clearInterval(this._poller),this._poller=null)}get pollingInterval(){return this._pollingInterval}set pollingInterval(O){if("number"!=typeof O||O<=0||parseInt(String(O))!=O)throw Error("invalid polling interval");this._pollingInterval=O,this._poller&&(clearInterval(this._poller),this._poller=setInterval(()=>{this.poll()},this._pollingInterval))}_getFastBlockNumber(){let O=getTime();return O-this._fastQueryDate>2*this._pollingInterval&&(this._fastQueryDate=O,this._fastBlockNumberPromise=this.getBlockNumber().then(O=>((null==this._fastBlockNumber||O>this._fastBlockNumber)&&(this._fastBlockNumber=O),this._fastBlockNumber))),this._fastBlockNumberPromise}_setFastBlockNumber(O){(null==this._fastBlockNumber||!(Othis._fastBlockNumber)&&(this._fastBlockNumber=O,this._fastBlockNumberPromise=Promise.resolve(O)))}waitForTransaction(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){return this._waitForTransaction(O,null==U?1:U,$||0,null)})}_waitForTransaction(O,U,$,J){return base_provider_awaiter(this,void 0,void 0,function*(){let es=yield this.getTransactionReceipt(O);return(es?es.confirmations:0)>=U?es:new Promise((es,eo)=>{let ea=[],eu=!1,alreadyDone=function(){return!!eu||(eu=!0,ea.forEach(O=>{O()}),!1)},minedHandler=O=>{O.confirmations{this.removeListener(O,minedHandler)}),J){let $=J.startBlock,es=null,replaceHandler=ea=>base_provider_awaiter(this,void 0,void 0,function*(){eu||(yield stall(1e3),this.getTransactionCount(J.from).then(ef=>base_provider_awaiter(this,void 0,void 0,function*(){if(!eu){if(ef<=J.nonce)$=ea;else{{let U=yield this.getTransaction(O);if(U&&null!=U.blockNumber)return}for(null==es&&(es=$-3){eu||this.once("block",replaceHandler)}))});if(eu)return;this.once("block",replaceHandler),ea.push(()=>{this.removeListener("block",replaceHandler)})}if("number"==typeof $&&$>0){let O=setTimeout(()=>{alreadyDone()||eo(tr.makeError("timeout exceeded",en.Yd.errors.TIMEOUT,{timeout:$}))},$);O.unref&&O.unref(),ea.push(()=>{clearTimeout(O)})}})})}getBlockNumber(){return base_provider_awaiter(this,void 0,void 0,function*(){return this._getInternalBlockNumber(0)})}getGasPrice(){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let O=yield this.perform("getGasPrice",{});try{return ea.O$.from(O)}catch(U){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getGasPrice",result:O,error:U})}})}getBalance(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getBalance",$);try{return ea.O$.from(es)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getBalance",params:$,result:es,error:O})}})}getTransactionCount(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getTransactionCount",$);try{return ea.O$.from(es).toNumber()}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getTransactionCount",params:$,result:es,error:O})}})}getCode(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let $=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag(U)}),es=yield this.perform("getCode",$);try{return(0,eu.Dv)(es)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getCode",params:$,result:es,error:O})}})}getStorageAt(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let es=yield(0,J.mE)({address:this._getAddress(O),blockTag:this._getBlockTag($),position:Promise.resolve(U).then(O=>(0,eu.$P)(O))}),eo=yield this.perform("getStorageAt",es);try{return(0,eu.Dv)(eo)}catch(O){return tr.throwError("bad result from backend",en.Yd.errors.SERVER_ERROR,{method:"getStorageAt",params:es,result:eo,error:O})}})}_wrapTransaction(O,U,$){if(null!=U&&32!==(0,eu.E1)(U))throw Error("invalid response - sendTransaction");let J=O;return null!=U&&O.hash!==U&&tr.throwError("Transaction hash mismatch from Provider.sendTransaction.",en.Yd.errors.UNKNOWN_ERROR,{expectedHash:O.hash,returnedHash:U}),J.wait=(U,J)=>base_provider_awaiter(this,void 0,void 0,function*(){let es;null==U&&(U=1),null==J&&(J=0),0!==U&&null!=$&&(es={data:O.data,from:O.from,nonce:O.nonce,to:O.to,value:O.value,startBlock:$});let eo=yield this._waitForTransaction(O.hash,U,J,es);return null==eo&&0===U?null:(this._emitted["t:"+O.hash]=eo.blockNumber,0===eo.status&&tr.throwError("transaction failed",en.Yd.errors.CALL_EXCEPTION,{transactionHash:O.hash,transaction:O,receipt:eo}),eo)}),J}sendTransaction(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let U=yield Promise.resolve(O).then(O=>(0,eu.Dv)(O)),$=this.formatter.transaction(O);null==$.confirmations&&($.confirmations=0);let J=yield this._getInternalBlockNumber(100+2*this.pollingInterval);try{let O=yield this.perform("sendTransaction",{signedTransaction:U});return this._wrapTransaction($,O,J)}catch(O){throw O.transaction=$,O.transactionHash=$.hash,O}})}_getTransactionRequest(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=yield O,$={};return["from","to"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?this._getAddress(O):null))}),["gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","value"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?ea.O$.from(O):null))}),["type"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>null!=O?O:null))}),U.accessList&&($.accessList=this.formatter.accessList(U.accessList)),["data"].forEach(O=>{null!=U[O]&&($[O]=Promise.resolve(U[O]).then(O=>O?(0,eu.Dv)(O):null))}),this.formatter.transactionRequest((yield(0,J.mE)($)))})}_getFilter(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O;let U={};return null!=O.address&&(U.address=this._getAddress(O.address)),["blockHash","topics"].forEach($=>{null!=O[$]&&(U[$]=O[$])}),["fromBlock","toBlock"].forEach($=>{null!=O[$]&&(U[$]=this._getBlockTag(O[$]))}),this.formatter.filter((yield(0,J.mE)(U)))})}_call(O,U,$){return base_provider_awaiter(this,void 0,void 0,function*(){$>=ta&&tr.throwError("CCIP read exceeded maximum redirections",en.Yd.errors.SERVER_ERROR,{redirects:$,transaction:O});let J=O.to,es=yield this.perform("call",{transaction:O,blockTag:U});if($>=0&&"latest"===U&&null!=J&&"0x556f1830"===es.substring(0,10)&&(0,eu.E1)(es)%32==4)try{let eo=(0,eu.p3)(es,4),ef=(0,eu.p3)(eo,0,32);ea.O$.from(ef).eq(J)||tr.throwError("CCIP Read sender did not match",en.Yd.errors.CALL_EXCEPTION,{name:"OffchainLookup",signature:"OffchainLookup(address,string[],bytes,bytes4,bytes)",transaction:O,data:es});let eg=[],ev=ea.O$.from((0,eu.p3)(eo,32,64)).toNumber(),e_=ea.O$.from((0,eu.p3)(eo,ev,ev+32)).toNumber(),ew=(0,eu.p3)(eo,ev+32);for(let U=0;Ubase_provider_awaiter(this,void 0,void 0,function*(){let O=yield this.perform("getBlock",J);if(null==O)return null!=J.blockHash&&null==this._emitted["b:"+J.blockHash]||null!=J.blockTag&&$>this._emitted.block?null:void 0;if(U){let U=null;for(let $=0;$this._wrapTransaction(O)),$}return this.formatter.block(O)}),{oncePoll:this})})}getBlock(O){return this._getBlock(O,!1)}getBlockWithTransactions(O){return this._getBlock(O,!0)}getTransaction(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork(),O=yield O;let U={transactionHash:this.formatter.hash(O,!0)};return poll(()=>base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this.perform("getTransaction",U);if(null==$)return null==this._emitted["t:"+O]?null:void 0;let J=this.formatter.transactionResponse($);if(null==J.blockNumber)J.confirmations=0;else if(null==J.confirmations){let O=yield this._getInternalBlockNumber(100+2*this.pollingInterval),U=O-J.blockNumber+1;U<=0&&(U=1),J.confirmations=U}return this._wrapTransaction(J)}),{oncePoll:this})})}getTransactionReceipt(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork(),O=yield O;let U={transactionHash:this.formatter.hash(O,!0)};return poll(()=>base_provider_awaiter(this,void 0,void 0,function*(){let $=yield this.perform("getTransactionReceipt",U);if(null==$)return null==this._emitted["t:"+O]?null:void 0;if(null==$.blockHash)return;let J=this.formatter.receipt($);if(null==J.blockNumber)J.confirmations=0;else if(null==J.confirmations){let O=yield this._getInternalBlockNumber(100+2*this.pollingInterval),U=O-J.blockNumber+1;U<=0&&(U=1),J.confirmations=U}return J}),{oncePoll:this})})}getLogs(O){return base_provider_awaiter(this,void 0,void 0,function*(){yield this.getNetwork();let U=yield(0,J.mE)({filter:this._getFilter(O)}),$=yield this.perform("getLogs",U);return $.forEach(O=>{null==O.removed&&(O.removed=!1)}),Formatter.arrayOf(this.formatter.filterLog.bind(this.formatter))($)})}getEtherPrice(){return base_provider_awaiter(this,void 0,void 0,function*(){return yield this.getNetwork(),this.perform("getEtherPrice",{})})}_getBlockTag(O){return base_provider_awaiter(this,void 0,void 0,function*(){if("number"==typeof(O=yield O)&&O<0){O%1&&tr.throwArgumentError("invalid BlockTag","blockTag",O);let U=yield this._getInternalBlockNumber(100+2*this.pollingInterval);return(U+=O)<0&&(U=0),this.formatter.blockTag(U)}return this.formatter.blockTag(O)})}getResolver(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=O;for(;;){if(""===U||"."===U||"eth"!==O&&"eth"===U)return null;let $=yield this._getResolver(U,"getResolver");if(null!=$){let J=new Resolver(this,$,O);if(U!==O&&!(yield J.supportsWildcard()))return null;return J}U=U.split(".").slice(1).join(".")}})}_getResolver(O,U){return base_provider_awaiter(this,void 0,void 0,function*(){null==U&&(U="ENS");let $=yield this.getNetwork();$.ensAddress||tr.throwError("network does not support ENS",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:U,network:$.name});try{let U=yield this.call({to:$.ensAddress,data:"0x0178b8bf"+namehash(O).substring(2)});return this.formatter.callAddress(U)}catch(O){}return null})}resolveName(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O;try{return Promise.resolve(this.formatter.address(O))}catch(U){if((0,eu.A7)(O))throw U}"string"!=typeof O&&tr.throwArgumentError("invalid ENS name","name",O);let U=yield this.getResolver(O);return U?yield U.getAddress():null})}lookupAddress(O){return base_provider_awaiter(this,void 0,void 0,function*(){O=yield O,O=this.formatter.address(O);let U=O.substring(2).toLowerCase()+".addr.reverse",$=yield this._getResolver(U,"lookupAddress");if(null==$)return null;let J=_parseString((yield this.call({to:$,data:"0x691f3431"+namehash(U).substring(2)})),0),en=yield this.resolveName(J);return en!=O?null:J})}getAvatar(O){return base_provider_awaiter(this,void 0,void 0,function*(){let U=null;if((0,eu.A7)(O)){let $=this.formatter.address(O),J=$.substring(2).toLowerCase()+".addr.reverse",es=yield this._getResolver(J,"getAvatar");if(!es)return null;U=new Resolver(this,es,J);try{let O=yield U.getAvatar();if(O)return O.url}catch(O){if(O.code!==en.Yd.errors.CALL_EXCEPTION)throw O}try{let O=_parseString((yield this.call({to:es,data:"0x691f3431"+namehash(J).substring(2)})),0);U=yield this.getResolver(O)}catch(O){if(O.code!==en.Yd.errors.CALL_EXCEPTION)throw O;return null}}else if(!(U=yield this.getResolver(O)))return null;let $=yield U.getAvatar();return null==$?null:$.url})}perform(O,U){return tr.throwError(O+" not implemented",en.Yd.errors.NOT_IMPLEMENTED,{operation:O})}_startEvent(O){this.polling=this._events.filter(O=>O.pollable()).length>0}_stopEvent(O){this.polling=this._events.filter(O=>O.pollable()).length>0}_addEventListener(O,U,$){let J=new Event(getEventTag(O),U,$);return this._events.push(J),this._startEvent(J),this}on(O,U){return this._addEventListener(O,U,!1)}once(O,U){return this._addEventListener(O,U,!0)}emit(O,...U){let $=!1,J=[],en=getEventTag(O);return this._events=this._events.filter(O=>O.tag!==en||(setTimeout(()=>{O.listener.apply(this,U)},0),$=!0,!O.once||(J.push(O),!1))),J.forEach(O=>{this._stopEvent(O)}),$}listenerCount(O){if(!O)return this._events.length;let U=getEventTag(O);return this._events.filter(O=>O.tag===U).length}listeners(O){if(null==O)return this._events.map(O=>O.listener);let U=getEventTag(O);return this._events.filter(O=>O.tag===U).map(O=>O.listener)}off(O,U){if(null==U)return this.removeAllListeners(O);let $=[],J=!1,en=getEventTag(O);return this._events=this._events.filter(O=>O.tag!==en||O.listener!=U||!!J||(J=!0,$.push(O),!1)),$.forEach(O=>{this._stopEvent(O)}),this}removeAllListeners(O){let U=[];if(null==O)U=this._events,this._events=[];else{let $=getEventTag(O);this._events=this._events.filter(O=>O.tag!==$||(U.push(O),!1))}return U.forEach(O=>{this._stopEvent(O)}),this}};var json_rpc_provider_awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tm=new en.Yd(es),ty=["call","estimateGas"];function spelunk(O,U){if(null==O)return null;if("string"==typeof O.message&&O.message.match("reverted")){let $=(0,eu.A7)(O.data)?O.data:null;if(!U||$)return{message:O.message,data:$}}if("object"==typeof O){for(let $ in O){let J=spelunk(O[$],U);if(J)return J}return null}if("string"==typeof O)try{return spelunk(JSON.parse(O),U)}catch(O){}return null}function checkError(O,U,$){let J=$.transaction||$.signedTransaction;if("call"===O){let O=spelunk(U,!0);if(O)return O.data;tm.throwError("missing revert data in call exception; Transaction reverted without a reason string",en.Yd.errors.CALL_EXCEPTION,{data:"0x",transaction:J,error:U})}if("estimateGas"===O){let $=spelunk(U.body,!1);null==$&&($=spelunk(U,!1)),$&&tm.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{reason:$.message,method:O,transaction:J,error:U})}let es=U.message;throw U.code===en.Yd.errors.SERVER_ERROR&&U.error&&"string"==typeof U.error.message?es=U.error.message:"string"==typeof U.body?es=U.body:"string"==typeof U.responseText&&(es=U.responseText),(es=(es||"").toLowerCase()).match(/insufficient funds|base fee exceeds gas limit|InsufficientFunds/i)&&tm.throwError("insufficient funds for intrinsic transaction cost",en.Yd.errors.INSUFFICIENT_FUNDS,{error:U,method:O,transaction:J}),es.match(/nonce (is )?too low/i)&&tm.throwError("nonce has already been used",en.Yd.errors.NONCE_EXPIRED,{error:U,method:O,transaction:J}),es.match(/replacement transaction underpriced|transaction gas price.*too low/i)&&tm.throwError("replacement fee too low",en.Yd.errors.REPLACEMENT_UNDERPRICED,{error:U,method:O,transaction:J}),es.match(/only replay-protected/i)&&tm.throwError("legacy pre-eip-155 transactions not supported",en.Yd.errors.UNSUPPORTED_OPERATION,{error:U,method:O,transaction:J}),ty.indexOf(O)>=0&&es.match(/gas required exceeds allowance|always failing transaction|execution reverted|revert/)&&tm.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",en.Yd.errors.UNPREDICTABLE_GAS_LIMIT,{error:U,method:O,transaction:J}),U}function timer(O){return new Promise(function(U){setTimeout(U,O)})}function getResult(O){if(O.error){let U=Error(O.error.message);throw U.code=O.error.code,U.data=O.error.data,U}return O.result}function getLowerCase(O){return O?O.toLowerCase():O}let tb={};let JsonRpcSigner=class JsonRpcSigner extends eo.E{constructor(O,U,$){if(super(),O!==tb)throw Error("do not call the JsonRpcSigner constructor directly; use provider.getSigner");(0,J.zG)(this,"provider",U),null==$&&($=0),"string"==typeof $?((0,J.zG)(this,"_address",this.provider.formatter.address($)),(0,J.zG)(this,"_index",null)):"number"==typeof $?((0,J.zG)(this,"_index",$),(0,J.zG)(this,"_address",null)):tm.throwArgumentError("invalid address or index","addressOrIndex",$)}connect(O){return tm.throwError("cannot alter JSON-RPC Signer connection",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"connect"})}connectUnchecked(){return new UncheckedJsonRpcSigner(tb,this.provider,this._address||this._index)}getAddress(){return this._address?Promise.resolve(this._address):this.provider.send("eth_accounts",[]).then(O=>(O.length<=this._index&&tm.throwError("unknown account #"+this._index,en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"getAddress"}),this.provider.formatter.address(O[this._index])))}sendUncheckedTransaction(O){O=(0,J.DC)(O);let U=this.getAddress().then(O=>(O&&(O=O.toLowerCase()),O));if(null==O.gasLimit){let $=(0,J.DC)(O);$.from=U,O.gasLimit=this.provider.estimateGas($)}return null!=O.to&&(O.to=Promise.resolve(O.to).then(O=>json_rpc_provider_awaiter(this,void 0,void 0,function*(){if(null==O)return null;let U=yield this.provider.resolveName(O);return null==U&&tm.throwArgumentError("provided ENS name resolves to null","tx.to",O),U}))),(0,J.mE)({tx:(0,J.mE)(O),sender:U}).then(({tx:U,sender:$})=>{null!=U.from?U.from.toLowerCase()!==$&&tm.throwArgumentError("from address mismatch","transaction",O):U.from=$;let J=this.provider.constructor.hexlifyTransaction(U,{from:!0});return this.provider.send("eth_sendTransaction",[J]).then(O=>O,O=>("string"==typeof O.message&&O.message.match(/user denied/i)&&tm.throwError("user rejected transaction",en.Yd.errors.ACTION_REJECTED,{action:"sendTransaction",transaction:U}),checkError("sendTransaction",O,J)))})}signTransaction(O){return tm.throwError("signing transactions is unsupported",en.Yd.errors.UNSUPPORTED_OPERATION,{operation:"signTransaction"})}sendTransaction(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U=yield this.provider._getInternalBlockNumber(100+2*this.provider.pollingInterval),$=yield this.sendUncheckedTransaction(O);try{return yield poll(()=>json_rpc_provider_awaiter(this,void 0,void 0,function*(){let O=yield this.provider.getTransaction($);if(null!==O)return this.provider._wrapTransaction(O,$,U)}),{oncePoll:this.provider})}catch(O){throw O.transactionHash=$,O}})}signMessage(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U="string"==typeof O?(0,eN.Y0)(O):O,$=yield this.getAddress();try{return yield this.provider.send("personal_sign",[(0,eu.Dv)(U),$.toLowerCase()])}catch(U){throw"string"==typeof U.message&&U.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"signMessage",from:$,messageData:O}),U}})}_legacySignMessage(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U="string"==typeof O?(0,eN.Y0)(O):O,$=yield this.getAddress();try{return yield this.provider.send("eth_sign",[$.toLowerCase(),(0,eu.Dv)(U)])}catch(U){throw"string"==typeof U.message&&U.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"_legacySignMessage",from:$,messageData:O}),U}})}_signTypedData(O,U,$){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let J=yield TypedDataEncoder.resolveNames(O,U,$,O=>this.provider.resolveName(O)),es=yield this.getAddress();try{return yield this.provider.send("eth_signTypedData_v4",[es.toLowerCase(),JSON.stringify(TypedDataEncoder.getPayload(J.domain,U,J.value))])}catch(O){throw"string"==typeof O.message&&O.message.match(/user denied/i)&&tm.throwError("user rejected signing",en.Yd.errors.ACTION_REJECTED,{action:"_signTypedData",from:es,messageData:{domain:J.domain,types:U,value:J.value}}),O}})}unlock(O){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){let U=this.provider,$=yield this.getAddress();return U.send("personal_unlockAccount",[$.toLowerCase(),O,null])})}};let UncheckedJsonRpcSigner=class UncheckedJsonRpcSigner extends JsonRpcSigner{sendTransaction(O){return this.sendUncheckedTransaction(O).then(O=>({hash:O,nonce:null,gasLimit:null,gasPrice:null,data:null,value:null,chainId:null,confirmations:0,from:null,wait:U=>this.provider.waitForTransaction(O,U)}))}};let tv={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,value:!0,type:!0,accessList:!0,maxFeePerGas:!0,maxPriorityFeePerGas:!0};let JsonRpcProvider=class JsonRpcProvider extends BaseProvider{constructor(O,U){let $=U;null==$&&($=new Promise((O,U)=>{setTimeout(()=>{this.detectNetwork().then(U=>{O(U)},O=>{U(O)})},0)})),super($),O||(O=(0,J.tu)(this.constructor,"defaultUrl")()),"string"==typeof O?(0,J.zG)(this,"connection",Object.freeze({url:O})):(0,J.zG)(this,"connection",Object.freeze((0,J.DC)(O))),this._nextId=42}get _cache(){return null==this._eventLoopCache&&(this._eventLoopCache={}),this._eventLoopCache}static defaultUrl(){return"http://localhost:8545"}detectNetwork(){return this._cache.detectNetwork||(this._cache.detectNetwork=this._uncachedDetectNetwork(),setTimeout(()=>{this._cache.detectNetwork=null},0)),this._cache.detectNetwork}_uncachedDetectNetwork(){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){yield timer(0);let O=null;try{O=yield this.send("eth_chainId",[])}catch(U){try{O=yield this.send("net_version",[])}catch(O){}}if(null!=O){let U=(0,J.tu)(this.constructor,"getNetwork");try{return U(ea.O$.from(O).toNumber())}catch(U){return tm.throwError("could not detect network",en.Yd.errors.NETWORK_ERROR,{chainId:O,event:"invalidNetwork",serverError:U})}}return tm.throwError("could not detect network",en.Yd.errors.NETWORK_ERROR,{event:"noNetwork"})})}getSigner(O){return new JsonRpcSigner(tb,this,O)}getUncheckedSigner(O){return this.getSigner(O).connectUnchecked()}listAccounts(){return this.send("eth_accounts",[]).then(O=>O.map(O=>this.formatter.address(O)))}send(O,U){let $={method:O,params:U,id:this._nextId++,jsonrpc:"2.0"};this.emit("debug",{action:"request",request:(0,J.p$)($),provider:this});let en=["eth_chainId","eth_blockNumber"].indexOf(O)>=0;if(en&&this._cache[O])return this._cache[O];let es=fetchJson(this.connection,JSON.stringify($),getResult).then(O=>(this.emit("debug",{action:"response",request:$,response:O,provider:this}),O),O=>{throw this.emit("debug",{action:"response",error:O,request:$,provider:this}),O});return en&&(this._cache[O]=es,setTimeout(()=>{this._cache[O]=null},0)),es}prepareRequest(O,U){switch(O){case"getBlockNumber":return["eth_blockNumber",[]];case"getGasPrice":return["eth_gasPrice",[]];case"getBalance":return["eth_getBalance",[getLowerCase(U.address),U.blockTag]];case"getTransactionCount":return["eth_getTransactionCount",[getLowerCase(U.address),U.blockTag]];case"getCode":return["eth_getCode",[getLowerCase(U.address),U.blockTag]];case"getStorageAt":return["eth_getStorageAt",[getLowerCase(U.address),(0,eu.$m)(U.position,32),U.blockTag]];case"sendTransaction":return["eth_sendRawTransaction",[U.signedTransaction]];case"getBlock":if(U.blockTag)return["eth_getBlockByNumber",[U.blockTag,!!U.includeTransactions]];if(U.blockHash)return["eth_getBlockByHash",[U.blockHash,!!U.includeTransactions]];break;case"getTransaction":return["eth_getTransactionByHash",[U.transactionHash]];case"getTransactionReceipt":return["eth_getTransactionReceipt",[U.transactionHash]];case"call":{let O=(0,J.tu)(this.constructor,"hexlifyTransaction");return["eth_call",[O(U.transaction,{from:!0}),U.blockTag]]}case"estimateGas":{let O=(0,J.tu)(this.constructor,"hexlifyTransaction");return["eth_estimateGas",[O(U.transaction,{from:!0})]]}case"getLogs":return U.filter&&null!=U.filter.address&&(U.filter.address=getLowerCase(U.filter.address)),["eth_getLogs",[U.filter]]}return null}perform(O,U){return json_rpc_provider_awaiter(this,void 0,void 0,function*(){if("call"===O||"estimateGas"===O){let O=U.transaction;if(O&&null!=O.type&&ea.O$.from(O.type).isZero()&&null==O.maxFeePerGas&&null==O.maxPriorityFeePerGas){let $=yield this.getFeeData();null==$.maxFeePerGas&&null==$.maxPriorityFeePerGas&&((U=(0,J.DC)(U)).transaction=(0,J.DC)(O),delete U.transaction.type)}}let $=this.prepareRequest(O,U);null==$&&tm.throwError(O+" not implemented",en.Yd.errors.NOT_IMPLEMENTED,{operation:O});try{return yield this.send($[0],$[1])}catch($){return checkError(O,$,U)}})}_startEvent(O){"pending"===O.tag&&this._startPending(),super._startEvent(O)}_startPending(){if(null!=this._pendingFilter)return;let O=this,U=this.send("eth_newPendingTransactionFilter",[]);this._pendingFilter=U,U.then(function($){function poll(){O.send("eth_getFilterChanges",[$]).then(function($){if(O._pendingFilter!=U)return null;let J=Promise.resolve();return $.forEach(function(U){O._emitted["t:"+U.toLowerCase()]="pending",J=J.then(function(){return O.getTransaction(U).then(function(U){return O.emit("pending",U),null})})}),J.then(function(){return timer(1e3)})}).then(function(){if(O._pendingFilter!=U){O.send("eth_uninstallFilter",[$]);return}return setTimeout(function(){poll()},0),null}).catch(O=>{})}return poll(),$}).catch(O=>{})}_stopEvent(O){"pending"===O.tag&&0===this.listenerCount("pending")&&(this._pendingFilter=null),super._stopEvent(O)}static hexlifyTransaction(O,U){let $=(0,J.DC)(tv);if(U)for(let O in U)U[O]&&($[O]=!0);(0,J.uj)(O,$);let en={};return["chainId","gasLimit","gasPrice","type","maxFeePerGas","maxPriorityFeePerGas","nonce","value"].forEach(function(U){if(null==O[U])return;let $=(0,eu.$P)(ea.O$.from(O[U]));"gasLimit"===U&&(U="gas"),en[U]=$}),["from","to","data"].forEach(function(U){null!=O[U]&&(en[U]=(0,eu.Dv)(O[U]))}),O.accessList&&(en.accessList=(0,eD.z7)(O.accessList)),en}};let t_=new en.Yd(es),tw=1;function buildWeb3LegacyFetcher(O,U){let $="Web3LegacyFetcher";return function(O,en){let es={method:O,params:en,id:tw++,jsonrpc:"2.0"};return new Promise((O,en)=>{this.emit("debug",{action:"request",fetcher:$,request:(0,J.p$)(es),provider:this}),U(es,(U,J)=>{if(U)return this.emit("debug",{action:"response",fetcher:$,error:U,request:es,provider:this}),en(U);if(this.emit("debug",{action:"response",fetcher:$,request:es,response:J,provider:this}),J.error){let O=Error(J.error.message);return O.code=J.error.code,O.data=J.error.data,en(O)}O(J.result)})})}}function buildEip1193Fetcher(O){return function(U,$){null==$&&($=[]);let en={method:U,params:$};return this.emit("debug",{action:"request",fetcher:"Eip1193Fetcher",request:(0,J.p$)(en),provider:this}),O.request(en).then(O=>(this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:en,response:O,provider:this}),O),O=>{throw this.emit("debug",{action:"response",fetcher:"Eip1193Fetcher",request:en,error:O,provider:this}),O})}}let Web3Provider=class Web3Provider extends JsonRpcProvider{constructor(O,U){null==O&&t_.throwArgumentError("missing provider","provider",O);let $=null,en=null,es=null;"function"==typeof O?($="unknown:",en=O):(($=O.host||O.path||"")||!O.isMetaMask||($="metamask"),es=O,O.request?(""===$&&($="eip-1193:"),en=buildEip1193Fetcher(O)):O.sendAsync?en=buildWeb3LegacyFetcher(O,O.sendAsync.bind(O)):O.send?en=buildWeb3LegacyFetcher(O,O.send.bind(O)):t_.throwArgumentError("unsupported provider","provider",O),$||($="unknown:")),super($,U),(0,J.zG)(this,"jsonRpcFetchFunc",en),(0,J.zG)(this,"provider",es)}send(O,U){return this.jsonRpcFetchFunc(O,U)}}},7054:function(O,U,$){"use strict";$.d(U,{J:function(){return decode},c:function(){return encode}});var J=$(7273),en=$(6288);let es="rlp/5.7.0",eo=new en.Yd(es);function arrayifyInteger(O){let U=[];for(;O;)U.unshift(255&O),O>>=8;return U}function unarrayifyInteger(O,U,$){let J=0;for(let en=0;en<$;en++)J=256*J+O[U+en];return J}function _encode(O){if(Array.isArray(O)){let U=[];if(O.forEach(function(O){U=U.concat(_encode(O))}),U.length<=55)return U.unshift(192+U.length),U;let $=arrayifyInteger(U.length);return $.unshift(247+$.length),$.concat(U)}(0,J.Zq)(O)||eo.throwArgumentError("RLP object must be BytesLike","object",O);let U=Array.prototype.slice.call((0,J.lE)(O));if(1===U.length&&U[0]<=127)return U;if(U.length<=55)return U.unshift(128+U.length),U;let $=arrayifyInteger(U.length);return $.unshift(183+$.length),$.concat(U)}function encode(O){return(0,J.Dv)(_encode(O))}function _decodeChildren(O,U,$,J){let es=[];for(;$U+1+J&&eo.throwError("child data too short",en.Yd.errors.BUFFER_OVERRUN,{})}return{consumed:1+J,result:es}}function _decode(O,U){if(0===O.length&&eo.throwError("data too short",en.Yd.errors.BUFFER_OVERRUN,{}),O[U]>=248){let $=O[U]-247;U+1+$>O.length&&eo.throwError("data short segment too short",en.Yd.errors.BUFFER_OVERRUN,{});let J=unarrayifyInteger(O,U+1,$);return U+1+$+J>O.length&&eo.throwError("data long segment too short",en.Yd.errors.BUFFER_OVERRUN,{}),_decodeChildren(O,U,U+1+$,$+J)}if(O[U]>=192){let $=O[U]-192;return U+1+$>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{}),_decodeChildren(O,U,U+1,$)}if(O[U]>=184){let $=O[U]-183;U+1+$>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{});let es=unarrayifyInteger(O,U+1,$);U+1+$+es>O.length&&eo.throwError("data array too short",en.Yd.errors.BUFFER_OVERRUN,{});let ea=(0,J.Dv)(O.slice(U+1+$,U+1+$+es));return{consumed:1+$+es,result:ea}}if(O[U]>=128){let $=O[U]-128;U+1+$>O.length&&eo.throwError("data too short",en.Yd.errors.BUFFER_OVERRUN,{});let es=(0,J.Dv)(O.slice(U+1,U+1+$));return{consumed:1+$,result:es}}return{consumed:1,result:(0,J.Dv)(O[U])}}function decode(O){let U=(0,J.lE)(O),$=_decode(U,0);return $.consumed!==U.length&&eo.throwArgumentError("invalid rlp data","data",O),$.result}},8337:function(O,U,$){"use strict";$.d(U,{Y0:function(){return toUtf8Bytes},XL:function(){return toUtf8CodePoints},ZN:function(){return toUtf8String}});var J,en,es=$(7273),eo=$(6288);let ea="strings/5.7.0",eu=new eo.Yd(ea);function errorFunc(O,U,$,J,en){return eu.throwArgumentError(`invalid codepoint at offset ${U}; ${O}`,"bytes",$)}function ignoreFunc(O,U,$,J,es){if(O===en.BAD_PREFIX||O===en.UNEXPECTED_CONTINUE){let O=0;for(let J=U+1;J<$.length&&$[J]>>6==2;J++)O++;return O}return O===en.OVERRUN?$.length-U-1:0}function replaceFunc(O,U,$,J,es){return O===en.OVERLONG?(J.push(es),0):(J.push(65533),ignoreFunc(O,U,$,J,es))}!function(O){O.current="",O.NFC="NFC",O.NFD="NFD",O.NFKC="NFKC",O.NFKD="NFKD"}(J||(J={})),function(O){O.UNEXPECTED_CONTINUE="unexpected continuation byte",O.BAD_PREFIX="bad codepoint prefix",O.OVERRUN="string overrun",O.MISSING_CONTINUE="missing continuation byte",O.OUT_OF_RANGE="out of UTF-8 range",O.UTF16_SURROGATE="UTF-16 surrogate",O.OVERLONG="overlong representation"}(en||(en={}));let ef=Object.freeze({error:errorFunc,ignore:ignoreFunc,replace:replaceFunc});function getUtf8CodePoints(O,U){null==U&&(U=ef.error),O=(0,es.lE)(O);let $=[],J=0;for(;J>7==0){$.push(es);continue}let eo=null,ea=null;if((224&es)==192)eo=1,ea=127;else if((240&es)==224)eo=2,ea=2047;else if((248&es)==240)eo=3,ea=65535;else{(192&es)==128?J+=U(en.UNEXPECTED_CONTINUE,J-1,O,$):J+=U(en.BAD_PREFIX,J-1,O,$);continue}if(J-1+eo>=O.length){J+=U(en.OVERRUN,J-1,O,$);continue}let eu=es&(1<<8-eo-1)-1;for(let es=0;es1114111){J+=U(en.OUT_OF_RANGE,J-1-eo,O,$,eu);continue}if(eu>=55296&&eu<=57343){J+=U(en.UTF16_SURROGATE,J-1-eo,O,$,eu);continue}if(eu<=ea){J+=U(en.OVERLONG,J-1-eo,O,$,eu);continue}$.push(eu)}}return $}function toUtf8Bytes(O,U=J.current){U!=J.current&&(eu.checkNormalize(),O=O.normalize(U));let $=[];for(let U=0;U>6|192),$.push(63&J|128);else if((64512&J)==55296){U++;let en=O.charCodeAt(U);if(U>=O.length||(64512&en)!=56320)throw Error("invalid utf-8 string");let es=65536+((1023&J)<<10)+(1023&en);$.push(es>>18|240),$.push(es>>12&63|128),$.push(es>>6&63|128),$.push(63&es|128)}else $.push(J>>12|224),$.push(J>>6&63|128),$.push(63&J|128)}return(0,es.lE)($)}function _toUtf8String(O){return O.map(O=>O<=65535?String.fromCharCode(O):String.fromCharCode(((O-=65536)>>10&1023)+55296,(1023&O)+56320)).join("")}function toUtf8String(O,U){return _toUtf8String(getUtf8CodePoints(O,U))}function toUtf8CodePoints(O,U=J.current){return getUtf8CodePoints(toUtf8Bytes(O,U))}},2501:function(O,U,$){"use strict";$.d(U,{z7:function(){return accessListify},Qc:function(){return parse}});var J,en=$(8994),es=$(2278),eo=$(7273),ea=$(3690),eu=$(4184),ef=$(7054),eg=$(6662),ev=$.n(eg),e_=$(5336),ew=$.n(e_);function createCommonjsModule(O,U,$){return O($={path:U,exports:{},require:function(O,U){return commonjsRequire(O,null==U?$.path:U)}},$.exports),$.exports}function commonjsRequire(){throw Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==$.g?$.g:"undefined"!=typeof self&&self;var eE=assert;function assert(O,U){if(!O)throw Error(U||"Assertion failed")}assert.equal=function(O,U,$){if(O!=U)throw Error($||"Assertion failed: "+O+" != "+U)};var eS=createCommonjsModule(function(O,U){var $=U;function toArray(O,U){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if("string"!=typeof O){for(var J=0;J>8,eo=255&en;es?$.push(es,eo):$.push(eo)}return $}function zero2(O){return 1===O.length?"0"+O:O}function toHex(O){for(var U="",$=0;$(en>>1)-1?(en>>1)-eu:eu,es.isubn(ea)):ea=0,J[eo]=ea,es.iushrn(1)}return J}function getJSF(O,U){var $=[[],[]];O=O.clone(),U=U.clone();for(var J=0,en=0;O.cmpn(-J)>0||U.cmpn(-en)>0;){var es,eo,ea,eu=O.andln(3)+J&3,ef=U.andln(3)+en&3;3===eu&&(eu=-1),3===ef&&(ef=-1),eo=(1&eu)==0?0:(3==(es=O.andln(7)+J&7)||5===es)&&2===ef?-eu:eu,$[0].push(eo),ea=(1&ef)==0?0:(3==(es=U.andln(7)+en&7)||5===es)&&2===eu?-ef:ef,$[1].push(ea),2*J===eo+1&&(J=1-J),2*en===ea+1&&(en=1-en),O.iushrn(1),U.iushrn(1)}return $}function cachedProperty(O,U,$){var J="_"+U;O.prototype[U]=function(){return void 0!==this[J]?this[J]:this[J]=$.call(this)}}function parseBytes(O){return"string"==typeof O?$.toArray(O,"hex"):O}function intFromLE(O){return new(ev())(O,"hex","le")}$.assert=eE,$.toArray=eS.toArray,$.zero2=eS.zero2,$.toHex=eS.toHex,$.encode=eS.encode,$.getNAF=getNAF,$.getJSF=getJSF,$.cachedProperty=cachedProperty,$.parseBytes=parseBytes,$.intFromLE=intFromLE}),eI=eA.getNAF,eP=eA.getJSF,ek=eA.assert;function BaseCurve(O,U){this.type=O,this.p=new(ev())(U.p,16),this.red=U.prime?ev().red(U.prime):ev().mont(this.p),this.zero=new(ev())(0).toRed(this.red),this.one=new(ev())(1).toRed(this.red),this.two=new(ev())(2).toRed(this.red),this.n=U.n&&new(ev())(U.n,16),this.g=U.g&&this.pointFromJSON(U.g,U.gRed),this._wnafT1=[,,,,],this._wnafT2=[,,,,],this._wnafT3=[,,,,],this._wnafT4=[,,,,],this._bitLength=this.n?this.n.bitLength():0;var $=this.n&&this.p.div(this.n);!$||$.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var eT=BaseCurve;function BasePoint(O,U){this.curve=O,this.type=U,this.precomputed=null}BaseCurve.prototype.point=function(){throw Error("Not implemented")},BaseCurve.prototype.validate=function(){throw Error("Not implemented")},BaseCurve.prototype._fixedNafMul=function(O,U){ek(O.precomputed);var $,J,en=O._getDoubles(),es=eI(U,1,this._bitLength),eo=(1<=$;eu--)J=(J<<1)+es[eu];ea.push(J)}for(var ef=this.jpoint(null,null,null),eg=this.jpoint(null,null,null),ev=eo;ev>0;ev--){for($=0;$=0;ea--){for(var eu=0;ea>=0&&0===es[ea];ea--)eu++;if(ea>=0&&eu++,eo=eo.dblp(eu),ea<0)break;var ef=es[ea];ek(0!==ef),eo="affine"===O.type?ef>0?eo.mixedAdd(en[ef-1>>1]):eo.mixedAdd(en[-ef-1>>1].neg()):ef>0?eo.add(en[ef-1>>1]):eo.add(en[-ef-1>>1].neg())}return"affine"===O.type?eo.toP():eo},BaseCurve.prototype._wnafMulAdd=function(O,U,$,J,en){var es,eo,ea,eu=this._wnafT1,ef=this._wnafT2,eg=this._wnafT3,ev=0;for(es=0;es=1;es-=2){var ew=es-1,eE=es;if(1!==eu[ew]||1!==eu[eE]){eg[ew]=eI($[ew],eu[ew],this._bitLength),eg[eE]=eI($[eE],eu[eE],this._bitLength),ev=Math.max(eg[ew].length,ev),ev=Math.max(eg[eE].length,ev);continue}var eS=[U[ew],null,null,U[eE]];0===U[ew].y.cmp(U[eE].y)?(eS[1]=U[ew].add(U[eE]),eS[2]=U[ew].toJ().mixedAdd(U[eE].neg())):0===U[ew].y.cmp(U[eE].y.redNeg())?(eS[1]=U[ew].toJ().mixedAdd(U[eE]),eS[2]=U[ew].add(U[eE].neg())):(eS[1]=U[ew].toJ().mixedAdd(U[eE]),eS[2]=U[ew].toJ().mixedAdd(U[eE].neg()));var eA=[-3,-1,-5,-7,0,7,5,1,3],ek=eP($[ew],$[eE]);for(eo=0,ev=Math.max(ek[0].length,ev),eg[ew]=Array(ev),eg[eE]=Array(ev);eo=0;es--){for(var eN=0;es>=0;){var eD=!0;for(eo=0;eo=0&&eN++,eC=eC.dblp(eN),es<0)break;for(eo=0;eo0?ea=ef[eo][eM-1>>1]:eM<0&&(ea=ef[eo][-eM-1>>1].neg()),eC="affine"===ea.type?eC.mixedAdd(ea):eC.add(ea))}}for(es=0;es=Math.ceil((O.bitLength()+1)/U.step)},BasePoint.prototype._getDoubles=function(O,U){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var $=[this],J=this,en=0;enen[0].cmp(en[1])?en[0]:en[1]).toRed(this.red)}if(O.lambda)$=new(ev())(O.lambda,16);else{var es=this._getEndoRoots(this.n);0===this.g.mul(es[0]).x.cmp(this.g.x.redMul(U))?$=es[0]:($=es[1],eC(0===this.g.mul($).x.cmp(this.g.x.redMul(U))))}return J=O.basis?O.basis.map(function(O){return{a:new(ev())(O.a,16),b:new(ev())(O.b,16)}}):this._getEndoBasis($),{beta:U,lambda:$,basis:J}}},ShortCurve.prototype._getEndoRoots=function(O){var U=O===this.p?this.red:ev().mont(O),$=new(ev())(2).toRed(U).redInvm(),J=$.redNeg(),en=new(ev())(3).toRed(U).redNeg().redSqrt().redMul($);return[J.redAdd(en).fromRed(),J.redSub(en).fromRed()]},ShortCurve.prototype._getEndoBasis=function(O){for(var U,$,J,en,es,eo,ea,eu,ef,eg=this.n.ushrn(Math.floor(this.n.bitLength()/2)),e_=O,ew=this.n.clone(),eE=new(ev())(1),eS=new(ev())(0),eA=new(ev())(0),eI=new(ev())(1),eP=0;0!==e_.cmpn(0);){var ek=ew.div(e_);eu=ew.sub(ek.mul(e_)),ef=eA.sub(ek.mul(eE));var eT=eI.sub(ek.mul(eS));if(!J&&0>eu.cmp(eg))U=ea.neg(),$=eE,J=eu.neg(),en=ef;else if(J&&2==++eP)break;ea=eu,ew=e_,e_=eu,eA=eE,eE=ef,eI=eS,eS=eT}es=eu.neg(),eo=ef;var eR=J.sqr().add(en.sqr());return es.sqr().add(eo.sqr()).cmp(eR)>=0&&(es=U,eo=$),J.negative&&(J=J.neg(),en=en.neg()),es.negative&&(es=es.neg(),eo=eo.neg()),[{a:J,b:en},{a:es,b:eo}]},ShortCurve.prototype._endoSplit=function(O){var U=this.endo.basis,$=U[0],J=U[1],en=J.b.mul(O).divRound(this.n),es=$.b.neg().mul(O).divRound(this.n),eo=en.mul($.a),ea=es.mul(J.a),eu=en.mul($.b),ef=es.mul(J.b);return{k1:O.sub(eo).sub(ea),k2:eu.add(ef).neg()}},ShortCurve.prototype.pointFromX=function(O,U){(O=new(ev())(O,16)).red||(O=O.toRed(this.red));var $=O.redSqr().redMul(O).redIAdd(O.redMul(this.a)).redIAdd(this.b),J=$.redSqrt();if(0!==J.redSqr().redSub($).cmp(this.zero))throw Error("invalid point");var en=J.fromRed().isOdd();return(U&&!en||!U&&en)&&(J=J.redNeg()),this.point(O,J)},ShortCurve.prototype.validate=function(O){if(O.inf)return!0;var U=O.x,$=O.y,J=this.a.redMul(U),en=U.redSqr().redMul(U).redIAdd(J).redIAdd(this.b);return 0===$.redSqr().redISub(en).cmpn(0)},ShortCurve.prototype._endoWnafMulAdd=function(O,U,$){for(var J=this._endoWnafT1,en=this._endoWnafT2,es=0;es":""},Point.prototype.isInfinity=function(){return this.inf},Point.prototype.add=function(O){if(this.inf)return O;if(O.inf)return this;if(this.eq(O))return this.dbl();if(this.neg().eq(O)||0===this.x.cmp(O.x))return this.curve.point(null,null);var U=this.y.redSub(O.y);0!==U.cmpn(0)&&(U=U.redMul(this.x.redSub(O.x).redInvm()));var $=U.redSqr().redISub(this.x).redISub(O.x),J=U.redMul(this.x.redSub($)).redISub(this.y);return this.curve.point($,J)},Point.prototype.dbl=function(){if(this.inf)return this;var O=this.y.redAdd(this.y);if(0===O.cmpn(0))return this.curve.point(null,null);var U=this.curve.a,$=this.x.redSqr(),J=O.redInvm(),en=$.redAdd($).redIAdd($).redIAdd(U).redMul(J),es=en.redSqr().redISub(this.x.redAdd(this.x)),eo=en.redMul(this.x.redSub(es)).redISub(this.y);return this.curve.point(es,eo)},Point.prototype.getX=function(){return this.x.fromRed()},Point.prototype.getY=function(){return this.y.fromRed()},Point.prototype.mul=function(O){return(O=new(ev())(O,16),this.isInfinity())?this:this._hasDoubles(O)?this.curve._fixedNafMul(this,O):this.curve.endo?this.curve._endoWnafMulAdd([this],[O]):this.curve._wnafMul(this,O)},Point.prototype.mulAdd=function(O,U,$){var J=[this,U],en=[O,$];return this.curve.endo?this.curve._endoWnafMulAdd(J,en):this.curve._wnafMulAdd(1,J,en,2)},Point.prototype.jmulAdd=function(O,U,$){var J=[this,U],en=[O,$];return this.curve.endo?this.curve._endoWnafMulAdd(J,en,!0):this.curve._wnafMulAdd(1,J,en,2,!0)},Point.prototype.eq=function(O){return this===O||this.inf===O.inf&&(this.inf||0===this.x.cmp(O.x)&&0===this.y.cmp(O.y))},Point.prototype.neg=function(O){if(this.inf)return this;var U=this.curve.point(this.x,this.y.redNeg());if(O&&this.precomputed){var $=this.precomputed,negate=function(O){return O.neg()};U.precomputed={naf:$.naf&&{wnd:$.naf.wnd,points:$.naf.points.map(negate)},doubles:$.doubles&&{step:$.doubles.step,points:$.doubles.points.map(negate)}}}return U},Point.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},eR(JPoint,eT.BasePoint),ShortCurve.prototype.jpoint=function(O,U,$){return new JPoint(this,O,U,$)},JPoint.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var O=this.z.redInvm(),U=O.redSqr(),$=this.x.redMul(U),J=this.y.redMul(U).redMul(O);return this.curve.point($,J)},JPoint.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},JPoint.prototype.add=function(O){if(this.isInfinity())return O;if(O.isInfinity())return this;var U=O.z.redSqr(),$=this.z.redSqr(),J=this.x.redMul(U),en=O.x.redMul($),es=this.y.redMul(U.redMul(O.z)),eo=O.y.redMul($.redMul(this.z)),ea=J.redSub(en),eu=es.redSub(eo);if(0===ea.cmpn(0))return 0!==eu.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var ef=ea.redSqr(),eg=ef.redMul(ea),ev=J.redMul(ef),e_=eu.redSqr().redIAdd(eg).redISub(ev).redISub(ev),ew=eu.redMul(ev.redISub(e_)).redISub(es.redMul(eg)),eE=this.z.redMul(O.z).redMul(ea);return this.curve.jpoint(e_,ew,eE)},JPoint.prototype.mixedAdd=function(O){if(this.isInfinity())return O.toJ();if(O.isInfinity())return this;var U=this.z.redSqr(),$=this.x,J=O.x.redMul(U),en=this.y,es=O.y.redMul(U).redMul(this.z),eo=$.redSub(J),ea=en.redSub(es);if(0===eo.cmpn(0))return 0!==ea.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var eu=eo.redSqr(),ef=eu.redMul(eo),eg=$.redMul(eu),ev=ea.redSqr().redIAdd(ef).redISub(eg).redISub(eg),e_=ea.redMul(eg.redISub(ev)).redISub(en.redMul(ef)),ew=this.z.redMul(eo);return this.curve.jpoint(ev,e_,ew)},JPoint.prototype.dblp=function(O){if(0===O||this.isInfinity())return this;if(!O)return this.dbl();if(this.curve.zeroA||this.curve.threeA){var U,$=this;for(U=0;U=0)return!1;if($.redIAdd(en),0===this.x.cmp($))return!0}},JPoint.prototype.inspect=function(){return this.isInfinity()?"":""},JPoint.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var eN=createCommonjsModule(function(O,U){var $=U;$.base=eT,$.short=eB,$.mont=null,$.edwards=null}),eD=createCommonjsModule(function(O,U){var $,J=U,en=eA.assert;function PresetCurve(O){"short"===O.type?this.curve=new eN.short(O):"edwards"===O.type?this.curve=new eN.edwards(O):this.curve=new eN.mont(O),this.g=this.curve.g,this.n=this.curve.n,this.hash=O.hash,en(this.g.validate(),"Invalid curve"),en(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function defineCurve(O,U){Object.defineProperty(J,O,{configurable:!0,enumerable:!0,get:function(){var $=new PresetCurve(U);return Object.defineProperty(J,O,{configurable:!0,enumerable:!0,value:$}),$}})}J.PresetCurve=PresetCurve,defineCurve("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:ew().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),defineCurve("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:ew().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),defineCurve("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:ew().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),defineCurve("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:ew().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"]}),defineCurve("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:ew().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"]}),defineCurve("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:ew().sha256,gRed:!1,g:["9"]}),defineCurve("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:ew().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{$=null.crash()}catch(O){$=void 0}defineCurve("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:ew().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",$]})});function HmacDRBG(O){if(!(this instanceof HmacDRBG))return new HmacDRBG(O);this.hash=O.hash,this.predResist=!!O.predResist,this.outLen=this.hash.outSize,this.minEntropy=O.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var U=eS.toArray(O.entropy,O.entropyEnc||"hex"),$=eS.toArray(O.nonce,O.nonceEnc||"hex"),J=eS.toArray(O.pers,O.persEnc||"hex");eE(U.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(U,$,J)}var eM=HmacDRBG;HmacDRBG.prototype._init=function(O,U,$){var J=O.concat(U).concat($);this.K=Array(this.outLen/8),this.V=Array(this.outLen/8);for(var en=0;en=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(O.concat($||[])),this._reseed=1},HmacDRBG.prototype.generate=function(O,U,$,J){if(this._reseed>this.reseedInterval)throw Error("Reseed is required");"string"!=typeof U&&(J=$,$=U,U=null),$&&($=eS.toArray($,J||"hex"),this._update($));for(var en=[];en.length"};var eU=eA.assert;function Signature(O,U){if(O instanceof Signature)return O;this._importDER(O,U)||(eU(O.r&&O.s,"Signature without r or s"),this.r=new(ev())(O.r,16),this.s=new(ev())(O.s,16),void 0===O.recoveryParam?this.recoveryParam=null:this.recoveryParam=O.recoveryParam)}var eF=Signature;function Position(){this.place=0}function getLength(O,U){var $=O[U.place++];if(!(128&$))return $;var J=15&$;if(0===J||J>4)return!1;for(var en=0,es=0,eo=U.place;es>>=0;return!(en<=127)&&(U.place=eo,en)}function rmPadding(O){for(var U=0,$=O.length-1;!O[U]&&!(128&O[U+1])&&U<$;)U++;return 0===U?O:O.slice(U)}function constructLength(O,U){if(U<128){O.push(U);return}var $=1+(Math.log(U)/Math.LN2>>>3);for(O.push(128|$);--$;)O.push(U>>>($<<3)&255);O.push(U)}Signature.prototype._importDER=function(O,U){O=eA.toArray(O,U);var $=new Position;if(48!==O[$.place++])return!1;var J=getLength(O,$);if(!1===J||J+$.place!==O.length||2!==O[$.place++])return!1;var en=getLength(O,$);if(!1===en)return!1;var es=O.slice($.place,en+$.place);if($.place+=en,2!==O[$.place++])return!1;var eo=getLength(O,$);if(!1===eo||O.length!==eo+$.place)return!1;var ea=O.slice($.place,eo+$.place);if(0===es[0]){if(!(128&es[1]))return!1;es=es.slice(1)}if(0===ea[0]){if(!(128&ea[1]))return!1;ea=ea.slice(1)}return this.r=new(ev())(es),this.s=new(ev())(ea),this.recoveryParam=null,!0},Signature.prototype.toDER=function(O){var U=this.r.toArray(),$=this.s.toArray();for(128&U[0]&&(U=[0].concat(U)),128&$[0]&&($=[0].concat($)),U=rmPadding(U),$=rmPadding($);!$[0]&&!(128&$[1]);)$=$.slice(1);var J=[2];constructLength(J,U.length),(J=J.concat(U)).push(2),constructLength(J,$.length);var en=J.concat($),es=[48];return constructLength(es,en.length),es=es.concat(en),eA.encode(es,O)};var rand=function(){throw Error("unsupported")},eK=eA.assert;function EC(O){if(!(this instanceof EC))return new EC(O);"string"==typeof O&&(eK(Object.prototype.hasOwnProperty.call(eD,O),"Unknown curve "+O),O=eD[O]),O instanceof eD.PresetCurve&&(O={curve:O}),this.curve=O.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=O.curve.g,this.g.precompute(O.curve.n.bitLength()+1),this.hash=O.hash||O.curve.hash}var ej=EC;EC.prototype.keyPair=function(O){return new eL(this,O)},EC.prototype.keyFromPrivate=function(O,U){return eL.fromPrivate(this,O,U)},EC.prototype.keyFromPublic=function(O,U){return eL.fromPublic(this,O,U)},EC.prototype.genKeyPair=function(O){O||(O={});for(var U=new eM({hash:this.hash,pers:O.pers,persEnc:O.persEnc||"utf8",entropy:O.entropy||rand(this.hash.hmacStrength),entropyEnc:O.entropy&&O.entropyEnc||"utf8",nonce:this.n.toArray()}),$=this.n.byteLength(),J=this.n.sub(new(ev())(2));;){var en=new(ev())(U.generate($));if(!(en.cmp(J)>0))return en.iaddn(1),this.keyFromPrivate(en)}},EC.prototype._truncateToN=function(O,U){var $=8*O.byteLength()-this.n.bitLength();return($>0&&(O=O.ushrn($)),!U&&O.cmp(this.n)>=0)?O.sub(this.n):O},EC.prototype.sign=function(O,U,$,J){"object"==typeof $&&(J=$,$=null),J||(J={}),U=this.keyFromPrivate(U,$),O=this._truncateToN(new(ev())(O,16));for(var en=this.n.byteLength(),es=U.getPrivate().toArray("be",en),eo=O.toArray("be",en),ea=new eM({hash:this.hash,entropy:es,nonce:eo,pers:J.pers,persEnc:J.persEnc||"utf8"}),eu=this.n.sub(new(ev())(1)),ef=0;;ef++){var eg=J.k?J.k(ef):new(ev())(ea.generate(this.n.byteLength()));if(!(0>=(eg=this._truncateToN(eg,!0)).cmpn(1)||eg.cmp(eu)>=0)){var e_=this.g.mul(eg);if(!e_.isInfinity()){var ew=e_.getX(),eE=ew.umod(this.n);if(0!==eE.cmpn(0)){var eS=eg.invm(this.n).mul(eE.mul(U.getPrivate()).iadd(O));if(0!==(eS=eS.umod(this.n)).cmpn(0)){var eA=(e_.getY().isOdd()?1:0)|(0!==ew.cmp(eE)?2:0);return J.canonical&&eS.cmp(this.nh)>0&&(eS=this.n.sub(eS),eA^=1),new eF({r:eE,s:eS,recoveryParam:eA})}}}}}},EC.prototype.verify=function(O,U,$,J){O=this._truncateToN(new(ev())(O,16)),$=this.keyFromPublic($,J);var en,es=(U=new eF(U,"hex")).r,eo=U.s;if(0>es.cmpn(1)||es.cmp(this.n)>=0||0>eo.cmpn(1)||eo.cmp(this.n)>=0)return!1;var ea=eo.invm(this.n),eu=ea.mul(O).umod(this.n),ef=ea.mul(es).umod(this.n);return this.curve._maxwellTrick?!(en=this.g.jmulAdd(eu,$.getPublic(),ef)).isInfinity()&&en.eqXToP(es):!(en=this.g.mulAdd(eu,$.getPublic(),ef)).isInfinity()&&0===en.getX().umod(this.n).cmp(es)},EC.prototype.recoverPubKey=function(O,U,$,J){eK((3&$)===$,"The recovery param is more than two bits"),U=new eF(U,J);var en=this.n,es=new(ev())(O),eo=U.r,ea=U.s,eu=1&$,ef=$>>1;if(eo.cmp(this.curve.p.umod(this.curve.n))>=0&&ef)throw Error("Unable to find sencond key candinate");eo=ef?this.curve.pointFromX(eo.add(this.curve.n),eu):this.curve.pointFromX(eo,eu);var eg=U.r.invm(en),e_=en.sub(es).mul(eg).umod(en),ew=ea.mul(eg).umod(en);return this.g.mulAdd(e_,eo,ew)},EC.prototype.getKeyRecoveryParam=function(O,U,$,J){if(null!==(U=new eF(U,J)).recoveryParam)return U.recoveryParam;for(var en,es=0;es<4;es++){try{en=this.recoverPubKey(O,U,es)}catch(O){continue}if(en.eq($))return es}throw Error("Unable to find valid recovery factor")};var eH=createCommonjsModule(function(O,U){var $=U;$.version="6.5.4",$.utils=eA,$.rand=function(){throw Error("unsupported")},$.curve=eN,$.curves=eD,$.ec=ej,$.eddsa=null}).ec,eq=$(7213),eV=$(6288);let eG="signing-key/5.7.0",e$=new eV.Yd(eG),eW=null;function getCurve(){return eW||(eW=new eH("secp256k1")),eW}let SigningKey=class SigningKey{constructor(O){(0,eq.zG)(this,"curve","secp256k1"),(0,eq.zG)(this,"privateKey",(0,eo.Dv)(O)),32!==(0,eo.E1)(this.privateKey)&&e$.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey));(0,eq.zG)(this,"publicKey","0x"+U.getPublic(!1,"hex")),(0,eq.zG)(this,"compressedPublicKey","0x"+U.getPublic(!0,"hex")),(0,eq.zG)(this,"_isSigningKey",!0)}_addPoint(O){let U=getCurve().keyFromPublic((0,eo.lE)(this.publicKey)),$=getCurve().keyFromPublic((0,eo.lE)(O));return"0x"+U.pub.add($.pub).encodeCompressed("hex")}signDigest(O){let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey)),$=(0,eo.lE)(O);32!==$.length&&e$.throwArgumentError("bad digest length","digest",O);let J=U.sign($,{canonical:!0});return(0,eo.N)({recoveryParam:J.recoveryParam,r:(0,eo.$m)("0x"+J.r.toString(16),32),s:(0,eo.$m)("0x"+J.s.toString(16),32)})}computeSharedSecret(O){let U=getCurve().keyFromPrivate((0,eo.lE)(this.privateKey)),$=getCurve().keyFromPublic((0,eo.lE)(computePublicKey(O)));return(0,eo.$m)("0x"+U.derive($.getPublic()).toString(16),32)}static isSigningKey(O){return!!(O&&O._isSigningKey)}};function recoverPublicKey(O,U){let $=(0,eo.N)(U),J={r:(0,eo.lE)($.r),s:(0,eo.lE)($.s)};return"0x"+getCurve().recoverPubKey((0,eo.lE)(O),J,$.recoveryParam).encode("hex",!1)}function computePublicKey(O,U){let $=(0,eo.lE)(O);if(32===$.length){let O=new SigningKey($);return U?"0x"+getCurve().keyFromPrivate($).getPublic(!0,"hex"):O.publicKey}return 33===$.length?U?(0,eo.Dv)($):"0x"+getCurve().keyFromPublic($).getPublic(!1,"hex"):65===$.length?U?"0x"+getCurve().keyFromPublic($).getPublic(!0,"hex"):(0,eo.Dv)($):e$.throwArgumentError("invalid public or private key","key","[REDACTED]")}let eY="transactions/5.7.0",eJ=new eV.Yd(eY);function handleAddress(O){return"0x"===O?null:(0,en.Kn)(O)}function handleNumber(O){return"0x"===O?ea._Y:es.O$.from(O)}function computeAddress(O){let U=computePublicKey(O);return(0,en.Kn)((0,eo.p3)((0,eu.w)((0,eo.p3)(U,1)),12))}function recoverAddress(O,U){return computeAddress(recoverPublicKey((0,eo.lE)(O),U))}function formatNumber(O,U){let $=(0,eo.G1)(es.O$.from(O).toHexString());return $.length>32&&eJ.throwArgumentError("invalid length for "+U,"transaction:"+U,O),$}function accessSetify(O,U){return{address:(0,en.Kn)(O),storageKeys:(U||[]).map((U,$)=>(32!==(0,eo.E1)(U)&&eJ.throwArgumentError("invalid access list storageKey",`accessList[${O}:${$}]`,U),U.toLowerCase()))}}function accessListify(O){if(Array.isArray(O))return O.map((O,U)=>Array.isArray(O)?(O.length>2&&eJ.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${U}]`,O),accessSetify(O[0],O[1])):accessSetify(O.address,O.storageKeys));let U=Object.keys(O).map(U=>{let $=O[U].reduce((O,U)=>(O[U]=!0,O),{});return accessSetify(U,Object.keys($).sort())});return U.sort((O,U)=>O.address.localeCompare(U.address)),U}function formatAccessList(O){return accessListify(O).map(O=>[O.address,O.storageKeys])}function _serializeEip1559(O,U){if(null!=O.gasPrice){let U=es.O$.from(O.gasPrice),$=es.O$.from(O.maxFeePerGas||0);U.eq($)||eJ.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:U,maxFeePerGas:$})}let $=[formatNumber(O.chainId||0,"chainId"),formatNumber(O.nonce||0,"nonce"),formatNumber(O.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),formatNumber(O.maxFeePerGas||0,"maxFeePerGas"),formatNumber(O.gasLimit||0,"gasLimit"),null!=O.to?(0,en.Kn)(O.to):"0x",formatNumber(O.value||0,"value"),O.data||"0x",formatAccessList(O.accessList||[])];if(U){let O=(0,eo.N)(U);$.push(formatNumber(O.recoveryParam,"recoveryParam")),$.push((0,eo.G1)(O.r)),$.push((0,eo.G1)(O.s))}return(0,eo.xs)(["0x02",ef.c($)])}function _serializeEip2930(O,U){let $=[formatNumber(O.chainId||0,"chainId"),formatNumber(O.nonce||0,"nonce"),formatNumber(O.gasPrice||0,"gasPrice"),formatNumber(O.gasLimit||0,"gasLimit"),null!=O.to?(0,en.Kn)(O.to):"0x",formatNumber(O.value||0,"value"),O.data||"0x",formatAccessList(O.accessList||[])];if(U){let O=(0,eo.N)(U);$.push(formatNumber(O.recoveryParam,"recoveryParam")),$.push((0,eo.G1)(O.r)),$.push((0,eo.G1)(O.s))}return(0,eo.xs)(["0x01",ef.c($)])}function _parseEipSignature(O,U,$){try{let $=handleNumber(U[0]).toNumber();if(0!==$&&1!==$)throw Error("bad recid");O.v=$}catch(O){eJ.throwArgumentError("invalid v for transaction type: 1","v",U[0])}O.r=(0,eo.$m)(U[1],32),O.s=(0,eo.$m)(U[2],32);try{let U=(0,eu.w)($(O));O.from=recoverAddress(U,{r:O.r,s:O.s,recoveryParam:O.v})}catch(O){}}function _parseEip1559(O){let U=ef.J(O.slice(1));9!==U.length&&12!==U.length&&eJ.throwArgumentError("invalid component count for transaction type: 2","payload",(0,eo.Dv)(O));let $=handleNumber(U[2]),J=handleNumber(U[3]),en={type:2,chainId:handleNumber(U[0]).toNumber(),nonce:handleNumber(U[1]).toNumber(),maxPriorityFeePerGas:$,maxFeePerGas:J,gasPrice:null,gasLimit:handleNumber(U[4]),to:handleAddress(U[5]),value:handleNumber(U[6]),data:U[7],accessList:accessListify(U[8])};return 9===U.length||(en.hash=(0,eu.w)(O),_parseEipSignature(en,U.slice(9),_serializeEip1559)),en}function _parseEip2930(O){let U=ef.J(O.slice(1));8!==U.length&&11!==U.length&&eJ.throwArgumentError("invalid component count for transaction type: 1","payload",(0,eo.Dv)(O));let $={type:1,chainId:handleNumber(U[0]).toNumber(),nonce:handleNumber(U[1]).toNumber(),gasPrice:handleNumber(U[2]),gasLimit:handleNumber(U[3]),to:handleAddress(U[4]),value:handleNumber(U[5]),data:U[6],accessList:accessListify(U[7])};return 8===U.length||($.hash=(0,eu.w)(O),_parseEipSignature($,U.slice(8),_serializeEip2930)),$}function _parse(O){let U=ef.J(O);9!==U.length&&6!==U.length&&eJ.throwArgumentError("invalid raw transaction","rawTransaction",O);let $={nonce:handleNumber(U[0]).toNumber(),gasPrice:handleNumber(U[1]),gasLimit:handleNumber(U[2]),to:handleAddress(U[3]),value:handleNumber(U[4]),data:U[5],chainId:0};if(6===U.length)return $;try{$.v=es.O$.from(U[6]).toNumber()}catch(O){return $}if($.r=(0,eo.$m)(U[7],32),$.s=(0,eo.$m)(U[8],32),es.O$.from($.r).isZero()&&es.O$.from($.s).isZero())$.chainId=$.v,$.v=0;else{$.chainId=Math.floor(($.v-35)/2),$.chainId<0&&($.chainId=0);let J=$.v-27,en=U.slice(0,6);0!==$.chainId&&(en.push((0,eo.Dv)($.chainId)),en.push("0x"),en.push("0x"),J-=2*$.chainId+8);let es=(0,eu.w)(ef.c(en));try{$.from=recoverAddress(es,{r:(0,eo.Dv)($.r),s:(0,eo.Dv)($.s),recoveryParam:J})}catch(O){}$.hash=(0,eu.w)(O)}return $.type=null,$}function parse(O){let U=(0,eo.lE)(O);if(U[0]>127)return _parse(U);switch(U[0]){case 1:return _parseEip2930(U);case 2:return _parseEip1559(U)}return eJ.throwError(`unsupported transaction type: ${U[0]}`,eV.Yd.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:U[0]})}!function(O){O[O.legacy=0]="legacy",O[O.eip2930=1]="eip2930",O[O.eip1559=2]="eip1559"}(J||(J={}))},2790:function(O){"use strict";function asPromise(O,U){for(var $=Array(arguments.length-1),J=0,en=2,es=!0;en1&&"="===O.charAt(U);)++$;return Math.ceil(3*O.length)/4-$};for(var J=Array(64),en=Array(123),es=0;es<64;)en[J[es]=es<26?es+65:es<52?es+71:es<62?es-4:es-59|43]=es++;$.encode=function(O,U,$){for(var en,es=null,eo=[],ea=0,eu=0;U<$;){var ef=O[U++];switch(eu){case 0:eo[ea++]=J[ef>>2],en=(3&ef)<<4,eu=1;break;case 1:eo[ea++]=J[en|ef>>4],en=(15&ef)<<2,eu=2;break;case 2:eo[ea++]=J[en|ef>>6],eo[ea++]=J[63&ef],eu=0}ea>8191&&((es||(es=[])).push(String.fromCharCode.apply(String,eo)),ea=0)}return(eu&&(eo[ea++]=J[en],eo[ea++]=61,1===eu&&(eo[ea++]=61)),es)?(ea&&es.push(String.fromCharCode.apply(String,eo.slice(0,ea))),es.join("")):String.fromCharCode.apply(String,eo.slice(0,ea))};var eo="invalid encoding";$.decode=function(O,U,$){for(var J,es=$,ea=0,eu=0;eu1)break;if(void 0===(ef=en[ef]))throw Error(eo);switch(ea){case 0:J=ef,ea=1;break;case 1:U[$++]=J<<2|(48&ef)>>4,J=ef,ea=2;break;case 2:U[$++]=(15&J)<<4|(60&ef)>>2,J=ef,ea=3;break;case 3:U[$++]=(3&J)<<6|ef,ea=0}}if(1===ea)throw Error(eo);return $-es},$.test=function(O){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(O)}},8919:function(O){"use strict";function codegen(O,U){"string"==typeof O&&(U=O,O=void 0);var $=[];function Codegen(O){if("string"!=typeof O){var U=toString();if(codegen.verbose&&console.log("codegen: "+U),U="return "+U,O){for(var J=Object.keys(O),en=Array(J.length+1),es=Array(J.length),eo=0;eo0?0:2147483648,$,J);else if(isNaN(U))O(2143289344,$,J);else if(U>34028234663852886e22)O((en<<31|2139095040)>>>0,$,J);else if(U<11754943508222875e-54)O((en<<31|Math.round(U/1401298464324817e-60))>>>0,$,J);else{var es=Math.floor(Math.log(U)/Math.LN2),eo=8388607&Math.round(U*Math.pow(2,-es)*8388608);O((en<<31|es+127<<23|eo)>>>0,$,J)}}function readFloat_ieee754(O,U,$){var J=O(U,$),en=(J>>31)*2+1,es=J>>>23&255,eo=8388607&J;return 255===es?eo?NaN:en*(1/0):0===es?1401298464324817e-60*en*eo:en*Math.pow(2,es-150)*(eo+8388608)}O.writeFloatLE=writeFloat_ieee754.bind(null,writeUintLE),O.writeFloatBE=writeFloat_ieee754.bind(null,writeUintBE),O.readFloatLE=readFloat_ieee754.bind(null,readUintLE),O.readFloatBE=readFloat_ieee754.bind(null,readUintBE)}(),"undefined"!=typeof Float64Array?function(){var U=new Float64Array([-0]),$=new Uint8Array(U.buffer),J=128===$[7];function writeDouble_f64_cpy(O,J,en){U[0]=O,J[en]=$[0],J[en+1]=$[1],J[en+2]=$[2],J[en+3]=$[3],J[en+4]=$[4],J[en+5]=$[5],J[en+6]=$[6],J[en+7]=$[7]}function writeDouble_f64_rev(O,J,en){U[0]=O,J[en]=$[7],J[en+1]=$[6],J[en+2]=$[5],J[en+3]=$[4],J[en+4]=$[3],J[en+5]=$[2],J[en+6]=$[1],J[en+7]=$[0]}function readDouble_f64_cpy(O,J){return $[0]=O[J],$[1]=O[J+1],$[2]=O[J+2],$[3]=O[J+3],$[4]=O[J+4],$[5]=O[J+5],$[6]=O[J+6],$[7]=O[J+7],U[0]}function readDouble_f64_rev(O,J){return $[7]=O[J],$[6]=O[J+1],$[5]=O[J+2],$[4]=O[J+3],$[3]=O[J+4],$[2]=O[J+5],$[1]=O[J+6],$[0]=O[J+7],U[0]}O.writeDoubleLE=J?writeDouble_f64_cpy:writeDouble_f64_rev,O.writeDoubleBE=J?writeDouble_f64_rev:writeDouble_f64_cpy,O.readDoubleLE=J?readDouble_f64_cpy:readDouble_f64_rev,O.readDoubleBE=J?readDouble_f64_rev:readDouble_f64_cpy}():function(){function writeDouble_ieee754(O,U,$,J,en,es){var eo,ea=J<0?1:0;if(ea&&(J=-J),0===J)O(0,en,es+U),O(1/J>0?0:2147483648,en,es+$);else if(isNaN(J))O(0,en,es+U),O(2146959360,en,es+$);else if(J>17976931348623157e292)O(0,en,es+U),O((ea<<31|2146435072)>>>0,en,es+$);else if(J<22250738585072014e-324)O((eo=J/5e-324)>>>0,en,es+U),O((ea<<31|eo/4294967296)>>>0,en,es+$);else{var eu=Math.floor(Math.log(J)/Math.LN2);1024===eu&&(eu=1023),O(4503599627370496*(eo=J*Math.pow(2,-eu))>>>0,en,es+U),O((ea<<31|eu+1023<<20|1048576*eo&1048575)>>>0,en,es+$)}}function readDouble_ieee754(O,U,$,J,en){var es=O(J,en+U),eo=O(J,en+$),ea=(eo>>31)*2+1,eu=eo>>>20&2047,ef=4294967296*(1048575&eo)+es;return 2047===eu?ef?NaN:ea*(1/0):0===eu?5e-324*ea*ef:ea*Math.pow(2,eu-1075)*(ef+4503599627370496)}O.writeDoubleLE=writeDouble_ieee754.bind(null,writeUintLE,0,4),O.writeDoubleBE=writeDouble_ieee754.bind(null,writeUintBE,4,0),O.readDoubleLE=readDouble_ieee754.bind(null,readUintLE,0,4),O.readDoubleBE=readDouble_ieee754.bind(null,readUintBE,4,0)}(),O}function writeUintLE(O,U,$){U[$]=255&O,U[$+1]=O>>>8&255,U[$+2]=O>>>16&255,U[$+3]=O>>>24}function writeUintBE(O,U,$){U[$]=O>>>24,U[$+1]=O>>>16&255,U[$+2]=O>>>8&255,U[$+3]=255&O}function readUintLE(O,U){return(O[U]|O[U+1]<<8|O[U+2]<<16|O[U+3]<<24)>>>0}function readUintBE(O,U){return(O[U]<<24|O[U+1]<<16|O[U+2]<<8|O[U+3])>>>0}O.exports=factory(factory)},4962:function(module){"use strict";function inquire(moduleName){try{var mod=eval("quire".replace(/^/,"re"))(moduleName);if(mod&&(mod.length||Object.keys(mod).length))return mod}catch(e){}return null}module.exports=inquire},2041:function(O,U){"use strict";var $=U,J=$.isAbsolute=function(O){return/^(?:\/|\w+:)/.test(O)},en=$.normalize=function(O){var U=(O=O.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),$=J(O),en="";$&&(en=U.shift()+"/");for(var es=0;es0&&".."!==U[es-1]?U.splice(--es,2):$?U.splice(es,1):++es:"."===U[es]?U.splice(es,1):++es;return en+U.join("/")};$.resolve=function(O,U,$){return($||(U=en(U)),J(U))?U:($||(O=en(O)),(O=O.replace(/(?:\/|^)[^/]+$/,"")).length?en(O+"/"+U):U)}},3505:function(O){"use strict";function pool(O,U,$){var J=$||8192,en=J>>>1,es=null,eo=J;return function($){if($<1||$>en)return O($);eo+$>J&&(es=O(J),eo=0);var ea=U.call(es,eo,eo+=$);return 7&eo&&(eo=(7|eo)+1),ea}}O.exports=pool},6503:function(O,U){"use strict";var $=U;$.length=function(O){for(var U=0,$=0,J=0;J191&&J<224?es[eo++]=(31&J)<<6|63&O[U++]:J>239&&J<365?(J=((7&J)<<18|(63&O[U++])<<12|(63&O[U++])<<6|63&O[U++])-65536,es[eo++]=55296+(J>>10),es[eo++]=56320+(1023&J)):es[eo++]=(15&J)<<12|(63&O[U++])<<6|63&O[U++],eo>8191&&((en||(en=[])).push(String.fromCharCode.apply(String,es)),eo=0);return en?(eo&&en.push(String.fromCharCode.apply(String,es.slice(0,eo))),en.join("")):String.fromCharCode.apply(String,es.slice(0,eo))},$.write=function(O,U,$){for(var J,en,es=$,eo=0;eo>6|192:((64512&J)==55296&&(64512&(en=O.charCodeAt(eo+1)))==56320?(J=65536+((1023&J)<<10)+(1023&en),++eo,U[$++]=J>>18|240,U[$++]=J>>12&63|128):U[$++]=J>>12|224,U[$++]=J>>6&63|128),U[$++]=63&J|128);return $-es}},9055:function(O,U,$){var J,en=$(2601);!function(){"use strict";var es="input is invalid type",eo="finalize already called",ea="object"==typeof window,eu=ea?window:{};eu.JS_SHA3_NO_WINDOW&&(ea=!1);var ef=!ea&&"object"==typeof self;!eu.JS_SHA3_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node?eu=$.g:ef&&(eu=self);for(var eg=!eu.JS_SHA3_NO_COMMON_JS&&O.exports,ev=$.amdO,e_=!eu.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ew="0123456789abcdef".split(""),eE=[31,7936,2031616,520093696],eS=[4,1024,262144,67108864],eA=[1,256,65536,16777216],eI=[6,1536,393216,100663296],eP=[0,8,16,24],ek=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],eT=[224,256,384,512],eR=[128,256],eC=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136},eN=eu.JS_SHA3_NO_NODE_JS||!Array.isArray?function(O){return"[object Array]"===Object.prototype.toString.call(O)}:Array.isArray,eD=e_&&(eu.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)?function(O){return"object"==typeof O&&O.buffer&&O.buffer.constructor===ArrayBuffer}:ArrayBuffer.isView,formatMessage=function(O){var U=typeof O;if("string"===U)return[O,!0];if("object"!==U||null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)return[new Uint8Array(O),!1];if(!eN(O)&&!eD(O))throw Error(es);return[O,!1]},empty=function(O){return 0===formatMessage(O)[0].length},createOutputMethod=function(O,U,$){return function(J){return new Keccak(O,U,O).update(J)[$]()}},createShakeOutputMethod=function(O,U,$){return function(J,en){return new Keccak(O,U,en).update(J)[$]()}},createCshakeOutputMethod=function(O,U,$){return function(U,J,en,es){return eO["cshake"+O].update(U,J,en,es)[$]()}},createKmacOutputMethod=function(O,U,$){return function(U,J,en,es){return eO["kmac"+O].update(U,J,en,es)[$]()}},createOutputMethods=function(O,U,$,J){for(var en=0;en>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=(31&$)>>3;for(var J=0;J<50;++J)this.s[J]=0}function Kmac(O,U,$){Keccak.call(this,O,U,$)}Keccak.prototype.update=function(O){if(this.finalized)throw Error(eo);var U=formatMessage(O);O=U[0];for(var $,J,en=U[1],es=this.blocks,ea=this.byteCount,eu=O.length,ef=this.blockCount,eg=0,ev=this.s;eg>2]|=J<>2]|=(192|J>>6)<=57344?es[$>>2]|=(224|J>>12)<>2]|=(240|J>>18)<>2]|=(128|J>>12&63)<>2]|=(128|J>>6&63)<>2]|=(128|63&J)<>2]|=O[eg]<=ea){for(this.start=$-ea,this.block=es[ef],$=0;$>=8,$=255&O;$>0;)en.unshift($),O>>=8,$=255&O,++J;return U?en.push(J):en.unshift(J),this.update(en),en.length},Keccak.prototype.encodeString=function(O){var U=formatMessage(O);O=U[0];var $=U[1],J=0,en=O.length;if($)for(var es=0;es=57344?J+=3:(eo=65536+((1023&eo)<<10|1023&O.charCodeAt(++es)),J+=4)}else J=en;return J+=this.encode(8*J),this.update(O),J},Keccak.prototype.bytepad=function(O,U){for(var $=this.encode(U),J=0;J>2]|=this.padding[3&U],this.lastByteIndex===this.byteCount)for(U=1,O[0]=O[$];U<$+1;++U)O[U]=0;for(O[$-1]|=2147483648,U=0;U<$;++U)J[U]^=O[U];f(J)}},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea="";eo>4&15]+ew[15&O]+ew[O>>12&15]+ew[O>>8&15]+ew[O>>20&15]+ew[O>>16&15]+ew[O>>28&15]+ew[O>>24&15];eo%U==0&&(f($),es=0)}return en&&(ea+=ew[(O=$[es])>>4&15]+ew[15&O],en>1&&(ea+=ew[O>>12&15]+ew[O>>8&15]),en>2&&(ea+=ew[O>>20&15]+ew[O>>16&15])),ea},Keccak.prototype.arrayBuffer=function(){this.finalize();var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea=this.outputBits>>3;O=new ArrayBuffer(en?J+1<<2:ea);for(var eu=new Uint32Array(O);eo>8&255,eu[O+2]=U>>16&255,eu[O+3]=U>>24&255;ea%$==0&&f(J)}return es&&(O=ea<<2,U=J[eo],eu[O]=255&U,es>1&&(eu[O+1]=U>>8&255),es>2&&(eu[O+2]=U>>16&255)),eu},Kmac.prototype=new Keccak,Kmac.prototype.finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(O){var U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS,eA,eI,eP,eT,eR,eC,eB,eN,eD,eM,eO,eL,eU,eF,eK,ej,eH,eq,eV,eG,e$,eW,eY,eJ,eQ,eZ,eX,e0,e1,e3,e6,e5,e9,e7,te,tt,tr,ta,tu,th,td,tf,tp,tg,tm,ty,tb,tv;for(J=0;J<48;J+=2)en=O[0]^O[10]^O[20]^O[30]^O[40],es=O[1]^O[11]^O[21]^O[31]^O[41],eo=O[2]^O[12]^O[22]^O[32]^O[42],ea=O[3]^O[13]^O[23]^O[33]^O[43],eu=O[4]^O[14]^O[24]^O[34]^O[44],ef=O[5]^O[15]^O[25]^O[35]^O[45],eg=O[6]^O[16]^O[26]^O[36]^O[46],ev=O[7]^O[17]^O[27]^O[37]^O[47],e_=O[8]^O[18]^O[28]^O[38]^O[48],ew=O[9]^O[19]^O[29]^O[39]^O[49],U=e_^(eo<<1|ea>>>31),$=ew^(ea<<1|eo>>>31),O[0]^=U,O[1]^=$,O[10]^=U,O[11]^=$,O[20]^=U,O[21]^=$,O[30]^=U,O[31]^=$,O[40]^=U,O[41]^=$,U=en^(eu<<1|ef>>>31),$=es^(ef<<1|eu>>>31),O[2]^=U,O[3]^=$,O[12]^=U,O[13]^=$,O[22]^=U,O[23]^=$,O[32]^=U,O[33]^=$,O[42]^=U,O[43]^=$,U=eo^(eg<<1|ev>>>31),$=ea^(ev<<1|eg>>>31),O[4]^=U,O[5]^=$,O[14]^=U,O[15]^=$,O[24]^=U,O[25]^=$,O[34]^=U,O[35]^=$,O[44]^=U,O[45]^=$,U=eu^(e_<<1|ew>>>31),$=ef^(ew<<1|e_>>>31),O[6]^=U,O[7]^=$,O[16]^=U,O[17]^=$,O[26]^=U,O[27]^=$,O[36]^=U,O[37]^=$,O[46]^=U,O[47]^=$,U=eg^(en<<1|es>>>31),$=ev^(es<<1|en>>>31),O[8]^=U,O[9]^=$,O[18]^=U,O[19]^=$,O[28]^=U,O[29]^=$,O[38]^=U,O[39]^=$,O[48]^=U,O[49]^=$,eE=O[0],eS=O[1],e6=O[11]<<4|O[10]>>>28,e5=O[10]<<4|O[11]>>>28,eU=O[20]<<3|O[21]>>>29,eF=O[21]<<3|O[20]>>>29,tm=O[31]<<9|O[30]>>>23,ty=O[30]<<9|O[31]>>>23,eX=O[40]<<18|O[41]>>>14,e0=O[41]<<18|O[40]>>>14,eV=O[2]<<1|O[3]>>>31,eG=O[3]<<1|O[2]>>>31,eA=O[13]<<12|O[12]>>>20,eI=O[12]<<12|O[13]>>>20,e9=O[22]<<10|O[23]>>>22,e7=O[23]<<10|O[22]>>>22,eK=O[33]<<13|O[32]>>>19,ej=O[32]<<13|O[33]>>>19,tb=O[42]<<2|O[43]>>>30,tv=O[43]<<2|O[42]>>>30,tu=O[5]<<30|O[4]>>>2,th=O[4]<<30|O[5]>>>2,e$=O[14]<<6|O[15]>>>26,eW=O[15]<<6|O[14]>>>26,eP=O[25]<<11|O[24]>>>21,eT=O[24]<<11|O[25]>>>21,te=O[34]<<15|O[35]>>>17,tt=O[35]<<15|O[34]>>>17,eH=O[45]<<29|O[44]>>>3,eq=O[44]<<29|O[45]>>>3,eD=O[6]<<28|O[7]>>>4,eM=O[7]<<28|O[6]>>>4,td=O[17]<<23|O[16]>>>9,tf=O[16]<<23|O[17]>>>9,eY=O[26]<<25|O[27]>>>7,eJ=O[27]<<25|O[26]>>>7,eR=O[36]<<21|O[37]>>>11,eC=O[37]<<21|O[36]>>>11,tr=O[47]<<24|O[46]>>>8,ta=O[46]<<24|O[47]>>>8,e1=O[8]<<27|O[9]>>>5,e3=O[9]<<27|O[8]>>>5,eO=O[18]<<20|O[19]>>>12,eL=O[19]<<20|O[18]>>>12,tp=O[29]<<7|O[28]>>>25,tg=O[28]<<7|O[29]>>>25,eQ=O[38]<<8|O[39]>>>24,eZ=O[39]<<8|O[38]>>>24,eB=O[48]<<14|O[49]>>>18,eN=O[49]<<14|O[48]>>>18,O[0]=eE^~eA&eP,O[1]=eS^~eI&eT,O[10]=eD^~eO&eU,O[11]=eM^~eL&eF,O[20]=eV^~e$&eY,O[21]=eG^~eW&eJ,O[30]=e1^~e6&e9,O[31]=e3^~e5&e7,O[40]=tu^~td&tp,O[41]=th^~tf&tg,O[2]=eA^~eP&eR,O[3]=eI^~eT&eC,O[12]=eO^~eU&eK,O[13]=eL^~eF&ej,O[22]=e$^~eY&eQ,O[23]=eW^~eJ&eZ,O[32]=e6^~e9&te,O[33]=e5^~e7&tt,O[42]=td^~tp&tm,O[43]=tf^~tg&ty,O[4]=eP^~eR&eB,O[5]=eT^~eC&eN,O[14]=eU^~eK&eH,O[15]=eF^~ej&eq,O[24]=eY^~eQ&eX,O[25]=eJ^~eZ&e0,O[34]=e9^~te&tr,O[35]=e7^~tt&ta,O[44]=tp^~tm&tb,O[45]=tg^~ty&tv,O[6]=eR^~eB&eE,O[7]=eC^~eN&eS,O[16]=eK^~eH&eD,O[17]=ej^~eq&eM,O[26]=eQ^~eX&eV,O[27]=eZ^~e0&eG,O[36]=te^~tr&e1,O[37]=tt^~ta&e3,O[46]=tm^~tb&tu,O[47]=ty^~tv&th,O[8]=eB^~eE&eA,O[9]=eN^~eS&eI,O[18]=eH^~eD&eO,O[19]=eq^~eM&eL,O[28]=eX^~eV&e$,O[29]=e0^~eG&eW,O[38]=tr^~e1&e6,O[39]=ta^~e3&e5,O[48]=tb^~tu&td,O[49]=tv^~th&tf,O[0]^=ek[J],O[1]^=ek[J+1]};if(eg)O.exports=eO;else{for(eU=0;eU{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&eo.decode();let ea=null;function getUint8Memory0(){return(null===ea||0===ea.byteLength)&&(ea=new Uint8Array(J.memory.buffer)),ea}function getStringFromWasm0(O,U){return O>>>=0,eo.decode(getUint8Memory0().subarray(O,O+U))}function addHeapObject(O){es===en.length&&en.push(en.length+1);let U=es;return es=en[U],en[U]=O,U}let eu=0,ef="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},eg="function"==typeof ef.encodeInto?function(O,U){return ef.encodeInto(O,U)}:function(O,U){let $=ef.encode(O);return U.set($),{read:O.length,written:$.length}};function passStringToWasm0(O,U,$){if(void 0===$){let $=ef.encode(O),J=U($.length)>>>0;return getUint8Memory0().subarray(J,J+$.length).set($),eu=$.length,J}let J=O.length,en=U(J)>>>0,es=getUint8Memory0(),eo=0;for(;eo127)break;es[en+eo]=U}if(eo!==J){0!==eo&&(O=O.slice(eo)),en=$(en,J,J=eo+3*O.length)>>>0;let U=getUint8Memory0().subarray(en+eo,en+J),es=eg(O,U);eo+=es.written}return eu=eo,en}function isLikeNone(O){return null==O}let ev=null;function getInt32Memory0(){return(null===ev||0===ev.byteLength)&&(ev=new Int32Array(J.memory.buffer)),ev}function debugString(O){let U;let $=typeof O;if("number"==$||"boolean"==$||null==O)return`${O}`;if("string"==$)return`"${O}"`;if("symbol"==$){let U=O.description;return null==U?"Symbol":`Symbol(${U})`}if("function"==$){let U=O.name;return"string"==typeof U&&U.length>0?`Function(${U})`:"Function"}if(Array.isArray(O)){let U=O.length,$="[";U>0&&($+=debugString(O[0]));for(let J=1;J1))return toString.call(O);if("Object"==(U=J[1]))try{return"Object("+JSON.stringify(O)+")"}catch(O){return"Object"}return O instanceof Error?`${O.name}: ${O.message} +${O.stack}`:U}function init_panic_hook(){J.init_panic_hook()}function newRLN(O,U,$){try{let eo=J.__wbindgen_add_to_stack_pointer(-16);J.newRLN(eo,O,addHeapObject(U),addHeapObject($));var en=getInt32Memory0()[eo/4+0],es=getInt32Memory0()[eo/4+1];if(getInt32Memory0()[eo/4+2])throw takeObject(es);return en}finally{J.__wbindgen_add_to_stack_pointer(16)}}function getSerializedRLNWitness(O,U){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.getSerializedRLNWitness(es,O,addHeapObject(U));var $=getInt32Memory0()[es/4+0],en=getInt32Memory0()[es/4+1];if(getInt32Memory0()[es/4+2])throw takeObject(en);return takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function insertMember(O,U){try{let en=J.__wbindgen_add_to_stack_pointer(-16);J.insertMember(en,O,addHeapObject(U));var $=getInt32Memory0()[en/4+0];if(getInt32Memory0()[en/4+1])throw takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function setLeavesFrom(O,U,$){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.setLeavesFrom(es,O,U,addHeapObject($));var en=getInt32Memory0()[es/4+0];if(getInt32Memory0()[es/4+1])throw takeObject(en)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function deleteLeaf(O,U){try{let en=J.__wbindgen_add_to_stack_pointer(-16);J.deleteLeaf(en,O,U);var $=getInt32Memory0()[en/4+0];if(getInt32Memory0()[en/4+1])throw takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}function RLNWitnessToJson(O,U){try{let es=J.__wbindgen_add_to_stack_pointer(-16);J.RLNWitnessToJson(es,O,addHeapObject(U));var $=getInt32Memory0()[es/4+0],en=getInt32Memory0()[es/4+1];if(getInt32Memory0()[es/4+2])throw takeObject(en);return takeObject($)}finally{J.__wbindgen_add_to_stack_pointer(16)}}let e_=null;function getUint32Memory0(){return(null===e_||0===e_.byteLength)&&(e_=new Uint32Array(J.memory.buffer)),e_}function passArrayJsValueToWasm0(O,U){let $=U(4*O.length)>>>0,J=getUint32Memory0();for(let U=0;U>>0]=takeObject($)},U.wbg.__wbg_toString_27ba0397f8cf84a6=function(){return handleError(function(O,U){let $=getObject(O).toString(U);return addHeapObject($)},arguments)},U.wbg.__wbg_call_35782e9a1aa5e091=function(){return handleError(function(O,U,$){let J=getObject(O).call(getObject(U),getObject($));return addHeapObject(J)},arguments)},U.wbg.__wbg_set_6c1b2b7b73337778=function(O,U,$){let J=getObject(O).set(getObject(U),getObject($));return addHeapObject(J)},U.wbg.__wbg_fromEntries_10a57760b5d7d9b8=function(){return handleError(function(O){let U=Object.fromEntries(getObject(O));return addHeapObject(U)},arguments)},U.wbg.__wbg_buffer_fcbfb6d88b2732e9=function(O){let U=getObject(O).buffer;return addHeapObject(U)},U.wbg.__wbg_newwithbyteoffsetandlength_92c251989c485785=function(O,U,$){let J=new Uint8Array(getObject(O),U>>>0,$>>>0);return addHeapObject(J)},U.wbg.__wbg_new_bc5d9aad3f9ac80e=function(O){let U=new Uint8Array(getObject(O));return addHeapObject(U)},U.wbg.__wbg_set_4b3aa8445ac1e91c=function(O,U,$){getObject(O).set(getObject(U),$>>>0)},U.wbg.__wbg_length_d9c4ded7e708c6a1=function(O){let U=getObject(O).length;return U},U.wbg.__wbg_newwithlength_89eca18f2603a999=function(O){let U=new Uint8Array(O>>>0);return addHeapObject(U)},U.wbg.__wbg_subarray_7649d027b2b141b3=function(O,U,$){let J=getObject(O).subarray(U>>>0,$>>>0);return addHeapObject(J)},U.wbg.__wbindgen_debug_string=function(O,U){let $=debugString(getObject(U)),en=passStringToWasm0($,J.__wbindgen_malloc,J.__wbindgen_realloc),es=eu;getInt32Memory0()[O/4+1]=es,getInt32Memory0()[O/4+0]=en},U.wbg.__wbindgen_throw=function(O,U){throw Error(getStringFromWasm0(O,U))},U.wbg.__wbindgen_memory=function(){let O=J.memory;return addHeapObject(O)},U}function __wbg_finalize_init(O,U){return J=O.exports,__wbg_init.__wbindgen_wasm_module=U,ev=null,e_=null,ea=null,J}async function __wbg_init(O){if(void 0!==J)return J;void 0===O&&(O=new $.U($(632)));let U=__wbg_get_imports();("string"==typeof O||"function"==typeof Request&&O instanceof Request||"function"==typeof URL&&O instanceof URL)&&(O=fetch(O));let{instance:en,module:es}=await __wbg_load(await O,U);return __wbg_finalize_init(en,es)}U.ZP=__wbg_init},6942:function(O){"use strict";for(var U="qpzry9x8gf2tvdw0s3jn54khce6mua7l",$={},J=0;J>25;return(33554431&O)<<5^996825010&-(U>>0&1)^642813549&-(U>>1&1)^513874426&-(U>>2&1)^1027748829&-(U>>3&1)^705979059&-(U>>4&1)}function prefixChk(O){for(var U=1,$=0;$126)return"Invalid prefix ("+O+")";U=polymodStep(U)^J>>5}for($=0,U=polymodStep(U);$J)throw TypeError("Exceeds length limit");var en=prefixChk(O=O.toLowerCase());if("string"==typeof en)throw Error(en);for(var es=O+"1",eo=0;eo<$.length;++eo){var ea=$[eo];if(ea>>5!=0)throw Error("Non 5-bit word");en=polymodStep(en)^ea,es+=U.charAt(ea)}for(eo=0;eo<6;++eo)en=polymodStep(en);for(en^=1,eo=0;eo<6;++eo){var eu=en>>(5-eo)*5&31;es+=U.charAt(eu)}return es}function __decode(O,U){if(U=U||90,O.length<8)return O+" too short";if(O.length>U)return"Exceeds length limit";var J=O.toLowerCase(),en=O.toUpperCase();if(O!==J&&O!==en)return"Mixed-case string "+O;var es=(O=J).lastIndexOf("1");if(-1===es)return"No separator character for "+O;if(0===es)return"Missing prefix for "+O;var eo=O.slice(0,es),ea=O.slice(es+1);if(ea.length<6)return"Data too short";var eu=prefixChk(eo);if("string"==typeof eu)return eu;for(var ef=[],eg=0;eg=ea.length||ef.push(e_)}return 1!==eu?"Invalid checksum for "+O:{prefix:eo,words:ef}}function decodeUnsafe(){var O=__decode.apply(null,arguments);if("object"==typeof O)return O}function decode(O){var U=__decode.apply(null,arguments);if("object"==typeof U)return U;throw Error(U)}function convert(O,U,$,J){for(var en=0,es=0,eo=(1<<$)-1,ea=[],eu=0;eu=$;)ea.push(en>>(es-=$)&eo);if(J)es>0&&ea.push(en<<$-es&eo);else{if(es>=U)return"Excess padding";if(en<<$-es&eo)return"Non-zero padding"}return ea}function toWordsUnsafe(O){var U=convert(O,8,5,!0);if(Array.isArray(U))return U}function toWords(O){var U=convert(O,8,5,!0);if(Array.isArray(U))return U;throw Error(U)}function fromWordsUnsafe(O){var U=convert(O,5,8,!1);if(Array.isArray(U))return U}function fromWords(O){var U=convert(O,5,8,!1);if(Array.isArray(U))return U;throw Error(U)}O.exports={decodeUnsafe:decodeUnsafe,decode:decode,encode:encode,toWordsUnsafe:toWordsUnsafe,toWords:toWords,fromWordsUnsafe:fromWordsUnsafe,fromWords:fromWords}},6662:function(O,U,$){!function(O,U){"use strict";function assert(O,U){if(!O)throw Error(U||"Assertion failed")}function inherits(O,U){O.super_=U;var TempCtor=function(){};TempCtor.prototype=U.prototype,O.prototype=new TempCtor,O.prototype.constructor=O}function BN(O,U,$){if(BN.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,null!==O&&(("le"===U||"be"===U)&&($=U,U=10),this._init(O||0,U||10,$||"be"))}"object"==typeof O?O.exports=BN:U.BN=BN,BN.BN=BN,BN.wordSize=26;try{J="undefined"!=typeof window&&void 0!==window.Buffer?window.Buffer:$(6601).Buffer}catch(O){}function parseHex4Bits(O,U){var $=O.charCodeAt(U);return $>=48&&$<=57?$-48:$>=65&&$<=70?$-55:$>=97&&$<=102?$-87:void assert(!1,"Invalid character in "+O)}function parseHexByte(O,U,$){var J=parseHex4Bits(O,$);return $-1>=U&&(J|=parseHex4Bits(O,$-1)<<4),J}function parseBase(O,U,$,J){for(var en=0,es=0,eo=Math.min(O.length,$),ea=U;ea=49?eu-49+10:eu>=17?eu-17+10:eu,assert(eu>=0&&es0?O:U},BN.min=function(O,U){return 0>O.cmp(U)?O:U},BN.prototype._init=function(O,U,$){if("number"==typeof O)return this._initNumber(O,U,$);if("object"==typeof O)return this._initArray(O,U,$);"hex"===U&&(U=16),assert(U===(0|U)&&U>=2&&U<=36);var J=0;"-"===(O=O.toString().replace(/\s+/g,""))[0]&&(J++,this.negative=1),J=0;es-=3)en=O[es]|O[es-1]<<8|O[es-2]<<16,this.words[J]|=en<>>26-eo&67108863,(eo+=24)>=26&&(eo-=26,J++);else if("le"===$)for(es=0,J=0;es>>26-eo&67108863,(eo+=24)>=26&&(eo-=26,J++);return this._strip()},BN.prototype._parseHex=function(O,U,$){this.length=Math.ceil((O.length-U)/6),this.words=Array(this.length);for(var J,en=0;en=U;en-=2)J=parseHexByte(O,U,en)<=18?(es-=18,eo+=1,this.words[eo]|=J>>>26):es+=8;else for(en=(O.length-U)%2==0?U+1:U;en=18?(es-=18,eo+=1,this.words[eo]|=J>>>26):es+=8;this._strip()},BN.prototype._parseBase=function(O,U,$){this.words=[0],this.length=1;for(var J=0,en=1;en<=67108863;en*=U)J++;J--,en=en/U|0;for(var es=O.length-$,eo=es%J,ea=Math.min(es,es-eo)+$,eu=0,ef=$;ef1&&0===this.words[this.length-1];)this.length--;return this._normSign()},BN.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},"undefined"!=typeof Symbol&&"function"==typeof Symbol.for)try{BN.prototype[Symbol.for("nodejs.util.inspect.custom")]=inspect}catch(O){BN.prototype.inspect=inspect}else BN.prototype.inspect=inspect;function inspect(){return(this.red?""}var J,en=["","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"],es=[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],eo=[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];BN.prototype.toString=function(O,U){if(U=0|U||1,16===(O=O||10)||"hex"===O){$="";for(var $,J=0,ea=0,eu=0;eu>>24-J&16777215,(J+=2)>=26&&(J-=26,eu--),$=0!==ea||eu!==this.length-1?en[6-eg.length]+eg+$:eg+$}for(0!==ea&&($=ea.toString(16)+$);$.length%U!=0;)$="0"+$;return 0!==this.negative&&($="-"+$),$}if(O===(0|O)&&O>=2&&O<=36){var ev=es[O],e_=eo[O];$="";var ew=this.clone();for(ew.negative=0;!ew.isZero();){var eE=ew.modrn(e_).toString(O);$=(ew=ew.idivn(e_)).isZero()?eE+$:en[ev-eE.length]+eE+$}for(this.isZero()&&($="0"+$);$.length%U!=0;)$="0"+$;return 0!==this.negative&&($="-"+$),$}assert(!1,"Base should be between 2 and 36")},BN.prototype.toNumber=function(){var O=this.words[0];return 2===this.length?O+=67108864*this.words[1]:3===this.length&&1===this.words[2]?O+=4503599627370496+67108864*this.words[1]:this.length>2&&assert(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-O:O},BN.prototype.toJSON=function(){return this.toString(16,2)},J&&(BN.prototype.toBuffer=function(O,U){return this.toArrayLike(J,O,U)}),BN.prototype.toArray=function(O,U){return this.toArrayLike(Array,O,U)};var allocate=function(O,U){return O.allocUnsafe?O.allocUnsafe(U):new O(U)};function toBitArray(O){for(var U=Array(O.bitLength()),$=0;$>>en&1}return U}function smallMulTo(O,U,$){$.negative=U.negative^O.negative;var J=O.length+U.length|0;$.length=J,J=J-1|0;var en=0|O.words[0],es=0|U.words[0],eo=en*es,ea=67108863&eo,eu=eo/67108864|0;$.words[0]=ea;for(var ef=1;ef>>26,ev=67108863&eu,e_=Math.min(ef,U.length-1),ew=Math.max(0,ef-O.length+1);ew<=e_;ew++){var eE=ef-ew|0;eg+=(eo=(en=0|O.words[eE])*(es=0|U.words[ew])+ev)/67108864|0,ev=67108863&eo}$.words[ef]=0|ev,eu=0|eg}return 0!==eu?$.words[ef]=0|eu:$.length--,$._strip()}BN.prototype.toArrayLike=function(O,U,$){this._strip();var J=this.byteLength(),en=$||Math.max(1,J);assert(J<=en,"byte array longer than desired length"),assert(en>0,"Requested array length <= 0");var es=allocate(O,en);return this["_toArrayLike"+("le"===U?"LE":"BE")](es,J),es},BN.prototype._toArrayLikeLE=function(O,U){for(var $=0,J=0,en=0,es=0;en>8&255),$>16&255),6===es?($>24&255),J=0,es=0):(J=eo>>>24,es+=2)}if($=0&&(O[$--]=eo>>8&255),$>=0&&(O[$--]=eo>>16&255),6===es?($>=0&&(O[$--]=eo>>24&255),J=0,es=0):(J=eo>>>24,es+=2)}if($>=0)for(O[$--]=J;$>=0;)O[$--]=0},Math.clz32?BN.prototype._countBits=function(O){return 32-Math.clz32(O)}:BN.prototype._countBits=function(O){var U=O,$=0;return U>=4096&&($+=13,U>>>=13),U>=64&&($+=7,U>>>=7),U>=8&&($+=4,U>>>=4),U>=2&&($+=2,U>>>=2),$+U},BN.prototype._zeroBits=function(O){if(0===O)return 26;var U=O,$=0;return(8191&U)==0&&($+=13,U>>>=13),(127&U)==0&&($+=7,U>>>=7),(15&U)==0&&($+=4,U>>>=4),(3&U)==0&&($+=2,U>>>=2),(1&U)==0&&$++,$},BN.prototype.bitLength=function(){var O=this.words[this.length-1],U=this._countBits(O);return(this.length-1)*26+U},BN.prototype.zeroBits=function(){if(this.isZero())return 0;for(var O=0,U=0;UO.length?this.clone().ior(O):O.clone().ior(this)},BN.prototype.uor=function(O){return this.length>O.length?this.clone().iuor(O):O.clone().iuor(this)},BN.prototype.iuand=function(O){var U;U=this.length>O.length?O:this;for(var $=0;$O.length?this.clone().iand(O):O.clone().iand(this)},BN.prototype.uand=function(O){return this.length>O.length?this.clone().iuand(O):O.clone().iuand(this)},BN.prototype.iuxor=function(O){this.length>O.length?(U=this,$=O):(U=O,$=this);for(var U,$,J=0;J<$.length;J++)this.words[J]=U.words[J]^$.words[J];if(this!==U)for(;JO.length?this.clone().ixor(O):O.clone().ixor(this)},BN.prototype.uxor=function(O){return this.length>O.length?this.clone().iuxor(O):O.clone().iuxor(this)},BN.prototype.inotn=function(O){assert("number"==typeof O&&O>=0);var U=0|Math.ceil(O/26),$=O%26;this._expand(U),$>0&&U--;for(var J=0;J0&&(this.words[J]=~this.words[J]&67108863>>26-$),this._strip()},BN.prototype.notn=function(O){return this.clone().inotn(O)},BN.prototype.setn=function(O,U){assert("number"==typeof O&&O>=0);var $=O/26|0,J=O%26;return this._expand($+1),U?this.words[$]=this.words[$]|1<O.length?($=this,J=O):($=O,J=this);for(var U,$,J,en=0,es=0;es>>26;for(;0!==en&&es<$.length;es++)U=(0|$.words[es])+en,this.words[es]=67108863&U,en=U>>>26;if(this.length=$.length,0!==en)this.words[this.length]=en,this.length++;else if($!==this)for(;es<$.length;es++)this.words[es]=$.words[es];return this},BN.prototype.add=function(O){var U;return 0!==O.negative&&0===this.negative?(O.negative=0,U=this.sub(O),O.negative^=1,U):0===O.negative&&0!==this.negative?(this.negative=0,U=O.sub(this),this.negative=1,U):this.length>O.length?this.clone().iadd(O):O.clone().iadd(this)},BN.prototype.isub=function(O){if(0!==O.negative){O.negative=0;var U,$,J=this.iadd(O);return O.negative=1,J._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(O),this.negative=1,this._normSign();var en=this.cmp(O);if(0===en)return this.negative=0,this.length=1,this.words[0]=0,this;en>0?(U=this,$=O):(U=O,$=this);for(var es=0,eo=0;eo<$.length;eo++)es=(J=(0|U.words[eo])-(0|$.words[eo])+es)>>26,this.words[eo]=67108863&J;for(;0!==es&&eo>26,this.words[eo]=67108863&J;if(0===es&&eo>>13,ew=0|eo[1],eE=8191&ew,eS=ew>>>13,eA=0|eo[2],eI=8191&eA,eP=eA>>>13,ek=0|eo[3],eT=8191&ek,eR=ek>>>13,eC=0|eo[4],eB=8191&eC,eN=eC>>>13,eD=0|eo[5],eM=8191&eD,eO=eD>>>13,eL=0|eo[6],eU=8191&eL,eF=eL>>>13,eK=0|eo[7],ej=8191&eK,eH=eK>>>13,eq=0|eo[8],eV=8191&eq,eG=eq>>>13,e$=0|eo[9],eW=8191&e$,eY=e$>>>13,eJ=0|ea[0],eQ=8191&eJ,eZ=eJ>>>13,eX=0|ea[1],e0=8191&eX,e1=eX>>>13,e3=0|ea[2],e6=8191&e3,e5=e3>>>13,e9=0|ea[3],e7=8191&e9,te=e9>>>13,tt=0|ea[4],tr=8191&tt,ta=tt>>>13,tu=0|ea[5],th=8191&tu,td=tu>>>13,tf=0|ea[6],tp=8191&tf,tg=tf>>>13,tm=0|ea[7],ty=8191&tm,tb=tm>>>13,tv=0|ea[8],t_=8191&tv,tw=tv>>>13,tE=0|ea[9],tS=8191&tE,tA=tE>>>13;$.negative=O.negative^U.negative,$.length=19;var tI=(ef+(J=Math.imul(ev,eQ))|0)+((8191&(en=(en=Math.imul(ev,eZ))+Math.imul(e_,eQ)|0))<<13)|0;ef=((es=Math.imul(e_,eZ))+(en>>>13)|0)+(tI>>>26)|0,tI&=67108863,J=Math.imul(eE,eQ),en=(en=Math.imul(eE,eZ))+Math.imul(eS,eQ)|0,es=Math.imul(eS,eZ);var tP=(ef+(J=J+Math.imul(ev,e0)|0)|0)+((8191&(en=(en=en+Math.imul(ev,e1)|0)+Math.imul(e_,e0)|0))<<13)|0;ef=((es=es+Math.imul(e_,e1)|0)+(en>>>13)|0)+(tP>>>26)|0,tP&=67108863,J=Math.imul(eI,eQ),en=(en=Math.imul(eI,eZ))+Math.imul(eP,eQ)|0,es=Math.imul(eP,eZ),J=J+Math.imul(eE,e0)|0,en=(en=en+Math.imul(eE,e1)|0)+Math.imul(eS,e0)|0,es=es+Math.imul(eS,e1)|0;var tk=(ef+(J=J+Math.imul(ev,e6)|0)|0)+((8191&(en=(en=en+Math.imul(ev,e5)|0)+Math.imul(e_,e6)|0))<<13)|0;ef=((es=es+Math.imul(e_,e5)|0)+(en>>>13)|0)+(tk>>>26)|0,tk&=67108863,J=Math.imul(eT,eQ),en=(en=Math.imul(eT,eZ))+Math.imul(eR,eQ)|0,es=Math.imul(eR,eZ),J=J+Math.imul(eI,e0)|0,en=(en=en+Math.imul(eI,e1)|0)+Math.imul(eP,e0)|0,es=es+Math.imul(eP,e1)|0,J=J+Math.imul(eE,e6)|0,en=(en=en+Math.imul(eE,e5)|0)+Math.imul(eS,e6)|0,es=es+Math.imul(eS,e5)|0;var tT=(ef+(J=J+Math.imul(ev,e7)|0)|0)+((8191&(en=(en=en+Math.imul(ev,te)|0)+Math.imul(e_,e7)|0))<<13)|0;ef=((es=es+Math.imul(e_,te)|0)+(en>>>13)|0)+(tT>>>26)|0,tT&=67108863,J=Math.imul(eB,eQ),en=(en=Math.imul(eB,eZ))+Math.imul(eN,eQ)|0,es=Math.imul(eN,eZ),J=J+Math.imul(eT,e0)|0,en=(en=en+Math.imul(eT,e1)|0)+Math.imul(eR,e0)|0,es=es+Math.imul(eR,e1)|0,J=J+Math.imul(eI,e6)|0,en=(en=en+Math.imul(eI,e5)|0)+Math.imul(eP,e6)|0,es=es+Math.imul(eP,e5)|0,J=J+Math.imul(eE,e7)|0,en=(en=en+Math.imul(eE,te)|0)+Math.imul(eS,e7)|0,es=es+Math.imul(eS,te)|0;var tR=(ef+(J=J+Math.imul(ev,tr)|0)|0)+((8191&(en=(en=en+Math.imul(ev,ta)|0)+Math.imul(e_,tr)|0))<<13)|0;ef=((es=es+Math.imul(e_,ta)|0)+(en>>>13)|0)+(tR>>>26)|0,tR&=67108863,J=Math.imul(eM,eQ),en=(en=Math.imul(eM,eZ))+Math.imul(eO,eQ)|0,es=Math.imul(eO,eZ),J=J+Math.imul(eB,e0)|0,en=(en=en+Math.imul(eB,e1)|0)+Math.imul(eN,e0)|0,es=es+Math.imul(eN,e1)|0,J=J+Math.imul(eT,e6)|0,en=(en=en+Math.imul(eT,e5)|0)+Math.imul(eR,e6)|0,es=es+Math.imul(eR,e5)|0,J=J+Math.imul(eI,e7)|0,en=(en=en+Math.imul(eI,te)|0)+Math.imul(eP,e7)|0,es=es+Math.imul(eP,te)|0,J=J+Math.imul(eE,tr)|0,en=(en=en+Math.imul(eE,ta)|0)+Math.imul(eS,tr)|0,es=es+Math.imul(eS,ta)|0;var tC=(ef+(J=J+Math.imul(ev,th)|0)|0)+((8191&(en=(en=en+Math.imul(ev,td)|0)+Math.imul(e_,th)|0))<<13)|0;ef=((es=es+Math.imul(e_,td)|0)+(en>>>13)|0)+(tC>>>26)|0,tC&=67108863,J=Math.imul(eU,eQ),en=(en=Math.imul(eU,eZ))+Math.imul(eF,eQ)|0,es=Math.imul(eF,eZ),J=J+Math.imul(eM,e0)|0,en=(en=en+Math.imul(eM,e1)|0)+Math.imul(eO,e0)|0,es=es+Math.imul(eO,e1)|0,J=J+Math.imul(eB,e6)|0,en=(en=en+Math.imul(eB,e5)|0)+Math.imul(eN,e6)|0,es=es+Math.imul(eN,e5)|0,J=J+Math.imul(eT,e7)|0,en=(en=en+Math.imul(eT,te)|0)+Math.imul(eR,e7)|0,es=es+Math.imul(eR,te)|0,J=J+Math.imul(eI,tr)|0,en=(en=en+Math.imul(eI,ta)|0)+Math.imul(eP,tr)|0,es=es+Math.imul(eP,ta)|0,J=J+Math.imul(eE,th)|0,en=(en=en+Math.imul(eE,td)|0)+Math.imul(eS,th)|0,es=es+Math.imul(eS,td)|0;var tB=(ef+(J=J+Math.imul(ev,tp)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tg)|0)+Math.imul(e_,tp)|0))<<13)|0;ef=((es=es+Math.imul(e_,tg)|0)+(en>>>13)|0)+(tB>>>26)|0,tB&=67108863,J=Math.imul(ej,eQ),en=(en=Math.imul(ej,eZ))+Math.imul(eH,eQ)|0,es=Math.imul(eH,eZ),J=J+Math.imul(eU,e0)|0,en=(en=en+Math.imul(eU,e1)|0)+Math.imul(eF,e0)|0,es=es+Math.imul(eF,e1)|0,J=J+Math.imul(eM,e6)|0,en=(en=en+Math.imul(eM,e5)|0)+Math.imul(eO,e6)|0,es=es+Math.imul(eO,e5)|0,J=J+Math.imul(eB,e7)|0,en=(en=en+Math.imul(eB,te)|0)+Math.imul(eN,e7)|0,es=es+Math.imul(eN,te)|0,J=J+Math.imul(eT,tr)|0,en=(en=en+Math.imul(eT,ta)|0)+Math.imul(eR,tr)|0,es=es+Math.imul(eR,ta)|0,J=J+Math.imul(eI,th)|0,en=(en=en+Math.imul(eI,td)|0)+Math.imul(eP,th)|0,es=es+Math.imul(eP,td)|0,J=J+Math.imul(eE,tp)|0,en=(en=en+Math.imul(eE,tg)|0)+Math.imul(eS,tp)|0,es=es+Math.imul(eS,tg)|0;var tN=(ef+(J=J+Math.imul(ev,ty)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tb)|0)+Math.imul(e_,ty)|0))<<13)|0;ef=((es=es+Math.imul(e_,tb)|0)+(en>>>13)|0)+(tN>>>26)|0,tN&=67108863,J=Math.imul(eV,eQ),en=(en=Math.imul(eV,eZ))+Math.imul(eG,eQ)|0,es=Math.imul(eG,eZ),J=J+Math.imul(ej,e0)|0,en=(en=en+Math.imul(ej,e1)|0)+Math.imul(eH,e0)|0,es=es+Math.imul(eH,e1)|0,J=J+Math.imul(eU,e6)|0,en=(en=en+Math.imul(eU,e5)|0)+Math.imul(eF,e6)|0,es=es+Math.imul(eF,e5)|0,J=J+Math.imul(eM,e7)|0,en=(en=en+Math.imul(eM,te)|0)+Math.imul(eO,e7)|0,es=es+Math.imul(eO,te)|0,J=J+Math.imul(eB,tr)|0,en=(en=en+Math.imul(eB,ta)|0)+Math.imul(eN,tr)|0,es=es+Math.imul(eN,ta)|0,J=J+Math.imul(eT,th)|0,en=(en=en+Math.imul(eT,td)|0)+Math.imul(eR,th)|0,es=es+Math.imul(eR,td)|0,J=J+Math.imul(eI,tp)|0,en=(en=en+Math.imul(eI,tg)|0)+Math.imul(eP,tp)|0,es=es+Math.imul(eP,tg)|0,J=J+Math.imul(eE,ty)|0,en=(en=en+Math.imul(eE,tb)|0)+Math.imul(eS,ty)|0,es=es+Math.imul(eS,tb)|0;var tD=(ef+(J=J+Math.imul(ev,t_)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tw)|0)+Math.imul(e_,t_)|0))<<13)|0;ef=((es=es+Math.imul(e_,tw)|0)+(en>>>13)|0)+(tD>>>26)|0,tD&=67108863,J=Math.imul(eW,eQ),en=(en=Math.imul(eW,eZ))+Math.imul(eY,eQ)|0,es=Math.imul(eY,eZ),J=J+Math.imul(eV,e0)|0,en=(en=en+Math.imul(eV,e1)|0)+Math.imul(eG,e0)|0,es=es+Math.imul(eG,e1)|0,J=J+Math.imul(ej,e6)|0,en=(en=en+Math.imul(ej,e5)|0)+Math.imul(eH,e6)|0,es=es+Math.imul(eH,e5)|0,J=J+Math.imul(eU,e7)|0,en=(en=en+Math.imul(eU,te)|0)+Math.imul(eF,e7)|0,es=es+Math.imul(eF,te)|0,J=J+Math.imul(eM,tr)|0,en=(en=en+Math.imul(eM,ta)|0)+Math.imul(eO,tr)|0,es=es+Math.imul(eO,ta)|0,J=J+Math.imul(eB,th)|0,en=(en=en+Math.imul(eB,td)|0)+Math.imul(eN,th)|0,es=es+Math.imul(eN,td)|0,J=J+Math.imul(eT,tp)|0,en=(en=en+Math.imul(eT,tg)|0)+Math.imul(eR,tp)|0,es=es+Math.imul(eR,tg)|0,J=J+Math.imul(eI,ty)|0,en=(en=en+Math.imul(eI,tb)|0)+Math.imul(eP,ty)|0,es=es+Math.imul(eP,tb)|0,J=J+Math.imul(eE,t_)|0,en=(en=en+Math.imul(eE,tw)|0)+Math.imul(eS,t_)|0,es=es+Math.imul(eS,tw)|0;var tM=(ef+(J=J+Math.imul(ev,tS)|0)|0)+((8191&(en=(en=en+Math.imul(ev,tA)|0)+Math.imul(e_,tS)|0))<<13)|0;ef=((es=es+Math.imul(e_,tA)|0)+(en>>>13)|0)+(tM>>>26)|0,tM&=67108863,J=Math.imul(eW,e0),en=(en=Math.imul(eW,e1))+Math.imul(eY,e0)|0,es=Math.imul(eY,e1),J=J+Math.imul(eV,e6)|0,en=(en=en+Math.imul(eV,e5)|0)+Math.imul(eG,e6)|0,es=es+Math.imul(eG,e5)|0,J=J+Math.imul(ej,e7)|0,en=(en=en+Math.imul(ej,te)|0)+Math.imul(eH,e7)|0,es=es+Math.imul(eH,te)|0,J=J+Math.imul(eU,tr)|0,en=(en=en+Math.imul(eU,ta)|0)+Math.imul(eF,tr)|0,es=es+Math.imul(eF,ta)|0,J=J+Math.imul(eM,th)|0,en=(en=en+Math.imul(eM,td)|0)+Math.imul(eO,th)|0,es=es+Math.imul(eO,td)|0,J=J+Math.imul(eB,tp)|0,en=(en=en+Math.imul(eB,tg)|0)+Math.imul(eN,tp)|0,es=es+Math.imul(eN,tg)|0,J=J+Math.imul(eT,ty)|0,en=(en=en+Math.imul(eT,tb)|0)+Math.imul(eR,ty)|0,es=es+Math.imul(eR,tb)|0,J=J+Math.imul(eI,t_)|0,en=(en=en+Math.imul(eI,tw)|0)+Math.imul(eP,t_)|0,es=es+Math.imul(eP,tw)|0;var tO=(ef+(J=J+Math.imul(eE,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eE,tA)|0)+Math.imul(eS,tS)|0))<<13)|0;ef=((es=es+Math.imul(eS,tA)|0)+(en>>>13)|0)+(tO>>>26)|0,tO&=67108863,J=Math.imul(eW,e6),en=(en=Math.imul(eW,e5))+Math.imul(eY,e6)|0,es=Math.imul(eY,e5),J=J+Math.imul(eV,e7)|0,en=(en=en+Math.imul(eV,te)|0)+Math.imul(eG,e7)|0,es=es+Math.imul(eG,te)|0,J=J+Math.imul(ej,tr)|0,en=(en=en+Math.imul(ej,ta)|0)+Math.imul(eH,tr)|0,es=es+Math.imul(eH,ta)|0,J=J+Math.imul(eU,th)|0,en=(en=en+Math.imul(eU,td)|0)+Math.imul(eF,th)|0,es=es+Math.imul(eF,td)|0,J=J+Math.imul(eM,tp)|0,en=(en=en+Math.imul(eM,tg)|0)+Math.imul(eO,tp)|0,es=es+Math.imul(eO,tg)|0,J=J+Math.imul(eB,ty)|0,en=(en=en+Math.imul(eB,tb)|0)+Math.imul(eN,ty)|0,es=es+Math.imul(eN,tb)|0,J=J+Math.imul(eT,t_)|0,en=(en=en+Math.imul(eT,tw)|0)+Math.imul(eR,t_)|0,es=es+Math.imul(eR,tw)|0;var tL=(ef+(J=J+Math.imul(eI,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eI,tA)|0)+Math.imul(eP,tS)|0))<<13)|0;ef=((es=es+Math.imul(eP,tA)|0)+(en>>>13)|0)+(tL>>>26)|0,tL&=67108863,J=Math.imul(eW,e7),en=(en=Math.imul(eW,te))+Math.imul(eY,e7)|0,es=Math.imul(eY,te),J=J+Math.imul(eV,tr)|0,en=(en=en+Math.imul(eV,ta)|0)+Math.imul(eG,tr)|0,es=es+Math.imul(eG,ta)|0,J=J+Math.imul(ej,th)|0,en=(en=en+Math.imul(ej,td)|0)+Math.imul(eH,th)|0,es=es+Math.imul(eH,td)|0,J=J+Math.imul(eU,tp)|0,en=(en=en+Math.imul(eU,tg)|0)+Math.imul(eF,tp)|0,es=es+Math.imul(eF,tg)|0,J=J+Math.imul(eM,ty)|0,en=(en=en+Math.imul(eM,tb)|0)+Math.imul(eO,ty)|0,es=es+Math.imul(eO,tb)|0,J=J+Math.imul(eB,t_)|0,en=(en=en+Math.imul(eB,tw)|0)+Math.imul(eN,t_)|0,es=es+Math.imul(eN,tw)|0;var tU=(ef+(J=J+Math.imul(eT,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eT,tA)|0)+Math.imul(eR,tS)|0))<<13)|0;ef=((es=es+Math.imul(eR,tA)|0)+(en>>>13)|0)+(tU>>>26)|0,tU&=67108863,J=Math.imul(eW,tr),en=(en=Math.imul(eW,ta))+Math.imul(eY,tr)|0,es=Math.imul(eY,ta),J=J+Math.imul(eV,th)|0,en=(en=en+Math.imul(eV,td)|0)+Math.imul(eG,th)|0,es=es+Math.imul(eG,td)|0,J=J+Math.imul(ej,tp)|0,en=(en=en+Math.imul(ej,tg)|0)+Math.imul(eH,tp)|0,es=es+Math.imul(eH,tg)|0,J=J+Math.imul(eU,ty)|0,en=(en=en+Math.imul(eU,tb)|0)+Math.imul(eF,ty)|0,es=es+Math.imul(eF,tb)|0,J=J+Math.imul(eM,t_)|0,en=(en=en+Math.imul(eM,tw)|0)+Math.imul(eO,t_)|0,es=es+Math.imul(eO,tw)|0;var tF=(ef+(J=J+Math.imul(eB,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eB,tA)|0)+Math.imul(eN,tS)|0))<<13)|0;ef=((es=es+Math.imul(eN,tA)|0)+(en>>>13)|0)+(tF>>>26)|0,tF&=67108863,J=Math.imul(eW,th),en=(en=Math.imul(eW,td))+Math.imul(eY,th)|0,es=Math.imul(eY,td),J=J+Math.imul(eV,tp)|0,en=(en=en+Math.imul(eV,tg)|0)+Math.imul(eG,tp)|0,es=es+Math.imul(eG,tg)|0,J=J+Math.imul(ej,ty)|0,en=(en=en+Math.imul(ej,tb)|0)+Math.imul(eH,ty)|0,es=es+Math.imul(eH,tb)|0,J=J+Math.imul(eU,t_)|0,en=(en=en+Math.imul(eU,tw)|0)+Math.imul(eF,t_)|0,es=es+Math.imul(eF,tw)|0;var tK=(ef+(J=J+Math.imul(eM,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eM,tA)|0)+Math.imul(eO,tS)|0))<<13)|0;ef=((es=es+Math.imul(eO,tA)|0)+(en>>>13)|0)+(tK>>>26)|0,tK&=67108863,J=Math.imul(eW,tp),en=(en=Math.imul(eW,tg))+Math.imul(eY,tp)|0,es=Math.imul(eY,tg),J=J+Math.imul(eV,ty)|0,en=(en=en+Math.imul(eV,tb)|0)+Math.imul(eG,ty)|0,es=es+Math.imul(eG,tb)|0,J=J+Math.imul(ej,t_)|0,en=(en=en+Math.imul(ej,tw)|0)+Math.imul(eH,t_)|0,es=es+Math.imul(eH,tw)|0;var tj=(ef+(J=J+Math.imul(eU,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eU,tA)|0)+Math.imul(eF,tS)|0))<<13)|0;ef=((es=es+Math.imul(eF,tA)|0)+(en>>>13)|0)+(tj>>>26)|0,tj&=67108863,J=Math.imul(eW,ty),en=(en=Math.imul(eW,tb))+Math.imul(eY,ty)|0,es=Math.imul(eY,tb),J=J+Math.imul(eV,t_)|0,en=(en=en+Math.imul(eV,tw)|0)+Math.imul(eG,t_)|0,es=es+Math.imul(eG,tw)|0;var tH=(ef+(J=J+Math.imul(ej,tS)|0)|0)+((8191&(en=(en=en+Math.imul(ej,tA)|0)+Math.imul(eH,tS)|0))<<13)|0;ef=((es=es+Math.imul(eH,tA)|0)+(en>>>13)|0)+(tH>>>26)|0,tH&=67108863,J=Math.imul(eW,t_),en=(en=Math.imul(eW,tw))+Math.imul(eY,t_)|0,es=Math.imul(eY,tw);var tq=(ef+(J=J+Math.imul(eV,tS)|0)|0)+((8191&(en=(en=en+Math.imul(eV,tA)|0)+Math.imul(eG,tS)|0))<<13)|0;ef=((es=es+Math.imul(eG,tA)|0)+(en>>>13)|0)+(tq>>>26)|0,tq&=67108863;var tz=(ef+(J=Math.imul(eW,tS))|0)+((8191&(en=(en=Math.imul(eW,tA))+Math.imul(eY,tS)|0))<<13)|0;return ef=((es=Math.imul(eY,tA))+(en>>>13)|0)+(tz>>>26)|0,tz&=67108863,eu[0]=tI,eu[1]=tP,eu[2]=tk,eu[3]=tT,eu[4]=tR,eu[5]=tC,eu[6]=tB,eu[7]=tN,eu[8]=tD,eu[9]=tM,eu[10]=tO,eu[11]=tL,eu[12]=tU,eu[13]=tF,eu[14]=tK,eu[15]=tj,eu[16]=tH,eu[17]=tq,eu[18]=tz,0!==ef&&(eu[19]=ef,$.length++),$};function bigMulTo(O,U,$){$.negative=U.negative^O.negative,$.length=O.length+U.length;for(var J=0,en=0,es=0;es<$.length-1;es++){var eo=en;en=0;for(var ea=67108863&J,eu=Math.min(es,U.length-1),ef=Math.max(0,es-O.length+1);ef<=eu;ef++){var eg=es-ef,ev=(0|O.words[eg])*(0|U.words[ef]),e_=67108863&ev;eo=eo+(ev/67108864|0)|0,ea=67108863&(e_=e_+ea|0),en+=(eo=eo+(e_>>>26)|0)>>>26,eo&=67108863}$.words[es]=ea,J=eo,eo=en}return 0!==J?$.words[es]=J:$.length--,$._strip()}function jumboMulTo(O,U,$){return bigMulTo(O,U,$)}function FFTM(O,U){this.x=O,this.y=U}Math.imul||(comb10MulTo=smallMulTo),BN.prototype.mulTo=function(O,U){var $=this.length+O.length;return 10===this.length&&10===O.length?comb10MulTo(this,O,U):$<63?smallMulTo(this,O,U):$<1024?bigMulTo(this,O,U):jumboMulTo(this,O,U)},FFTM.prototype.makeRBT=function(O){for(var U=Array(O),$=BN.prototype._countBits(O)-1,J=0;J>=1;return J},FFTM.prototype.permute=function(O,U,$,J,en,es){for(var eo=0;eo>>=1)en++;return 1<>>=13,$[2*es+1]=8191&en,en>>>=13;for(es=2*U;es>=26,$+=(en/67108864|0)+(es>>>26),this.words[J]=67108863&es}return 0!==$&&(this.words[J]=$,this.length++),U?this.ineg():this},BN.prototype.muln=function(O){return this.clone().imuln(O)},BN.prototype.sqr=function(){return this.mul(this)},BN.prototype.isqr=function(){return this.imul(this.clone())},BN.prototype.pow=function(O){var U=toBitArray(O);if(0===U.length)return new BN(1);for(var $=this,J=0;J=0);var U,$=O%26,J=(O-$)/26,en=67108863>>>26-$<<26-$;if(0!==$){var es=0;for(U=0;U>>26-$}es&&(this.words[U]=es,this.length++)}if(0!==J){for(U=this.length-1;U>=0;U--)this.words[U+J]=this.words[U];for(U=0;U=0),J=U?(U-U%26)/26:0;var J,en=O%26,es=Math.min((O-en)/26,this.length),eo=67108863^67108863>>>en<es)for(this.length-=es,eu=0;eu=0&&(0!==ef||eu>=J);eu--){var eg=0|this.words[eu];this.words[eu]=ef<<26-en|eg>>>en,ef=eg&eo}return ea&&0!==ef&&(ea.words[ea.length++]=ef),0===this.length&&(this.words[0]=0,this.length=1),this._strip()},BN.prototype.ishrn=function(O,U,$){return assert(0===this.negative),this.iushrn(O,U,$)},BN.prototype.shln=function(O){return this.clone().ishln(O)},BN.prototype.ushln=function(O){return this.clone().iushln(O)},BN.prototype.shrn=function(O){return this.clone().ishrn(O)},BN.prototype.ushrn=function(O){return this.clone().iushrn(O)},BN.prototype.testn=function(O){assert("number"==typeof O&&O>=0);var U=O%26,$=(O-U)/26,J=1<=0);var U=O%26,$=(O-U)/26;if(assert(0===this.negative,"imaskn works only with positive numbers"),this.length<=$)return this;if(0!==U&&$++,this.length=Math.min($,this.length),0!==U){var J=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},BN.prototype.isubn=function(O){if(assert("number"==typeof O),assert(O<67108864),O<0)return this.iaddn(-O);if(0!==this.negative)return this.negative=0,this.iaddn(O),this.negative=1,this;if(this.words[0]-=O,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(ea/67108864|0),this.words[J+$]=67108863&en}for(;J>26,this.words[J+$]=67108863&en;if(0===eo)return this._strip();for(assert(-1===eo),eo=0,J=0;J>26,this.words[J]=67108863&en;return this.negative=1,this._strip()},BN.prototype._wordDiv=function(O,U){var $,J=this.length-O.length,en=this.clone(),es=O,eo=0|es.words[es.length-1];0!=(J=26-this._countBits(eo))&&(es=es.ushln(J),en.iushln(J),eo=0|es.words[es.length-1]);var ea=en.length-es.length;if("mod"!==U){($=new BN(null)).length=ea+1,$.words=Array($.length);for(var eu=0;eu<$.length;eu++)$.words[eu]=0}var ef=en.clone()._ishlnsubmul(es,1,ea);0===ef.negative&&(en=ef,$&&($.words[ea]=1));for(var eg=ea-1;eg>=0;eg--){var ev=(0|en.words[es.length+eg])*67108864+(0|en.words[es.length+eg-1]);for(ev=Math.min(ev/eo|0,67108863),en._ishlnsubmul(es,ev,eg);0!==en.negative;)ev--,en.negative=0,en._ishlnsubmul(es,1,eg),en.isZero()||(en.negative^=1);$&&($.words[eg]=ev)}return $&&$._strip(),en._strip(),"div"!==U&&0!==J&&en.iushrn(J),{div:$||null,mod:en}},BN.prototype.divmod=function(O,U,$){var J,en,es;return(assert(!O.isZero()),this.isZero())?{div:new BN(0),mod:new BN(0)}:0!==this.negative&&0===O.negative?(es=this.neg().divmod(O,U),"mod"!==U&&(J=es.div.neg()),"div"!==U&&(en=es.mod.neg(),$&&0!==en.negative&&en.iadd(O)),{div:J,mod:en}):0===this.negative&&0!==O.negative?(es=this.divmod(O.neg(),U),"mod"!==U&&(J=es.div.neg()),{div:J,mod:es.mod}):(this.negative&O.negative)!=0?(es=this.neg().divmod(O.neg(),U),"div"!==U&&(en=es.mod.neg(),$&&0!==en.negative&&en.isub(O)),{div:es.div,mod:en}):O.length>this.length||0>this.cmp(O)?{div:new BN(0),mod:this}:1===O.length?"div"===U?{div:this.divn(O.words[0]),mod:null}:"mod"===U?{div:null,mod:new BN(this.modrn(O.words[0]))}:{div:this.divn(O.words[0]),mod:new BN(this.modrn(O.words[0]))}:this._wordDiv(O,U)},BN.prototype.div=function(O){return this.divmod(O,"div",!1).div},BN.prototype.mod=function(O){return this.divmod(O,"mod",!1).mod},BN.prototype.umod=function(O){return this.divmod(O,"mod",!0).mod},BN.prototype.divRound=function(O){var U=this.divmod(O);if(U.mod.isZero())return U.div;var $=0!==U.div.negative?U.mod.isub(O):U.mod,J=O.ushrn(1),en=O.andln(1),es=$.cmp(J);return es<0||1===en&&0===es?U.div:0!==U.div.negative?U.div.isubn(1):U.div.iaddn(1)},BN.prototype.modrn=function(O){var U=O<0;U&&(O=-O),assert(O<=67108863);for(var $=67108864%O,J=0,en=this.length-1;en>=0;en--)J=($*J+(0|this.words[en]))%O;return U?-J:J},BN.prototype.modn=function(O){return this.modrn(O)},BN.prototype.idivn=function(O){var U=O<0;U&&(O=-O),assert(O<=67108863);for(var $=0,J=this.length-1;J>=0;J--){var en=(0|this.words[J])+67108864*$;this.words[J]=en/O|0,$=en%O}return this._strip(),U?this.ineg():this},BN.prototype.divn=function(O){return this.clone().idivn(O)},BN.prototype.egcd=function(O){assert(0===O.negative),assert(!O.isZero());var U=this,$=O.clone();U=0!==U.negative?U.umod(O):U.clone();for(var J=new BN(1),en=new BN(0),es=new BN(0),eo=new BN(1),ea=0;U.isEven()&&$.isEven();)U.iushrn(1),$.iushrn(1),++ea;for(var eu=$.clone(),ef=U.clone();!U.isZero();){for(var eg=0,ev=1;(U.words[0]&ev)==0&&eg<26;++eg,ev<<=1);if(eg>0)for(U.iushrn(eg);eg-- >0;)(J.isOdd()||en.isOdd())&&(J.iadd(eu),en.isub(ef)),J.iushrn(1),en.iushrn(1);for(var e_=0,ew=1;($.words[0]&ew)==0&&e_<26;++e_,ew<<=1);if(e_>0)for($.iushrn(e_);e_-- >0;)(es.isOdd()||eo.isOdd())&&(es.iadd(eu),eo.isub(ef)),es.iushrn(1),eo.iushrn(1);U.cmp($)>=0?(U.isub($),J.isub(es),en.isub(eo)):($.isub(U),es.isub(J),eo.isub(en))}return{a:es,b:eo,gcd:$.iushln(ea)}},BN.prototype._invmp=function(O){assert(0===O.negative),assert(!O.isZero());var U,$=this,J=O.clone();$=0!==$.negative?$.umod(O):$.clone();for(var en=new BN(1),es=new BN(0),eo=J.clone();$.cmpn(1)>0&&J.cmpn(1)>0;){for(var ea=0,eu=1;($.words[0]&eu)==0&&ea<26;++ea,eu<<=1);if(ea>0)for($.iushrn(ea);ea-- >0;)en.isOdd()&&en.iadd(eo),en.iushrn(1);for(var ef=0,eg=1;(J.words[0]&eg)==0&&ef<26;++ef,eg<<=1);if(ef>0)for(J.iushrn(ef);ef-- >0;)es.isOdd()&&es.iadd(eo),es.iushrn(1);$.cmp(J)>=0?($.isub(J),en.isub(es)):(J.isub($),es.isub(en))}return 0>(U=0===$.cmpn(1)?en:es).cmpn(0)&&U.iadd(O),U},BN.prototype.gcd=function(O){if(this.isZero())return O.abs();if(O.isZero())return this.abs();var U=this.clone(),$=O.clone();U.negative=0,$.negative=0;for(var J=0;U.isEven()&&$.isEven();J++)U.iushrn(1),$.iushrn(1);for(;;){for(;U.isEven();)U.iushrn(1);for(;$.isEven();)$.iushrn(1);var en=U.cmp($);if(en<0){var es=U;U=$,$=es}else if(0===en||0===$.cmpn(1))break;U.isub($)}return $.iushln(J)},BN.prototype.invm=function(O){return this.egcd(O).a.umod(O)},BN.prototype.isEven=function(){return(1&this.words[0])==0},BN.prototype.isOdd=function(){return(1&this.words[0])==1},BN.prototype.andln=function(O){return this.words[0]&O},BN.prototype.bincn=function(O){assert("number"==typeof O);var U=O%26,$=(O-U)/26,J=1<>>26,eo&=67108863,this.words[es]=eo}return 0!==en&&(this.words[es]=en,this.length++),this},BN.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},BN.prototype.cmpn=function(O){var U,$=O<0;if(0!==this.negative&&!$)return -1;if(0===this.negative&&$)return 1;if(this._strip(),this.length>1)U=1;else{$&&(O=-O),assert(O<=67108863,"Number is too big");var J=0|this.words[0];U=J===O?0:JO.length)return 1;if(this.length=0;$--){var J=0|this.words[$],en=0|O.words[$];if(J!==en){Jen&&(U=1);break}}return U},BN.prototype.gtn=function(O){return 1===this.cmpn(O)},BN.prototype.gt=function(O){return 1===this.cmp(O)},BN.prototype.gten=function(O){return this.cmpn(O)>=0},BN.prototype.gte=function(O){return this.cmp(O)>=0},BN.prototype.ltn=function(O){return -1===this.cmpn(O)},BN.prototype.lt=function(O){return -1===this.cmp(O)},BN.prototype.lten=function(O){return 0>=this.cmpn(O)},BN.prototype.lte=function(O){return 0>=this.cmp(O)},BN.prototype.eqn=function(O){return 0===this.cmpn(O)},BN.prototype.eq=function(O){return 0===this.cmp(O)},BN.red=function(O){return new Red(O)},BN.prototype.toRed=function(O){return assert(!this.red,"Already a number in reduction context"),assert(0===this.negative,"red works only with positives"),O.convertTo(this)._forceRed(O)},BN.prototype.fromRed=function(){return assert(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},BN.prototype._forceRed=function(O){return this.red=O,this},BN.prototype.forceRed=function(O){return assert(!this.red,"Already a number in reduction context"),this._forceRed(O)},BN.prototype.redAdd=function(O){return assert(this.red,"redAdd works only with red numbers"),this.red.add(this,O)},BN.prototype.redIAdd=function(O){return assert(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,O)},BN.prototype.redSub=function(O){return assert(this.red,"redSub works only with red numbers"),this.red.sub(this,O)},BN.prototype.redISub=function(O){return assert(this.red,"redISub works only with red numbers"),this.red.isub(this,O)},BN.prototype.redShl=function(O){return assert(this.red,"redShl works only with red numbers"),this.red.shl(this,O)},BN.prototype.redMul=function(O){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.mul(this,O)},BN.prototype.redIMul=function(O){return assert(this.red,"redMul works only with red numbers"),this.red._verify2(this,O),this.red.imul(this,O)},BN.prototype.redSqr=function(){return assert(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},BN.prototype.redISqr=function(){return assert(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},BN.prototype.redSqrt=function(){return assert(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},BN.prototype.redInvm=function(){return assert(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},BN.prototype.redNeg=function(){return assert(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},BN.prototype.redPow=function(O){return assert(this.red&&!O.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,O)};var ea={k256:null,p224:null,p192:null,p25519:null};function MPrime(O,U){this.name=O,this.p=new BN(U,16),this.n=this.p.bitLength(),this.k=new BN(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function K256(){MPrime.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function P224(){MPrime.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function P192(){MPrime.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P25519(){MPrime.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function Red(O){if("string"==typeof O){var U=BN._prime(O);this.m=U.p,this.prime=U}else assert(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}function Mont(O){Red.call(this,O),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new BN(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)}MPrime.prototype._tmp=function(){var O=new BN(null);return O.words=Array(Math.ceil(this.n/13)),O},MPrime.prototype.ireduce=function(O){var U,$=O;do this.split($,this.tmp),U=($=($=this.imulK($)).iadd(this.tmp)).bitLength();while(U>this.n);var J=U0?$.isub(this.p):void 0!==$.strip?$.strip():$._strip(),$},MPrime.prototype.split=function(O,U){O.iushrn(this.n,0,U)},MPrime.prototype.imulK=function(O){return O.imul(this.k)},inherits(K256,MPrime),K256.prototype.split=function(O,U){for(var $=4194303,J=Math.min(O.length,9),en=0;en>>22,es=eo}es>>>=22,O.words[en-10]=es,0===es&&O.length>10?O.length-=10:O.length-=9},K256.prototype.imulK=function(O){O.words[O.length]=0,O.words[O.length+1]=0,O.length+=2;for(var U=0,$=0;$>>=26,O.words[$]=en,U=J}return 0!==U&&(O.words[O.length++]=U),O},BN._prime=function(O){var U;if(ea[O])return ea[O];if("k256"===O)U=new K256;else if("p224"===O)U=new P224;else if("p192"===O)U=new P192;else if("p25519"===O)U=new P25519;else throw Error("Unknown prime "+O);return ea[O]=U,U},Red.prototype._verify1=function(O){assert(0===O.negative,"red works only with positives"),assert(O.red,"red works only with red numbers")},Red.prototype._verify2=function(O,U){assert((O.negative|U.negative)==0,"red works only with positives"),assert(O.red&&O.red===U.red,"red works only with red numbers")},Red.prototype.imod=function(O){return this.prime?this.prime.ireduce(O)._forceRed(this):(move(O,O.umod(this.m)._forceRed(this)),O)},Red.prototype.neg=function(O){return O.isZero()?O.clone():this.m.sub(O)._forceRed(this)},Red.prototype.add=function(O,U){this._verify2(O,U);var $=O.add(U);return $.cmp(this.m)>=0&&$.isub(this.m),$._forceRed(this)},Red.prototype.iadd=function(O,U){this._verify2(O,U);var $=O.iadd(U);return $.cmp(this.m)>=0&&$.isub(this.m),$},Red.prototype.sub=function(O,U){this._verify2(O,U);var $=O.sub(U);return 0>$.cmpn(0)&&$.iadd(this.m),$._forceRed(this)},Red.prototype.isub=function(O,U){this._verify2(O,U);var $=O.isub(U);return 0>$.cmpn(0)&&$.iadd(this.m),$},Red.prototype.shl=function(O,U){return this._verify1(O),this.imod(O.ushln(U))},Red.prototype.imul=function(O,U){return this._verify2(O,U),this.imod(O.imul(U))},Red.prototype.mul=function(O,U){return this._verify2(O,U),this.imod(O.mul(U))},Red.prototype.isqr=function(O){return this.imul(O,O.clone())},Red.prototype.sqr=function(O){return this.mul(O,O)},Red.prototype.sqrt=function(O){if(O.isZero())return O.clone();var U=this.m.andln(3);if(assert(U%2==1),3===U){var $=this.m.add(new BN(1)).iushrn(2);return this.pow(O,$)}for(var J=this.m.subn(1),en=0;!J.isZero()&&0===J.andln(1);)en++,J.iushrn(1);assert(!J.isZero());var es=new BN(1).toRed(this),eo=es.redNeg(),ea=this.m.subn(1).iushrn(1),eu=this.m.bitLength();for(eu=new BN(2*eu*eu).toRed(this);0!==this.pow(eu,ea).cmp(eo);)eu.redIAdd(eo);for(var ef=this.pow(eu,J),eg=this.pow(O,J.addn(1).iushrn(1)),ev=this.pow(O,J),e_=en;0!==ev.cmp(es);){for(var ew=ev,eE=0;0!==ew.cmp(es);eE++)ew=ew.redSqr();assert(eE=0;en--){for(var ef=U.words[en],eg=eu-1;eg>=0;eg--){var ev=ef>>eg&1;if(es!==J[0]&&(es=this.sqr(es)),0===ev&&0===eo){ea=0;continue}eo<<=1,eo|=ev,(++ea===$||0===en&&0===eg)&&(es=this.mul(es,J[eo]),ea=0,eo=0)}eu=26}return es},Red.prototype.convertTo=function(O){var U=O.umod(this.m);return U===O?U.clone():U},Red.prototype.convertFrom=function(O){var U=O.clone();return U.red=null,U},BN.mont=function(O){return new Mont(O)},inherits(Mont,Red),Mont.prototype.convertTo=function(O){return this.imod(O.ushln(this.shift))},Mont.prototype.convertFrom=function(O){var U=this.imod(O.mul(this.rinv));return U.red=null,U},Mont.prototype.imul=function(O,U){if(O.isZero()||U.isZero())return O.words[0]=0,O.length=1,O;var $=O.imul(U),J=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),en=$.isub(J).iushrn(this.shift),es=en;return en.cmp(this.m)>=0?es=en.isub(this.m):0>en.cmpn(0)&&(es=en.iadd(this.m)),es._forceRed(this)},Mont.prototype.mul=function(O,U){if(O.isZero()||U.isZero())return new BN(0)._forceRed(this);var $=O.mul(U),J=$.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),en=$.isub(J).iushrn(this.shift),es=en;return en.cmp(this.m)>=0?es=en.isub(this.m):0>en.cmpn(0)&&(es=en.iadd(this.m)),es._forceRed(this)},Mont.prototype.invm=function(O){return this.imod(O._invmp(this.m).mul(this.r2))._forceRed(this)}}(O=$.nmd(O),this)},4461:function(O,U,$){var J=$(2601);function useColors(){return"undefined"!=typeof window&&!!window.process&&("renderer"===window.process.type||!!window.process.__nwjs)||!("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function formatArgs(U){if(U[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+U[0]+(this.useColors?"%c ":" ")+"+"+O.exports.humanize(this.diff),!this.useColors)return;let $="color: "+this.color;U.splice(1,0,$,"color: inherit");let J=0,en=0;U[0].replace(/%[a-zA-Z%]/g,O=>{"%%"!==O&&(J++,"%c"===O&&(en=J))}),U.splice(en,0,$)}function save(O){try{O?U.storage.setItem("debug",O):U.storage.removeItem("debug")}catch(O){}}function load(){let O;try{O=U.storage.getItem("debug")}catch(O){}return!O&&void 0!==J&&"env"in J&&(O=J.env.DEBUG),O}function localstorage(){try{return localStorage}catch(O){}}U.formatArgs=formatArgs,U.save=save,U.load=load,U.useColors=useColors,U.storage=localstorage(),U.destroy=(()=>{let O=!1;return()=>{O||(O=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),U.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],U.log=console.debug||console.log||(()=>{}),O.exports=$(4239)(U);let{formatters:en}=O.exports;en.j=function(O){try{return JSON.stringify(O)}catch(O){return"[UnexpectedJSONParseError]: "+O.message}}},4239:function(O,U,$){function setup(O){function selectColor(O){let U=0;for(let $=0;${if("%%"===U)return"%";es++;let en=createDebug.formatters[J];if("function"==typeof en){let J=O[es];U=en.call($,J),O.splice(es,1),es--}return U}),createDebug.formatArgs.call($,O);let eo=$.log||createDebug.log;eo.apply($,O)}return debug.namespace=O,debug.useColors=createDebug.useColors(),debug.color=createDebug.selectColor(O),debug.extend=extend,debug.destroy=createDebug.destroy,Object.defineProperty(debug,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==en?en:($!==createDebug.namespaces&&($=createDebug.namespaces,J=createDebug.enabled(O)),J),set:O=>{en=O}}),"function"==typeof createDebug.init&&createDebug.init(debug),debug}function extend(O,U){let $=createDebug(this.namespace+(void 0===U?":":U)+O);return $.log=this.log,$}function enable(O){let U;createDebug.save(O),createDebug.namespaces=O,createDebug.names=[],createDebug.skips=[];let $=("string"==typeof O?O:"").split(/[\s,]+/),J=$.length;for(U=0;U"-"+O)].join(",");return createDebug.enable(""),O}function enabled(O){let U,$;if("*"===O[O.length-1])return!0;for(U=0,$=createDebug.skips.length;U<$;U++)if(createDebug.skips[U].test(O))return!1;for(U=0,$=createDebug.names.length;U<$;U++)if(createDebug.names[U].test(O))return!0;return!1}function toNamespace(O){return O.toString().substring(2,O.toString().length-2).replace(/\.\*\?$/,"*")}function coerce(O){return O instanceof Error?O.stack||O.message:O}function destroy(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return createDebug.debug=createDebug,createDebug.default=createDebug,createDebug.coerce=coerce,createDebug.disable=disable,createDebug.enable=enable,createDebug.enabled=enabled,createDebug.humanize=$(438),createDebug.destroy=destroy,Object.keys(O).forEach(U=>{createDebug[U]=O[U]}),createDebug.names=[],createDebug.skips=[],createDebug.formatters={},createDebug.selectColor=selectColor,createDebug.enable(createDebug.load()),createDebug}O.exports=setup},2185:function(O){"use strict";function Denque(O,U){var U=U||{};this._capacity=U.capacity,this._head=0,this._tail=0,Array.isArray(O)?this._fromArray(O):(this._capacityMask=3,this._list=[,,,,])}Denque.prototype.peekAt=function(O){var U=O;if(U===(0|U)){var $=this.size();if(!(U>=$)&&!(U<-$))return U<0&&(U+=$),U=this._head+U&this._capacityMask,this._list[U]}},Denque.prototype.get=function(O){return this.peekAt(O)},Denque.prototype.peek=function(){if(this._head!==this._tail)return this._list[this._head]},Denque.prototype.peekFront=function(){return this.peek()},Denque.prototype.peekBack=function(){return this.peekAt(-1)},Object.defineProperty(Denque.prototype,"length",{get:function(){return this.size()}}),Denque.prototype.size=function(){return this._head===this._tail?0:this._headthis._capacity&&this.pop(),this._head1e4&&this._tail<=this._list.length>>>2&&this._shrinkArray(),U}},Denque.prototype.push=function(O){if(0==arguments.length)return this.size();var U=this._tail;return(this._list[U]=O,this._tail=U+1&this._capacityMask,this._tail===this._head&&this._growArray(),this._capacity&&this.size()>this._capacity&&this.shift(),this._head1e4&&O<=U>>>2&&this._shrinkArray(),$}},Denque.prototype.removeOne=function(O){var U,$=O;if($===(0|$)&&this._head!==this._tail){var J=this.size(),en=this._list.length;if(!($>=J)&&!($<-J)){$<0&&($+=J),$=this._head+$&this._capacityMask;var es=this._list[$];if(O0;U--)this._list[$]=this._list[$=$-1+en&this._capacityMask];this._list[$]=void 0,this._head=this._head+1+en&this._capacityMask}else{for(U=J-1-O;U>0;U--)this._list[$]=this._list[$=$+1+en&this._capacityMask];this._list[$]=void 0,this._tail=this._tail-1+en&this._capacityMask}return es}}},Denque.prototype.remove=function(O,U){var $,J,en=O,es=U;if(en===(0|en)&&this._head!==this._tail){var eo=this.size(),ea=this._list.length;if(!(en>=eo)&&!(en<-eo)&&!(U<1)){if(en<0&&(en+=eo),1===U||!U)return($=[,])[0]=this.removeOne(en),$;if(0===en&&en+U>=eo)return $=this.toArray(),this.clear(),$;for(en+U>eo&&(U=eo-en),$=Array(U),J=0;J0;J--)this._list[en=en+1+ea&this._capacityMask]=void 0;return $}if(0===O){for(this._head=this._head+U+ea&this._capacityMask,J=U-1;J>0;J--)this._list[en=en+1+ea&this._capacityMask]=void 0;return $}if(en0;J--)this.unshift(this._list[en=en-1+ea&this._capacityMask]);for(en=this._head-1+ea&this._capacityMask;es>0;)this._list[en=en-1+ea&this._capacityMask]=void 0,es--;O<0&&(this._tail=en)}else{for(this._tail=en,en=en+U+ea&this._capacityMask,J=eo-(U+O);J>0;J--)this.push(this._list[en++]);for(en=this._tail;es>0;)this._list[en=en+1+ea&this._capacityMask]=void 0,es--}return this._head<2&&this._tail>1e4&&this._tail<=ea>>>2&&this._shrinkArray(),$}}},Denque.prototype.splice=function(O,U){var $=O;if($===(0|$)){var J=this.size();if($<0&&($+=J),!($>J)){if(!(arguments.length>2))return this.remove($,U);var en,es,eo,ea=arguments.length,eu=this._list.length,ef=2;if(!J||$0&&(this._head=this._head+$+eu&this._capacityMask)):(eo=this.remove($,U),this._head=this._head+$+eu&this._capacityMask);ea>ef;)this.unshift(arguments[--ea]);for(en=$;en>0;en--)this.unshift(es[en-1])}else{var eg=(es=Array(J-($+U))).length;for(en=0;enthis._tail){for($=this._head;$>>=1,this._capacityMask>>>=1},Denque.prototype._nextPowerOf2=function(O){return Math.max(1<(this.addEventListener(O,$,U),()=>this.removeEventListener(O,$,U)),$)},en.EventIterator},9831:function(O,U){"use strict";Object.defineProperty(U,"__esModule",{value:!0});let EventQueue=class EventQueue{constructor(){this.pullQueue=[],this.pushQueue=[],this.eventHandlers={},this.isPaused=!1,this.isStopped=!1}push(O){if(this.isStopped)return;let U={value:O,done:!1};if(this.pullQueue.length){let O=this.pullQueue.shift();O&&O.resolve(U)}else this.pushQueue.push(Promise.resolve(U)),void 0!==this.highWaterMark&&this.pushQueue.length>=this.highWaterMark&&!this.isPaused&&(this.isPaused=!0,this.eventHandlers.highWater?this.eventHandlers.highWater():console&&console.warn(`EventIterator queue reached ${this.pushQueue.length} items`))}stop(){if(!this.isStopped){for(let O of(this.isStopped=!0,this.remove(),this.pullQueue))O.resolve({value:void 0,done:!0});this.pullQueue.length=0}}fail(O){if(!this.isStopped){if(this.isStopped=!0,this.remove(),this.pullQueue.length){for(let U of this.pullQueue)U.reject(O);this.pullQueue.length=0}else{let U=Promise.reject(O);U.catch(()=>{}),this.pushQueue.push(U)}}}remove(){Promise.resolve().then(()=>{this.removeCallback&&this.removeCallback()})}[Symbol.asyncIterator](){return{next:O=>{let U=this.pushQueue.shift();return U?(void 0!==this.lowWaterMark&&this.pushQueue.length<=this.lowWaterMark&&this.isPaused&&(this.isPaused=!1,this.eventHandlers.lowWater&&this.eventHandlers.lowWater()),U):this.isStopped?Promise.resolve({value:void 0,done:!0}):new Promise((O,U)=>{this.pullQueue.push({resolve:O,reject:U})})},return:()=>(this.isStopped=!0,this.pushQueue.length=0,this.remove(),Promise.resolve({value:void 0,done:!0}))}}};let EventIterator=class EventIterator{constructor(O,{highWaterMark:U=100,lowWaterMark:$=1}={}){let J=new EventQueue;J.highWaterMark=U,J.lowWaterMark=$,J.removeCallback=O({push:O=>J.push(O),stop:()=>J.stop(),fail:O=>J.fail(O),on:(O,U)=>{J.eventHandlers[O]=U}})||(()=>{}),this[Symbol.asyncIterator]=()=>J[Symbol.asyncIterator](),Object.freeze(this)}};U.EventIterator=EventIterator,U.default=EventIterator},8729:function(O){"use strict";var U=Object.prototype.hasOwnProperty,$="~";function Events(){}function EE(O,U,$){this.fn=O,this.context=U,this.once=$||!1}function addListener(O,U,J,en,es){if("function"!=typeof J)throw TypeError("The listener must be a function");var eo=new EE(J,en||O,es),ea=$?$+U:U;return O._events[ea]?O._events[ea].fn?O._events[ea]=[O._events[ea],eo]:O._events[ea].push(eo):(O._events[ea]=eo,O._eventsCount++),O}function clearEvent(O,U){0==--O._eventsCount?O._events=new Events:delete O._events[U]}function EventEmitter(){this._events=new Events,this._eventsCount=0}Object.create&&(Events.prototype=Object.create(null),new Events().__proto__||($=!1)),EventEmitter.prototype.eventNames=function(){var O,J,en=[];if(0===this._eventsCount)return en;for(J in O=this._events)U.call(O,J)&&en.push($?J.slice(1):J);return Object.getOwnPropertySymbols?en.concat(Object.getOwnPropertySymbols(O)):en},EventEmitter.prototype.listeners=function(O){var U=$?$+O:O,J=this._events[U];if(!J)return[];if(J.fn)return[J.fn];for(var en=0,es=J.length,eo=Array(es);en0&&eo.length>en&&!eo.warned){eo.warned=!0;var en,es,eo,ea=Error("Possible EventEmitter memory leak detected. "+eo.length+" "+String(U)+" listeners added. Use emitter.setMaxListeners() to increase limit");ea.name="MaxListenersExceededWarning",ea.emitter=O,ea.type=U,ea.count=eo.length,ProcessEmitWarning(ea)}return O}function onceWrapper(){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 _onceWrap(O,U,$){var J={fired:!1,wrapFn:void 0,target:O,type:U,listener:$},en=onceWrapper.bind(J);return en.listener=$,J.wrapFn=en,en}function _listeners(O,U,$){var J=O._events;if(void 0===J)return[];var en=J[U];return void 0===en?[]:"function"==typeof en?$?[en.listener||en]:[en]:$?unwrapListeners(en):arrayClone(en,en.length)}function listenerCount(O){var U=this._events;if(void 0!==U){var $=U[O];if("function"==typeof $)return 1;if(void 0!==$)return $.length}return 0}function arrayClone(O,U){for(var $=Array(U),J=0;J0&&(eo=U[0]),eo instanceof Error)throw eo;var eo,ea=Error("Unhandled error."+(eo?" ("+eo.message+")":""));throw ea.context=eo,ea}var eu=es[O];if(void 0===eu)return!1;if("function"==typeof eu)J(eu,this,U);else for(var ef=eu.length,eg=arrayClone(eu,ef),$=0;$=0;es--)if($[es]===U||$[es].listener===U){eo=$[es].listener,en=es;break}if(en<0)return this;0===en?$.shift():spliceOne($,en),1===$.length&&(J[O]=$[0]),void 0!==J.removeListener&&this.emit("removeListener",O,eo||U)}return this},EventEmitter.prototype.off=EventEmitter.prototype.removeListener,EventEmitter.prototype.removeAllListeners=function(O){var U,$,J;if(void 0===($=this._events))return this;if(void 0===$.removeListener)return 0==arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==$[O]&&(0==--this._eventsCount?this._events=Object.create(null):delete $[O]),this;if(0==arguments.length){var en,es=Object.keys($);for(J=0;J=0;J--)this.removeListener(O,U[J]);return this},EventEmitter.prototype.listeners=function(O){return _listeners(this,O,!0)},EventEmitter.prototype.rawListeners=function(O){return _listeners(this,O,!1)},EventEmitter.listenerCount=function(O,U){return"function"==typeof O.listenerCount?O.listenerCount(U):listenerCount.call(O,U)},EventEmitter.prototype.listenerCount=listenerCount,EventEmitter.prototype.eventNames=function(){return this._eventsCount>0?U(this._events):[]}},5336:function(O,U,$){var J=U;J.utils=$(5794),J.common=$(9619),J.sha=$(3610),J.ripemd=$(7721),J.hmac=$(6432),J.sha1=J.sha.sha1,J.sha256=J.sha.sha256,J.sha224=J.sha.sha224,J.sha384=J.sha.sha384,J.sha512=J.sha.sha512,J.ripemd160=J.ripemd.ripemd160},9619:function(O,U,$){"use strict";var J=$(5794),en=$(8786);function BlockHash(){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}U.BlockHash=BlockHash,BlockHash.prototype.update=function(O,U){if(O=J.toArray(O,U),this.pending?this.pending=this.pending.concat(O):this.pending=O,this.pendingTotal+=O.length,this.pending.length>=this._delta8){var $=(O=this.pending).length%this._delta8;this.pending=O.slice(O.length-$,O.length),0===this.pending.length&&(this.pending=null),O=J.join32(O,0,O.length-$,this.endian);for(var en=0;en>>24&255,J[en++]=O>>>16&255,J[en++]=O>>>8&255,J[en++]=255&O}else for(es=8,J[en++]=255&O,J[en++]=O>>>8&255,J[en++]=O>>>16&255,J[en++]=O>>>24&255,J[en++]=0,J[en++]=0,J[en++]=0,J[en++]=0;esthis.blockSize&&(O=new this.Hash().update(O).digest()),en(O.length<=this.blockSize);for(var U=O.length;U>>3}function g1_256(O){return J(O,17)^J(O,19)^O>>>10}U.ft_1=ft_1,U.ch32=ch32,U.maj32=maj32,U.p32=p32,U.s0_256=s0_256,U.s1_256=s1_256,U.g0_256=g0_256,U.g1_256=g1_256},5794:function(O,U,$){"use strict";var J=$(8786),en=$(5335);function isSurrogatePair(O,U){return(64512&O.charCodeAt(U))==55296&&!(U<0)&&!(U+1>=O.length)&&(64512&O.charCodeAt(U+1))==56320}function toArray(O,U){if(Array.isArray(O))return O.slice();if(!O)return[];var $=[];if("string"==typeof O){if(U){if("hex"===U)for((O=O.replace(/[^a-z0-9]+/ig,"")).length%2!=0&&(O="0"+O),en=0;en>6|192:(isSurrogatePair(O,en)?(es=65536+((1023&es)<<10)+(1023&O.charCodeAt(++en)),$[J++]=es>>18|240,$[J++]=es>>12&63|128):$[J++]=es>>12|224,$[J++]=es>>6&63|128),$[J++]=63&es|128)}}else for(en=0;en>>24|O>>>8&65280|O<<8&16711680|(255&O)<<24)>>>0}function toHex32(O,U){for(var $="",J=0;J>>0;return ea}function split32(O,U){for(var $=Array(4*O.length),J=0,en=0;J>>24,$[en+1]=es>>>16&255,$[en+2]=es>>>8&255,$[en+3]=255&es):($[en+3]=es>>>24,$[en+2]=es>>>16&255,$[en+1]=es>>>8&255,$[en]=255&es)}return $}function rotr32(O,U){return O>>>U|O<<32-U}function rotl32(O,U){return O<>>32-U}function sum32(O,U){return O+U>>>0}function sum32_3(O,U,$){return O+U+$>>>0}function sum32_4(O,U,$,J){return O+U+$+J>>>0}function sum32_5(O,U,$,J,en){return O+U+$+J+en>>>0}function sum64(O,U,$,J){var en=O[U],es=J+O[U+1]>>>0,eo=(es>>0,O[U+1]=es}function sum64_hi(O,U,$,J){return(U+J>>>0>>0}function sum64_lo(O,U,$,J){return U+J>>>0}function sum64_4_hi(O,U,$,J,en,es,eo,ea){var eu,ef=U;return O+$+en+eo+(eu=0+((ef=ef+J>>>0)>>0)>>0)>>0}function sum64_4_lo(O,U,$,J,en,es,eo,ea){return U+J+es+ea>>>0}function sum64_5_hi(O,U,$,J,en,es,eo,ea,eu,ef){var eg,ev=U;return O+$+en+eo+eu+(eg=0+((ev=ev+J>>>0)>>0)>>0)>>0)>>0}function sum64_5_lo(O,U,$,J,en,es,eo,ea,eu,ef){return U+J+es+ea+ef>>>0}function rotr64_hi(O,U,$){return(U<<32-$|O>>>$)>>>0}function rotr64_lo(O,U,$){return(O<<32-$|U>>>$)>>>0}function shr64_hi(O,U,$){return O>>>$}function shr64_lo(O,U,$){return(O<<32-$|U>>>$)>>>0}U.inherits=en,U.toArray=toArray,U.toHex=toHex,U.htonl=htonl,U.toHex32=toHex32,U.zero2=zero2,U.zero8=zero8,U.join32=join32,U.split32=split32,U.rotr32=rotr32,U.rotl32=rotl32,U.sum32=sum32,U.sum32_3=sum32_3,U.sum32_4=sum32_4,U.sum32_5=sum32_5,U.sum64=sum64,U.sum64_hi=sum64_hi,U.sum64_lo=sum64_lo,U.sum64_4_hi=sum64_4_hi,U.sum64_4_lo=sum64_4_lo,U.sum64_5_hi=sum64_5_hi,U.sum64_5_lo=sum64_5_lo,U.rotr64_hi=rotr64_hi,U.rotr64_lo=rotr64_lo,U.shr64_hi=shr64_hi,U.shr64_lo=shr64_lo},7935:function(O,U,$){var J,en=$(2601);!function(){"use strict";var U="object"==typeof window?window:{};!U.HI_BASE32_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node&&(U=$.g);var es=!U.HI_BASE32_NO_COMMON_JS&&O.exports,eo=$.amdO,ea="ABCDEFGHIJKLMNOPQRSTUVWXYZ234567".split(""),eu={A:0,B:1,C:2,D:3,E:4,F:5,G:6,H:7,I:8,J:9,K:10,L:11,M:12,N:13,O:14,P:15,Q:16,R:17,S:18,T:19,U:20,V:21,W:22,X:23,Y:24,Z:25,2:26,3:27,4:28,5:29,6:30,7:31},ef=[0,0,0,0,0,0,0,0],throwInvalidUtf8=function(O,U){U.length>10&&(U="..."+U.substr(-10));var $=Error("Decoded data is not valid UTF-8. Maybe try base32.decode.asBytes()? Partial data after reading "+O+" bytes: "+U+" <-");throw $.position=O,$},toUtf8String=function(O){for(var U,$,J="",en=O.length,es=0,eo=0;es191&&U<=223?($=31&U,eo=1):U<=239?($=15&U,eo=2):U<=247?($=7&U,eo=3):throwInvalidUtf8(es,J);for(var ea=0;ea191)&&throwInvalidUtf8(es,J),$<<=6,$+=63&U;$>=55296&&$<=57343&&throwInvalidUtf8(es,J),$>1114111&&throwInvalidUtf8(es,J),$<=65535?J+=String.fromCharCode($):($-=65536,J+=String.fromCharCode(($>>10)+55296)+String.fromCharCode((1023&$)+56320))}return J},decodeAsBytes=function(O){if(""===O)return[];if(!/^[A-Z2-7=]+$/.test(O))throw Error("Invalid base32 characters");O=O.replace(/=/g,"");for(var U,$,J,en,es,eo,ea,ef,eg=[],ev=0,e_=O.length,ew=0,eE=e_>>3<<3;ew>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255,eg[ev++]=(es<<7|eo<<2|ea>>>3)&255,eg[ev++]=(ea<<5|ef)&255;var eS=e_-eE;return 2===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255):4===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255):5===eS?(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255):7===eS&&(U=eu[O.charAt(ew++)],$=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ea=eu[O.charAt(ew++)],eg[ev++]=(U<<3|$>>>2)&255,eg[ev++]=($<<6|J<<1|en>>>4)&255,eg[ev++]=(en<<4|es>>>1)&255,eg[ev++]=(es<<7|eo<<2|ea>>>3)&255),eg},encodeAscii=function(O){for(var U,$,J,en,es,eo="",eu=O.length,ef=0,eg=5*parseInt(eu/5);ef>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es];var ev=eu-eg;return 1===ev?eo+=ea[(U=O.charCodeAt(ef))>>>3]+ea[U<<2&31]+"======":2===ev?(U=O.charCodeAt(ef++),$=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===ev?(U=O.charCodeAt(ef++),$=O.charCodeAt(ef++),J=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):4===ev&&(U=O.charCodeAt(ef++),$=O.charCodeAt(ef++),J=O.charCodeAt(ef++),en=O.charCodeAt(ef),eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"="),eo},encodeUtf8=function(O){var U,$,J,en,es,eo,eu,eg=!1,ev="",e_=0,ew=0,eE=0,eS=O.length;if(""===O)return ev;do{for(ef[0]=ef[5],ef[1]=ef[6],ef[2]=ef[7],eu=ew;e_>6:(eo<55296||eo>=57344?ef[eu++]=224|eo>>12:(eo=65536+((1023&eo)<<10|1023&O.charCodeAt(++e_)),ef[eu++]=240|eo>>18,ef[eu++]=128|eo>>12&63),ef[eu++]=128|eo>>6&63),ef[eu++]=128|63&eo);eE+=eu-ew,ew=eu-5,e_===eS&&++e_,e_>eS&&eu<6&&(eg=!0),U=ef[0],eu>4?($=ef[1],J=ef[2],en=ef[3],es=ef[4],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es]):1===eu?ev+=ea[U>>>3]+ea[U<<2&31]+"======":2===eu?($=ef[1],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===eu?($=ef[1],J=ef[2],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):($=ef[1],J=ef[2],en=ef[3],ev+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"=")}while(!eg);return ev},encodeBytes=function(O){for(var U,$,J,en,es,eo="",eu=O.length,ef=0,eg=5*parseInt(eu/5);ef>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[(en<<3|es>>>5)&31]+ea[31&es];var ev=eu-eg;return 1===ev?eo+=ea[(U=O[ef])>>>3]+ea[U<<2&31]+"======":2===ev?(U=O[ef++],$=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[$<<4&31]+"===="):3===ev?(U=O[ef++],$=O[ef++],J=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[J<<1&31]+"==="):4===ev&&(U=O[ef++],$=O[ef++],J=O[ef++],en=O[ef],eo+=ea[U>>>3]+ea[(U<<2|$>>>6)&31]+ea[$>>>1&31]+ea[($<<4|J>>>4)&31]+ea[(J<<1|en>>>7)&31]+ea[en>>>2&31]+ea[en<<3&31]+"="),eo},decode=function(O,U){if(!U)return toUtf8String(decodeAsBytes(O));if(""===O)return"";if(!/^[A-Z2-7=]+$/.test(O))throw Error("Invalid base32 characters");var $,J,en,es,eo,ea,ef,eg,ev="",e_=O.indexOf("=");-1===e_&&(e_=O.length);for(var ew=0,eE=e_>>3<<3;ew>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)+String.fromCharCode((eo<<7|ea<<2|ef>>>3)&255)+String.fromCharCode((ef<<5|eg)&255);var eS=e_-eE;return 2===eS?ev+=String.fromCharCode((($=eu[O.charAt(ew++)])<<3|(J=eu[O.charAt(ew++)])>>>2)&255):4===eS?($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)):5===eS?($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)):7===eS&&($=eu[O.charAt(ew++)],J=eu[O.charAt(ew++)],en=eu[O.charAt(ew++)],es=eu[O.charAt(ew++)],eo=eu[O.charAt(ew++)],ea=eu[O.charAt(ew++)],ef=eu[O.charAt(ew++)],ev+=String.fromCharCode(($<<3|J>>>2)&255)+String.fromCharCode((J<<6|en<<1|es>>>4)&255)+String.fromCharCode((es<<4|eo>>>1)&255)+String.fromCharCode((eo<<7|ea<<2|ef>>>3)&255)),ev},eg={encode:function(O,U){var $="string"!=typeof O;return($&&O.constructor===ArrayBuffer&&(O=new Uint8Array(O)),$)?encodeBytes(O):U?encodeAscii(O):encodeUtf8(O)},decode:decode};decode.asBytes=decodeAsBytes,es?O.exports=eg:(U.base32=eg,eo&&void 0!==(J=(function(){return eg}).call(eg,$,eg,O))&&(O.exports=J))}()},5335:function(O){"function"==typeof Object.create?O.exports=function(O,U){U&&(O.super_=U,O.prototype=Object.create(U.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}))}:O.exports=function(O,U){if(U){O.super_=U;var TempCtor=function(){};TempCtor.prototype=U.prototype,O.prototype=new TempCtor,O.prototype.constructor=O}}},9173:function(O){!function(U){"use strict";let $="(0?\\d+|0x[a-f0-9]+)",J={fourOctet:RegExp(`^${$}\\.${$}\\.${$}\\.${$}$`,"i"),threeOctet:RegExp(`^${$}\\.${$}\\.${$}$`,"i"),twoOctet:RegExp(`^${$}\\.${$}$`,"i"),longValue:RegExp(`^${$}$`,"i")},en=RegExp("^0[0-7]+$","i"),es=RegExp("^0x[a-f0-9]+$","i"),eo="%[0-9a-z]{1,}",ea="(?:[0-9a-f]+::?)+",eu={zoneIndex:RegExp(eo,"i"),native:RegExp(`^(::)?(${ea})?([0-9a-f]+)?(::)?(${eo})?$`,"i"),deprecatedTransitional:RegExp(`^(?:::)(${$}\\.${$}\\.${$}\\.${$}(${eo})?)$`,"i"),transitional:RegExp(`^((?:${ea})|(?:::)(?:${ea})?)${$}\\.${$}\\.${$}\\.${$}(${eo})?$`,"i")};function expandIPv6(O,U){let $,J;if(O.indexOf("::")!==O.lastIndexOf("::"))return null;let en=0,es=-1,eo=(O.match(eu.zoneIndex)||[])[0];for(eo&&(eo=eo.substring(1),O=O.replace(/%.+$/,""));(es=O.indexOf(":",es+1))>=0;)en++;if("::"===O.substr(0,2)&&en--,"::"===O.substr(-2,2)&&en--,en>U)return null;for(J=U-en,$=":";J--;)$+="0:";return":"===(O=O.replace("::",$))[0]&&(O=O.slice(1)),":"===O[O.length-1]&&(O=O.slice(0,-1)),{parts:U=function(){let U=O.split(":"),$=[];for(let O=0;O0;){if((en=$-J)<0&&(en=0),O[es]>>en!=U[es]>>en)return!1;J-=$,es+=1}return!0}function parseIntAuto(O){if(es.test(O))return parseInt(O,16);if("0"===O[0]&&!isNaN(parseInt(O[1],10))){if(en.test(O))return parseInt(O,8);throw Error(`ipaddr: cannot parse ${O} as octal`)}return parseInt(O,10)}function padPart(O,U){for(;O.length=0;O-=1){if(!((U=this.octets[O])in es)||($=es[U],en&&0!==$))return null;8!==$&&(en=!0),J+=$}return 32-J},IPv4.prototype.range=function(){return ef.subnetMatch(this,this.SpecialRanges)},IPv4.prototype.toByteArray=function(){return this.octets.slice(0)},IPv4.prototype.toIPv4MappedAddress=function(){return ef.IPv6.parse(`::ffff:${this.toString()}`)},IPv4.prototype.toNormalizedString=function(){return this.toString()},IPv4.prototype.toString=function(){return this.octets.join(".")},IPv4}(),ef.IPv4.broadcastAddressFromCIDR=function(O){try{let U=this.parseCIDR(O),$=U[0].toByteArray(),J=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],es=0;for(;es<4;)en.push(parseInt($[es],10)|255^parseInt(J[es],10)),es++;return new this(en)}catch(O){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},ef.IPv4.isIPv4=function(O){return null!==this.parser(O)},ef.IPv4.isValid=function(O){try{return new this(this.parser(O)),!0}catch(O){return!1}},ef.IPv4.isValidFourPartDecimal=function(O){return!!(ef.IPv4.isValid(O)&&O.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},ef.IPv4.networkAddressFromCIDR=function(O){let U,$,J,en,es;try{for(J=(U=this.parseCIDR(O))[0].toByteArray(),es=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],$=0;$<4;)en.push(parseInt(J[$],10)&parseInt(es[$],10)),$++;return new this(en)}catch(O){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},ef.IPv4.parse=function(O){let U=this.parser(O);if(null===U)throw Error("ipaddr: string is not formatted like an IPv4 Address");return new this(U)},ef.IPv4.parseCIDR=function(O){let U;if(U=O.match(/^(.+)\/(\d+)$/)){let O=parseInt(U[2]);if(O>=0&&O<=32){let $=[this.parse(U[1]),O];return Object.defineProperty($,"toString",{value:function(){return this.join("/")}}),$}}throw Error("ipaddr: string is not formatted like an IPv4 CIDR range")},ef.IPv4.parser=function(O){let U,$;if(U=O.match(J.fourOctet))return function(){let O=U.slice(1,6),$=[];for(let U=0;U4294967295||$<0)throw Error("ipaddr: address outside defined range");return(function(){let O;let U=[];for(O=0;O<=24;O+=8)U.push($>>O&255);return U})().reverse()}return(U=O.match(J.twoOctet))?function(){let O=U.slice(1,4),J=[];if(($=parseIntAuto(O[1]))>16777215||$<0)throw Error("ipaddr: address outside defined range");return J.push(parseIntAuto(O[0])),J.push($>>16&255),J.push($>>8&255),J.push(255&$),J}():(U=O.match(J.threeOctet))?function(){let O=U.slice(1,5),J=[];if(($=parseIntAuto(O[2]))>65535||$<0)throw Error("ipaddr: address outside defined range");return J.push(parseIntAuto(O[0])),J.push(parseIntAuto(O[1])),J.push($>>8&255),J.push(255&$),J}():null},ef.IPv4.subnetMaskFromPrefixLength=function(O){if((O=parseInt(O))<0||O>32)throw Error("ipaddr: invalid IPv4 prefix length");let U=[0,0,0,0],$=0,J=Math.floor(O/8);for(;$=0;es-=1){if(!((O=this.parts[es])in en)||(U=en[O],J&&0!==U))return null;16!==U&&(J=!0),$+=U}return 128-$},IPv6.prototype.range=function(){return ef.subnetMatch(this,this.SpecialRanges)},IPv6.prototype.toByteArray=function(){let O;let U=[],$=this.parts;for(let J=0;J<$.length;J++)U.push((O=$[J])>>8),U.push(255&O);return U},IPv6.prototype.toFixedLengthString=function(){let O=(function(){let O=[];for(let U=0;U>8,255&U,$>>8,255&$])},IPv6.prototype.toNormalizedString=function(){let O=(function(){let O=[];for(let U=0;Uen&&(J=O.index,en=O[0].length);return en<0?$:`${$.substring(0,J)}::${$.substring(J+en)}`},IPv6.prototype.toString=function(){return this.toRFC5952String()},IPv6}(),ef.IPv6.broadcastAddressFromCIDR=function(O){try{let U=this.parseCIDR(O),$=U[0].toByteArray(),J=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],es=0;for(;es<16;)en.push(parseInt($[es],10)|255^parseInt(J[es],10)),es++;return new this(en)}catch(O){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${O})`)}},ef.IPv6.isIPv6=function(O){return null!==this.parser(O)},ef.IPv6.isValid=function(O){if("string"==typeof O&&-1===O.indexOf(":"))return!1;try{let U=this.parser(O);return new this(U.parts,U.zoneId),!0}catch(O){return!1}},ef.IPv6.networkAddressFromCIDR=function(O){let U,$,J,en,es;try{for(J=(U=this.parseCIDR(O))[0].toByteArray(),es=this.subnetMaskFromPrefixLength(U[1]).toByteArray(),en=[],$=0;$<16;)en.push(parseInt(J[$],10)&parseInt(es[$],10)),$++;return new this(en)}catch(O){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${O})`)}},ef.IPv6.parse=function(O){let U=this.parser(O);if(null===U.parts)throw Error("ipaddr: string is not formatted like an IPv6 Address");return new this(U.parts,U.zoneId)},ef.IPv6.parseCIDR=function(O){let U,$,J;if(($=O.match(/^(.+)\/(\d+)$/))&&(U=parseInt($[2]))>=0&&U<=128)return Object.defineProperty(J=[this.parse($[1]),U],"toString",{value:function(){return this.join("/")}}),J;throw Error("ipaddr: string is not formatted like an IPv6 CIDR range")},ef.IPv6.parser=function(O){let U,$,J,en,es,eo;if(J=O.match(eu.deprecatedTransitional))return this.parser(`::ffff:${J[1]}`);if(eu.native.test(O))return expandIPv6(O,8);if((J=O.match(eu.transitional))&&(eo=J[6]||"",(U=expandIPv6(J[1].slice(0,-1)+eo,6)).parts)){for($=0,es=[parseInt(J[2]),parseInt(J[3]),parseInt(J[4]),parseInt(J[5])];$128)throw Error("ipaddr: invalid IPv6 prefix length");let U=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],$=0,J=Math.floor(O/8);for(;$=0)}O.exports=isElectron},361:function(O){"use strict";O.exports=O=>{if("[object Object]"!==Object.prototype.toString.call(O))return!1;let U=Object.getPrototypeOf(O);return null===U||U===Object.prototype}},2543:function(O,U,$){"use strict";let{URLWithLegacySupport:J,format:en,URLSearchParams:es,defaultBase:eo}=$(8608),ea=$(6926);O.exports={URL:J,URLSearchParams:es,format:en,relative:ea,defaultBase:eo}},6926:function(O,U,$){"use strict";let{URLWithLegacySupport:J,format:en}=$(8608);O.exports=(O,U={},$={},es)=>{let eo,ea=U.protocol?U.protocol.replace(":",""):"http";ea=($[ea]||es||ea)+":";try{eo=new J(O)}catch(O){eo={}}let eu=Object.assign({},U,{protocol:ea||eo.protocol,host:U.host||eo.host});return new J(O,en(eu)).toString()}},8608:function(O){"use strict";let U="undefined"!=typeof navigator&&"ReactNative"===navigator.product;function getDefaultBase(){return U?"http://localhost":self.location?self.location.protocol+"//"+self.location.host:""}let $=self.URL,J=getDefaultBase();let URLWithLegacySupport=class URLWithLegacySupport{constructor(O="",U=J){this.super=new $(O,U),this.path=this.pathname+this.search,this.auth=this.username&&this.password?this.username+":"+this.password:null,this.query=this.search&&this.search.startsWith("?")?this.search.slice(1):null}get hash(){return this.super.hash}get host(){return this.super.host}get hostname(){return this.super.hostname}get href(){return this.super.href}get origin(){return this.super.origin}get password(){return this.super.password}get pathname(){return this.super.pathname}get port(){return this.super.port}get protocol(){return this.super.protocol}get search(){return this.super.search}get searchParams(){return this.super.searchParams}get username(){return this.super.username}set hash(O){this.super.hash=O}set host(O){this.super.host=O}set hostname(O){this.super.hostname=O}set href(O){this.super.href=O}set password(O){this.super.password=O}set pathname(O){this.super.pathname=O}set port(O){this.super.port=O}set protocol(O){this.super.protocol=O}set search(O){this.super.search=O}set username(O){this.super.username=O}static createObjectURL(O){return $.createObjectURL(O)}static revokeObjectURL(O){$.revokeObjectURL(O)}toJSON(){return this.super.toJSON()}toString(){return this.super.toString()}format(){return this.toString()}};function format(O){if("string"==typeof O){let U=new $(O);return U.toString()}if(!(O instanceof $)){let U=O.username&&O.password?`${O.username}:${O.password}@`:"",$=O.auth?O.auth+"@":"",J=O.port?":"+O.port:"",en=O.protocol?O.protocol+"//":"",es=O.host||"",eo=O.hostname||"",ea=O.search||(O.query?"?"+O.query:""),eu=O.hash||"",ef=O.pathname||"",eg=O.path||ef+ea;return`${en}${U||$}${es||eo+J}${eg}${eu}`}}O.exports={URLWithLegacySupport,URLSearchParams:self.URLSearchParams,defaultBase:J,format}},6398:function(O,U,$){var J,en=$(2601);!function(){"use strict";var es="input is invalid type",eo="finalize already called",ea="object"==typeof window,eu=ea?window:{};eu.JS_SHA3_NO_WINDOW&&(ea=!1);var ef=!ea&&"object"==typeof self;!eu.JS_SHA3_NO_NODE_JS&&"object"==typeof en&&en.versions&&en.versions.node?eu=$.g:ef&&(eu=self);var eg=!eu.JS_SHA3_NO_COMMON_JS&&O.exports,ev=$.amdO,e_=!eu.JS_SHA3_NO_ARRAY_BUFFER&&"undefined"!=typeof ArrayBuffer,ew="0123456789abcdef".split(""),eE=[31,7936,2031616,520093696],eS=[4,1024,262144,67108864],eA=[1,256,65536,16777216],eI=[6,1536,393216,100663296],eP=[0,8,16,24],ek=[1,0,32898,0,32906,2147483648,2147516416,2147483648,32907,0,2147483649,0,2147516545,2147483648,32777,2147483648,138,0,136,0,2147516425,0,2147483658,0,2147516555,0,139,2147483648,32905,2147483648,32771,2147483648,32770,2147483648,128,2147483648,32778,0,2147483658,2147483648,2147516545,2147483648,32896,2147483648,2147483649,0,2147516424,2147483648],eT=[224,256,384,512],eR=[128,256],eC=["hex","buffer","arrayBuffer","array","digest"],eB={128:168,256:136};(eu.JS_SHA3_NO_NODE_JS||!Array.isArray)&&(Array.isArray=function(O){return"[object Array]"===Object.prototype.toString.call(O)}),e_&&(eu.JS_SHA3_NO_ARRAY_BUFFER_IS_VIEW||!ArrayBuffer.isView)&&(ArrayBuffer.isView=function(O){return"object"==typeof O&&O.buffer&&O.buffer.constructor===ArrayBuffer});for(var createOutputMethod=function(O,U,$){return function(J){return new Keccak(O,U,O).update(J)[$]()}},createShakeOutputMethod=function(O,U,$){return function(J,en){return new Keccak(O,U,en).update(J)[$]()}},createCshakeOutputMethod=function(O,U,$){return function(U,J,en,es){return eD["cshake"+O].update(U,J,en,es)[$]()}},createKmacOutputMethod=function(O,U,$){return function(U,J,en,es){return eD["kmac"+O].update(U,J,en,es)[$]()}},createOutputMethods=function(O,U,$,J){for(var en=0;en>5,this.byteCount=this.blockCount<<2,this.outputBlocks=$>>5,this.extraBytes=(31&$)>>3;for(var J=0;J<50;++J)this.s[J]=0}function Kmac(O,U,$){Keccak.call(this,O,U,$)}Keccak.prototype.update=function(O){if(this.finalized)throw Error(eo);var U,$=typeof O;if("string"!==$){if("object"===$){if(null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!e_||!ArrayBuffer.isView(O)))throw Error(es)}else throw Error(es);U=!0}for(var J,en,ea=this.blocks,eu=this.byteCount,ef=O.length,eg=this.blockCount,ev=0,ew=this.s;ev>2]|=O[ev]<>2]|=en<>2]|=(192|en>>6)<=57344?ea[J>>2]|=(224|en>>12)<>2]|=(240|en>>18)<>2]|=(128|en>>12&63)<>2]|=(128|en>>6&63)<>2]|=(128|63&en)<=eu){for(this.start=J-eu,this.block=ea[eg],J=0;J>=8,$=255&O;$>0;)en.unshift($),O>>=8,$=255&O,++J;return U?en.push(J):en.unshift(J),this.update(en),en.length},Keccak.prototype.encodeString=function(O){var U,$=typeof O;if("string"!==$){if("object"===$){if(null===O)throw Error(es);if(e_&&O.constructor===ArrayBuffer)O=new Uint8Array(O);else if(!Array.isArray(O)&&(!e_||!ArrayBuffer.isView(O)))throw Error(es)}else throw Error(es);U=!0}var J=0,en=O.length;if(U)J=en;else for(var eo=0;eo=57344?J+=3:(ea=65536+((1023&ea)<<10|1023&O.charCodeAt(++eo)),J+=4)}return J+=this.encode(8*J),this.update(O),J},Keccak.prototype.bytepad=function(O,U){for(var $=this.encode(U),J=0;J>2]|=this.padding[3&U],this.lastByteIndex===this.byteCount)for(U=1,O[0]=O[$];U<$+1;++U)O[U]=0;for(O[$-1]|=2147483648,U=0;U<$;++U)J[U]^=O[U];f(J)}},Keccak.prototype.toString=Keccak.prototype.hex=function(){this.finalize();for(var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea="";eo>4&15]+ew[15&O]+ew[O>>12&15]+ew[O>>8&15]+ew[O>>20&15]+ew[O>>16&15]+ew[O>>28&15]+ew[O>>24&15];eo%U==0&&(f($),es=0)}return en&&(ea+=ew[(O=$[es])>>4&15]+ew[15&O],en>1&&(ea+=ew[O>>12&15]+ew[O>>8&15]),en>2&&(ea+=ew[O>>20&15]+ew[O>>16&15])),ea},Keccak.prototype.arrayBuffer=function(){this.finalize();var O,U=this.blockCount,$=this.s,J=this.outputBlocks,en=this.extraBytes,es=0,eo=0,ea=this.outputBits>>3;O=new ArrayBuffer(en?J+1<<2:ea);for(var eu=new Uint32Array(O);eo>8&255,eu[O+2]=U>>16&255,eu[O+3]=U>>24&255;ea%$==0&&f(J)}return es&&(O=ea<<2,U=J[eo],eu[O]=255&U,es>1&&(eu[O+1]=U>>8&255),es>2&&(eu[O+2]=U>>16&255)),eu},Kmac.prototype=new Keccak,Kmac.prototype.finalize=function(){return this.encode(this.outputBits,!0),Keccak.prototype.finalize.call(this)};var f=function(O){var U,$,J,en,es,eo,ea,eu,ef,eg,ev,e_,ew,eE,eS,eA,eI,eP,eT,eR,eC,eB,eN,eD,eM,eO,eL,eU,eF,eK,ej,eH,eq,eV,eG,e$,eW,eY,eJ,eQ,eZ,eX,e0,e1,e3,e6,e5,e9,e7,te,tt,tr,ta,tu,th,td,tf,tp,tg,tm,ty,tb,tv;for(J=0;J<48;J+=2)en=O[0]^O[10]^O[20]^O[30]^O[40],es=O[1]^O[11]^O[21]^O[31]^O[41],eo=O[2]^O[12]^O[22]^O[32]^O[42],ea=O[3]^O[13]^O[23]^O[33]^O[43],eu=O[4]^O[14]^O[24]^O[34]^O[44],ef=O[5]^O[15]^O[25]^O[35]^O[45],eg=O[6]^O[16]^O[26]^O[36]^O[46],ev=O[7]^O[17]^O[27]^O[37]^O[47],e_=O[8]^O[18]^O[28]^O[38]^O[48],ew=O[9]^O[19]^O[29]^O[39]^O[49],U=e_^(eo<<1|ea>>>31),$=ew^(ea<<1|eo>>>31),O[0]^=U,O[1]^=$,O[10]^=U,O[11]^=$,O[20]^=U,O[21]^=$,O[30]^=U,O[31]^=$,O[40]^=U,O[41]^=$,U=en^(eu<<1|ef>>>31),$=es^(ef<<1|eu>>>31),O[2]^=U,O[3]^=$,O[12]^=U,O[13]^=$,O[22]^=U,O[23]^=$,O[32]^=U,O[33]^=$,O[42]^=U,O[43]^=$,U=eo^(eg<<1|ev>>>31),$=ea^(ev<<1|eg>>>31),O[4]^=U,O[5]^=$,O[14]^=U,O[15]^=$,O[24]^=U,O[25]^=$,O[34]^=U,O[35]^=$,O[44]^=U,O[45]^=$,U=eu^(e_<<1|ew>>>31),$=ef^(ew<<1|e_>>>31),O[6]^=U,O[7]^=$,O[16]^=U,O[17]^=$,O[26]^=U,O[27]^=$,O[36]^=U,O[37]^=$,O[46]^=U,O[47]^=$,U=eg^(en<<1|es>>>31),$=ev^(es<<1|en>>>31),O[8]^=U,O[9]^=$,O[18]^=U,O[19]^=$,O[28]^=U,O[29]^=$,O[38]^=U,O[39]^=$,O[48]^=U,O[49]^=$,eE=O[0],eS=O[1],e6=O[11]<<4|O[10]>>>28,e5=O[10]<<4|O[11]>>>28,eU=O[20]<<3|O[21]>>>29,eF=O[21]<<3|O[20]>>>29,tm=O[31]<<9|O[30]>>>23,ty=O[30]<<9|O[31]>>>23,eX=O[40]<<18|O[41]>>>14,e0=O[41]<<18|O[40]>>>14,eV=O[2]<<1|O[3]>>>31,eG=O[3]<<1|O[2]>>>31,eA=O[13]<<12|O[12]>>>20,eI=O[12]<<12|O[13]>>>20,e9=O[22]<<10|O[23]>>>22,e7=O[23]<<10|O[22]>>>22,eK=O[33]<<13|O[32]>>>19,ej=O[32]<<13|O[33]>>>19,tb=O[42]<<2|O[43]>>>30,tv=O[43]<<2|O[42]>>>30,tu=O[5]<<30|O[4]>>>2,th=O[4]<<30|O[5]>>>2,e$=O[14]<<6|O[15]>>>26,eW=O[15]<<6|O[14]>>>26,eP=O[25]<<11|O[24]>>>21,eT=O[24]<<11|O[25]>>>21,te=O[34]<<15|O[35]>>>17,tt=O[35]<<15|O[34]>>>17,eH=O[45]<<29|O[44]>>>3,eq=O[44]<<29|O[45]>>>3,eD=O[6]<<28|O[7]>>>4,eM=O[7]<<28|O[6]>>>4,td=O[17]<<23|O[16]>>>9,tf=O[16]<<23|O[17]>>>9,eY=O[26]<<25|O[27]>>>7,eJ=O[27]<<25|O[26]>>>7,eR=O[36]<<21|O[37]>>>11,eC=O[37]<<21|O[36]>>>11,tr=O[47]<<24|O[46]>>>8,ta=O[46]<<24|O[47]>>>8,e1=O[8]<<27|O[9]>>>5,e3=O[9]<<27|O[8]>>>5,eO=O[18]<<20|O[19]>>>12,eL=O[19]<<20|O[18]>>>12,tp=O[29]<<7|O[28]>>>25,tg=O[28]<<7|O[29]>>>25,eQ=O[38]<<8|O[39]>>>24,eZ=O[39]<<8|O[38]>>>24,eB=O[48]<<14|O[49]>>>18,eN=O[49]<<14|O[48]>>>18,O[0]=eE^~eA&eP,O[1]=eS^~eI&eT,O[10]=eD^~eO&eU,O[11]=eM^~eL&eF,O[20]=eV^~e$&eY,O[21]=eG^~eW&eJ,O[30]=e1^~e6&e9,O[31]=e3^~e5&e7,O[40]=tu^~td&tp,O[41]=th^~tf&tg,O[2]=eA^~eP&eR,O[3]=eI^~eT&eC,O[12]=eO^~eU&eK,O[13]=eL^~eF&ej,O[22]=e$^~eY&eQ,O[23]=eW^~eJ&eZ,O[32]=e6^~e9&te,O[33]=e5^~e7&tt,O[42]=td^~tp&tm,O[43]=tf^~tg&ty,O[4]=eP^~eR&eB,O[5]=eT^~eC&eN,O[14]=eU^~eK&eH,O[15]=eF^~ej&eq,O[24]=eY^~eQ&eX,O[25]=eJ^~eZ&e0,O[34]=e9^~te&tr,O[35]=e7^~tt&ta,O[44]=tp^~tm&tb,O[45]=tg^~ty&tv,O[6]=eR^~eB&eE,O[7]=eC^~eN&eS,O[16]=eK^~eH&eD,O[17]=ej^~eq&eM,O[26]=eQ^~eX&eV,O[27]=eZ^~e0&eG,O[36]=te^~tr&e1,O[37]=tt^~ta&e3,O[46]=tm^~tb&tu,O[47]=ty^~tv&th,O[8]=eB^~eE&eA,O[9]=eN^~eS&eI,O[18]=eH^~eD&eO,O[19]=eq^~eM&eL,O[28]=eX^~eV&e$,O[29]=e0^~eG&eW,O[38]=tr^~e1&e6,O[39]=ta^~e3&e5,O[48]=tb^~tu&td,O[49]=tv^~th&tf,O[0]^=ek[J],O[1]^=ek[J+1]};if(eg)O.exports=eD;else{for(eO=0;eOObject.defineProperty(O,U,{value:$,writable:!0,enumerable:!0,configurable:!0}),eo=this,ea={concatArrays:!1,ignoreUndefined:!1},getEnumerableOwnPropertyKeys=O=>{let U=[];for(let $ in O)en.call(O,$)&&U.push($);if(Object.getOwnPropertySymbols){let $=Object.getOwnPropertySymbols(O);for(let J of $)es.call(O,J)&&U.push(J)}return U};function clone(O){return Array.isArray(O)?cloneArray(O):J(O)?cloneOptionObject(O):O}function cloneArray(O){let U=O.slice(0,0);return getEnumerableOwnPropertyKeys(O).forEach($=>{defineProperty(U,$,clone(O[$]))}),U}function cloneOptionObject(O){let U=null===Object.getPrototypeOf(O)?Object.create(null):{};return getEnumerableOwnPropertyKeys(O).forEach($=>{defineProperty(U,$,clone(O[$]))}),U}let mergeKeys=(O,U,$,J)=>($.forEach($=>{void 0===U[$]&&J.ignoreUndefined||($ in O&&O[$]!==Object.getPrototypeOf(O)?defineProperty(O,$,merge(O[$],U[$],J)):defineProperty(O,$,clone(U[$])))}),O),concatArrays=(O,U,$)=>{let J=O.slice(0,0),es=0;return[O,U].forEach(U=>{let eo=[];for(let $=0;$!eo.includes(O)),$)}),J};function merge(O,U,$){return $.concatArrays&&Array.isArray(O)&&Array.isArray(U)?concatArrays(O,U,$):J(U)&&J(O)?mergeKeys(O,U,getEnumerableOwnPropertyKeys(U),$):clone(U)}O.exports=function(...O){let U=merge(clone(ea),this!==eo&&this||{},ea),$={_:{}};for(let en of O)if(void 0!==en){if(!J(en))throw TypeError("`"+en+"` is not an Option Object");$=merge($,{_:en},U)}return $._}},8786:function(O){function assert(O,U){if(!O)throw Error(U||"Assertion failed")}O.exports=assert,assert.equal=function(O,U,$){if(O!=U)throw Error($||"Assertion failed: "+O+" != "+U)}},438:function(O){var U=1e3,$=6e4,J=36e5,en=864e5,es=6048e5,eo=315576e5;function parse(O){if(!((O=String(O)).length>100)){var ea=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(O);if(ea){var eu=parseFloat(ea[1]);switch((ea[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return eu*eo;case"weeks":case"week":case"w":return eu*es;case"days":case"day":case"d":return eu*en;case"hours":case"hour":case"hrs":case"hr":case"h":return eu*J;case"minutes":case"minute":case"mins":case"min":case"m":return eu*$;case"seconds":case"second":case"secs":case"sec":case"s":return eu*U;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return eu;default:return}}}}function fmtShort(O){var es=Math.abs(O);return es>=en?Math.round(O/en)+"d":es>=J?Math.round(O/J)+"h":es>=$?Math.round(O/$)+"m":es>=U?Math.round(O/U)+"s":O+"ms"}function fmtLong(O){var es=Math.abs(O);return es>=en?plural(O,es,en,"day"):es>=J?plural(O,es,J,"hour"):es>=$?plural(O,es,$,"minute"):es>=U?plural(O,es,U,"second"):O+" ms"}function plural(O,U,$,J){var en=U>=1.5*$;return Math.round(O/$)+" "+J+(en?"s":"")}O.exports=function(O,U){U=U||{};var $=typeof O;if("string"===$&&O.length>0)return parse(O);if("number"===$&&isFinite(O))return U.long?fmtLong(O):fmtShort(O);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(O))}},5194:function(O,U){(function(){var O,$,J,en,es,eo,ea,eu;eu=function(O){return[(-16777216&O)>>>24,(16711680&O)>>>16,(65280&O)>>>8,255&O].join(".")},ea=function(O){var U,J,en,es,eo,ea;for(U=[],en=es=0;es<=3&&0!==O.length;en=++es){if(en>0){if("."!==O[0])throw Error("Invalid IP");O=O.substring(1)}eo=(ea=$(O))[0],J=ea[1],O=O.substring(J),U.push(eo)}if(0!==O.length)throw Error("Invalid IP");switch(U.length){case 1:if(U[0]>4294967295)throw Error("Invalid IP");return U[0]>>>0;case 2:if(U[0]>255||U[1]>16777215)throw Error("Invalid IP");return(U[0]<<24|U[1])>>>0;case 3:if(U[0]>255||U[1]>255||U[2]>65535)throw Error("Invalid IP");return(U[0]<<24|U[1]<<16|U[2])>>>0;case 4:if(U[0]>255||U[1]>255||U[2]>255||U[3]>255)throw Error("Invalid IP");return(U[0]<<24|U[1]<<16|U[2]<<8|U[3])>>>0;default:throw Error("Invalid IP")}},en=(J=function(O){return O.charCodeAt(0)})("0"),eo=J("a"),es=J("A"),$=function(O){var U,$,ea,eu,ef;for(eu=0,U=10,$="9",ea=0,O.length>1&&"0"===O[ea]&&("x"===O[ea+1]||"X"===O[ea+1]?(ea+=2,U=16):"0"<=O[ea+1]&&O[ea+1]<="9"&&(ea++,U=8,$="7")),ef=ea;ea>>0;else if(16===U){if("a"<=O[ea]&&O[ea]<="f")eu=eu*U+(10+J(O[ea])-eo)>>>0;else if("A"<=O[ea]&&O[ea]<="F")eu=eu*U+(10+J(O[ea])-es)>>>0;else break}else break;if(eu>4294967295)throw Error("too large");ea++}if(ea===ef)throw Error("empty octet");return[eu,ea]},O=function(){function Netmask(O,U){var $,J,en;if("string"!=typeof O)throw Error("Missing `net' parameter");if(U||(O=(en=O.split("/",2))[0],U=en[1]),U||(U=32),"string"==typeof U&&U.indexOf(".")>-1){try{this.maskLong=ea(U)}catch(O){throw Error("Invalid mask: "+U)}for($=J=32;J>=0;$=--J)if(this.maskLong===4294967295<<32-$>>>0){this.bitmask=$;break}}else if(U||0===U)this.bitmask=parseInt(U,10),this.maskLong=0,this.bitmask>0&&(this.maskLong=4294967295<<32-this.bitmask>>>0);else throw Error("Invalid mask: empty");try{this.netLong=(ea(O)&this.maskLong)>>>0}catch(U){throw Error("Invalid net address: "+O)}if(!(this.bitmask<=32))throw Error("Invalid mask for ip4: "+U);this.size=Math.pow(2,32-this.bitmask),this.base=eu(this.netLong),this.mask=eu(this.maskLong),this.hostmask=eu(~this.maskLong),this.first=this.bitmask<=30?eu(this.netLong+1):this.base,this.last=this.bitmask<=30?eu(this.netLong+this.size-2):eu(this.netLong+this.size-1),this.broadcast=this.bitmask<=30?eu(this.netLong+this.size-1):void 0}return Netmask.prototype.contains=function(O){return("string"==typeof O&&(O.indexOf("/")>0||4!==O.split(".").length)&&(O=new Netmask(O)),O instanceof Netmask)?this.contains(O.base)&&this.contains(O.broadcast||O.last):(ea(O)&this.maskLong)>>>0==(this.netLong&this.maskLong)>>>0},Netmask.prototype.next=function(O){return null==O&&(O=1),new Netmask(eu(this.netLong+this.size*O),this.mask)},Netmask.prototype.forEach=function(O){var U,$,J;for(J=ea(this.first),$=ea(this.last),U=0;J<=$;)O(eu(J),J,U),U++,J++},Netmask.prototype.toString=function(){return this.base+"/"+this.bitmask},Netmask}(),U.ip2long=ea,U.long2ip=eu,U.Netmask=O}).call(this)},2601:function(O,U,$){"use strict";var J,en;O.exports=(null==(J=$.g.process)?void 0:J.env)&&"object"==typeof(null==(en=$.g.process)?void 0:en.env)?$.g.process:$(8960)},8960:function(O){var U="/";!function(){var $={229:function(O){var U,$,J,en=O.exports={};function defaultSetTimout(){throw Error("setTimeout has not been defined")}function defaultClearTimeout(){throw Error("clearTimeout has not been defined")}function runTimeout(O){if(U===setTimeout)return setTimeout(O,0);if((U===defaultSetTimout||!U)&&setTimeout)return U=setTimeout,setTimeout(O,0);try{return U(O,0)}catch($){try{return U.call(null,O,0)}catch($){return U.call(this,O,0)}}}function runClearTimeout(O){if($===clearTimeout)return clearTimeout(O);if(($===defaultClearTimeout||!$)&&clearTimeout)return $=clearTimeout,clearTimeout(O);try{return $(O)}catch(U){try{return $.call(null,O)}catch(U){return $.call(this,O)}}}!function(){try{U="function"==typeof setTimeout?setTimeout:defaultSetTimout}catch(O){U=defaultSetTimout}try{$="function"==typeof clearTimeout?clearTimeout:defaultClearTimeout}catch(O){$=defaultClearTimeout}}();var es=[],eo=!1,ea=-1;function cleanUpNextTick(){eo&&J&&(eo=!1,J.length?es=J.concat(es):ea=-1,es.length&&drainQueue())}function drainQueue(){if(!eo){var O=runTimeout(cleanUpNextTick);eo=!0;for(var U=es.length;U;){for(J=es,es=[];++ea1)for(var $=1;$=55296&&O<=56319}function isLowSurrogate(O){return O>=56320&&O<=57343}O.exports=function(O){if("string"!=typeof O)throw Error("Input must be string");for(var U=O.length,$=0,J=null,en=null,es=0;es=128&&J<=2047?$+=2:J>=2048&&J<=65535&&($+=3),en=J;return $}},1872:function(O,U,$){"use strict";let J;$.d(U,{Z:function(){return esm_browser_v4}});let en="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var es={randomUUID:en};let eo=new Uint8Array(16);function rng(){if(!J&&!(J="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(eo)}let ea=[];for(let O=0;O<256;++O)ea.push((O+256).toString(16).slice(1));function unsafeStringify(O,U=0){return ea[O[U+0]]+ea[O[U+1]]+ea[O[U+2]]+ea[O[U+3]]+"-"+ea[O[U+4]]+ea[O[U+5]]+"-"+ea[O[U+6]]+ea[O[U+7]]+"-"+ea[O[U+8]]+ea[O[U+9]]+"-"+ea[O[U+10]]+ea[O[U+11]]+ea[O[U+12]]+ea[O[U+13]]+ea[O[U+14]]+ea[O[U+15]]}var esm_browser_v4=function(O,U,$){if(es.randomUUID&&!U&&!O)return es.randomUUID();O=O||{};let J=O.random||(O.rng||rng)();if(J[6]=15&J[6]|64,J[8]=63&J[8]|128,U){$=$||0;for(let O=0;O<16;++O)U[$+O]=J[O];return U}return unsafeStringify(J)}},372:function(O,U,$){var J,en,es;!function(eo,ea){en=[$(4481)],void 0!==(es="function"==typeof(J=ea)?J.apply(U,en):J)&&(O.exports=es)}(0,function(O){"use strict";var U=O.Reader,$=O.Writer,J=O.util,en=O.roots.default||(O.roots.default={});return en.RPC=function(){var es;function RPC(O){if(this.subscriptions=[],this.messages=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.subscriptions&&es.subscriptions.length||(es.subscriptions=[]),es.subscriptions.push(en.RPC.SubOpts.decode(O,O.uint32()));break;case 2:es.messages&&es.messages.length||(es.messages=[]),es.messages.push(en.RPC.Message.decode(O,O.uint32()));break;case 3:es.control=en.RPC.ControlMessage.decode(O,O.uint32());break;default:O.skipType(7&eo)}}return es},RPC.fromObject=function(O){if(O instanceof en.RPC)return O;var U=new en.RPC;if(O.subscriptions){if(!Array.isArray(O.subscriptions))throw TypeError(".RPC.subscriptions: array expected");U.subscriptions=[];for(var $=0;$>>3){case 1:es.subscribe=O.bool();break;case 2:es.topic=O.string();break;default:O.skipType(7&eo)}}return es},SubOpts.fromObject=function(O){if(O instanceof en.RPC.SubOpts)return O;var U=new en.RPC.SubOpts;return null!=O.subscribe&&(U.subscribe=!!O.subscribe),null!=O.topic&&(U.topic=String(O.topic)),U},SubOpts.toObject=function(O,U){U||(U={});var $={};return null!=O.subscribe&&O.hasOwnProperty("subscribe")&&($.subscribe=O.subscribe,U.oneofs&&($._subscribe="subscribe")),null!=O.topic&&O.hasOwnProperty("topic")&&($.topic=O.topic,U.oneofs&&($._topic="topic")),$},SubOpts.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},SubOpts}(),RPC.Message=function(){var es;function Message(O){if(O)for(var U=Object.keys(O),$=0;$>>3){case 1:eo.from=O.bytes();break;case 2:eo.data=O.bytes();break;case 3:eo.seqno=O.bytes();break;case 4:eo.topic=O.string();break;case 5:eo.signature=O.bytes();break;case 6:eo.key=O.bytes();break;default:O.skipType(7&ea)}}if(!eo.hasOwnProperty("topic"))throw J.ProtocolError("missing required 'topic'",{instance:eo});return eo},Message.fromObject=function(O){if(O instanceof en.RPC.Message)return O;var U=new en.RPC.Message;return null!=O.from&&("string"==typeof O.from?J.base64.decode(O.from,U.from=J.newBuffer(J.base64.length(O.from)),0):O.from.length&&(U.from=O.from)),null!=O.data&&("string"==typeof O.data?J.base64.decode(O.data,U.data=J.newBuffer(J.base64.length(O.data)),0):O.data.length&&(U.data=O.data)),null!=O.seqno&&("string"==typeof O.seqno?J.base64.decode(O.seqno,U.seqno=J.newBuffer(J.base64.length(O.seqno)),0):O.seqno.length&&(U.seqno=O.seqno)),null!=O.topic&&(U.topic=String(O.topic)),null!=O.signature&&("string"==typeof O.signature?J.base64.decode(O.signature,U.signature=J.newBuffer(J.base64.length(O.signature)),0):O.signature.length&&(U.signature=O.signature)),null!=O.key&&("string"==typeof O.key?J.base64.decode(O.key,U.key=J.newBuffer(J.base64.length(O.key)),0):O.key.length&&(U.key=O.key)),U},Message.toObject=function(O,U){U||(U={});var $={};return U.defaults&&($.topic=""),null!=O.from&&O.hasOwnProperty("from")&&($.from=U.bytes===String?J.base64.encode(O.from,0,O.from.length):U.bytes===Array?Array.prototype.slice.call(O.from):O.from,U.oneofs&&($._from="from")),null!=O.data&&O.hasOwnProperty("data")&&($.data=U.bytes===String?J.base64.encode(O.data,0,O.data.length):U.bytes===Array?Array.prototype.slice.call(O.data):O.data,U.oneofs&&($._data="data")),null!=O.seqno&&O.hasOwnProperty("seqno")&&($.seqno=U.bytes===String?J.base64.encode(O.seqno,0,O.seqno.length):U.bytes===Array?Array.prototype.slice.call(O.seqno):O.seqno,U.oneofs&&($._seqno="seqno")),null!=O.topic&&O.hasOwnProperty("topic")&&($.topic=O.topic),null!=O.signature&&O.hasOwnProperty("signature")&&($.signature=U.bytes===String?J.base64.encode(O.signature,0,O.signature.length):U.bytes===Array?Array.prototype.slice.call(O.signature):O.signature,U.oneofs&&($._signature="signature")),null!=O.key&&O.hasOwnProperty("key")&&($.key=U.bytes===String?J.base64.encode(O.key,0,O.key.length):U.bytes===Array?Array.prototype.slice.call(O.key):O.key,U.oneofs&&($._key="key")),$},Message.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},Message}(),RPC.ControlMessage=function(){function ControlMessage(O){if(this.ihave=[],this.iwant=[],this.graft=[],this.prune=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.ihave&&es.ihave.length||(es.ihave=[]),es.ihave.push(en.RPC.ControlIHave.decode(O,O.uint32()));break;case 2:es.iwant&&es.iwant.length||(es.iwant=[]),es.iwant.push(en.RPC.ControlIWant.decode(O,O.uint32()));break;case 3:es.graft&&es.graft.length||(es.graft=[]),es.graft.push(en.RPC.ControlGraft.decode(O,O.uint32()));break;case 4:es.prune&&es.prune.length||(es.prune=[]),es.prune.push(en.RPC.ControlPrune.decode(O,O.uint32()));break;default:O.skipType(7&eo)}}return es},ControlMessage.fromObject=function(O){if(O instanceof en.RPC.ControlMessage)return O;var U=new en.RPC.ControlMessage;if(O.ihave){if(!Array.isArray(O.ihave))throw TypeError(".RPC.ControlMessage.ihave: array expected");U.ihave=[];for(var $=0;$>>3){case 1:es.topicID=O.string();break;case 2:es.messageIDs&&es.messageIDs.length||(es.messageIDs=[]),es.messageIDs.push(O.bytes());break;default:O.skipType(7&eo)}}return es},ControlIHave.fromObject=function(O){if(O instanceof en.RPC.ControlIHave)return O;var U=new en.RPC.ControlIHave;if(null!=O.topicID&&(U.topicID=String(O.topicID)),O.messageIDs){if(!Array.isArray(O.messageIDs))throw TypeError(".RPC.ControlIHave.messageIDs: array expected");U.messageIDs=[];for(var $=0;$>>3==1?(es.messageIDs&&es.messageIDs.length||(es.messageIDs=[]),es.messageIDs.push(O.bytes())):O.skipType(7&eo)}return es},ControlIWant.fromObject=function(O){if(O instanceof en.RPC.ControlIWant)return O;var U=new en.RPC.ControlIWant;if(O.messageIDs){if(!Array.isArray(O.messageIDs))throw TypeError(".RPC.ControlIWant.messageIDs: array expected");U.messageIDs=[];for(var $=0;$>>3==1?es.topicID=O.string():O.skipType(7&eo)}return es},ControlGraft.fromObject=function(O){if(O instanceof en.RPC.ControlGraft)return O;var U=new en.RPC.ControlGraft;return null!=O.topicID&&(U.topicID=String(O.topicID)),U},ControlGraft.toObject=function(O,U){U||(U={});var $={};return null!=O.topicID&&O.hasOwnProperty("topicID")&&($.topicID=O.topicID,U.oneofs&&($._topicID="topicID")),$},ControlGraft.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},ControlGraft}(),RPC.ControlPrune=function(){var es;function ControlPrune(O){if(this.peers=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.topicID=O.string();break;case 2:es.peers&&es.peers.length||(es.peers=[]),es.peers.push(en.RPC.PeerInfo.decode(O,O.uint32()));break;case 3:es.backoff=O.uint64();break;default:O.skipType(7&eo)}}return es},ControlPrune.fromObject=function(O){if(O instanceof en.RPC.ControlPrune)return O;var U=new en.RPC.ControlPrune;if(null!=O.topicID&&(U.topicID=String(O.topicID)),O.peers){if(!Array.isArray(O.peers))throw TypeError(".RPC.ControlPrune.peers: array expected");U.peers=[];for(var $=0;$>>0,O.backoff.high>>>0).toNumber(!0))),U},ControlPrune.toObject=function(O,U){U||(U={});var $={};if((U.arrays||U.defaults)&&($.peers=[]),null!=O.topicID&&O.hasOwnProperty("topicID")&&($.topicID=O.topicID,U.oneofs&&($._topicID="topicID")),O.peers&&O.peers.length){$.peers=[];for(var es=0;es>>0,O.backoff.high>>>0).toNumber(!0):O.backoff,U.oneofs&&($._backoff="backoff")),$},ControlPrune.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},ControlPrune}(),RPC.PeerInfo=function(){var es;function PeerInfo(O){if(O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.peerID=O.bytes();break;case 2:es.signedPeerRecord=O.bytes();break;default:O.skipType(7&eo)}}return es},PeerInfo.fromObject=function(O){if(O instanceof en.RPC.PeerInfo)return O;var U=new en.RPC.PeerInfo;return null!=O.peerID&&("string"==typeof O.peerID?J.base64.decode(O.peerID,U.peerID=J.newBuffer(J.base64.length(O.peerID)),0):O.peerID.length&&(U.peerID=O.peerID)),null!=O.signedPeerRecord&&("string"==typeof O.signedPeerRecord?J.base64.decode(O.signedPeerRecord,U.signedPeerRecord=J.newBuffer(J.base64.length(O.signedPeerRecord)),0):O.signedPeerRecord.length&&(U.signedPeerRecord=O.signedPeerRecord)),U},PeerInfo.toObject=function(O,U){U||(U={});var $={};return null!=O.peerID&&O.hasOwnProperty("peerID")&&($.peerID=U.bytes===String?J.base64.encode(O.peerID,0,O.peerID.length):U.bytes===Array?Array.prototype.slice.call(O.peerID):O.peerID,U.oneofs&&($._peerID="peerID")),null!=O.signedPeerRecord&&O.hasOwnProperty("signedPeerRecord")&&($.signedPeerRecord=U.bytes===String?J.base64.encode(O.signedPeerRecord,0,O.signedPeerRecord.length):U.bytes===Array?Array.prototype.slice.call(O.signedPeerRecord):O.signedPeerRecord,U.oneofs&&($._signedPeerRecord="signedPeerRecord")),$},PeerInfo.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},PeerInfo}(),RPC}(),en})},5493:function(O,U,$){"use strict";function number(O){if(!Number.isSafeInteger(O)||O<0)throw Error(`Wrong positive integer: ${O}`)}function bool(O){if("boolean"!=typeof O)throw Error(`Expected boolean, not ${O}`)}function bytes(O,...U){if(!(O instanceof Uint8Array))throw Error("Expected Uint8Array");if(U.length>0&&!U.includes(O.length))throw Error(`Expected Uint8Array of length ${U}, not of length=${O.length}`)}function hash(O){if("function"!=typeof O||"function"!=typeof O.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(O.outputLen),number(O.blockLen)}function exists(O,U=!0){if(O.destroyed)throw Error("Hash instance has been destroyed");if(U&&O.finished)throw Error("Hash#digest() has already been called")}function output(O,U){bytes(O);let $=U.outputLen;if(O.length<$)throw Error(`digestInto() expects output buffer of length at least ${$}`)}let J={number,bool,bytes,hash,exists,output};U.ZP=J},4727:function(O,U,$){"use strict";$.d(U,{N:function(){return SHA2}});var J=$(5493),en=$(2305);function setBigUint64(O,U,$,J){if("function"==typeof O.setBigUint64)return O.setBigUint64(U,$,J);let en=BigInt(32),es=BigInt(4294967295),eo=Number($>>en&es),ea=Number($&es),eu=J?4:0,ef=J?0:4;O.setUint32(U+eu,eo,J),O.setUint32(U+ef,ea,J)}let SHA2=class SHA2 extends en.kb{constructor(O,U,$,J){super(),this.blockLen=O,this.outputLen=U,this.padOffset=$,this.isLE=J,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(O),this.view=(0,en.GL)(this.buffer)}update(O){J.ZP.exists(this);let{view:U,buffer:$,blockLen:es}=this;O=(0,en.O0)(O);let eo=O.length;for(let J=0;Jes-ea&&(this.process($,0),ea=0);for(let O=ea;Oev.length)throw Error("_sha2: outputLen bigger than state");for(let O=0;O>en&J)}:{h:0|Number(O>>en&J),l:0|Number(O&J)}}function split(O,U=!1){let $=new Uint32Array(O.length),J=new Uint32Array(O.length);for(let en=0;enBigInt(O>>>0)<>>0),shrSH=(O,U,$)=>O>>>$,shrSL=(O,U,$)=>O<<32-$|U>>>$,rotrSH=(O,U,$)=>O>>>$|U<<32-$,rotrSL=(O,U,$)=>O<<32-$|U>>>$,rotrBH=(O,U,$)=>O<<64-$|U>>>$-32,rotrBL=(O,U,$)=>O>>>$-32|U<<64-$,rotr32H=(O,U)=>U,rotr32L=(O,U)=>O,rotlSH=(O,U,$)=>O<<$|U>>>32-$,rotlSL=(O,U,$)=>U<<$|O>>>32-$,rotlBH=(O,U,$)=>U<<$-32|O>>>64-$,rotlBL=(O,U,$)=>O<<$-32|U>>>64-$;function add(O,U,$,J){let en=(U>>>0)+(J>>>0);return{h:O+$+(en/4294967296|0)|0,l:0|en}}let add3L=(O,U,$)=>(O>>>0)+(U>>>0)+($>>>0),add3H=(O,U,$,J)=>U+$+J+(O/4294967296|0)|0,add4L=(O,U,$,J)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0),add4H=(O,U,$,J,en)=>U+$+J+en+(O/4294967296|0)|0,add5L=(O,U,$,J,en)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0)+(en>>>0),add5H=(O,U,$,J,en,es)=>U+$+J+en+es+(O/4294967296|0)|0,es={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L};U.ZP=es},9802:function(O,U,$){"use strict";$.d(U,{J:function(){return eu}});var J=$(4727),en=$(2305);let Chi=(O,U,$)=>O&U^~O&$,Maj=(O,U,$)=>O&U^O&$^U&$,es=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]),eo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ea=new Uint32Array(64);let SHA256=class SHA256 extends J.N{constructor(){super(64,32,8,!1),this.A=0|eo[0],this.B=0|eo[1],this.C=0|eo[2],this.D=0|eo[3],this.E=0|eo[4],this.F=0|eo[5],this.G=0|eo[6],this.H=0|eo[7]}get(){let{A:O,B:U,C:$,D:J,E:en,F:es,G:eo,H:ea}=this;return[O,U,$,J,en,es,eo,ea]}set(O,U,$,J,en,es,eo,ea){this.A=0|O,this.B=0|U,this.C=0|$,this.D=0|J,this.E=0|en,this.F=0|es,this.G=0|eo,this.H=0|ea}process(O,U){for(let $=0;$<16;$++,U+=4)ea[$]=O.getUint32(U,!1);for(let O=16;O<64;O++){let U=ea[O-15],$=ea[O-2],J=(0,en.np)(U,7)^(0,en.np)(U,18)^U>>>3,es=(0,en.np)($,17)^(0,en.np)($,19)^$>>>10;ea[O]=es+ea[O-7]+J+ea[O-16]|0}let{A:$,B:J,C:eo,D:eu,E:ef,F:eg,G:ev,H:e_}=this;for(let O=0;O<64;O++){let U=(0,en.np)(ef,6)^(0,en.np)(ef,11)^(0,en.np)(ef,25),ew=e_+U+Chi(ef,eg,ev)+es[O]+ea[O]|0,eE=(0,en.np)($,2)^(0,en.np)($,13)^(0,en.np)($,22),eS=eE+Maj($,J,eo)|0;e_=ev,ev=eg,eg=ef,ef=eu+ew|0,eu=eo,eo=J,J=$,$=ew+eS|0}$=$+this.A|0,J=J+this.B|0,eo=eo+this.C|0,eu=eu+this.D|0,ef=ef+this.E|0,eg=eg+this.F|0,ev=ev+this.G|0,e_=e_+this.H|0,this.set($,J,eo,eu,ef,eg,ev,e_)}roundClean(){ea.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let SHA224=class SHA224 extends SHA256{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}};let eu=(0,en.hE)(()=>new SHA256);(0,en.hE)(()=>new SHA224)},2305:function(O,U,$){"use strict";$.d(U,{kb:function(){return Hash},ci:function(){return bytesToHex},eV:function(){return concatBytes},GL:function(){return createView},nr:function(){return hexToBytes},O6:function(){return randomBytes},np:function(){return rotr},O0:function(){return toBytes},Jq:function(){return u32},iY:function(){return utf8ToBytes},hE:function(){return wrapConstructor},gz:function(){return wrapXOFConstructorWithOpts}});let J="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,u8a=O=>O instanceof Uint8Array,u32=O=>new Uint32Array(O.buffer,O.byteOffset,Math.floor(O.byteLength/4)),createView=O=>new DataView(O.buffer,O.byteOffset,O.byteLength),rotr=(O,U)=>O<<32-U|O>>>U,en=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];if(!en)throw Error("Non little-endian hardware is not supported");let es=Array.from({length:256},(O,U)=>U.toString(16).padStart(2,"0"));function bytesToHex(O){if(!u8a(O))throw Error("Uint8Array expected");let U="";for(let $=0;$O+U.length,0)),$=0;return O.forEach(O=>{if(!u8a(O))throw Error("Uint8Array expected");U.set(O,$),$+=O.length}),U}let Hash=class Hash{clone(){return this._cloneInto()}};function wrapConstructor(O){let hashC=U=>O().update(toBytes(U)).digest(),U=O();return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=()=>O(),hashC}function wrapXOFConstructorWithOpts(O){let hashC=(U,$)=>O($).update(toBytes(U)).digest(),U=O({});return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=U=>O(U),hashC}function randomBytes(O=32){if(J&&"function"==typeof J.getRandomValues)return J.getRandomValues(new Uint8Array(O));throw Error("crypto.getRandomValues must be defined")}},3909:function(O,U,$){"use strict";function checkInt(O,U,$,J,en,es){if(U>en||UO.length)throw RangeError("Index out of range")}function writeUIntLE(O,U,$,J,en){if(U=+U,$>>>=0,J>>>=0,!en){let en=Math.pow(2,8*J)-1;checkInt(O,U,$,J,en,0)}let es=1,eo=0;for(O[$]=255&U;++eo(e_.ZP.bytes(U),O(U))}e_.ZP.bool,e_.ZP.bytes,(()=>{let O="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,U="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);return U&&!O?U("crypto"):void 0})();let eE=wrapHash(ev.J);var eS=$(2890),eA=$(1872),eI=$(3909),eP=$(4589),ek=$(9686),eT=$(6357),eR=$(606);let[eC,eB,eN]=[[],[],[]],eD=BigInt(0),eM=BigInt(1),eO=BigInt(2),eL=BigInt(7),eU=BigInt(256),eF=BigInt(113);for(let O=0,U=eM,$=1,J=0;O<24;O++){[$,J]=[J,(2*$+3*J)%5],eC.push(2*(5*J+$)),eB.push((O+1)*(O+2)/2%64);let en=eD;for(let O=0;O<7;O++)(U=(U<>eL)*eF)%eU)&eO&&(en^=eM<<(eM<$>32?eR.ZP.rotlBH(O,U,$):eR.ZP.rotlSH(O,U,$),rotlL=(O,U,$)=>$>32?eR.ZP.rotlBL(O,U,$):eR.ZP.rotlSL(O,U,$);function keccakP(O,U=24){let $=new Uint32Array(10);for(let J=24-U;J<24;J++){for(let U=0;U<10;U++)$[U]=O[U]^O[U+10]^O[U+20]^O[U+30]^O[U+40];for(let U=0;U<10;U+=2){let J=(U+8)%10,en=(U+2)%10,es=$[en],eo=$[en+1],ea=rotlH(es,eo,1)^$[J],eu=rotlL(es,eo,1)^$[J+1];for(let $=0;$<50;$+=10)O[U+$]^=ea,O[U+$+1]^=eu}let U=O[2],en=O[3];for(let $=0;$<24;$++){let J=eB[$],es=rotlH(U,en,J),eo=rotlL(U,en,J),ea=eC[$];U=O[ea],en=O[ea+1],O[ea]=es,O[ea+1]=eo}for(let U=0;U<50;U+=10){for(let J=0;J<10;J++)$[J]=O[U+J];for(let J=0;J<10;J++)O[U+J]^=~$[(J+2)%10]&$[(J+4)%10]}O[0]^=eK[J],O[1]^=ej[J]}$.fill(0)}let Keccak=class Keccak extends ew.kb{constructor(O,U,$,J=!1,en=24){if(super(),this.blockLen=O,this.suffix=U,this.outputLen=$,this.enableXOF=J,this.rounds=en,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,e_.ZP.number($),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,ew.Jq)(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(O){e_.ZP.exists(this);let{blockLen:U,state:$}=this;O=(0,ew.O0)(O);let J=O.length;for(let en=0;en=$&&this.keccak();let es=Math.min($-this.posOut,en-J);O.set(U.subarray(this.posOut,this.posOut+es),J),this.posOut+=es,J+=es}return O}xofInto(O){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(O)}xof(O){return e_.ZP.number(O),this.xofInto(new Uint8Array(O))}digestInto(O){if(e_.ZP.output(O,this),this.finished)throw Error("digest() was already called");return this.writeInto(O),this.destroy(),O}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(O){let{blockLen:U,suffix:$,outputLen:J,rounds:en,enableXOF:es}=this;return O||(O=new Keccak(U,$,J,es,en)),O.state32.set(this.state32),O.pos=this.pos,O.posOut=this.posOut,O.finished=this.finished,O.rounds=en,O.suffix=$,O.outputLen=J,O.enableXOF=es,O.destroyed=this.destroyed,O}};let gen=(O,U,$)=>(0,ew.hE)(()=>new Keccak(U,O,$));gen(6,144,28),gen(6,136,32),gen(6,104,48),gen(6,72,64);let eH=gen(1,144,28),eq=gen(1,136,32),eV=gen(1,104,48),eG=gen(1,72,64),genShake=(O,U,$)=>(0,ew.gz)((J={})=>new Keccak(U,O,void 0===J.dkLen?$:J.dkLen,!0));genShake(31,168,16),genShake(31,136,32),wrapHash(eH);let e$=(()=>{let O=wrapHash(eq);return O.create=eq.create,O})();wrapHash(eV),wrapHash(eG);let validateChecksum=async(O,U)=>{let $=await keccak256Checksum(O,U);return $===U.crypto.checksum.message},decryptEipKeystore=async(O,U)=>{let $=await (0,ek.kdf)(U.crypto.kdf,(0,eT.normalizePassword)(O)),J=await validateChecksum(O,U);if(!J)throw Error("Password is invalid.");return(0,eP.cipherDecrypt)(U.crypto.cipher,$.slice(0,16))},keccak256Checksum=async(O,U)=>{let $=await (0,ek.kdf)(U.crypto.kdf,(0,eT.normalizePassword)(O)),J=(0,ew.eV)($.slice(16),hexToBytes(U.crypto.cipher.message)),en=e$(J);return(0,ew.ci)(en)},eW=validate11;function validate11(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return validate11.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.crypto&&($="crypto"))return validate11.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.crypto){let $=O.crypto,J=eo;if(eo===J){if(!$||"object"!=typeof $||Array.isArray($))return validate11.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let O;if(void 0===$.cipher&&(O="cipher")||void 0===$.cipherparams&&(O="cipherparams")||void 0===$.ciphertext&&(O="ciphertext")||void 0===$.kdf&&(O="kdf")||void 0===$.kdfparams&&(O="kdfparams")||void 0===$.mac&&(O="mac"))return validate11.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"}],!1;if(void 0!==$.cipher){let O=eo;if("string"!=typeof $.cipher)return validate11.errors=[{instancePath:U+"/crypto/cipher",schemaPath:"#/properties/crypto/properties/cipher/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.cipherparams){let O=$.cipherparams,J=eo;if(!(O&&"object"==typeof O&&!Array.isArray(O)))return validate11.errors=[{instancePath:U+"/crypto/cipherparams",schemaPath:"#/properties/crypto/properties/cipherparams/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==$.ciphertext){let O=eo;if("string"!=typeof $.ciphertext)return validate11.errors=[{instancePath:U+"/crypto/ciphertext",schemaPath:"#/properties/crypto/properties/ciphertext/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.kdf){let O=eo;if("string"!=typeof $.kdf)return validate11.errors=[{instancePath:U+"/crypto/kdf",schemaPath:"#/properties/crypto/properties/kdf/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.kdfparams){let O=$.kdfparams,J=eo;if(!(O&&"object"==typeof O&&!Array.isArray(O)))return validate11.errors=[{instancePath:U+"/crypto/kdfparams",schemaPath:"#/properties/crypto/properties/kdfparams/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==$.mac){let O=eo;if("string"!=typeof $.mac)return validate11.errors=[{instancePath:U+"/crypto/mac",schemaPath:"#/properties/crypto/properties/mac/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0}}}}}}}}}return validate11.errors=es,0===eo}let eY=keystore_validation_generated_validate11;function keystore_validation_generated_validate11(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return keystore_validation_generated_validate11.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.application&&($="application")||void 0===O.appIdentifier&&($="appIdentifier")||void 0===O.credentials&&($="credentials")||void 0===O.version&&($="version"))return keystore_validation_generated_validate11.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.credentials){let $=O.credentials,J=eo;if(!($&&"object"==typeof $&&!Array.isArray($)))return keystore_validation_generated_validate11.errors=[{instancePath:U+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==O.appIdentifier){let $=eo;if("string"!=typeof O.appIdentifier)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/appIdentifier",schemaPath:"#/properties/appIdentifier/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0;if(ea){if(void 0!==O.version){let $=eo;if("string"!=typeof O.version)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0;if(ea){if(void 0!==O.application){let $=eo;if("string"!=typeof O.application)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/application",schemaPath:"#/properties/application/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0}}}}return keystore_validation_generated_validate11.errors=es,0===eo}let eJ=eY,eQ=eW;function schemaValidationErrors(O,U){let $=O(U);return $?null:O.errors}function isKeystoreValid(O){return!schemaValidationErrors(eJ,O)}function isCredentialValid(O){return!schemaValidationErrors(eQ,O)}let keystore_Keystore=class keystore_Keystore{constructor(O){this.data=Object.assign({application:"waku-rln-relay",appIdentifier:"01234567890abcdef",version:"0.2",credentials:{}},O)}static create(O={}){return new keystore_Keystore(O)}static fromString(O){try{let U=JSON.parse(O);if(!keystore_Keystore.isValidNwakuStore(U))throw Error("Invalid string, does not match Nwaku Keystore format.");return new keystore_Keystore(U)}catch(O){return console.error("Cannot create Keystore from string:",O),null}}static fromObject(O){if(!keystore_Keystore.isValidNwakuStore(O))throw Error("Invalid object, does not match Nwaku Keystore format.");return new keystore_Keystore(O)}async addCredential(O,U){let $=keystore_Keystore.computeMembershipHash(O.membership);if(this.data.credentials[$])throw Error("Credential already exists in the store.");let J="/stub/path",en=new Uint8Array([0]),es=keystore_Keystore.fromIdentityToBytes(O),eo=await (0,eg.create)(U,es,en,J),ea=await keccak256Checksum(U,eo),eu=keystore_Keystore.fromEipToCredential(eo,ea);return this.data.credentials[$]=eu,$}async readCredential(O,U){let $=this.data.credentials[O];if(!$)return null;let J=keystore_Keystore.fromCredentialToEip($),en=await decryptEipKeystore(U,J);return keystore_Keystore.fromBytesToIdentity(en)}removeCredential(O){this.data.credentials[O]&&delete this.data.credentials[O]}toString(){return JSON.stringify(this.data)}toObject(){return this.data}static isValidNwakuStore(O){if(!isKeystoreValid(O))return!1;let U=Object.values(eS.get(O,"credentials",{})).map(O=>isCredentialValid(O)).every(O=>O);return U}static fromCredentialToEip(O){let U=O.crypto,$={kdf:{function:U.kdf,params:U.kdfparams,message:""},cipher:{function:U.cipher,params:U.cipherparams,message:U.ciphertext},checksum:{function:"sha256",params:{},message:U.mac}};return{version:4,uuid:(0,eA.Z)(),description:void 0,path:"safe to ignore, not important for decrypt",pubkey:"safe to ignore, not important for decrypt",crypto:$}}static fromEipToCredential(O,U){let $=O.crypto,J=$.kdf;return{crypto:{cipher:$.cipher.function,cipherparams:$.cipher.params,ciphertext:$.cipher.message,kdf:J.function,kdfparams:J.params,mac:U}}}static fromBytesToIdentity(O){try{let U=bytesToUtf8(O),$=JSON.parse(U);return{identity:{IDCommitment:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idCommitment",[])),IDTrapdoor:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idTrapdoor",[])),IDNullifier:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idNullifier",[])),IDCommitmentBigInt:(0,eI.T)(keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idCommitment",[]))),IDSecretHash:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idSecretHash",[]))},membership:{treeIndex:eS.get($,"treeIndex"),chainId:eS.get($,"membershipContract.chainId"),address:eS.get($,"membershipContract.address")}}}catch(O){return console.error("Cannot parse bytes to Nwaku Credentials:",O),null}}static fromArraylikeToBytes(O){let U=[],$=0,J=O[0];for(;void 0!==J;)U.push(J),$+=1,J=O[$];return new Uint8Array(U)}static computeMembershipHash(O){return(0,ew.ci)(eE((0,ew.iY)(`${O.chainId}${O.address}${O.treeIndex}`))).toUpperCase()}static fromIdentityToBytes(O){return(0,ew.iY)(JSON.stringify({treeIndex:O.membership.treeIndex,identityCredential:{idCommitment:O.identity.IDCommitment,idNullifier:O.identity.IDNullifier,idSecretHash:O.identity.IDSecretHash,idTrapdoor:O.identity.IDTrapdoor},membershipContract:{chainId:O.membership.chainId,address:O.membership.address}}))}};$(5549);var eZ=$(7273),eX=$(2278),e0=$(7213),e1=$(6288);let e3="abi/5.7.0",e6=new e1.Yd(e3);function checkResultErrors(O){let U=[],checkErrors=function(O,$){if(Array.isArray($))for(let J in $){let en=O.slice();en.push(J);try{checkErrors(en,$[J])}catch(O){U.push({path:en,error:O})}}};return checkErrors([],O),U}let Coder=class Coder{constructor(O,U,$,J){this.name=O,this.type=U,this.localName=$,this.dynamic=J}_throwError(O,U){e6.throwArgumentError(O,this.localName,U)}};let Writer=class Writer{constructor(O){(0,e0.zG)(this,"wordSize",O||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(O)}get data(){return(0,eZ.xs)(this._data)}get length(){return this._dataLength}_writeData(O){return this._data.push(O),this._dataLength+=O.length,O.length}appendWriter(O){return this._writeData((0,eZ.zo)(O._data))}writeBytes(O){let U=(0,eZ.lE)(O),$=U.length%this.wordSize;return $&&(U=(0,eZ.zo)([U,this._padding.slice($)])),this._writeData(U)}_getValue(O){let U=(0,eZ.lE)(eX.O$.from(O));return U.length>this.wordSize&&e6.throwError("value out-of-bounds",e1.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:U.length}),U.length%this.wordSize&&(U=(0,eZ.zo)([this._padding.slice(U.length%this.wordSize),U])),U}writeValue(O){return this._writeData(this._getValue(O))}writeUpdatableValue(){let O=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,U=>{this._data[O]=this._getValue(U)}}};let Reader=class Reader{constructor(O,U,$,J){(0,e0.zG)(this,"_data",(0,eZ.lE)(O)),(0,e0.zG)(this,"wordSize",U||32),(0,e0.zG)(this,"_coerceFunc",$),(0,e0.zG)(this,"allowLoose",J),this._offset=0}get data(){return(0,eZ.Dv)(this._data)}get consumed(){return this._offset}static coerce(O,U){let $=O.match("^u?int([0-9]+)$");return $&&48>=parseInt($[1])&&(U=U.toNumber()),U}coerce(O,U){return this._coerceFunc?this._coerceFunc(O,U):Reader.coerce(O,U)}_peekBytes(O,U,$){let J=Math.ceil(U/this.wordSize)*this.wordSize;return this._offset+J>this._data.length&&(this.allowLoose&&$&&this._offset+U<=this._data.length?J=U:e6.throwError("data out-of-bounds",e1.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+J})),this._data.slice(this._offset,this._offset+J)}subReader(O){return new Reader(this._data.slice(this._offset+O),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(O,U){let $=this._peekBytes(0,O,!!U);return this._offset+=$.length,$.slice(0,O)}readValue(){return eX.O$.from(this.readBytes(this.wordSize))}};var e5=$(8994),e9=$(6339),e7=$(4184);let AddressCoder=class AddressCoder extends Coder{constructor(O){super("address","address",O,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(O,U){try{U=(0,e5.Kn)(U)}catch(O){this._throwError(O.message,U)}return O.writeValue(U)}decode(O){return(0,e5.Kn)((0,eZ.$m)(O.readValue().toHexString(),20))}};let AnonymousCoder=class AnonymousCoder extends Coder{constructor(O){super(O.name,O.type,void 0,O.dynamic),this.coder=O}defaultValue(){return this.coder.defaultValue()}encode(O,U){return this.coder.encode(O,U)}decode(O){return this.coder.decode(O)}};let te=new e1.Yd(e3);function pack(O,U,$){let J=null;if(Array.isArray($))J=$;else if($&&"object"==typeof $){let O={};J=U.map(U=>{let J=U.localName;return J||te.throwError("cannot encode object for signature with missing names",e1.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:U,value:$}),O[J]&&te.throwError("cannot encode object for signature with duplicate names",e1.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:U,value:$}),O[J]=!0,$[J]})}else te.throwArgumentError("invalid tuple value","tuple",$);U.length!==J.length&&te.throwArgumentError("types/value length mismatch","tuple",$);let en=new Writer(O.wordSize),es=new Writer(O.wordSize),eo=[];return U.forEach((O,U)=>{let $=J[U];if(O.dynamic){let U=es.length;O.encode(es,$);let J=en.writeUpdatableValue();eo.push(O=>{J(O+U)})}else O.encode(en,$)}),eo.forEach(O=>{O(en.length)}),O.appendWriter(en)+O.appendWriter(es)}function unpack(O,U){let $=[],J=O.subReader(0);U.forEach(U=>{let en=null;if(U.dynamic){let $=O.readValue(),es=J.subReader($.toNumber());try{en=U.decode(es)}catch(O){if(O.code===e1.Yd.errors.BUFFER_OVERRUN)throw O;(en=O).baseType=U.name,en.name=U.localName,en.type=U.type}}else try{en=U.decode(O)}catch(O){if(O.code===e1.Yd.errors.BUFFER_OVERRUN)throw O;(en=O).baseType=U.name,en.name=U.localName,en.type=U.type}void 0!=en&&$.push(en)});let en=U.reduce((O,U)=>{let $=U.localName;return $&&(O[$]||(O[$]=0),O[$]++),O},{});U.forEach((O,U)=>{let J=O.localName;if(!J||1!==en[J]||("length"===J&&(J="_length"),null!=$[J]))return;let es=$[U];es instanceof Error?Object.defineProperty($,J,{enumerable:!0,get:()=>{throw es}}):$[J]=es});for(let O=0;O<$.length;O++){let U=$[O];U instanceof Error&&Object.defineProperty($,O,{enumerable:!0,get:()=>{throw U}})}return Object.freeze($)}let ArrayCoder=class ArrayCoder extends Coder{constructor(O,U,$){let J=O.type+"["+(U>=0?U:"")+"]",en=-1===U||O.dynamic;super("array",J,$,en),this.coder=O,this.length=U}defaultValue(){let O=this.coder.defaultValue(),U=[];for(let $=0;$O._data.length&&te.throwError("insufficient data length",e1.Yd.errors.BUFFER_OVERRUN,{length:O._data.length,count:U});let $=[];for(let O=0;O{O.dynamic&&($=!0),J.push(O.type)});let en="tuple("+J.join(",")+")";super("tuple",en,U,$),this.coders=O}defaultValue(){let O=[];this.coders.forEach(U=>{O.push(U.defaultValue())});let U=this.coders.reduce((O,U)=>{let $=U.localName;return $&&(O[$]||(O[$]=0),O[$]++),O},{});return this.coders.forEach(($,J)=>{let en=$.localName;en&&1===U[en]&&("length"===en&&(en="_length"),null==O[en]&&(O[en]=O[J]))}),Object.freeze(O)}encode(O,U){return pack(O,this.coders,U)}decode(O){return O.coerce(this.name,unpack(O,this.coders))}};let ta=new e1.Yd(e3),tu={},th={calldata:!0,memory:!0,storage:!0},td={calldata:!0,memory:!0};function checkModifier(O,U){if("bytes"===O||"string"===O){if(th[U])return!0}else if("address"===O){if("payable"===U)return!0}else if((O.indexOf("[")>=0||"tuple"===O)&&td[U])return!0;return(th[U]||"payable"===U)&&ta.throwArgumentError("invalid modifier","name",U),!1}function parseParamType(O,U){let $=O;function throwError(U){ta.throwArgumentError(`unexpected character at position ${U}`,"param",O)}function newNode(O){let $={type:"",name:"",parent:O,state:{allowType:!0}};return U&&($.indexed=!1),$}O=O.replace(/\s/g," ");let J={type:"",name:"",state:{allowType:!0}},en=J;for(let $=0;$JSON.parse(U.format(O)))),JSON.stringify(U)}let U="";return"array"===this.baseType?U+=this.arrayChildren.format(O)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(O!==tf.sighash&&(U+=this.type),U+="("+this.components.map(U=>U.format(O)).join(O===tf.full?", ":",")+")"):U+=this.type,O!==tf.sighash&&(!0===this.indexed&&(U+=" indexed"),O===tf.full&&this.name&&(U+=" "+this.name)),U}static from(O,U){return"string"==typeof O?ParamType.fromString(O,U):ParamType.fromObject(O)}static fromObject(O){return ParamType.isParamType(O)?O:new ParamType(tu,{name:O.name||null,type:verifyType(O.type),indexed:null==O.indexed?null:!!O.indexed,components:O.components?O.components.map(ParamType.fromObject):null})}static fromString(O,U){return function(O){return ParamType.fromObject({name:O.name,type:O.type,indexed:O.indexed,components:O.components})}(parseParamType(O,!!U))}static isParamType(O){return!!(null!=O&&O._isParamType)}};function parseParams(O,U){return splitNesting(O).map(O=>ParamType.fromString(O,U))}let Fragment=class Fragment{constructor(O,U){O!==tu&&ta.throwError("use a static from method",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),populate(this,U),this._isFragment=!0,Object.freeze(this)}static from(O){return Fragment.isFragment(O)?O:"string"==typeof O?Fragment.fromString(O):Fragment.fromObject(O)}static fromObject(O){if(Fragment.isFragment(O))return O;switch(O.type){case"function":return FunctionFragment.fromObject(O);case"event":return EventFragment.fromObject(O);case"constructor":return ConstructorFragment.fromObject(O);case"error":return ErrorFragment.fromObject(O);case"fallback":case"receive":return null}return ta.throwArgumentError("invalid fragment object","value",O)}static fromString(O){return"event"===(O=(O=(O=O.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?EventFragment.fromString(O.substring(5).trim()):"function"===O.split(" ")[0]?FunctionFragment.fromString(O.substring(8).trim()):"constructor"===O.split("(")[0].trim()?ConstructorFragment.fromString(O.trim()):"error"===O.split(" ")[0]?ErrorFragment.fromString(O.substring(5).trim()):ta.throwArgumentError("unsupported fragment","value",O)}static isFragment(O){return!!(O&&O._isFragment)}};let EventFragment=class EventFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="event "),U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ",O!==tf.sighash&&this.anonymous&&(U+="anonymous "),U.trim()}static from(O){return"string"==typeof O?EventFragment.fromString(O):EventFragment.fromObject(O)}static fromObject(O){if(EventFragment.isEventFragment(O))return O;"event"!==O.type&&ta.throwArgumentError("invalid event object","value",O);let U={name:verifyIdentifier(O.name),anonymous:O.anonymous,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],type:"event"};return new EventFragment(tu,U)}static fromString(O){let U=O.match(tm);U||ta.throwArgumentError("invalid event string","value",O);let $=!1;return U[3].split(" ").forEach(O=>{switch(O.trim()){case"anonymous":$=!0;break;case"":break;default:ta.warn("unknown modifier: "+O)}}),EventFragment.fromObject({name:U[1].trim(),anonymous:$,inputs:parseParams(U[2],!0),type:"event"})}static isEventFragment(O){return O&&O._isFragment&&"event"===O.type}};function parseGas(O,U){U.gas=null;let $=O.split("@");return 1!==$.length?($.length>2&&ta.throwArgumentError("invalid human-readable ABI signature","value",O),$[1].match(/^[0-9]+$/)||ta.throwArgumentError("invalid human-readable ABI signature gas","value",O),U.gas=eX.O$.from($[1]),$[0]):O}function parseModifiers(O,U){U.constant=!1,U.payable=!1,U.stateMutability="nonpayable",O.split(" ").forEach(O=>{switch(O.trim()){case"constant":U.constant=!0;break;case"payable":U.payable=!0,U.stateMutability="payable";break;case"nonpayable":U.payable=!1,U.stateMutability="nonpayable";break;case"pure":U.constant=!0,U.stateMutability="pure";break;case"view":U.constant=!0,U.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+O)}})}function verifyState(O){let U={constant:!1,payable:!0,stateMutability:"payable"};return null!=O.stateMutability?(U.stateMutability=O.stateMutability,U.constant="view"===U.stateMutability||"pure"===U.stateMutability,null!=O.constant&&!!O.constant!==U.constant&&ta.throwArgumentError("cannot have constant function with mutability "+U.stateMutability,"value",O),U.payable="payable"===U.stateMutability,null!=O.payable&&!!O.payable!==U.payable&&ta.throwArgumentError("cannot have payable function with mutability "+U.stateMutability,"value",O)):null!=O.payable?(U.payable=!!O.payable,null!=O.constant||U.payable||"constructor"===O.type||ta.throwArgumentError("unable to determine stateMutability","value",O),U.constant=!!O.constant,U.constant?U.stateMutability="view":U.stateMutability=U.payable?"payable":"nonpayable",U.payable&&U.constant&&ta.throwArgumentError("cannot have constant payable function","value",O)):null!=O.constant?(U.constant=!!O.constant,U.payable=!U.constant,U.stateMutability=U.constant?"view":"payable"):"constructor"!==O.type&&ta.throwArgumentError("unable to determine stateMutability","value",O),U}let ConstructorFragment=class ConstructorFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});O===tf.sighash&&ta.throwError("cannot format a constructor for sighash",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let U="constructor("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(U+=this.stateMutability+" "),U.trim()}static from(O){return"string"==typeof O?ConstructorFragment.fromString(O):ConstructorFragment.fromObject(O)}static fromObject(O){if(ConstructorFragment.isConstructorFragment(O))return O;"constructor"!==O.type&&ta.throwArgumentError("invalid constructor object","value",O);let U=verifyState(O);U.constant&&ta.throwArgumentError("constructor cannot be constant","value",O);let $={name:null,type:O.type,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],payable:U.payable,stateMutability:U.stateMutability,gas:O.gas?eX.O$.from(O.gas):null};return new ConstructorFragment(tu,$)}static fromString(O){let U={type:"constructor"},$=(O=parseGas(O,U)).match(tm);return $&&"constructor"===$[1].trim()||ta.throwArgumentError("invalid constructor string","value",O),U.inputs=parseParams($[2].trim(),!1),parseModifiers($[3].trim(),U),ConstructorFragment.fromObject(U)}static isConstructorFragment(O){return O&&O._isFragment&&"constructor"===O.type}};let FunctionFragment=class FunctionFragment extends ConstructorFragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(U=>JSON.parse(U.format(O))),outputs:this.outputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="function "),U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ",O!==tf.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(U+=this.stateMutability+" "):this.constant&&(U+="view "),this.outputs&&this.outputs.length&&(U+="returns ("+this.outputs.map(U=>U.format(O)).join(", ")+") "),null!=this.gas&&(U+="@"+this.gas.toString()+" ")),U.trim()}static from(O){return"string"==typeof O?FunctionFragment.fromString(O):FunctionFragment.fromObject(O)}static fromObject(O){if(FunctionFragment.isFunctionFragment(O))return O;"function"!==O.type&&ta.throwArgumentError("invalid function object","value",O);let U=verifyState(O),$={type:O.type,name:verifyIdentifier(O.name),constant:U.constant,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],outputs:O.outputs?O.outputs.map(ParamType.fromObject):[],payable:U.payable,stateMutability:U.stateMutability,gas:O.gas?eX.O$.from(O.gas):null};return new FunctionFragment(tu,$)}static fromString(O){let U={type:"function"},$=(O=parseGas(O,U)).split(" returns ");$.length>2&&ta.throwArgumentError("invalid function string","value",O);let J=$[0].match(tm);if(J||ta.throwArgumentError("invalid function signature","value",O),U.name=J[1].trim(),U.name&&verifyIdentifier(U.name),U.inputs=parseParams(J[2],!1),parseModifiers(J[3].trim(),U),$.length>1){let J=$[1].match(tm);(""!=J[1].trim()||""!=J[3].trim())&&ta.throwArgumentError("unexpected tokens","value",O),U.outputs=parseParams(J[2],!1)}else U.outputs=[];return FunctionFragment.fromObject(U)}static isFunctionFragment(O){return O&&O._isFragment&&"function"===O.type}};function checkForbidden(O){let U=O.format();return("Error(string)"===U||"Panic(uint256)"===U)&&ta.throwArgumentError(`cannot specify user defined ${U} error`,"fragment",O),O}let ErrorFragment=class ErrorFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="error "),(U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ").trim()}static from(O){return"string"==typeof O?ErrorFragment.fromString(O):ErrorFragment.fromObject(O)}static fromObject(O){if(ErrorFragment.isErrorFragment(O))return O;"error"!==O.type&&ta.throwArgumentError("invalid error object","value",O);let U={type:O.type,name:verifyIdentifier(O.name),inputs:O.inputs?O.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(tu,U))}static fromString(O){let U={type:"error"},$=O.match(tm);return $||ta.throwArgumentError("invalid error signature","value",O),U.name=$[1].trim(),U.name&&verifyIdentifier(U.name),U.inputs=parseParams($[2],!1),checkForbidden(ErrorFragment.fromObject(U))}static isErrorFragment(O){return O&&O._isFragment&&"error"===O.type}};function verifyType(O){return O.match(/^uint($|[^1-9])/)?O="uint256"+O.substring(4):O.match(/^int($|[^1-9])/)&&(O="int256"+O.substring(3)),O}let tg=RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(O){return O&&O.match(tg)||ta.throwArgumentError(`invalid identifier "${O}"`,"value",O),O}let tm=RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(O){O=O.trim();let U=[],$="",J=0;for(let en=0;enthis._getCoder(O)),O.name);case"":return new NullCoder(O.name)}let U=O.type.match(tv);if(U){let $=parseInt(U[2]||"256");return(0===$||$>256||$%8!=0)&&ty.throwArgumentError("invalid "+U[1]+" bit length","param",O),new NumberCoder($/8,"int"===U[1],O.name)}if(U=O.type.match(tb)){let $=parseInt(U[1]);return(0===$||$>32)&&ty.throwArgumentError("invalid bytes length","param",O),new FixedBytesCoder($,O.name)}return ty.throwArgumentError("invalid type","type",O.type)}_getWordSize(){return 32}_getReader(O,U){return new Reader(O,this._getWordSize(),this.coerceFunc,U)}_getWriter(){return new Writer(this._getWordSize())}getDefaultValue(O){let U=O.map(O=>this._getCoder(ParamType.from(O))),$=new TupleCoder(U,"_");return $.defaultValue()}encode(O,U){O.length!==U.length&&ty.throwError("types/values length mismatch",e1.Yd.errors.INVALID_ARGUMENT,{count:{types:O.length,values:U.length},value:{types:O,values:U}});let $=O.map(O=>this._getCoder(ParamType.from(O))),J=new TupleCoder($,"_"),en=this._getWriter();return J.encode(en,U),en.data}decode(O,U,$){let J=O.map(O=>this._getCoder(ParamType.from(O))),en=new TupleCoder(J,"_");return en.decode(this._getReader((0,eZ.lE)(U),$))}};let t_=new AbiCoder,tw=new e1.Yd(e3);let LogDescription=class LogDescription extends e0.dk{};let TransactionDescription=class TransactionDescription extends e0.dk{};let ErrorDescription=class ErrorDescription extends e0.dk{};let Indexed=class Indexed extends e0.dk{static isIndexed(O){return!!(O&&O._isIndexed)}};let tE={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(O,U){let $=Error(`deferred error during ABI decoding triggered accessing ${O}`);return $.error=U,$}let Interface=class Interface{constructor(O){let U=[];U="string"==typeof O?JSON.parse(O):O,(0,e0.zG)(this,"fragments",U.map(O=>Fragment.from(O)).filter(O=>null!=O)),(0,e0.zG)(this,"_abiCoder",(0,e0.tu)(new.target,"getAbiCoder")()),(0,e0.zG)(this,"functions",{}),(0,e0.zG)(this,"errors",{}),(0,e0.zG)(this,"events",{}),(0,e0.zG)(this,"structs",{}),this.fragments.forEach(O=>{let U=null;switch(O.type){case"constructor":if(this.deploy){tw.warn("duplicate definition - constructor");return}(0,e0.zG)(this,"deploy",O);return;case"function":U=this.functions;break;case"event":U=this.events;break;case"error":U=this.errors;break;default:return}let $=O.format();if(U[$]){tw.warn("duplicate definition - "+$);return}U[$]=O}),this.deploy||(0,e0.zG)(this,"deploy",ConstructorFragment.from({payable:!1,type:"constructor"})),(0,e0.zG)(this,"_isInterface",!0)}format(O){O||(O=tf.full),O===tf.sighash&&tw.throwArgumentError("interface does not support formatting sighash","format",O);let U=this.fragments.map(U=>U.format(O));return O===tf.json?JSON.stringify(U.map(O=>JSON.parse(O))):U}static getAbiCoder(){return t_}static getAddress(O){return(0,e5.Kn)(O)}static getSighash(O){return(0,eZ.p3)((0,e9.id)(O.format()),0,4)}static getEventTopic(O){return(0,e9.id)(O.format())}getFunction(O){if((0,eZ.A7)(O)){for(let U in this.functions)if(O===this.getSighash(U))return this.functions[U];tw.throwArgumentError("no matching function","sighash",O)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.functions).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching function","name",U):$.length>1&&tw.throwArgumentError("multiple matching functions","name",U),this.functions[$[0]]}let U=this.functions[FunctionFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching function","signature",O),U}getEvent(O){if((0,eZ.A7)(O)){let U=O.toLowerCase();for(let O in this.events)if(U===this.getEventTopic(O))return this.events[O];tw.throwArgumentError("no matching event","topichash",U)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.events).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching event","name",U):$.length>1&&tw.throwArgumentError("multiple matching events","name",U),this.events[$[0]]}let U=this.events[EventFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching event","signature",O),U}getError(O){if((0,eZ.A7)(O)){let U=(0,e0.tu)(this.constructor,"getSighash");for(let $ in this.errors){let J=this.errors[$];if(O===U(J))return this.errors[$]}tw.throwArgumentError("no matching error","sighash",O)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.errors).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching error","name",U):$.length>1&&tw.throwArgumentError("multiple matching errors","name",U),this.errors[$[0]]}let U=this.errors[FunctionFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching error","signature",O),U}getSighash(O){if("string"==typeof O)try{O=this.getFunction(O)}catch(U){try{O=this.getError(O)}catch(O){throw U}}return(0,e0.tu)(this.constructor,"getSighash")(O)}getEventTopic(O){return"string"==typeof O&&(O=this.getEvent(O)),(0,e0.tu)(this.constructor,"getEventTopic")(O)}_decodeParams(O,U){return this._abiCoder.decode(O,U)}_encodeParams(O,U){return this._abiCoder.encode(O,U)}encodeDeploy(O){return this._encodeParams(this.deploy.inputs,O||[])}decodeErrorResult(O,U){"string"==typeof O&&(O=this.getError(O));let $=(0,eZ.lE)(U);return(0,eZ.Dv)($.slice(0,4))!==this.getSighash(O)&&tw.throwArgumentError(`data signature does not match error ${O.name}.`,"data",(0,eZ.Dv)($)),this._decodeParams(O.inputs,$.slice(4))}encodeErrorResult(O,U){return"string"==typeof O&&(O=this.getError(O)),(0,eZ.Dv)((0,eZ.zo)([this.getSighash(O),this._encodeParams(O.inputs,U||[])]))}decodeFunctionData(O,U){"string"==typeof O&&(O=this.getFunction(O));let $=(0,eZ.lE)(U);return(0,eZ.Dv)($.slice(0,4))!==this.getSighash(O)&&tw.throwArgumentError(`data signature does not match function ${O.name}.`,"data",(0,eZ.Dv)($)),this._decodeParams(O.inputs,$.slice(4))}encodeFunctionData(O,U){return"string"==typeof O&&(O=this.getFunction(O)),(0,eZ.Dv)((0,eZ.zo)([this.getSighash(O),this._encodeParams(O.inputs,U||[])]))}decodeFunctionResult(O,U){"string"==typeof O&&(O=this.getFunction(O));let $=(0,eZ.lE)(U),J=null,en="",es=null,eo=null,ea=null;switch($.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(O.outputs,$)}catch(O){}break;case 4:{let O=(0,eZ.Dv)($.slice(0,4)),U=tE[O];if(U)es=this._abiCoder.decode(U.inputs,$.slice(4)),eo=U.name,ea=U.signature,U.reason&&(J=es[0]),"Error"===eo?en=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(es[0])}`:"Panic"===eo&&(en=`; VM Exception while processing transaction: reverted with panic code ${es[0]}`);else try{let U=this.getError(O);es=this._abiCoder.decode(U.inputs,$.slice(4)),eo=U.name,ea=U.format()}catch(O){}}}return tw.throwError("call revert exception"+en,e1.Yd.errors.CALL_EXCEPTION,{method:O.format(),data:(0,eZ.Dv)(U),errorArgs:es,errorName:eo,errorSignature:ea,reason:J})}encodeFunctionResult(O,U){return"string"==typeof O&&(O=this.getFunction(O)),(0,eZ.Dv)(this._abiCoder.encode(O.outputs,U||[]))}encodeFilterTopics(O,U){"string"==typeof O&&(O=this.getEvent(O)),U.length>O.inputs.length&&tw.throwError("too many arguments for "+O.format(),e1.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:U});let $=[];O.anonymous||$.push(this.getEventTopic(O));let encodeTopic=(O,U)=>"string"===O.type?(0,e9.id)(U):"bytes"===O.type?(0,e7.w)((0,eZ.Dv)(U)):("bool"===O.type&&"boolean"==typeof U&&(U=U?"0x01":"0x00"),O.type.match(/^u?int/)&&(U=eX.O$.from(U).toHexString()),"address"===O.type&&this._abiCoder.encode(["address"],[U]),(0,eZ.$m)((0,eZ.Dv)(U),32));for(U.forEach((U,J)=>{let en=O.inputs[J];if(!en.indexed){null!=U&&tw.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+en.name,U);return}null==U?$.push(null):"array"===en.baseType||"tuple"===en.baseType?tw.throwArgumentError("filtering with tuples or arrays not supported","contract."+en.name,U):Array.isArray(U)?$.push(U.map(O=>encodeTopic(en,O))):$.push(encodeTopic(en,U))});$.length&&null===$[$.length-1];)$.pop();return $}encodeEventLog(O,U){"string"==typeof O&&(O=this.getEvent(O));let $=[],J=[],en=[];return O.anonymous||$.push(this.getEventTopic(O)),U.length!==O.inputs.length&&tw.throwArgumentError("event arguments/values mismatch","values",U),O.inputs.forEach((O,es)=>{let eo=U[es];if(O.indexed){if("string"===O.type)$.push((0,e9.id)(eo));else if("bytes"===O.type)$.push((0,e7.w)(eo));else if("tuple"===O.baseType||"array"===O.baseType)throw Error("not implemented");else $.push(this._abiCoder.encode([O.type],[eo]))}else J.push(O),en.push(eo)}),{data:this._abiCoder.encode(J,en),topics:$}}decodeEventLog(O,U,$){if("string"==typeof O&&(O=this.getEvent(O)),null!=$&&!O.anonymous){let U=this.getEventTopic(O);(0,eZ.A7)($[0],32)&&$[0].toLowerCase()===U||tw.throwError("fragment/topic mismatch",e1.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:U,value:$[0]}),$=$.slice(1)}let J=[],en=[],es=[];O.inputs.forEach((O,U)=>{O.indexed?"string"===O.type||"bytes"===O.type||"tuple"===O.baseType||"array"===O.baseType?(J.push(ParamType.fromObject({type:"bytes32",name:O.name})),es.push(!0)):(J.push(O),es.push(!1)):(en.push(O),es.push(!1))});let eo=null!=$?this._abiCoder.decode(J,(0,eZ.zo)($)):null,ea=this._abiCoder.decode(en,U,!0),eu=[],ef=0,eg=0;O.inputs.forEach((O,U)=>{if(O.indexed){if(null==eo)eu[U]=new Indexed({_isIndexed:!0,hash:null});else if(es[U])eu[U]=new Indexed({_isIndexed:!0,hash:eo[eg++]});else try{eu[U]=eo[eg++]}catch(O){eu[U]=O}}else try{eu[U]=ea[ef++]}catch(O){eu[U]=O}if(O.name&&null==eu[O.name]){let $=eu[U];$ instanceof Error?Object.defineProperty(eu,O.name,{enumerable:!0,get:()=>{throw wrapAccessError(`property ${JSON.stringify(O.name)}`,$)}}):eu[O.name]=$}});for(let O=0;O{throw wrapAccessError(`index ${O}`,U)}})}return Object.freeze(eu)}parseTransaction(O){let U=this.getFunction(O.data.substring(0,10).toLowerCase());return U?new TransactionDescription({args:this._abiCoder.decode(U.inputs,"0x"+O.data.substring(10)),functionFragment:U,name:U.name,signature:U.format(),sighash:this.getSighash(U),value:eX.O$.from(O.value||"0")}):null}parseLog(O){let U=this.getEvent(O.topics[0]);return!U||U.anonymous?null:new LogDescription({eventFragment:U,name:U.name,signature:U.format(),topic:this.getEventTopic(U),args:this.decodeEventLog(U,O.data,O.topics)})}parseError(O){let U=(0,eZ.Dv)(O),$=this.getError(U.substring(0,10).toLowerCase());return $?new ErrorDescription({args:this._abiCoder.decode($.inputs,"0x"+U.substring(10)),errorFragment:$,name:$.name,signature:$.format(),sighash:this.getSighash($)}):null}static isInterface(O){return!!(O&&O._isInterface)}};var tS=$(4999),tA=$(4941),tI=$(2501);let tP="contracts/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tk=new e1.Yd(tP);function resolveName(O,U){return __awaiter(this,void 0,void 0,function*(){let $=yield U;"string"!=typeof $&&tk.throwArgumentError("invalid address or ENS name","name",$);try{return(0,e5.Kn)($)}catch(O){}O||tk.throwError("a provider or signer is needed to resolve ENS names",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let J=yield O.resolveName($);return null==J&&tk.throwArgumentError("resolver or addr is not configured for ENS name","name",$),J})}function resolveAddresses(O,U,$){return __awaiter(this,void 0,void 0,function*(){return Array.isArray($)?yield Promise.all($.map(($,J)=>resolveAddresses(O,Array.isArray(U)?U[J]:U[$.name],$))):"address"===$.type?yield resolveName(O,U):"tuple"===$.type?yield resolveAddresses(O,U,$.components):"array"===$.baseType?Array.isArray(U)?yield Promise.all(U.map(U=>resolveAddresses(O,U,$.arrayChildren))):Promise.reject(tk.makeError("invalid value for array",e1.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:U})):U})}function populateTransaction(O,U,$){return __awaiter(this,void 0,void 0,function*(){let J={};$.length===U.inputs.length+1&&"object"==typeof $[$.length-1]&&(J=(0,e0.DC)($.pop())),tk.checkArgumentCount($.length,U.inputs.length,"passed to contract"),O.signer?J.from?J.from=(0,e0.mE)({override:resolveName(O.signer,J.from),signer:O.signer.getAddress()}).then(O=>__awaiter(this,void 0,void 0,function*(){return(0,e5.Kn)(O.signer)!==O.override&&tk.throwError("Contract with a Signer cannot override from",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),O.override})):J.from=O.signer.getAddress():J.from&&(J.from=resolveName(O.provider,J.from));let en=yield(0,e0.mE)({args:resolveAddresses(O.signer||O.provider,$,U.inputs),address:O.resolvedAddress,overrides:(0,e0.mE)(J)||{}}),es=O.interface.encodeFunctionData(U,en.args),eo={data:es,to:en.address},ea=en.overrides;if(null!=ea.nonce&&(eo.nonce=eX.O$.from(ea.nonce).toNumber()),null!=ea.gasLimit&&(eo.gasLimit=eX.O$.from(ea.gasLimit)),null!=ea.gasPrice&&(eo.gasPrice=eX.O$.from(ea.gasPrice)),null!=ea.maxFeePerGas&&(eo.maxFeePerGas=eX.O$.from(ea.maxFeePerGas)),null!=ea.maxPriorityFeePerGas&&(eo.maxPriorityFeePerGas=eX.O$.from(ea.maxPriorityFeePerGas)),null!=ea.from&&(eo.from=ea.from),null!=ea.type&&(eo.type=ea.type),null!=ea.accessList&&(eo.accessList=(0,tI.z7)(ea.accessList)),null==eo.gasLimit&&null!=U.gas){let O=21e3,$=(0,eZ.lE)(es);for(let U=0;U<$.length;U++)O+=4,$[U]&&(O+=64);eo.gasLimit=eX.O$.from(U.gas).add(O)}if(ea.value){let O=eX.O$.from(ea.value);O.isZero()||U.payable||tk.throwError("non-payable method cannot override value",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:J.value}),eo.value=O}ea.customData&&(eo.customData=(0,e0.DC)(ea.customData)),ea.ccipReadEnabled&&(eo.ccipReadEnabled=!!ea.ccipReadEnabled),delete J.nonce,delete J.gasLimit,delete J.gasPrice,delete J.from,delete J.value,delete J.type,delete J.accessList,delete J.maxFeePerGas,delete J.maxPriorityFeePerGas,delete J.customData,delete J.ccipReadEnabled;let eu=Object.keys(J).filter(O=>null!=J[O]);return eu.length&&tk.throwError(`cannot override ${eu.map(O=>JSON.stringify(O)).join(",")}`,e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:eu}),eo})}function buildPopulate(O,U){return function(...$){return populateTransaction(O,U,$)}}function buildEstimate(O,U){let $=O.signer||O.provider;return function(...J){return __awaiter(this,void 0,void 0,function*(){$||tk.throwError("estimate require a provider or signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let en=yield populateTransaction(O,U,J);return yield $.estimateGas(en)})}}function addContractWait(O,U){let $=U.wait.bind(U);U.wait=U=>$(U).then(U=>(U.events=U.logs.map($=>{let J=(0,e0.p$)($),en=null;try{en=O.interface.parseLog($)}catch(O){}return en&&(J.args=en.args,J.decode=(U,$)=>O.interface.decodeEventLog(en.eventFragment,U,$),J.event=en.name,J.eventSignature=en.signature),J.removeListener=()=>O.provider,J.getBlock=()=>O.provider.getBlock(U.blockHash),J.getTransaction=()=>O.provider.getTransaction(U.transactionHash),J.getTransactionReceipt=()=>Promise.resolve(U),J}),U))}function buildCall(O,U,$){let J=O.signer||O.provider;return function(...en){return __awaiter(this,void 0,void 0,function*(){let es;if(en.length===U.inputs.length+1&&"object"==typeof en[en.length-1]){let O=(0,e0.DC)(en.pop());null!=O.blockTag&&(es=yield O.blockTag),delete O.blockTag,en.push(O)}null!=O.deployTransaction&&(yield O._deployed(es));let eo=yield populateTransaction(O,U,en),ea=yield J.call(eo,es);try{let J=O.interface.decodeFunctionResult(U,ea);return $&&1===U.outputs.length&&(J=J[0]),J}catch(U){throw U.code===e1.Yd.errors.CALL_EXCEPTION&&(U.address=O.address,U.args=en,U.transaction=eo),U}})}}function buildSend(O,U){return function(...$){return __awaiter(this,void 0,void 0,function*(){O.signer||tk.throwError("sending a transaction requires a signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=O.deployTransaction&&(yield O._deployed());let J=yield populateTransaction(O,U,$),en=yield O.signer.sendTransaction(J);return addContractWait(O,en),en})}}function buildDefault(O,U,$){return U.constant?buildCall(O,U,$):buildSend(O,U)}function getEventTag(O){return O.address&&(null==O.topics||0===O.topics.length)?"*":(O.address||"*")+"@"+(O.topics?O.topics.map(O=>Array.isArray(O)?O.join("|"):O).join(":"):"")}let RunningEvent=class RunningEvent{constructor(O,U){(0,e0.zG)(this,"tag",O),(0,e0.zG)(this,"filter",U),this._listeners=[]}addListener(O,U){this._listeners.push({listener:O,once:U})}removeListener(O){let U=!1;this._listeners=this._listeners.filter($=>!!U||$.listener!==O||(U=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(O=>O.listener)}listenerCount(){return this._listeners.length}run(O){let U=this.listenerCount();return this._listeners=this._listeners.filter(U=>{let $=O.slice();return setTimeout(()=>{U.listener.apply(this,$)},0),!U.once}),U}prepareEvent(O){}getEmit(O){return[O]}};let ErrorRunningEvent=class ErrorRunningEvent extends RunningEvent{constructor(){super("error",null)}};let FragmentRunningEvent=class FragmentRunningEvent extends RunningEvent{constructor(O,U,$,J){let en={address:O},es=U.getEventTopic($);J?(es!==J[0]&&tk.throwArgumentError("topic mismatch","topics",J),en.topics=J.slice()):en.topics=[es],super(getEventTag(en),en),(0,e0.zG)(this,"address",O),(0,e0.zG)(this,"interface",U),(0,e0.zG)(this,"fragment",$)}prepareEvent(O){super.prepareEvent(O),O.event=this.fragment.name,O.eventSignature=this.fragment.format(),O.decode=(O,U)=>this.interface.decodeEventLog(this.fragment,O,U);try{O.args=this.interface.decodeEventLog(this.fragment,O.data,O.topics)}catch(U){O.args=null,O.decodeError=U}}getEmit(O){let U=checkResultErrors(O.args);if(U.length)throw U[0].error;let $=(O.args||[]).slice();return $.push(O),$}};let WildcardRunningEvent=class WildcardRunningEvent extends RunningEvent{constructor(O,U){super("*",{address:O}),(0,e0.zG)(this,"address",O),(0,e0.zG)(this,"interface",U)}prepareEvent(O){super.prepareEvent(O);try{let U=this.interface.parseLog(O);O.event=U.name,O.eventSignature=U.signature,O.decode=(O,$)=>this.interface.decodeEventLog(U.eventFragment,O,$),O.args=U.args}catch(O){}}};let BaseContract=class BaseContract{constructor(O,U,$){(0,e0.zG)(this,"interface",(0,e0.tu)(new.target,"getInterface")(U)),null==$?((0,e0.zG)(this,"provider",null),(0,e0.zG)(this,"signer",null)):tA.E.isSigner($)?((0,e0.zG)(this,"provider",$.provider||null),(0,e0.zG)(this,"signer",$)):tS.zt.isProvider($)?((0,e0.zG)(this,"provider",$),(0,e0.zG)(this,"signer",null)):tk.throwArgumentError("invalid signer or provider","signerOrProvider",$),(0,e0.zG)(this,"callStatic",{}),(0,e0.zG)(this,"estimateGas",{}),(0,e0.zG)(this,"functions",{}),(0,e0.zG)(this,"populateTransaction",{}),(0,e0.zG)(this,"filters",{});{let O={};Object.keys(this.interface.events).forEach(U=>{let $=this.interface.events[U];(0,e0.zG)(this.filters,U,(...O)=>({address:this.address,topics:this.interface.encodeFilterTopics($,O)})),O[$.name]||(O[$.name]=[]),O[$.name].push(U)}),Object.keys(O).forEach(U=>{let $=O[U];1===$.length?(0,e0.zG)(this.filters,U,this.filters[$[0]]):tk.warn(`Duplicate definition of ${U} (${$.join(", ")})`)})}if((0,e0.zG)(this,"_runningEvents",{}),(0,e0.zG)(this,"_wrappedEmits",{}),null==O&&tk.throwArgumentError("invalid contract address or ENS name","addressOrName",O),(0,e0.zG)(this,"address",O),this.provider)(0,e0.zG)(this,"resolvedAddress",resolveName(this.provider,O));else try{(0,e0.zG)(this,"resolvedAddress",Promise.resolve((0,e5.Kn)(O)))}catch(O){tk.throwError("provider is required to use ENS name as contract address",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(O=>{});let J={},en={};Object.keys(this.interface.functions).forEach(O=>{let U=this.interface.functions[O];if(en[O]){tk.warn(`Duplicate ABI entry for ${JSON.stringify(O)}`);return}en[O]=!0;{let $=U.name;J[`%${$}`]||(J[`%${$}`]=[]),J[`%${$}`].push(O)}null==this[O]&&(0,e0.zG)(this,O,buildDefault(this,U,!0)),null==this.functions[O]&&(0,e0.zG)(this.functions,O,buildDefault(this,U,!1)),null==this.callStatic[O]&&(0,e0.zG)(this.callStatic,O,buildCall(this,U,!0)),null==this.populateTransaction[O]&&(0,e0.zG)(this.populateTransaction,O,buildPopulate(this,U)),null==this.estimateGas[O]&&(0,e0.zG)(this.estimateGas,O,buildEstimate(this,U))}),Object.keys(J).forEach(O=>{let U=J[O];if(U.length>1)return;O=O.substring(1);let $=U[0];try{null==this[O]&&(0,e0.zG)(this,O,this[$])}catch(O){}null==this.functions[O]&&(0,e0.zG)(this.functions,O,this.functions[$]),null==this.callStatic[O]&&(0,e0.zG)(this.callStatic,O,this.callStatic[$]),null==this.populateTransaction[O]&&(0,e0.zG)(this.populateTransaction,O,this.populateTransaction[$]),null==this.estimateGas[O]&&(0,e0.zG)(this.estimateGas,O,this.estimateGas[$])})}static getContractAddress(O){return(0,e5.CR)(O)}static getInterface(O){return Interface.isInterface(O)?O:new Interface(O)}deployed(){return this._deployed()}_deployed(O){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,O).then(O=>("0x"===O&&tk.throwError("contract not deployed",e1.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(O){this.signer||tk.throwError("sending a transactions require a signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let U=(0,e0.DC)(O||{});return["from","to"].forEach(function(O){null!=U[O]&&tk.throwError("cannot override "+O,e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:O})}),U.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(U))}connect(O){"string"==typeof O&&(O=new tA.b(O,this.provider));let U=new this.constructor(this.address,this.interface,O);return this.deployTransaction&&(0,e0.zG)(U,"deployTransaction",this.deployTransaction),U}attach(O){return new this.constructor(O,this.interface,this.signer||this.provider)}static isIndexed(O){return Indexed.isIndexed(O)}_normalizeRunningEvent(O){return this._runningEvents[O.tag]?this._runningEvents[O.tag]:O}_getRunningEvent(O){if("string"==typeof O){if("error"===O)return this._normalizeRunningEvent(new ErrorRunningEvent);if("event"===O)return this._normalizeRunningEvent(new RunningEvent("event",null));if("*"===O)return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface));let U=this.interface.getEvent(O);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,U))}if(O.topics&&O.topics.length>0){try{let U=O.topics[0];if("string"!=typeof U)throw Error("invalid topic");let $=this.interface.getEvent(U);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,$,O.topics))}catch(O){}let U={address:this.address,topics:O.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag(U),U))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}_checkRunningEvents(O){if(0===O.listenerCount()){delete this._runningEvents[O.tag];let U=this._wrappedEmits[O.tag];U&&O.filter&&(this.provider.off(O.filter,U),delete this._wrappedEmits[O.tag])}}_wrapEvent(O,U,$){let J=(0,e0.p$)(U);return J.removeListener=()=>{$&&(O.removeListener($),this._checkRunningEvents(O))},J.getBlock=()=>this.provider.getBlock(U.blockHash),J.getTransaction=()=>this.provider.getTransaction(U.transactionHash),J.getTransactionReceipt=()=>this.provider.getTransactionReceipt(U.transactionHash),O.prepareEvent(J),J}_addEventListener(O,U,$){if(this.provider||tk.throwError("events require a provider or a signer with a provider",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),O.addListener(U,$),this._runningEvents[O.tag]=O,!this._wrappedEmits[O.tag]){let wrappedEmit=$=>{let J=this._wrapEvent(O,$,U);if(null==J.decodeError)try{let U=O.getEmit(J);this.emit(O.filter,...U)}catch(O){J.decodeError=O.error}null!=O.filter&&this.emit("event",J),null!=J.decodeError&&this.emit("error",J.decodeError,J)};this._wrappedEmits[O.tag]=wrappedEmit,null!=O.filter&&this.provider.on(O.filter,wrappedEmit)}}queryFilter(O,U,$){let J=this._getRunningEvent(O),en=(0,e0.DC)(J.filter);return"string"==typeof U&&(0,eZ.A7)(U,32)?(null!=$&&tk.throwArgumentError("cannot specify toBlock with blockhash","toBlock",$),en.blockHash=U):(en.fromBlock=null!=U?U:0,en.toBlock=null!=$?$:"latest"),this.provider.getLogs(en).then(O=>O.map(O=>this._wrapEvent(J,O,null)))}on(O,U){return this._addEventListener(this._getRunningEvent(O),U,!1),this}once(O,U){return this._addEventListener(this._getRunningEvent(O),U,!0),this}emit(O,...U){if(!this.provider)return!1;let $=this._getRunningEvent(O),J=$.run(U)>0;return this._checkRunningEvents($),J}listenerCount(O){return this.provider?null==O?Object.keys(this._runningEvents).reduce((O,U)=>O+this._runningEvents[U].listenerCount(),0):this._getRunningEvent(O).listenerCount():0}listeners(O){if(!this.provider)return[];if(null==O){let O=[];for(let U in this._runningEvents)this._runningEvents[U].listeners().forEach(U=>{O.push(U)});return O}return this._getRunningEvent(O).listeners()}removeAllListeners(O){if(!this.provider)return this;if(null==O){for(let O in this._runningEvents){let U=this._runningEvents[O];U.removeAllListeners(),this._checkRunningEvents(U)}return this}let U=this._getRunningEvent(O);return U.removeAllListeners(),this._checkRunningEvents(U),this}off(O,U){if(!this.provider)return this;let $=this._getRunningEvent(O);return $.removeListener(U),this._checkRunningEvents($),this}removeListener(O,U){return this.off(O,U)}};let Contract=class Contract extends BaseContract{};var tT=$(5572);let RootPerBlock=class RootPerBlock{constructor(O,U){this.root=O,this.blockNumber=U}};let tR=20;let MerkleRootTracker=class MerkleRootTracker{constructor(O,U){this.acceptableRootWindowSize=O,this.validMerkleRoots=[],this.merkleRootBuffer=[],this.pushRoot(0,U)}backFill(O){if(0==this.validMerkleRoots.length)return;let U=0;for(let $=this.validMerkleRoots.length-1;$>=0;$--)this.validMerkleRoots[$].blockNumber>=O&&U++;if(0==U)return;let $=OU.blockNumber==O);U>-1&&(this.merkleRootBuffer=this.merkleRootBuffer.slice(0,U))}let en=this.acceptableRootWindowSize-this.validMerkleRoots.length;this.merkleRootBuffer.lengththis.acceptableRootWindowSize){let O=this.validMerkleRoots.shift();O&&this.merkleRootBuffer.push(O)}this.merkleRootBuffer.length>tR&&this.merkleRootBuffer.shift()}roots(){return this.validMerkleRoots.map(O=>O.root)}buffer(){return this.merkleRootBuffer.map(O=>O.root)}};let RLNContract=class RLNContract{static async init(O,U){let $=new RLNContract(O,U);return await $.initStorageContract(U.provider),await $.fetchMembers(O),$.subscribeToMembers(O),$}constructor(O,{registryAddress:U,provider:$}){this._members=new Map;let J=O.getMerkleRoot();this.registryContract=new Contract(U,ea,$),this.merkleRootTracker=new MerkleRootTracker(5,J)}async initStorageContract(O,U={}){let $=U?.storageIndex?U.storageIndex:await this.registryContract.usingStorageIndex(),J=await this.registryContract.storages($);if(!J||J===tT.d)throw Error("No RLN Storage initialized on registry contract.");this.storageIndex=$,this.storageContract=new Contract(J,eu,O),this._membersFilter=this.storageContract.filters.MemberRegistered(),this.deployBlock=await this.storageContract.deployedBlockNumber()}get contract(){if(!this.storageContract)throw Error("Storage contract was not initialized");return this.storageContract}get members(){let O=Array.from(this._members.values()).sort((O,U)=>O.index.toNumber()-U.index.toNumber());return O}get membersFilter(){if(!this._membersFilter)throw Error("Members filter was not initialized.");return this._membersFilter}async fetchMembers(O,U={}){let $=await queryFilter(this.contract,{fromBlock:this.deployBlock,...U,membersFilter:this.membersFilter});this.processEvents(O,$)}processEvents(O,U){let $=new Map,J=new Map;U.forEach(U=>{if(U.args){if(U.removed){let O=U.args.index,J=$.get(U.blockNumber);void 0!=J?(J.push(O.toNumber()),$.set(U.blockNumber,J)):$.set(U.blockNumber,[O.toNumber()])}else{let O=J.get(U.blockNumber);void 0==O&&(O=[]),O.push(U),J.set(U.blockNumber,O)}this.removeMembers(O,$),this.insertMembers(O,J)}})}insertMembers(O,U){U.forEach((U,$)=>{U.forEach(U=>{let $=U?.args?.idCommitment,J=U?.args?.index;if(!$||!J)return;let en=eZ.Bu(eZ.lE($),32);O.insertMember(en),this._members.set(J.toNumber(),{index:J,idCommitment:$?._hex||eZ.Dv(en)})});let J=O.getMerkleRoot();this.merkleRootTracker.pushRoot($,J)})}removeMembers(O,U){let $=new Map([...U].sort().reverse());$.forEach((U,$)=>{U.forEach(U=>{this._members.has(U)&&this._members.delete(U),O.deleteMember(U)}),this.merkleRootTracker.backFill($)})}subscribeToMembers(O){this.contract.on(this.membersFilter,(U,$,J)=>this.processEvents(O,[J]))}async registerWithSignature(O,U){let $=await O.generateSeededIdentityCredential(U);return this.registerWithKey($)}async registerWithKey(O){if(void 0===this.storageIndex)throw Error("Cannot register credential, no storage contract index found.");let U=await this.registryContract["register(uint16,uint256)"](this.storageIndex,O.IDCommitmentBigInt,{gasLimit:1e5}),$=await U.wait(),J=$?.events?.[0];if(!J)return;let en=this.contract.interface.decodeEventLog("MemberRegistered",J.data);return{idCommitment:en.idCommitment,index:en.index}}roots(){return this.merkleRootTracker.roots()}};let tC=5,tB=3e3;async function queryFilter(O,U){let{fromBlock:$,membersFilter:J,fetchRange:en=tB,fetchChunks:es=tC}=U;if(!$)return O.queryFilter(J);if(!O.signer.provider)throw Error("No provider found on the contract's signer.");let eo=await O.signer.provider.getBlockNumber();if(eo-$ignoreErrors(O.queryFilter(J,U,$),[])),en=await Promise.all($);ea.push(en.flatMap(O=>O))}return ea.flatMap(O=>O)}function splitToChunks(O,U,$){let J=[],en=O;for(;en(console.error(`Ignoring an error during query: ${O?.message}`),U))}async function create(){let O=await Promise.resolve().then($.bind($,5549));return await O.create()}},5549:function(O,U,$){"use strict";$.r(U),$.d(U,{IdentityCredential:function(){return IdentityCredential},Proof:function(){return Proof},ProofMetadata:function(){return ProofMetadata},RLNInstance:function(){return RLNInstance},create:function(){return create},poseidonHash:function(){return poseidonHash},proofToBytes:function(){return proofToBytes},sha256:function(){return sha256}});var J=$(3194),en=$(3909),es=$(8385);let eo={protocol:"groth16",curve:"bn128",nPublic:6,vk_alpha_1:["20124996762962216725442980738609010303800849578410091356605067053491763969391","9118593021526896828671519912099489027245924097793322973632351264852174143923","1"],vk_beta_2:[["4693952934005375501364248788849686435240706020501681709396105298107971354382","14346958885444710485362620645446987998958218205939139994511461437152241966681"],["16851772916911573982706166384196538392731905827088356034885868448550849804972","823612331030938060799959717749043047845343400798220427319188951998582076532"],["1","0"]],vk_gamma_2:[["10857046999023057135944570762232829481370756359578518086990519993285655852781","11559732032986387107991004021392285783925812861821192530917403151452391805634"],["8495653923123431417604973247489272438418190587263600148770280649306958101930","4082367875863433681332203403145435568316851327593401208105741076214120093531"],["1","0"]],vk_delta_2:[["8353516066399360694538747105302262515182301251524941126222712285088022964076","9329524012539638256356482961742014315122377605267454801030953882967973561832"],["16805391589556134376869247619848130874761233086443465978238468412168162326401","10111259694977636294287802909665108497237922060047080343914303287629927847739"],["1","0"]],vk_alphabeta_12:[[["12608968655665301215455851857466367636344427685631271961542642719683786103711","9849575605876329747382930567422916152871921500826003490242628251047652318086"],["6322029441245076030714726551623552073612922718416871603535535085523083939021","8700115492541474338049149013125102281865518624059015445617546140629435818912"],["10674973475340072635573101639867487770811074181475255667220644196793546640210","2926286967251299230490668407790788696102889214647256022788211245826267484824"]],[["9660441540778523475944706619139394922744328902833875392144658911530830074820","19548113127774514328631808547691096362144426239827206966690021428110281506546"],["1870837942477655969123169532603615788122896469891695773961478956740992497097","12536105729661705698805725105036536744930776470051238187456307227425796690780"],["21811903352654147452884857281720047789720483752548991551595462057142824037334","19021616763967199151052893283384285352200445499680068407023236283004353578353"]]],IC:[["11992897507809711711025355300535923222599547639134311050809253678876341466909","17181525095924075896332561978747020491074338784673526378866503154966799128110","1"],["17018665030246167677911144513385572506766200776123272044534328594850561667818","18601114175490465275436712413925513066546725461375425769709566180981674884464","1"],["18799470100699658367834559797874857804183288553462108031963980039244731716542","13064227487174191981628537974951887429496059857753101852163607049188825592007","1"],["17432501889058124609368103715904104425610382063762621017593209214189134571156","13406815149699834788256141097399354592751313348962590382887503595131085938635","1"],["10320964835612716439094703312987075811498239445882526576970512041988148264481","9024164961646353611176283204118089412001502110138072989569118393359029324867","1"],["718355081067365548229685160476620267257521491773976402837645005858953849298","14635482993933988261008156660773180150752190597753512086153001683711587601974","1"],["11777720285956632126519898515392071627539405001940313098390150593689568177535","8483603647274280691250972408211651407952870456587066148445913156086740744515","1"]]};var ea=eo;async function builder(O,U){let $;U=U||{};try{$=await WebAssembly.compile(O)}catch(O){throw console.log(O),console.log("\nTry to run circom --c in order to generate c++ code instead\n"),Error(O)}let J="",en="",es=await WebAssembly.instantiate($,{runtime:{exceptionHandler:function(O){let U;throw Error((U=1==O?"Signal not found.\n":2==O?"Too many signals set.\n":3==O?"Signal already set.\n":4==O?"Assert Failed.\n":5==O?"Not enough memory.\n":6==O?"Input signal array access exceeds the size.\n":"Unknown error.\n")+J)},printErrorMessage:function(){J+=getMessage()+"\n"},writeBufferMessage:function(){let O=getMessage();"\n"===O?(console.log(en),en=""):(""!==en&&(en+=" "),en+=O)},showSharedRWMemory:function(){printSharedRWMemory()}}}),eo=U;return new WitnessCalculator(es,eo);function getMessage(){for(var O="",U=es.exports.getMessageChar();0!=U;)O+=String.fromCharCode(U),U=es.exports.getMessageChar();return O}function printSharedRWMemory(){let O=es.exports.getFieldNumLen32(),U=new Uint32Array(O);for(let $=0;${let $=fnvHash(U),en=parseInt($.slice(0,8),16),es=parseInt($.slice(8,16),16),eo=flatArray(O[U]),ea=this.instance.exports.getInputSignalSize(en,es);if(ea<0)throw Error(`Signal ${U} not found + */var J=$(2265),en=$(6272);function p(O,U){return O===U&&(0!==O||1/O==1/U)||O!=O&&U!=U}var es="function"==typeof Object.is?Object.is:p,eo=en.useSyncExternalStore,ea=J.useRef,eu=J.useEffect,ef=J.useMemo,eg=J.useDebugValue;U.useSyncExternalStoreWithSelector=function(O,U,$,J,en){var ev=ea(null);if(null===ev.current){var e_={hasValue:!1,value:null};ev.current=e_}else e_=ev.current;var ew=eo(O,(ev=ef(function(){function a(U){if(!ea){if(ea=!0,O=U,U=J(U),void 0!==en&&e_.hasValue){var $=e_.value;if(en($,U))return eo=$}return eo=U}if($=eo,es(O,U))return $;var eu=J(U);return void 0!==en&&en($,eu)?$:(O=U,eo=eu)}var O,eo,ea=!1,eu=void 0===$?null:$;return[function(){return a(U())},null===eu?void 0:function(){return a(eu())}]},[U,$,J,en]))[0],ev[1]);return eu(function(){e_.hasValue=!0,e_.value=ew},[ew]),eg(ew),ew}},6272:function(O,U,$){"use strict";O.exports=$(1853)},5401:function(O,U,$){"use strict";O.exports=$(8704)},4910:function(O){"use strict";function isHighSurrogate(O){return O>=55296&&O<=56319}function isLowSurrogate(O){return O>=56320&&O<=57343}O.exports=function(O){if("string"!=typeof O)throw Error("Input must be string");for(var U=O.length,$=0,J=null,en=null,es=0;es=128&&J<=2047?$+=2:J>=2048&&J<=65535&&($+=3),en=J;return $}},1872:function(O,U,$){"use strict";let J;$.d(U,{Z:function(){return esm_browser_v4}});let en="undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto);var es={randomUUID:en};let eo=new Uint8Array(16);function rng(){if(!J&&!(J="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return J(eo)}let ea=[];for(let O=0;O<256;++O)ea.push((O+256).toString(16).slice(1));function unsafeStringify(O,U=0){return ea[O[U+0]]+ea[O[U+1]]+ea[O[U+2]]+ea[O[U+3]]+"-"+ea[O[U+4]]+ea[O[U+5]]+"-"+ea[O[U+6]]+ea[O[U+7]]+"-"+ea[O[U+8]]+ea[O[U+9]]+"-"+ea[O[U+10]]+ea[O[U+11]]+ea[O[U+12]]+ea[O[U+13]]+ea[O[U+14]]+ea[O[U+15]]}var esm_browser_v4=function(O,U,$){if(es.randomUUID&&!U&&!O)return es.randomUUID();O=O||{};let J=O.random||(O.rng||rng)();if(J[6]=15&J[6]|64,J[8]=63&J[8]|128,U){$=$||0;for(let O=0;O<16;++O)U[$+O]=J[O];return U}return unsafeStringify(J)}},372:function(O,U,$){var J,en,es;!function(eo,ea){en=[$(4481)],void 0!==(es="function"==typeof(J=ea)?J.apply(U,en):J)&&(O.exports=es)}(0,function(O){"use strict";var U=O.Reader,$=O.Writer,J=O.util,en=O.roots.default||(O.roots.default={});return en.RPC=function(){var es;function RPC(O){if(this.subscriptions=[],this.messages=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.subscriptions&&es.subscriptions.length||(es.subscriptions=[]),es.subscriptions.push(en.RPC.SubOpts.decode(O,O.uint32()));break;case 2:es.messages&&es.messages.length||(es.messages=[]),es.messages.push(en.RPC.Message.decode(O,O.uint32()));break;case 3:es.control=en.RPC.ControlMessage.decode(O,O.uint32());break;default:O.skipType(7&eo)}}return es},RPC.fromObject=function(O){if(O instanceof en.RPC)return O;var U=new en.RPC;if(O.subscriptions){if(!Array.isArray(O.subscriptions))throw TypeError(".RPC.subscriptions: array expected");U.subscriptions=[];for(var $=0;$>>3){case 1:es.subscribe=O.bool();break;case 2:es.topic=O.string();break;default:O.skipType(7&eo)}}return es},SubOpts.fromObject=function(O){if(O instanceof en.RPC.SubOpts)return O;var U=new en.RPC.SubOpts;return null!=O.subscribe&&(U.subscribe=!!O.subscribe),null!=O.topic&&(U.topic=String(O.topic)),U},SubOpts.toObject=function(O,U){U||(U={});var $={};return null!=O.subscribe&&O.hasOwnProperty("subscribe")&&($.subscribe=O.subscribe,U.oneofs&&($._subscribe="subscribe")),null!=O.topic&&O.hasOwnProperty("topic")&&($.topic=O.topic,U.oneofs&&($._topic="topic")),$},SubOpts.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},SubOpts}(),RPC.Message=function(){var es;function Message(O){if(O)for(var U=Object.keys(O),$=0;$>>3){case 1:eo.from=O.bytes();break;case 2:eo.data=O.bytes();break;case 3:eo.seqno=O.bytes();break;case 4:eo.topic=O.string();break;case 5:eo.signature=O.bytes();break;case 6:eo.key=O.bytes();break;default:O.skipType(7&ea)}}if(!eo.hasOwnProperty("topic"))throw J.ProtocolError("missing required 'topic'",{instance:eo});return eo},Message.fromObject=function(O){if(O instanceof en.RPC.Message)return O;var U=new en.RPC.Message;return null!=O.from&&("string"==typeof O.from?J.base64.decode(O.from,U.from=J.newBuffer(J.base64.length(O.from)),0):O.from.length&&(U.from=O.from)),null!=O.data&&("string"==typeof O.data?J.base64.decode(O.data,U.data=J.newBuffer(J.base64.length(O.data)),0):O.data.length&&(U.data=O.data)),null!=O.seqno&&("string"==typeof O.seqno?J.base64.decode(O.seqno,U.seqno=J.newBuffer(J.base64.length(O.seqno)),0):O.seqno.length&&(U.seqno=O.seqno)),null!=O.topic&&(U.topic=String(O.topic)),null!=O.signature&&("string"==typeof O.signature?J.base64.decode(O.signature,U.signature=J.newBuffer(J.base64.length(O.signature)),0):O.signature.length&&(U.signature=O.signature)),null!=O.key&&("string"==typeof O.key?J.base64.decode(O.key,U.key=J.newBuffer(J.base64.length(O.key)),0):O.key.length&&(U.key=O.key)),U},Message.toObject=function(O,U){U||(U={});var $={};return U.defaults&&($.topic=""),null!=O.from&&O.hasOwnProperty("from")&&($.from=U.bytes===String?J.base64.encode(O.from,0,O.from.length):U.bytes===Array?Array.prototype.slice.call(O.from):O.from,U.oneofs&&($._from="from")),null!=O.data&&O.hasOwnProperty("data")&&($.data=U.bytes===String?J.base64.encode(O.data,0,O.data.length):U.bytes===Array?Array.prototype.slice.call(O.data):O.data,U.oneofs&&($._data="data")),null!=O.seqno&&O.hasOwnProperty("seqno")&&($.seqno=U.bytes===String?J.base64.encode(O.seqno,0,O.seqno.length):U.bytes===Array?Array.prototype.slice.call(O.seqno):O.seqno,U.oneofs&&($._seqno="seqno")),null!=O.topic&&O.hasOwnProperty("topic")&&($.topic=O.topic),null!=O.signature&&O.hasOwnProperty("signature")&&($.signature=U.bytes===String?J.base64.encode(O.signature,0,O.signature.length):U.bytes===Array?Array.prototype.slice.call(O.signature):O.signature,U.oneofs&&($._signature="signature")),null!=O.key&&O.hasOwnProperty("key")&&($.key=U.bytes===String?J.base64.encode(O.key,0,O.key.length):U.bytes===Array?Array.prototype.slice.call(O.key):O.key,U.oneofs&&($._key="key")),$},Message.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},Message}(),RPC.ControlMessage=function(){function ControlMessage(O){if(this.ihave=[],this.iwant=[],this.graft=[],this.prune=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.ihave&&es.ihave.length||(es.ihave=[]),es.ihave.push(en.RPC.ControlIHave.decode(O,O.uint32()));break;case 2:es.iwant&&es.iwant.length||(es.iwant=[]),es.iwant.push(en.RPC.ControlIWant.decode(O,O.uint32()));break;case 3:es.graft&&es.graft.length||(es.graft=[]),es.graft.push(en.RPC.ControlGraft.decode(O,O.uint32()));break;case 4:es.prune&&es.prune.length||(es.prune=[]),es.prune.push(en.RPC.ControlPrune.decode(O,O.uint32()));break;default:O.skipType(7&eo)}}return es},ControlMessage.fromObject=function(O){if(O instanceof en.RPC.ControlMessage)return O;var U=new en.RPC.ControlMessage;if(O.ihave){if(!Array.isArray(O.ihave))throw TypeError(".RPC.ControlMessage.ihave: array expected");U.ihave=[];for(var $=0;$>>3){case 1:es.topicID=O.string();break;case 2:es.messageIDs&&es.messageIDs.length||(es.messageIDs=[]),es.messageIDs.push(O.bytes());break;default:O.skipType(7&eo)}}return es},ControlIHave.fromObject=function(O){if(O instanceof en.RPC.ControlIHave)return O;var U=new en.RPC.ControlIHave;if(null!=O.topicID&&(U.topicID=String(O.topicID)),O.messageIDs){if(!Array.isArray(O.messageIDs))throw TypeError(".RPC.ControlIHave.messageIDs: array expected");U.messageIDs=[];for(var $=0;$>>3==1?(es.messageIDs&&es.messageIDs.length||(es.messageIDs=[]),es.messageIDs.push(O.bytes())):O.skipType(7&eo)}return es},ControlIWant.fromObject=function(O){if(O instanceof en.RPC.ControlIWant)return O;var U=new en.RPC.ControlIWant;if(O.messageIDs){if(!Array.isArray(O.messageIDs))throw TypeError(".RPC.ControlIWant.messageIDs: array expected");U.messageIDs=[];for(var $=0;$>>3==1?es.topicID=O.string():O.skipType(7&eo)}return es},ControlGraft.fromObject=function(O){if(O instanceof en.RPC.ControlGraft)return O;var U=new en.RPC.ControlGraft;return null!=O.topicID&&(U.topicID=String(O.topicID)),U},ControlGraft.toObject=function(O,U){U||(U={});var $={};return null!=O.topicID&&O.hasOwnProperty("topicID")&&($.topicID=O.topicID,U.oneofs&&($._topicID="topicID")),$},ControlGraft.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},ControlGraft}(),RPC.ControlPrune=function(){var es;function ControlPrune(O){if(this.peers=[],O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.topicID=O.string();break;case 2:es.peers&&es.peers.length||(es.peers=[]),es.peers.push(en.RPC.PeerInfo.decode(O,O.uint32()));break;case 3:es.backoff=O.uint64();break;default:O.skipType(7&eo)}}return es},ControlPrune.fromObject=function(O){if(O instanceof en.RPC.ControlPrune)return O;var U=new en.RPC.ControlPrune;if(null!=O.topicID&&(U.topicID=String(O.topicID)),O.peers){if(!Array.isArray(O.peers))throw TypeError(".RPC.ControlPrune.peers: array expected");U.peers=[];for(var $=0;$>>0,O.backoff.high>>>0).toNumber(!0))),U},ControlPrune.toObject=function(O,U){U||(U={});var $={};if((U.arrays||U.defaults)&&($.peers=[]),null!=O.topicID&&O.hasOwnProperty("topicID")&&($.topicID=O.topicID,U.oneofs&&($._topicID="topicID")),O.peers&&O.peers.length){$.peers=[];for(var es=0;es>>0,O.backoff.high>>>0).toNumber(!0):O.backoff,U.oneofs&&($._backoff="backoff")),$},ControlPrune.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},ControlPrune}(),RPC.PeerInfo=function(){var es;function PeerInfo(O){if(O)for(var U=Object.keys(O),$=0;$>>3){case 1:es.peerID=O.bytes();break;case 2:es.signedPeerRecord=O.bytes();break;default:O.skipType(7&eo)}}return es},PeerInfo.fromObject=function(O){if(O instanceof en.RPC.PeerInfo)return O;var U=new en.RPC.PeerInfo;return null!=O.peerID&&("string"==typeof O.peerID?J.base64.decode(O.peerID,U.peerID=J.newBuffer(J.base64.length(O.peerID)),0):O.peerID.length&&(U.peerID=O.peerID)),null!=O.signedPeerRecord&&("string"==typeof O.signedPeerRecord?J.base64.decode(O.signedPeerRecord,U.signedPeerRecord=J.newBuffer(J.base64.length(O.signedPeerRecord)),0):O.signedPeerRecord.length&&(U.signedPeerRecord=O.signedPeerRecord)),U},PeerInfo.toObject=function(O,U){U||(U={});var $={};return null!=O.peerID&&O.hasOwnProperty("peerID")&&($.peerID=U.bytes===String?J.base64.encode(O.peerID,0,O.peerID.length):U.bytes===Array?Array.prototype.slice.call(O.peerID):O.peerID,U.oneofs&&($._peerID="peerID")),null!=O.signedPeerRecord&&O.hasOwnProperty("signedPeerRecord")&&($.signedPeerRecord=U.bytes===String?J.base64.encode(O.signedPeerRecord,0,O.signedPeerRecord.length):U.bytes===Array?Array.prototype.slice.call(O.signedPeerRecord):O.signedPeerRecord,U.oneofs&&($._signedPeerRecord="signedPeerRecord")),$},PeerInfo.prototype.toJSON=function(){return this.constructor.toObject(this,O.util.toJSONOptions)},PeerInfo}(),RPC}(),en})},5493:function(O,U,$){"use strict";function number(O){if(!Number.isSafeInteger(O)||O<0)throw Error(`Wrong positive integer: ${O}`)}function bool(O){if("boolean"!=typeof O)throw Error(`Expected boolean, not ${O}`)}function bytes(O,...U){if(!(O instanceof Uint8Array))throw Error("Expected Uint8Array");if(U.length>0&&!U.includes(O.length))throw Error(`Expected Uint8Array of length ${U}, not of length=${O.length}`)}function hash(O){if("function"!=typeof O||"function"!=typeof O.create)throw Error("Hash should be wrapped by utils.wrapConstructor");number(O.outputLen),number(O.blockLen)}function exists(O,U=!0){if(O.destroyed)throw Error("Hash instance has been destroyed");if(U&&O.finished)throw Error("Hash#digest() has already been called")}function output(O,U){bytes(O);let $=U.outputLen;if(O.length<$)throw Error(`digestInto() expects output buffer of length at least ${$}`)}let J={number,bool,bytes,hash,exists,output};U.ZP=J},4727:function(O,U,$){"use strict";$.d(U,{N:function(){return SHA2}});var J=$(5493),en=$(2305);function setBigUint64(O,U,$,J){if("function"==typeof O.setBigUint64)return O.setBigUint64(U,$,J);let en=BigInt(32),es=BigInt(4294967295),eo=Number($>>en&es),ea=Number($&es),eu=J?4:0,ef=J?0:4;O.setUint32(U+eu,eo,J),O.setUint32(U+ef,ea,J)}let SHA2=class SHA2 extends en.kb{constructor(O,U,$,J){super(),this.blockLen=O,this.outputLen=U,this.padOffset=$,this.isLE=J,this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.buffer=new Uint8Array(O),this.view=(0,en.GL)(this.buffer)}update(O){J.ZP.exists(this);let{view:U,buffer:$,blockLen:es}=this;O=(0,en.O0)(O);let eo=O.length;for(let J=0;Jes-ea&&(this.process($,0),ea=0);for(let O=ea;Oev.length)throw Error("_sha2: outputLen bigger than state");for(let O=0;O>en&J)}:{h:0|Number(O>>en&J),l:0|Number(O&J)}}function split(O,U=!1){let $=new Uint32Array(O.length),J=new Uint32Array(O.length);for(let en=0;enBigInt(O>>>0)<>>0),shrSH=(O,U,$)=>O>>>$,shrSL=(O,U,$)=>O<<32-$|U>>>$,rotrSH=(O,U,$)=>O>>>$|U<<32-$,rotrSL=(O,U,$)=>O<<32-$|U>>>$,rotrBH=(O,U,$)=>O<<64-$|U>>>$-32,rotrBL=(O,U,$)=>O>>>$-32|U<<64-$,rotr32H=(O,U)=>U,rotr32L=(O,U)=>O,rotlSH=(O,U,$)=>O<<$|U>>>32-$,rotlSL=(O,U,$)=>U<<$|O>>>32-$,rotlBH=(O,U,$)=>U<<$-32|O>>>64-$,rotlBL=(O,U,$)=>O<<$-32|U>>>64-$;function add(O,U,$,J){let en=(U>>>0)+(J>>>0);return{h:O+$+(en/4294967296|0)|0,l:0|en}}let add3L=(O,U,$)=>(O>>>0)+(U>>>0)+($>>>0),add3H=(O,U,$,J)=>U+$+J+(O/4294967296|0)|0,add4L=(O,U,$,J)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0),add4H=(O,U,$,J,en)=>U+$+J+en+(O/4294967296|0)|0,add5L=(O,U,$,J,en)=>(O>>>0)+(U>>>0)+($>>>0)+(J>>>0)+(en>>>0),add5H=(O,U,$,J,en,es)=>U+$+J+en+es+(O/4294967296|0)|0,es={fromBig,split,toBig,shrSH,shrSL,rotrSH,rotrSL,rotrBH,rotrBL,rotr32H,rotr32L,rotlSH,rotlSL,rotlBH,rotlBL,add,add3L,add3H,add4L,add4H,add5H,add5L};U.ZP=es},9802:function(O,U,$){"use strict";$.d(U,{J:function(){return eu}});var J=$(4727),en=$(2305);let Chi=(O,U,$)=>O&U^~O&$,Maj=(O,U,$)=>O&U^O&$^U&$,es=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]),eo=new Uint32Array([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),ea=new Uint32Array(64);let SHA256=class SHA256 extends J.N{constructor(){super(64,32,8,!1),this.A=0|eo[0],this.B=0|eo[1],this.C=0|eo[2],this.D=0|eo[3],this.E=0|eo[4],this.F=0|eo[5],this.G=0|eo[6],this.H=0|eo[7]}get(){let{A:O,B:U,C:$,D:J,E:en,F:es,G:eo,H:ea}=this;return[O,U,$,J,en,es,eo,ea]}set(O,U,$,J,en,es,eo,ea){this.A=0|O,this.B=0|U,this.C=0|$,this.D=0|J,this.E=0|en,this.F=0|es,this.G=0|eo,this.H=0|ea}process(O,U){for(let $=0;$<16;$++,U+=4)ea[$]=O.getUint32(U,!1);for(let O=16;O<64;O++){let U=ea[O-15],$=ea[O-2],J=(0,en.np)(U,7)^(0,en.np)(U,18)^U>>>3,es=(0,en.np)($,17)^(0,en.np)($,19)^$>>>10;ea[O]=es+ea[O-7]+J+ea[O-16]|0}let{A:$,B:J,C:eo,D:eu,E:ef,F:eg,G:ev,H:e_}=this;for(let O=0;O<64;O++){let U=(0,en.np)(ef,6)^(0,en.np)(ef,11)^(0,en.np)(ef,25),ew=e_+U+Chi(ef,eg,ev)+es[O]+ea[O]|0,eE=(0,en.np)($,2)^(0,en.np)($,13)^(0,en.np)($,22),eS=eE+Maj($,J,eo)|0;e_=ev,ev=eg,eg=ef,ef=eu+ew|0,eu=eo,eo=J,J=$,$=ew+eS|0}$=$+this.A|0,J=J+this.B|0,eo=eo+this.C|0,eu=eu+this.D|0,ef=ef+this.E|0,eg=eg+this.F|0,ev=ev+this.G|0,e_=e_+this.H|0,this.set($,J,eo,eu,ef,eg,ev,e_)}roundClean(){ea.fill(0)}destroy(){this.set(0,0,0,0,0,0,0,0),this.buffer.fill(0)}};let SHA224=class SHA224 extends SHA256{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}};let eu=(0,en.hE)(()=>new SHA256);(0,en.hE)(()=>new SHA224)},2305:function(O,U,$){"use strict";$.d(U,{kb:function(){return Hash},ci:function(){return bytesToHex},eV:function(){return concatBytes},GL:function(){return createView},nr:function(){return hexToBytes},O6:function(){return randomBytes},np:function(){return rotr},O0:function(){return toBytes},Jq:function(){return u32},iY:function(){return utf8ToBytes},hE:function(){return wrapConstructor},gz:function(){return wrapXOFConstructorWithOpts}});let J="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,u8a=O=>O instanceof Uint8Array,u32=O=>new Uint32Array(O.buffer,O.byteOffset,Math.floor(O.byteLength/4)),createView=O=>new DataView(O.buffer,O.byteOffset,O.byteLength),rotr=(O,U)=>O<<32-U|O>>>U,en=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0];if(!en)throw Error("Non little-endian hardware is not supported");let es=Array.from({length:256},(O,U)=>U.toString(16).padStart(2,"0"));function bytesToHex(O){if(!u8a(O))throw Error("Uint8Array expected");let U="";for(let $=0;$O+U.length,0)),$=0;return O.forEach(O=>{if(!u8a(O))throw Error("Uint8Array expected");U.set(O,$),$+=O.length}),U}let Hash=class Hash{clone(){return this._cloneInto()}};function wrapConstructor(O){let hashC=U=>O().update(toBytes(U)).digest(),U=O();return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=()=>O(),hashC}function wrapXOFConstructorWithOpts(O){let hashC=(U,$)=>O($).update(toBytes(U)).digest(),U=O({});return hashC.outputLen=U.outputLen,hashC.blockLen=U.blockLen,hashC.create=U=>O(U),hashC}function randomBytes(O=32){if(J&&"function"==typeof J.getRandomValues)return J.getRandomValues(new Uint8Array(O));throw Error("crypto.getRandomValues must be defined")}},3909:function(O,U,$){"use strict";function checkInt(O,U,$,J,en,es){if(U>en||UO.length)throw RangeError("Index out of range")}function writeUIntLE(O,U,$,J,en){if(U=+U,$>>>=0,J>>>=0,!en){let en=Math.pow(2,8*J)-1;checkInt(O,U,$,J,en,0)}let es=1,eo=0;for(O[$]=255&U;++eo(0,en.m)(O,"utf8");var es=$(8385);function toRLNSignal(O,U){let $=utf8ToBytes(O??"");return new Uint8Array([...U.payload??[],...$])}let RlnMessage=class RlnMessage{constructor(O,U,$){this.rlnInstance=O,this.msg=U,this.rateLimitProof=$,this.pubsubTopic=""}verify(O){return this.rateLimitProof?this.rlnInstance.verifyWithRoots(this.rateLimitProof,toRLNSignal(this.msg.contentTopic,this.msg),...O):void 0}verifyNoRoot(){return this.rateLimitProof?this.rlnInstance.verifyWithNoRoot(this.rateLimitProof,toRLNSignal(this.msg.contentTopic,this.msg)):void 0}get payload(){return this.msg.payload}get contentTopic(){return this.msg.contentTopic}get timestamp(){return this.msg.timestamp}get ephemeral(){return this.msg.ephemeral}get meta(){return this.msg.meta}get epoch(){let O=this.msg.rateLimitProof?.epoch;if(O)return(0,es.lv)(O)}};let eo=J("waku:rln:encoder");let RLNEncoder=class RLNEncoder{constructor(O,U,$,J){if(this.encoder=O,this.rlnInstance=U,this.index=$,$<0)throw"invalid membership index";this.idSecretHash=J.IDSecretHash}async toWire(O){return O.rateLimitProof=await this.generateProof(O),eo("Proof generated",O.rateLimitProof),this.encoder.toWire(O)}async toProtoObj(O){let U=await this.encoder.toProtoObj(O);if(U)return U.contentTopic=this.contentTopic,U.rateLimitProof=await this.generateProof(O),eo("Proof generated",U.rateLimitProof),U}async generateProof(O){let U=toRLNSignal(this.contentTopic,O);console.time("proof_gen_timer");let $=await this.rlnInstance.generateRLNProof(U,this.index,O.timestamp,this.idSecretHash);return console.timeEnd("proof_gen_timer"),$}get pubsubTopic(){return this.encoder.pubsubTopic}get contentTopic(){return this.encoder.contentTopic}get ephemeral(){return this.encoder.ephemeral}};let RLNDecoder=class RLNDecoder{constructor(O,U){this.rlnInstance=O,this.decoder=U}get pubsubTopic(){return this.decoder.pubsubTopic}get contentTopic(){return this.decoder.contentTopic}fromWireToProtoObj(O){let U=this.decoder.fromWireToProtoObj(O);return eo("Message decoded",U),Promise.resolve(U)}async fromProtoObj(O,U){let $=await this.decoder.fromProtoObj(O,U);if($)return new RlnMessage(this.rlnInstance,$,U.rateLimitProof)}};let ea=["error IncompatibleStorage()","error IncompatibleStorageIndex()","error NoStorageContractAvailable()","error StorageAlreadyExists(address storageAddress)","event AdminChanged(address previousAdmin, address newAdmin)","event BeaconUpgraded(address indexed beacon)","event Initialized(uint8 version)","event NewStorageContract(uint16 index, address storageAddress)","event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)","event Upgraded(address indexed implementation)","function forceProgress()","function initialize(address _poseidonHasher)","function newStorage()","function nextStorageIndex() view returns (uint16)","function owner() view returns (address)","function poseidonHasher() view returns (address)","function proxiableUUID() view returns (bytes32)","function register(uint16 storageIndex, uint256 commitment)","function register(uint256[] commitments)","function register(uint16 storageIndex, uint256[] commitments)","function registerStorage(address storageAddress)","function renounceOwnership()","function storages(uint16) view returns (address)","function transferOwnership(address newOwner)","function upgradeTo(address newImplementation)","function upgradeToAndCall(address newImplementation, bytes data) payable","function usingStorageIndex() view returns (uint16)"],eu=["constructor(address _poseidonHasher, uint16 _contractIndex)","error DuplicateIdCommitment()","error FullTree()","error InvalidIdCommitment(uint256 idCommitment)","error NotImplemented()","event MemberRegistered(uint256 idCommitment, uint256 index)","event MemberWithdrawn(uint256 idCommitment, uint256 index)","event OwnershipTransferred(address indexed previousOwner, address indexed newOwner)","function DEPTH() view returns (uint256)","function MEMBERSHIP_DEPOSIT() view returns (uint256)","function SET_SIZE() view returns (uint256)","function contractIndex() view returns (uint16)","function deployedBlockNumber() view returns (uint32)","function idCommitmentIndex() view returns (uint256)","function isValidCommitment(uint256 idCommitment) view returns (bool)","function memberExists(uint256) view returns (bool)","function members(uint256) view returns (uint256)","function owner() view returns (address)","function poseidonHasher() view returns (address)","function register(uint256[] idCommitments)","function register(uint256 idCommitment) payable","function renounceOwnership()","function slash(uint256 idCommitment, address receiver, uint256[8] proof) pure","function stakedAmounts(uint256) view returns (uint256)","function transferOwnership(address newOwner)","function verifier() view returns (address)","function withdraw() pure","function withdrawalBalance(address) view returns (uint256)"],ef={chainId:11155111,address:"0xF471d71E9b1455bBF4b85d475afb9BB0954A29c4",abi:ea};var eg=$(8063),ev=$(9802),e_=$(5493),ew=$(2305);function utils_bytesToUtf8(O){if(!(O instanceof Uint8Array))throw TypeError(`bytesToUtf8 expected Uint8Array, got ${typeof O}`);return new TextDecoder().decode(O)}function utils_hexToBytes(O){let U=O.startsWith("0x")?O.substring(2):O;return(0,ew.nr)(U)}function wrapHash(O){return U=>(e_.ZP.bytes(U),O(U))}e_.ZP.bool,e_.ZP.bytes,(()=>{let O="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0,U="undefined"!=typeof module&&"function"==typeof module.require&&module.require.bind(module);return U&&!O?U("crypto"):void 0})();let eE=wrapHash(ev.J);var eS=$(2890),eA=$(1872),eI=$(3909),eP=$(4589),ek=$(9686),eT=$(6357),eR=$(606);let[eC,eB,eN]=[[],[],[]],eD=BigInt(0),eM=BigInt(1),eO=BigInt(2),eL=BigInt(7),eU=BigInt(256),eF=BigInt(113);for(let O=0,U=eM,$=1,J=0;O<24;O++){[$,J]=[J,(2*$+3*J)%5],eC.push(2*(5*J+$)),eB.push((O+1)*(O+2)/2%64);let en=eD;for(let O=0;O<7;O++)(U=(U<>eL)*eF)%eU)&eO&&(en^=eM<<(eM<$>32?eR.ZP.rotlBH(O,U,$):eR.ZP.rotlSH(O,U,$),rotlL=(O,U,$)=>$>32?eR.ZP.rotlBL(O,U,$):eR.ZP.rotlSL(O,U,$);function keccakP(O,U=24){let $=new Uint32Array(10);for(let J=24-U;J<24;J++){for(let U=0;U<10;U++)$[U]=O[U]^O[U+10]^O[U+20]^O[U+30]^O[U+40];for(let U=0;U<10;U+=2){let J=(U+8)%10,en=(U+2)%10,es=$[en],eo=$[en+1],ea=rotlH(es,eo,1)^$[J],eu=rotlL(es,eo,1)^$[J+1];for(let $=0;$<50;$+=10)O[U+$]^=ea,O[U+$+1]^=eu}let U=O[2],en=O[3];for(let $=0;$<24;$++){let J=eB[$],es=rotlH(U,en,J),eo=rotlL(U,en,J),ea=eC[$];U=O[ea],en=O[ea+1],O[ea]=es,O[ea+1]=eo}for(let U=0;U<50;U+=10){for(let J=0;J<10;J++)$[J]=O[U+J];for(let J=0;J<10;J++)O[U+J]^=~$[(J+2)%10]&$[(J+4)%10]}O[0]^=eK[J],O[1]^=ej[J]}$.fill(0)}let Keccak=class Keccak extends ew.kb{constructor(O,U,$,J=!1,en=24){if(super(),this.blockLen=O,this.suffix=U,this.outputLen=$,this.enableXOF=J,this.rounds=en,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,e_.ZP.number($),0>=this.blockLen||this.blockLen>=200)throw Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,ew.Jq)(this.state)}keccak(){keccakP(this.state32,this.rounds),this.posOut=0,this.pos=0}update(O){e_.ZP.exists(this);let{blockLen:U,state:$}=this;O=(0,ew.O0)(O);let J=O.length;for(let en=0;en=$&&this.keccak();let es=Math.min($-this.posOut,en-J);O.set(U.subarray(this.posOut,this.posOut+es),J),this.posOut+=es,J+=es}return O}xofInto(O){if(!this.enableXOF)throw Error("XOF is not possible for this instance");return this.writeInto(O)}xof(O){return e_.ZP.number(O),this.xofInto(new Uint8Array(O))}digestInto(O){if(e_.ZP.output(O,this),this.finished)throw Error("digest() was already called");return this.writeInto(O),this.destroy(),O}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(O){let{blockLen:U,suffix:$,outputLen:J,rounds:en,enableXOF:es}=this;return O||(O=new Keccak(U,$,J,es,en)),O.state32.set(this.state32),O.pos=this.pos,O.posOut=this.posOut,O.finished=this.finished,O.rounds=en,O.suffix=$,O.outputLen=J,O.enableXOF=es,O.destroyed=this.destroyed,O}};let gen=(O,U,$)=>(0,ew.hE)(()=>new Keccak(U,O,$));gen(6,144,28),gen(6,136,32),gen(6,104,48),gen(6,72,64);let eH=gen(1,144,28),eq=gen(1,136,32),eV=gen(1,104,48),eG=gen(1,72,64),genShake=(O,U,$)=>(0,ew.gz)((J={})=>new Keccak(U,O,void 0===J.dkLen?$:J.dkLen,!0));genShake(31,168,16),genShake(31,136,32),wrapHash(eH);let e$=(()=>{let O=wrapHash(eq);return O.create=eq.create,O})();wrapHash(eV),wrapHash(eG);let validateChecksum=async(O,U)=>{let $=await keccak256Checksum(O,U);return $===U.crypto.checksum.message},decryptEipKeystore=async(O,U)=>{let $=await (0,ek.kdf)(U.crypto.kdf,(0,eT.normalizePassword)(O)),J=await validateChecksum(O,U);if(!J)throw Error("Password is invalid.");return(0,eP.cipherDecrypt)(U.crypto.cipher,$.slice(0,16))},keccak256Checksum=async(O,U)=>{let $=await (0,ek.kdf)(U.crypto.kdf,(0,eT.normalizePassword)(O)),J=(0,ew.eV)($.slice(16),utils_hexToBytes(U.crypto.cipher.message)),en=e$(J);return(0,ew.ci)(en)},eW=validate11;function validate11(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return validate11.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.crypto&&($="crypto"))return validate11.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.crypto){let $=O.crypto,J=eo;if(eo===J){if(!$||"object"!=typeof $||Array.isArray($))return validate11.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let O;if(void 0===$.cipher&&(O="cipher")||void 0===$.cipherparams&&(O="cipherparams")||void 0===$.ciphertext&&(O="ciphertext")||void 0===$.kdf&&(O="kdf")||void 0===$.kdfparams&&(O="kdfparams")||void 0===$.mac&&(O="mac"))return validate11.errors=[{instancePath:U+"/crypto",schemaPath:"#/properties/crypto/required",keyword:"required",params:{missingProperty:O},message:"must have required property '"+O+"'"}],!1;if(void 0!==$.cipher){let O=eo;if("string"!=typeof $.cipher)return validate11.errors=[{instancePath:U+"/crypto/cipher",schemaPath:"#/properties/crypto/properties/cipher/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.cipherparams){let O=$.cipherparams,J=eo;if(!(O&&"object"==typeof O&&!Array.isArray(O)))return validate11.errors=[{instancePath:U+"/crypto/cipherparams",schemaPath:"#/properties/crypto/properties/cipherparams/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==$.ciphertext){let O=eo;if("string"!=typeof $.ciphertext)return validate11.errors=[{instancePath:U+"/crypto/ciphertext",schemaPath:"#/properties/crypto/properties/ciphertext/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.kdf){let O=eo;if("string"!=typeof $.kdf)return validate11.errors=[{instancePath:U+"/crypto/kdf",schemaPath:"#/properties/crypto/properties/kdf/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0;if(ea){if(void 0!==$.kdfparams){let O=$.kdfparams,J=eo;if(!(O&&"object"==typeof O&&!Array.isArray(O)))return validate11.errors=[{instancePath:U+"/crypto/kdfparams",schemaPath:"#/properties/crypto/properties/kdfparams/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==$.mac){let O=eo;if("string"!=typeof $.mac)return validate11.errors=[{instancePath:U+"/crypto/mac",schemaPath:"#/properties/crypto/properties/mac/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=O===eo}else var ea=!0}}}}}}}}}return validate11.errors=es,0===eo}let eY=keystore_validation_generated_validate11;function keystore_validation_generated_validate11(O,{instancePath:U="",parentData:$,parentDataProperty:J,rootData:en=O}={}){let es=null,eo=0;if(!O||"object"!=typeof O||Array.isArray(O))return keystore_validation_generated_validate11.errors=[{instancePath:U,schemaPath:"#/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;{let $;if(void 0===O.application&&($="application")||void 0===O.appIdentifier&&($="appIdentifier")||void 0===O.credentials&&($="credentials")||void 0===O.version&&($="version"))return keystore_validation_generated_validate11.errors=[{instancePath:U,schemaPath:"#/required",keyword:"required",params:{missingProperty:$},message:"must have required property '"+$+"'"}],!1;if(void 0!==O.credentials){let $=O.credentials,J=eo;if(!($&&"object"==typeof $&&!Array.isArray($)))return keystore_validation_generated_validate11.errors=[{instancePath:U+"/credentials",schemaPath:"#/properties/credentials/type",keyword:"type",params:{type:"object"},message:"must be object"}],!1;var ea=J===eo}else var ea=!0;if(ea){if(void 0!==O.appIdentifier){let $=eo;if("string"!=typeof O.appIdentifier)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/appIdentifier",schemaPath:"#/properties/appIdentifier/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0;if(ea){if(void 0!==O.version){let $=eo;if("string"!=typeof O.version)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/version",schemaPath:"#/properties/version/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0;if(ea){if(void 0!==O.application){let $=eo;if("string"!=typeof O.application)return keystore_validation_generated_validate11.errors=[{instancePath:U+"/application",schemaPath:"#/properties/application/type",keyword:"type",params:{type:"string"},message:"must be string"}],!1;var ea=$===eo}else var ea=!0}}}}return keystore_validation_generated_validate11.errors=es,0===eo}let eJ=eY,eQ=eW;function schemaValidationErrors(O,U){let $=O(U);return $?null:O.errors}function isKeystoreValid(O){return!schemaValidationErrors(eJ,O)}function isCredentialValid(O){return!schemaValidationErrors(eQ,O)}let keystore_Keystore=class keystore_Keystore{constructor(O){this.data=Object.assign({application:"waku-rln-relay",appIdentifier:"01234567890abcdef",version:"0.2",credentials:{}},O)}static create(O={}){return new keystore_Keystore(O)}static fromString(O){try{let U=JSON.parse(O);if(!keystore_Keystore.isValidNwakuStore(U))throw Error("Invalid string, does not match Nwaku Keystore format.");return new keystore_Keystore(U)}catch(O){return console.error("Cannot create Keystore from string:",O),null}}static fromObject(O){if(!keystore_Keystore.isValidNwakuStore(O))throw Error("Invalid object, does not match Nwaku Keystore format.");return new keystore_Keystore(O)}async addCredential(O,U){let $=keystore_Keystore.computeMembershipHash(O.membership);if(this.data.credentials[$])throw Error("Credential already exists in the store.");let J="/stub/path",en=new Uint8Array([0]),es=keystore_Keystore.fromIdentityToBytes(O),eo=await (0,eg.create)(U,es,en,J),ea=await keccak256Checksum(U,eo),eu=keystore_Keystore.fromEipToCredential(eo,ea);return this.data.credentials[$]=eu,$}async readCredential(O,U){let $=this.data.credentials[O];if(!$)return null;let J=keystore_Keystore.fromCredentialToEip($),en=await decryptEipKeystore(U,J);return keystore_Keystore.fromBytesToIdentity(en)}removeCredential(O){this.data.credentials[O]&&delete this.data.credentials[O]}toString(){return JSON.stringify(this.data)}toObject(){return this.data}static isValidNwakuStore(O){if(!isKeystoreValid(O))return!1;let U=Object.values(eS.get(O,"credentials",{})).map(O=>isCredentialValid(O)).every(O=>O);return U}static fromCredentialToEip(O){let U=O.crypto,$={kdf:{function:U.kdf,params:U.kdfparams,message:""},cipher:{function:U.cipher,params:U.cipherparams,message:U.ciphertext},checksum:{function:"sha256",params:{},message:U.mac}};return{version:4,uuid:(0,eA.Z)(),description:void 0,path:"safe to ignore, not important for decrypt",pubkey:"safe to ignore, not important for decrypt",crypto:$}}static fromEipToCredential(O,U){let $=O.crypto,J=$.kdf;return{crypto:{cipher:$.cipher.function,cipherparams:$.cipher.params,ciphertext:$.cipher.message,kdf:J.function,kdfparams:J.params,mac:U}}}static fromBytesToIdentity(O){try{let U=utils_bytesToUtf8(O),$=JSON.parse(U);return{identity:{IDCommitment:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idCommitment",[])),IDTrapdoor:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idTrapdoor",[])),IDNullifier:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idNullifier",[])),IDCommitmentBigInt:(0,eI.T)(keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idCommitment",[]))),IDSecretHash:keystore_Keystore.fromArraylikeToBytes(eS.get($,"identityCredential.idSecretHash",[]))},membership:{treeIndex:eS.get($,"treeIndex"),chainId:eS.get($,"membershipContract.chainId"),address:eS.get($,"membershipContract.address")}}}catch(O){return console.error("Cannot parse bytes to Nwaku Credentials:",O),null}}static fromArraylikeToBytes(O){let U=[],$=0,J=O[0];for(;void 0!==J;)U.push(J),$+=1,J=O[$];return new Uint8Array(U)}static computeMembershipHash(O){return(0,ew.ci)(eE((0,ew.iY)(`${O.chainId}${O.address}${O.treeIndex}`))).toUpperCase()}static fromIdentityToBytes(O){return(0,ew.iY)(JSON.stringify({treeIndex:O.membership.treeIndex,identityCredential:{idCommitment:O.identity.IDCommitment,idNullifier:O.identity.IDNullifier,idSecretHash:O.identity.IDSecretHash,idTrapdoor:O.identity.IDTrapdoor},membershipContract:{chainId:O.membership.chainId,address:O.membership.address}}))}};$(5549);var eZ=$(7273),eX=$(2278),e0=$(7213),e1=$(6288);let e3="abi/5.7.0",e6=new e1.Yd(e3);function checkResultErrors(O){let U=[],checkErrors=function(O,$){if(Array.isArray($))for(let J in $){let en=O.slice();en.push(J);try{checkErrors(en,$[J])}catch(O){U.push({path:en,error:O})}}};return checkErrors([],O),U}let Coder=class Coder{constructor(O,U,$,J){this.name=O,this.type=U,this.localName=$,this.dynamic=J}_throwError(O,U){e6.throwArgumentError(O,this.localName,U)}};let Writer=class Writer{constructor(O){(0,e0.zG)(this,"wordSize",O||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(O)}get data(){return(0,eZ.xs)(this._data)}get length(){return this._dataLength}_writeData(O){return this._data.push(O),this._dataLength+=O.length,O.length}appendWriter(O){return this._writeData((0,eZ.zo)(O._data))}writeBytes(O){let U=(0,eZ.lE)(O),$=U.length%this.wordSize;return $&&(U=(0,eZ.zo)([U,this._padding.slice($)])),this._writeData(U)}_getValue(O){let U=(0,eZ.lE)(eX.O$.from(O));return U.length>this.wordSize&&e6.throwError("value out-of-bounds",e1.Yd.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:U.length}),U.length%this.wordSize&&(U=(0,eZ.zo)([this._padding.slice(U.length%this.wordSize),U])),U}writeValue(O){return this._writeData(this._getValue(O))}writeUpdatableValue(){let O=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,U=>{this._data[O]=this._getValue(U)}}};let Reader=class Reader{constructor(O,U,$,J){(0,e0.zG)(this,"_data",(0,eZ.lE)(O)),(0,e0.zG)(this,"wordSize",U||32),(0,e0.zG)(this,"_coerceFunc",$),(0,e0.zG)(this,"allowLoose",J),this._offset=0}get data(){return(0,eZ.Dv)(this._data)}get consumed(){return this._offset}static coerce(O,U){let $=O.match("^u?int([0-9]+)$");return $&&48>=parseInt($[1])&&(U=U.toNumber()),U}coerce(O,U){return this._coerceFunc?this._coerceFunc(O,U):Reader.coerce(O,U)}_peekBytes(O,U,$){let J=Math.ceil(U/this.wordSize)*this.wordSize;return this._offset+J>this._data.length&&(this.allowLoose&&$&&this._offset+U<=this._data.length?J=U:e6.throwError("data out-of-bounds",e1.Yd.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+J})),this._data.slice(this._offset,this._offset+J)}subReader(O){return new Reader(this._data.slice(this._offset+O),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(O,U){let $=this._peekBytes(0,O,!!U);return this._offset+=$.length,$.slice(0,O)}readValue(){return eX.O$.from(this.readBytes(this.wordSize))}};var e5=$(8994),e9=$(6339),e7=$(4184);let AddressCoder=class AddressCoder extends Coder{constructor(O){super("address","address",O,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(O,U){try{U=(0,e5.Kn)(U)}catch(O){this._throwError(O.message,U)}return O.writeValue(U)}decode(O){return(0,e5.Kn)((0,eZ.$m)(O.readValue().toHexString(),20))}};let AnonymousCoder=class AnonymousCoder extends Coder{constructor(O){super(O.name,O.type,void 0,O.dynamic),this.coder=O}defaultValue(){return this.coder.defaultValue()}encode(O,U){return this.coder.encode(O,U)}decode(O){return this.coder.decode(O)}};let te=new e1.Yd(e3);function pack(O,U,$){let J=null;if(Array.isArray($))J=$;else if($&&"object"==typeof $){let O={};J=U.map(U=>{let J=U.localName;return J||te.throwError("cannot encode object for signature with missing names",e1.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:U,value:$}),O[J]&&te.throwError("cannot encode object for signature with duplicate names",e1.Yd.errors.INVALID_ARGUMENT,{argument:"values",coder:U,value:$}),O[J]=!0,$[J]})}else te.throwArgumentError("invalid tuple value","tuple",$);U.length!==J.length&&te.throwArgumentError("types/value length mismatch","tuple",$);let en=new Writer(O.wordSize),es=new Writer(O.wordSize),eo=[];return U.forEach((O,U)=>{let $=J[U];if(O.dynamic){let U=es.length;O.encode(es,$);let J=en.writeUpdatableValue();eo.push(O=>{J(O+U)})}else O.encode(en,$)}),eo.forEach(O=>{O(en.length)}),O.appendWriter(en)+O.appendWriter(es)}function unpack(O,U){let $=[],J=O.subReader(0);U.forEach(U=>{let en=null;if(U.dynamic){let $=O.readValue(),es=J.subReader($.toNumber());try{en=U.decode(es)}catch(O){if(O.code===e1.Yd.errors.BUFFER_OVERRUN)throw O;(en=O).baseType=U.name,en.name=U.localName,en.type=U.type}}else try{en=U.decode(O)}catch(O){if(O.code===e1.Yd.errors.BUFFER_OVERRUN)throw O;(en=O).baseType=U.name,en.name=U.localName,en.type=U.type}void 0!=en&&$.push(en)});let en=U.reduce((O,U)=>{let $=U.localName;return $&&(O[$]||(O[$]=0),O[$]++),O},{});U.forEach((O,U)=>{let J=O.localName;if(!J||1!==en[J]||("length"===J&&(J="_length"),null!=$[J]))return;let es=$[U];es instanceof Error?Object.defineProperty($,J,{enumerable:!0,get:()=>{throw es}}):$[J]=es});for(let O=0;O<$.length;O++){let U=$[O];U instanceof Error&&Object.defineProperty($,O,{enumerable:!0,get:()=>{throw U}})}return Object.freeze($)}let ArrayCoder=class ArrayCoder extends Coder{constructor(O,U,$){let J=O.type+"["+(U>=0?U:"")+"]",en=-1===U||O.dynamic;super("array",J,$,en),this.coder=O,this.length=U}defaultValue(){let O=this.coder.defaultValue(),U=[];for(let $=0;$O._data.length&&te.throwError("insufficient data length",e1.Yd.errors.BUFFER_OVERRUN,{length:O._data.length,count:U});let $=[];for(let O=0;O{O.dynamic&&($=!0),J.push(O.type)});let en="tuple("+J.join(",")+")";super("tuple",en,U,$),this.coders=O}defaultValue(){let O=[];this.coders.forEach(U=>{O.push(U.defaultValue())});let U=this.coders.reduce((O,U)=>{let $=U.localName;return $&&(O[$]||(O[$]=0),O[$]++),O},{});return this.coders.forEach(($,J)=>{let en=$.localName;en&&1===U[en]&&("length"===en&&(en="_length"),null==O[en]&&(O[en]=O[J]))}),Object.freeze(O)}encode(O,U){return pack(O,this.coders,U)}decode(O){return O.coerce(this.name,unpack(O,this.coders))}};let ta=new e1.Yd(e3),tu={},th={calldata:!0,memory:!0,storage:!0},td={calldata:!0,memory:!0};function checkModifier(O,U){if("bytes"===O||"string"===O){if(th[U])return!0}else if("address"===O){if("payable"===U)return!0}else if((O.indexOf("[")>=0||"tuple"===O)&&td[U])return!0;return(th[U]||"payable"===U)&&ta.throwArgumentError("invalid modifier","name",U),!1}function parseParamType(O,U){let $=O;function throwError(U){ta.throwArgumentError(`unexpected character at position ${U}`,"param",O)}function newNode(O){let $={type:"",name:"",parent:O,state:{allowType:!0}};return U&&($.indexed=!1),$}O=O.replace(/\s/g," ");let J={type:"",name:"",state:{allowType:!0}},en=J;for(let $=0;$JSON.parse(U.format(O)))),JSON.stringify(U)}let U="";return"array"===this.baseType?U+=this.arrayChildren.format(O)+"["+(this.arrayLength<0?"":String(this.arrayLength))+"]":"tuple"===this.baseType?(O!==tf.sighash&&(U+=this.type),U+="("+this.components.map(U=>U.format(O)).join(O===tf.full?", ":",")+")"):U+=this.type,O!==tf.sighash&&(!0===this.indexed&&(U+=" indexed"),O===tf.full&&this.name&&(U+=" "+this.name)),U}static from(O,U){return"string"==typeof O?ParamType.fromString(O,U):ParamType.fromObject(O)}static fromObject(O){return ParamType.isParamType(O)?O:new ParamType(tu,{name:O.name||null,type:verifyType(O.type),indexed:null==O.indexed?null:!!O.indexed,components:O.components?O.components.map(ParamType.fromObject):null})}static fromString(O,U){return function(O){return ParamType.fromObject({name:O.name,type:O.type,indexed:O.indexed,components:O.components})}(parseParamType(O,!!U))}static isParamType(O){return!!(null!=O&&O._isParamType)}};function parseParams(O,U){return splitNesting(O).map(O=>ParamType.fromString(O,U))}let Fragment=class Fragment{constructor(O,U){O!==tu&&ta.throwError("use a static from method",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),populate(this,U),this._isFragment=!0,Object.freeze(this)}static from(O){return Fragment.isFragment(O)?O:"string"==typeof O?Fragment.fromString(O):Fragment.fromObject(O)}static fromObject(O){if(Fragment.isFragment(O))return O;switch(O.type){case"function":return FunctionFragment.fromObject(O);case"event":return EventFragment.fromObject(O);case"constructor":return ConstructorFragment.fromObject(O);case"error":return ErrorFragment.fromObject(O);case"fallback":case"receive":return null}return ta.throwArgumentError("invalid fragment object","value",O)}static fromString(O){return"event"===(O=(O=(O=O.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?EventFragment.fromString(O.substring(5).trim()):"function"===O.split(" ")[0]?FunctionFragment.fromString(O.substring(8).trim()):"constructor"===O.split("(")[0].trim()?ConstructorFragment.fromString(O.trim()):"error"===O.split(" ")[0]?ErrorFragment.fromString(O.substring(5).trim()):ta.throwArgumentError("unsupported fragment","value",O)}static isFragment(O){return!!(O&&O._isFragment)}};let EventFragment=class EventFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="event "),U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ",O!==tf.sighash&&this.anonymous&&(U+="anonymous "),U.trim()}static from(O){return"string"==typeof O?EventFragment.fromString(O):EventFragment.fromObject(O)}static fromObject(O){if(EventFragment.isEventFragment(O))return O;"event"!==O.type&&ta.throwArgumentError("invalid event object","value",O);let U={name:verifyIdentifier(O.name),anonymous:O.anonymous,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],type:"event"};return new EventFragment(tu,U)}static fromString(O){let U=O.match(tm);U||ta.throwArgumentError("invalid event string","value",O);let $=!1;return U[3].split(" ").forEach(O=>{switch(O.trim()){case"anonymous":$=!0;break;case"":break;default:ta.warn("unknown modifier: "+O)}}),EventFragment.fromObject({name:U[1].trim(),anonymous:$,inputs:parseParams(U[2],!0),type:"event"})}static isEventFragment(O){return O&&O._isFragment&&"event"===O.type}};function parseGas(O,U){U.gas=null;let $=O.split("@");return 1!==$.length?($.length>2&&ta.throwArgumentError("invalid human-readable ABI signature","value",O),$[1].match(/^[0-9]+$/)||ta.throwArgumentError("invalid human-readable ABI signature gas","value",O),U.gas=eX.O$.from($[1]),$[0]):O}function parseModifiers(O,U){U.constant=!1,U.payable=!1,U.stateMutability="nonpayable",O.split(" ").forEach(O=>{switch(O.trim()){case"constant":U.constant=!0;break;case"payable":U.payable=!0,U.stateMutability="payable";break;case"nonpayable":U.payable=!1,U.stateMutability="nonpayable";break;case"pure":U.constant=!0,U.stateMutability="pure";break;case"view":U.constant=!0,U.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+O)}})}function verifyState(O){let U={constant:!1,payable:!0,stateMutability:"payable"};return null!=O.stateMutability?(U.stateMutability=O.stateMutability,U.constant="view"===U.stateMutability||"pure"===U.stateMutability,null!=O.constant&&!!O.constant!==U.constant&&ta.throwArgumentError("cannot have constant function with mutability "+U.stateMutability,"value",O),U.payable="payable"===U.stateMutability,null!=O.payable&&!!O.payable!==U.payable&&ta.throwArgumentError("cannot have payable function with mutability "+U.stateMutability,"value",O)):null!=O.payable?(U.payable=!!O.payable,null!=O.constant||U.payable||"constructor"===O.type||ta.throwArgumentError("unable to determine stateMutability","value",O),U.constant=!!O.constant,U.constant?U.stateMutability="view":U.stateMutability=U.payable?"payable":"nonpayable",U.payable&&U.constant&&ta.throwArgumentError("cannot have constant payable function","value",O)):null!=O.constant?(U.constant=!!O.constant,U.payable=!U.constant,U.stateMutability=U.constant?"view":"payable"):"constructor"!==O.type&&ta.throwArgumentError("unable to determine stateMutability","value",O),U}let ConstructorFragment=class ConstructorFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});O===tf.sighash&&ta.throwError("cannot format a constructor for sighash",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let U="constructor("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(U+=this.stateMutability+" "),U.trim()}static from(O){return"string"==typeof O?ConstructorFragment.fromString(O):ConstructorFragment.fromObject(O)}static fromObject(O){if(ConstructorFragment.isConstructorFragment(O))return O;"constructor"!==O.type&&ta.throwArgumentError("invalid constructor object","value",O);let U=verifyState(O);U.constant&&ta.throwArgumentError("constructor cannot be constant","value",O);let $={name:null,type:O.type,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],payable:U.payable,stateMutability:U.stateMutability,gas:O.gas?eX.O$.from(O.gas):null};return new ConstructorFragment(tu,$)}static fromString(O){let U={type:"constructor"},$=(O=parseGas(O,U)).match(tm);return $&&"constructor"===$[1].trim()||ta.throwArgumentError("invalid constructor string","value",O),U.inputs=parseParams($[2].trim(),!1),parseModifiers($[3].trim(),U),ConstructorFragment.fromObject(U)}static isConstructorFragment(O){return O&&O._isFragment&&"constructor"===O.type}};let FunctionFragment=class FunctionFragment extends ConstructorFragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map(U=>JSON.parse(U.format(O))),outputs:this.outputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="function "),U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ",O!==tf.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(U+=this.stateMutability+" "):this.constant&&(U+="view "),this.outputs&&this.outputs.length&&(U+="returns ("+this.outputs.map(U=>U.format(O)).join(", ")+") "),null!=this.gas&&(U+="@"+this.gas.toString()+" ")),U.trim()}static from(O){return"string"==typeof O?FunctionFragment.fromString(O):FunctionFragment.fromObject(O)}static fromObject(O){if(FunctionFragment.isFunctionFragment(O))return O;"function"!==O.type&&ta.throwArgumentError("invalid function object","value",O);let U=verifyState(O),$={type:O.type,name:verifyIdentifier(O.name),constant:U.constant,inputs:O.inputs?O.inputs.map(ParamType.fromObject):[],outputs:O.outputs?O.outputs.map(ParamType.fromObject):[],payable:U.payable,stateMutability:U.stateMutability,gas:O.gas?eX.O$.from(O.gas):null};return new FunctionFragment(tu,$)}static fromString(O){let U={type:"function"},$=(O=parseGas(O,U)).split(" returns ");$.length>2&&ta.throwArgumentError("invalid function string","value",O);let J=$[0].match(tm);if(J||ta.throwArgumentError("invalid function signature","value",O),U.name=J[1].trim(),U.name&&verifyIdentifier(U.name),U.inputs=parseParams(J[2],!1),parseModifiers(J[3].trim(),U),$.length>1){let J=$[1].match(tm);(""!=J[1].trim()||""!=J[3].trim())&&ta.throwArgumentError("unexpected tokens","value",O),U.outputs=parseParams(J[2],!1)}else U.outputs=[];return FunctionFragment.fromObject(U)}static isFunctionFragment(O){return O&&O._isFragment&&"function"===O.type}};function checkForbidden(O){let U=O.format();return("Error(string)"===U||"Panic(uint256)"===U)&&ta.throwArgumentError(`cannot specify user defined ${U} error`,"fragment",O),O}let ErrorFragment=class ErrorFragment extends Fragment{format(O){if(O||(O=tf.sighash),tf[O]||ta.throwArgumentError("invalid format type","format",O),O===tf.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map(U=>JSON.parse(U.format(O)))});let U="";return O!==tf.sighash&&(U+="error "),(U+=this.name+"("+this.inputs.map(U=>U.format(O)).join(O===tf.full?", ":",")+") ").trim()}static from(O){return"string"==typeof O?ErrorFragment.fromString(O):ErrorFragment.fromObject(O)}static fromObject(O){if(ErrorFragment.isErrorFragment(O))return O;"error"!==O.type&&ta.throwArgumentError("invalid error object","value",O);let U={type:O.type,name:verifyIdentifier(O.name),inputs:O.inputs?O.inputs.map(ParamType.fromObject):[]};return checkForbidden(new ErrorFragment(tu,U))}static fromString(O){let U={type:"error"},$=O.match(tm);return $||ta.throwArgumentError("invalid error signature","value",O),U.name=$[1].trim(),U.name&&verifyIdentifier(U.name),U.inputs=parseParams($[2],!1),checkForbidden(ErrorFragment.fromObject(U))}static isErrorFragment(O){return O&&O._isFragment&&"error"===O.type}};function verifyType(O){return O.match(/^uint($|[^1-9])/)?O="uint256"+O.substring(4):O.match(/^int($|[^1-9])/)&&(O="int256"+O.substring(3)),O}let tg=RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function verifyIdentifier(O){return O&&O.match(tg)||ta.throwArgumentError(`invalid identifier "${O}"`,"value",O),O}let tm=RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$");function splitNesting(O){O=O.trim();let U=[],$="",J=0;for(let en=0;enthis._getCoder(O)),O.name);case"":return new NullCoder(O.name)}let U=O.type.match(tv);if(U){let $=parseInt(U[2]||"256");return(0===$||$>256||$%8!=0)&&ty.throwArgumentError("invalid "+U[1]+" bit length","param",O),new NumberCoder($/8,"int"===U[1],O.name)}if(U=O.type.match(tb)){let $=parseInt(U[1]);return(0===$||$>32)&&ty.throwArgumentError("invalid bytes length","param",O),new FixedBytesCoder($,O.name)}return ty.throwArgumentError("invalid type","type",O.type)}_getWordSize(){return 32}_getReader(O,U){return new Reader(O,this._getWordSize(),this.coerceFunc,U)}_getWriter(){return new Writer(this._getWordSize())}getDefaultValue(O){let U=O.map(O=>this._getCoder(ParamType.from(O))),$=new TupleCoder(U,"_");return $.defaultValue()}encode(O,U){O.length!==U.length&&ty.throwError("types/values length mismatch",e1.Yd.errors.INVALID_ARGUMENT,{count:{types:O.length,values:U.length},value:{types:O,values:U}});let $=O.map(O=>this._getCoder(ParamType.from(O))),J=new TupleCoder($,"_"),en=this._getWriter();return J.encode(en,U),en.data}decode(O,U,$){let J=O.map(O=>this._getCoder(ParamType.from(O))),en=new TupleCoder(J,"_");return en.decode(this._getReader((0,eZ.lE)(U),$))}};let t_=new AbiCoder,tw=new e1.Yd(e3);let LogDescription=class LogDescription extends e0.dk{};let TransactionDescription=class TransactionDescription extends e0.dk{};let ErrorDescription=class ErrorDescription extends e0.dk{};let Indexed=class Indexed extends e0.dk{static isIndexed(O){return!!(O&&O._isIndexed)}};let tE={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function wrapAccessError(O,U){let $=Error(`deferred error during ABI decoding triggered accessing ${O}`);return $.error=U,$}let Interface=class Interface{constructor(O){let U=[];U="string"==typeof O?JSON.parse(O):O,(0,e0.zG)(this,"fragments",U.map(O=>Fragment.from(O)).filter(O=>null!=O)),(0,e0.zG)(this,"_abiCoder",(0,e0.tu)(new.target,"getAbiCoder")()),(0,e0.zG)(this,"functions",{}),(0,e0.zG)(this,"errors",{}),(0,e0.zG)(this,"events",{}),(0,e0.zG)(this,"structs",{}),this.fragments.forEach(O=>{let U=null;switch(O.type){case"constructor":if(this.deploy){tw.warn("duplicate definition - constructor");return}(0,e0.zG)(this,"deploy",O);return;case"function":U=this.functions;break;case"event":U=this.events;break;case"error":U=this.errors;break;default:return}let $=O.format();if(U[$]){tw.warn("duplicate definition - "+$);return}U[$]=O}),this.deploy||(0,e0.zG)(this,"deploy",ConstructorFragment.from({payable:!1,type:"constructor"})),(0,e0.zG)(this,"_isInterface",!0)}format(O){O||(O=tf.full),O===tf.sighash&&tw.throwArgumentError("interface does not support formatting sighash","format",O);let U=this.fragments.map(U=>U.format(O));return O===tf.json?JSON.stringify(U.map(O=>JSON.parse(O))):U}static getAbiCoder(){return t_}static getAddress(O){return(0,e5.Kn)(O)}static getSighash(O){return(0,eZ.p3)((0,e9.id)(O.format()),0,4)}static getEventTopic(O){return(0,e9.id)(O.format())}getFunction(O){if((0,eZ.A7)(O)){for(let U in this.functions)if(O===this.getSighash(U))return this.functions[U];tw.throwArgumentError("no matching function","sighash",O)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.functions).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching function","name",U):$.length>1&&tw.throwArgumentError("multiple matching functions","name",U),this.functions[$[0]]}let U=this.functions[FunctionFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching function","signature",O),U}getEvent(O){if((0,eZ.A7)(O)){let U=O.toLowerCase();for(let O in this.events)if(U===this.getEventTopic(O))return this.events[O];tw.throwArgumentError("no matching event","topichash",U)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.events).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching event","name",U):$.length>1&&tw.throwArgumentError("multiple matching events","name",U),this.events[$[0]]}let U=this.events[EventFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching event","signature",O),U}getError(O){if((0,eZ.A7)(O)){let U=(0,e0.tu)(this.constructor,"getSighash");for(let $ in this.errors){let J=this.errors[$];if(O===U(J))return this.errors[$]}tw.throwArgumentError("no matching error","sighash",O)}if(-1===O.indexOf("(")){let U=O.trim(),$=Object.keys(this.errors).filter(O=>O.split("(")[0]===U);return 0===$.length?tw.throwArgumentError("no matching error","name",U):$.length>1&&tw.throwArgumentError("multiple matching errors","name",U),this.errors[$[0]]}let U=this.errors[FunctionFragment.fromString(O).format()];return U||tw.throwArgumentError("no matching error","signature",O),U}getSighash(O){if("string"==typeof O)try{O=this.getFunction(O)}catch(U){try{O=this.getError(O)}catch(O){throw U}}return(0,e0.tu)(this.constructor,"getSighash")(O)}getEventTopic(O){return"string"==typeof O&&(O=this.getEvent(O)),(0,e0.tu)(this.constructor,"getEventTopic")(O)}_decodeParams(O,U){return this._abiCoder.decode(O,U)}_encodeParams(O,U){return this._abiCoder.encode(O,U)}encodeDeploy(O){return this._encodeParams(this.deploy.inputs,O||[])}decodeErrorResult(O,U){"string"==typeof O&&(O=this.getError(O));let $=(0,eZ.lE)(U);return(0,eZ.Dv)($.slice(0,4))!==this.getSighash(O)&&tw.throwArgumentError(`data signature does not match error ${O.name}.`,"data",(0,eZ.Dv)($)),this._decodeParams(O.inputs,$.slice(4))}encodeErrorResult(O,U){return"string"==typeof O&&(O=this.getError(O)),(0,eZ.Dv)((0,eZ.zo)([this.getSighash(O),this._encodeParams(O.inputs,U||[])]))}decodeFunctionData(O,U){"string"==typeof O&&(O=this.getFunction(O));let $=(0,eZ.lE)(U);return(0,eZ.Dv)($.slice(0,4))!==this.getSighash(O)&&tw.throwArgumentError(`data signature does not match function ${O.name}.`,"data",(0,eZ.Dv)($)),this._decodeParams(O.inputs,$.slice(4))}encodeFunctionData(O,U){return"string"==typeof O&&(O=this.getFunction(O)),(0,eZ.Dv)((0,eZ.zo)([this.getSighash(O),this._encodeParams(O.inputs,U||[])]))}decodeFunctionResult(O,U){"string"==typeof O&&(O=this.getFunction(O));let $=(0,eZ.lE)(U),J=null,en="",es=null,eo=null,ea=null;switch($.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(O.outputs,$)}catch(O){}break;case 4:{let O=(0,eZ.Dv)($.slice(0,4)),U=tE[O];if(U)es=this._abiCoder.decode(U.inputs,$.slice(4)),eo=U.name,ea=U.signature,U.reason&&(J=es[0]),"Error"===eo?en=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(es[0])}`:"Panic"===eo&&(en=`; VM Exception while processing transaction: reverted with panic code ${es[0]}`);else try{let U=this.getError(O);es=this._abiCoder.decode(U.inputs,$.slice(4)),eo=U.name,ea=U.format()}catch(O){}}}return tw.throwError("call revert exception"+en,e1.Yd.errors.CALL_EXCEPTION,{method:O.format(),data:(0,eZ.Dv)(U),errorArgs:es,errorName:eo,errorSignature:ea,reason:J})}encodeFunctionResult(O,U){return"string"==typeof O&&(O=this.getFunction(O)),(0,eZ.Dv)(this._abiCoder.encode(O.outputs,U||[]))}encodeFilterTopics(O,U){"string"==typeof O&&(O=this.getEvent(O)),U.length>O.inputs.length&&tw.throwError("too many arguments for "+O.format(),e1.Yd.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:U});let $=[];O.anonymous||$.push(this.getEventTopic(O));let encodeTopic=(O,U)=>"string"===O.type?(0,e9.id)(U):"bytes"===O.type?(0,e7.w)((0,eZ.Dv)(U)):("bool"===O.type&&"boolean"==typeof U&&(U=U?"0x01":"0x00"),O.type.match(/^u?int/)&&(U=eX.O$.from(U).toHexString()),"address"===O.type&&this._abiCoder.encode(["address"],[U]),(0,eZ.$m)((0,eZ.Dv)(U),32));for(U.forEach((U,J)=>{let en=O.inputs[J];if(!en.indexed){null!=U&&tw.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+en.name,U);return}null==U?$.push(null):"array"===en.baseType||"tuple"===en.baseType?tw.throwArgumentError("filtering with tuples or arrays not supported","contract."+en.name,U):Array.isArray(U)?$.push(U.map(O=>encodeTopic(en,O))):$.push(encodeTopic(en,U))});$.length&&null===$[$.length-1];)$.pop();return $}encodeEventLog(O,U){"string"==typeof O&&(O=this.getEvent(O));let $=[],J=[],en=[];return O.anonymous||$.push(this.getEventTopic(O)),U.length!==O.inputs.length&&tw.throwArgumentError("event arguments/values mismatch","values",U),O.inputs.forEach((O,es)=>{let eo=U[es];if(O.indexed){if("string"===O.type)$.push((0,e9.id)(eo));else if("bytes"===O.type)$.push((0,e7.w)(eo));else if("tuple"===O.baseType||"array"===O.baseType)throw Error("not implemented");else $.push(this._abiCoder.encode([O.type],[eo]))}else J.push(O),en.push(eo)}),{data:this._abiCoder.encode(J,en),topics:$}}decodeEventLog(O,U,$){if("string"==typeof O&&(O=this.getEvent(O)),null!=$&&!O.anonymous){let U=this.getEventTopic(O);(0,eZ.A7)($[0],32)&&$[0].toLowerCase()===U||tw.throwError("fragment/topic mismatch",e1.Yd.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:U,value:$[0]}),$=$.slice(1)}let J=[],en=[],es=[];O.inputs.forEach((O,U)=>{O.indexed?"string"===O.type||"bytes"===O.type||"tuple"===O.baseType||"array"===O.baseType?(J.push(ParamType.fromObject({type:"bytes32",name:O.name})),es.push(!0)):(J.push(O),es.push(!1)):(en.push(O),es.push(!1))});let eo=null!=$?this._abiCoder.decode(J,(0,eZ.zo)($)):null,ea=this._abiCoder.decode(en,U,!0),eu=[],ef=0,eg=0;O.inputs.forEach((O,U)=>{if(O.indexed){if(null==eo)eu[U]=new Indexed({_isIndexed:!0,hash:null});else if(es[U])eu[U]=new Indexed({_isIndexed:!0,hash:eo[eg++]});else try{eu[U]=eo[eg++]}catch(O){eu[U]=O}}else try{eu[U]=ea[ef++]}catch(O){eu[U]=O}if(O.name&&null==eu[O.name]){let $=eu[U];$ instanceof Error?Object.defineProperty(eu,O.name,{enumerable:!0,get:()=>{throw wrapAccessError(`property ${JSON.stringify(O.name)}`,$)}}):eu[O.name]=$}});for(let O=0;O{throw wrapAccessError(`index ${O}`,U)}})}return Object.freeze(eu)}parseTransaction(O){let U=this.getFunction(O.data.substring(0,10).toLowerCase());return U?new TransactionDescription({args:this._abiCoder.decode(U.inputs,"0x"+O.data.substring(10)),functionFragment:U,name:U.name,signature:U.format(),sighash:this.getSighash(U),value:eX.O$.from(O.value||"0")}):null}parseLog(O){let U=this.getEvent(O.topics[0]);return!U||U.anonymous?null:new LogDescription({eventFragment:U,name:U.name,signature:U.format(),topic:this.getEventTopic(U),args:this.decodeEventLog(U,O.data,O.topics)})}parseError(O){let U=(0,eZ.Dv)(O),$=this.getError(U.substring(0,10).toLowerCase());return $?new ErrorDescription({args:this._abiCoder.decode($.inputs,"0x"+U.substring(10)),errorFragment:$,name:$.name,signature:$.format(),sighash:this.getSighash($)}):null}static isInterface(O){return!!(O&&O._isInterface)}};var tS=$(4999),tA=$(4941),tI=$(2501);let tP="contracts/5.7.0";var __awaiter=function(O,U,$,J){function adopt(O){return O instanceof $?O:new $(function(U){U(O)})}return new($||($=Promise))(function($,en){function fulfilled(O){try{step(J.next(O))}catch(O){en(O)}}function rejected(O){try{step(J.throw(O))}catch(O){en(O)}}function step(O){O.done?$(O.value):adopt(O.value).then(fulfilled,rejected)}step((J=J.apply(O,U||[])).next())})};let tk=new e1.Yd(tP);function resolveName(O,U){return __awaiter(this,void 0,void 0,function*(){let $=yield U;"string"!=typeof $&&tk.throwArgumentError("invalid address or ENS name","name",$);try{return(0,e5.Kn)($)}catch(O){}O||tk.throwError("a provider or signer is needed to resolve ENS names",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"resolveName"});let J=yield O.resolveName($);return null==J&&tk.throwArgumentError("resolver or addr is not configured for ENS name","name",$),J})}function resolveAddresses(O,U,$){return __awaiter(this,void 0,void 0,function*(){return Array.isArray($)?yield Promise.all($.map(($,J)=>resolveAddresses(O,Array.isArray(U)?U[J]:U[$.name],$))):"address"===$.type?yield resolveName(O,U):"tuple"===$.type?yield resolveAddresses(O,U,$.components):"array"===$.baseType?Array.isArray(U)?yield Promise.all(U.map(U=>resolveAddresses(O,U,$.arrayChildren))):Promise.reject(tk.makeError("invalid value for array",e1.Yd.errors.INVALID_ARGUMENT,{argument:"value",value:U})):U})}function populateTransaction(O,U,$){return __awaiter(this,void 0,void 0,function*(){let J={};$.length===U.inputs.length+1&&"object"==typeof $[$.length-1]&&(J=(0,e0.DC)($.pop())),tk.checkArgumentCount($.length,U.inputs.length,"passed to contract"),O.signer?J.from?J.from=(0,e0.mE)({override:resolveName(O.signer,J.from),signer:O.signer.getAddress()}).then(O=>__awaiter(this,void 0,void 0,function*(){return(0,e5.Kn)(O.signer)!==O.override&&tk.throwError("Contract with a Signer cannot override from",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.from"}),O.override})):J.from=O.signer.getAddress():J.from&&(J.from=resolveName(O.provider,J.from));let en=yield(0,e0.mE)({args:resolveAddresses(O.signer||O.provider,$,U.inputs),address:O.resolvedAddress,overrides:(0,e0.mE)(J)||{}}),es=O.interface.encodeFunctionData(U,en.args),eo={data:es,to:en.address},ea=en.overrides;if(null!=ea.nonce&&(eo.nonce=eX.O$.from(ea.nonce).toNumber()),null!=ea.gasLimit&&(eo.gasLimit=eX.O$.from(ea.gasLimit)),null!=ea.gasPrice&&(eo.gasPrice=eX.O$.from(ea.gasPrice)),null!=ea.maxFeePerGas&&(eo.maxFeePerGas=eX.O$.from(ea.maxFeePerGas)),null!=ea.maxPriorityFeePerGas&&(eo.maxPriorityFeePerGas=eX.O$.from(ea.maxPriorityFeePerGas)),null!=ea.from&&(eo.from=ea.from),null!=ea.type&&(eo.type=ea.type),null!=ea.accessList&&(eo.accessList=(0,tI.z7)(ea.accessList)),null==eo.gasLimit&&null!=U.gas){let O=21e3,$=(0,eZ.lE)(es);for(let U=0;U<$.length;U++)O+=4,$[U]&&(O+=64);eo.gasLimit=eX.O$.from(U.gas).add(O)}if(ea.value){let O=eX.O$.from(ea.value);O.isZero()||U.payable||tk.throwError("non-payable method cannot override value",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides.value",value:J.value}),eo.value=O}ea.customData&&(eo.customData=(0,e0.DC)(ea.customData)),ea.ccipReadEnabled&&(eo.ccipReadEnabled=!!ea.ccipReadEnabled),delete J.nonce,delete J.gasLimit,delete J.gasPrice,delete J.from,delete J.value,delete J.type,delete J.accessList,delete J.maxFeePerGas,delete J.maxPriorityFeePerGas,delete J.customData,delete J.ccipReadEnabled;let eu=Object.keys(J).filter(O=>null!=J[O]);return eu.length&&tk.throwError(`cannot override ${eu.map(O=>JSON.stringify(O)).join(",")}`,e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"overrides",overrides:eu}),eo})}function buildPopulate(O,U){return function(...$){return populateTransaction(O,U,$)}}function buildEstimate(O,U){let $=O.signer||O.provider;return function(...J){return __awaiter(this,void 0,void 0,function*(){$||tk.throwError("estimate require a provider or signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"estimateGas"});let en=yield populateTransaction(O,U,J);return yield $.estimateGas(en)})}}function addContractWait(O,U){let $=U.wait.bind(U);U.wait=U=>$(U).then(U=>(U.events=U.logs.map($=>{let J=(0,e0.p$)($),en=null;try{en=O.interface.parseLog($)}catch(O){}return en&&(J.args=en.args,J.decode=(U,$)=>O.interface.decodeEventLog(en.eventFragment,U,$),J.event=en.name,J.eventSignature=en.signature),J.removeListener=()=>O.provider,J.getBlock=()=>O.provider.getBlock(U.blockHash),J.getTransaction=()=>O.provider.getTransaction(U.transactionHash),J.getTransactionReceipt=()=>Promise.resolve(U),J}),U))}function buildCall(O,U,$){let J=O.signer||O.provider;return function(...en){return __awaiter(this,void 0,void 0,function*(){let es;if(en.length===U.inputs.length+1&&"object"==typeof en[en.length-1]){let O=(0,e0.DC)(en.pop());null!=O.blockTag&&(es=yield O.blockTag),delete O.blockTag,en.push(O)}null!=O.deployTransaction&&(yield O._deployed(es));let eo=yield populateTransaction(O,U,en),ea=yield J.call(eo,es);try{let J=O.interface.decodeFunctionResult(U,ea);return $&&1===U.outputs.length&&(J=J[0]),J}catch(U){throw U.code===e1.Yd.errors.CALL_EXCEPTION&&(U.address=O.address,U.args=en,U.transaction=eo),U}})}}function buildSend(O,U){return function(...$){return __awaiter(this,void 0,void 0,function*(){O.signer||tk.throwError("sending a transaction requires a signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction"}),null!=O.deployTransaction&&(yield O._deployed());let J=yield populateTransaction(O,U,$),en=yield O.signer.sendTransaction(J);return addContractWait(O,en),en})}}function buildDefault(O,U,$){return U.constant?buildCall(O,U,$):buildSend(O,U)}function getEventTag(O){return O.address&&(null==O.topics||0===O.topics.length)?"*":(O.address||"*")+"@"+(O.topics?O.topics.map(O=>Array.isArray(O)?O.join("|"):O).join(":"):"")}let RunningEvent=class RunningEvent{constructor(O,U){(0,e0.zG)(this,"tag",O),(0,e0.zG)(this,"filter",U),this._listeners=[]}addListener(O,U){this._listeners.push({listener:O,once:U})}removeListener(O){let U=!1;this._listeners=this._listeners.filter($=>!!U||$.listener!==O||(U=!0,!1))}removeAllListeners(){this._listeners=[]}listeners(){return this._listeners.map(O=>O.listener)}listenerCount(){return this._listeners.length}run(O){let U=this.listenerCount();return this._listeners=this._listeners.filter(U=>{let $=O.slice();return setTimeout(()=>{U.listener.apply(this,$)},0),!U.once}),U}prepareEvent(O){}getEmit(O){return[O]}};let ErrorRunningEvent=class ErrorRunningEvent extends RunningEvent{constructor(){super("error",null)}};let FragmentRunningEvent=class FragmentRunningEvent extends RunningEvent{constructor(O,U,$,J){let en={address:O},es=U.getEventTopic($);J?(es!==J[0]&&tk.throwArgumentError("topic mismatch","topics",J),en.topics=J.slice()):en.topics=[es],super(getEventTag(en),en),(0,e0.zG)(this,"address",O),(0,e0.zG)(this,"interface",U),(0,e0.zG)(this,"fragment",$)}prepareEvent(O){super.prepareEvent(O),O.event=this.fragment.name,O.eventSignature=this.fragment.format(),O.decode=(O,U)=>this.interface.decodeEventLog(this.fragment,O,U);try{O.args=this.interface.decodeEventLog(this.fragment,O.data,O.topics)}catch(U){O.args=null,O.decodeError=U}}getEmit(O){let U=checkResultErrors(O.args);if(U.length)throw U[0].error;let $=(O.args||[]).slice();return $.push(O),$}};let WildcardRunningEvent=class WildcardRunningEvent extends RunningEvent{constructor(O,U){super("*",{address:O}),(0,e0.zG)(this,"address",O),(0,e0.zG)(this,"interface",U)}prepareEvent(O){super.prepareEvent(O);try{let U=this.interface.parseLog(O);O.event=U.name,O.eventSignature=U.signature,O.decode=(O,$)=>this.interface.decodeEventLog(U.eventFragment,O,$),O.args=U.args}catch(O){}}};let BaseContract=class BaseContract{constructor(O,U,$){(0,e0.zG)(this,"interface",(0,e0.tu)(new.target,"getInterface")(U)),null==$?((0,e0.zG)(this,"provider",null),(0,e0.zG)(this,"signer",null)):tA.E.isSigner($)?((0,e0.zG)(this,"provider",$.provider||null),(0,e0.zG)(this,"signer",$)):tS.zt.isProvider($)?((0,e0.zG)(this,"provider",$),(0,e0.zG)(this,"signer",null)):tk.throwArgumentError("invalid signer or provider","signerOrProvider",$),(0,e0.zG)(this,"callStatic",{}),(0,e0.zG)(this,"estimateGas",{}),(0,e0.zG)(this,"functions",{}),(0,e0.zG)(this,"populateTransaction",{}),(0,e0.zG)(this,"filters",{});{let O={};Object.keys(this.interface.events).forEach(U=>{let $=this.interface.events[U];(0,e0.zG)(this.filters,U,(...O)=>({address:this.address,topics:this.interface.encodeFilterTopics($,O)})),O[$.name]||(O[$.name]=[]),O[$.name].push(U)}),Object.keys(O).forEach(U=>{let $=O[U];1===$.length?(0,e0.zG)(this.filters,U,this.filters[$[0]]):tk.warn(`Duplicate definition of ${U} (${$.join(", ")})`)})}if((0,e0.zG)(this,"_runningEvents",{}),(0,e0.zG)(this,"_wrappedEmits",{}),null==O&&tk.throwArgumentError("invalid contract address or ENS name","addressOrName",O),(0,e0.zG)(this,"address",O),this.provider)(0,e0.zG)(this,"resolvedAddress",resolveName(this.provider,O));else try{(0,e0.zG)(this,"resolvedAddress",Promise.resolve((0,e5.Kn)(O)))}catch(O){tk.throwError("provider is required to use ENS name as contract address",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"new Contract"})}this.resolvedAddress.catch(O=>{});let J={},en={};Object.keys(this.interface.functions).forEach(O=>{let U=this.interface.functions[O];if(en[O]){tk.warn(`Duplicate ABI entry for ${JSON.stringify(O)}`);return}en[O]=!0;{let $=U.name;J[`%${$}`]||(J[`%${$}`]=[]),J[`%${$}`].push(O)}null==this[O]&&(0,e0.zG)(this,O,buildDefault(this,U,!0)),null==this.functions[O]&&(0,e0.zG)(this.functions,O,buildDefault(this,U,!1)),null==this.callStatic[O]&&(0,e0.zG)(this.callStatic,O,buildCall(this,U,!0)),null==this.populateTransaction[O]&&(0,e0.zG)(this.populateTransaction,O,buildPopulate(this,U)),null==this.estimateGas[O]&&(0,e0.zG)(this.estimateGas,O,buildEstimate(this,U))}),Object.keys(J).forEach(O=>{let U=J[O];if(U.length>1)return;O=O.substring(1);let $=U[0];try{null==this[O]&&(0,e0.zG)(this,O,this[$])}catch(O){}null==this.functions[O]&&(0,e0.zG)(this.functions,O,this.functions[$]),null==this.callStatic[O]&&(0,e0.zG)(this.callStatic,O,this.callStatic[$]),null==this.populateTransaction[O]&&(0,e0.zG)(this.populateTransaction,O,this.populateTransaction[$]),null==this.estimateGas[O]&&(0,e0.zG)(this.estimateGas,O,this.estimateGas[$])})}static getContractAddress(O){return(0,e5.CR)(O)}static getInterface(O){return Interface.isInterface(O)?O:new Interface(O)}deployed(){return this._deployed()}_deployed(O){return this._deployedPromise||(this.deployTransaction?this._deployedPromise=this.deployTransaction.wait().then(()=>this):this._deployedPromise=this.provider.getCode(this.address,O).then(O=>("0x"===O&&tk.throwError("contract not deployed",e1.Yd.errors.UNSUPPORTED_OPERATION,{contractAddress:this.address,operation:"getDeployed"}),this))),this._deployedPromise}fallback(O){this.signer||tk.throwError("sending a transactions require a signer",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"sendTransaction(fallback)"});let U=(0,e0.DC)(O||{});return["from","to"].forEach(function(O){null!=U[O]&&tk.throwError("cannot override "+O,e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:O})}),U.to=this.resolvedAddress,this.deployed().then(()=>this.signer.sendTransaction(U))}connect(O){"string"==typeof O&&(O=new tA.b(O,this.provider));let U=new this.constructor(this.address,this.interface,O);return this.deployTransaction&&(0,e0.zG)(U,"deployTransaction",this.deployTransaction),U}attach(O){return new this.constructor(O,this.interface,this.signer||this.provider)}static isIndexed(O){return Indexed.isIndexed(O)}_normalizeRunningEvent(O){return this._runningEvents[O.tag]?this._runningEvents[O.tag]:O}_getRunningEvent(O){if("string"==typeof O){if("error"===O)return this._normalizeRunningEvent(new ErrorRunningEvent);if("event"===O)return this._normalizeRunningEvent(new RunningEvent("event",null));if("*"===O)return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface));let U=this.interface.getEvent(O);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,U))}if(O.topics&&O.topics.length>0){try{let U=O.topics[0];if("string"!=typeof U)throw Error("invalid topic");let $=this.interface.getEvent(U);return this._normalizeRunningEvent(new FragmentRunningEvent(this.address,this.interface,$,O.topics))}catch(O){}let U={address:this.address,topics:O.topics};return this._normalizeRunningEvent(new RunningEvent(getEventTag(U),U))}return this._normalizeRunningEvent(new WildcardRunningEvent(this.address,this.interface))}_checkRunningEvents(O){if(0===O.listenerCount()){delete this._runningEvents[O.tag];let U=this._wrappedEmits[O.tag];U&&O.filter&&(this.provider.off(O.filter,U),delete this._wrappedEmits[O.tag])}}_wrapEvent(O,U,$){let J=(0,e0.p$)(U);return J.removeListener=()=>{$&&(O.removeListener($),this._checkRunningEvents(O))},J.getBlock=()=>this.provider.getBlock(U.blockHash),J.getTransaction=()=>this.provider.getTransaction(U.transactionHash),J.getTransactionReceipt=()=>this.provider.getTransactionReceipt(U.transactionHash),O.prepareEvent(J),J}_addEventListener(O,U,$){if(this.provider||tk.throwError("events require a provider or a signer with a provider",e1.Yd.errors.UNSUPPORTED_OPERATION,{operation:"once"}),O.addListener(U,$),this._runningEvents[O.tag]=O,!this._wrappedEmits[O.tag]){let wrappedEmit=$=>{let J=this._wrapEvent(O,$,U);if(null==J.decodeError)try{let U=O.getEmit(J);this.emit(O.filter,...U)}catch(O){J.decodeError=O.error}null!=O.filter&&this.emit("event",J),null!=J.decodeError&&this.emit("error",J.decodeError,J)};this._wrappedEmits[O.tag]=wrappedEmit,null!=O.filter&&this.provider.on(O.filter,wrappedEmit)}}queryFilter(O,U,$){let J=this._getRunningEvent(O),en=(0,e0.DC)(J.filter);return"string"==typeof U&&(0,eZ.A7)(U,32)?(null!=$&&tk.throwArgumentError("cannot specify toBlock with blockhash","toBlock",$),en.blockHash=U):(en.fromBlock=null!=U?U:0,en.toBlock=null!=$?$:"latest"),this.provider.getLogs(en).then(O=>O.map(O=>this._wrapEvent(J,O,null)))}on(O,U){return this._addEventListener(this._getRunningEvent(O),U,!1),this}once(O,U){return this._addEventListener(this._getRunningEvent(O),U,!0),this}emit(O,...U){if(!this.provider)return!1;let $=this._getRunningEvent(O),J=$.run(U)>0;return this._checkRunningEvents($),J}listenerCount(O){return this.provider?null==O?Object.keys(this._runningEvents).reduce((O,U)=>O+this._runningEvents[U].listenerCount(),0):this._getRunningEvent(O).listenerCount():0}listeners(O){if(!this.provider)return[];if(null==O){let O=[];for(let U in this._runningEvents)this._runningEvents[U].listeners().forEach(U=>{O.push(U)});return O}return this._getRunningEvent(O).listeners()}removeAllListeners(O){if(!this.provider)return this;if(null==O){for(let O in this._runningEvents){let U=this._runningEvents[O];U.removeAllListeners(),this._checkRunningEvents(U)}return this}let U=this._getRunningEvent(O);return U.removeAllListeners(),this._checkRunningEvents(U),this}off(O,U){if(!this.provider)return this;let $=this._getRunningEvent(O);return $.removeListener(U),this._checkRunningEvents($),this}removeListener(O,U){return this.off(O,U)}};let Contract=class Contract extends BaseContract{};var tT=$(5572);let RootPerBlock=class RootPerBlock{constructor(O,U){this.root=O,this.blockNumber=U}};let tR=20;let MerkleRootTracker=class MerkleRootTracker{constructor(O,U){this.acceptableRootWindowSize=O,this.validMerkleRoots=[],this.merkleRootBuffer=[],this.pushRoot(0,U)}backFill(O){if(0==this.validMerkleRoots.length)return;let U=0;for(let $=this.validMerkleRoots.length-1;$>=0;$--)this.validMerkleRoots[$].blockNumber>=O&&U++;if(0==U)return;let $=OU.blockNumber==O);U>-1&&(this.merkleRootBuffer=this.merkleRootBuffer.slice(0,U))}let en=this.acceptableRootWindowSize-this.validMerkleRoots.length;this.merkleRootBuffer.lengththis.acceptableRootWindowSize){let O=this.validMerkleRoots.shift();O&&this.merkleRootBuffer.push(O)}this.merkleRootBuffer.length>tR&&this.merkleRootBuffer.shift()}roots(){return this.validMerkleRoots.map(O=>O.root)}buffer(){return this.merkleRootBuffer.map(O=>O.root)}};let RLNContract=class RLNContract{static async init(O,U){let $=new RLNContract(O,U);return await $.initStorageContract(U.provider),await $.fetchMembers(O),$.subscribeToMembers(O),$}constructor(O,{registryAddress:U,provider:$}){this._members=new Map;let J=O.getMerkleRoot();this.registryContract=new Contract(U,ea,$),this.merkleRootTracker=new MerkleRootTracker(1e4,J)}async initStorageContract(O,U={}){let $=U?.storageIndex?U.storageIndex:await this.registryContract.usingStorageIndex(),J=await this.registryContract.storages($);if(!J||J===tT.d)throw Error("No RLN Storage initialized on registry contract.");this.storageIndex=$,this.storageContract=new Contract(J,eu,O),this._membersFilter=this.storageContract.filters.MemberRegistered(),this.deployBlock=await this.storageContract.deployedBlockNumber()}get contract(){if(!this.storageContract)throw Error("Storage contract was not initialized");return this.storageContract}get members(){let O=Array.from(this._members.values()).sort((O,U)=>O.index.toNumber()-U.index.toNumber());return O}get membersFilter(){if(!this._membersFilter)throw Error("Members filter was not initialized.");return this._membersFilter}async fetchMembers(O,U={}){let $=await queryFilter(this.contract,{fromBlock:this.deployBlock,...U,membersFilter:this.membersFilter});this.processEvents(O,$)}processEvents(O,U){let $=new Map,J=new Map;U.forEach(O=>{if(O.args){if(O.removed){let U=O.args.index,J=$.get(O.blockNumber);void 0!=J?(J.push(U.toNumber()),$.set(O.blockNumber,J)):$.set(O.blockNumber,[U.toNumber()])}else{let U=J.get(O.blockNumber);void 0==U&&(U=[]),U.push(O),J.set(O.blockNumber,U)}}}),this.removeMembers(O,$),this.insertMembers(O,J)}insertMembers(O,U){U.forEach((U,$)=>{U.forEach(U=>{let $=U?.args?.idCommitment,J=U?.args?.index;if(!$||!J)return;let en=eZ.Bu(eZ.lE($),32);O.insertMember(en),this._members.set(J.toNumber(),{index:J,idCommitment:$?._hex||eZ.Dv(en)})});let J=O.getMerkleRoot();this.merkleRootTracker.pushRoot($,J)})}removeMembers(O,U){let $=new Map([...U].sort().reverse());$.forEach((U,$)=>{U.forEach(U=>{this._members.has(U)&&this._members.delete(U),O.deleteMember(U)}),this.merkleRootTracker.backFill($)})}subscribeToMembers(O){this.contract.on(this.membersFilter,(U,$,J)=>this.processEvents(O,[J]))}async registerWithSignature(O,U){let $=await O.generateSeededIdentityCredential(U);return this.registerWithKey($)}async registerWithKey(O){if(void 0===this.storageIndex)throw Error("Cannot register credential, no storage contract index found.");let U=await this.registryContract["register(uint16,uint256)"](this.storageIndex,O.IDCommitmentBigInt,{gasLimit:1e5}),$=await U.wait(),J=$?.events?.[0];if(!J)return;let en=this.contract.interface.decodeEventLog("MemberRegistered",J.data);return{idCommitment:en.idCommitment,index:en.index}}roots(){return this.merkleRootTracker.roots()}};let tC=5,tB=3e3;async function queryFilter(O,U){let{fromBlock:$,membersFilter:J,fetchRange:en=tB,fetchChunks:es=tC}=U;if(!$)return O.queryFilter(J);if(!O.signer.provider)throw Error("No provider found on the contract's signer.");let eo=await O.signer.provider.getBlockNumber();if(eo-$ignoreErrors(O.queryFilter(J,U,$),[])),en=await Promise.all($);ea.push(en.flatMap(O=>O))}return ea.flatMap(O=>O)}function splitToChunks(O,U,$){let J=[],en=O;for(;en(console.error(`Ignoring an error during query: ${O?.message}`),U))}async function create(){let O=await Promise.resolve().then($.bind($,5549));return await O.create()}},5549:function(O,U,$){"use strict";$.r(U),$.d(U,{IdentityCredential:function(){return IdentityCredential},Proof:function(){return Proof},ProofMetadata:function(){return ProofMetadata},RLNInstance:function(){return RLNInstance},create:function(){return create},poseidonHash:function(){return poseidonHash},proofToBytes:function(){return proofToBytes},sha256:function(){return sha256}});var J=$(3194),en=$(3909),es=$(8385);let eo={protocol:"groth16",curve:"bn128",nPublic:6,vk_alpha_1:["20124996762962216725442980738609010303800849578410091356605067053491763969391","9118593021526896828671519912099489027245924097793322973632351264852174143923","1"],vk_beta_2:[["4693952934005375501364248788849686435240706020501681709396105298107971354382","14346958885444710485362620645446987998958218205939139994511461437152241966681"],["16851772916911573982706166384196538392731905827088356034885868448550849804972","823612331030938060799959717749043047845343400798220427319188951998582076532"],["1","0"]],vk_gamma_2:[["10857046999023057135944570762232829481370756359578518086990519993285655852781","11559732032986387107991004021392285783925812861821192530917403151452391805634"],["8495653923123431417604973247489272438418190587263600148770280649306958101930","4082367875863433681332203403145435568316851327593401208105741076214120093531"],["1","0"]],vk_delta_2:[["8353516066399360694538747105302262515182301251524941126222712285088022964076","9329524012539638256356482961742014315122377605267454801030953882967973561832"],["16805391589556134376869247619848130874761233086443465978238468412168162326401","10111259694977636294287802909665108497237922060047080343914303287629927847739"],["1","0"]],vk_alphabeta_12:[[["12608968655665301215455851857466367636344427685631271961542642719683786103711","9849575605876329747382930567422916152871921500826003490242628251047652318086"],["6322029441245076030714726551623552073612922718416871603535535085523083939021","8700115492541474338049149013125102281865518624059015445617546140629435818912"],["10674973475340072635573101639867487770811074181475255667220644196793546640210","2926286967251299230490668407790788696102889214647256022788211245826267484824"]],[["9660441540778523475944706619139394922744328902833875392144658911530830074820","19548113127774514328631808547691096362144426239827206966690021428110281506546"],["1870837942477655969123169532603615788122896469891695773961478956740992497097","12536105729661705698805725105036536744930776470051238187456307227425796690780"],["21811903352654147452884857281720047789720483752548991551595462057142824037334","19021616763967199151052893283384285352200445499680068407023236283004353578353"]]],IC:[["11992897507809711711025355300535923222599547639134311050809253678876341466909","17181525095924075896332561978747020491074338784673526378866503154966799128110","1"],["17018665030246167677911144513385572506766200776123272044534328594850561667818","18601114175490465275436712413925513066546725461375425769709566180981674884464","1"],["18799470100699658367834559797874857804183288553462108031963980039244731716542","13064227487174191981628537974951887429496059857753101852163607049188825592007","1"],["17432501889058124609368103715904104425610382063762621017593209214189134571156","13406815149699834788256141097399354592751313348962590382887503595131085938635","1"],["10320964835612716439094703312987075811498239445882526576970512041988148264481","9024164961646353611176283204118089412001502110138072989569118393359029324867","1"],["718355081067365548229685160476620267257521491773976402837645005858953849298","14635482993933988261008156660773180150752190597753512086153001683711587601974","1"],["11777720285956632126519898515392071627539405001940313098390150593689568177535","8483603647274280691250972408211651407952870456587066148445913156086740744515","1"]]};var ea=eo;async function builder(O,U){let $;U=U||{};try{$=await WebAssembly.compile(O)}catch(O){throw console.log(O),console.log("\nTry to run circom --c in order to generate c++ code instead\n"),Error(O)}let J="",en="",es=await WebAssembly.instantiate($,{runtime:{exceptionHandler:function(O){let U;throw Error((U=1==O?"Signal not found.\n":2==O?"Too many signals set.\n":3==O?"Signal already set.\n":4==O?"Assert Failed.\n":5==O?"Not enough memory.\n":6==O?"Input signal array access exceeds the size.\n":"Unknown error.\n")+J)},printErrorMessage:function(){J+=getMessage()+"\n"},writeBufferMessage:function(){let O=getMessage();"\n"===O?(console.log(en),en=""):(""!==en&&(en+=" "),en+=O)},showSharedRWMemory:function(){printSharedRWMemory()}}}),eo=U;return new WitnessCalculator(es,eo);function getMessage(){for(var O="",U=es.exports.getMessageChar();0!=U;)O+=String.fromCharCode(U),U=es.exports.getMessageChar();return O}function printSharedRWMemory(){let O=es.exports.getFieldNumLen32(),U=new Uint32Array(O);for(let $=0;${let $=fnvHash(U),en=parseInt($.slice(0,8),16),es=parseInt($.slice(8,16),16),eo=flatArray(O[U]),ea=this.instance.exports.getInputSignalSize(en,es);if(ea<0)throw Error(`Signal ${U} not found `);if(eo.lengthea)throw Error(`Too many values for input signal ${U} `);for(let O=0;O0;)$.unshift(0),en--;return $}function fromArray32(O){var U=BigInt(0);let $=BigInt(4294967296);for(let J=0;J= 0";let eo=this.serializeMessage(O,U,$,en),ea=J.ur(this.zkRLN,eo),eu=J.T8(this.zkRLN,ea),ef=await this.witnessCalculator.calculateWitness(eu,!1),eg=J.RP(this.zkRLN,ef,ea);return new Proof(eg)}verifyRLNProof(O,U){let $;$=O instanceof Uint8Array?O:proofToBytes(O);let es=(0,en.n)(new Uint8Array(8),U.length,0,8);return J.iD(this.zkRLN,concatenate($,es,U))}verifyWithRoots(O,U,...$){let es;es=O instanceof Uint8Array?O:proofToBytes(O);let eo=(0,en.n)(new Uint8Array(8),U.length,0,8),ea=concatenate(...$);return J.vs(this.zkRLN,concatenate(es,eo,U),ea)}verifyWithNoRoot(O,U){let $;$=O instanceof Uint8Array?O:proofToBytes(O);let es=(0,en.n)(new Uint8Array(8),U.length,0,8);return J.vs(this.zkRLN,concatenate($,es,U),new Uint8Array)}}},2355:function(O,U,$){"use strict";let J,en,es,eo,ea;$.d(U,{UF:function(){return createDecoder},Mf:function(){return createEncoder},pq:function(){return createLightNode},gT:function(){return waitForRemotePeer}});var eu,ef,eg,ev,e_,ew,eE,eS,eA,eI,eP,ek,eT,eR,eC,eB,eN,eD,eM,eO,eL,eU,eF,eK,ej,eH,eq,eV,eG,e$,eW,eY,eJ,eQ,eZ,eX,e0,e1,e3,e6,e5,e9,e7,te,tt,tr,ta,tu,th,td,tf,tp,tg,tm,ty,tb,tv,t_,tw,tE,tS,tA,tI,tP,tk,tT,tR,tC,tB,tN,tD,tM,tO,tL,tU,tF,tK,tj,tH,tq,tz,tV,tG,t$,tW,tY,tJ,tQ,tZ,tX,t8,t9,rn,ri,rc,ru,rd,rf,rp,rg,rm,ry,rv,r_,rw={};$.r(rw),$.d(rw,{Ed25519PrivateKey:function(){return Ed25519PrivateKey},Ed25519PublicKey:function(){return Ed25519PublicKey},generateKeyPair:function(){return ed25519_class_generateKeyPair},generateKeyPairFromSeed:function(){return generateKeyPairFromSeed},unmarshalEd25519PrivateKey:function(){return unmarshalEd25519PrivateKey},unmarshalEd25519PublicKey:function(){return unmarshalEd25519PublicKey}});var rE={};$.r(rE),$.d(rE,{RsaPrivateKey:function(){return RsaPrivateKey},RsaPublicKey:function(){return RsaPublicKey},fromJwk:function(){return fromJwk},generateKeyPair:function(){return rsa_class_generateKeyPair},unmarshalRsaPrivateKey:function(){return unmarshalRsaPrivateKey},unmarshalRsaPublicKey:function(){return unmarshalRsaPublicKey}});var rS={};$.r(rS),$.d(rS,{Secp256k1PrivateKey:function(){return Secp256k1PrivateKey},Secp256k1PublicKey:function(){return Secp256k1PublicKey},generateKeyPair:function(){return secp256k1_class_generateKeyPair},unmarshalSecp256k1PrivateKey:function(){return unmarshalSecp256k1PrivateKey},unmarshalSecp256k1PublicKey:function(){return unmarshalSecp256k1PublicKey}});var rA={};$.r(rA),$.d(rA,{dQ:function(){return bitMask},ci:function(){return abstract_utils_bytesToHex},bytesToNumberBE:function(){return abstract_utils_bytesToNumberBE},ty:function(){return utils_bytesToNumberLE},eV:function(){return abstract_utils_concatBytes},n$:function(){return createHmacDrbg},ql:function(){return abstract_utils_ensureBytes},hexToBytes:function(){return abstract_utils_hexToBytes},tL:function(){return abstract_utils_numberToBytesBE},S5:function(){return utils_numberToBytesLE},FF:function(){return utils_validateObject}});var rI={};$.r(rI),$.d(rI,{Ed25519PrivateKey:function(){return ed25519_class_Ed25519PrivateKey},Ed25519PublicKey:function(){return ed25519_class_Ed25519PublicKey},generateKeyPair:function(){return keys_ed25519_class_generateKeyPair},generateKeyPairFromSeed:function(){return ed25519_class_generateKeyPairFromSeed},unmarshalEd25519PrivateKey:function(){return ed25519_class_unmarshalEd25519PrivateKey},unmarshalEd25519PublicKey:function(){return ed25519_class_unmarshalEd25519PublicKey}});var rP={};$.r(rP),$.d(rP,{MAX_KEY_SIZE:function(){return am},RsaPrivateKey:function(){return rsa_class_RsaPrivateKey},RsaPublicKey:function(){return rsa_class_RsaPublicKey},fromJwk:function(){return rsa_class_fromJwk},generateKeyPair:function(){return keys_rsa_class_generateKeyPair},unmarshalRsaPrivateKey:function(){return rsa_class_unmarshalRsaPrivateKey},unmarshalRsaPublicKey:function(){return rsa_class_unmarshalRsaPublicKey}});var rk={};$.r(rk),$.d(rk,{Secp256k1PrivateKey:function(){return secp256k1_class_Secp256k1PrivateKey},Secp256k1PublicKey:function(){return secp256k1_class_Secp256k1PublicKey},generateKeyPair:function(){return keys_secp256k1_class_generateKeyPair},unmarshalSecp256k1PrivateKey:function(){return secp256k1_class_unmarshalSecp256k1PrivateKey},unmarshalSecp256k1PublicKey:function(){return secp256k1_class_unmarshalSecp256k1PublicKey}});let rT=Symbol.for("@libp2p/peer-id");function isPeerId(O){return null!=O&&!!O[rT]}let AbortError=class AbortError extends Error{code;type;constructor(O="The operation was aborted"){super(O),this.code=AbortError.code,this.type=AbortError.type}static code="ABORT_ERR";static type="aborted"};let errors_CodeError=class errors_CodeError extends Error{code;props;constructor(O,U,$){super(O),this.code=U,this.name=$?.name??"CodeError",this.props=$??{}}};let UnexpectedPeerError=class UnexpectedPeerError extends Error{code;constructor(O="Unexpected Peer"){super(O),this.code=UnexpectedPeerError.code}static code="ERR_UNEXPECTED_PEER"};let InvalidCryptoExchangeError=class InvalidCryptoExchangeError extends Error{code;constructor(O="Invalid crypto exchange"){super(O),this.code=InvalidCryptoExchangeError.code}static code="ERR_INVALID_CRYPTO_EXCHANGE"};var rR=$(7954),rC=$(5807);function equals(O,U){if(O===U)return!0;if(O.byteLength!==U.byteLength)return!1;for(let $=0;$Number.MAX_SAFE_INTEGER)throw RangeError("Could not encode varint");return 8}function encodeUint8Array(O,U,$=0){switch(encodingLength(O)){case 8:U[$++]=255&O|rj,O/=128;case 7:U[$++]=255&O|rj,O/=128;case 6:U[$++]=255&O|rj,O/=128;case 5:U[$++]=255&O|rj,O/=128;case 4:U[$++]=255&O|rj,O>>>=7;case 3:U[$++]=255&O|rj,O>>>=7;case 2:U[$++]=255&O|rj,O>>>=7;case 1:U[$++]=255&O,O>>>=7;break;default:throw Error("unreachable")}return U}function encodeUint8ArrayList(O,U,$=0){switch(encodingLength(O)){case 8:U.set($++,255&O|rj),O/=128;case 7:U.set($++,255&O|rj),O/=128;case 6:U.set($++,255&O|rj),O/=128;case 5:U.set($++,255&O|rj),O/=128;case 4:U.set($++,255&O|rj),O>>>=7;case 3:U.set($++,255&O|rj),O>>>=7;case 2:U.set($++,255&O|rj),O>>>=7;case 1:U.set($++,255&O),O>>>=7;break;default:throw Error("unreachable")}return U}function decodeUint8Array(O,U){let $,J=O[U];if($=0+(J&rH),JO+U.length,0));let $=(0,rN.E)(U),J=0;for(let U of O)$.set(U,J),J+=U.length;return(0,rq.P)($)}let Parser=class Parser{index=0;input="";new(O){return this.index=0,this.input=O,this}readAtomically(O){let U=this.index,$=O();return void 0===$&&(this.index=U),$}parseWith(O){let U=O();if(this.index===this.input.length)return U}peekChar(){if(!(this.index>=this.input.length))return this.input[this.index]}readChar(){if(!(this.index>=this.input.length))return this.input[this.index++]}readGivenChar(O){return this.readAtomically(()=>{let U=this.readChar();if(U===O)return U})}readSeparator(O,U,$){return this.readAtomically(()=>{if(!(U>0)||void 0!==this.readGivenChar(O))return $()})}readNumber(O,U,$,J){return this.readAtomically(()=>{let en=0,es=0,eo=this.peekChar();if(void 0===eo)return;let ea="0"===eo,eu=2**(8*J)-1;for(;;){let $=this.readAtomically(()=>{let U=this.readChar();if(void 0===U)return;let $=Number.parseInt(U,O);if(!Number.isNaN($))return $});if(void 0===$)break;if(en*=O,(en+=$)>eu||(es+=1,void 0!==U&&es>U))return}return 0===es?void 0:!$&&ea&&es>1?void 0:en})}readIPv4Addr(){return this.readAtomically(()=>{let O=new Uint8Array(4);for(let U=0;Uthis.readNumber(10,3,!1,1));if(void 0===$)return;O[U]=$}return O})}readIPv6Addr(){let readGroups=O=>{for(let U=0;Uthis.readIPv4Addr());if(void 0!==J)return O[$]=J[0],O[$+1]=J[1],O[$+2]=J[2],O[$+3]=J[3],[$+4,!0]}let J=this.readSeparator(":",U,()=>this.readNumber(16,4,!0,2));if(void 0===J)return[$,!1];O[$]=J>>8,O[$+1]=255&J}return[O.length,!1]};return this.readAtomically(()=>{let O=new Uint8Array(16),[U,$]=readGroups(O);if(16===U)return O;if($||void 0===this.readGivenChar(":")||void 0===this.readGivenChar(":"))return;let J=new Uint8Array(14),en=16-(U+2),[es]=readGroups(J.subarray(0,en));return O.set(J.subarray(0,es),16-es),O})}readIPAddr(){return this.readIPv4Addr()??this.readIPv6Addr()}};let rz=45,rV=15,rG=new Parser;function parse_parseIPv4(O){if(!(O.length>rV))return rG.new(O).parseWith(()=>rG.readIPv4Addr())}function parse_parseIPv6(O){if(O.includes("%")&&(O=O.split("%")[0]),!(O.length>rz))return rG.new(O).parseWith(()=>rG.readIPv6Addr())}function parse_parseIP(O){if(O.includes("%")&&(O=O.split("%")[0]),!(O.length>rz))return rG.new(O).parseWith(()=>rG.readIPAddr())}parseInt("0xFFFF",16),new Uint8Array([0,0,0,0,0,0,0,0,0,0,255,255]);var r$=$(5700),rW=$(9180),rY=$(1453),rJ=$(2223);function isIPv4(O){return!!parse_parseIPv4(O)}function isIPv6(O){return!!parse_parseIPv6(O)}function isIP(O){return!!parse_parseIP(O)}let rQ=isIPv4,rZ=isIPv6,toBytes=function(O){let U=0;if(rQ(O=O.toString().trim())){let $=new Uint8Array(U+4);return O.split(/\./g).forEach(O=>{$[U++]=255&parseInt(O,10)}),$}if(rZ(O)){let $;let J=O.split(":",8);for($=0;$0;$--)O.push("0");J.splice.apply(J,O)}let en=new Uint8Array(U+16);for($=0;$>8&255,en[U++]=255&O}return en}throw Error("invalid ip address")},ip_toString=function(O,U=0,$){U=~~U,$=$??O.length-U;let J=new DataView(O.buffer);if(4===$){let J=[];for(let en=0;en<$;en++)J.push(O[U+en]);return J.join(".")}if(16===$){let O=[];for(let en=0;en<$;en+=2)O.push(J.getUint16(U+en).toString(16));return O.join(":").replace(/(^|:)0(:0)*:0(:|$)/,"$1::$3").replace(/:{3,4}/,"::")}return""},rX=-1,nt={},nr={},nn=[[4,32,"ip4"],[6,16,"tcp"],[33,16,"dccp"],[41,128,"ip6"],[42,rX,"ip6zone"],[43,8,"ipcidr"],[53,rX,"dns",!0],[54,rX,"dns4",!0],[55,rX,"dns6",!0],[56,rX,"dnsaddr",!0],[132,16,"sctp"],[273,16,"udp"],[275,0,"p2p-webrtc-star"],[276,0,"p2p-webrtc-direct"],[277,0,"p2p-stardust"],[280,0,"webrtc-direct"],[281,0,"webrtc"],[290,0,"p2p-circuit"],[301,0,"udt"],[302,0,"utp"],[400,rX,"unix",!1,!0],[421,rX,"ipfs"],[421,rX,"p2p"],[443,0,"https"],[444,96,"onion"],[445,296,"onion3"],[446,rX,"garlic64"],[448,0,"tls"],[449,rX,"sni"],[460,0,"quic"],[461,0,"quic-v1"],[465,0,"webtransport"],[466,rX,"certhash"],[477,0,"ws"],[478,0,"wss"],[479,0,"p2p-websocket-star"],[480,0,"http"],[777,rX,"memory"]];function createProtocol(O,U,$,J,en){return{code:O,size:U,name:$,resolvable:!!J,path:!!en}}function protocols_table_getProtocol(O){if("number"==typeof O){if(null!=nr[O])return nr[O];throw Error(`no protocol with code: ${O}`)}if("string"==typeof O){if(null!=nt[O])return nt[O];throw Error(`no protocol with name: ${O}`)}throw Error(`invalid protocol id type: ${typeof O}`)}function convertToString(O,U){let $=protocols_table_getProtocol(O);switch($.code){case 4:case 41:return bytes2ip(U);case 42:case 53:case 54:case 55:case 56:case 400:case 449:case 777:return bytes2str(U);case 6:case 273:case 33:case 132:return bytes2port(U).toString();case 421:return bytes2mh(U);case 444:case 445:return bytes2onion(U);case 466:return bytes2mb(U);default:return(0,rB.B)(U,"base16")}}function convertToBytes(O,U){let $=protocols_table_getProtocol(O);switch($.code){case 4:case 41:return ip2bytes(U);case 42:case 53:case 54:case 55:case 56:case 400:case 449:case 777:return str2bytes(U);case 6:case 273:case 33:case 132:return port2bytes(parseInt(U,10));case 421:return mh2bytes(U);case 444:return onion2bytes(U);case 445:return onion32bytes(U);case 466:return mb2bytes(U);default:return(0,rJ.m)(U,"base16")}}nn.forEach(O=>{let U=createProtocol(...O);nr[U.code]=U,nt[U.name]=U}),protocols_table_getProtocol("ip4"),protocols_table_getProtocol("ip6"),protocols_table_getProtocol("ipcidr");let ni=Object.values(rW.gh).map(O=>O.decoder),no=function(){let O=ni[0].or(ni[1]);return ni.slice(2).forEach(U=>O=O.or(U)),O}();function ip2bytes(O){if(!isIP(O))throw Error("invalid ip address");return toBytes(O)}function bytes2ip(O){let U=ip_toString(O,0,O.length);if(null==U)throw Error("ipBuff is required");if(!isIP(U))throw Error("invalid ip address");return U}function port2bytes(O){let U=new ArrayBuffer(2),$=new DataView(U);return $.setUint16(0,O),new Uint8Array(U)}function bytes2port(O){let U=new DataView(O.buffer);return U.getUint16(O.byteOffset)}function str2bytes(O){let U=(0,rJ.m)(O),$=Uint8Array.from(encode(U.length));return concat_concat([$,U],$.length+U.length)}function bytes2str(O){let U=src_decode(O);if((O=O.slice(encodingLength(U))).length!==U)throw Error("inconsistent lengths");return(0,rB.B)(O)}function mh2bytes(O){let U;U="Q"===O[0]||"1"===O[0]?rY.Jx(rR.base58btc.decode(`z${O}`)).bytes:rC.k0.parse(O).multihash.bytes;let $=Uint8Array.from(encode(U.length));return concat_concat([$,U],$.length+U.length)}function mb2bytes(O){let U=no.decode(O),$=Uint8Array.from(encode(U.length));return concat_concat([$,U],$.length+U.length)}function bytes2mb(O){let U=src_decode(O),$=O.slice(encodingLength(U));if($.length!==U)throw Error("inconsistent lengths");return"u"+(0,rB.B)($,"base64url")}function bytes2mh(O){let U=src_decode(O),$=O.slice(encodingLength(U));if($.length!==U)throw Error("inconsistent lengths");return(0,rB.B)($,"base58btc")}function onion2bytes(O){let U=O.split(":");if(2!==U.length)throw Error(`failed to parse onion addr: ["'${U.join('", "')}'"]' does not contain a port number`);if(16!==U[0].length)throw Error(`failed to parse onion addr: ${U[0]} not a Tor onion address.`);let $=r$.base32.decode("b"+U[0]),J=parseInt(U[1],10);if(J<1||J>65536)throw Error("Port number is not in range(1, 65536)");let en=port2bytes(J);return concat_concat([$,en],$.length+en.length)}function onion32bytes(O){let U=O.split(":");if(2!==U.length)throw Error(`failed to parse onion addr: ["'${U.join('", "')}'"]' does not contain a port number`);if(56!==U[0].length)throw Error(`failed to parse onion addr: ${U[0]} not a Tor onion3 address.`);let $=r$.base32.decode(`b${U[0]}`),J=parseInt(U[1],10);if(J<1||J>65536)throw Error("Port number is not in range(1, 65536)");let en=port2bytes(J);return concat_concat([$,en],$.length+en.length)}function bytes2onion(O){let U=O.slice(0,O.length-2),$=O.slice(O.length-2),J=(0,rB.B)(U,"base32"),en=bytes2port($);return`${J}:${en}`}function stringToMultiaddrParts(O){O=cleanPath(O);let U=[],$=[],J=null,en=O.split("/").slice(1);if(1===en.length&&""===en[0])return{bytes:new Uint8Array,string:"/",tuples:[],stringTuples:[],path:null};for(let es=0;es=en.length)throw ParseError("invalid address: "+O);if(!0===ea.path){J=cleanPath(en.slice(es).join("/")),U.push([ea.code,convertToBytes(ea.code,J)]),$.push([ea.code,J]);break}let eu=convertToBytes(ea.code,en[es]);U.push([ea.code,eu]),$.push([ea.code,convertToString(ea.code,eu)])}return{string:stringTuplesToString($),bytes:tuplesToBytes(U),tuples:U,stringTuples:$,path:J}}function bytesToMultiaddrParts(O){let U=[],$=[],J=null,en=0;for(;enO.length)throw ParseError("Invalid address Uint8Array: "+(0,rB.B)(O,"base16"));U.push([es,ef]);let eg=convertToString(es,ef);if($.push([es,eg]),!0===ea.path){J=eg;break}}return{bytes:Uint8Array.from(O),string:stringTuplesToString($),tuples:U,stringTuples:$,path:J}}function stringTuplesToString(O){let U=[];return O.map(O=>{let $=protocols_table_getProtocol(O[0]);return U.push($.name),O.length>1&&null!=O[1]&&U.push(O[1]),null}),cleanPath(U.join("/"))}function tuplesToBytes(O){return concat_concat(O.map(O=>{let U=protocols_table_getProtocol(O[0]),$=Uint8Array.from(encode(U.code));return O.length>1&&null!=O[1]&&($=concat_concat([$,O[1]])),$}))}function sizeForAddr(O,U){if(O.size>0)return O.size/8;if(0===O.size)return 0;{let O=src_decode(U instanceof Uint8Array?U:Uint8Array.from(U));return O+encodingLength(O)}}function cleanPath(O){return"/"+O.trim().split("/").filter(O=>O).join("/")}function ParseError(O){return Error("Error parsing address: "+O)}let na=Symbol.for("nodejs.util.inspect.custom"),nu=[protocols_table_getProtocol("dns").code,protocols_table_getProtocol("dns4").code,protocols_table_getProtocol("dns6").code,protocols_table_getProtocol("dnsaddr").code],nh=new Map,nd=Symbol.for("@multiformats/js-multiaddr/multiaddr");function isMultiaddr(O){return!!O?.[nd]}let DefaultMultiaddr=class DefaultMultiaddr{bytes;#e;#t;#r;#n;[nd]=!0;constructor(O){let U;if(null==O&&(O=""),O instanceof Uint8Array)U=bytesToMultiaddrParts(O);else if("string"==typeof O){if(O.length>0&&"/"!==O.charAt(0))throw Error(`multiaddr "${O}" must start with a "/"`);U=stringToMultiaddrParts(O)}else if(isMultiaddr(O))U=bytesToMultiaddrParts(O.bytes);else throw Error("addr must be a string, Buffer, or another Multiaddr");this.bytes=U.bytes,this.#e=U.string,this.#t=U.tuples,this.#r=U.stringTuples,this.#n=U.path}toString(){return this.#e}toJSON(){return this.toString()}toOptions(){let O,U,$,J;let en="",es=protocols_table_getProtocol("tcp"),eo=protocols_table_getProtocol("udp"),ea=protocols_table_getProtocol("ip4"),eu=protocols_table_getProtocol("ip6"),ef=protocols_table_getProtocol("dns6"),eg=protocols_table_getProtocol("ip6zone");for(let[ev,e_]of this.stringTuples())ev===eg.code&&(en=`%${e_??""}`),nu.includes(ev)&&(U=es.name,J=443,$=`${e_??""}${en}`,O=ev===ef.code?6:4),(ev===es.code||ev===eo.code)&&(U=protocols_table_getProtocol(ev).name,J=parseInt(e_??"")),(ev===ea.code||ev===eu.code)&&(U=protocols_table_getProtocol(ev).name,$=`${e_??""}${en}`,O=ev===eu.code?6:4);if(null==O||null==U||null==$||null==J)throw Error('multiaddr must have a valid format: "/{ip4, ip6, dns4, dns6, dnsaddr}/{address}/{tcp, udp}/{port}".');let ev={family:O,host:$,transport:U,port:J};return ev}protos(){return this.#t.map(([O])=>Object.assign({},protocols_table_getProtocol(O)))}protoCodes(){return this.#t.map(([O])=>O)}protoNames(){return this.#t.map(([O])=>protocols_table_getProtocol(O).name)}tuples(){return this.#t}stringTuples(){return this.#r}encapsulate(O){return O=new DefaultMultiaddr(O),new DefaultMultiaddr(this.toString()+O.toString())}decapsulate(O){let U=O.toString(),$=this.toString(),J=$.lastIndexOf(U);if(J<0)throw Error(`Address ${this.toString()} does not contain subaddress: ${O.toString()}`);return new DefaultMultiaddr($.slice(0,J))}decapsulateCode(O){let U=this.tuples();for(let $=U.length-1;$>=0;$--)if(U[$][0]===O)return new DefaultMultiaddr(tuplesToBytes(U.slice(0,$)));return this}getPeerId(){try{let O=[];this.stringTuples().forEach(([U,$])=>{U===nt.p2p.code&&O.push([U,$]),U===nt["p2p-circuit"].code&&(O=[])});let U=O.pop();if(U?.[1]!=null){let O=U[1];if("Q"===O[0]||"1"===O[0])return(0,rB.B)(rR.base58btc.decode(`z${O}`),"base58btc");return(0,rB.B)(rC.k0.parse(O).multihash.bytes,"base58btc")}return null}catch(O){return null}}getPath(){return this.#n}equals(O){return equals(this.bytes,O.bytes)}async resolve(O){let U=this.protos().find(O=>O.resolvable);if(null==U)return[this];let $=nh.get(U.name);if(null==$)throw new errors_CodeError(`no available resolver for ${U.name}`,"ERR_NO_AVAILABLE_RESOLVER");let J=await $(this,O);return J.map(O=>new DefaultMultiaddr(O))}nodeAddress(){let O=this.toOptions();if("tcp"!==O.transport&&"udp"!==O.transport)throw Error(`multiaddr must have a valid format - no protocol with name: "${O.transport}". Must have a valid transport protocol: "{tcp, udp}"`);return{family:O.family,address:O.host,port:O.port}}isThinWaistAddress(O){let U=(O??this).protos();return 2===U.length&&(4===U[0].code||41===U[0].code)&&(6===U[1].code||273===U[1].code)}[na](){return`Multiaddr(${this.#e})`}};function src_multiaddr(O){return new DefaultMultiaddr(O)}!function(O){O.Relay="relay",O.Store="store",O.LightPush="lightpush",O.Filter="filter"}(eu||(eu={})),function(O){O.GENERIC_FAIL="Generic error",O.ENCODE_FAILED="Failed to encode",O.DECODE_FAILED="Failed to decode",O.SIZE_TOO_BIG="Size is too big",O.TOPIC_NOT_CONFIGURED="Topic not configured",O.NO_PEER_AVAILABLE="No peer available",O.REMOTE_PEER_FAULT="Remote peer fault",O.REMOTE_PEER_REJECTED="Remote peer rejected"}(ef||(ef={})),function(O){O.BACKWARD="backward",O.FORWARD="forward"}(eg||(eg={})),function(O){O.BOOTSTRAP="bootstrap",O.PEER_EXCHANGE="peer-exchange"}(ev||(ev={})),function(O){O.PEER_DISCOVERY_BOOTSTRAP="peer:discovery:bootstrap",O.PEER_DISCOVERY_PEER_EXCHANGE="peer:discovery:peer-exchange",O.PEER_CONNECT_BOOTSTRAP="peer:connected:bootstrap",O.PEER_CONNECT_PEER_EXCHANGE="peer:connected:peer-exchange"}(e_||(e_={}));var nf=$(4461);let events_EventEmitter=class events_EventEmitter extends EventTarget{#i=new Map;listenerCount(O){let U=this.#i.get(O);return null==U?0:U.length}addEventListener(O,U,$){super.addEventListener(O,U,$);let J=this.#i.get(O);null==J&&(J=[],this.#i.set(O,J)),J.push({callback:U,once:(!0!==$&&!1!==$&&$?.once)??!1})}removeEventListener(O,U,$){super.removeEventListener(O.toString(),U??null,$);let J=this.#i.get(O);null!=J&&(J=J.filter(({callback:O})=>O!==U),this.#i.set(O,J))}dispatchEvent(O){let U=super.dispatchEvent(O),$=this.#i.get(O.type);return null==$||($=$.filter(({once:O})=>!O),this.#i.set(O.type,$)),U}safeDispatchEvent(O,U){return this.dispatchEvent(new np(O,U))}};let CustomEventPolyfill=class CustomEventPolyfill extends Event{detail;constructor(O,U){super(O,U),this.detail=U?.detail}};let np=globalThis.CustomEvent??CustomEventPolyfill;var ng=$(9710),n_=$(5856),nw=$.t(n_,2);/*! noble-secp256k1 - MIT License (c) 2019 Paul Miller (paulmillr.com) */let nE=BigInt(0),nS=BigInt(1),nA=BigInt(2),nI=BigInt(3),nP=BigInt(8),nk=Object.freeze({a:nE,b:BigInt(7),P:BigInt("0xfffffffffffffffffffffffffffffffffffffffffffffffffffffffefffffc2f"),n:BigInt("0xfffffffffffffffffffffffffffffffebaaedce6af48a03bbfd25e8cd0364141"),h:nS,Gx:BigInt("55066263022277343669578718895168534326250603453777594175500187360389116729240"),Gy:BigInt("32670510020758816978083085130507043184471273380659243275938904335757337482424"),beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee")}),divNearest=(O,U)=>(O+U/nA)/U,nT={beta:BigInt("0x7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee"),splitScalar(O){let{n:U}=nk,$=BigInt("0x3086d221a7d46bcde86c90e49284eb15"),J=-nS*BigInt("0xe4437ed6010e88286f547fa90abfe4c3"),en=BigInt("0x114ca50f7a8e2f3f657c1108d9d44cfd8"),es=$,eo=BigInt("0x100000000000000000000000000000000"),ea=divNearest(es*O,U),eu=divNearest(-J*O,U),ef=esm_mod(O-ea*$-eu*en,U),eg=esm_mod(-ea*J-eu*es,U),ev=ef>eo,e_=eg>eo;if(ev&&(ef=U-ef),e_&&(eg=U-eg),ef>eo||eg>eo)throw Error("splitScalarEndo: Endomorphism failed, k="+O);return{k1neg:ev,k1:ef,k2neg:e_,k2:eg}}},nR=32,nC=32,nB=32,nN=nR+1,nD=2*nR+1;function weierstrass(O){let{a:U,b:$}=nk,J=esm_mod(O*O),en=esm_mod(J*O);return esm_mod(en+U*O+$)}let nM=nk.a===nE;let ShaError=class ShaError extends Error{constructor(O){super(O)}};function assertJacPoint(O){if(!(O instanceof JacobianPoint))throw TypeError("JacobianPoint expected")}let JacobianPoint=class JacobianPoint{constructor(O,U,$){this.x=O,this.y=U,this.z=$}static fromAffine(O){if(!(O instanceof Point))throw TypeError("JacobianPoint#fromAffine: expected Point");return O.equals(Point.ZERO)?JacobianPoint.ZERO:new JacobianPoint(O.x,O.y,nS)}static toAffineBatch(O){let U=invertBatch(O.map(O=>O.z));return O.map((O,$)=>O.toAffine(U[$]))}static normalizeZ(O){return JacobianPoint.toAffineBatch(O).map(JacobianPoint.fromAffine)}equals(O){assertJacPoint(O);let{x:U,y:$,z:J}=this,{x:en,y:es,z:eo}=O,ea=esm_mod(J*J),eu=esm_mod(eo*eo),ef=esm_mod(U*eu),eg=esm_mod(en*ea),ev=esm_mod(esm_mod($*eo)*eu),e_=esm_mod(esm_mod(es*J)*ea);return ef===eg&&ev===e_}negate(){return new JacobianPoint(this.x,esm_mod(-this.y),this.z)}double(){let{x:O,y:U,z:$}=this,J=esm_mod(O*O),en=esm_mod(U*U),es=esm_mod(en*en),eo=O+en,ea=esm_mod(nA*(esm_mod(eo*eo)-J-es)),eu=esm_mod(nI*J),ef=esm_mod(eu*eu),eg=esm_mod(ef-nA*ea),ev=esm_mod(eu*(ea-eg)-nP*es),e_=esm_mod(nA*U*$);return new JacobianPoint(eg,ev,e_)}add(O){assertJacPoint(O);let{x:U,y:$,z:J}=this,{x:en,y:es,z:eo}=O;if(en===nE||es===nE)return this;if(U===nE||$===nE)return O;let ea=esm_mod(J*J),eu=esm_mod(eo*eo),ef=esm_mod(U*eu),eg=esm_mod(en*ea),ev=esm_mod(esm_mod($*eo)*eu),e_=esm_mod(esm_mod(es*J)*ea),ew=esm_mod(eg-ef),eE=esm_mod(e_-ev);if(ew===nE)return eE===nE?this.double():JacobianPoint.ZERO;let eS=esm_mod(ew*ew),eA=esm_mod(ew*eS),eI=esm_mod(ef*eS),eP=esm_mod(eE*eE-eA-nA*eI),ek=esm_mod(eE*(eI-eP)-ev*eA),eT=esm_mod(J*eo*ew);return new JacobianPoint(eP,ek,eT)}subtract(O){return this.add(O.negate())}multiplyUnsafe(O){let U=JacobianPoint.ZERO;if("bigint"==typeof O&&O===nE)return U;let $=normalizeScalar(O);if($===nS)return this;if(!nM){let O=U,J=this;for(;$>nE;)$&nS&&(O=O.add(J)),J=J.double(),$>>=nS;return O}let{k1neg:J,k1:en,k2neg:es,k2:eo}=nT.splitScalar($),ea=U,eu=U,ef=this;for(;en>nE||eo>nE;)en&nS&&(ea=ea.add(ef)),eo&nS&&(eu=eu.add(ef)),ef=ef.double(),en>>=nS,eo>>=nS;return J&&(ea=ea.negate()),es&&(eu=eu.negate()),eu=new JacobianPoint(esm_mod(eu.x*nT.beta),eu.y,eu.z),ea.add(eu)}precomputeWindow(O){let U=nM?128/O+1:256/O+1,$=[],J=this,en=J;for(let es=0;es>=eg,eo>ea&&(eo-=ef,O+=nS);let ev=$,e_=$+Math.abs(eo)-1,ew=U%2!=0,eE=eo<0;0===eo?es=es.add(constTimeNegate(ew,J[ev])):en=en.add(constTimeNegate(eE,J[e_]))}return{p:en,f:es}}multiply(O,U){let $,J,en=normalizeScalar(O);if(nM){let{k1neg:O,k1:es,k2neg:eo,k2:ea}=nT.splitScalar(en),{p:eu,f:ef}=this.wNAF(es,U),{p:eg,f:ev}=this.wNAF(ea,U);eu=constTimeNegate(O,eu),eg=constTimeNegate(eo,eg),eg=new JacobianPoint(esm_mod(eg.x*nT.beta),eg.y,eg.z),$=eu.add(eg),J=ef.add(ev)}else{let{p:O,f:es}=this.wNAF(en,U);$=O,J=es}return JacobianPoint.normalizeZ([$,J])[0]}toAffine(O){let{x:U,y:$,z:J}=this,en=this.equals(JacobianPoint.ZERO);null==O&&(O=en?nP:invert(J));let es=O,eo=esm_mod(es*es),ea=esm_mod(eo*es),eu=esm_mod(U*eo),ef=esm_mod($*ea),eg=esm_mod(J*es);if(en)return Point.ZERO;if(eg!==nS)throw Error("invZ was invalid");return new Point(eu,ef)}};function constTimeNegate(O,U){let $=U.negate();return O?$:U}JacobianPoint.BASE=new JacobianPoint(nk.Gx,nk.Gy,nS),JacobianPoint.ZERO=new JacobianPoint(nE,nS,nE);let nO=new WeakMap;let Point=class Point{constructor(O,U){this.x=O,this.y=U}_setWindowSize(O){this._WINDOW_SIZE=O,nO.delete(this)}hasEvenY(){return this.y%nA===nE}static fromCompressedHex(O){let U=32===O.length,$=bytesToNumber(U?O:O.subarray(1));if(!isValidFieldElement($))throw Error("Point is not on curve");let J=weierstrass($),en=sqrtMod(J),es=(en&nS)===nS;if(U)es&&(en=esm_mod(-en));else{let U=(1&O[0])==1;U!==es&&(en=esm_mod(-en))}let eo=new Point($,en);return eo.assertValidity(),eo}static fromUncompressedHex(O){let U=bytesToNumber(O.subarray(1,nR+1)),$=bytesToNumber(O.subarray(nR+1,2*nR+1)),J=new Point(U,$);return J.assertValidity(),J}static fromHex(O){let U=esm_ensureBytes(O),$=U.length,J=U[0];if($===nR||$===nN&&(2===J||3===J))return this.fromCompressedHex(U);if($===nD&&4===J)return this.fromUncompressedHex(U);throw Error(`Point.fromHex: received invalid point. Expected 32-${nN} compressed bytes or ${nD} uncompressed bytes, not ${$}`)}static fromPrivateKey(O){return Point.BASE.multiply(normalizePrivateKey(O))}static fromSignature(O,U,$){let{r:J,s:en}=normalizeSignature(U);if(![0,1,2,3].includes($))throw Error("Cannot recover: invalid recovery bit");let es=truncateHash(esm_ensureBytes(O)),{n:eo}=nk,ea=2===$||3===$?J+eo:J,eu=invert(ea,eo),ef=esm_mod(-es*eu,eo),eg=esm_mod(en*eu,eo),ev=1&$?"03":"02",e_=Point.fromHex(ev+numTo32bStr(ea)),ew=Point.BASE.multiplyAndAddUnsafe(e_,ef,eg);if(!ew)throw Error("Cannot recover signature: point at infinify");return ew.assertValidity(),ew}toRawBytes(O=!1){return hexToBytes(this.toHex(O))}toHex(O=!1){let U=numTo32bStr(this.x);if(!O)return`04${U}${numTo32bStr(this.y)}`;{let O=this.hasEvenY()?"02":"03";return`${O}${U}`}}toHexX(){return this.toHex(!0).slice(2)}toRawX(){return this.toRawBytes(!0).slice(1)}assertValidity(){let O="Point is not on elliptic curve",{x:U,y:$}=this;if(!isValidFieldElement(U)||!isValidFieldElement($))throw Error(O);let J=esm_mod($*$),en=weierstrass(U);if(esm_mod(J-en)!==nE)throw Error(O)}equals(O){return this.x===O.x&&this.y===O.y}negate(){return new Point(this.x,esm_mod(-this.y))}double(){return JacobianPoint.fromAffine(this).double().toAffine()}add(O){return JacobianPoint.fromAffine(this).add(JacobianPoint.fromAffine(O)).toAffine()}subtract(O){return this.add(O.negate())}multiply(O){return JacobianPoint.fromAffine(this).multiply(O,this).toAffine()}multiplyAndAddUnsafe(O,U,$){let J=JacobianPoint.fromAffine(this),en=U===nE||U===nS||this!==Point.BASE?J.multiplyUnsafe(U):J.multiply(U),es=JacobianPoint.fromAffine(O).multiplyUnsafe($),eo=en.add(es);return eo.equals(JacobianPoint.ZERO)?void 0:eo.toAffine()}};function sliceDER(O){return Number.parseInt(O[0],16)>=8?"00"+O:O}function parseDERInt(O){if(O.length<2||2!==O[0])throw Error(`Invalid signature integer tag: ${esm_bytesToHex(O)}`);let U=O[1],$=O.subarray(2,U+2);if(!U||$.length!==U)throw Error("Invalid signature integer: wrong length");if(0===$[0]&&$[1]<=127)throw Error("Invalid signature integer: trailing length");return{data:bytesToNumber($),left:O.subarray(U+2)}}function parseDERSignature(O){if(O.length<2||48!=O[0])throw Error(`Invalid signature tag: ${esm_bytesToHex(O)}`);if(O[1]!==O.length-2)throw Error("Invalid signature: incorrect length");let{data:U,left:$}=parseDERInt(O.subarray(2)),{data:J,left:en}=parseDERInt($);if(en.length)throw Error(`Invalid signature: left bytes after parsing: ${esm_bytesToHex(en)}`);return{r:U,s:J}}Point.BASE=new Point(nk.Gx,nk.Gy),Point.ZERO=new Point(nE,nE);let Signature=class Signature{constructor(O,U){this.r=O,this.s=U,this.assertValidity()}static fromCompact(O){let U=O instanceof Uint8Array,$="Signature.fromCompact";if("string"!=typeof O&&!U)throw TypeError(`${$}: Expected string or Uint8Array`);let J=U?esm_bytesToHex(O):O;if(128!==J.length)throw Error(`${$}: Expected 64-byte hex`);return new Signature(hexToNumber(J.slice(0,64)),hexToNumber(J.slice(64,128)))}static fromDER(O){let U=O instanceof Uint8Array;if("string"!=typeof O&&!U)throw TypeError("Signature.fromDER: Expected string or Uint8Array");let{r:$,s:J}=parseDERSignature(U?O:hexToBytes(O));return new Signature($,J)}static fromHex(O){return this.fromDER(O)}assertValidity(){let{r:O,s:U}=this;if(!isWithinCurveOrder(O))throw Error("Invalid Signature: r must be 0 < r < n");if(!isWithinCurveOrder(U))throw Error("Invalid Signature: s must be 0 < s < n")}hasHighS(){let O=nk.n>>nS;return this.s>O}normalizeS(){return this.hasHighS()?new Signature(this.r,esm_mod(-this.s,nk.n)):this}toDERRawBytes(){return hexToBytes(this.toDERHex())}toDERHex(){let O=sliceDER(numberToHexUnpadded(this.s)),U=sliceDER(numberToHexUnpadded(this.r)),$=O.length/2,J=U.length/2,en=numberToHexUnpadded($),es=numberToHexUnpadded(J),eo=numberToHexUnpadded(J+$+4);return`30${eo}02${es}${U}02${en}${O}`}toRawBytes(){return this.toDERRawBytes()}toHex(){return this.toDERHex()}toCompactRawBytes(){return hexToBytes(this.toCompactHex())}toCompactHex(){return numTo32bStr(this.r)+numTo32bStr(this.s)}};function esm_concatBytes(...O){if(!O.every(O=>O instanceof Uint8Array))throw Error("Uint8Array list expected");if(1===O.length)return O[0];let U=O.reduce((O,U)=>O+U.length,0),$=new Uint8Array(U);for(let U=0,J=0;UU.toString(16).padStart(2,"0"));function esm_bytesToHex(O){if(!(O instanceof Uint8Array))throw Error("Expected Uint8Array");let U="";for(let $=0;$0)return BigInt(O);if("bigint"==typeof O&&isWithinCurveOrder(O))return O;throw TypeError("Expected valid private scalar: 0 < scalar < curve.n")}function esm_mod(O,U=nk.P){let $=O%U;return $>=nE?$:U+$}function pow2(O,U){let{P:$}=nk,J=O;for(;U-- >nE;)J*=J,J%=$;return J}function sqrtMod(O){let{P:U}=nk,$=BigInt(6),J=BigInt(11),en=BigInt(22),es=BigInt(23),eo=BigInt(44),ea=BigInt(88),eu=O*O*O%U,ef=eu*eu*O%U,eg=pow2(ef,nI)*ef%U,ev=pow2(eg,nI)*ef%U,e_=pow2(ev,nA)*eu%U,ew=pow2(e_,J)*e_%U,eE=pow2(ew,en)*ew%U,eS=pow2(eE,eo)*eE%U,eA=pow2(eS,ea)*eS%U,eI=pow2(eA,eo)*eE%U,eP=pow2(eI,nI)*ef%U,ek=pow2(eP,es)*ew%U,eT=pow2(ek,$)*eu%U,eR=pow2(eT,nA),eC=eR*eR%U;if(eC!==O)throw Error("Cannot find square root");return eR}function invert(O,U=nk.P){if(O===nE||U<=nE)throw Error(`invert: expected positive integers, got n=${O} mod=${U}`);let $=esm_mod(O,U),J=U,en=nE,es=nS,eo=nS,ea=nE;for(;$!==nE;){let O=J/$,U=J%$,eu=en-eo*O,ef=es-ea*O;J=$,$=U,en=eo,es=ea,eo=eu,ea=ef}let eu=J;if(eu!==nS)throw Error("invert: does not exist");return esm_mod(en,U)}function invertBatch(O,U=nk.P){let $=Array(O.length),J=O.reduce((O,J,en)=>J===nE?O:($[en]=O,esm_mod(O*J,U)),nS),en=invert(J,U);return O.reduceRight((O,J,en)=>J===nE?O:($[en]=esm_mod(O*$[en],U),esm_mod(O*J,U)),en),$}function bits2int_2(O){let U=8*O.length-8*nC,$=bytesToNumber(O);return U>0?$>>BigInt(U):$}function truncateHash(O,U=!1){let $=bits2int_2(O);if(U)return $;let{n:J}=nk;return $>=J?$-J:$}let HmacDrbg=class HmacDrbg{constructor(O,U){if(this.hashLen=O,this.qByteLen=U,"number"!=typeof O||O<2)throw Error("hashLen must be a number");if("number"!=typeof U||U<2)throw Error("qByteLen must be a number");this.v=new Uint8Array(O).fill(1),this.k=new Uint8Array(O).fill(0),this.counter=0}hmac(...O){return nH.hmacSha256(this.k,...O)}hmacSync(...O){return en(this.k,...O)}checkSync(){if("function"!=typeof en)throw new ShaError("hmacSha256Sync needs to be set")}incr(){if(this.counter>=1e3)throw Error("Tried 1,000 k values for sign(), all were invalid");this.counter+=1}async reseed(O=new Uint8Array){this.k=await this.hmac(this.v,Uint8Array.from([0]),O),this.v=await this.hmac(this.v),0!==O.length&&(this.k=await this.hmac(this.v,Uint8Array.from([1]),O),this.v=await this.hmac(this.v))}reseedSync(O=new Uint8Array){this.checkSync(),this.k=this.hmacSync(this.v,Uint8Array.from([0]),O),this.v=this.hmacSync(this.v),0!==O.length&&(this.k=this.hmacSync(this.v,Uint8Array.from([1]),O),this.v=this.hmacSync(this.v))}async generate(){this.incr();let O=0,U=[];for(;O0)U=BigInt(O);else if("string"==typeof O){if(O.length!==2*nC)throw Error("Expected 32 bytes of private key");U=hexToNumber(O)}else if(O instanceof Uint8Array){if(O.length!==nC)throw Error("Expected 32 bytes of private key");U=bytesToNumber(O)}else throw TypeError("Expected valid private key");if(!isWithinCurveOrder(U))throw Error("Expected private key: 0 < key < n");return U}function normalizePublicKey(O){return O instanceof Point?(O.assertValidity(),O):Point.fromHex(O)}function normalizeSignature(O){if(O instanceof Signature)return O.assertValidity(),O;try{return Signature.fromDER(O)}catch(U){return Signature.fromCompact(O)}}function getPublicKey(O,U=!1){return Point.fromPrivateKey(O).toRawBytes(U)}function bits2int(O){let U=O.length>nR?O.slice(0,nR):O;return bytesToNumber(U)}function bits2octets(O){let U=bits2int(O),$=esm_mod(U,nk.n);return int2octets(${O=esm_ensureBytes(O);let U=nC+8;if(O.length1024)throw Error("Expected valid bytes of private key as per FIPS 186");let $=esm_mod(bytesToNumber(O),nk.n-nS)+nS;return numTo32b($)},randomBytes:(O=32)=>{if(nK.web)return nK.web.getRandomValues(new Uint8Array(O));if(nK.node){let{randomBytes:U}=nK.node;return Uint8Array.from(U(O))}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>nH.hashToPrivateKey(nH.randomBytes(nC+8)),precompute(O=8,U=Point.BASE){let $=U===Point.BASE?U:new Point(U.x,U.y);return $._setWindowSize(O),$.multiply(nI),$},sha256:async(...O)=>{if(nK.web){let U=await nK.web.subtle.digest("SHA-256",esm_concatBytes(...O));return new Uint8Array(U)}if(nK.node){let{createHash:U}=nK.node,$=U("sha256");return O.forEach(O=>$.update(O)),Uint8Array.from($.digest())}throw Error("The environment doesn't have sha256 function")},hmacSha256:async(O,...U)=>{if(nK.web){let $=await nK.web.subtle.importKey("raw",O,{name:"HMAC",hash:{name:"SHA-256"}},!1,["sign"]),J=esm_concatBytes(...U),en=await nK.web.subtle.sign("HMAC",$,J);return new Uint8Array(en)}if(nK.node){let{createHmac:$}=nK.node,J=$("sha256",O);return U.forEach(O=>J.update(O)),Uint8Array.from(J.digest())}throw Error("The environment doesn't have hmac-sha256 function")},sha256Sync:void 0,hmacSha256Sync:void 0,taggedHash:async(O,...U)=>{let $=nj[O];if(void 0===$){let U=await nH.sha256(Uint8Array.from(O,O=>O.charCodeAt(0)));$=esm_concatBytes(U,U),nj[O]=$}return nH.sha256($,...U)},taggedHashSync:(O,...U)=>{if("function"!=typeof J)throw new ShaError("sha256Sync is undefined, you need to set it");let $=nj[O];if(void 0===$){let U=J(Uint8Array.from(O,O=>O.charCodeAt(0)));$=esm_concatBytes(U,U),nj[O]=$}return J($,...U)},_JacobianPoint:JacobianPoint};Object.defineProperties(nH,{sha256Sync:{configurable:!1,get:()=>J,set(O){J||(J=O)}},hmacSha256Sync:{configurable:!1,get:()=>en,set(O){en||(en=O)}}});var nq=$(9055);function keccak256(O){return new Uint8Array(nq.keccak256.arrayBuffer(O))}function verifySignature(O,U,$){try{let J=Signature.fromCompact(O.slice(0,64));return verify(J,U,$)}catch{return!1}}let nV="Invalid record id",nG=2;function multiaddrFromFields(O,U,$,J){return src_multiaddr("/"+O+"/"+convertToString(O,$)).encapsulate(src_multiaddr("/"+U+"/"+convertToString(U,J)))}function locationMultiaddrFromEnrFields(O,U){let $;switch(U){case"udp":return locationMultiaddrFromEnrFields(O,"udp4")||locationMultiaddrFromEnrFields(O,"udp6");case"tcp":return locationMultiaddrFromEnrFields(O,"tcp4")||locationMultiaddrFromEnrFields(O,"tcp6")}let J=U.endsWith("6"),en=O.get(J?"ip6":"ip");if(!en)return;let es=U.slice(0,3);switch(es){case"udp":$=J?O.get("udp6"):O.get("udp");break;case"tcp":$=J?O.get("tcp6"):O.get("tcp");break;default:return}if($)return multiaddrFromFields(J?"ip6":"ip4",es,en,$)}$(9642),$(8289);var n$=$(2595);let src_errors_CodeError=class src_errors_CodeError extends Error{code;props;constructor(O,U,$){super(O),this.code=U,this.name=$?.name??"CodeError",this.props=$??{}}};var base_x=function(O,U){if(O.length>=255)throw TypeError("Alphabet too long");for(var $=new Uint8Array(256),J=0;J<$.length;J++)$[J]=255;for(var en=0;en>>0,eo=new Uint8Array(es);O[U];){var eg=$[O.charCodeAt(U)];if(255===eg)return;for(var ev=0,e_=es-1;(0!==eg||ev>>0,eo[e_]=eg%256>>>0,eg=eg/256>>>0;if(0!==eg)throw Error("Non-zero carry");en=ev,U++}if(" "!==O[U]){for(var ew=es-en;ew!==es&&0===eo[ew];)ew++;for(var eE=new Uint8Array(J+(es-ew)),eS=J;ew!==es;)eE[eS++]=eo[ew++];return eE}}}function decode(O){var $=decodeUnsafe(O);if($)return $;throw Error(`Non-${U} character`)}return{encode:function(U){if(U instanceof Uint8Array||(ArrayBuffer.isView(U)?U=new Uint8Array(U.buffer,U.byteOffset,U.byteLength):Array.isArray(U)&&(U=Uint8Array.from(U))),!(U instanceof Uint8Array))throw TypeError("Expected Uint8Array");if(0===U.length)return"";for(var $=0,J=0,en=0,es=U.length;en!==es&&0===U[en];)en++,$++;for(var eo=(es-en)*eg+1>>>0,ef=new Uint8Array(eo);en!==es;){for(var ev=U[en],e_=0,ew=eo-1;(0!==ev||e_>>0,ef[ew]=ev%ea>>>0,ev=ev/ea>>>0;if(0!==ev)throw Error("Non-zero carry");J=e_,en++}for(var eE=eo-J;eE!==eo&&0===ef[eE];)eE++;for(var eS=eu.repeat($);eE{if(O instanceof Uint8Array&&"Uint8Array"===O.constructor.name)return O;if(O instanceof ArrayBuffer)return new Uint8Array(O);if(ArrayBuffer.isView(O))return new Uint8Array(O.buffer,O.byteOffset,O.byteLength);throw Error("Unknown type, must be binary type")};let Encoder=class Encoder{constructor(O,U,$){this.name=O,this.prefix=U,this.baseEncode=$}encode(O){if(O instanceof Uint8Array)return`${this.prefix}${this.baseEncode(O)}`;throw Error("Unknown type, must be binary type")}};let Decoder=class Decoder{constructor(O,U,$){if(this.name=O,this.prefix=U,void 0===U.codePointAt(0))throw Error("Invalid prefix character");this.prefixCodePoint=U.codePointAt(0),this.baseDecode=$}decode(O){if("string"==typeof O){if(O.codePointAt(0)!==this.prefixCodePoint)throw Error(`Unable to decode multibase string ${JSON.stringify(O)}, ${this.name} decoder only supports inputs prefixed with ${this.prefix}`);return this.baseDecode(O.slice(this.prefix.length))}throw Error("Can only multibase decode strings")}or(O){return or(this,O)}};let ComposedDecoder=class ComposedDecoder{constructor(O){this.decoders=O}or(O){return or(this,O)}decode(O){let U=O[0],$=this.decoders[U];if($)return $.decode(O);throw RangeError(`Unable to decode multibase string ${JSON.stringify(O)}, only inputs prefixed with ${Object.keys(this.decoders)} are supported`)}};let or=(O,U)=>new ComposedDecoder({...O.decoders||{[O.prefix]:O},...U.decoders||{[U.prefix]:U}});let Codec=class Codec{constructor(O,U,$,J){this.name=O,this.prefix=U,this.baseEncode=$,this.baseDecode=J,this.encoder=new Encoder(O,U,$),this.decoder=new Decoder(O,U,J)}encode(O){return this.encoder.encode(O)}decode(O){return this.decoder.decode(O)}};let from=({name:O,prefix:U,encode:$,decode:J})=>new Codec(O,U,$,J),baseX=({prefix:O,name:U,alphabet:$})=>{let{encode:J,decode:en}=base_x($,U);return from({prefix:O,name:U,encode:J,decode:O=>bytes_coerce(en(O))})},base_decode=(O,U,$,J)=>{let en={};for(let O=0;O=8&&(ea-=8,eo[ef++]=255&eu>>ea)}if(ea>=$||255&eu<<8-ea)throw SyntaxError("Unexpected end of data");return eo},base_encode=(O,U,$)=>{let J="="===U[U.length-1],en=(1<<$)-1,es="",eo=0,ea=0;for(let J=0;J$;)eo-=$,es+=U[en&ea>>eo];if(eo&&(es+=U[en&ea<<$-eo]),J)for(;es.length*$&7;)es+="=";return es},rfc4648=({name:O,prefix:U,bitsPerChar:$,alphabet:J})=>from({prefix:U,name:O,encode:O=>base_encode(O,J,$),decode:U=>base_decode(U,J,$,O)}),nW=baseX({name:"base58btc",prefix:"z",alphabet:"123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"});baseX({name:"base58flickr",prefix:"Z",alphabet:"123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"});var nY=128,nJ=-128,nQ=2147483648;function varint_encode(O,U,$){U=U||[];for(var J=$=$||0;O>=nQ;)U[$++]=255&O|nY,O/=128;for(;O&nJ;)U[$++]=255&O|nY,O>>>=7;return U[$]=0|O,varint_encode.bytes=$-J+1,U}var nZ=128,nX=127;function read(O,U){var $,J=0,U=U||0,en=0,es=U,eo=O.length;do{if(es>=eo)throw read.bytes=0,RangeError("Could not decode varint");$=O[es++],J+=en<28?($&nX)<=nZ);return read.bytes=es-U,J}var n0=128,n3=16384,n6=2097152,n4=268435456,n5=34359738368,n9=4398046511104,n7=562949953421312,ia=72057594037927940,il=0x7fffffffffffffff,ic={encode:varint_encode,decode:read,encodingLength:function(O){return O(ic.encode(O,U,$),U),varint_encodingLength=O=>ic.encodingLength(O),create=(O,U)=>{let $=U.byteLength,J=varint_encodingLength(O),en=J+varint_encodingLength($),es=new Uint8Array(en+$);return encodeTo(O,es,0),encodeTo($,es,J),es.set(U,en),new Digest(O,$,U,es)};let Digest=class Digest{constructor(O,U,$,J){this.code=O,this.size=U,this.digest=$,this.bytes=J}};let iu=0,ih="identity",ig=bytes_coerce,identity_digest=O=>create(iu,ig(O)),iy={code:iu,name:ih,encode:ig,digest:identity_digest},hasher_from=({name:O,code:U,encode:$})=>new Hasher(O,U,$);let Hasher=class Hasher{constructor(O,U,$){this.name=O,this.code=U,this.encode=$}digest(O){if(O instanceof Uint8Array){let U=this.encode(O);return U instanceof Uint8Array?create(this.code,U):U.then(O=>create(this.code,O))}throw Error("Unknown type, must be binary type")}};let sha=O=>async U=>new Uint8Array(await crypto.subtle.digest(O,U)),ib=hasher_from({name:"sha2-256",code:18,encode:sha("SHA-256")});hasher_from({name:"sha2-512",code:19,encode:sha("SHA-512")});var i_=$(7420),iw=$.t(i_,2);/*! noble-ed25519 - MIT License (c) 2019 Paul Miller (paulmillr.com) */let iE=BigInt(0),iS=BigInt(1),iA=BigInt(2),iI=BigInt(8),iP=BigInt("7237005577332262213973186563042994240857116359379907606001950938285454250989"),iT=Object.freeze({a:BigInt(-1),d:BigInt("37095705934669439343138083508754565189542113879843219016388785533085940283555"),P:BigInt("57896044618658097711785492504343953926634992332820282019728792003956564819949"),l:iP,n:iP,h:BigInt(8),Gx:BigInt("15112221349535400772501151409588531511454012693041857206046113283949847762202"),Gy:BigInt("46316835694926478169428394003475163141307993866256225615783033603165251855960")}),iR=BigInt("0x10000000000000000000000000000000000000000000000000000000000000000"),iC=BigInt("19681161376707505956807079304988542015446066515923890162744021073123829784752");BigInt("6853475219497561581579357271197624642482790079785650197046958215289687604742");let iB=BigInt("25063068953384623474111414158702152701244531502492656460079210482610430750235"),iN=BigInt("54469307008909316920995813868745141605393597292927456921205312896311721017578"),iD=BigInt("1159843021668779879193775521855586647937357759715417654439879720876111806838"),iM=BigInt("40440834346308536858101042469323190826248399146238708352240133220865137265952");let ExtendedPoint=class ExtendedPoint{constructor(O,U,$,J){this.x=O,this.y=U,this.z=$,this.t=J}static fromAffine(O){if(!(O instanceof esm_Point))throw TypeError("ExtendedPoint#fromAffine: expected Point");return O.equals(esm_Point.ZERO)?ExtendedPoint.ZERO:new ExtendedPoint(O.x,O.y,iS,lib_esm_mod(O.x*O.y))}static toAffineBatch(O){let U=esm_invertBatch(O.map(O=>O.z));return O.map((O,$)=>O.toAffine(U[$]))}static normalizeZ(O){return this.toAffineBatch(O).map(this.fromAffine)}equals(O){assertExtPoint(O);let{x:U,y:$,z:J}=this,{x:en,y:es,z:eo}=O,ea=lib_esm_mod(U*eo),eu=lib_esm_mod(en*J),ef=lib_esm_mod($*eo),eg=lib_esm_mod(es*J);return ea===eu&&ef===eg}negate(){return new ExtendedPoint(lib_esm_mod(-this.x),this.y,this.z,lib_esm_mod(-this.t))}double(){let{x:O,y:U,z:$}=this,{a:J}=iT,en=lib_esm_mod(O*O),es=lib_esm_mod(U*U),eo=lib_esm_mod(iA*lib_esm_mod($*$)),ea=lib_esm_mod(J*en),eu=O+U,ef=lib_esm_mod(lib_esm_mod(eu*eu)-en-es),eg=ea+es,ev=eg-eo,e_=ea-es,ew=lib_esm_mod(ef*ev),eE=lib_esm_mod(eg*e_),eS=lib_esm_mod(ef*e_),eA=lib_esm_mod(ev*eg);return new ExtendedPoint(ew,eE,eA,eS)}add(O){assertExtPoint(O);let{x:U,y:$,z:J,t:en}=this,{x:es,y:eo,z:ea,t:eu}=O,ef=lib_esm_mod(($-U)*(eo+es)),eg=lib_esm_mod(($+U)*(eo-es)),ev=lib_esm_mod(eg-ef);if(ev===iE)return this.double();let e_=lib_esm_mod(J*iA*eu),ew=lib_esm_mod(en*iA*ea),eE=ew+e_,eS=eg+ef,eA=ew-e_,eI=lib_esm_mod(eE*ev),eP=lib_esm_mod(eS*eA),ek=lib_esm_mod(eE*eA),eT=lib_esm_mod(ev*eS);return new ExtendedPoint(eI,eP,eT,ek)}subtract(O){return this.add(O.negate())}precomputeWindow(O){let U=1+256/O,$=[],J=this,en=J;for(let es=0;es>=eg,eo>ea&&(eo-=ef,O+=iS);let ev=$,e_=$+Math.abs(eo)-1,ew=U%2!=0,eE=eo<0;0===eo?es=es.add(esm_constTimeNegate(ew,J[ev])):en=en.add(esm_constTimeNegate(eE,J[e_]))}return ExtendedPoint.normalizeZ([en,es])[0]}multiply(O,U){return this.wNAF(esm_normalizeScalar(O,iT.l),U)}multiplyUnsafe(O){let U=esm_normalizeScalar(O,iT.l,!1),$=ExtendedPoint.BASE,J=ExtendedPoint.ZERO;if(U===iE)return J;if(this.equals(J)||U===iS)return this;if(this.equals($))return this.wNAF(U);let en=J,es=this;for(;U>iE;)U&iS&&(en=en.add(es)),es=es.double(),U>>=iS;return en}isSmallOrder(){return this.multiplyUnsafe(iT.h).equals(ExtendedPoint.ZERO)}isTorsionFree(){let O=this.multiplyUnsafe(iT.l/iA).double();return iT.l%iA&&(O=O.add(this)),O.equals(ExtendedPoint.ZERO)}toAffine(O){let{x:U,y:$,z:J}=this,en=this.equals(ExtendedPoint.ZERO);null==O&&(O=en?iI:esm_invert(J));let es=lib_esm_mod(U*O),eo=lib_esm_mod($*O),ea=lib_esm_mod(J*O);if(en)return esm_Point.ZERO;if(ea!==iS)throw Error("invZ was invalid");return new esm_Point(es,eo)}fromRistrettoBytes(){legacyRist()}toRistrettoBytes(){legacyRist()}fromRistrettoHash(){legacyRist()}};function esm_constTimeNegate(O,U){let $=U.negate();return O?$:U}function assertExtPoint(O){if(!(O instanceof ExtendedPoint))throw TypeError("ExtendedPoint expected")}function assertRstPoint(O){if(!(O instanceof RistrettoPoint))throw TypeError("RistrettoPoint expected")}function legacyRist(){throw Error("Legacy method: switch to RistrettoPoint")}ExtendedPoint.BASE=new ExtendedPoint(iT.Gx,iT.Gy,iS,lib_esm_mod(iT.Gx*iT.Gy)),ExtendedPoint.ZERO=new ExtendedPoint(iE,iS,iS,iE);let RistrettoPoint=class RistrettoPoint{constructor(O){this.ep=O}static calcElligatorRistrettoMap(O){let{d:U}=iT,$=lib_esm_mod(iC*O*O),J=lib_esm_mod(($+iS)*iD),en=BigInt(-1),es=lib_esm_mod((en-U*$)*lib_esm_mod($+U)),{isValid:eo,value:ea}=uvRatio(J,es),eu=lib_esm_mod(ea*O);edIsNegative(eu)||(eu=lib_esm_mod(-eu)),eo||(ea=eu),eo||(en=$);let ef=lib_esm_mod(en*($-iS)*iM-es),eg=ea*ea,ev=lib_esm_mod((ea+ea)*es),e_=lib_esm_mod(ef*iB),ew=lib_esm_mod(iS-eg),eE=lib_esm_mod(iS+eg);return new ExtendedPoint(lib_esm_mod(ev*eE),lib_esm_mod(ew*e_),lib_esm_mod(e_*eE),lib_esm_mod(ev*ew))}static hashToCurve(O){O=lib_esm_ensureBytes(O,64);let U=bytes255ToNumberLE(O.slice(0,32)),$=this.calcElligatorRistrettoMap(U),J=bytes255ToNumberLE(O.slice(32,64)),en=this.calcElligatorRistrettoMap(J);return new RistrettoPoint($.add(en))}static fromHex(O){O=lib_esm_ensureBytes(O,32);let{a:U,d:$}=iT,J="RistrettoPoint.fromHex: the hex is not valid encoding of RistrettoPoint",en=bytes255ToNumberLE(O);if(!esm_equalBytes(numberTo32BytesLE(en),O)||edIsNegative(en))throw Error(J);let es=lib_esm_mod(en*en),eo=lib_esm_mod(iS+U*es),ea=lib_esm_mod(iS-U*es),eu=lib_esm_mod(eo*eo),ef=lib_esm_mod(ea*ea),eg=lib_esm_mod(U*$*eu-ef),{isValid:ev,value:e_}=invertSqrt(lib_esm_mod(eg*ef)),ew=lib_esm_mod(e_*ea),eE=lib_esm_mod(e_*ew*eg),eS=lib_esm_mod((en+en)*ew);edIsNegative(eS)&&(eS=lib_esm_mod(-eS));let eA=lib_esm_mod(eo*eE),eI=lib_esm_mod(eS*eA);if(!ev||edIsNegative(eI)||eA===iE)throw Error(J);return new RistrettoPoint(new ExtendedPoint(eS,eA,iS,eI))}toRawBytes(){let O,{x:U,y:$,z:J,t:en}=this.ep,es=lib_esm_mod(lib_esm_mod(J+$)*lib_esm_mod(J-$)),eo=lib_esm_mod(U*$),ea=lib_esm_mod(eo*eo),{value:eu}=invertSqrt(lib_esm_mod(es*ea)),ef=lib_esm_mod(eu*es),eg=lib_esm_mod(eu*eo),ev=lib_esm_mod(ef*eg*en);if(edIsNegative(en*ev)){let J=lib_esm_mod($*iC),en=lib_esm_mod(U*iC);U=J,$=en,O=lib_esm_mod(ef*iN)}else O=eg;edIsNegative(U*ev)&&($=lib_esm_mod(-$));let e_=lib_esm_mod((J-$)*O);return edIsNegative(e_)&&(e_=lib_esm_mod(-e_)),numberTo32BytesLE(e_)}toHex(){return lib_esm_bytesToHex(this.toRawBytes())}toString(){return this.toHex()}equals(O){assertRstPoint(O);let U=this.ep,$=O.ep,J=lib_esm_mod(U.x*$.y)===lib_esm_mod(U.y*$.x),en=lib_esm_mod(U.y*$.y)===lib_esm_mod(U.x*$.x);return J||en}add(O){return assertRstPoint(O),new RistrettoPoint(this.ep.add(O.ep))}subtract(O){return assertRstPoint(O),new RistrettoPoint(this.ep.subtract(O.ep))}multiply(O){return new RistrettoPoint(this.ep.multiply(O))}multiplyUnsafe(O){return new RistrettoPoint(this.ep.multiplyUnsafe(O))}};RistrettoPoint.BASE=new RistrettoPoint(ExtendedPoint.BASE),RistrettoPoint.ZERO=new RistrettoPoint(ExtendedPoint.ZERO);let iO=new WeakMap;let esm_Point=class esm_Point{constructor(O,U){this.x=O,this.y=U}_setWindowSize(O){this._WINDOW_SIZE=O,iO.delete(this)}static fromHex(O,U=!0){let{d:$,P:J}=iT;O=lib_esm_ensureBytes(O,32);let en=O.slice();en[31]=-129&O[31];let es=esm_bytesToNumberLE(en);if(U&&es>=J)throw Error("Expected 0 < hex < P");if(!U&&es>=iR)throw Error("Expected 0 < hex < 2**256");let eo=lib_esm_mod(es*es),ea=lib_esm_mod(eo-iS),eu=lib_esm_mod($*eo+iS),{isValid:ef,value:eg}=uvRatio(ea,eu);if(!ef)throw Error("Point.fromHex: invalid y coordinate");let ev=(eg&iS)===iS,e_=(128&O[31])!=0;return e_!==ev&&(eg=lib_esm_mod(-eg)),new esm_Point(eg,es)}static async fromPrivateKey(O){return(await getExtendedPublicKey(O)).point}toRawBytes(){let O=numberTo32BytesLE(this.y);return O[31]|=this.x&iS?128:0,O}toHex(){return lib_esm_bytesToHex(this.toRawBytes())}toX25519(){let{y:O}=this,U=lib_esm_mod((iS+O)*esm_invert(iS-O));return numberTo32BytesLE(U)}isTorsionFree(){return ExtendedPoint.fromAffine(this).isTorsionFree()}equals(O){return this.x===O.x&&this.y===O.y}negate(){return new esm_Point(lib_esm_mod(-this.x),this.y)}add(O){return ExtendedPoint.fromAffine(this).add(ExtendedPoint.fromAffine(O)).toAffine()}subtract(O){return this.add(O.negate())}multiply(O){return ExtendedPoint.fromAffine(this).multiply(O,this).toAffine()}};esm_Point.BASE=new esm_Point(iT.Gx,iT.Gy),esm_Point.ZERO=new esm_Point(iE,iS);let esm_Signature=class esm_Signature{constructor(O,U){this.r=O,this.s=U,this.assertValidity()}static fromHex(O){let U=lib_esm_ensureBytes(O,64),$=esm_Point.fromHex(U.slice(0,32),!1),J=esm_bytesToNumberLE(U.slice(32,64));return new esm_Signature($,J)}assertValidity(){let{r:O,s:U}=this;if(!(O instanceof esm_Point))throw Error("Expected Point instance");return esm_normalizeScalar(U,iT.l,!1),this}toRawBytes(){let O=new Uint8Array(64);return O.set(this.r.toRawBytes()),O.set(numberTo32BytesLE(this.s),32),O}toHex(){return lib_esm_bytesToHex(this.toRawBytes())}};function lib_esm_concatBytes(...O){if(!O.every(O=>O instanceof Uint8Array))throw Error("Expected Uint8Array list");if(1===O.length)return O[0];let U=O.reduce((O,U)=>O+U.length,0),$=new Uint8Array(U);for(let U=0,J=0;UU.toString(16).padStart(2,"0"));function lib_esm_bytesToHex(O){if(!(O instanceof Uint8Array))throw Error("Uint8Array expected");let U="";for(let $=0;$=iE?$:U+$}function esm_invert(O,U=iT.P){if(O===iE||U<=iE)throw Error(`invert: expected positive integers, got n=${O} mod=${U}`);let $=lib_esm_mod(O,U),J=U,en=iE,es=iS,eo=iS,ea=iE;for(;$!==iE;){let O=J/$,U=J%$,eu=en-eo*O,ef=es-ea*O;J=$,$=U,en=eo,es=ea,eo=eu,ea=ef}let eu=J;if(eu!==iS)throw Error("invert: does not exist");return lib_esm_mod(en,U)}function esm_invertBatch(O,U=iT.P){let $=Array(O.length),J=O.reduce((O,J,en)=>J===iE?O:($[en]=O,lib_esm_mod(O*J,U)),iS),en=esm_invert(J,U);return O.reduceRight((O,J,en)=>J===iE?O:($[en]=lib_esm_mod(O*$[en],U),lib_esm_mod(O*J,U)),en),$}function esm_pow2(O,U){let{P:$}=iT,J=O;for(;U-- >iE;)J*=J,J%=$;return J}function pow_2_252_3(O){let{P:U}=iT,$=BigInt(5),J=BigInt(10),en=BigInt(20),es=BigInt(40),eo=BigInt(80),ea=O*O%U,eu=ea*O%U,ef=esm_pow2(eu,iA)*eu%U,eg=esm_pow2(ef,iS)*O%U,ev=esm_pow2(eg,$)*eg%U,e_=esm_pow2(ev,J)*ev%U,ew=esm_pow2(e_,en)*e_%U,eE=esm_pow2(ew,es)*ew%U,eS=esm_pow2(eE,eo)*eE%U,eA=esm_pow2(eS,eo)*eE%U,eI=esm_pow2(eA,J)*ev%U,eP=esm_pow2(eI,iA)*O%U;return{pow_p_5_8:eP,b2:eu}}function uvRatio(O,U){let $=lib_esm_mod(U*U*U),J=lib_esm_mod($*$*U),en=pow_2_252_3(O*J).pow_p_5_8,es=lib_esm_mod(O*$*en),eo=lib_esm_mod(U*es*es),ea=es,eu=lib_esm_mod(es*iC),ef=eo===O,eg=eo===lib_esm_mod(-O),ev=eo===lib_esm_mod(-O*iC);return ef&&(es=ea),(eg||ev)&&(es=eu),edIsNegative(es)&&(es=lib_esm_mod(-es)),{isValid:ef||eg,value:es}}function invertSqrt(O){return uvRatio(iS,O)}function modlLE(O){return lib_esm_mod(esm_bytesToNumberLE(O),iT.l)}function esm_equalBytes(O,U){if(O.length!==U.length)return!1;for(let $=0;${if((O=lib_esm_ensureBytes(O)).length<40||O.length>1024)throw Error("Expected 40-1024 bytes of private key as per FIPS 186");return lib_esm_mod(esm_bytesToNumberLE(O),iT.l-iS)+iS},randomBytes:(O=32)=>{if(iF.web)return iF.web.getRandomValues(new Uint8Array(O));if(iF.node){let{randomBytes:U}=iF.node;return new Uint8Array(U(O).buffer)}throw Error("The environment doesn't have randomBytes function")},randomPrivateKey:()=>iK.randomBytes(32),sha512:async(...O)=>{let U=lib_esm_concatBytes(...O);if(iF.web){let O=await iF.web.subtle.digest("SHA-512",U.buffer);return new Uint8Array(O)}if(iF.node)return Uint8Array.from(iF.node.createHash("sha512").update(U).digest());throw Error("The environment doesn't have sha512 function")},precompute(O=8,U=esm_Point.BASE){let $=U.equals(esm_Point.BASE)?U:new esm_Point(U.x,U.y);return $._setWindowSize(O),$.multiply(iA),$},sha512Sync:void 0};Object.defineProperties(iK,{sha512Sync:{configurable:!1,get:()=>es,set(O){es||(es=O)}}});let ij=32,iH=64,iq=32;async function generateKey(){let O=iK.randomPrivateKey(),U=await esm_getPublicKey(O),$=concatKeys(O,U);return{privateKey:$,publicKey:U}}async function generateKeyFromSeed(O){if(O.length!==iq)throw TypeError('"seed" must be 32 bytes in length.');if(!(O instanceof Uint8Array))throw TypeError('"seed" must be a node.js Buffer, or Uint8Array.');let U=O,$=await esm_getPublicKey(U),J=concatKeys(U,$);return{privateKey:J,publicKey:$}}async function hashAndSign(O,U){let $=O.subarray(0,iq);return esm_sign(U,$)}async function hashAndVerify(O,U,$){return esm_verify(U,$,O)}function concatKeys(O,U){let $=new Uint8Array(iH);for(let J=0;J>>31>0){let O=~this.lo+1>>>0,U=~this.hi>>>0;return 0===O&&(U=U+1>>>0),-(O+4294967296*U)}return this.lo+4294967296*this.hi}toBigInt(O=!1){if(O)return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n);if(this.hi>>>31!=0){let O=~this.lo+1>>>0,U=~this.hi>>>0;return 0===O&&(U=U+1>>>0),-(BigInt(O)+(BigInt(U)<<32n))}return BigInt(this.lo>>>0)+(BigInt(this.hi>>>0)<<32n)}toString(O=!1){return this.toBigInt(O).toString()}zzEncode(){let O=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^O)>>>0,this.lo=(this.lo<<1^O)>>>0,this}zzDecode(){let O=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^O)>>>0,this.hi=(this.hi>>>1^O)>>>0,this}length(){let O=this.lo,U=(this.lo>>>28|this.hi<<4)>>>0,$=this.hi>>>24;return 0===$?0===U?O<16384?O<128?1:2:O<2097152?3:4:U<16384?U<128?5:6:U<2097152?7:8:$<128?9:10}static fromBigInt(O){if(0n===O)return i0;if(OiX)return this.fromNumber(Number(O));let U=O<0n;U&&(O=-O);let $=O>>32n,J=O-($<<32n);return U&&($=0n|~$,J=0n|~J,++J>i1&&(J=0n,++$>i1&&($=0n))),new LongBits(Number(J),Number($))}static fromNumber(O){if(0===O)return i0;let U=O<0;U&&(O=-O);let $=O>>>0,J=(O-$)/4294967296>>>0;return U&&(J=~J>>>0,$=~$>>>0,++$>4294967295&&($=0,++J>4294967295&&(J=0))),new LongBits($,J)}static from(O){return"number"==typeof O?LongBits.fromNumber(O):"bigint"==typeof O?LongBits.fromBigInt(O):"string"==typeof O?LongBits.fromBigInt(BigInt(O)):null!=O.low||null!=O.high?new LongBits(O.low>>>0,O.high>>>0):i0}};let i0=new LongBits(0,0);i0.toBigInt=function(){return 0n},i0.zzEncode=i0.zzDecode=function(){return this},i0.length=function(){return 1};let i1=4294967296n;function utf8_length(O){let U=0,$=0;for(let J=0;J191&&en<224?eo[ea++]=(31&en)<<6|63&O[U++]:en>239&&en<365?(en=((7&en)<<18|(63&O[U++])<<12|(63&O[U++])<<6|63&O[U++])-65536,eo[ea++]=55296+(en>>10),eo[ea++]=56320+(1023&en)):eo[ea++]=(15&en)<<12|(63&O[U++])<<6|63&O[U++],ea>8191&&((J??(J=[])).push(String.fromCharCode.apply(String,eo)),ea=0);return null!=J?(ea>0&&J.push(String.fromCharCode.apply(String,eo.slice(0,ea))),J.join("")):String.fromCharCode.apply(String,eo.slice(0,ea))}function write(O,U,$){let J,en;let es=$;for(let es=0;es>6|192:((64512&J)==55296&&(64512&(en=O.charCodeAt(es+1)))==56320?(J=65536+((1023&J)<<10)+(1023&en),++es,U[$++]=J>>18|240,U[$++]=J>>12&63|128):U[$++]=J>>12|224,U[$++]=J>>6&63|128),U[$++]=63&J|128);return $-es}function indexOutOfRange(O,U){return RangeError(`index out of range: ${O.pos} + ${U??1} > ${O.len}`)}function readFixed32End(O,U){return(O[U-4]|O[U-3]<<8|O[U-2]<<16|O[U-1]<<24)>>>0}let Uint8ArrayReader=class Uint8ArrayReader{buf;pos;len;_slice=Uint8Array.prototype.subarray;constructor(O){this.buf=O,this.pos=0,this.len=O.length}uint32(){let O=4294967295;if(O=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128||(O=(O|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)||(O=(O|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)||(O=(O|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)||(O=(O|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128))return O;if((this.pos+=5)>this.len)throw this.pos=this.len,indexOutOfRange(this,10);return O}int32(){return 0|this.uint32()}sint32(){let O=this.uint32();return O>>>1^-(1&O)|0}bool(){return 0!==this.uint32()}fixed32(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);let O=readFixed32End(this.buf,this.pos+=4);return O}sfixed32(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);let O=0|readFixed32End(this.buf,this.pos+=4);return O}float(){if(this.pos+4>this.len)throw indexOutOfRange(this,4);let O=readFloatLE(this.buf,this.pos);return this.pos+=4,O}double(){if(this.pos+8>this.len)throw indexOutOfRange(this,4);let O=readDoubleLE(this.buf,this.pos);return this.pos+=8,O}bytes(){let O=this.uint32(),U=this.pos,$=this.pos+O;if($>this.len)throw indexOutOfRange(this,O);return this.pos+=O,U===$?new Uint8Array(0):this.buf.subarray(U,$)}string(){let O=this.bytes();return utf8_read(O,0,O.length)}skip(O){if("number"==typeof O){if(this.pos+O>this.len)throw indexOutOfRange(this,O);this.pos+=O}else do if(this.pos>=this.len)throw indexOutOfRange(this);while((128&this.buf[this.pos++])!=0);return this}skipType(O){switch(O){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(O=7&this.uint32());)this.skipType(O);break;case 5:this.skip(4);break;default:throw Error(`invalid wire type ${O} at offset ${this.pos}`)}return this}readLongVarint(){let O=new LongBits(0,0),U=0;if(this.len-this.pos>4){for(;U<4;++U)if(O.lo=(O.lo|(127&this.buf[this.pos])<<7*U)>>>0,this.buf[this.pos++]<128)return O;if(O.lo=(O.lo|(127&this.buf[this.pos])<<28)>>>0,O.hi=(O.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return O;U=0}else{for(;U<3;++U){if(this.pos>=this.len)throw indexOutOfRange(this);if(O.lo=(O.lo|(127&this.buf[this.pos])<<7*U)>>>0,this.buf[this.pos++]<128)return O}return O.lo=(O.lo|(127&this.buf[this.pos++])<<7*U)>>>0,O}if(this.len-this.pos>4){for(;U<5;++U)if(O.hi=(O.hi|(127&this.buf[this.pos])<<7*U+3)>>>0,this.buf[this.pos++]<128)return O}else for(;U<5;++U){if(this.pos>=this.len)throw indexOutOfRange(this);if(O.hi=(O.hi|(127&this.buf[this.pos])<<7*U+3)>>>0,this.buf[this.pos++]<128)return O}throw Error("invalid varint encoding")}readFixed64(){if(this.pos+8>this.len)throw indexOutOfRange(this,8);let O=readFixed32End(this.buf,this.pos+=4),U=readFixed32End(this.buf,this.pos+=4);return new LongBits(O,U)}int64(){return this.readLongVarint().toBigInt()}int64Number(){return this.readLongVarint().toNumber()}int64String(){return this.readLongVarint().toString()}uint64(){return this.readLongVarint().toBigInt(!0)}uint64Number(){return this.readLongVarint().toNumber(!0)}uint64String(){return this.readLongVarint().toString(!0)}sint64(){return this.readLongVarint().zzDecode().toBigInt()}sint64Number(){return this.readLongVarint().zzDecode().toNumber()}sint64String(){return this.readLongVarint().zzDecode().toString()}fixed64(){return this.readFixed64().toBigInt()}fixed64Number(){return this.readFixed64().toNumber()}fixed64String(){return this.readFixed64().toString()}sfixed64(){return this.readFixed64().toBigInt()}sfixed64Number(){return this.readFixed64().toNumber()}sfixed64String(){return this.readFixed64().toString()}};function createReader(O){return new Uint8ArrayReader(O instanceof Uint8Array?O:O.subarray())}function decodeMessage(O,U){let $=createReader(O);return U.decode($)}function pool(O){let U;let $=O??8192,J=$>>>1,en=$;return function(O){if(O<1||O>J)return(0,rN.E)(O);en+O>$&&(U=(0,rN.E)($),en=0);let es=U.subarray(en,en+=O);return(7&en)!=0&&(en=(7|en)+1),es}}let Op=class Op{fn;len;next;val;constructor(O,U,$){this.fn=O,this.len=U,this.next=void 0,this.val=$}};function noop(){}let State=class State{head;tail;len;next;constructor(O){this.head=O.head,this.tail=O.tail,this.len=O.len,this.next=O.states}};let i2=pool();function writer_alloc(O){return null!=globalThis.Buffer?(0,rN.E)(O):i2(O)}let Uint8ArrayWriter=class Uint8ArrayWriter{len;head;tail;states;constructor(){this.len=0,this.head=new Op(noop,0,0),this.tail=this.head,this.states=null}_push(O,U,$){return this.tail=this.tail.next=new Op(O,U,$),this.len+=U,this}uint32(O){return this.len+=(this.tail=this.tail.next=new VarintOp((O>>>=0)<128?1:O<16384?2:O<2097152?3:O<268435456?4:5,O)).len,this}int32(O){return O<0?this._push(writeVarint64,10,LongBits.fromNumber(O)):this.uint32(O)}sint32(O){return this.uint32((O<<1^O>>31)>>>0)}uint64(O){let U=LongBits.fromBigInt(O);return this._push(writeVarint64,U.length(),U)}uint64Number(O){let U=LongBits.fromNumber(O);return this._push(writeVarint64,U.length(),U)}uint64String(O){return this.uint64(BigInt(O))}int64(O){return this.uint64(O)}int64Number(O){return this.uint64Number(O)}int64String(O){return this.uint64String(O)}sint64(O){let U=LongBits.fromBigInt(O).zzEncode();return this._push(writeVarint64,U.length(),U)}sint64Number(O){let U=LongBits.fromNumber(O).zzEncode();return this._push(writeVarint64,U.length(),U)}sint64String(O){return this.sint64(BigInt(O))}bool(O){return this._push(writeByte,1,O?1:0)}fixed32(O){return this._push(writeFixed32,4,O>>>0)}sfixed32(O){return this.fixed32(O)}fixed64(O){let U=LongBits.fromBigInt(O);return this._push(writeFixed32,4,U.lo)._push(writeFixed32,4,U.hi)}fixed64Number(O){let U=LongBits.fromNumber(O);return this._push(writeFixed32,4,U.lo)._push(writeFixed32,4,U.hi)}fixed64String(O){return this.fixed64(BigInt(O))}sfixed64(O){return this.fixed64(O)}sfixed64Number(O){return this.fixed64Number(O)}sfixed64String(O){return this.fixed64String(O)}float(O){return this._push(writeFloatLE,4,O)}double(O){return this._push(writeDoubleLE,8,O)}bytes(O){let U=O.length>>>0;return 0===U?this._push(writeByte,1,0):this.uint32(U)._push(writeBytes,U,O)}string(O){let U=utf8_length(O);return 0!==U?this.uint32(U)._push(write,U,O):this._push(writeByte,1,0)}fork(){return this.states=new State(this),this.head=this.tail=new Op(noop,0,0),this.len=0,this}reset(){return null!=this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new Op(noop,0,0),this.len=0),this}ldelim(){let O=this.head,U=this.tail,$=this.len;return this.reset().uint32($),0!==$&&(this.tail.next=O.next,this.tail=U,this.len+=$),this}finish(){let O=this.head.next,U=writer_alloc(this.len),$=0;for(;null!=O;)O.fn(O.val,U,$),$+=O.len,O=O.next;return U}};function writeByte(O,U,$){U[$]=255&O}function writeVarint32(O,U,$){for(;O>127;)U[$++]=127&O|128,O>>>=7;U[$]=O}let VarintOp=class VarintOp extends Op{next;constructor(O,U){super(writeVarint32,O,U),this.next=void 0}};function writeVarint64(O,U,$){for(;0!==O.hi;)U[$++]=127&O.lo|128,O.lo=(O.lo>>>7|O.hi<<25)>>>0,O.hi>>>=7;for(;O.lo>127;)U[$++]=127&O.lo|128,O.lo=O.lo>>>7;U[$++]=O.lo}function writeFixed32(O,U,$){U[$]=255&O,U[$+1]=O>>>8&255,U[$+2]=O>>>16&255,U[$+3]=O>>>24}function writeBytes(O,U,$){U.set(O,$)}function writeBytesBuffer(O,U,$){U.set(O,$)}function writeStringBuffer(O,U,$){O.length<40?write(O,U,$):null!=U.utf8Write?U.utf8Write(O,$):U.set((0,rJ.m)(O),$)}function createWriter(){return new Uint8ArrayWriter}function encodeMessage(O,U){let $=createWriter();return U.encode(O,$,{lengthDelimited:!1}),$.finish()}function createCodec(O,U,$,J){return{name:O,type:U,encode:$,decode:J}}function enumeration(O){function findValue(U){if(null==O[U.toString()])throw Error("Invalid enum value");return O[U]}let encode=function(O,U){let $=findValue(O);U.int32($)},decode=function(O){let U=O.int32();return findValue(U)};return createCodec("enum",ew.VARINT,encode,decode)}function message(O,U){return createCodec("message",ew.LENGTH_DELIMITED,O,U)}null!=globalThis.Buffer&&(Uint8ArrayWriter.prototype.bytes=function(O){let U=O.length>>>0;return this.uint32(U),U>0&&this._push(writeBytesBuffer,U,O),this},Uint8ArrayWriter.prototype.string=function(O){let U=globalThis.Buffer.byteLength(O);return this.uint32(U),U>0&&this._push(writeStringBuffer,U,O),this}),function(O){O[O.VARINT=0]="VARINT",O[O.BIT64=1]="BIT64",O[O.LENGTH_DELIMITED=2]="LENGTH_DELIMITED",O[O.START_GROUP=3]="START_GROUP",O[O.END_GROUP=4]="END_GROUP",O[O.BIT32=5]="BIT32"}(ew||(ew={})),function(O){O.RSA="RSA",O.Ed25519="Ed25519",O.Secp256k1="Secp256k1"}(eE||(eE={})),function(O){O[O.RSA=0]="RSA",O[O.Ed25519=1]="Ed25519",O[O.Secp256k1=2]="Secp256k1"}(eS||(eS={})),function(O){O.codec=()=>enumeration(eS)}(eE||(eE={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.Type&&(U.uint32(8),eE.codec().encode(O.Type,U)),null!=O.Data&&(U.uint32(18),U.bytes(O.Data)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.Type=eE.codec().decode(O);break;case 2:$.Data=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eA||(eA={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.Type&&(U.uint32(8),eE.codec().encode(O.Type,U)),null!=O.Data&&(U.uint32(18),U.bytes(O.Data)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.Type=eE.codec().decode(O);break;case 2:$.Data=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eI||(eI={}));let Ed25519PublicKey=class Ed25519PublicKey{_key;constructor(O){this._key=ensureKey(O,ij)}async verify(O,U){return hashAndVerify(this._key,U,O)}marshal(){return this._key}get bytes(){return eA.encode({Type:eE.Ed25519,Data:this.marshal()}).subarray()}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}};let Ed25519PrivateKey=class Ed25519PrivateKey{_key;_publicKey;constructor(O,U){this._key=ensureKey(O,iH),this._publicKey=ensureKey(U,ij)}async sign(O){return hashAndSign(this._key,O)}get public(){return new Ed25519PublicKey(this._publicKey)}marshal(){return this._key}get bytes(){return eI.encode({Type:eE.Ed25519,Data:this.marshal()}).subarray()}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}async id(){let O=iy.digest(this.public.bytes);return nW.encode(O.bytes).substring(1)}async export(O,U="libp2p-key"){if("libp2p-key"===U)return exporter(this.bytes,O);throw new src_errors_CodeError(`export format '${U}' is not supported`,"ERR_INVALID_EXPORT_FORMAT")}};function unmarshalEd25519PrivateKey(O){if(O.length>iH){O=ensureKey(O,iH+ij);let U=O.subarray(0,iH),$=O.subarray(iH,O.length);return new Ed25519PrivateKey(U,$)}O=ensureKey(O,iH);let U=O.subarray(0,iH),$=O.subarray(ij);return new Ed25519PrivateKey(U,$)}function unmarshalEd25519PublicKey(O){return O=ensureKey(O,ij),new Ed25519PublicKey(O)}async function ed25519_class_generateKeyPair(){let{privateKey:O,publicKey:U}=await generateKey();return new Ed25519PrivateKey(O,U)}async function generateKeyPairFromSeed(O){let{privateKey:U,publicKey:$}=await generateKeyFromSeed(O);return new Ed25519PrivateKey(U,$)}function ensureKey(O,U){if((O=Uint8Array.from(O??[])).length!==U)throw new src_errors_CodeError(`Key must be a Uint8Array of length ${U}, got ${O.length}`,"ERR_INVALID_KEY_TYPE");return O}var i3=$(2366);function bigIntegerToUintBase64url(O,U){let $=Uint8Array.from(O.abs().toByteArray());if($=0===$[0]?$.subarray(1):$,null!=U){if($.length>U)throw Error("byte array longer than desired length");$=concat_concat([new Uint8Array(U-$.length),$])}return(0,rB.B)($,"base64url")}function base64urlToBigInteger(O){let U=util_base64urlToBuffer(O);return new n$.jsbn.BigInteger((0,rB.B)(U,"base16"),16)}function util_base64urlToBuffer(O,U){let $=(0,rJ.m)(O,"base64urlpad");if(null!=U){if($.length>U)throw Error("byte array longer than desired length");$=concat_concat([new Uint8Array(U-$.length),$])}return $}$(4196);let i6={"P-256":256,"P-384":384,"P-521":521},i4=Object.keys(i6);function random_bytes_randomBytes(O){if(isNaN(O)||O<=0)throw new src_errors_CodeError("random bytes length must be a Number bigger than 0","ERR_INVALID_LENGTH");return nH.randomBytes(O)}function jwk2pem_convert(O,U){return U.map(U=>base64urlToBigInteger(O[U]))}function jwk2priv(O){return n$.pki.setRsaPrivateKey(...jwk2pem_convert(O,["n","e","d","p","q","dp","dq","qi"]))}function jwk2pub(O){return n$.pki.setRsaPublicKey(...jwk2pem_convert(O,["n","e"]))}function pkcs1ToJwk(O){let U=n$.asn1.fromDer((0,rB.B)(O,"ascii")),$=n$.pki.privateKeyFromAsn1(U);return{kty:"RSA",n:bigIntegerToUintBase64url($.n),e:bigIntegerToUintBase64url($.e),d:bigIntegerToUintBase64url($.d),p:bigIntegerToUintBase64url($.p),q:bigIntegerToUintBase64url($.q),dp:bigIntegerToUintBase64url($.dP),dq:bigIntegerToUintBase64url($.dQ),qi:bigIntegerToUintBase64url($.qInv),alg:"RS256"}}function jwkToPkcs1(O){if(null==O.n||null==O.e||null==O.d||null==O.p||null==O.q||null==O.dp||null==O.dq||null==O.qi)throw new src_errors_CodeError("JWK was missing components","ERR_INVALID_PARAMETERS");let U=n$.pki.privateKeyToAsn1({n:base64urlToBigInteger(O.n),e:base64urlToBigInteger(O.e),d:base64urlToBigInteger(O.d),p:base64urlToBigInteger(O.p),q:base64urlToBigInteger(O.q),dP:base64urlToBigInteger(O.dp),dQ:base64urlToBigInteger(O.dq),qInv:base64urlToBigInteger(O.qi)});return(0,rJ.m)(n$.asn1.toDer(U).getBytes(),"ascii")}function pkixToJwk(O){let U=n$.asn1.fromDer((0,rB.B)(O,"ascii")),$=n$.pki.publicKeyFromAsn1(U);return{kty:"RSA",n:bigIntegerToUintBase64url($.n),e:bigIntegerToUintBase64url($.e)}}function jwkToPkix(O){if(null==O.n||null==O.e)throw new src_errors_CodeError("JWK was missing components","ERR_INVALID_PARAMETERS");let U=n$.pki.publicKeyToAsn1({n:base64urlToBigInteger(O.n),e:base64urlToBigInteger(O.e)});return(0,rJ.m)(n$.asn1.toDer(U).getBytes(),"ascii")}async function rsa_browser_generateKey(O){let U=await iG.get().subtle.generateKey({name:"RSASSA-PKCS1-v1_5",modulusLength:O,publicExponent:new Uint8Array([1,0,1]),hash:{name:"SHA-256"}},!0,["sign","verify"]),$=await exportKey(U);return{privateKey:$[0],publicKey:$[1]}}async function rsa_browser_unmarshalPrivateKey(O){let U=await iG.get().subtle.importKey("jwk",O,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["sign"]),$=[U,await derivePublicFromPrivate(O)],J=await exportKey({privateKey:$[0],publicKey:$[1]});return{privateKey:J[0],publicKey:J[1]}}async function rsa_browser_hashAndSign(O,U){let $=await iG.get().subtle.importKey("jwk",O,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["sign"]),J=await iG.get().subtle.sign({name:"RSASSA-PKCS1-v1_5"},$,Uint8Array.from(U));return new Uint8Array(J,0,J.byteLength)}async function rsa_browser_hashAndVerify(O,U,$){let J=await iG.get().subtle.importKey("jwk",O,{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!1,["verify"]);return iG.get().subtle.verify({name:"RSASSA-PKCS1-v1_5"},J,U,$)}async function exportKey(O){if(null==O.privateKey||null==O.publicKey)throw new src_errors_CodeError("Private and public key are required","ERR_INVALID_PARAMETERS");return Promise.all([iG.get().subtle.exportKey("jwk",O.privateKey),iG.get().subtle.exportKey("jwk",O.publicKey)])}async function derivePublicFromPrivate(O){return iG.get().subtle.importKey("jwk",{kty:O.kty,n:O.n,e:O.e},{name:"RSASSA-PKCS1-v1_5",hash:{name:"SHA-256"}},!0,["verify"])}function convertKey(O,U,$,J){let en=U?jwk2pub(O):jwk2priv(O),es=(0,rB.B)(Uint8Array.from($),"ascii"),eo=J(es,en);return(0,rJ.m)(eo,"ascii")}function encrypt(O,U){return convertKey(O,!0,U,(O,U)=>U.encrypt(O))}function decrypt(O,U){return convertKey(O,!1,U,(O,U)=>U.decrypt(O))}i4.join(" / "),$(8439),$(411);let RsaPublicKey=class RsaPublicKey{_key;constructor(O){this._key=O}async verify(O,U){return rsa_browser_hashAndVerify(this._key,U,O)}marshal(){return jwkToPkix(this._key)}get bytes(){return eA.encode({Type:eE.RSA,Data:this.marshal()}).subarray()}encrypt(O){return encrypt(this._key,O)}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}};let RsaPrivateKey=class RsaPrivateKey{_key;_publicKey;constructor(O,U){this._key=O,this._publicKey=U}genSecret(){return random_bytes_randomBytes(16)}async sign(O){return rsa_browser_hashAndSign(this._key,O)}get public(){if(null==this._publicKey)throw new src_errors_CodeError("public key not provided","ERR_PUBKEY_NOT_PROVIDED");return new RsaPublicKey(this._publicKey)}decrypt(O){return decrypt(this._key,O)}marshal(){return jwkToPkcs1(this._key)}get bytes(){return eI.encode({Type:eE.RSA,Data:this.marshal()}).subarray()}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}async id(){let O=await this.public.hash();return(0,rB.B)(O,"base58btc")}async export(O,U="pkcs-8"){if("pkcs-8"===U){let U=new n$.util.ByteBuffer(this.marshal()),$=n$.asn1.fromDer(U),J=n$.pki.privateKeyFromAsn1($),en={algorithm:"aes256",count:1e4,saltSize:16,prfAlgorithm:"sha512"};return n$.pki.encryptRsaPrivateKey(J,O,en)}if("libp2p-key"===U)return exporter(this.bytes,O);throw new src_errors_CodeError(`export format '${U}' is not supported`,"ERR_INVALID_EXPORT_FORMAT")}};async function unmarshalRsaPrivateKey(O){let U=pkcs1ToJwk(O),$=await rsa_browser_unmarshalPrivateKey(U);return new RsaPrivateKey($.privateKey,$.publicKey)}function unmarshalRsaPublicKey(O){let U=pkixToJwk(O);return new RsaPublicKey(U)}async function fromJwk(O){let U=await rsa_browser_unmarshalPrivateKey(O);return new RsaPrivateKey(U.privateKey,U.publicKey)}async function rsa_class_generateKeyPair(O){let U=await rsa_browser_generateKey(O);return new RsaPrivateKey(U.privateKey,U.publicKey)}function secp256k1_generateKey(){return nH.randomPrivateKey()}async function secp256k1_hashAndSign(O,U){let{digest:$}=await ib.digest(U);try{return await sign($,O)}catch(O){throw new src_errors_CodeError(String(O),"ERR_INVALID_INPUT")}}async function secp256k1_hashAndVerify(O,U,$){try{let{digest:J}=await ib.digest($);return verify(U,J,O)}catch(O){throw new src_errors_CodeError(String(O),"ERR_INVALID_INPUT")}}function secp256k1_compressPublicKey(O){let U=Point.fromHex(O).toRawBytes(!0);return U}function validatePrivateKey(O){try{getPublicKey(O,!0)}catch(O){throw new src_errors_CodeError(String(O),"ERR_INVALID_PRIVATE_KEY")}}function validatePublicKey(O){try{Point.fromHex(O)}catch(O){throw new src_errors_CodeError(String(O),"ERR_INVALID_PUBLIC_KEY")}}function computePublicKey(O){try{return getPublicKey(O,!0)}catch(O){throw new src_errors_CodeError(String(O),"ERR_INVALID_PRIVATE_KEY")}}let Secp256k1PublicKey=class Secp256k1PublicKey{_key;constructor(O){validatePublicKey(O),this._key=O}async verify(O,U){return secp256k1_hashAndVerify(this._key,U,O)}marshal(){return secp256k1_compressPublicKey(this._key)}get bytes(){return eA.encode({Type:eE.Secp256k1,Data:this.marshal()}).subarray()}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}};let Secp256k1PrivateKey=class Secp256k1PrivateKey{_key;_publicKey;constructor(O,U){this._key=O,this._publicKey=U??computePublicKey(O),validatePrivateKey(this._key),validatePublicKey(this._publicKey)}async sign(O){return secp256k1_hashAndSign(this._key,O)}get public(){return new Secp256k1PublicKey(this._publicKey)}marshal(){return this._key}get bytes(){return eI.encode({Type:eE.Secp256k1,Data:this.marshal()}).subarray()}equals(O){return equals(this.bytes,O.bytes)}async hash(){let{bytes:O}=await ib.digest(this.bytes);return O}async id(){let O=await this.public.hash();return(0,rB.B)(O,"base58btc")}async export(O,U="libp2p-key"){if("libp2p-key"===U)return exporter(this.bytes,O);throw new src_errors_CodeError(`export format '${U}' is not supported`,"ERR_INVALID_EXPORT_FORMAT")}};function unmarshalSecp256k1PrivateKey(O){return new Secp256k1PrivateKey(O)}function unmarshalSecp256k1PublicKey(O){return new Secp256k1PublicKey(O)}async function secp256k1_class_generateKeyPair(){let O=secp256k1_generateKey();return new Secp256k1PrivateKey(O)}let i5={secp256k1:rS};var i8=$(6831),i9=$(3062);let i7=Symbol.for("nodejs.util.inspect.custom"),se=Object.values(rW.gh).map(O=>O.decoder).reduce((O,U)=>O.or(U),rW.gh.identity.decoder),sr=114,sn=36,si=37;let PeerIdImpl=class PeerIdImpl{type;multihash;privateKey;publicKey;string;constructor(O){this.type=O.type,this.multihash=O.multihash,this.privateKey=O.privateKey,Object.defineProperty(this,"string",{enumerable:!1,writable:!0})}get[Symbol.toStringTag](){return`PeerId(${this.toString()})`}[rT]=!0;toString(){return null==this.string&&(this.string=rR.base58btc.encode(this.multihash.bytes).slice(1)),this.string}toCID(){return rC.k0.createV1(sr,this.multihash)}toBytes(){return this.multihash.bytes}toJSON(){return this.toString()}equals(O){if(O instanceof Uint8Array)return equals(this.multihash.bytes,O);if("string"==typeof O)return peerIdFromString(O).equals(this);if(O?.multihash?.bytes!=null)return equals(this.multihash.bytes,O.multihash.bytes);throw Error("not valid Id")}[i7](){return`PeerId(${this.toString()})`}};let RSAPeerIdImpl=class RSAPeerIdImpl extends PeerIdImpl{type="RSA";publicKey;constructor(O){super({...O,type:"RSA"}),this.publicKey=O.publicKey}};let Ed25519PeerIdImpl=class Ed25519PeerIdImpl extends PeerIdImpl{type="Ed25519";publicKey;constructor(O){super({...O,type:"Ed25519"}),this.publicKey=O.multihash.digest}};let Secp256k1PeerIdImpl=class Secp256k1PeerIdImpl extends PeerIdImpl{type="secp256k1";publicKey;constructor(O){super({...O,type:"secp256k1"}),this.publicKey=O.multihash.digest}};function peerIdFromPeerId(O){if("RSA"===O.type)return new RSAPeerIdImpl(O);if("Ed25519"===O.type)return new Ed25519PeerIdImpl(O);if("secp256k1"===O.type)return new Secp256k1PeerIdImpl(O);throw new errors_CodeError("Not a PeerId","ERR_INVALID_PARAMETERS")}function peerIdFromString(O,U){if(U=U??se,"1"===O.charAt(0)||"Q"===O.charAt(0)){let U=rY.Jx(rR.base58btc.decode(`z${O}`));return O.startsWith("12D")?new Ed25519PeerIdImpl({multihash:U}):O.startsWith("16U")?new Secp256k1PeerIdImpl({multihash:U}):new RSAPeerIdImpl({multihash:U})}return src_peerIdFromBytes(se.decode(O))}function src_peerIdFromBytes(O){try{let U=rY.Jx(O);if(U.code===i8.identity.code){if(U.digest.length===sn)return new Ed25519PeerIdImpl({multihash:U});if(U.digest.length===si)return new Secp256k1PeerIdImpl({multihash:U})}if(U.code===i9.sha256.code)return new RSAPeerIdImpl({multihash:U})}catch{return peerIdFromCID(rC.k0.decode(O))}throw Error("Supplied PeerID CID is invalid")}function peerIdFromCID(O){if(null==O||null==O.multihash||null==O.version||1===O.version&&O.code!==sr)throw Error("Supplied PeerID CID is invalid");let U=O.multihash;if(U.code===i9.sha256.code)return new RSAPeerIdImpl({multihash:O.multihash});if(U.code===i8.identity.code){if(U.digest.length===sn)return new Ed25519PeerIdImpl({multihash:O.multihash});if(U.digest.length===si)return new Secp256k1PeerIdImpl({multihash:O.multihash})}throw Error("Supplied PeerID CID is invalid")}async function src_peerIdFromKeys(O,U){return O.length===sn?new Ed25519PeerIdImpl({multihash:rY.Ue(i8.identity.code,O),privateKey:U}):O.length===si?new Secp256k1PeerIdImpl({multihash:rY.Ue(i8.identity.code,O),privateKey:U}):new RSAPeerIdImpl({multihash:await i9.sha256.digest(O),publicKey:O,privateKey:U})}function createPeerIdFromPublicKey(O){let U=new i5.secp256k1.Secp256k1PublicKey(O);return src_peerIdFromKeys(U.bytes,void 0)}function decodeMultiaddrs(O){let U=[],$=0;for(;$O+nG+U.bytes.length,0),$=new Uint8Array(U),J=new DataView($.buffer),en=0;return O.forEach(O=>{if(O.getPeerId())throw Error("`multiaddr` field MUST not contain peer id");J.setUint16(en,O.bytes.length),en+=nG,$.set(O.bytes,en),en+=O.bytes.length}),$}let decodeRelayShard=O=>{if((O=new Uint8Array(O)).length<3)throw Error("Insufficient data");let U=new DataView(O.buffer),$=U.getUint16(0),J=[];if(130===O.length)for(let O=0;O<1024;O++){let $=Math.floor(O/8)+2,en=7-O%8;U.getUint8($)&1<=O.length)throw Error("Unexpected end of data");J.push(U.getUint16(es))}}return{cluster:$,indexList:J}},encodeRelayShard=O=>{let{cluster:U,indexList:$}=O,J=$.length>=64?130:3+2*$.length,en=new ArrayBuffer(J),es=new DataView(en);if(es.setUint16(0,U),$.length>=64)for(let O of $){let U=Math.floor(O/8)+2,$=7-O%8;es.setUint8(U,es.getUint8(U)|1<<$)}else{es.setUint8(2,$.length);for(let O=0,U=3;O<$.length;O++,U+=2)es.setUint16(U,$[O])}return new Uint8Array(en)};function encodeWaku2(O){let U=0;return O.lightPush&&(U+=1),U<<=1,O.filter&&(U+=1),U<<=1,O.store&&(U+=1),U<<=1,O.relay&&(U+=1),U}function decodeWaku2(O){let U={relay:!1,store:!1,filter:!1,lightPush:!1};return O%2&&(U.relay=!0),(O>>=1)%2&&(U.store=!0),(O>>=1)%2&&(U.filter=!0),(O>>=1)%2&&(U.lightPush=!0),U}let RawEnr=class RawEnr extends Map{seq;signature;constructor(O={},U=BigInt(1),$){super(Object.entries(O)),this.seq=U,this.signature=$}set(O,U){return this.signature=void 0,this.seq++,super.set(O,U)}get id(){let O=this.get("id");if(!O)throw Error("id not found.");return(0,ng.Md)(O)}get publicKey(){if("v4"===this.id)return this.get("secp256k1");throw Error(nV)}get rs(){let O=this.get("rs");if(O)return decodeRelayShard(O)}get rsv(){let O=this.get("rsv");if(O)return decodeRelayShard(O)}get ip(){return getStringValue(this,"ip","ip4")}set ip(O){setStringValue(this,"ip","ip4",O)}get tcp(){return getNumberAsStringValue(this,"tcp","tcp")}set tcp(O){setNumberAsStringValue(this,"tcp","tcp",O)}get udp(){return getNumberAsStringValue(this,"udp","udp")}set udp(O){setNumberAsStringValue(this,"udp","udp",O)}get ip6(){return getStringValue(this,"ip6","ip6")}set ip6(O){setStringValue(this,"ip6","ip6",O)}get tcp6(){return getNumberAsStringValue(this,"tcp6","tcp")}set tcp6(O){setNumberAsStringValue(this,"tcp6","tcp",O)}get udp6(){return getNumberAsStringValue(this,"udp6","udp")}set udp6(O){setNumberAsStringValue(this,"udp6","udp",O)}get multiaddrs(){let O=this.get("multiaddrs");if(O)return decodeMultiaddrs(O)}set multiaddrs(O){deleteUndefined(this,"multiaddrs",O,encodeMultiaddrs)}get waku2(){let O=this.get("waku2");if(O)return decodeWaku2(O[0])}set waku2(O){deleteUndefined(this,"waku2",O,O=>new Uint8Array([encodeWaku2(O)]))}};function getStringValue(O,U,$){let J=O.get(U);if(J)return convertToString($,J)}function getNumberAsStringValue(O,U,$){let J=O.get(U);if(J)return Number(convertToString($,J))}function setStringValue(O,U,$,J){deleteUndefined(O,U,J,convertToBytes.bind({},$))}function setNumberAsStringValue(O,U,$,J){setStringValue(O,U,$,J?.toString(10))}function deleteUndefined(O,U,$,J){void 0!==$?O.set(U,J($)):O.delete(U)}async function v4_sign(O,U){return sign(keccak256(U),O,{der:!1})}function nodeId(O){let U=Point.fromHex(O),$=U.toRawBytes(!1);return(0,ng.ci)(keccak256($.slice(1)))}let so=nf("waku:enr");!function(O){O.TCP="tcp",O.UDP="udp"}(eP||(eP={})),function(O){O.TCP4="tcp4",O.UDP4="udp4",O.TCP6="tcp6",O.UDP6="udp6"}(ek||(ek={}));let enr_ENR=class enr_ENR extends RawEnr{static RECORD_PREFIX="enr:";peerId;static async create(O={},U=BigInt(1),$){let J=new enr_ENR(O,U,$);try{let O=J.publicKey;O&&(J.peerId=await createPeerIdFromPublicKey(O))}catch(O){so("Could not calculate peer id for ENR",O)}return J}get nodeId(){if("v4"===this.id)return this.publicKey?nodeId(this.publicKey):void 0;throw Error(nV)}getLocationMultiaddr=locationMultiaddrFromEnrFields.bind({},this);get shardInfo(){return this.rs&&this.rsv&&so("Warning: ENR contains both `rs` and `rsv` fields."),this.rs||this.rsv}setLocationMultiaddr(O){let U=O.protoNames();if(2!==U.length&&"udp"!==U[1]&&"tcp"!==U[1])throw Error("Invalid multiaddr");let $=O.tuples();if(!$[0][1]||!$[1][1])throw Error("Invalid multiaddr");4===$[0][0]?(this.set("ip",$[0][1]),this.set(U[1],$[1][1])):(this.set("ip6",$[0][1]),this.set(U[1]+"6",$[1][1]))}getAllLocationMultiaddrs(){let O=[];for(let U of Object.values(ek)){let $=this.getLocationMultiaddr(U);$&&O.push($)}let U=this.multiaddrs??[];return O.concat(U)}get peerInfo(){let O=this.peerId;if(O)return{id:O,multiaddrs:this.getAllLocationMultiaddrs(),protocols:[]}}getFullMultiaddr(O){if(this.peerId){let U=this.getLocationMultiaddr(O);if(U)return U.encapsulate(`/p2p/${this.peerId.toString()}`)}}getFullMultiaddrs(){if(this.peerId&&this.multiaddrs){let O=this.peerId;return this.multiaddrs.map(U=>U.encapsulate(`/p2p/${O.toString()}`))}return[]}verify(O,U){if(!this.get("id")||"v4"!==this.id)throw Error(nV);if(!this.publicKey)throw Error("Failed to verify ENR: No public key");return verifySignature(U,keccak256(O),this.publicKey)}async sign(O,U){if("v4"===this.id)this.signature=await v4_sign(U,O);else throw Error(nV);return this.signature}};var sa=$(7054);let EnrDecoder=class EnrDecoder{static fromString(O){if(!O.startsWith(enr_ENR.RECORD_PREFIX))throw Error(`"string encoded ENR must start with '${enr_ENR.RECORD_PREFIX}'`);return EnrDecoder.fromRLP((0,rJ.m)(O.slice(4),"base64url"))}static fromRLP(O){let U=sa.J(O).map(ng.nr);return fromValues(U)}};async function fromValues(O){let{signature:U,seq:$,kvs:J}=checkValues(O),en={};for(let O=0;OO.indexList.map(U=>`/waku/2/rs/${O.cluster}/${U}`);function ensurePubsubTopicIsConfigured(O,U){if(!U.includes(O))throw Error(`PubSub topic ${O} has not been configured on this instance. Configured topics are: ${U}. Please update your configuration by passing in the topic during Waku node instantiation.`)}!function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.proof&&O.proof.byteLength>0&&(U.uint32(10),U.bytes(O.proof)),null!=O.merkleRoot&&O.merkleRoot.byteLength>0&&(U.uint32(18),U.bytes(O.merkleRoot)),null!=O.epoch&&O.epoch.byteLength>0&&(U.uint32(26),U.bytes(O.epoch)),null!=O.shareX&&O.shareX.byteLength>0&&(U.uint32(34),U.bytes(O.shareX)),null!=O.shareY&&O.shareY.byteLength>0&&(U.uint32(42),U.bytes(O.shareY)),null!=O.nullifier&&O.nullifier.byteLength>0&&(U.uint32(50),U.bytes(O.nullifier)),null!=O.rlnIdentifier&&O.rlnIdentifier.byteLength>0&&(U.uint32(58),U.bytes(O.rlnIdentifier)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.proof=O.bytes();break;case 2:$.merkleRoot=O.bytes();break;case 3:$.epoch=O.bytes();break;case 4:$.shareX=O.bytes();break;case 5:$.shareY=O.bytes();break;case 6:$.nullifier=O.bytes();break;case 7:$.rlnIdentifier=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eT||(eT={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.payload&&O.payload.byteLength>0&&(U.uint32(10),U.bytes(O.payload)),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),null!=O.version&&(U.uint32(24),U.uint32(O.version)),null!=O.timestamp&&(U.uint32(80),U.sint64(O.timestamp)),null!=O.meta&&(U.uint32(90),U.bytes(O.meta)),null!=O.rateLimitProof&&(U.uint32(170),eT.codec().encode(O.rateLimitProof,U)),null!=O.ephemeral&&(U.uint32(248),U.bool(O.ephemeral)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={payload:new Uint8Array(0),contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.payload=O.bytes();break;case 2:$.contentTopic=O.string();break;case 3:$.version=O.uint32();break;case 10:$.timestamp=O.sint64();break;case 11:$.meta=O.bytes();break;case 21:$.rateLimitProof=eT.codec().decode(O,O.uint32());break;case 31:$.ephemeral=O.bool();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eR||(eR={})),function(O){let U,$;(function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(10),U.string(O.contentTopic)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.contentTopic=O.string():O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())})(U=O.ContentFilter||(O.ContentFilter={})),O.codec=()=>(null==$&&($=message((U,$,J={})=>{if(!1!==J.lengthDelimited&&$.fork(),null!=U.subscribe&&!1!==U.subscribe&&($.uint32(8),$.bool(U.subscribe)),null!=U.topic&&""!==U.topic&&($.uint32(18),$.string(U.topic)),null!=U.contentFilters)for(let J of U.contentFilters)$.uint32(26),O.ContentFilter.codec().encode(J,$);!1!==J.lengthDelimited&&$.ldelim()},(U,$)=>{let J={subscribe:!1,topic:"",contentFilters:[]},en=null==$?U.len:U.pos+$;for(;U.pos>>3){case 1:J.subscribe=U.bool();break;case 2:J.topic=U.string();break;case 3:J.contentFilters.push(O.ContentFilter.codec().decode(U,U.uint32()));break;default:U.skipType(7&$)}}return J})),$),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eC||(eC={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{if(!1!==$.lengthDelimited&&U.fork(),null!=O.messages)for(let $ of O.messages)U.uint32(10),eM.codec().encode($,U);!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={messages:[]},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.messages.push(eM.codec().decode(O,O.uint32())):O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eB||(eB={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.requestId&&""!==O.requestId&&(U.uint32(10),U.string(O.requestId)),null!=O.request&&(U.uint32(18),eC.codec().encode(O.request,U)),null!=O.push&&(U.uint32(26),eB.codec().encode(O.push,U)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={requestId:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.requestId=O.string();break;case 2:$.request=eC.codec().decode(O,O.uint32());break;case 3:$.push=eB.codec().decode(O,O.uint32());break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eN||(eN={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.proof&&O.proof.byteLength>0&&(U.uint32(10),U.bytes(O.proof)),null!=O.merkleRoot&&O.merkleRoot.byteLength>0&&(U.uint32(18),U.bytes(O.merkleRoot)),null!=O.epoch&&O.epoch.byteLength>0&&(U.uint32(26),U.bytes(O.epoch)),null!=O.shareX&&O.shareX.byteLength>0&&(U.uint32(34),U.bytes(O.shareX)),null!=O.shareY&&O.shareY.byteLength>0&&(U.uint32(42),U.bytes(O.shareY)),null!=O.nullifier&&O.nullifier.byteLength>0&&(U.uint32(50),U.bytes(O.nullifier)),null!=O.rlnIdentifier&&O.rlnIdentifier.byteLength>0&&(U.uint32(58),U.bytes(O.rlnIdentifier)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.proof=O.bytes();break;case 2:$.merkleRoot=O.bytes();break;case 3:$.epoch=O.bytes();break;case 4:$.shareX=O.bytes();break;case 5:$.shareY=O.bytes();break;case 6:$.nullifier=O.bytes();break;case 7:$.rlnIdentifier=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eD||(eD={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.payload&&O.payload.byteLength>0&&(U.uint32(10),U.bytes(O.payload)),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),null!=O.version&&(U.uint32(24),U.uint32(O.version)),null!=O.timestamp&&(U.uint32(80),U.sint64(O.timestamp)),null!=O.meta&&(U.uint32(90),U.bytes(O.meta)),null!=O.rateLimitProof&&(U.uint32(170),eD.codec().encode(O.rateLimitProof,U)),null!=O.ephemeral&&(U.uint32(248),U.bool(O.ephemeral)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={payload:new Uint8Array(0),contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.payload=O.bytes();break;case 2:$.contentTopic=O.string();break;case 3:$.version=O.uint32();break;case 10:$.timestamp=O.sint64();break;case 11:$.meta=O.bytes();break;case 21:$.rateLimitProof=eD.codec().decode(O,O.uint32());break;case 31:$.ephemeral=O.bool();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eM||(eM={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3==2?$.contentTopic=O.string():O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eO||(eO={})),function(O){let U,$,J;(function(O){O.SUBSCRIBER_PING="SUBSCRIBER_PING",O.SUBSCRIBE="SUBSCRIBE",O.UNSUBSCRIBE="UNSUBSCRIBE",O.UNSUBSCRIBE_ALL="UNSUBSCRIBE_ALL"})(U=O.FilterSubscribeType||(O.FilterSubscribeType={})),function(O){O[O.SUBSCRIBER_PING=0]="SUBSCRIBER_PING",O[O.SUBSCRIBE=1]="SUBSCRIBE",O[O.UNSUBSCRIBE=2]="UNSUBSCRIBE",O[O.UNSUBSCRIBE_ALL=3]="UNSUBSCRIBE_ALL"}($||($={})),function(O){O.codec=()=>enumeration($)}(U=O.FilterSubscribeType||(O.FilterSubscribeType={})),O.codec=()=>(null==J&&(J=message((U,J,en={})=>{if(!1!==en.lengthDelimited&&J.fork(),null!=U.requestId&&""!==U.requestId&&(J.uint32(10),J.string(U.requestId)),null!=U.filterSubscribeType&&0!==$[U.filterSubscribeType]&&(J.uint32(16),O.FilterSubscribeType.codec().encode(U.filterSubscribeType,J)),null!=U.pubsubTopic&&(J.uint32(82),J.string(U.pubsubTopic)),null!=U.contentTopics)for(let O of U.contentTopics)J.uint32(90),J.string(O);!1!==en.lengthDelimited&&J.ldelim()},($,J)=>{let en={requestId:"",filterSubscribeType:U.SUBSCRIBER_PING,contentTopics:[]},es=null==J?$.len:$.pos+J;for(;$.pos>>3){case 1:en.requestId=$.string();break;case 2:en.filterSubscribeType=O.FilterSubscribeType.codec().decode($);break;case 10:en.pubsubTopic=$.string();break;case 11:en.contentTopics.push($.string());break;default:$.skipType(7&U)}}return en})),J),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eL||(eL={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.requestId&&""!==O.requestId&&(U.uint32(10),U.string(O.requestId)),null!=O.statusCode&&0!==O.statusCode&&(U.uint32(80),U.uint32(O.statusCode)),null!=O.statusDesc&&(U.uint32(90),U.string(O.statusDesc)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={requestId:"",statusCode:0},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.requestId=O.string();break;case 10:$.statusCode=O.uint32();break;case 11:$.statusDesc=O.string();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eU||(eU={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.wakuMessage&&(U.uint32(10),ej.codec().encode(O.wakuMessage,U)),null!=O.pubsubTopic&&(U.uint32(18),U.string(O.pubsubTopic)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.wakuMessage=ej.codec().decode(O,O.uint32());break;case 2:$.pubsubTopic=O.string();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eF||(eF={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.proof&&O.proof.byteLength>0&&(U.uint32(10),U.bytes(O.proof)),null!=O.merkleRoot&&O.merkleRoot.byteLength>0&&(U.uint32(18),U.bytes(O.merkleRoot)),null!=O.epoch&&O.epoch.byteLength>0&&(U.uint32(26),U.bytes(O.epoch)),null!=O.shareX&&O.shareX.byteLength>0&&(U.uint32(34),U.bytes(O.shareX)),null!=O.shareY&&O.shareY.byteLength>0&&(U.uint32(42),U.bytes(O.shareY)),null!=O.nullifier&&O.nullifier.byteLength>0&&(U.uint32(50),U.bytes(O.nullifier)),null!=O.rlnIdentifier&&O.rlnIdentifier.byteLength>0&&(U.uint32(58),U.bytes(O.rlnIdentifier)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.proof=O.bytes();break;case 2:$.merkleRoot=O.bytes();break;case 3:$.epoch=O.bytes();break;case 4:$.shareX=O.bytes();break;case 5:$.shareY=O.bytes();break;case 6:$.nullifier=O.bytes();break;case 7:$.rlnIdentifier=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eK||(eK={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.payload&&O.payload.byteLength>0&&(U.uint32(10),U.bytes(O.payload)),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),null!=O.version&&(U.uint32(24),U.uint32(O.version)),null!=O.timestamp&&(U.uint32(80),U.sint64(O.timestamp)),null!=O.meta&&(U.uint32(90),U.bytes(O.meta)),null!=O.rateLimitProof&&(U.uint32(170),eK.codec().encode(O.rateLimitProof,U)),null!=O.ephemeral&&(U.uint32(248),U.bool(O.ephemeral)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={payload:new Uint8Array(0),contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.payload=O.bytes();break;case 2:$.contentTopic=O.string();break;case 3:$.version=O.uint32();break;case 10:$.timestamp=O.sint64();break;case 11:$.meta=O.bytes();break;case 21:$.rateLimitProof=eK.codec().decode(O,O.uint32());break;case 31:$.ephemeral=O.bool();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(ej||(ej={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.pubsubTopic&&""!==O.pubsubTopic&&(U.uint32(10),U.string(O.pubsubTopic)),null!=O.message&&(U.uint32(18),e$.codec().encode(O.message,U)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={pubsubTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.pubsubTopic=O.string();break;case 2:$.message=e$.codec().decode(O,O.uint32());break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eH||(eH={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.isSuccess&&!1!==O.isSuccess&&(U.uint32(8),U.bool(O.isSuccess)),null!=O.info&&(U.uint32(18),U.string(O.info)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={isSuccess:!1},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.isSuccess=O.bool();break;case 2:$.info=O.string();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eq||(eq={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.requestId&&""!==O.requestId&&(U.uint32(10),U.string(O.requestId)),null!=O.request&&(U.uint32(18),eH.codec().encode(O.request,U)),null!=O.response&&(U.uint32(26),eq.codec().encode(O.response,U)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={requestId:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.requestId=O.string();break;case 2:$.request=eH.codec().decode(O,O.uint32());break;case 3:$.response=eq.codec().decode(O,O.uint32());break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eV||(eV={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.proof&&O.proof.byteLength>0&&(U.uint32(10),U.bytes(O.proof)),null!=O.merkleRoot&&O.merkleRoot.byteLength>0&&(U.uint32(18),U.bytes(O.merkleRoot)),null!=O.epoch&&O.epoch.byteLength>0&&(U.uint32(26),U.bytes(O.epoch)),null!=O.shareX&&O.shareX.byteLength>0&&(U.uint32(34),U.bytes(O.shareX)),null!=O.shareY&&O.shareY.byteLength>0&&(U.uint32(42),U.bytes(O.shareY)),null!=O.nullifier&&O.nullifier.byteLength>0&&(U.uint32(50),U.bytes(O.nullifier)),null!=O.rlnIdentifier&&O.rlnIdentifier.byteLength>0&&(U.uint32(58),U.bytes(O.rlnIdentifier)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.proof=O.bytes();break;case 2:$.merkleRoot=O.bytes();break;case 3:$.epoch=O.bytes();break;case 4:$.shareX=O.bytes();break;case 5:$.shareY=O.bytes();break;case 6:$.nullifier=O.bytes();break;case 7:$.rlnIdentifier=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eG||(eG={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.payload&&O.payload.byteLength>0&&(U.uint32(10),U.bytes(O.payload)),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),null!=O.version&&(U.uint32(24),U.uint32(O.version)),null!=O.timestamp&&(U.uint32(80),U.sint64(O.timestamp)),null!=O.meta&&(U.uint32(90),U.bytes(O.meta)),null!=O.rateLimitProof&&(U.uint32(170),eG.codec().encode(O.rateLimitProof,U)),null!=O.ephemeral&&(U.uint32(248),U.bool(O.ephemeral)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={payload:new Uint8Array(0),contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.payload=O.bytes();break;case 2:$.contentTopic=O.string();break;case 3:$.version=O.uint32();break;case 10:$.timestamp=O.sint64();break;case 11:$.meta=O.bytes();break;case 21:$.rateLimitProof=eG.codec().decode(O,O.uint32());break;case 31:$.ephemeral=O.bool();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e$||(e$={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.digest&&O.digest.byteLength>0&&(U.uint32(10),U.bytes(O.digest)),null!=O.receiverTime&&0n!==O.receiverTime&&(U.uint32(16),U.sint64(O.receiverTime)),null!=O.senderTime&&0n!==O.senderTime&&(U.uint32(24),U.sint64(O.senderTime)),null!=O.pubsubTopic&&""!==O.pubsubTopic&&(U.uint32(34),U.string(O.pubsubTopic)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={digest:new Uint8Array(0),receiverTime:0n,senderTime:0n,pubsubTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.digest=O.bytes();break;case 2:$.receiverTime=O.sint64();break;case 3:$.senderTime=O.sint64();break;case 4:$.pubsubTopic=O.string();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eW||(eW={})),function(O){let U,$,J;(function(O){O.BACKWARD="BACKWARD",O.FORWARD="FORWARD"})(U=O.Direction||(O.Direction={})),function(O){O[O.BACKWARD=0]="BACKWARD",O[O.FORWARD=1]="FORWARD"}($||($={})),function(O){O.codec=()=>enumeration($)}(U=O.Direction||(O.Direction={})),O.codec=()=>(null==J&&(J=message((U,$,J={})=>{!1!==J.lengthDelimited&&$.fork(),null!=U.pageSize&&($.uint32(8),$.uint64(U.pageSize)),null!=U.cursor&&($.uint32(18),eW.codec().encode(U.cursor,$)),null!=U.direction&&($.uint32(24),O.Direction.codec().encode(U.direction,$)),!1!==J.lengthDelimited&&$.ldelim()},(U,$)=>{let J={},en=null==$?U.len:U.pos+$;for(;U.pos>>3){case 1:J.pageSize=U.uint64();break;case 2:J.cursor=eW.codec().decode(U,U.uint32());break;case 3:J.direction=O.Direction.codec().decode(U);break;default:U.skipType(7&$)}}return J})),J),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eY||(eY={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(10),U.string(O.contentTopic)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.contentTopic=O.string():O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eJ||(eJ={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{if(!1!==$.lengthDelimited&&U.fork(),null!=O.pubsubTopic&&(U.uint32(18),U.string(O.pubsubTopic)),null!=O.contentFilters)for(let $ of O.contentFilters)U.uint32(26),eJ.codec().encode($,U);null!=O.pagingInfo&&(U.uint32(34),eY.codec().encode(O.pagingInfo,U)),null!=O.startTime&&(U.uint32(40),U.sint64(O.startTime)),null!=O.endTime&&(U.uint32(48),U.sint64(O.endTime)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={contentFilters:[]},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 2:$.pubsubTopic=O.string();break;case 3:$.contentFilters.push(eJ.codec().decode(O,O.uint32()));break;case 4:$.pagingInfo=eY.codec().decode(O,O.uint32());break;case 5:$.startTime=O.sint64();break;case 6:$.endTime=O.sint64();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eQ||(eQ={})),function(O){let U,$,J;(function(O){O.NONE="NONE",O.INVALID_CURSOR="INVALID_CURSOR"})(U=O.HistoryError||(O.HistoryError={})),function(O){O[O.NONE=0]="NONE",O[O.INVALID_CURSOR=1]="INVALID_CURSOR"}($||($={})),function(O){O.codec=()=>enumeration($)}(U=O.HistoryError||(O.HistoryError={})),O.codec=()=>(null==J&&(J=message((U,J,en={})=>{if(!1!==en.lengthDelimited&&J.fork(),null!=U.messages)for(let O of U.messages)J.uint32(18),e1.codec().encode(O,J);null!=U.pagingInfo&&(J.uint32(26),eY.codec().encode(U.pagingInfo,J)),null!=U.error&&0!==$[U.error]&&(J.uint32(32),O.HistoryError.codec().encode(U.error,J)),!1!==en.lengthDelimited&&J.ldelim()},($,J)=>{let en={messages:[],error:U.NONE},es=null==J?$.len:$.pos+J;for(;$.pos>>3){case 2:en.messages.push(e1.codec().decode($,$.uint32()));break;case 3:en.pagingInfo=eY.codec().decode($,$.uint32());break;case 4:en.error=O.HistoryError.codec().decode($);break;default:$.skipType(7&U)}}return en})),J),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eZ||(eZ={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.requestId&&""!==O.requestId&&(U.uint32(10),U.string(O.requestId)),null!=O.query&&(U.uint32(18),eQ.codec().encode(O.query,U)),null!=O.response&&(U.uint32(26),eZ.codec().encode(O.response,U)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={requestId:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.requestId=O.string();break;case 2:$.query=eQ.codec().decode(O,O.uint32());break;case 3:$.response=eZ.codec().decode(O,O.uint32());break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(eX||(eX={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.proof&&O.proof.byteLength>0&&(U.uint32(10),U.bytes(O.proof)),null!=O.merkleRoot&&O.merkleRoot.byteLength>0&&(U.uint32(18),U.bytes(O.merkleRoot)),null!=O.epoch&&O.epoch.byteLength>0&&(U.uint32(26),U.bytes(O.epoch)),null!=O.shareX&&O.shareX.byteLength>0&&(U.uint32(34),U.bytes(O.shareX)),null!=O.shareY&&O.shareY.byteLength>0&&(U.uint32(42),U.bytes(O.shareY)),null!=O.nullifier&&O.nullifier.byteLength>0&&(U.uint32(50),U.bytes(O.nullifier)),null!=O.rlnIdentifier&&O.rlnIdentifier.byteLength>0&&(U.uint32(58),U.bytes(O.rlnIdentifier)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={proof:new Uint8Array(0),merkleRoot:new Uint8Array(0),epoch:new Uint8Array(0),shareX:new Uint8Array(0),shareY:new Uint8Array(0),nullifier:new Uint8Array(0),rlnIdentifier:new Uint8Array(0)},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.proof=O.bytes();break;case 2:$.merkleRoot=O.bytes();break;case 3:$.epoch=O.bytes();break;case 4:$.shareX=O.bytes();break;case 5:$.shareY=O.bytes();break;case 6:$.nullifier=O.bytes();break;case 7:$.rlnIdentifier=O.bytes();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e0||(e0={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.payload&&O.payload.byteLength>0&&(U.uint32(10),U.bytes(O.payload)),null!=O.contentTopic&&""!==O.contentTopic&&(U.uint32(18),U.string(O.contentTopic)),null!=O.version&&(U.uint32(24),U.uint32(O.version)),null!=O.timestamp&&(U.uint32(80),U.sint64(O.timestamp)),null!=O.meta&&(U.uint32(90),U.bytes(O.meta)),null!=O.rateLimitProof&&(U.uint32(170),e0.codec().encode(O.rateLimitProof,U)),null!=O.ephemeral&&(U.uint32(248),U.bool(O.ephemeral)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={payload:new Uint8Array(0),contentTopic:""},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.payload=O.bytes();break;case 2:$.contentTopic=O.string();break;case 3:$.version=O.uint32();break;case 10:$.timestamp=O.sint64();break;case 11:$.meta=O.bytes();break;case 21:$.rateLimitProof=e0.codec().decode(O,O.uint32());break;case 31:$.ephemeral=O.bool();break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e1||(e1={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.enr&&(U.uint32(10),U.bytes(O.enr)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.enr=O.bytes():O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e3||(e3={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.numPeers&&(U.uint32(8),U.uint64(O.numPeers)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.numPeers=O.uint64():O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e6||(e6={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{if(!1!==$.lengthDelimited&&U.fork(),null!=O.peerInfos)for(let $ of O.peerInfos)U.uint32(10),e3.codec().encode($,U);!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={peerInfos:[]},J=null==U?O.len:O.pos+U;for(;O.pos>>3==1?$.peerInfos.push(e3.codec().decode(O,O.uint32())):O.skipType(7&U)}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e5||(e5={})),function(O){let U;O.codec=()=>(null==U&&(U=message((O,U,$={})=>{!1!==$.lengthDelimited&&U.fork(),null!=O.query&&(U.uint32(10),e6.codec().encode(O.query,U)),null!=O.response&&(U.uint32(18),e5.codec().encode(O.response,U)),!1!==$.lengthDelimited&&U.ldelim()},(O,U)=>{let $={},J=null==U?O.len:O.pos+U;for(;O.pos>>3){case 1:$.query=e6.codec().decode(O,O.uint32());break;case 2:$.response=e5.codec().decode(O,O.uint32());break;default:O.skipType(7&U)}}return $})),U),O.encode=U=>encodeMessage(U,O.codec()),O.decode=U=>decodeMessage(U,O.codec())}(e9||(e9={}));let sc="/waku/2/default-waku/proto",su=nf("waku:message:version-0"),sf=BigInt(1e6),sp=0;let DecodedMessage=class DecodedMessage{pubsubTopic;proto;constructor(O,U){this.pubsubTopic=O,this.proto=U}get ephemeral(){return!!this.proto.ephemeral}get payload(){return this.proto.payload}get contentTopic(){return this.proto.contentTopic}get _rawTimestamp(){return this.proto.timestamp}get timestamp(){try{if(this.proto.timestamp){let O=this.proto.timestamp/sf;return new Date(Number(O))}return}catch(O){return}}get meta(){return this.proto.meta}get version(){return this.proto.version??0}get rateLimitProof(){return this.proto.rateLimitProof}};let version_0_Encoder=class version_0_Encoder{contentTopic;ephemeral;pubsubTopic;metaSetter;constructor(O,U=!1,$,J){if(this.contentTopic=O,this.ephemeral=U,this.pubsubTopic=$,this.metaSetter=J,!O||""===O)throw Error("Content topic must be specified")}async toWire(O){return eR.encode(await this.toProtoObj(O))}async toProtoObj(O){let U=O.timestamp??new Date,$={payload:O.payload,version:sp,contentTopic:this.contentTopic,timestamp:BigInt(U.valueOf())*sf,meta:void 0,rateLimitProof:O.rateLimitProof,ephemeral:this.ephemeral};if(this.metaSetter){let O=this.metaSetter($);return{...$,meta:O}}return $}};function createEncoder({pubsubTopic:O=sc,contentTopic:U,ephemeral:$,metaSetter:J}){return new version_0_Encoder(U,$,O,J)}let version_0_Decoder=class version_0_Decoder{pubsubTopic;contentTopic;constructor(O,U){if(this.pubsubTopic=O,this.contentTopic=U,!U||""===U)throw Error("Content topic must be specified")}fromWireToProtoObj(O){let U=eR.decode(O);return su("Message decoded",U),Promise.resolve({payload:U.payload,contentTopic:U.contentTopic,version:U.version??void 0,timestamp:U.timestamp??void 0,meta:U.meta??void 0,rateLimitProof:U.rateLimitProof??void 0,ephemeral:U.ephemeral??!1})}async fromProtoObj(O,U){return U.version??0!==sp?(su("Failed to decode due to incorrect version, expected:",sp,", actual:",U.version),Promise.resolve(void 0)):new DecodedMessage(O,U)}};function createDecoder(O,U=sc){return new version_0_Decoder(U,O)}let sm="/relay-ping/1/ping/null",sy=nf("waku:keep-alive");let KeepAliveManager=class KeepAliveManager{pingKeepAliveTimers;relayKeepAliveTimers;options;relay;constructor(O,U){this.pingKeepAliveTimers=new Map,this.relayKeepAliveTimers=new Map,this.options=O,this.relay=U}start(O,U,$){this.stop(O);let{pingKeepAlive:J,relayKeepAlive:en}=this.options,es=O.toString();if(0!==J){let en=setInterval(()=>{(async()=>{let en;try{try{en=await U.ping(O),sy(`Ping succeeded (${es})`,en)}catch(O){sy(`Ping failed for peer (${es}). diff --git a/rln-js/_next/static/chunks/app/home/page-82ca4f4399f6aaa4.js b/rln-js/_next/static/chunks/app/home/page-46c41f335f6047ce.js similarity index 58% rename from rln-js/_next/static/chunks/app/home/page-82ca4f4399f6aaa4.js rename to rln-js/_next/static/chunks/app/home/page-46c41f335f6047ce.js index 73ec3c3..cc24f06 100644 --- a/rln-js/_next/static/chunks/app/home/page-82ca4f4399f6aaa4.js +++ b/rln-js/_next/static/chunks/app/home/page-46c41f335f6047ce.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{},function(n){n.O(0,[866,822,240,971,472,744],function(){return n(n.s=4280)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[951],{},function(n){n.O(0,[866,782,240,971,472,744],function(){return n(n.s=4280)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/app/layout-1e6746e653af2bee.js b/rln-js/_next/static/chunks/app/layout-1e6746e653af2bee.js deleted file mode 100644 index 522a56f..0000000 --- a/rln-js/_next/static/chunks/app/layout-1e6746e653af2bee.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{2659:function(e,n,t){Promise.resolve().then(t.t.bind(t,2489,23)),Promise.resolve().then(t.t.bind(t,1654,23))},2489:function(){},1654:function(e){e.exports={style:{fontFamily:"'__Inter_e66fe9', '__Inter_Fallback_e66fe9'",fontStyle:"normal"},className:"__className_e66fe9"}}},function(e){e.O(0,[971,472,744],function(){return e(e.s=2659)}),_N_E=e.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/app/layout-84f56937ba449acd.js b/rln-js/_next/static/chunks/app/layout-84f56937ba449acd.js new file mode 100644 index 0000000..461c4ce --- /dev/null +++ b/rln-js/_next/static/chunks/app/layout-84f56937ba449acd.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[185],{2659:function(n,e,t){Promise.resolve().then(t.t.bind(t,2489,23)),Promise.resolve().then(t.t.bind(t,1654,23))},2489:function(){},1654:function(n){n.exports={style:{fontFamily:"'__Inter_7632df', '__Inter_Fallback_7632df'",fontStyle:"normal"},className:"__className_7632df"}}},function(n){n.O(0,[971,472,744],function(){return n(n.s=2659)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/app/page-8d29b29e326404e2.js b/rln-js/_next/static/chunks/app/page-89096a90cb200ba2.js similarity index 58% rename from rln-js/_next/static/chunks/app/page-8d29b29e326404e2.js rename to rln-js/_next/static/chunks/app/page-89096a90cb200ba2.js index 00bc407..c9432dc 100644 --- a/rln-js/_next/static/chunks/app/page-8d29b29e326404e2.js +++ b/rln-js/_next/static/chunks/app/page-89096a90cb200ba2.js @@ -1 +1 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{},function(n){n.O(0,[866,822,240,971,472,744],function(){return n(n.s=4280)}),_N_E=n.O()}]); \ No newline at end of file +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[931],{},function(n){n.O(0,[866,782,240,971,472,744],function(){return n(n.s=4280)}),_N_E=n.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/main-1523e9fe9014a7c2.js b/rln-js/_next/static/chunks/main-1523e9fe9014a7c2.js new file mode 100644 index 0000000..85297cf --- /dev/null +++ b/rln-js/_next/static/chunks/main-1523e9fe9014a7c2.js @@ -0,0 +1 @@ +(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{4878:function(r,n){"use strict";function getDeploymentIdQueryOrEmptyString(){return""}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return getDeploymentIdQueryOrEmptyString}})},37:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var r=/\((.*)\)/.exec(this.toString());return r?r[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(r,n){return n=this.concat.apply([],this),r>1&&n.some(Array.isArray)?n.flat(r-1):n},Array.prototype.flatMap=function(r,n){return this.map(r,n).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(r){if("function"!=typeof r)return this.then(r,r);var n=this.constructor||Promise;return this.then(function(o){return n.resolve(r()).then(function(){return o})},function(o){return n.resolve(r()).then(function(){throw o})})}),Object.fromEntries||(Object.fromEntries=function(r){return Array.from(r).reduce(function(r,n){return r[n[0]]=n[1],r},{})}),Array.prototype.at||(Array.prototype.at=function(r){var n=Math.trunc(r)||0;if(n<0&&(n+=this.length),!(n<0||n>=this.length))return this[n]})},5864:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addBasePath",{enumerable:!0,get:function(){return addBasePath}});let l=o(3776),u=o(2955);function addBasePath(r,n){return(0,u.normalizePathTrailingSlash)((0,l.addPathPrefix)(r,"/rln-js"))}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2048:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addLocale",{enumerable:!0,get:function(){return addLocale}}),o(2955);let addLocale=function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),l=1;l25){window.location.reload();return}clearTimeout(n),n=setTimeout(init,u>5?5e3:1e3)}o&&o.close();let{hostname:s,port:d}=location,f=function(r){let n=location.protocol;try{n=new URL(r).protocol}catch(r){}return"http:"===n?"ws":"wss"}(r.assetPrefix||""),h=r.assetPrefix.replace(/^\/+/,""),g=f+"://"+s+":"+d+(h?"/"+h:"");h.startsWith("http")&&(g=f+"://"+h.split("://")[1]),(o=new window.WebSocket(""+g+r.path)).onopen=function(){u=0,window.console.log("[HMR] connected")},o.onerror=handleDisconnect,o.onclose=handleDisconnect,o.onmessage=function(r){let n=JSON.parse(r.data);for(let r of l)r(n)}}()}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5213:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"hasBasePath",{enumerable:!0,get:function(){return hasBasePath}});let l=o(6315);function hasBasePath(r){return(0,l.pathHasPrefix)(r,"/rln-js")}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4477:function(r,n){"use strict";let o;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{DOMAttributeNames:function(){return l},isEqualNode:function(){return isEqualNode},default:function(){return initHeadManager}});let l={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function reactElementToDOM(r){let{type:n,props:o}=r,u=document.createElement(n);for(let r in o){if(!o.hasOwnProperty(r)||"children"===r||"dangerouslySetInnerHTML"===r||void 0===o[r])continue;let s=l[r]||r.toLowerCase();"script"===n&&("async"===s||"defer"===s||"noModule"===s)?u[s]=!!o[r]:u.setAttribute(s,o[r])}let{children:s,dangerouslySetInnerHTML:d}=o;return d?u.innerHTML=d.__html||"":s&&(u.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):""),u}function isEqualNode(r,n){if(r instanceof HTMLElement&&n instanceof HTMLElement){let o=n.getAttribute("nonce");if(o&&!r.getAttribute("nonce")){let l=n.cloneNode(!0);return l.setAttribute("nonce",""),l.nonce=o,o===r.nonce&&r.isEqualNode(l)}}return r.isEqualNode(n)}function initHeadManager(){return{mountedInstances:new Set,updateHead:r=>{let n={};r.forEach(r=>{if("link"===r.type&&r.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+r.props["data-href"]+'"]'))return;r.props.href=r.props["data-href"],r.props["data-href"]=void 0}let o=n[r.type]||[];o.push(r),n[r.type]=o});let l=n.title?n.title[0]:null,u="";if(l){let{children:r}=l.props;u="string"==typeof r?r:Array.isArray(r)?r.join(""):""}u!==document.title&&(document.title=u),["meta","base","link","style","script"].forEach(r=>{o(r,n[r]||[])})}}}o=(r,n)=>{let o=document.getElementsByTagName("head")[0],l=o.querySelector("meta[name=next-head-count]"),u=Number(l.content),s=[];for(let n=0,o=l.previousElementSibling;n{for(let n=0,o=s.length;n{var n;return null==(n=r.parentNode)?void 0:n.removeChild(r)}),f.forEach(r=>o.insertBefore(r,l)),l.content=(u-s.length+f.length).toString()},("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},223:function(r,n,o){"use strict";let l,u,s,d,f,h,g,_,y,P,b,E;Object.defineProperty(n,"__esModule",{value:!0});let S=o(1757);Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{version:function(){return J},router:function(){return l},emitter:function(){return Z},initialize:function(){return initialize},hydrate:function(){return hydrate}});let R=o(8754);o(37);let w=R._(o(7294)),O=R._(o(745)),j=o(7768),A=R._(o(3745)),M=o(637),C=o(9987),I=o(8011),x=o(4828),N=o(510),L=o(1306),D=o(5091),k=R._(o(4477)),F=R._(o(7375)),U=R._(o(3129)),H=o(9513),B=o(4751),W=o(676),q=o(4955),z=o(7786),G=o(5213),V=o(1158),X=o(7178),Y=o(8197),K=R._(o(2565)),Q=R._(o(2295)),$=R._(o(6077)),J="13.5.6",Z=(0,A.default)(),looseToArray=r=>[].slice.call(r),ee=!1;let Container=class Container extends w.default.Component{componentDidCatch(r,n){this.props.fn(r,n)}componentDidMount(){this.scrollToHash(),l.isSsr&&(u.isFallback||u.nextExport&&((0,I.isDynamicRoute)(l.pathname)||location.search||ee)||u.props&&u.props.__N_SSG&&(location.search||ee))&&l.replace(l.pathname+"?"+String((0,x.assign)((0,x.urlQueryToSearchParams)(l.query),new URLSearchParams(location.search))),s,{_h:1,shallow:!u.isFallback&&!ee}).catch(r=>{if(!r.cancelled)throw r})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:r}=location;if(!(r=r&&r.substring(1)))return;let n=document.getElementById(r);n&&setTimeout(()=>n.scrollIntoView(),0)}render(){return this.props.children}};async function initialize(r){void 0===r&&(r={}),Q.default.onSpanEnd($.default),u=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=u,E=u.defaultLocale;let n=u.assetPrefix||"";if(self.__next_set_public_path__(""+n+"/_next/"),(0,N.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:u.runtimeConfig||{}}),s=(0,L.getURL)(),(0,G.hasBasePath)(s)&&(s=(0,z.removeBasePath)(s)),u.scriptLoader){let{initScriptLoader:r}=o(2288);r(u.scriptLoader)}d=new F.default(u.buildId,n);let register=r=>{let[n,o]=r;return d.routeLoader.onEntrypoint(n,o)};return window.__NEXT_P&&window.__NEXT_P.map(r=>setTimeout(()=>register(r),0)),window.__NEXT_P=[],window.__NEXT_P.push=register,(h=(0,k.default)()).getIsSsr=()=>l.isSsr,f=document.getElementById("__next"),{assetPrefix:n}}function renderApp(r,n){return w.default.createElement(r,n)}function AppContainer(r){var n;let{children:o}=r,u=w.default.useMemo(()=>(0,X.adaptForAppRouterInstance)(l),[]);return w.default.createElement(Container,{fn:r=>renderError({App:y,err:r}).catch(r=>console.error("Error rendering page: ",r))},w.default.createElement(V.AppRouterContext.Provider,{value:u},w.default.createElement(Y.SearchParamsContext.Provider,{value:(0,X.adaptForSearchParams)(l)},w.default.createElement(X.PathnameContextProviderAdapter,{router:l,isAutoExport:null!=(n=self.__NEXT_DATA__.autoExport)&&n},w.default.createElement(Y.PathParamsContext.Provider,{value:(0,X.adaptForPathParams)(l)},w.default.createElement(M.RouterContext.Provider,{value:(0,B.makePublicRouterInstance)(l)},w.default.createElement(j.HeadManagerContext.Provider,{value:h},w.default.createElement(q.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/rln-js/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}},o))))))))}let wrapApp=r=>n=>{let o={...n,Component:b,err:u.err,router:l};return w.default.createElement(AppContainer,null,renderApp(r,o))};function renderError(r){let{App:n,err:f}=r;return console.error(f),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),d.loadPage("/_error").then(l=>{let{page:u,styleSheets:s}=l;return(null==g?void 0:g.Component)===u?Promise.resolve().then(()=>S._(o(4570))).then(l=>Promise.resolve().then(()=>S._(o(8955))).then(o=>(n=o.default,r.App=n,l))).then(r=>({ErrorComponent:r.default,styleSheets:[]})):{ErrorComponent:u,styleSheets:s}}).then(o=>{var d;let{ErrorComponent:h,styleSheets:g}=o,_=wrapApp(n),y={Component:h,AppTree:_,router:l,ctx:{err:f,pathname:u.page,query:u.query,asPath:s,AppTree:_}};return Promise.resolve((null==(d=r.props)?void 0:d.err)?r.props:(0,L.loadGetInitialProps)(n,y)).then(n=>doRender({...r,err:f,Component:h,styleSheets:g,props:n}))})}function Head(r){let{callback:n}=r;return w.default.useLayoutEffect(()=>n(),[n]),null}let et={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},er={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},en=null,ea=!0;function clearMarks(){[et.beforeRender,et.afterHydrate,et.afterRender,et.routeChange].forEach(r=>performance.clearMarks(r))}function markHydrateComplete(){if(!L.ST)return;performance.mark(et.afterHydrate);let r=performance.getEntriesByName(et.beforeRender,"mark").length;r&&(performance.measure(er.beforeHydration,et.navigationStart,et.beforeRender),performance.measure(er.hydration,et.beforeRender,et.afterHydrate)),P&&performance.getEntriesByName(er.hydration).forEach(P),clearMarks()}function markRenderComplete(){if(!L.ST)return;performance.mark(et.afterRender);let r=performance.getEntriesByName(et.routeChange,"mark");if(!r.length)return;let n=performance.getEntriesByName(et.beforeRender,"mark").length;n&&(performance.measure(er.routeChangeToRender,r[0].name,et.beforeRender),performance.measure(er.render,et.beforeRender,et.afterRender),P&&(performance.getEntriesByName(er.render).forEach(P),performance.getEntriesByName(er.routeChangeToRender).forEach(P))),clearMarks(),[er.routeChangeToRender,er.render].forEach(r=>performance.clearMeasures(r))}function Root(r){let{callbacks:n,children:o}=r;return w.default.useLayoutEffect(()=>n.forEach(r=>r()),[n]),w.default.useEffect(()=>{(0,U.default)(P)},[]),o}function doRender(r){let n,{App:o,Component:u,props:s,err:d}=r,h="initial"in r?void 0:r.styleSheets;u=u||g.Component,s=s||g.props;let y={...s,Component:u,err:d,router:l};g=y;let P=!1,b=new Promise((r,o)=>{_&&_(),n=()=>{_=null,r()},_=()=>{P=!0,_=null;let r=Error("Cancel rendering route");r.cancelled=!0,o(r)}});function onRootCommit(){n()}!function(){if(!h)return;let r=looseToArray(document.querySelectorAll("style[data-n-href]")),n=new Set(r.map(r=>r.getAttribute("data-n-href"))),o=document.querySelector("noscript[data-n-css]"),l=null==o?void 0:o.getAttribute("data-n-css");h.forEach(r=>{let{href:o,text:u}=r;if(!n.has(o)){let r=document.createElement("style");r.setAttribute("data-n-href",o),r.setAttribute("media","x"),l&&r.setAttribute("nonce",l),document.head.appendChild(r),r.appendChild(document.createTextNode(u))}})}();let E=w.default.createElement(w.default.Fragment,null,w.default.createElement(Head,{callback:function(){if(h&&!P){let r=new Set(h.map(r=>r.href)),n=looseToArray(document.querySelectorAll("style[data-n-href]")),o=n.map(r=>r.getAttribute("data-n-href"));for(let l=0;l{let{href:n}=r,o=document.querySelector('style[data-n-href="'+n+'"]');o&&(l.parentNode.insertBefore(o,l.nextSibling),l=o)}),looseToArray(document.querySelectorAll("link[data-n-p]")).forEach(r=>{r.parentNode.removeChild(r)})}if(r.scroll){let{x:n,y:o}=r.scroll;(0,C.handleSmoothScroll)(()=>{window.scrollTo(n,o)})}}}),w.default.createElement(AppContainer,null,renderApp(o,y),w.default.createElement(D.Portal,{type:"next-route-announcer"},w.default.createElement(H.RouteAnnouncer,null))));return!function(r,n){L.ST&&performance.mark(et.beforeRender);let o=n(ea?markHydrateComplete:markRenderComplete);if(en){let r=w.default.startTransition;r(()=>{en.render(o)})}else en=O.default.hydrateRoot(r,o,{onRecoverableError:K.default}),ea=!1}(f,r=>w.default.createElement(Root,{callbacks:[r,onRootCommit]},E)),b}async function render(r){if(r.err){await renderError(r);return}try{await doRender(r)}catch(o){let n=(0,W.getProperError)(o);if(n.cancelled)throw n;await renderError({...r,err:n})}}async function hydrate(r){let n=u.err;try{let r=await d.routeLoader.whenEntrypoint("/_app");if("error"in r)throw r.error;let{component:n,exports:o}=r;y=n,o&&o.reportWebVitals&&(P=r=>{let n,{id:l,name:u,startTime:s,value:d,duration:f,entryType:h,entries:g,attribution:_}=r,y=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);g&&g.length&&(n=g[0].startTime);let P={id:l||y,name:u,startTime:s||n,value:null==d?f:d,label:"mark"===h||"measure"===h?"custom":"web-vital"};_&&(P.attribution=_),o.reportWebVitals(P)});let l=await d.routeLoader.whenEntrypoint(u.page);if("error"in l)throw l.error;b=l.component}catch(r){n=(0,W.getProperError)(r)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(u.dynamicIds),l=(0,B.createRouter)(u.page,u.query,s,{initialProps:u.props,pageLoader:d,App:y,Component:b,wrapApp,err:n,isFallback:!!u.isFallback,subscription:(r,n,o)=>render(Object.assign({},r,{App:n,scroll:o})),locale:u.locale,locales:u.locales,defaultLocale:E,domainLocales:u.domainLocales,isPreview:u.isPreview}),ee=await l._initialMatchesMiddlewarePromise;let o={App:y,initial:!0,Component:b,props:u.props,err:n};(null==r?void 0:r.beforeRender)&&await r.beforeRender(),render(o)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},6653:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),o(1867);let l=o(223);window.next={version:l.version,get router(){return l.router},emitter:l.emitter},(0,l.initialize)({}).then(()=>(0,l.hydrate)()).catch(console.error),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return normalizePathTrailingSlash}});let l=o(6082),u=o(891),normalizePathTrailingSlash=r=>{if(!r.startsWith("/"))return r;let{pathname:n,query:o,hash:s}=(0,u.parsePath)(r);return""+(0,l.removeTrailingSlash)(n)+o+s};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2565:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return onRecoverableError}});let l=o(4600);function onRecoverableError(r){let n="function"==typeof reportError?reportError:r=>{window.console.error(r)};r.digest!==l.NEXT_DYNAMIC_NO_SSR_CODE&&n(r)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7375:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return PageLoader}});let l=o(8754),u=o(5864),s=o(9381),d=l._(o(8052)),f=o(2048),h=o(8011),g=o(9823),_=o(6082),y=o(7159);o(729);let PageLoader=class PageLoader{getPageList(){return(0,y.getClientBuildManifest)().then(r=>r.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(r){let{asPath:n,href:o,locale:l}=r,{pathname:y,query:P,search:b}=(0,g.parseRelativeUrl)(o),{pathname:E}=(0,g.parseRelativeUrl)(n),S=(0,_.removeTrailingSlash)(y);if("/"!==S[0])throw Error('Route name should start with a "/", got "'+S+'"');return(r=>{let n=(0,d.default)((0,_.removeTrailingSlash)((0,f.addLocale)(r,l)),".json");return(0,u.addBasePath)("/_next/data/"+this.buildId+n+b,!0)})(r.skipInterpolation?E:(0,h.isDynamicRoute)(S)?(0,s.interpolateAs)(y,E,P).result:S)}_isSsg(r){return this.promisedSsgManifest.then(n=>n.has(r))}loadPage(r){return this.routeLoader.loadRoute(r).then(r=>{if("component"in r)return{page:r.component,mod:r.exports,styleSheets:r.styles.map(r=>({href:r.href,text:r.content}))};throw r.error})}prefetch(r){return this.routeLoader.prefetch(r)}constructor(r,n){this.routeLoader=(0,y.createRouteLoader)(n),this.buildId=r,this.assetPrefix=n,this.promisedSsgManifest=new Promise(r=>{window.__SSG_MANIFEST?r(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{r(window.__SSG_MANIFEST)}})}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3129:function(r,n,o){"use strict";let l;Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return _default}});let u=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let s=!1;function onReport(r){l&&l(r)}let _default=r=>{if(l=r,!s)for(let r of(s=!0,u))try{let n;n||(n=o(8018)),n["on"+r](onReport)}catch(n){console.warn("Failed to track "+r+" web-vital",n)}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5091:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Portal",{enumerable:!0,get:function(){return Portal}});let l=o(7294),u=o(3935),Portal=r=>{let{children:n,type:o}=r,[s,d]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let r=document.createElement(o);return document.body.appendChild(r),d(r),()=>{document.body.removeChild(r)}},[o]),s?(0,u.createPortal)(n,s):null};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7786:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeBasePath",{enumerable:!0,get:function(){return removeBasePath}}),o(5213);let l="/rln-js";function removeBasePath(r){return 0===l.length||(r=r.slice(l.length)).startsWith("/")||(r="/"+r),r}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3099:function(r,n,o){"use strict";function removeLocale(r,n){return r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeLocale",{enumerable:!0,get:function(){return removeLocale}}),o(891),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3767:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{requestIdleCallback:function(){return o},cancelIdleCallback:function(){return l}});let o="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(r){let n=Date.now();return self.setTimeout(function(){r({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},l="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(r){return clearTimeout(r)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4785:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"resolveHref",{enumerable:!0,get:function(){return resolveHref}});let l=o(4828),u=o(3833),s=o(9302),d=o(1306),f=o(2955),h=o(4131),g=o(1232),_=o(9381);function resolveHref(r,n,o){let y;let P="string"==typeof n?n:(0,u.formatWithValidation)(n),b=P.match(/^[a-zA-Z]{1,}:\/\//),E=b?P.slice(b[0].length):P,S=E.split("?");if((S[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+P+"' passed to next/router in page: '"+r.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let n=(0,d.normalizeRepeatedSlashes)(E);P=(b?b[0]:"")+n}if(!(0,h.isLocalURL)(P))return o?[P]:P;try{y=new URL(P.startsWith("#")?r.asPath:r.pathname,"http://n")}catch(r){y=new URL("/","http://n")}try{let r=new URL(P,y);r.pathname=(0,f.normalizePathTrailingSlash)(r.pathname);let n="";if((0,g.isDynamicRoute)(r.pathname)&&r.searchParams&&o){let o=(0,l.searchParamsToUrlQuery)(r.searchParams),{result:d,params:f}=(0,_.interpolateAs)(r.pathname,r.pathname,o);d&&(n=(0,u.formatWithValidation)({pathname:d,hash:r.hash,query:(0,s.omit)(o,f)}))}let d=r.origin===y.origin?r.href.slice(r.origin.length):r.href;return o?[d,n||d]:d}catch(r){return o?[P]:P}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},9513:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{RouteAnnouncer:function(){return RouteAnnouncer},default:function(){return f}});let l=o(8754),u=l._(o(7294)),s=o(4751),d={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},RouteAnnouncer=()=>{let{asPath:r}=(0,s.useRouter)(),[n,o]=u.default.useState(""),l=u.default.useRef(r);return u.default.useEffect(()=>{if(l.current!==r){if(l.current=r,document.title)o(document.title);else{var n;let l=document.querySelector("h1"),u=null!=(n=null==l?void 0:l.innerText)?n:null==l?void 0:l.textContent;o(u||r)}}},[r]),u.default.createElement("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:d},n)},f=RouteAnnouncer;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7159:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{markAssetError:function(){return markAssetError},isAssetError:function(){return isAssetError},getClientBuildManifest:function(){return getClientBuildManifest},createRouteLoader:function(){return createRouteLoader}}),o(8754),o(8052);let l=o(4581),u=o(3767),s=o(4878);function withFuture(r,n,o){let l,u=n.get(r);if(u)return"future"in u?u.future:Promise.resolve(u);let s=new Promise(r=>{l=r});return n.set(r,u={resolve:l,future:s}),o?o().then(r=>(l(r),r)).catch(o=>{throw n.delete(r),o}):s}let d=Symbol("ASSET_LOAD_ERROR");function markAssetError(r){return Object.defineProperty(r,d,{})}function isAssetError(r){return r&&d in r}let f=function(r){try{return r=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||r.relList.supports("prefetch")}catch(r){return!1}}(),getAssetQueryString=()=>(0,s.getDeploymentIdQueryOrEmptyString)();function resolvePromiseWithTimeout(r,n,o){return new Promise((l,s)=>{let d=!1;r.then(r=>{d=!0,l(r)}).catch(s),(0,u.requestIdleCallback)(()=>setTimeout(()=>{d||s(o)},n))})}function getClientBuildManifest(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);let r=new Promise(r=>{let n=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{r(self.__BUILD_MANIFEST),n&&n()}});return resolvePromiseWithTimeout(r,3800,markAssetError(Error("Failed to load client build manifest")))}function getFilesForRoute(r,n){return getClientBuildManifest().then(o=>{if(!(n in o))throw markAssetError(Error("Failed to lookup route: "+n));let u=o[n].map(n=>r+"/_next/"+encodeURI(n));return{scripts:u.filter(r=>r.endsWith(".js")).map(r=>(0,l.__unsafeCreateTrustedScriptURL)(r)+getAssetQueryString()),css:u.filter(r=>r.endsWith(".css")).map(r=>r+getAssetQueryString())}})}function createRouteLoader(r){let n=new Map,o=new Map,l=new Map,s=new Map;function maybeExecuteScript(r){{var n;let l=o.get(r.toString());return l||(document.querySelector('script[src^="'+r+'"]')?Promise.resolve():(o.set(r.toString(),l=new Promise((o,l)=>{(n=document.createElement("script")).onload=o,n.onerror=()=>l(markAssetError(Error("Failed to load script: "+r))),n.crossOrigin=void 0,n.src=r,document.body.appendChild(n)})),l))}}function fetchStyleSheet(r){let n=l.get(r);return n||l.set(r,n=fetch(r).then(n=>{if(!n.ok)throw Error("Failed to load stylesheet: "+r);return n.text().then(n=>({href:r,content:n}))}).catch(r=>{throw markAssetError(r)})),n}return{whenEntrypoint:r=>withFuture(r,n),onEntrypoint(r,o){(o?Promise.resolve().then(()=>o()).then(r=>({component:r&&r.default||r,exports:r}),r=>({error:r})):Promise.resolve(void 0)).then(o=>{let l=n.get(r);l&&"resolve"in l?o&&(n.set(r,o),l.resolve(o)):(o?n.set(r,o):n.delete(r),s.delete(r))})},loadRoute(o,l){return withFuture(o,s,()=>{let u;return resolvePromiseWithTimeout(getFilesForRoute(r,o).then(r=>{let{scripts:l,css:u}=r;return Promise.all([n.has(o)?[]:Promise.all(l.map(maybeExecuteScript)),Promise.all(u.map(fetchStyleSheet))])}).then(r=>this.whenEntrypoint(o).then(n=>({entrypoint:n,styles:r[1]}))),3800,markAssetError(Error("Route did not complete loading: "+o))).then(r=>{let{entrypoint:n,styles:o}=r,l=Object.assign({styles:o},n);return"error"in n?n:l}).catch(r=>{if(l)throw r;return{error:r}}).finally(()=>null==u?void 0:u())})},prefetch(n){let o;return(o=navigator.connection)&&(o.saveData||/2g/.test(o.effectiveType))?Promise.resolve():getFilesForRoute(r,n).then(r=>Promise.all(f?r.scripts.map(r=>{var n,o,l;return n=r.toString(),o="script",new Promise((r,u)=>{let s='\n link[rel="prefetch"][href^="'+n+'"],\n link[rel="preload"][href^="'+n+'"],\n script[src^="'+n+'"]';if(document.querySelector(s))return r();l=document.createElement("link"),o&&(l.as=o),l.rel="prefetch",l.crossOrigin=void 0,l.onload=r,l.onerror=()=>u(markAssetError(Error("Failed to prefetch: "+n))),l.href=n,document.head.appendChild(l)})}):[])).then(()=>{(0,u.requestIdleCallback)(()=>this.loadRoute(n,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4751:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{Router:function(){return s.default},default:function(){return P},withRouter:function(){return h.default},useRouter:function(){return useRouter},createRouter:function(){return createRouter},makePublicRouterInstance:function(){return makePublicRouterInstance}});let l=o(8754),u=l._(o(7294)),s=l._(o(7797)),d=o(637),f=l._(o(676)),h=l._(o(7727)),g={router:null,readyCallbacks:[],ready(r){if(this.router)return r();this.readyCallbacks.push(r)}},_=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],y=["push","replace","reload","back","prefetch","beforePopState"];function getRouter(){if(!g.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return g.router}Object.defineProperty(g,"events",{get:()=>s.default.events}),_.forEach(r=>{Object.defineProperty(g,r,{get(){let n=getRouter();return n[r]}})}),y.forEach(r=>{g[r]=function(){for(var n=arguments.length,o=Array(n),l=0;l{g.ready(()=>{s.default.events.on(r,function(){for(var n=arguments.length,o=Array(n),l=0;lr()),g.readyCallbacks=[],g.router}function makePublicRouterInstance(r){let n={};for(let o of _){if("object"==typeof r[o]){n[o]=Object.assign(Array.isArray(r[o])?[]:{},r[o]);continue}n[o]=r[o]}return n.events=s.default.events,y.forEach(o=>{n[o]=function(){for(var n=arguments.length,l=Array(n),u=0;u{if(s.default.preinit){r.forEach(r=>{s.default.preinit(r,{as:"style"})});return}{let n=document.head;r.forEach(r=>{let o=document.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=r,n.appendChild(o)})}},loadScript=r=>{let{src:n,id:o,onLoad:l=()=>{},onReady:u=null,dangerouslySetInnerHTML:s,children:d="",strategy:f="afterInteractive",onError:g,stylesheets:b}=r,E=o||n;if(E&&y.has(E))return;if(_.has(n)){y.add(E),_.get(n).then(l,g);return}let afterLoad=()=>{u&&u(),y.add(E)},S=document.createElement("script"),R=new Promise((r,n)=>{S.addEventListener("load",function(n){r(),l&&l.call(this,n),afterLoad()}),S.addEventListener("error",function(r){n(r)})}).catch(function(r){g&&g(r)});for(let[o,l]of(s?(S.innerHTML=s.__html||"",afterLoad()):d?(S.textContent="string"==typeof d?d:Array.isArray(d)?d.join(""):"",afterLoad()):n&&(S.src=n,_.set(n,R)),Object.entries(r))){if(void 0===l||P.includes(o))continue;let r=h.DOMAttributeNames[o]||o.toLowerCase();S.setAttribute(r,l)}"worker"===f&&S.setAttribute("type","text/partytown"),S.setAttribute("data-nscript",f),b&&insertStylesheets(b),document.body.appendChild(S)};function handleClientScriptLoad(r){let{strategy:n="afterInteractive"}=r;"lazyOnload"===n?window.addEventListener("load",()=>{(0,g.requestIdleCallback)(()=>loadScript(r))}):loadScript(r)}function initScriptLoader(r){r.forEach(handleClientScriptLoad),function(){let r=[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')];r.forEach(r=>{let n=r.id||r.getAttribute("src");y.add(n)})}()}function Script(r){let{id:n,src:o="",onLoad:l=()=>{},onReady:u=null,strategy:h="afterInteractive",onError:_,stylesheets:P,...b}=r,{updateScripts:E,scripts:S,getIsSsr:R,appDir:w,nonce:O}=(0,d.useContext)(f.HeadManagerContext),j=(0,d.useRef)(!1);(0,d.useEffect)(()=>{let r=n||o;j.current||(u&&r&&y.has(r)&&u(),j.current=!0)},[u,n,o]);let A=(0,d.useRef)(!1);if((0,d.useEffect)(()=>{!A.current&&("afterInteractive"===h?loadScript(r):"lazyOnload"===h&&("complete"===document.readyState?(0,g.requestIdleCallback)(()=>loadScript(r)):window.addEventListener("load",()=>{(0,g.requestIdleCallback)(()=>loadScript(r))})),A.current=!0)},[r,h]),("beforeInteractive"===h||"worker"===h)&&(E?(S[h]=(S[h]||[]).concat([{id:n,src:o,onLoad:l,onReady:u,onError:_,...b}]),E(S)):R&&R()?y.add(n||o):R&&!R()&&loadScript(r)),w){if(P&&P.forEach(r=>{s.default.preinit(r,{as:"style"})}),"beforeInteractive"===h)return o?(s.default.preload(o,b.integrity?{as:"script",integrity:b.integrity}:{as:"script"}),d.default.createElement("script",{nonce:O,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([o])+")"}})):(b.dangerouslySetInnerHTML&&(b.children=b.dangerouslySetInnerHTML.__html,delete b.dangerouslySetInnerHTML),d.default.createElement("script",{nonce:O,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...b}])+")"}}));"afterInteractive"===h&&o&&s.default.preload(o,b.integrity?{as:"script",integrity:b.integrity}:{as:"script"})}return null}Object.defineProperty(Script,"__nextScript",{value:!0});let b=Script;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},6077:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return reportToSocket}});let l=o(6948);function reportToSocket(r){if("ended"!==r.state.state)throw Error("Expected span to be ended");(0,l.sendMessage)(JSON.stringify({event:"span-end",startTime:r.startTime,endTime:r.state.endTime,spanName:r.name,attributes:r.attributes}))}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2295:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(3745));let Span=class Span{end(r){if("ended"===this.state.state)throw Error("Span has already ended");this.state={state:"ended",endTime:null!=r?r:Date.now()},this.onSpanEnd(this)}constructor(r,n,o){var l,u;this.name=r,this.attributes=null!=(l=n.attributes)?l:{},this.startTime=null!=(u=n.startTime)?u:Date.now(),this.onSpanEnd=o,this.state={state:"inprogress"}}};let s=new class{startSpan(r,n){return new Span(r,n,this.handleSpanEnd)}onSpanEnd(r){return this._emitter.on("spanend",r),()=>{this._emitter.off("spanend",r)}}constructor(){this._emitter=(0,u.default)(),this.handleSpanEnd=r=>{this._emitter.emit("spanend",r)}}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4581:function(r,n){"use strict";let o;function __unsafeCreateTrustedScriptURL(r){var n;return(null==(n=function(){if(void 0===o){var r;o=(null==(r=window.trustedTypes)?void 0:r.createPolicy("nextjs",{createHTML:r=>r,createScript:r=>r,createScriptURL:r=>r}))||null}return o}())?void 0:n.createScriptURL(r))||r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return __unsafeCreateTrustedScriptURL}}),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},1867:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),o(4878),self.__next_set_public_path__=r=>{o.p=r},("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7727:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return withRouter}});let l=o(8754),u=l._(o(7294)),s=o(4751);function withRouter(r){function WithRouterWrapper(n){return u.default.createElement(r,{router:(0,s.useRouter)(),...n})}return WithRouterWrapper.getInitialProps=r.getInitialProps,WithRouterWrapper.origGetInitialProps=r.origGetInitialProps,WithRouterWrapper}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},8955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return App}});let l=o(8754),u=l._(o(7294)),s=o(1306);async function appGetInitialProps(r){let{Component:n,ctx:o}=r,l=await (0,s.loadGetInitialProps)(n,o);return{pageProps:l}}let App=class App extends u.default.Component{render(){let{Component:r,pageProps:n}=this.props;return u.default.createElement(r,n)}};App.origGetInitialProps=appGetInitialProps,App.getInitialProps=appGetInitialProps,("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4570:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return Error}});let l=o(8754),u=l._(o(7294)),s=l._(o(46)),d={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function _getInitialProps(r){let{res:n,err:o}=r,l=n&&n.statusCode?n.statusCode:o?o.statusCode:404;return{statusCode:l}}let f={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};let Error=class Error extends u.default.Component{render(){let{statusCode:r,withDarkMode:n=!0}=this.props,o=this.props.title||d[r]||"An unexpected error has occurred";return u.default.createElement("div",{style:f.error},u.default.createElement(s.default,null,u.default.createElement("title",null,r?r+": "+o:"Application error: a client-side exception has occurred")),u.default.createElement("div",{style:f.desc},u.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(n?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),r?u.default.createElement("h1",{className:"next-error-h1",style:f.h1},r):null,u.default.createElement("div",{style:f.wrap},u.default.createElement("h2",{style:f.h2},this.props.title||r?o:u.default.createElement(u.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}};Error.displayName="ErrorPage",Error.getInitialProps=_getInitialProps,Error.origGetInitialProps=_getInitialProps,("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5938:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AmpStateContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext({})},8926:function(r,n){"use strict";function isInAmpMode(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:l=!1}=void 0===r?{}:r;return n||o&&l}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},1158:function(r,n,o){"use strict";var l,u;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{CacheStates:function(){return l},AppRouterContext:function(){return f},LayoutRouterContext:function(){return h},GlobalLayoutRouterContext:function(){return g},TemplateContext:function(){return _}});let s=o(8754),d=s._(o(7294));(u=l||(l={})).LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY";let f=d.default.createContext(null),h=d.default.createContext(null),g=d.default.createContext(null),_=d.default.createContext(null)},1403:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BloomFilter",{enumerable:!0,get:function(){return BloomFilter}});let BloomFilter=class BloomFilter{static from(r,n){void 0===n&&(n=.01);let o=new BloomFilter(r.length,n);for(let n of r)o.add(n);return o}export(){let r={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};return r}import(r){this.numItems=r.numItems,this.errorRate=r.errorRate,this.numBits=r.numBits,this.numHashes=r.numHashes,this.bitArray=r.bitArray}add(r){let n=this.getHashValues(r);n.forEach(r=>{this.bitArray[r]=1})}contains(r){let n=this.getHashValues(r);return n.every(r=>this.bitArray[r])}getHashValues(r){let n=[];for(let o=1;o<=this.numHashes;o++){let l=function(r){let n=0;for(let o=0;o>>13,n=Math.imul(n,1540483477)}return n>>>0}(""+r+o)%this.numBits;n.push(l)}return n}constructor(r,n){this.numItems=r,this.errorRate=n,this.numBits=Math.ceil(-(r*Math.log(n))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/r*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},729:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{MODERN_BROWSERSLIST_TARGET:function(){return u.default},COMPILER_NAMES:function(){return s},INTERNAL_HEADERS:function(){return d},COMPILER_INDEXES:function(){return f},PHASE_EXPORT:function(){return h},PHASE_PRODUCTION_BUILD:function(){return g},PHASE_PRODUCTION_SERVER:function(){return _},PHASE_DEVELOPMENT_SERVER:function(){return y},PHASE_TEST:function(){return P},PHASE_INFO:function(){return b},PAGES_MANIFEST:function(){return E},APP_PATHS_MANIFEST:function(){return S},APP_PATH_ROUTES_MANIFEST:function(){return R},BUILD_MANIFEST:function(){return w},APP_BUILD_MANIFEST:function(){return O},FUNCTIONS_CONFIG_MANIFEST:function(){return j},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return A},NEXT_FONT_MANIFEST:function(){return M},EXPORT_MARKER:function(){return C},EXPORT_DETAIL:function(){return I},PRERENDER_MANIFEST:function(){return x},ROUTES_MANIFEST:function(){return N},IMAGES_MANIFEST:function(){return L},SERVER_FILES_MANIFEST:function(){return D},DEV_CLIENT_PAGES_MANIFEST:function(){return k},MIDDLEWARE_MANIFEST:function(){return F},DEV_MIDDLEWARE_MANIFEST:function(){return U},REACT_LOADABLE_MANIFEST:function(){return H},FONT_MANIFEST:function(){return B},SERVER_DIRECTORY:function(){return W},CONFIG_FILES:function(){return q},BUILD_ID_FILE:function(){return z},BLOCKED_PAGES:function(){return G},CLIENT_PUBLIC_FILES_PATH:function(){return V},CLIENT_STATIC_FILES_PATH:function(){return X},STRING_LITERAL_DROP_BUNDLE:function(){return Y},NEXT_BUILTIN_DOCUMENT:function(){return K},BARREL_OPTIMIZATION_PREFIX:function(){return Q},CLIENT_REFERENCE_MANIFEST:function(){return $},SERVER_REFERENCE_MANIFEST:function(){return J},MIDDLEWARE_BUILD_MANIFEST:function(){return Z},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return et},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return er},APP_CLIENT_INTERNALS:function(){return en},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return ea},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return eo},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ei},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return el},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return eu},EDGE_RUNTIME_WEBPACK:function(){return es},TEMPORARY_REDIRECT_STATUS:function(){return ec},PERMANENT_REDIRECT_STATUS:function(){return ed},STATIC_PROPS_ID:function(){return ef},SERVER_PROPS_ID:function(){return ep},PAGE_SEGMENT_KEY:function(){return eh},GOOGLE_FONT_PROVIDER:function(){return em},OPTIMIZED_FONT_PROVIDERS:function(){return eg},DEFAULT_SERIF_FONT:function(){return e_},DEFAULT_SANS_SERIF_FONT:function(){return ey},STATIC_STATUS_PAGES:function(){return eP},TRACE_OUTPUT_VERSION:function(){return ev},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return eb},RSC_MODULE_TYPES:function(){return eE},EDGE_UNSUPPORTED_NODE_APIS:function(){return eS},SYSTEM_ENTRYPOINTS:function(){return eR}});let l=o(8754),u=l._(o(1329)),s={client:"client",server:"server",edgeServer:"edge-server"},d=["x-invoke-path","x-invoke-status","x-invoke-error","x-invoke-query","x-middleware-invoke"],f={[s.client]:0,[s.server]:1,[s.edgeServer]:2},h="phase-export",g="phase-production-build",_="phase-production-server",y="phase-development-server",P="phase-test",b="phase-info",E="pages-manifest.json",S="app-paths-manifest.json",R="app-path-routes-manifest.json",w="build-manifest.json",O="app-build-manifest.json",j="functions-config-manifest.json",A="subresource-integrity-manifest",M="next-font-manifest",C="export-marker.json",I="export-detail.json",x="prerender-manifest.json",N="routes-manifest.json",L="images-manifest.json",D="required-server-files.json",k="_devPagesManifest.json",F="middleware-manifest.json",U="_devMiddlewareManifest.json",H="react-loadable-manifest.json",B="font-manifest.json",W="server",q=["next.config.js","next.config.mjs"],z="BUILD_ID",G=["/_document","/_app","/_error"],V="public",X="static",Y="__NEXT_DROP_CLIENT_FILE__",K="__NEXT_BUILTIN_DOCUMENT__",Q="__barrel_optimize__",$="client-reference-manifest",J="server-reference-manifest",Z="middleware-build-manifest",ee="middleware-react-loadable-manifest",et="main",er=""+et+"-app",en="app-pages-internals",ea="react-refresh",eo="amp",ei="webpack",el="polyfills",eu=Symbol(el),es="edge-runtime-webpack",ec=307,ed=308,ef="__N_SSG",ep="__N_SSP",eh="__PAGE__",em="https://fonts.googleapis.com/",eg=[{url:em,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],e_={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},ey={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},eP=["/500"],ev=1,eb=6e3,eE={client:"client",server:"server"},eS=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eR=new Set([et,ea,eo,er]);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4125:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"escapeStringRegexp",{enumerable:!0,get:function(){return escapeStringRegexp}});let o=/[|\\{}()[\]^$+*?.-]/,l=/[|\\{}()[\]^$+*?.-]/g;function escapeStringRegexp(r){return o.test(r)?r.replace(l,"\\$&"):r}},7768:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"HeadManagerContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext({})},46:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{defaultHead:function(){return defaultHead},default:function(){return _default}});let l=o(8754),u=o(1757),s=u._(o(7294)),d=l._(o(3632)),f=o(5938),h=o(7768),g=o(8926);function defaultHead(r){void 0===r&&(r=!1);let n=[s.default.createElement("meta",{charSet:"utf-8"})];return r||n.push(s.default.createElement("meta",{name:"viewport",content:"width=device-width"})),n}function onlyReactElement(r,n){return"string"==typeof n||"number"==typeof n?r:n.type===s.default.Fragment?r.concat(s.default.Children.toArray(n.props.children).reduce((r,n)=>"string"==typeof n||"number"==typeof n?r:r.concat(n),[])):r.concat(n)}o(9941);let _=["name","httpEquiv","charSet","itemProp"];function reduceComponents(r,n){let{inAmpMode:o}=n;return r.reduce(onlyReactElement,[]).reverse().concat(defaultHead(o).reverse()).filter(function(){let r=new Set,n=new Set,o=new Set,l={};return u=>{let s=!0,d=!1;if(u.key&&"number"!=typeof u.key&&u.key.indexOf("$")>0){d=!0;let n=u.key.slice(u.key.indexOf("$")+1);r.has(n)?s=!1:r.add(n)}switch(u.type){case"title":case"base":n.has(u.type)?s=!1:n.add(u.type);break;case"meta":for(let r=0,n=_.length;r{let l=r.key||n;if(!o&&"link"===r.type&&r.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(n=>r.props.href.startsWith(n))){let n={...r.props||{}};return n["data-href"]=n.href,n.href=void 0,n["data-optimized-fonts"]=!0,s.default.cloneElement(r,n)}return s.default.cloneElement(r,{key:l})})}let _default=function(r){let{children:n}=r,o=(0,s.useContext)(f.AmpStateContext),l=(0,s.useContext)(h.HeadManagerContext);return s.default.createElement(d.default,{reduceComponentsToState:reduceComponents,headManager:l,inAmpMode:(0,g.isInAmpMode)(o)},n)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},8197:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{SearchParamsContext:function(){return u},PathnameContext:function(){return s},PathParamsContext:function(){return d}});let l=o(7294),u=(0,l.createContext)(null),s=(0,l.createContext)(null),d=(0,l.createContext)(null)},4656:function(r,n){"use strict";function normalizeLocalePath(r,n){let o;let l=r.split("/");return(n||[]).some(n=>!!l[1]&&l[1].toLowerCase()===n.toLowerCase()&&(o=n,l.splice(1,1),r=l.join("/")||"/",!0)),{pathname:r,detectedLocale:o}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizeLocalePath",{enumerable:!0,get:function(){return normalizeLocalePath}})},4955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return d}});let l=o(8754),u=l._(o(7294)),s=o(7599),d=u.default.createContext(s.imageConfigDefault)},7599:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{VALID_LOADERS:function(){return o},imageConfigDefault:function(){return l}});let o=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},9942:function(r,n){"use strict";function getObjectClassLabel(r){return Object.prototype.toString.call(r)}function isPlainObject(r){if("[object Object]"!==getObjectClassLabel(r))return!1;let n=Object.getPrototypeOf(r);return null===n||n.hasOwnProperty("isPrototypeOf")}Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getObjectClassLabel:function(){return getObjectClassLabel},isPlainObject:function(){return isPlainObject}})},4600:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return o}});let o="NEXT_DYNAMIC_NO_SSR_CODE"},3745:function(r,n){"use strict";function mitt(){let r=Object.create(null);return{on(n,o){(r[n]||(r[n]=[])).push(o)},off(n,o){r[n]&&r[n].splice(r[n].indexOf(o)>>>0,1)},emit(n){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{r(...l)})}}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return mitt}})},1329:function(r){"use strict";r.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},8902:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"denormalizePagePath",{enumerable:!0,get:function(){return denormalizePagePath}});let l=o(1232),u=o(7932);function denormalizePagePath(r){let n=(0,u.normalizePathSep)(r);return n.startsWith("/index/")&&!(0,l.isDynamicRoute)(n)?n.slice(6):"/index"!==n?n:"/"}},3029:function(r,n){"use strict";function ensureLeadingSlash(r){return r.startsWith("/")?r:"/"+r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ensureLeadingSlash",{enumerable:!0,get:function(){return ensureLeadingSlash}})},7932:function(r,n){"use strict";function normalizePathSep(r){return r.replace(/\\/g,"/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizePathSep",{enumerable:!0,get:function(){return normalizePathSep}})},637:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext(null)},7178:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{adaptForAppRouterInstance:function(){return adaptForAppRouterInstance},adaptForSearchParams:function(){return adaptForSearchParams},adaptForPathParams:function(){return adaptForPathParams},PathnameContextProviderAdapter:function(){return PathnameContextProviderAdapter}});let l=o(1757),u=l._(o(7294)),s=o(8197),d=o(1232),f=o(2391),h=o(8300);function adaptForAppRouterInstance(r){return{back(){r.back()},forward(){r.forward()},refresh(){r.reload()},push(n,o){let{scroll:l}=void 0===o?{}:o;r.push(n,void 0,{scroll:l})},replace(n,o){let{scroll:l}=void 0===o?{}:o;r.replace(n,void 0,{scroll:l})},prefetch(n){r.prefetch(n)}}}function adaptForSearchParams(r){return r.isReady&&r.query?(0,f.asPathToSearchParams)(r.asPath):new URLSearchParams}function adaptForPathParams(r){if(!r.isReady||!r.query)return null;let n={},o=(0,h.getRouteRegex)(r.pathname),l=Object.keys(o.groups);for(let o of l)n[o]=r.query[o];return n}function PathnameContextProviderAdapter(r){let{children:n,router:o,...l}=r,f=(0,u.useRef)(l.isAutoExport),h=(0,u.useMemo)(()=>{let r;let n=f.current;if(n&&(f.current=!1),(0,d.isDynamicRoute)(o.pathname)&&(o.isFallback||n&&!o.isReady))return null;try{r=new URL(o.asPath,"http://f")}catch(r){return"/"}return r.pathname},[o.asPath,o.isFallback,o.isReady,o.pathname]);return u.default.createElement(s.PathnameContext.Provider,{value:h},n)}},7797:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return Router},matchesMiddleware:function(){return matchesMiddleware},createKey:function(){return createKey}});let l=o(8754),u=o(1757),s=o(6082),d=o(7159),f=o(2288),h=u._(o(676)),g=o(8902),_=o(4656),y=l._(o(3745)),P=o(1306),b=o(8011),E=o(9823);o(2431);let S=o(9001),R=o(8300),w=o(3833);o(4287);let O=o(891),j=o(2048),A=o(3099),M=o(7786),C=o(5864),I=o(5213),x=o(4785),N=o(9423),L=o(673),D=o(8979),k=o(1530),F=o(4131),U=o(6116),H=o(9302),B=o(9381),W=o(9987);function buildCancellationError(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function matchesMiddleware(r){let n=await Promise.resolve(r.router.pageLoader.getMiddleware());if(!n)return!1;let{pathname:o}=(0,O.parsePath)(r.asPath),l=(0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,u=(0,C.addBasePath)((0,j.addLocale)(l,r.locale));return n.some(r=>new RegExp(r.regexp).test(u))}function stripOrigin(r){let n=(0,P.getLocationOrigin)();return r.startsWith(n)?r.substring(n.length):r}function prepareUrlAs(r,n,o){let[l,u]=(0,x.resolveHref)(r,n,!0),s=(0,P.getLocationOrigin)(),d=l.startsWith(s),f=u&&u.startsWith(s);l=stripOrigin(l),u=u?stripOrigin(u):u;let h=d?l:(0,C.addBasePath)(l),g=o?stripOrigin((0,x.resolveHref)(r,o)):u||l;return{url:h,as:f?g:(0,C.addBasePath)(g)}}function resolveDynamicRoute(r,n){let o=(0,s.removeTrailingSlash)((0,g.denormalizePagePath)(r));return"/404"===o||"/_error"===o?r:(n.includes(o)||n.some(n=>{if((0,b.isDynamicRoute)(n)&&(0,R.getRouteRegex)(n).re.test(o))return r=n,!0}),(0,s.removeTrailingSlash)(r))}async function withMiddlewareEffects(r){let n=await matchesMiddleware(r);if(!n||!r.fetchData)return null;try{let n=await r.fetchData(),o=await function(r,n,o){let l={basePath:o.router.basePath,i18n:{locales:o.router.locales},trailingSlash:!1},u=n.headers.get("x-nextjs-rewrite"),f=u||n.headers.get("x-nextjs-matched-path"),h=n.headers.get("x-matched-path");if(!h||f||h.includes("__next_data_catchall")||h.includes("/_error")||h.includes("/404")||(f=h),f){if(f.startsWith("/")){let n=(0,E.parseRelativeUrl)(f),h=(0,L.getNextPathnameInfo)(n.pathname,{nextConfig:l,parseData:!0}),g=(0,s.removeTrailingSlash)(h.pathname);return Promise.all([o.router.pageLoader.getPageList(),(0,d.getClientBuildManifest)()]).then(s=>{let[d,{__rewrites:f}]=s,y=(0,j.addLocale)(h.pathname,h.locale);if((0,b.isDynamicRoute)(y)||!u&&d.includes((0,_.normalizeLocalePath)((0,M.removeBasePath)(y),o.router.locales).pathname)){let o=(0,L.getNextPathnameInfo)((0,E.parseRelativeUrl)(r).pathname,{nextConfig:l,parseData:!0});y=(0,C.addBasePath)(o.pathname),n.pathname=y}if(!d.includes(g)){let r=resolveDynamicRoute(g,d);r!==g&&(g=r)}let P=d.includes(g)?g:resolveDynamicRoute((0,_.normalizeLocalePath)((0,M.removeBasePath)(n.pathname),o.router.locales).pathname,d);if((0,b.isDynamicRoute)(P)){let r=(0,S.getRouteMatcher)((0,R.getRouteRegex)(P))(y);Object.assign(n.query,r||{})}return{type:"rewrite",parsedAs:n,resolvedHref:P}})}let n=(0,O.parsePath)(r),h=(0,D.formatNextPathnameInfo)({...(0,L.getNextPathnameInfo)(n.pathname,{nextConfig:l,parseData:!0}),defaultLocale:o.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-external",destination:""+h+n.query+n.hash})}let g=n.headers.get("x-nextjs-redirect");if(g){if(g.startsWith("/")){let r=(0,O.parsePath)(g),n=(0,D.formatNextPathnameInfo)({...(0,L.getNextPathnameInfo)(r.pathname,{nextConfig:l,parseData:!0}),defaultLocale:o.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+n+r.query+r.hash,newUrl:""+n+r.query+r.hash})}return Promise.resolve({type:"redirect-external",destination:g})}return Promise.resolve({type:"next"})}(n.dataHref,n.response,r);return{dataHref:n.dataHref,json:n.json,response:n.response,text:n.text,cacheKey:n.cacheKey,effect:o}}catch(r){return null}}let q=Symbol("SSG_DATA_NOT_FOUND");function tryToParseAsJSON(r){try{return JSON.parse(r)}catch(r){return null}}function fetchNextData(r){var n;let{dataHref:o,inflightCache:l,isPrefetch:u,hasMiddleware:s,isServerRender:f,parseJSON:h,persistCache:g,isBackground:_,unstable_skipClientCache:y}=r,{href:P}=new URL(o,window.location.href),getData=r=>(function fetchRetry(r,n,o){return fetch(r,{credentials:"same-origin",method:o.method||"GET",headers:Object.assign({},o.headers,{"x-nextjs-data":"1"})}).then(l=>!l.ok&&n>1&&l.status>=500?fetchRetry(r,n-1,o):l)})(o,f?3:1,{headers:Object.assign({},u?{purpose:"prefetch"}:{},u&&s?{"x-middleware-prefetch":"1"}:{}),method:null!=(n=null==r?void 0:r.method)?n:"GET"}).then(n=>n.ok&&(null==r?void 0:r.method)==="HEAD"?{dataHref:o,response:n,text:"",json:{},cacheKey:P}:n.text().then(r=>{if(!n.ok){if(s&&[301,302,307,308].includes(n.status))return{dataHref:o,response:n,text:r,json:{},cacheKey:P};if(404===n.status){var l;if(null==(l=tryToParseAsJSON(r))?void 0:l.notFound)return{dataHref:o,json:{notFound:q},response:n,text:r,cacheKey:P}}let u=Error("Failed to load static props");throw f||(0,d.markAssetError)(u),u}return{dataHref:o,json:h?tryToParseAsJSON(r):null,response:n,text:r,cacheKey:P}})).then(r=>(g&&"no-cache"!==r.response.headers.get("x-middleware-cache")||delete l[P],r)).catch(r=>{throw y||delete l[P],("Failed to fetch"===r.message||"NetworkError when attempting to fetch resource."===r.message||"Load failed"===r.message)&&(0,d.markAssetError)(r),r});return y&&g?getData({}).then(r=>(l[P]=Promise.resolve(r),r)):void 0!==l[P]?l[P]:l[P]=getData(_?{method:"HEAD"}:{})}function createKey(){return Math.random().toString(36).slice(2,10)}function handleHardNavigation(r){let{url:n,router:o}=r;if(n===(0,C.addBasePath)((0,j.addLocale)(o.asPath,o.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+n+" "+location.href);window.location.href=n}let getCancelledHandler=r=>{let{route:n,router:o}=r,l=!1,u=o.clc=()=>{l=!0};return()=>{if(l){let r=Error('Abort fetching component for route: "'+n+'"');throw r.cancelled=!0,r}u===o.clc&&(o.clc=null)}};let Router=class Router{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(r,n,o){return void 0===o&&(o={}),{url:r,as:n}=prepareUrlAs(this,r,n),this.change("pushState",r,n,o)}replace(r,n,o){return void 0===o&&(o={}),{url:r,as:n}=prepareUrlAs(this,r,n),this.change("replaceState",r,n,o)}async _bfl(r,n,o,l){{let h=!1,g=!1;for(let _ of[r,n])if(_){let n=(0,s.removeTrailingSlash)(new URL(_,"http://n").pathname),y=(0,C.addBasePath)((0,j.addLocale)(n,o||this.locale));if(n!==(0,s.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var u,d,f;for(let r of(h=h||!!(null==(u=this._bfl_s)?void 0:u.contains(n))||!!(null==(d=this._bfl_s)?void 0:d.contains(y)),[n,y])){let n=r.split("/");for(let r=0;!g&&r{})}}}}return!1}async change(r,n,o,l,u){var g,_,y,x,N,L,D,U,W;let z,G;if(!(0,F.isLocalURL)(n))return handleHardNavigation({url:n,router:this}),!1;let V=1===l._h;V||l.shallow||await this._bfl(o,void 0,l.locale);let X=V||l._shouldResolveHref||(0,O.parsePath)(n).pathname===(0,O.parsePath)(o).pathname,Y={...this.state},K=!0!==this.isReady;this.isReady=!0;let Q=this.isSsr;if(V||(this.isSsr=!1),V&&this.clc)return!1;let $=Y.locale;P.ST&&performance.mark("routeChange");let{shallow:J=!1,scroll:Z=!0}=l,ee={shallow:J};this._inFlightRoute&&this.clc&&(Q||Router.events.emit("routeChangeError",buildCancellationError(),this._inFlightRoute,ee),this.clc(),this.clc=null),o=(0,C.addBasePath)((0,j.addLocale)((0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,l.locale,this.defaultLocale));let et=(0,A.removeLocale)((0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,Y.locale);this._inFlightRoute=o;let er=$!==Y.locale;if(!V&&this.onlyAHashChange(et)&&!er){Y.asPath=et,Router.events.emit("hashChangeStart",o,ee),this.changeState(r,n,o,{...l,scroll:!1}),Z&&this.scrollToHash(et);try{await this.set(Y,this.components[Y.route],null)}catch(r){throw(0,h.default)(r)&&r.cancelled&&Router.events.emit("routeChangeError",r,et,ee),r}return Router.events.emit("hashChangeComplete",o,ee),!0}let en=(0,E.parseRelativeUrl)(n),{pathname:ea,query:eo}=en;if(null==(g=this.components[ea])?void 0:g.__appRouter)return handleHardNavigation({url:o,router:this}),new Promise(()=>{});try{[z,{__rewrites:G}]=await Promise.all([this.pageLoader.getPageList(),(0,d.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(r){return handleHardNavigation({url:o,router:this}),!1}this.urlIsNew(et)||er||(r="replaceState");let ei=o;ea=ea?(0,s.removeTrailingSlash)((0,M.removeBasePath)(ea)):ea;let el=(0,s.removeTrailingSlash)(ea),eu=o.startsWith("/")&&(0,E.parseRelativeUrl)(o).pathname,es=!!(eu&&el!==eu&&(!(0,b.isDynamicRoute)(el)||!(0,S.getRouteMatcher)((0,R.getRouteRegex)(el))(eu))),ec=!l.shallow&&await matchesMiddleware({asPath:o,locale:Y.locale,router:this});if(V&&ec&&(X=!1),X&&"/_error"!==ea&&(l._shouldResolveHref=!0,en.pathname=resolveDynamicRoute(ea,z),en.pathname===ea||(ea=en.pathname,en.pathname=(0,C.addBasePath)(ea),ec||(n=(0,w.formatWithValidation)(en)))),!(0,F.isLocalURL)(o))return handleHardNavigation({url:o,router:this}),!1;ei=(0,A.removeLocale)((0,M.removeBasePath)(ei),Y.locale),el=(0,s.removeTrailingSlash)(ea);let ed=!1;if((0,b.isDynamicRoute)(el)){let r=(0,E.parseRelativeUrl)(ei),l=r.pathname,u=(0,R.getRouteRegex)(el);ed=(0,S.getRouteMatcher)(u)(l);let s=el===l,d=s?(0,B.interpolateAs)(el,l,eo):{};if(ed&&(!s||d.result))s?o=(0,w.formatWithValidation)(Object.assign({},r,{pathname:d.result,query:(0,H.omit)(eo,d.params)})):Object.assign(eo,ed);else{let r=Object.keys(u.groups).filter(r=>!eo[r]&&!u.groups[r].optional);if(r.length>0&&!ec)throw Error((s?"The provided `href` ("+n+") value is missing query values ("+r.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+l+") is incompatible with the `href` value ("+el+"). ")+"Read more: https://nextjs.org/docs/messages/"+(s?"href-interpolation-failed":"incompatible-href-as"))}}V||Router.events.emit("routeChangeStart",o,ee);let ef="/404"===this.pathname||"/_error"===this.pathname;try{let s=await this.getRouteInfo({route:el,pathname:ea,query:eo,as:o,resolvedAs:ei,routeProps:ee,locale:Y.locale,isPreview:Y.isPreview,hasMiddleware:ec,unstable_skipClientCache:l.unstable_skipClientCache,isQueryUpdating:V&&!this.isFallback,isMiddlewareRewrite:es});if(V||l.shallow||await this._bfl(o,"resolvedAs"in s?s.resolvedAs:void 0,Y.locale),"route"in s&&ec){el=ea=s.route||el,ee.shallow||(eo=Object.assign({},s.query||{},eo));let r=(0,I.hasBasePath)(en.pathname)?(0,M.removeBasePath)(en.pathname):en.pathname;if(ed&&ea!==r&&Object.keys(ed).forEach(r=>{ed&&eo[r]===ed[r]&&delete eo[r]}),(0,b.isDynamicRoute)(ea)){let r=!ee.shallow&&s.resolvedAs?s.resolvedAs:(0,C.addBasePath)((0,j.addLocale)(new URL(o,location.href).pathname,Y.locale),!0),n=r;(0,I.hasBasePath)(n)&&(n=(0,M.removeBasePath)(n));let l=(0,R.getRouteRegex)(ea),u=(0,S.getRouteMatcher)(l)(new URL(n,location.href).pathname);u&&Object.assign(eo,u)}}if("type"in s){if("redirect-internal"===s.type)return this.change(r,s.newUrl,s.newAs,l);return handleHardNavigation({url:s.destination,router:this}),new Promise(()=>{})}let d=s.Component;if(d&&d.unstable_scriptLoader){let r=[].concat(d.unstable_scriptLoader());r.forEach(r=>{(0,f.handleClientScriptLoad)(r.props)})}if((s.__N_SSG||s.__N_SSP)&&s.props){if(s.props.pageProps&&s.props.pageProps.__N_REDIRECT){l.locale=!1;let n=s.props.pageProps.__N_REDIRECT;if(n.startsWith("/")&&!1!==s.props.pageProps.__N_REDIRECT_BASE_PATH){let o=(0,E.parseRelativeUrl)(n);o.pathname=resolveDynamicRoute(o.pathname,z);let{url:u,as:s}=prepareUrlAs(this,n,n);return this.change(r,u,s,l)}return handleHardNavigation({url:n,router:this}),new Promise(()=>{})}if(Y.isPreview=!!s.props.__N_PREVIEW,s.props.notFound===q){let r;try{await this.fetchComponent("/404"),r="/404"}catch(n){r="/_error"}if(s=await this.getRouteInfo({route:r,pathname:r,query:eo,as:o,resolvedAs:ei,routeProps:{shallow:!1},locale:Y.locale,isPreview:Y.isPreview,isNotFound:!0}),"type"in s)throw Error("Unexpected middleware effect on /404")}}V&&"/_error"===this.pathname&&(null==(y=self.__NEXT_DATA__.props)?void 0:null==(_=y.pageProps)?void 0:_.statusCode)===500&&(null==(x=s.props)?void 0:x.pageProps)&&(s.props.pageProps.statusCode=500);let g=l.shallow&&Y.route===(null!=(N=s.route)?N:el),P=null!=(L=l.scroll)?L:!V&&!g,w=null!=u?u:P?{x:0,y:0}:null,O={...Y,route:el,pathname:ea,query:eo,asPath:et,isFallback:!1};if(V&&ef){if(s=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:eo,as:o,resolvedAs:ei,routeProps:{shallow:!1},locale:Y.locale,isPreview:Y.isPreview,isQueryUpdating:V&&!this.isFallback}),"type"in s)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(U=self.__NEXT_DATA__.props)?void 0:null==(D=U.pageProps)?void 0:D.statusCode)===500&&(null==(W=s.props)?void 0:W.pageProps)&&(s.props.pageProps.statusCode=500);try{await this.set(O,s,w)}catch(r){throw(0,h.default)(r)&&r.cancelled&&Router.events.emit("routeChangeError",r,et,ee),r}return!0}Router.events.emit("beforeHistoryChange",o,ee),this.changeState(r,n,o,l);let A=V&&!w&&!K&&!er&&(0,k.compareRouterStates)(O,this.state);if(!A){try{await this.set(O,s,w)}catch(r){if(r.cancelled)s.error=s.error||r;else throw r}if(s.error)throw V||Router.events.emit("routeChangeError",s.error,et,ee),s.error;V||Router.events.emit("routeChangeComplete",o,ee),P&&/#.+$/.test(o)&&this.scrollToHash(o)}return!0}catch(r){if((0,h.default)(r)&&r.cancelled)return!1;throw r}}changeState(r,n,o,l){void 0===l&&(l={}),("pushState"!==r||(0,P.getURL)()!==o)&&(this._shallow=l.shallow,window.history[r]({url:n,as:o,options:l,__N:!0,key:this._key="pushState"!==r?this._key:createKey()},"",o))}async handleRouteInfoError(r,n,o,l,u,s){if(console.error(r),r.cancelled)throw r;if((0,d.isAssetError)(r)||s)throw Router.events.emit("routeChangeError",r,l,u),handleHardNavigation({url:l,router:this}),buildCancellationError();try{let l;let{page:u,styleSheets:s}=await this.fetchComponent("/_error"),d={props:l,Component:u,styleSheets:s,err:r,error:r};if(!d.props)try{d.props=await this.getInitialProps(u,{err:r,pathname:n,query:o})}catch(r){console.error("Error in error page `getInitialProps`: ",r),d.props={}}return d}catch(r){return this.handleRouteInfoError((0,h.default)(r)?r:Error(r+""),n,o,l,u,!0)}}async getRouteInfo(r){let{route:n,pathname:o,query:l,as:u,resolvedAs:d,routeProps:f,locale:g,hasMiddleware:y,isPreview:P,unstable_skipClientCache:b,isQueryUpdating:E,isMiddlewareRewrite:S,isNotFound:R}=r,O=n;try{var j,A,C,I;let r=getCancelledHandler({route:O,router:this}),n=this.components[O];if(f.shallow&&n&&this.route===O)return n;y&&(n=void 0);let h=!n||"initial"in n?void 0:n,x={dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:o,query:l}),skipInterpolation:!0,asPath:R?"/404":d,locale:g}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:E?this.sbc:this.sdc,persistCache:!P,isPrefetch:!1,unstable_skipClientCache:b,isBackground:E},L=E&&!S?null:await withMiddlewareEffects({fetchData:()=>fetchNextData(x),asPath:R?"/404":d,locale:g,router:this}).catch(r=>{if(E)return null;throw r});if(L&&("/_error"===o||"/404"===o)&&(L.effect=void 0),E&&(L?L.json=self.__NEXT_DATA__.props:L={json:self.__NEXT_DATA__.props}),r(),(null==L?void 0:null==(j=L.effect)?void 0:j.type)==="redirect-internal"||(null==L?void 0:null==(A=L.effect)?void 0:A.type)==="redirect-external")return L.effect;if((null==L?void 0:null==(C=L.effect)?void 0:C.type)==="rewrite"){let r=(0,s.removeTrailingSlash)(L.effect.resolvedHref),u=await this.pageLoader.getPageList();if((!E||u.includes(r))&&(O=r,o=L.effect.resolvedHref,l={...l,...L.effect.parsedAs.query},d=(0,M.removeBasePath)((0,_.normalizeLocalePath)(L.effect.parsedAs.pathname,this.locales).pathname),n=this.components[O],f.shallow&&n&&this.route===O&&!y))return{...n,route:O}}if((0,N.isAPIRoute)(O))return handleHardNavigation({url:u,router:this}),new Promise(()=>{});let D=h||await this.fetchComponent(O).then(r=>({Component:r.page,styleSheets:r.styleSheets,__N_SSG:r.mod.__N_SSG,__N_SSP:r.mod.__N_SSP})),k=null==L?void 0:null==(I=L.response)?void 0:I.headers.get("x-middleware-skip"),F=D.__N_SSG||D.__N_SSP;k&&(null==L?void 0:L.dataHref)&&delete this.sdc[L.dataHref];let{props:U,cacheKey:H}=await this._getData(async()=>{if(F){if((null==L?void 0:L.json)&&!k)return{cacheKey:L.cacheKey,props:L.json};let r=(null==L?void 0:L.dataHref)?L.dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:o,query:l}),asPath:d,locale:g}),n=await fetchNextData({dataHref:r,isServerRender:this.isSsr,parseJSON:!0,inflightCache:k?{}:this.sdc,persistCache:!P,isPrefetch:!1,unstable_skipClientCache:b});return{cacheKey:n.cacheKey,props:n.json||{}}}return{headers:{},props:await this.getInitialProps(D.Component,{pathname:o,query:l,asPath:u,locale:g,locales:this.locales,defaultLocale:this.defaultLocale})}});return D.__N_SSP&&x.dataHref&&H&&delete this.sdc[H],this.isPreview||!D.__N_SSG||E||fetchNextData(Object.assign({},x,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),U.pageProps=Object.assign({},U.pageProps),D.props=U,D.route=O,D.query=l,D.resolvedAs=d,this.components[O]=D,D}catch(r){return this.handleRouteInfoError((0,h.getProperError)(r),o,l,u,f)}}set(r,n,o){return this.state=r,this.sub(n,this.components["/_app"].Component,o)}beforePopState(r){this._bps=r}onlyAHashChange(r){if(!this.asPath)return!1;let[n,o]=this.asPath.split("#"),[l,u]=r.split("#");return!!u&&n===l&&o===u||n===l&&o!==u}scrollToHash(r){let[,n=""]=r.split("#");(0,W.handleSmoothScroll)(()=>{if(""===n||"top"===n){window.scrollTo(0,0);return}let r=decodeURIComponent(n),o=document.getElementById(r);if(o){o.scrollIntoView();return}let l=document.getElementsByName(r)[0];l&&l.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(r)})}urlIsNew(r){return this.asPath!==r}async prefetch(r,n,o){if(void 0===n&&(n=r),void 0===o&&(o={}),(0,U.isBot)(window.navigator.userAgent))return;let l=(0,E.parseRelativeUrl)(r),u=l.pathname,{pathname:d,query:f}=l,h=d,g=await this.pageLoader.getPageList(),_=n,y=void 0!==o.locale?o.locale||void 0:this.locale,P=await matchesMiddleware({asPath:n,locale:y,router:this});l.pathname=resolveDynamicRoute(l.pathname,g),(0,b.isDynamicRoute)(l.pathname)&&(d=l.pathname,l.pathname=d,Object.assign(f,(0,S.getRouteMatcher)((0,R.getRouteRegex)(l.pathname))((0,O.parsePath)(n).pathname)||{}),P||(r=(0,w.formatWithValidation)(l)));let j=await withMiddlewareEffects({fetchData:()=>fetchNextData({dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:h,query:f}),skipInterpolation:!0,asPath:_,locale:y}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:n,locale:y,router:this});if((null==j?void 0:j.effect.type)==="rewrite"&&(l.pathname=j.effect.resolvedHref,d=j.effect.resolvedHref,f={...f,...j.effect.parsedAs.query},_=j.effect.parsedAs.pathname,r=(0,w.formatWithValidation)(l)),(null==j?void 0:j.effect.type)==="redirect-external")return;let A=(0,s.removeTrailingSlash)(d);await this._bfl(n,_,o.locale,!0)&&(this.components[u]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(A).then(n=>!!n&&fetchNextData({dataHref:(null==j?void 0:j.json)?null==j?void 0:j.dataHref:this.pageLoader.getDataHref({href:r,asPath:_,locale:y}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:o.unstable_skipClientCache||o.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[o.priority?"loadPage":"prefetch"](A)])}async fetchComponent(r){let n=getCancelledHandler({route:r,router:this});try{let o=await this.pageLoader.loadPage(r);return n(),o}catch(r){throw n(),r}}_getData(r){let n=!1,cancel=()=>{n=!0};return this.clc=cancel,r().then(r=>{if(cancel===this.clc&&(this.clc=null),n){let r=Error("Loading initial props cancelled");throw r.cancelled=!0,r}return r})}_getFlightData(r){return fetchNextData({dataHref:r,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(r=>{let{text:n}=r;return{data:n}})}getInitialProps(r,n){let{Component:o}=this.components["/_app"],l=this._wrapApp(o);return n.AppTree=l,(0,P.loadGetInitialProps)(o,{AppTree:l,Component:r,router:this,ctx:n})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(r,n,l,{initialProps:u,pageLoader:d,App:f,wrapApp:h,Component:g,err:_,subscription:y,isFallback:S,locale:R,locales:O,defaultLocale:j,domainLocales:A,isPreview:M}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=createKey(),this.onPopState=r=>{let n;let{isFirstPopStateEvent:o}=this;this.isFirstPopStateEvent=!1;let l=r.state;if(!l){let{pathname:r,query:n}=this;this.changeState("replaceState",(0,w.formatWithValidation)({pathname:(0,C.addBasePath)(r),query:n}),(0,P.getURL)());return}if(l.__NA){window.location.reload();return}if(!l.__N||o&&this.locale===l.options.locale&&l.as===this.asPath)return;let{url:u,as:s,options:d,key:f}=l;this._key=f;let{pathname:h}=(0,E.parseRelativeUrl)(u);(!this.isSsr||s!==(0,C.addBasePath)(this.asPath)||h!==(0,C.addBasePath)(this.pathname))&&(!this._bps||this._bps(l))&&this.change("replaceState",u,s,Object.assign({},d,{shallow:d.shallow&&this._shallow,locale:d.locale||this.defaultLocale,_h:0}),n)};let I=(0,s.removeTrailingSlash)(r);this.components={},"/_error"!==r&&(this.components[I]={Component:g,initial:!0,props:u,err:_,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:f,styleSheets:[]};{let{BloomFilter:r}=o(1403),n={numItems:4,errorRate:.01,numBits:39,numHashes:7,bitArray:[0,0,1,0,0,1,1,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,0,0,1,1,1]},l={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]};(null==n?void 0:n.numHashes)&&(this._bfl_s=new r(n.numItems,n.errorRate),this._bfl_s.import(n)),(null==l?void 0:l.numHashes)&&(this._bfl_d=new r(l.numItems,l.errorRate),this._bfl_d.import(l))}this.events=Router.events,this.pageLoader=d;let x=(0,b.isDynamicRoute)(r)&&self.__NEXT_DATA__.autoExport;if(this.basePath="/rln-js",this.sub=y,this.clc=null,this._wrapApp=h,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!x&&!self.location.search),this.state={route:I,pathname:r,query:n,asPath:x?r:l,isPreview:!!M,locale:void 0,isFallback:S},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!l.startsWith("//")){let o={locale:R},u=(0,P.getURL)();this._initialMatchesMiddlewarePromise=matchesMiddleware({router:this,locale:R,asPath:u}).then(s=>(o._shouldResolveHref=l!==r,this.changeState("replaceState",s?u:(0,w.formatWithValidation)({pathname:(0,C.addBasePath)(r),query:n}),u,o),s))}window.addEventListener("popstate",this.onPopState)}};Router.events=(0,y.default)()},142:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addLocale",{enumerable:!0,get:function(){return addLocale}});let l=o(3776),u=o(6315);function addLocale(r,n,o,s){if(!n||n===o)return r;let d=r.toLowerCase();return!s&&((0,u.pathHasPrefix)(d,"/api")||(0,u.pathHasPrefix)(d,"/"+n.toLowerCase()))?r:(0,l.addPathPrefix)(r,"/"+n)}},3776:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathPrefix",{enumerable:!0,get:function(){return addPathPrefix}});let l=o(891);function addPathPrefix(r,n){if(!r.startsWith("/")||!n)return r;let{pathname:o,query:u,hash:s}=(0,l.parsePath)(r);return""+n+o+u+s}},93:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathSuffix",{enumerable:!0,get:function(){return addPathSuffix}});let l=o(891);function addPathSuffix(r,n){if(!r.startsWith("/")||!n)return r;let{pathname:o,query:u,hash:s}=(0,l.parsePath)(r);return""+o+n+u+s}},9537:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{normalizeAppPath:function(){return normalizeAppPath},normalizeRscPath:function(){return normalizeRscPath}});let l=o(3029),u=o(7494);function normalizeAppPath(r){return(0,l.ensureLeadingSlash)(r.split("/").reduce((r,n,o,l)=>!n||(0,u.isGroupSegment)(n)||"@"===n[0]||("page"===n||"route"===n)&&o===l.length-1?r:r+"/"+n,""))}function normalizeRscPath(r,n){return n?r.replace(/\.rsc($|\?)/,"$1"):r}},2391:function(r,n){"use strict";function asPathToSearchParams(r){return new URL(r,"http://n").searchParams}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"asPathToSearchParams",{enumerable:!0,get:function(){return asPathToSearchParams}})},1530:function(r,n){"use strict";function compareRouterStates(r,n){let o=Object.keys(r);if(o.length!==Object.keys(n).length)return!1;for(let l=o.length;l--;){let u=o[l];if("query"===u){let o=Object.keys(r.query);if(o.length!==Object.keys(n.query).length)return!1;for(let l=o.length;l--;){let u=o[l];if(!n.query.hasOwnProperty(u)||r.query[u]!==n.query[u])return!1}}else if(!n.hasOwnProperty(u)||r[u]!==n[u])return!1}return!0}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"compareRouterStates",{enumerable:!0,get:function(){return compareRouterStates}})},8979:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"formatNextPathnameInfo",{enumerable:!0,get:function(){return formatNextPathnameInfo}});let l=o(6082),u=o(3776),s=o(93),d=o(142);function formatNextPathnameInfo(r){let n=(0,d.addLocale)(r.pathname,r.locale,r.buildId?void 0:r.defaultLocale,r.ignorePrefix);return(r.buildId||!r.trailingSlash)&&(n=(0,l.removeTrailingSlash)(n)),r.buildId&&(n=(0,s.addPathSuffix)((0,u.addPathPrefix)(n,"/_next/data/"+r.buildId),"/"===r.pathname?"index.json":".json")),n=(0,u.addPathPrefix)(n,r.basePath),!r.buildId&&r.trailingSlash?n.endsWith("/")?n:(0,s.addPathSuffix)(n,"/"):(0,l.removeTrailingSlash)(n)}},3833:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{formatUrl:function(){return formatUrl},urlObjectKeys:function(){return d},formatWithValidation:function(){return formatWithValidation}});let l=o(1757),u=l._(o(4828)),s=/https?|ftp|gopher|file/;function formatUrl(r){let{auth:n,hostname:o}=r,l=r.protocol||"",d=r.pathname||"",f=r.hash||"",h=r.query||"",g=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",r.host?g=n+r.host:o&&(g=n+(~o.indexOf(":")?"["+o+"]":o),r.port&&(g+=":"+r.port)),h&&"object"==typeof h&&(h=String(u.urlQueryToSearchParams(h)));let _=r.search||h&&"?"+h||"";return l&&!l.endsWith(":")&&(l+=":"),r.slashes||(!l||s.test(l))&&!1!==g?(g="//"+(g||""),d&&"/"!==d[0]&&(d="/"+d)):g||(g=""),f&&"#"!==f[0]&&(f="#"+f),_&&"?"!==_[0]&&(_="?"+_),""+l+g+(d=d.replace(/[?#]/g,encodeURIComponent))+(_=_.replace("#","%23"))+f}let d=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function formatWithValidation(r){return formatUrl(r)}},8052:function(r,n){"use strict";function getAssetPathFromRoute(r,n){void 0===n&&(n="");let o="/"===r?"/index":/^\/index(\/|$)/.test(r)?"/index"+r:""+r;return o+n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return getAssetPathFromRoute}})},673:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getNextPathnameInfo",{enumerable:!0,get:function(){return getNextPathnameInfo}});let l=o(4656),u=o(4980),s=o(6315);function getNextPathnameInfo(r,n){var o,d;let{basePath:f,i18n:h,trailingSlash:g}=null!=(o=n.nextConfig)?o:{},_={pathname:r,trailingSlash:"/"!==r?r.endsWith("/"):g};f&&(0,s.pathHasPrefix)(_.pathname,f)&&(_.pathname=(0,u.removePathPrefix)(_.pathname,f),_.basePath=f);let y=_.pathname;if(_.pathname.startsWith("/_next/data/")&&_.pathname.endsWith(".json")){let r=_.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),o=r[0];_.buildId=o,y="index"!==r[1]?"/"+r.slice(1).join("/"):"/",!0===n.parseData&&(_.pathname=y)}if(h){let r=n.i18nProvider?n.i18nProvider.analyze(_.pathname):(0,l.normalizeLocalePath)(_.pathname,h.locales);_.locale=r.detectedLocale,_.pathname=null!=(d=r.pathname)?d:_.pathname,!r.detectedLocale&&_.buildId&&(r=n.i18nProvider?n.i18nProvider.analyze(y):(0,l.normalizeLocalePath)(y,h.locales)).detectedLocale&&(_.locale=r.detectedLocale)}return _}},9987:function(r,n){"use strict";function handleSmoothScroll(r,n){if(void 0===n&&(n={}),n.onlyHashChange){r();return}let o=document.documentElement,l=o.style.scrollBehavior;o.style.scrollBehavior="auto",n.dontForceLayout||o.getClientRects(),r(),o.style.scrollBehavior=l}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"handleSmoothScroll",{enumerable:!0,get:function(){return handleSmoothScroll}})},1232:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getSortedRoutes:function(){return l.getSortedRoutes},isDynamicRoute:function(){return u.isDynamicRoute}});let l=o(2839),u=o(8011)},9381:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"interpolateAs",{enumerable:!0,get:function(){return interpolateAs}});let l=o(9001),u=o(8300);function interpolateAs(r,n,o){let s="",d=(0,u.getRouteRegex)(r),f=d.groups,h=(n!==r?(0,l.getRouteMatcher)(d)(n):"")||o;s=r;let g=Object.keys(f);return g.every(r=>{let n=h[r]||"",{repeat:o,optional:l}=f[r],u="["+(o?"...":"")+r+"]";return l&&(u=(n?"":"/")+"["+u+"]"),o&&!Array.isArray(n)&&(n=[n]),(l||r in h)&&(s=s.replace(u,o?n.map(r=>encodeURIComponent(r)).join("/"):encodeURIComponent(n))||"/")})||(s=""),{params:g,result:s}}},6116:function(r,n){"use strict";function isBot(r){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(r)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isBot",{enumerable:!0,get:function(){return isBot}})},8011:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isDynamicRoute",{enumerable:!0,get:function(){return isDynamicRoute}});let o=/\/\[[^/]+?\](?=\/|$)/;function isDynamicRoute(r){return o.test(r)}},4131:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return isLocalURL}});let l=o(1306),u=o(5213);function isLocalURL(r){if(!(0,l.isAbsoluteUrl)(r))return!0;try{let n=(0,l.getLocationOrigin)(),o=new URL(r,n);return o.origin===n&&(0,u.hasBasePath)(o.pathname)}catch(r){return!1}}},9302:function(r,n){"use strict";function omit(r,n){let o={};return Object.keys(r).forEach(l=>{n.includes(l)||(o[l]=r[l])}),o}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"omit",{enumerable:!0,get:function(){return omit}})},891:function(r,n){"use strict";function parsePath(r){let n=r.indexOf("#"),o=r.indexOf("?"),l=o>-1&&(n<0||o-1?{pathname:r.substring(0,l?o:n),query:l?r.substring(o,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"parsePath",{enumerable:!0,get:function(){return parsePath}})},9823:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"parseRelativeUrl",{enumerable:!0,get:function(){return parseRelativeUrl}});let l=o(1306),u=o(4828);function parseRelativeUrl(r,n){let o=new URL((0,l.getLocationOrigin)()),s=n?new URL(n,o):r.startsWith(".")?new URL(window.location.href):o,{pathname:d,searchParams:f,search:h,hash:g,href:_,origin:y}=new URL(r,s);if(y!==o.origin)throw Error("invariant: invalid relative URL, router received "+r);return{pathname:d,query:(0,u.searchParamsToUrlQuery)(f),search:h,hash:g,href:_.slice(o.origin.length)}}},6315:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"pathHasPrefix",{enumerable:!0,get:function(){return pathHasPrefix}});let l=o(891);function pathHasPrefix(r,n){if("string"!=typeof r)return!1;let{pathname:o}=(0,l.parsePath)(r);return o===n||o.startsWith(n+"/")}},4828:function(r,n){"use strict";function searchParamsToUrlQuery(r){let n={};return r.forEach((r,o)=>{void 0===n[o]?n[o]=r:Array.isArray(n[o])?n[o].push(r):n[o]=[n[o],r]}),n}function stringifyUrlQueryParam(r){return"string"!=typeof r&&("number"!=typeof r||isNaN(r))&&"boolean"!=typeof r?"":String(r)}function urlQueryToSearchParams(r){let n=new URLSearchParams;return Object.entries(r).forEach(r=>{let[o,l]=r;Array.isArray(l)?l.forEach(r=>n.append(o,stringifyUrlQueryParam(r))):n.set(o,stringifyUrlQueryParam(l))}),n}function assign(r){for(var n=arguments.length,o=Array(n>1?n-1:0),l=1;l{Array.from(n.keys()).forEach(n=>r.delete(n)),n.forEach((n,o)=>r.append(o,n))}),r}Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{searchParamsToUrlQuery:function(){return searchParamsToUrlQuery},urlQueryToSearchParams:function(){return urlQueryToSearchParams},assign:function(){return assign}})},4980:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removePathPrefix",{enumerable:!0,get:function(){return removePathPrefix}});let l=o(6315);function removePathPrefix(r,n){if(!(0,l.pathHasPrefix)(r,n))return r;let o=r.slice(n.length);return o.startsWith("/")?o:"/"+o}},6082:function(r,n){"use strict";function removeTrailingSlash(r){return r.replace(/\/$/,"")||"/"}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeTrailingSlash",{enumerable:!0,get:function(){return removeTrailingSlash}})},9001:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getRouteMatcher",{enumerable:!0,get:function(){return getRouteMatcher}});let l=o(1306);function getRouteMatcher(r){let{re:n,groups:o}=r;return r=>{let u=n.exec(r);if(!u)return!1;let decode=r=>{try{return decodeURIComponent(r)}catch(r){throw new l.DecodeError("failed to decode param")}},s={};return Object.keys(o).forEach(r=>{let n=o[r],l=u[n.pos];void 0!==l&&(s[r]=~l.indexOf("/")?l.split("/").map(r=>decode(r)):n.repeat?[decode(l)]:decode(l))}),s}}},8300:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getRouteRegex:function(){return getRouteRegex},getNamedRouteRegex:function(){return getNamedRouteRegex},getNamedMiddlewareRegex:function(){return getNamedMiddlewareRegex}});let l=o(2407),u=o(4125),s=o(6082);function parseParameter(r){let n=r.startsWith("[")&&r.endsWith("]");n&&(r=r.slice(1,-1));let o=r.startsWith("...");return o&&(r=r.slice(3)),{key:r,repeat:o,optional:n}}function getParametrizedRoute(r){let n=(0,s.removeTrailingSlash)(r).slice(1).split("/"),o={},d=1;return{parameterizedRoute:n.map(r=>{let n=l.INTERCEPTION_ROUTE_MARKERS.find(n=>r.startsWith(n)),s=r.match(/\[((?:\[.*\])|.+)\]/);if(n&&s){let{key:r,optional:l,repeat:f}=parseParameter(s[1]);return o[r]={pos:d++,repeat:f,optional:l},"/"+(0,u.escapeStringRegexp)(n)+"([^/]+?)"}if(!s)return"/"+(0,u.escapeStringRegexp)(r);{let{key:r,repeat:n,optional:l}=parseParameter(s[1]);return o[r]={pos:d++,repeat:n,optional:l},n?l?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:o}}function getRouteRegex(r){let{parameterizedRoute:n,groups:o}=getParametrizedRoute(r);return{re:RegExp("^"+n+"(?:/)?$"),groups:o}}function getSafeKeyFromSegment(r){let{getSafeRouteKey:n,segment:o,routeKeys:l,keyPrefix:u}=r,{key:s,optional:d,repeat:f}=parseParameter(o),h=s.replace(/\W/g,"");u&&(h=""+u+h);let g=!1;return(0===h.length||h.length>30)&&(g=!0),isNaN(parseInt(h.slice(0,1)))||(g=!0),g&&(h=n()),u?l[h]=""+u+s:l[h]=""+s,f?d?"(?:/(?<"+h+">.+?))?":"/(?<"+h+">.+?)":"/(?<"+h+">[^/]+?)"}function getNamedParametrizedRoute(r,n){let o;let d=(0,s.removeTrailingSlash)(r).slice(1).split("/"),f=(o=0,()=>{let r="",n=++o;for(;n>0;)r+=String.fromCharCode(97+(n-1)%26),n=Math.floor((n-1)/26);return r}),h={};return{namedParameterizedRoute:d.map(r=>{let o=l.INTERCEPTION_ROUTE_MARKERS.some(n=>r.startsWith(n)),s=r.match(/\[((?:\[.*\])|.+)\]/);return o&&s?getSafeKeyFromSegment({getSafeRouteKey:f,segment:s[1],routeKeys:h,keyPrefix:n?"nxtI":void 0}):s?getSafeKeyFromSegment({getSafeRouteKey:f,segment:s[1],routeKeys:h,keyPrefix:n?"nxtP":void 0}):"/"+(0,u.escapeStringRegexp)(r)}).join(""),routeKeys:h}}function getNamedRouteRegex(r,n){let o=getNamedParametrizedRoute(r,n);return{...getRouteRegex(r),namedRegex:"^"+o.namedParameterizedRoute+"(?:/)?$",routeKeys:o.routeKeys}}function getNamedMiddlewareRegex(r,n){let{parameterizedRoute:o}=getParametrizedRoute(r),{catchAll:l=!0}=n;if("/"===o)return{namedRegex:"^/"+(l?".*":"")+"$"};let{namedParameterizedRoute:u}=getNamedParametrizedRoute(r,!1);return{namedRegex:"^"+u+(l?"(?:(/.*)?)":"")+"$"}}},2839:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getSortedRoutes",{enumerable:!0,get:function(){return getSortedRoutes}});let UrlNode=class UrlNode{insert(r){this._insert(r.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(r){void 0===r&&(r="/");let n=[...this.children.keys()].sort();null!==this.slugName&&n.splice(n.indexOf("[]"),1),null!==this.restSlugName&&n.splice(n.indexOf("[...]"),1),null!==this.optionalRestSlugName&&n.splice(n.indexOf("[[...]]"),1);let o=n.map(n=>this.children.get(n)._smoosh(""+r+n+"/")).reduce((r,n)=>[...r,...n],[]);if(null!==this.slugName&&o.push(...this.children.get("[]")._smoosh(r+"["+this.slugName+"]/")),!this.placeholder){let n="/"===r?"/":r.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+n+'" and "'+n+"[[..."+this.optionalRestSlugName+']]").');o.unshift(n)}return null!==this.restSlugName&&o.push(...this.children.get("[...]")._smoosh(r+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&o.push(...this.children.get("[[...]]")._smoosh(r+"[[..."+this.optionalRestSlugName+"]]/")),o}_insert(r,n,o){if(0===r.length){this.placeholder=!1;return}if(o)throw Error("Catch-all must be the last part of the URL.");let l=r[0];if(l.startsWith("[")&&l.endsWith("]")){let u=l.slice(1,-1),s=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),s=!0),u.startsWith("...")&&(u=u.substring(3),o=!0),u.startsWith("[")||u.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+u+"').");function handleSlug(r,o){if(null!==r&&r!==o)throw Error("You cannot use different slug names for the same dynamic path ('"+r+"' !== '"+o+"').");n.forEach(r=>{if(r===o)throw Error('You cannot have the same slug name "'+o+'" repeat within a single dynamic path');if(r.replace(/\W/g,"")===l.replace(/\W/g,""))throw Error('You cannot have the slug names "'+r+'" and "'+o+'" differ only by non-word symbols within a single dynamic path')}),n.push(o)}if(o){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+r[0]+'" ).');handleSlug(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+r[0]+'").');handleSlug(this.restSlugName,u),this.restSlugName=u,l="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+r[0]+'").');handleSlug(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new UrlNode),this.children.get(l)._insert(r.slice(1),n,o)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}};function getSortedRoutes(r){let n=new UrlNode;return r.forEach(r=>n.insert(r)),n.smoosh()}},510:function(r,n){"use strict";let o;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return _default},setConfig:function(){return setConfig}});let _default=()=>o;function setConfig(r){o=r}},7494:function(r,n){"use strict";function isGroupSegment(r){return"("===r[0]&&r.endsWith(")")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isGroupSegment",{enumerable:!0,get:function(){return isGroupSegment}})},3632:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return SideEffect}});let l=o(7294),u=l.useLayoutEffect,s=l.useEffect;function SideEffect(r){let{headManager:n,reduceComponentsToState:o}=r;function emitChange(){if(n&&n.mountedInstances){let u=l.Children.toArray(Array.from(n.mountedInstances).filter(Boolean));n.updateHead(o(u,r))}}return u(()=>{var o;return null==n||null==(o=n.mountedInstances)||o.add(r.children),()=>{var o;null==n||null==(o=n.mountedInstances)||o.delete(r.children)}}),u(()=>(n&&(n._pendingUpdate=emitChange),()=>{n&&(n._pendingUpdate=emitChange)})),s(()=>(n&&n._pendingUpdate&&(n._pendingUpdate(),n._pendingUpdate=null),()=>{n&&n._pendingUpdate&&(n._pendingUpdate(),n._pendingUpdate=null)})),null}},1306:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{WEB_VITALS:function(){return o},execOnce:function(){return execOnce},isAbsoluteUrl:function(){return isAbsoluteUrl},getLocationOrigin:function(){return getLocationOrigin},getURL:function(){return getURL},getDisplayName:function(){return getDisplayName},isResSent:function(){return isResSent},normalizeRepeatedSlashes:function(){return normalizeRepeatedSlashes},loadGetInitialProps:function(){return loadGetInitialProps},SP:function(){return u},ST:function(){return s},DecodeError:function(){return DecodeError},NormalizeError:function(){return NormalizeError},PageNotFoundError:function(){return PageNotFoundError},MissingStaticPage:function(){return MissingStaticPage},MiddlewareNotFoundError:function(){return MiddlewareNotFoundError},stringifyError:function(){return stringifyError}});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function execOnce(r){let n,o=!1;return function(){for(var l=arguments.length,u=Array(l),s=0;sl.test(r);function getLocationOrigin(){let{protocol:r,hostname:n,port:o}=window.location;return r+"//"+n+(o?":"+o:"")}function getURL(){let{href:r}=window.location,n=getLocationOrigin();return r.substring(n.length)}function getDisplayName(r){return"string"==typeof r?r:r.displayName||r.name||"Unknown"}function isResSent(r){return r.finished||r.headersSent}function normalizeRepeatedSlashes(r){let n=r.split("?"),o=n[0];return o.replace(/\\/g,"/").replace(/\/\/+/g,"/")+(n[1]?"?"+n.slice(1).join("?"):"")}async function loadGetInitialProps(r,n){let o=n.res||n.ctx&&n.ctx.res;if(!r.getInitialProps)return n.ctx&&n.Component?{pageProps:await loadGetInitialProps(n.Component,n.ctx)}:{};let l=await r.getInitialProps(n);if(o&&isResSent(o))return l;if(!l){let n='"'+getDisplayName(r)+'.getInitialProps()" should resolve to an object. But found "'+l+'" instead.';throw Error(n)}return l}let u="undefined"!=typeof performance,s=u&&["mark","measure","getEntriesByName"].every(r=>"function"==typeof performance[r]);let DecodeError=class DecodeError extends Error{};let NormalizeError=class NormalizeError extends Error{};let PageNotFoundError=class PageNotFoundError extends Error{constructor(r){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+r}};let MissingStaticPage=class MissingStaticPage extends Error{constructor(r,n){super(),this.message="Failed to load static file for page: "+r+" "+n}};let MiddlewareNotFoundError=class MiddlewareNotFoundError extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}};function stringifyError(r){return JSON.stringify({message:r.message,stack:r.stack})}},9941:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"warnOnce",{enumerable:!0,get:function(){return warnOnce}});let warnOnce=r=>{}},8018:function(r){var n,o,l,u,s,d,f,h,g,_,y,P,b,E,S,R,w,O,j,A,M,C,I,x,N,L,D,k,F,U,H,B,W,q,z,G,V,X,Y,K,Q,$,J,Z,ee,et;(n={}).d=function(r,o){for(var l in o)n.o(o,l)&&!n.o(r,l)&&Object.defineProperty(r,l,{enumerable:!0,get:o[l]})},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},void 0!==n&&(n.ab="//"),o={},n.r(o),n.d(o,{getCLS:function(){return I},getFCP:function(){return A},getFID:function(){return U},getINP:function(){return $},getLCP:function(){return Z},getTTFB:function(){return et},onCLS:function(){return I},onFCP:function(){return A},onFID:function(){return U},onINP:function(){return $},onLCP:function(){return Z},onTTFB:function(){return et}}),h=-1,g=function(r){addEventListener("pageshow",function(n){n.persisted&&(h=n.timeStamp,r(n))},!0)},_=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},y=function(){var r=_();return r&&r.activationStart||0},P=function(r,n){var o=_(),l="navigate";return h>=0?l="back-forward-cache":o&&(l=document.prerendering||y()>0?"prerender":o.type.replace(/_/g,"-")),{name:r,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:l}},b=function(r,n,o){try{if(PerformanceObserver.supportedEntryTypes.includes(r)){var l=new PerformanceObserver(function(r){n(r.getEntries())});return l.observe(Object.assign({type:r,buffered:!0},o||{})),l}}catch(r){}},E=function(r,n){var T=function t(o){"pagehide"!==o.type&&"hidden"!==document.visibilityState||(r(o),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",T,!0),addEventListener("pagehide",T,!0)},S=function(r,n,o,l){var u,s;return function(d){var f;n.value>=0&&(d||l)&&((s=n.value-(u||0))||void 0===u)&&(u=n.value,n.delta=s,n.rating=(f=n.value)>o[1]?"poor":f>o[0]?"needs-improvement":"good",r(n))}},R=-1,w=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},O=function(){E(function(r){R=r.timeStamp},!0)},j=function(){return R<0&&(R=w(),O(),g(function(){setTimeout(function(){R=w(),O()},0)})),{get firstHiddenTime(){return R}}},A=function(r,n){n=n||{};var o,l=[1800,3e3],u=j(),s=P("FCP"),c=function(r){r.forEach(function(r){"first-contentful-paint"===r.name&&(f&&f.disconnect(),r.startTime-1&&r(n)},u=P("CLS",0),s=0,d=[],p=function(r){r.forEach(function(r){if(!r.hadRecentInput){var n=d[0],o=d[d.length-1];s&&r.startTime-o.startTime<1e3&&r.startTime-n.startTime<5e3?(s+=r.value,d.push(r)):(s=r.value,d=[r]),s>u.value&&(u.value=s,u.entries=d,l())}})},f=b("layout-shift",p);f&&(l=S(i,u,o,n.reportAllChanges),E(function(){p(f.takeRecords()),l(!0)}),g(function(){s=0,C=-1,l=S(i,u=P("CLS",0),o,n.reportAllChanges)}))},x={passive:!0,capture:!0},N=new Date,L=function(r,n){l||(l=n,u=r,s=new Date,F(removeEventListener),D())},D=function(){if(u>=0&&u1e12?new Date:performance.now())-r.timeStamp;"pointerdown"==r.type?(n=function(){L(u,r),l()},o=function(){l()},l=function(){removeEventListener("pointerup",n,x),removeEventListener("pointercancel",o,x)},addEventListener("pointerup",n,x),addEventListener("pointercancel",o,x)):L(u,r)}},F=function(r){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return r(n,k,x)})},U=function(r,n){n=n||{};var o,s=[100,300],f=j(),h=P("FID"),v=function(r){r.startTimen.latency){if(o)o.entries.push(r),o.latency=Math.max(o.latency,r.duration);else{var l={id:r.interactionId,latency:r.duration,entries:[r]};K[l.id]=l,Y.push(l)}Y.sort(function(r,n){return n.latency-r.latency}),Y.splice(10).forEach(function(r){delete K[r.id]})}},$=function(r,n){n=n||{};var o=[200,500];G();var l,u=P("INP"),a=function(r){r.forEach(function(r){r.interactionId&&Q(r),"first-input"!==r.entryType||Y.some(function(n){return n.entries.some(function(n){return r.duration===n.duration&&r.startTime===n.startTime})})||Q(r)});var n,o=(n=Math.min(Y.length-1,Math.floor(X()/50)),Y[n]);o&&o.latency!==u.value&&(u.value=o.latency,u.entries=o.entries,l())},s=b("event",a,{durationThreshold:n.durationThreshold||40});l=S(r,u,o,n.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),E(function(){a(s.takeRecords()),u.value<0&&X()>0&&(u.value=0,u.entries=[]),l(!0)}),g(function(){Y=[],V=z(),l=S(r,u=P("INP"),o,n.reportAllChanges)}))},J={},Z=function(r,n){n=n||{};var o,l=[2500,4e3],u=j(),s=P("LCP"),c=function(r){var n=r[r.length-1];if(n){var l=n.startTime-y();lperformance.now())return;l.entries=[s],u(!0),g(function(){(u=S(r,l=P("TTFB",0),o,n.reportAllChanges))(!0)})}})},r.exports=o},9423:function(r,n){"use strict";function isAPIRoute(r){return"/api"===r||!!(null==r?void 0:r.startsWith("/api/"))}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isAPIRoute",{enumerable:!0,get:function(){return isAPIRoute}})},676:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return isError},getProperError:function(){return getProperError}});let l=o(9942);function isError(r){return"object"==typeof r&&null!==r&&"name"in r&&"message"in r}function getProperError(r){return isError(r)?r:Error((0,l.isPlainObject)(r)?JSON.stringify(r):r+"")}},2407:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{INTERCEPTION_ROUTE_MARKERS:function(){return u},isInterceptionRouteAppPath:function(){return isInterceptionRouteAppPath},extractInterceptionRouteInformation:function(){return extractInterceptionRouteInformation}});let l=o(9537),u=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(r){return void 0!==r.split("/").find(r=>u.find(n=>r.startsWith(n)))}function extractInterceptionRouteInformation(r){let n,o,s;for(let l of r.split("/"))if(o=u.find(r=>l.startsWith(r))){[n,s]=r.split(o,2);break}if(!n||!o||!s)throw Error(`Invalid interception route: ${r}. Must be in the format //(..|...|..)(..)/`);switch(n=(0,l.normalizeAppPath)(n),o){case"(.)":s="/"===n?`/${s}`:n+"/"+s;break;case"(..)":if("/"===n)throw Error(`Invalid interception route: ${r}. Cannot use (..) marker at the root level, use (.) instead.`);s=n.split("/").slice(0,-1).concat(s).join("/");break;case"(...)":s="/"+s;break;case"(..)(..)":let d=n.split("/");if(d.length<=2)throw Error(`Invalid interception route: ${r}. Cannot use (..)(..) marker at the root level or one level up.`);s=d.slice(0,-2).concat(s).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:n,interceptedRoute:s}}},2431:function(){},8754:function(r,n,o){"use strict";function _interop_require_default(r){return r&&r.__esModule?r:{default:r}}o.r(n),o.d(n,{_:function(){return _interop_require_default},_interop_require_default:function(){return _interop_require_default}})},1757:function(r,n,o){"use strict";function _getRequireWildcardCache(r){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(_getRequireWildcardCache=function(r){return r?o:n})(r)}function _interop_require_wildcard(r,n){if(!n&&r&&r.__esModule)return r;if(null===r||"object"!=typeof r&&"function"!=typeof r)return{default:r};var o=_getRequireWildcardCache(n);if(o&&o.has(r))return o.get(r);var l={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if("default"!==s&&Object.prototype.hasOwnProperty.call(r,s)){var d=u?Object.getOwnPropertyDescriptor(r,s):null;d&&(d.get||d.set)?Object.defineProperty(l,s,d):l[s]=r[s]}return l.default=r,o&&o.set(r,l),l}o.r(n),o.d(n,{_:function(){return _interop_require_wildcard},_interop_require_wildcard:function(){return _interop_require_wildcard}})}},function(r){r.O(0,[774],function(){return r(r.s=6653)}),_N_E=r.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/main-4011938bbc868074.js b/rln-js/_next/static/chunks/main-4011938bbc868074.js deleted file mode 100644 index 6418516..0000000 --- a/rln-js/_next/static/chunks/main-4011938bbc868074.js +++ /dev/null @@ -1 +0,0 @@ -(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[179],{4878:function(r,n){"use strict";function getDeploymentIdQueryOrEmptyString(){return""}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getDeploymentIdQueryOrEmptyString",{enumerable:!0,get:function(){return getDeploymentIdQueryOrEmptyString}})},37:function(){"trimStart"in String.prototype||(String.prototype.trimStart=String.prototype.trimLeft),"trimEnd"in String.prototype||(String.prototype.trimEnd=String.prototype.trimRight),"description"in Symbol.prototype||Object.defineProperty(Symbol.prototype,"description",{configurable:!0,get:function(){var r=/\((.*)\)/.exec(this.toString());return r?r[1]:void 0}}),Array.prototype.flat||(Array.prototype.flat=function(r,n){return n=this.concat.apply([],this),r>1&&n.some(Array.isArray)?n.flat(r-1):n},Array.prototype.flatMap=function(r,n){return this.map(r,n).flat()}),Promise.prototype.finally||(Promise.prototype.finally=function(r){if("function"!=typeof r)return this.then(r,r);var n=this.constructor||Promise;return this.then(function(o){return n.resolve(r()).then(function(){return o})},function(o){return n.resolve(r()).then(function(){throw o})})}),Object.fromEntries||(Object.fromEntries=function(r){return Array.from(r).reduce(function(r,n){return r[n[0]]=n[1],r},{})}),Array.prototype.at||(Array.prototype.at=function(r){var n=Math.trunc(r)||0;if(n<0&&(n+=this.length),!(n<0||n>=this.length))return this[n]})},5864:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addBasePath",{enumerable:!0,get:function(){return addBasePath}});let l=o(3776),u=o(2955);function addBasePath(r,n){return(0,u.normalizePathTrailingSlash)((0,l.addPathPrefix)(r,""))}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2048:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addLocale",{enumerable:!0,get:function(){return addLocale}}),o(2955);let addLocale=function(r){for(var n=arguments.length,o=Array(n>1?n-1:0),l=1;l25){window.location.reload();return}clearTimeout(n),n=setTimeout(init,u>5?5e3:1e3)}o&&o.close();let{hostname:s,port:d}=location,f=function(r){let n=location.protocol;try{n=new URL(r).protocol}catch(r){}return"http:"===n?"ws":"wss"}(r.assetPrefix||""),h=r.assetPrefix.replace(/^\/+/,""),g=f+"://"+s+":"+d+(h?"/"+h:"");h.startsWith("http")&&(g=f+"://"+h.split("://")[1]),(o=new window.WebSocket(""+g+r.path)).onopen=function(){u=0,window.console.log("[HMR] connected")},o.onerror=handleDisconnect,o.onclose=handleDisconnect,o.onmessage=function(r){let n=JSON.parse(r.data);for(let r of l)r(n)}}()}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5213:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"hasBasePath",{enumerable:!0,get:function(){return hasBasePath}});let l=o(6315);function hasBasePath(r){return(0,l.pathHasPrefix)(r,"")}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4477:function(r,n){"use strict";let o;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{DOMAttributeNames:function(){return l},isEqualNode:function(){return isEqualNode},default:function(){return initHeadManager}});let l={acceptCharset:"accept-charset",className:"class",htmlFor:"for",httpEquiv:"http-equiv",noModule:"noModule"};function reactElementToDOM(r){let{type:n,props:o}=r,u=document.createElement(n);for(let r in o){if(!o.hasOwnProperty(r)||"children"===r||"dangerouslySetInnerHTML"===r||void 0===o[r])continue;let s=l[r]||r.toLowerCase();"script"===n&&("async"===s||"defer"===s||"noModule"===s)?u[s]=!!o[r]:u.setAttribute(s,o[r])}let{children:s,dangerouslySetInnerHTML:d}=o;return d?u.innerHTML=d.__html||"":s&&(u.textContent="string"==typeof s?s:Array.isArray(s)?s.join(""):""),u}function isEqualNode(r,n){if(r instanceof HTMLElement&&n instanceof HTMLElement){let o=n.getAttribute("nonce");if(o&&!r.getAttribute("nonce")){let l=n.cloneNode(!0);return l.setAttribute("nonce",""),l.nonce=o,o===r.nonce&&r.isEqualNode(l)}}return r.isEqualNode(n)}function initHeadManager(){return{mountedInstances:new Set,updateHead:r=>{let n={};r.forEach(r=>{if("link"===r.type&&r.props["data-optimized-fonts"]){if(document.querySelector('style[data-href="'+r.props["data-href"]+'"]'))return;r.props.href=r.props["data-href"],r.props["data-href"]=void 0}let o=n[r.type]||[];o.push(r),n[r.type]=o});let l=n.title?n.title[0]:null,u="";if(l){let{children:r}=l.props;u="string"==typeof r?r:Array.isArray(r)?r.join(""):""}u!==document.title&&(document.title=u),["meta","base","link","style","script"].forEach(r=>{o(r,n[r]||[])})}}}o=(r,n)=>{let o=document.getElementsByTagName("head")[0],l=o.querySelector("meta[name=next-head-count]"),u=Number(l.content),s=[];for(let n=0,o=l.previousElementSibling;n{for(let n=0,o=s.length;n{var n;return null==(n=r.parentNode)?void 0:n.removeChild(r)}),f.forEach(r=>o.insertBefore(r,l)),l.content=(u-s.length+f.length).toString()},("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},223:function(r,n,o){"use strict";let l,u,s,d,f,h,g,_,y,P,b,E;Object.defineProperty(n,"__esModule",{value:!0});let S=o(1757);Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{version:function(){return J},router:function(){return l},emitter:function(){return Z},initialize:function(){return initialize},hydrate:function(){return hydrate}});let R=o(8754);o(37);let w=R._(o(7294)),O=R._(o(745)),j=o(7768),A=R._(o(3745)),M=o(637),C=o(9987),I=o(8011),x=o(4828),N=o(510),L=o(1306),D=o(5091),k=R._(o(4477)),F=R._(o(7375)),U=R._(o(3129)),H=o(9513),B=o(4751),W=o(676),q=o(4955),z=o(7786),G=o(5213),V=o(1158),X=o(7178),Y=o(8197),K=R._(o(2565)),Q=R._(o(2295)),$=R._(o(6077)),J="13.5.6",Z=(0,A.default)(),looseToArray=r=>[].slice.call(r),ee=!1;let Container=class Container extends w.default.Component{componentDidCatch(r,n){this.props.fn(r,n)}componentDidMount(){this.scrollToHash(),l.isSsr&&(u.isFallback||u.nextExport&&((0,I.isDynamicRoute)(l.pathname)||location.search||ee)||u.props&&u.props.__N_SSG&&(location.search||ee))&&l.replace(l.pathname+"?"+String((0,x.assign)((0,x.urlQueryToSearchParams)(l.query),new URLSearchParams(location.search))),s,{_h:1,shallow:!u.isFallback&&!ee}).catch(r=>{if(!r.cancelled)throw r})}componentDidUpdate(){this.scrollToHash()}scrollToHash(){let{hash:r}=location;if(!(r=r&&r.substring(1)))return;let n=document.getElementById(r);n&&setTimeout(()=>n.scrollIntoView(),0)}render(){return this.props.children}};async function initialize(r){void 0===r&&(r={}),Q.default.onSpanEnd($.default),u=JSON.parse(document.getElementById("__NEXT_DATA__").textContent),window.__NEXT_DATA__=u,E=u.defaultLocale;let n=u.assetPrefix||"";if(self.__next_set_public_path__(""+n+"/_next/"),(0,N.setConfig)({serverRuntimeConfig:{},publicRuntimeConfig:u.runtimeConfig||{}}),s=(0,L.getURL)(),(0,G.hasBasePath)(s)&&(s=(0,z.removeBasePath)(s)),u.scriptLoader){let{initScriptLoader:r}=o(2288);r(u.scriptLoader)}d=new F.default(u.buildId,n);let register=r=>{let[n,o]=r;return d.routeLoader.onEntrypoint(n,o)};return window.__NEXT_P&&window.__NEXT_P.map(r=>setTimeout(()=>register(r),0)),window.__NEXT_P=[],window.__NEXT_P.push=register,(h=(0,k.default)()).getIsSsr=()=>l.isSsr,f=document.getElementById("__next"),{assetPrefix:n}}function renderApp(r,n){return w.default.createElement(r,n)}function AppContainer(r){var n;let{children:o}=r,u=w.default.useMemo(()=>(0,X.adaptForAppRouterInstance)(l),[]);return w.default.createElement(Container,{fn:r=>renderError({App:y,err:r}).catch(r=>console.error("Error rendering page: ",r))},w.default.createElement(V.AppRouterContext.Provider,{value:u},w.default.createElement(Y.SearchParamsContext.Provider,{value:(0,X.adaptForSearchParams)(l)},w.default.createElement(X.PathnameContextProviderAdapter,{router:l,isAutoExport:null!=(n=self.__NEXT_DATA__.autoExport)&&n},w.default.createElement(Y.PathParamsContext.Provider,{value:(0,X.adaptForPathParams)(l)},w.default.createElement(M.RouterContext.Provider,{value:(0,B.makePublicRouterInstance)(l)},w.default.createElement(j.HeadManagerContext.Provider,{value:h},w.default.createElement(q.ImageConfigContext.Provider,{value:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}},o))))))))}let wrapApp=r=>n=>{let o={...n,Component:b,err:u.err,router:l};return w.default.createElement(AppContainer,null,renderApp(r,o))};function renderError(r){let{App:n,err:f}=r;return console.error(f),console.error("A client-side exception has occurred, see here for more info: https://nextjs.org/docs/messages/client-side-exception-occurred"),d.loadPage("/_error").then(l=>{let{page:u,styleSheets:s}=l;return(null==g?void 0:g.Component)===u?Promise.resolve().then(()=>S._(o(4570))).then(l=>Promise.resolve().then(()=>S._(o(8955))).then(o=>(n=o.default,r.App=n,l))).then(r=>({ErrorComponent:r.default,styleSheets:[]})):{ErrorComponent:u,styleSheets:s}}).then(o=>{var d;let{ErrorComponent:h,styleSheets:g}=o,_=wrapApp(n),y={Component:h,AppTree:_,router:l,ctx:{err:f,pathname:u.page,query:u.query,asPath:s,AppTree:_}};return Promise.resolve((null==(d=r.props)?void 0:d.err)?r.props:(0,L.loadGetInitialProps)(n,y)).then(n=>doRender({...r,err:f,Component:h,styleSheets:g,props:n}))})}function Head(r){let{callback:n}=r;return w.default.useLayoutEffect(()=>n(),[n]),null}let et={navigationStart:"navigationStart",beforeRender:"beforeRender",afterRender:"afterRender",afterHydrate:"afterHydrate",routeChange:"routeChange"},er={hydration:"Next.js-hydration",beforeHydration:"Next.js-before-hydration",routeChangeToRender:"Next.js-route-change-to-render",render:"Next.js-render"},en=null,ea=!0;function clearMarks(){[et.beforeRender,et.afterHydrate,et.afterRender,et.routeChange].forEach(r=>performance.clearMarks(r))}function markHydrateComplete(){if(!L.ST)return;performance.mark(et.afterHydrate);let r=performance.getEntriesByName(et.beforeRender,"mark").length;r&&(performance.measure(er.beforeHydration,et.navigationStart,et.beforeRender),performance.measure(er.hydration,et.beforeRender,et.afterHydrate)),P&&performance.getEntriesByName(er.hydration).forEach(P),clearMarks()}function markRenderComplete(){if(!L.ST)return;performance.mark(et.afterRender);let r=performance.getEntriesByName(et.routeChange,"mark");if(!r.length)return;let n=performance.getEntriesByName(et.beforeRender,"mark").length;n&&(performance.measure(er.routeChangeToRender,r[0].name,et.beforeRender),performance.measure(er.render,et.beforeRender,et.afterRender),P&&(performance.getEntriesByName(er.render).forEach(P),performance.getEntriesByName(er.routeChangeToRender).forEach(P))),clearMarks(),[er.routeChangeToRender,er.render].forEach(r=>performance.clearMeasures(r))}function Root(r){let{callbacks:n,children:o}=r;return w.default.useLayoutEffect(()=>n.forEach(r=>r()),[n]),w.default.useEffect(()=>{(0,U.default)(P)},[]),o}function doRender(r){let n,{App:o,Component:u,props:s,err:d}=r,h="initial"in r?void 0:r.styleSheets;u=u||g.Component,s=s||g.props;let y={...s,Component:u,err:d,router:l};g=y;let P=!1,b=new Promise((r,o)=>{_&&_(),n=()=>{_=null,r()},_=()=>{P=!0,_=null;let r=Error("Cancel rendering route");r.cancelled=!0,o(r)}});function onRootCommit(){n()}!function(){if(!h)return;let r=looseToArray(document.querySelectorAll("style[data-n-href]")),n=new Set(r.map(r=>r.getAttribute("data-n-href"))),o=document.querySelector("noscript[data-n-css]"),l=null==o?void 0:o.getAttribute("data-n-css");h.forEach(r=>{let{href:o,text:u}=r;if(!n.has(o)){let r=document.createElement("style");r.setAttribute("data-n-href",o),r.setAttribute("media","x"),l&&r.setAttribute("nonce",l),document.head.appendChild(r),r.appendChild(document.createTextNode(u))}})}();let E=w.default.createElement(w.default.Fragment,null,w.default.createElement(Head,{callback:function(){if(h&&!P){let r=new Set(h.map(r=>r.href)),n=looseToArray(document.querySelectorAll("style[data-n-href]")),o=n.map(r=>r.getAttribute("data-n-href"));for(let l=0;l{let{href:n}=r,o=document.querySelector('style[data-n-href="'+n+'"]');o&&(l.parentNode.insertBefore(o,l.nextSibling),l=o)}),looseToArray(document.querySelectorAll("link[data-n-p]")).forEach(r=>{r.parentNode.removeChild(r)})}if(r.scroll){let{x:n,y:o}=r.scroll;(0,C.handleSmoothScroll)(()=>{window.scrollTo(n,o)})}}}),w.default.createElement(AppContainer,null,renderApp(o,y),w.default.createElement(D.Portal,{type:"next-route-announcer"},w.default.createElement(H.RouteAnnouncer,null))));return!function(r,n){L.ST&&performance.mark(et.beforeRender);let o=n(ea?markHydrateComplete:markRenderComplete);if(en){let r=w.default.startTransition;r(()=>{en.render(o)})}else en=O.default.hydrateRoot(r,o,{onRecoverableError:K.default}),ea=!1}(f,r=>w.default.createElement(Root,{callbacks:[r,onRootCommit]},E)),b}async function render(r){if(r.err){await renderError(r);return}try{await doRender(r)}catch(o){let n=(0,W.getProperError)(o);if(n.cancelled)throw n;await renderError({...r,err:n})}}async function hydrate(r){let n=u.err;try{let r=await d.routeLoader.whenEntrypoint("/_app");if("error"in r)throw r.error;let{component:n,exports:o}=r;y=n,o&&o.reportWebVitals&&(P=r=>{let n,{id:l,name:u,startTime:s,value:d,duration:f,entryType:h,entries:g,attribution:_}=r,y=Date.now()+"-"+(Math.floor(Math.random()*(9e12-1))+1e12);g&&g.length&&(n=g[0].startTime);let P={id:l||y,name:u,startTime:s||n,value:null==d?f:d,label:"mark"===h||"measure"===h?"custom":"web-vital"};_&&(P.attribution=_),o.reportWebVitals(P)});let l=await d.routeLoader.whenEntrypoint(u.page);if("error"in l)throw l.error;b=l.component}catch(r){n=(0,W.getProperError)(r)}window.__NEXT_PRELOADREADY&&await window.__NEXT_PRELOADREADY(u.dynamicIds),l=(0,B.createRouter)(u.page,u.query,s,{initialProps:u.props,pageLoader:d,App:y,Component:b,wrapApp,err:n,isFallback:!!u.isFallback,subscription:(r,n,o)=>render(Object.assign({},r,{App:n,scroll:o})),locale:u.locale,locales:u.locales,defaultLocale:E,domainLocales:u.domainLocales,isPreview:u.isPreview}),ee=await l._initialMatchesMiddlewarePromise;let o={App:y,initial:!0,Component:b,props:u.props,err:n};(null==r?void 0:r.beforeRender)&&await r.beforeRender(),render(o)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},6653:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),o(1867);let l=o(223);window.next={version:l.version,get router(){return l.router},emitter:l.emitter},(0,l.initialize)({}).then(()=>(0,l.hydrate)()).catch(console.error),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizePathTrailingSlash",{enumerable:!0,get:function(){return normalizePathTrailingSlash}});let l=o(6082),u=o(891),normalizePathTrailingSlash=r=>{if(!r.startsWith("/"))return r;let{pathname:n,query:o,hash:s}=(0,u.parsePath)(r);return""+(0,l.removeTrailingSlash)(n)+o+s};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2565:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return onRecoverableError}});let l=o(4600);function onRecoverableError(r){let n="function"==typeof reportError?reportError:r=>{window.console.error(r)};r.digest!==l.NEXT_DYNAMIC_NO_SSR_CODE&&n(r)}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7375:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return PageLoader}});let l=o(8754),u=o(5864),s=o(9381),d=l._(o(8052)),f=o(2048),h=o(8011),g=o(9823),_=o(6082),y=o(7159);o(729);let PageLoader=class PageLoader{getPageList(){return(0,y.getClientBuildManifest)().then(r=>r.sortedPages)}getMiddleware(){return window.__MIDDLEWARE_MATCHERS=[],window.__MIDDLEWARE_MATCHERS}getDataHref(r){let{asPath:n,href:o,locale:l}=r,{pathname:y,query:P,search:b}=(0,g.parseRelativeUrl)(o),{pathname:E}=(0,g.parseRelativeUrl)(n),S=(0,_.removeTrailingSlash)(y);if("/"!==S[0])throw Error('Route name should start with a "/", got "'+S+'"');return(r=>{let n=(0,d.default)((0,_.removeTrailingSlash)((0,f.addLocale)(r,l)),".json");return(0,u.addBasePath)("/_next/data/"+this.buildId+n+b,!0)})(r.skipInterpolation?E:(0,h.isDynamicRoute)(S)?(0,s.interpolateAs)(y,E,P).result:S)}_isSsg(r){return this.promisedSsgManifest.then(n=>n.has(r))}loadPage(r){return this.routeLoader.loadRoute(r).then(r=>{if("component"in r)return{page:r.component,mod:r.exports,styleSheets:r.styles.map(r=>({href:r.href,text:r.content}))};throw r.error})}prefetch(r){return this.routeLoader.prefetch(r)}constructor(r,n){this.routeLoader=(0,y.createRouteLoader)(n),this.buildId=r,this.assetPrefix=n,this.promisedSsgManifest=new Promise(r=>{window.__SSG_MANIFEST?r(window.__SSG_MANIFEST):window.__SSG_MANIFEST_CB=()=>{r(window.__SSG_MANIFEST)}})}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3129:function(r,n,o){"use strict";let l;Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return _default}});let u=["CLS","FCP","FID","INP","LCP","TTFB"];location.href;let s=!1;function onReport(r){l&&l(r)}let _default=r=>{if(l=r,!s)for(let r of(s=!0,u))try{let n;n||(n=o(8018)),n["on"+r](onReport)}catch(n){console.warn("Failed to track "+r+" web-vital",n)}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5091:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"Portal",{enumerable:!0,get:function(){return Portal}});let l=o(7294),u=o(3935),Portal=r=>{let{children:n,type:o}=r,[s,d]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let r=document.createElement(o);return document.body.appendChild(r),d(r),()=>{document.body.removeChild(r)}},[o]),s?(0,u.createPortal)(n,s):null};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7786:function(r,n,o){"use strict";function removeBasePath(r){return r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeBasePath",{enumerable:!0,get:function(){return removeBasePath}}),o(5213),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3099:function(r,n,o){"use strict";function removeLocale(r,n){return r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeLocale",{enumerable:!0,get:function(){return removeLocale}}),o(891),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},3767:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{requestIdleCallback:function(){return o},cancelIdleCallback:function(){return l}});let o="undefined"!=typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(r){let n=Date.now();return self.setTimeout(function(){r({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-n))}})},1)},l="undefined"!=typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(r){return clearTimeout(r)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4785:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"resolveHref",{enumerable:!0,get:function(){return resolveHref}});let l=o(4828),u=o(3833),s=o(9302),d=o(1306),f=o(2955),h=o(4131),g=o(1232),_=o(9381);function resolveHref(r,n,o){let y;let P="string"==typeof n?n:(0,u.formatWithValidation)(n),b=P.match(/^[a-zA-Z]{1,}:\/\//),E=b?P.slice(b[0].length):P,S=E.split("?");if((S[0]||"").match(/(\/\/|\\)/)){console.error("Invalid href '"+P+"' passed to next/router in page: '"+r.pathname+"'. Repeated forward-slashes (//) or backslashes \\ are not valid in the href.");let n=(0,d.normalizeRepeatedSlashes)(E);P=(b?b[0]:"")+n}if(!(0,h.isLocalURL)(P))return o?[P]:P;try{y=new URL(P.startsWith("#")?r.asPath:r.pathname,"http://n")}catch(r){y=new URL("/","http://n")}try{let r=new URL(P,y);r.pathname=(0,f.normalizePathTrailingSlash)(r.pathname);let n="";if((0,g.isDynamicRoute)(r.pathname)&&r.searchParams&&o){let o=(0,l.searchParamsToUrlQuery)(r.searchParams),{result:d,params:f}=(0,_.interpolateAs)(r.pathname,r.pathname,o);d&&(n=(0,u.formatWithValidation)({pathname:d,hash:r.hash,query:(0,s.omit)(o,f)}))}let d=r.origin===y.origin?r.href.slice(r.origin.length):r.href;return o?[d,n||d]:d}catch(r){return o?[P]:P}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},9513:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{RouteAnnouncer:function(){return RouteAnnouncer},default:function(){return f}});let l=o(8754),u=l._(o(7294)),s=o(4751),d={border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",top:0,width:"1px",whiteSpace:"nowrap",wordWrap:"normal"},RouteAnnouncer=()=>{let{asPath:r}=(0,s.useRouter)(),[n,o]=u.default.useState(""),l=u.default.useRef(r);return u.default.useEffect(()=>{if(l.current!==r){if(l.current=r,document.title)o(document.title);else{var n;let l=document.querySelector("h1"),u=null!=(n=null==l?void 0:l.innerText)?n:null==l?void 0:l.textContent;o(u||r)}}},[r]),u.default.createElement("p",{"aria-live":"assertive",id:"__next-route-announcer__",role:"alert",style:d},n)},f=RouteAnnouncer;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7159:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{markAssetError:function(){return markAssetError},isAssetError:function(){return isAssetError},getClientBuildManifest:function(){return getClientBuildManifest},createRouteLoader:function(){return createRouteLoader}}),o(8754),o(8052);let l=o(4581),u=o(3767),s=o(4878);function withFuture(r,n,o){let l,u=n.get(r);if(u)return"future"in u?u.future:Promise.resolve(u);let s=new Promise(r=>{l=r});return n.set(r,u={resolve:l,future:s}),o?o().then(r=>(l(r),r)).catch(o=>{throw n.delete(r),o}):s}let d=Symbol("ASSET_LOAD_ERROR");function markAssetError(r){return Object.defineProperty(r,d,{})}function isAssetError(r){return r&&d in r}let f=function(r){try{return r=document.createElement("link"),!!window.MSInputMethodContext&&!!document.documentMode||r.relList.supports("prefetch")}catch(r){return!1}}(),getAssetQueryString=()=>(0,s.getDeploymentIdQueryOrEmptyString)();function resolvePromiseWithTimeout(r,n,o){return new Promise((l,s)=>{let d=!1;r.then(r=>{d=!0,l(r)}).catch(s),(0,u.requestIdleCallback)(()=>setTimeout(()=>{d||s(o)},n))})}function getClientBuildManifest(){if(self.__BUILD_MANIFEST)return Promise.resolve(self.__BUILD_MANIFEST);let r=new Promise(r=>{let n=self.__BUILD_MANIFEST_CB;self.__BUILD_MANIFEST_CB=()=>{r(self.__BUILD_MANIFEST),n&&n()}});return resolvePromiseWithTimeout(r,3800,markAssetError(Error("Failed to load client build manifest")))}function getFilesForRoute(r,n){return getClientBuildManifest().then(o=>{if(!(n in o))throw markAssetError(Error("Failed to lookup route: "+n));let u=o[n].map(n=>r+"/_next/"+encodeURI(n));return{scripts:u.filter(r=>r.endsWith(".js")).map(r=>(0,l.__unsafeCreateTrustedScriptURL)(r)+getAssetQueryString()),css:u.filter(r=>r.endsWith(".css")).map(r=>r+getAssetQueryString())}})}function createRouteLoader(r){let n=new Map,o=new Map,l=new Map,s=new Map;function maybeExecuteScript(r){{var n;let l=o.get(r.toString());return l||(document.querySelector('script[src^="'+r+'"]')?Promise.resolve():(o.set(r.toString(),l=new Promise((o,l)=>{(n=document.createElement("script")).onload=o,n.onerror=()=>l(markAssetError(Error("Failed to load script: "+r))),n.crossOrigin=void 0,n.src=r,document.body.appendChild(n)})),l))}}function fetchStyleSheet(r){let n=l.get(r);return n||l.set(r,n=fetch(r).then(n=>{if(!n.ok)throw Error("Failed to load stylesheet: "+r);return n.text().then(n=>({href:r,content:n}))}).catch(r=>{throw markAssetError(r)})),n}return{whenEntrypoint:r=>withFuture(r,n),onEntrypoint(r,o){(o?Promise.resolve().then(()=>o()).then(r=>({component:r&&r.default||r,exports:r}),r=>({error:r})):Promise.resolve(void 0)).then(o=>{let l=n.get(r);l&&"resolve"in l?o&&(n.set(r,o),l.resolve(o)):(o?n.set(r,o):n.delete(r),s.delete(r))})},loadRoute(o,l){return withFuture(o,s,()=>{let u;return resolvePromiseWithTimeout(getFilesForRoute(r,o).then(r=>{let{scripts:l,css:u}=r;return Promise.all([n.has(o)?[]:Promise.all(l.map(maybeExecuteScript)),Promise.all(u.map(fetchStyleSheet))])}).then(r=>this.whenEntrypoint(o).then(n=>({entrypoint:n,styles:r[1]}))),3800,markAssetError(Error("Route did not complete loading: "+o))).then(r=>{let{entrypoint:n,styles:o}=r,l=Object.assign({styles:o},n);return"error"in n?n:l}).catch(r=>{if(l)throw r;return{error:r}}).finally(()=>null==u?void 0:u())})},prefetch(n){let o;return(o=navigator.connection)&&(o.saveData||/2g/.test(o.effectiveType))?Promise.resolve():getFilesForRoute(r,n).then(r=>Promise.all(f?r.scripts.map(r=>{var n,o,l;return n=r.toString(),o="script",new Promise((r,u)=>{let s='\n link[rel="prefetch"][href^="'+n+'"],\n link[rel="preload"][href^="'+n+'"],\n script[src^="'+n+'"]';if(document.querySelector(s))return r();l=document.createElement("link"),o&&(l.as=o),l.rel="prefetch",l.crossOrigin=void 0,l.onload=r,l.onerror=()=>u(markAssetError(Error("Failed to prefetch: "+n))),l.href=n,document.head.appendChild(l)})}):[])).then(()=>{(0,u.requestIdleCallback)(()=>this.loadRoute(n,!0).catch(()=>{}))}).catch(()=>{})}}}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4751:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{Router:function(){return s.default},default:function(){return P},withRouter:function(){return h.default},useRouter:function(){return useRouter},createRouter:function(){return createRouter},makePublicRouterInstance:function(){return makePublicRouterInstance}});let l=o(8754),u=l._(o(7294)),s=l._(o(7797)),d=o(637),f=l._(o(676)),h=l._(o(7727)),g={router:null,readyCallbacks:[],ready(r){if(this.router)return r();this.readyCallbacks.push(r)}},_=["pathname","route","query","asPath","components","isFallback","basePath","locale","locales","defaultLocale","isReady","isPreview","isLocaleDomain","domainLocales"],y=["push","replace","reload","back","prefetch","beforePopState"];function getRouter(){if(!g.router)throw Error('No router instance found.\nYou should only use "next/router" on the client side of your app.\n');return g.router}Object.defineProperty(g,"events",{get:()=>s.default.events}),_.forEach(r=>{Object.defineProperty(g,r,{get(){let n=getRouter();return n[r]}})}),y.forEach(r=>{g[r]=function(){for(var n=arguments.length,o=Array(n),l=0;l{g.ready(()=>{s.default.events.on(r,function(){for(var n=arguments.length,o=Array(n),l=0;lr()),g.readyCallbacks=[],g.router}function makePublicRouterInstance(r){let n={};for(let o of _){if("object"==typeof r[o]){n[o]=Object.assign(Array.isArray(r[o])?[]:{},r[o]);continue}n[o]=r[o]}return n.events=s.default.events,y.forEach(o=>{n[o]=function(){for(var n=arguments.length,l=Array(n),u=0;u{if(s.default.preinit){r.forEach(r=>{s.default.preinit(r,{as:"style"})});return}{let n=document.head;r.forEach(r=>{let o=document.createElement("link");o.type="text/css",o.rel="stylesheet",o.href=r,n.appendChild(o)})}},loadScript=r=>{let{src:n,id:o,onLoad:l=()=>{},onReady:u=null,dangerouslySetInnerHTML:s,children:d="",strategy:f="afterInteractive",onError:g,stylesheets:b}=r,E=o||n;if(E&&y.has(E))return;if(_.has(n)){y.add(E),_.get(n).then(l,g);return}let afterLoad=()=>{u&&u(),y.add(E)},S=document.createElement("script"),R=new Promise((r,n)=>{S.addEventListener("load",function(n){r(),l&&l.call(this,n),afterLoad()}),S.addEventListener("error",function(r){n(r)})}).catch(function(r){g&&g(r)});for(let[o,l]of(s?(S.innerHTML=s.__html||"",afterLoad()):d?(S.textContent="string"==typeof d?d:Array.isArray(d)?d.join(""):"",afterLoad()):n&&(S.src=n,_.set(n,R)),Object.entries(r))){if(void 0===l||P.includes(o))continue;let r=h.DOMAttributeNames[o]||o.toLowerCase();S.setAttribute(r,l)}"worker"===f&&S.setAttribute("type","text/partytown"),S.setAttribute("data-nscript",f),b&&insertStylesheets(b),document.body.appendChild(S)};function handleClientScriptLoad(r){let{strategy:n="afterInteractive"}=r;"lazyOnload"===n?window.addEventListener("load",()=>{(0,g.requestIdleCallback)(()=>loadScript(r))}):loadScript(r)}function initScriptLoader(r){r.forEach(handleClientScriptLoad),function(){let r=[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')];r.forEach(r=>{let n=r.id||r.getAttribute("src");y.add(n)})}()}function Script(r){let{id:n,src:o="",onLoad:l=()=>{},onReady:u=null,strategy:h="afterInteractive",onError:_,stylesheets:P,...b}=r,{updateScripts:E,scripts:S,getIsSsr:R,appDir:w,nonce:O}=(0,d.useContext)(f.HeadManagerContext),j=(0,d.useRef)(!1);(0,d.useEffect)(()=>{let r=n||o;j.current||(u&&r&&y.has(r)&&u(),j.current=!0)},[u,n,o]);let A=(0,d.useRef)(!1);if((0,d.useEffect)(()=>{!A.current&&("afterInteractive"===h?loadScript(r):"lazyOnload"===h&&("complete"===document.readyState?(0,g.requestIdleCallback)(()=>loadScript(r)):window.addEventListener("load",()=>{(0,g.requestIdleCallback)(()=>loadScript(r))})),A.current=!0)},[r,h]),("beforeInteractive"===h||"worker"===h)&&(E?(S[h]=(S[h]||[]).concat([{id:n,src:o,onLoad:l,onReady:u,onError:_,...b}]),E(S)):R&&R()?y.add(n||o):R&&!R()&&loadScript(r)),w){if(P&&P.forEach(r=>{s.default.preinit(r,{as:"style"})}),"beforeInteractive"===h)return o?(s.default.preload(o,b.integrity?{as:"script",integrity:b.integrity}:{as:"script"}),d.default.createElement("script",{nonce:O,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([o])+")"}})):(b.dangerouslySetInnerHTML&&(b.children=b.dangerouslySetInnerHTML.__html,delete b.dangerouslySetInnerHTML),d.default.createElement("script",{nonce:O,dangerouslySetInnerHTML:{__html:"(self.__next_s=self.__next_s||[]).push("+JSON.stringify([0,{...b}])+")"}}));"afterInteractive"===h&&o&&s.default.preload(o,b.integrity?{as:"script",integrity:b.integrity}:{as:"script"})}return null}Object.defineProperty(Script,"__nextScript",{value:!0});let b=Script;("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},6077:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return reportToSocket}});let l=o(6948);function reportToSocket(r){if("ended"!==r.state.state)throw Error("Expected span to be ended");(0,l.sendMessage)(JSON.stringify({event:"span-end",startTime:r.startTime,endTime:r.state.endTime,spanName:r.name,attributes:r.attributes}))}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},2295:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(3745));let Span=class Span{end(r){if("ended"===this.state.state)throw Error("Span has already ended");this.state={state:"ended",endTime:null!=r?r:Date.now()},this.onSpanEnd(this)}constructor(r,n,o){var l,u;this.name=r,this.attributes=null!=(l=n.attributes)?l:{},this.startTime=null!=(u=n.startTime)?u:Date.now(),this.onSpanEnd=o,this.state={state:"inprogress"}}};let s=new class{startSpan(r,n){return new Span(r,n,this.handleSpanEnd)}onSpanEnd(r){return this._emitter.on("spanend",r),()=>{this._emitter.off("spanend",r)}}constructor(){this._emitter=(0,u.default)(),this.handleSpanEnd=r=>{this._emitter.emit("spanend",r)}}};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4581:function(r,n){"use strict";let o;function __unsafeCreateTrustedScriptURL(r){var n;return(null==(n=function(){if(void 0===o){var r;o=(null==(r=window.trustedTypes)?void 0:r.createPolicy("nextjs",{createHTML:r=>r,createScript:r=>r,createScriptURL:r=>r}))||null}return o}())?void 0:n.createScriptURL(r))||r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"__unsafeCreateTrustedScriptURL",{enumerable:!0,get:function(){return __unsafeCreateTrustedScriptURL}}),("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},1867:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),o(4878),self.__next_set_public_path__=r=>{o.p=r},("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},7727:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return withRouter}});let l=o(8754),u=l._(o(7294)),s=o(4751);function withRouter(r){function WithRouterWrapper(n){return u.default.createElement(r,{router:(0,s.useRouter)(),...n})}return WithRouterWrapper.getInitialProps=r.getInitialProps,WithRouterWrapper.origGetInitialProps=r.origGetInitialProps,WithRouterWrapper}("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},8955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return App}});let l=o(8754),u=l._(o(7294)),s=o(1306);async function appGetInitialProps(r){let{Component:n,ctx:o}=r,l=await (0,s.loadGetInitialProps)(n,o);return{pageProps:l}}let App=class App extends u.default.Component{render(){let{Component:r,pageProps:n}=this.props;return u.default.createElement(r,n)}};App.origGetInitialProps=appGetInitialProps,App.getInitialProps=appGetInitialProps,("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4570:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return Error}});let l=o(8754),u=l._(o(7294)),s=l._(o(46)),d={400:"Bad Request",404:"This page could not be found",405:"Method Not Allowed",500:"Internal Server Error"};function _getInitialProps(r){let{res:n,err:o}=r,l=n&&n.statusCode?n.statusCode:o?o.statusCode:404;return{statusCode:l}}let f={error:{fontFamily:'system-ui,"Segoe UI",Roboto,Helvetica,Arial,sans-serif,"Apple Color Emoji","Segoe UI Emoji"',height:"100vh",textAlign:"center",display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center"},desc:{lineHeight:"48px"},h1:{display:"inline-block",margin:"0 20px 0 0",paddingRight:23,fontSize:24,fontWeight:500,verticalAlign:"top"},h2:{fontSize:14,fontWeight:400,lineHeight:"28px"},wrap:{display:"inline-block"}};let Error=class Error extends u.default.Component{render(){let{statusCode:r,withDarkMode:n=!0}=this.props,o=this.props.title||d[r]||"An unexpected error has occurred";return u.default.createElement("div",{style:f.error},u.default.createElement(s.default,null,u.default.createElement("title",null,r?r+": "+o:"Application error: a client-side exception has occurred")),u.default.createElement("div",{style:f.desc},u.default.createElement("style",{dangerouslySetInnerHTML:{__html:"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}"+(n?"@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}":"")}}),r?u.default.createElement("h1",{className:"next-error-h1",style:f.h1},r):null,u.default.createElement("div",{style:f.wrap},u.default.createElement("h2",{style:f.h2},this.props.title||r?o:u.default.createElement(u.default.Fragment,null,"Application error: a client-side exception has occurred (see the browser console for more information)"),"."))))}};Error.displayName="ErrorPage",Error.getInitialProps=_getInitialProps,Error.origGetInitialProps=_getInitialProps,("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},5938:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"AmpStateContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext({})},8926:function(r,n){"use strict";function isInAmpMode(r){let{ampFirst:n=!1,hybrid:o=!1,hasQuery:l=!1}=void 0===r?{}:r;return n||o&&l}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isInAmpMode",{enumerable:!0,get:function(){return isInAmpMode}})},1158:function(r,n,o){"use strict";var l,u;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{CacheStates:function(){return l},AppRouterContext:function(){return f},LayoutRouterContext:function(){return h},GlobalLayoutRouterContext:function(){return g},TemplateContext:function(){return _}});let s=o(8754),d=s._(o(7294));(u=l||(l={})).LAZY_INITIALIZED="LAZYINITIALIZED",u.DATA_FETCH="DATAFETCH",u.READY="READY";let f=d.default.createContext(null),h=d.default.createContext(null),g=d.default.createContext(null),_=d.default.createContext(null)},1403:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"BloomFilter",{enumerable:!0,get:function(){return BloomFilter}});let BloomFilter=class BloomFilter{static from(r,n){void 0===n&&(n=.01);let o=new BloomFilter(r.length,n);for(let n of r)o.add(n);return o}export(){let r={numItems:this.numItems,errorRate:this.errorRate,numBits:this.numBits,numHashes:this.numHashes,bitArray:this.bitArray};return r}import(r){this.numItems=r.numItems,this.errorRate=r.errorRate,this.numBits=r.numBits,this.numHashes=r.numHashes,this.bitArray=r.bitArray}add(r){let n=this.getHashValues(r);n.forEach(r=>{this.bitArray[r]=1})}contains(r){let n=this.getHashValues(r);return n.every(r=>this.bitArray[r])}getHashValues(r){let n=[];for(let o=1;o<=this.numHashes;o++){let l=function(r){let n=0;for(let o=0;o>>13,n=Math.imul(n,1540483477)}return n>>>0}(""+r+o)%this.numBits;n.push(l)}return n}constructor(r,n){this.numItems=r,this.errorRate=n,this.numBits=Math.ceil(-(r*Math.log(n))/(Math.log(2)*Math.log(2))),this.numHashes=Math.ceil(this.numBits/r*Math.log(2)),this.bitArray=Array(this.numBits).fill(0)}}},729:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{MODERN_BROWSERSLIST_TARGET:function(){return u.default},COMPILER_NAMES:function(){return s},INTERNAL_HEADERS:function(){return d},COMPILER_INDEXES:function(){return f},PHASE_EXPORT:function(){return h},PHASE_PRODUCTION_BUILD:function(){return g},PHASE_PRODUCTION_SERVER:function(){return _},PHASE_DEVELOPMENT_SERVER:function(){return y},PHASE_TEST:function(){return P},PHASE_INFO:function(){return b},PAGES_MANIFEST:function(){return E},APP_PATHS_MANIFEST:function(){return S},APP_PATH_ROUTES_MANIFEST:function(){return R},BUILD_MANIFEST:function(){return w},APP_BUILD_MANIFEST:function(){return O},FUNCTIONS_CONFIG_MANIFEST:function(){return j},SUBRESOURCE_INTEGRITY_MANIFEST:function(){return A},NEXT_FONT_MANIFEST:function(){return M},EXPORT_MARKER:function(){return C},EXPORT_DETAIL:function(){return I},PRERENDER_MANIFEST:function(){return x},ROUTES_MANIFEST:function(){return N},IMAGES_MANIFEST:function(){return L},SERVER_FILES_MANIFEST:function(){return D},DEV_CLIENT_PAGES_MANIFEST:function(){return k},MIDDLEWARE_MANIFEST:function(){return F},DEV_MIDDLEWARE_MANIFEST:function(){return U},REACT_LOADABLE_MANIFEST:function(){return H},FONT_MANIFEST:function(){return B},SERVER_DIRECTORY:function(){return W},CONFIG_FILES:function(){return q},BUILD_ID_FILE:function(){return z},BLOCKED_PAGES:function(){return G},CLIENT_PUBLIC_FILES_PATH:function(){return V},CLIENT_STATIC_FILES_PATH:function(){return X},STRING_LITERAL_DROP_BUNDLE:function(){return Y},NEXT_BUILTIN_DOCUMENT:function(){return K},BARREL_OPTIMIZATION_PREFIX:function(){return Q},CLIENT_REFERENCE_MANIFEST:function(){return $},SERVER_REFERENCE_MANIFEST:function(){return J},MIDDLEWARE_BUILD_MANIFEST:function(){return Z},MIDDLEWARE_REACT_LOADABLE_MANIFEST:function(){return ee},CLIENT_STATIC_FILES_RUNTIME_MAIN:function(){return et},CLIENT_STATIC_FILES_RUNTIME_MAIN_APP:function(){return er},APP_CLIENT_INTERNALS:function(){return en},CLIENT_STATIC_FILES_RUNTIME_REACT_REFRESH:function(){return ea},CLIENT_STATIC_FILES_RUNTIME_AMP:function(){return eo},CLIENT_STATIC_FILES_RUNTIME_WEBPACK:function(){return ei},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS:function(){return el},CLIENT_STATIC_FILES_RUNTIME_POLYFILLS_SYMBOL:function(){return eu},EDGE_RUNTIME_WEBPACK:function(){return es},TEMPORARY_REDIRECT_STATUS:function(){return ec},PERMANENT_REDIRECT_STATUS:function(){return ed},STATIC_PROPS_ID:function(){return ef},SERVER_PROPS_ID:function(){return ep},PAGE_SEGMENT_KEY:function(){return eh},GOOGLE_FONT_PROVIDER:function(){return em},OPTIMIZED_FONT_PROVIDERS:function(){return eg},DEFAULT_SERIF_FONT:function(){return e_},DEFAULT_SANS_SERIF_FONT:function(){return ey},STATIC_STATUS_PAGES:function(){return eP},TRACE_OUTPUT_VERSION:function(){return ev},TURBO_TRACE_DEFAULT_MEMORY_LIMIT:function(){return eb},RSC_MODULE_TYPES:function(){return eE},EDGE_UNSUPPORTED_NODE_APIS:function(){return eS},SYSTEM_ENTRYPOINTS:function(){return eR}});let l=o(8754),u=l._(o(1329)),s={client:"client",server:"server",edgeServer:"edge-server"},d=["x-invoke-path","x-invoke-status","x-invoke-error","x-invoke-query","x-middleware-invoke"],f={[s.client]:0,[s.server]:1,[s.edgeServer]:2},h="phase-export",g="phase-production-build",_="phase-production-server",y="phase-development-server",P="phase-test",b="phase-info",E="pages-manifest.json",S="app-paths-manifest.json",R="app-path-routes-manifest.json",w="build-manifest.json",O="app-build-manifest.json",j="functions-config-manifest.json",A="subresource-integrity-manifest",M="next-font-manifest",C="export-marker.json",I="export-detail.json",x="prerender-manifest.json",N="routes-manifest.json",L="images-manifest.json",D="required-server-files.json",k="_devPagesManifest.json",F="middleware-manifest.json",U="_devMiddlewareManifest.json",H="react-loadable-manifest.json",B="font-manifest.json",W="server",q=["next.config.js","next.config.mjs"],z="BUILD_ID",G=["/_document","/_app","/_error"],V="public",X="static",Y="__NEXT_DROP_CLIENT_FILE__",K="__NEXT_BUILTIN_DOCUMENT__",Q="__barrel_optimize__",$="client-reference-manifest",J="server-reference-manifest",Z="middleware-build-manifest",ee="middleware-react-loadable-manifest",et="main",er=""+et+"-app",en="app-pages-internals",ea="react-refresh",eo="amp",ei="webpack",el="polyfills",eu=Symbol(el),es="edge-runtime-webpack",ec=307,ed=308,ef="__N_SSG",ep="__N_SSP",eh="__PAGE__",em="https://fonts.googleapis.com/",eg=[{url:em,preconnect:"https://fonts.gstatic.com"},{url:"https://use.typekit.net",preconnect:"https://use.typekit.net"}],e_={name:"Times New Roman",xAvgCharWidth:821,azAvgWidth:854.3953488372093,unitsPerEm:2048},ey={name:"Arial",xAvgCharWidth:904,azAvgWidth:934.5116279069767,unitsPerEm:2048},eP=["/500"],ev=1,eb=6e3,eE={client:"client",server:"server"},eS=["clearImmediate","setImmediate","BroadcastChannel","ByteLengthQueuingStrategy","CompressionStream","CountQueuingStrategy","DecompressionStream","DomException","MessageChannel","MessageEvent","MessagePort","ReadableByteStreamController","ReadableStreamBYOBRequest","ReadableStreamDefaultController","TransformStreamDefaultController","WritableStreamDefaultController"],eR=new Set([et,ea,eo,er]);("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},4125:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"escapeStringRegexp",{enumerable:!0,get:function(){return escapeStringRegexp}});let o=/[|\\{}()[\]^$+*?.-]/,l=/[|\\{}()[\]^$+*?.-]/g;function escapeStringRegexp(r){return o.test(r)?r.replace(l,"\\$&"):r}},7768:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"HeadManagerContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext({})},46:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{defaultHead:function(){return defaultHead},default:function(){return _default}});let l=o(8754),u=o(1757),s=u._(o(7294)),d=l._(o(3632)),f=o(5938),h=o(7768),g=o(8926);function defaultHead(r){void 0===r&&(r=!1);let n=[s.default.createElement("meta",{charSet:"utf-8"})];return r||n.push(s.default.createElement("meta",{name:"viewport",content:"width=device-width"})),n}function onlyReactElement(r,n){return"string"==typeof n||"number"==typeof n?r:n.type===s.default.Fragment?r.concat(s.default.Children.toArray(n.props.children).reduce((r,n)=>"string"==typeof n||"number"==typeof n?r:r.concat(n),[])):r.concat(n)}o(9941);let _=["name","httpEquiv","charSet","itemProp"];function reduceComponents(r,n){let{inAmpMode:o}=n;return r.reduce(onlyReactElement,[]).reverse().concat(defaultHead(o).reverse()).filter(function(){let r=new Set,n=new Set,o=new Set,l={};return u=>{let s=!0,d=!1;if(u.key&&"number"!=typeof u.key&&u.key.indexOf("$")>0){d=!0;let n=u.key.slice(u.key.indexOf("$")+1);r.has(n)?s=!1:r.add(n)}switch(u.type){case"title":case"base":n.has(u.type)?s=!1:n.add(u.type);break;case"meta":for(let r=0,n=_.length;r{let l=r.key||n;if(!o&&"link"===r.type&&r.props.href&&["https://fonts.googleapis.com/css","https://use.typekit.net/"].some(n=>r.props.href.startsWith(n))){let n={...r.props||{}};return n["data-href"]=n.href,n.href=void 0,n["data-optimized-fonts"]=!0,s.default.cloneElement(r,n)}return s.default.cloneElement(r,{key:l})})}let _default=function(r){let{children:n}=r,o=(0,s.useContext)(f.AmpStateContext),l=(0,s.useContext)(h.HeadManagerContext);return s.default.createElement(d.default,{reduceComponentsToState:reduceComponents,headManager:l,inAmpMode:(0,g.isInAmpMode)(o)},n)};("function"==typeof n.default||"object"==typeof n.default&&null!==n.default)&&void 0===n.default.__esModule&&(Object.defineProperty(n.default,"__esModule",{value:!0}),Object.assign(n.default,n),r.exports=n.default)},8197:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{SearchParamsContext:function(){return u},PathnameContext:function(){return s},PathParamsContext:function(){return d}});let l=o(7294),u=(0,l.createContext)(null),s=(0,l.createContext)(null),d=(0,l.createContext)(null)},4656:function(r,n){"use strict";function normalizeLocalePath(r,n){let o;let l=r.split("/");return(n||[]).some(n=>!!l[1]&&l[1].toLowerCase()===n.toLowerCase()&&(o=n,l.splice(1,1),r=l.join("/")||"/",!0)),{pathname:r,detectedLocale:o}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizeLocalePath",{enumerable:!0,get:function(){return normalizeLocalePath}})},4955:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ImageConfigContext",{enumerable:!0,get:function(){return d}});let l=o(8754),u=l._(o(7294)),s=o(7599),d=u.default.createContext(s.imageConfigDefault)},7599:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{VALID_LOADERS:function(){return o},imageConfigDefault:function(){return l}});let o=["default","imgix","cloudinary","akamai","custom"],l={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[16,32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:60,formats:["image/webp"],dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"inline",remotePatterns:[],unoptimized:!1}},9942:function(r,n){"use strict";function getObjectClassLabel(r){return Object.prototype.toString.call(r)}function isPlainObject(r){if("[object Object]"!==getObjectClassLabel(r))return!1;let n=Object.getPrototypeOf(r);return null===n||n.hasOwnProperty("isPrototypeOf")}Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getObjectClassLabel:function(){return getObjectClassLabel},isPlainObject:function(){return isPlainObject}})},4600:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"NEXT_DYNAMIC_NO_SSR_CODE",{enumerable:!0,get:function(){return o}});let o="NEXT_DYNAMIC_NO_SSR_CODE"},3745:function(r,n){"use strict";function mitt(){let r=Object.create(null);return{on(n,o){(r[n]||(r[n]=[])).push(o)},off(n,o){r[n]&&r[n].splice(r[n].indexOf(o)>>>0,1)},emit(n){for(var o=arguments.length,l=Array(o>1?o-1:0),u=1;u{r(...l)})}}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return mitt}})},1329:function(r){"use strict";r.exports=["chrome 64","edge 79","firefox 67","opera 51","safari 12"]},8902:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"denormalizePagePath",{enumerable:!0,get:function(){return denormalizePagePath}});let l=o(1232),u=o(7932);function denormalizePagePath(r){let n=(0,u.normalizePathSep)(r);return n.startsWith("/index/")&&!(0,l.isDynamicRoute)(n)?n.slice(6):"/index"!==n?n:"/"}},3029:function(r,n){"use strict";function ensureLeadingSlash(r){return r.startsWith("/")?r:"/"+r}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"ensureLeadingSlash",{enumerable:!0,get:function(){return ensureLeadingSlash}})},7932:function(r,n){"use strict";function normalizePathSep(r){return r.replace(/\\/g,"/")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"normalizePathSep",{enumerable:!0,get:function(){return normalizePathSep}})},637:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"RouterContext",{enumerable:!0,get:function(){return s}});let l=o(8754),u=l._(o(7294)),s=u.default.createContext(null)},7178:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{adaptForAppRouterInstance:function(){return adaptForAppRouterInstance},adaptForSearchParams:function(){return adaptForSearchParams},adaptForPathParams:function(){return adaptForPathParams},PathnameContextProviderAdapter:function(){return PathnameContextProviderAdapter}});let l=o(1757),u=l._(o(7294)),s=o(8197),d=o(1232),f=o(2391),h=o(8300);function adaptForAppRouterInstance(r){return{back(){r.back()},forward(){r.forward()},refresh(){r.reload()},push(n,o){let{scroll:l}=void 0===o?{}:o;r.push(n,void 0,{scroll:l})},replace(n,o){let{scroll:l}=void 0===o?{}:o;r.replace(n,void 0,{scroll:l})},prefetch(n){r.prefetch(n)}}}function adaptForSearchParams(r){return r.isReady&&r.query?(0,f.asPathToSearchParams)(r.asPath):new URLSearchParams}function adaptForPathParams(r){if(!r.isReady||!r.query)return null;let n={},o=(0,h.getRouteRegex)(r.pathname),l=Object.keys(o.groups);for(let o of l)n[o]=r.query[o];return n}function PathnameContextProviderAdapter(r){let{children:n,router:o,...l}=r,f=(0,u.useRef)(l.isAutoExport),h=(0,u.useMemo)(()=>{let r;let n=f.current;if(n&&(f.current=!1),(0,d.isDynamicRoute)(o.pathname)&&(o.isFallback||n&&!o.isReady))return null;try{r=new URL(o.asPath,"http://f")}catch(r){return"/"}return r.pathname},[o.asPath,o.isFallback,o.isReady,o.pathname]);return u.default.createElement(s.PathnameContext.Provider,{value:h},n)}},7797:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return Router},matchesMiddleware:function(){return matchesMiddleware},createKey:function(){return createKey}});let l=o(8754),u=o(1757),s=o(6082),d=o(7159),f=o(2288),h=u._(o(676)),g=o(8902),_=o(4656),y=l._(o(3745)),P=o(1306),b=o(8011),E=o(9823);o(2431);let S=o(9001),R=o(8300),w=o(3833);o(4287);let O=o(891),j=o(2048),A=o(3099),M=o(7786),C=o(5864),I=o(5213),x=o(4785),N=o(9423),L=o(673),D=o(8979),k=o(1530),F=o(4131),U=o(6116),H=o(9302),B=o(9381),W=o(9987);function buildCancellationError(){return Object.assign(Error("Route Cancelled"),{cancelled:!0})}async function matchesMiddleware(r){let n=await Promise.resolve(r.router.pageLoader.getMiddleware());if(!n)return!1;let{pathname:o}=(0,O.parsePath)(r.asPath),l=(0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,u=(0,C.addBasePath)((0,j.addLocale)(l,r.locale));return n.some(r=>new RegExp(r.regexp).test(u))}function stripOrigin(r){let n=(0,P.getLocationOrigin)();return r.startsWith(n)?r.substring(n.length):r}function prepareUrlAs(r,n,o){let[l,u]=(0,x.resolveHref)(r,n,!0),s=(0,P.getLocationOrigin)(),d=l.startsWith(s),f=u&&u.startsWith(s);l=stripOrigin(l),u=u?stripOrigin(u):u;let h=d?l:(0,C.addBasePath)(l),g=o?stripOrigin((0,x.resolveHref)(r,o)):u||l;return{url:h,as:f?g:(0,C.addBasePath)(g)}}function resolveDynamicRoute(r,n){let o=(0,s.removeTrailingSlash)((0,g.denormalizePagePath)(r));return"/404"===o||"/_error"===o?r:(n.includes(o)||n.some(n=>{if((0,b.isDynamicRoute)(n)&&(0,R.getRouteRegex)(n).re.test(o))return r=n,!0}),(0,s.removeTrailingSlash)(r))}async function withMiddlewareEffects(r){let n=await matchesMiddleware(r);if(!n||!r.fetchData)return null;try{let n=await r.fetchData(),o=await function(r,n,o){let l={basePath:o.router.basePath,i18n:{locales:o.router.locales},trailingSlash:!1},u=n.headers.get("x-nextjs-rewrite"),f=u||n.headers.get("x-nextjs-matched-path"),h=n.headers.get("x-matched-path");if(!h||f||h.includes("__next_data_catchall")||h.includes("/_error")||h.includes("/404")||(f=h),f){if(f.startsWith("/")){let n=(0,E.parseRelativeUrl)(f),h=(0,L.getNextPathnameInfo)(n.pathname,{nextConfig:l,parseData:!0}),g=(0,s.removeTrailingSlash)(h.pathname);return Promise.all([o.router.pageLoader.getPageList(),(0,d.getClientBuildManifest)()]).then(s=>{let[d,{__rewrites:f}]=s,y=(0,j.addLocale)(h.pathname,h.locale);if((0,b.isDynamicRoute)(y)||!u&&d.includes((0,_.normalizeLocalePath)((0,M.removeBasePath)(y),o.router.locales).pathname)){let o=(0,L.getNextPathnameInfo)((0,E.parseRelativeUrl)(r).pathname,{nextConfig:l,parseData:!0});y=(0,C.addBasePath)(o.pathname),n.pathname=y}if(!d.includes(g)){let r=resolveDynamicRoute(g,d);r!==g&&(g=r)}let P=d.includes(g)?g:resolveDynamicRoute((0,_.normalizeLocalePath)((0,M.removeBasePath)(n.pathname),o.router.locales).pathname,d);if((0,b.isDynamicRoute)(P)){let r=(0,S.getRouteMatcher)((0,R.getRouteRegex)(P))(y);Object.assign(n.query,r||{})}return{type:"rewrite",parsedAs:n,resolvedHref:P}})}let n=(0,O.parsePath)(r),h=(0,D.formatNextPathnameInfo)({...(0,L.getNextPathnameInfo)(n.pathname,{nextConfig:l,parseData:!0}),defaultLocale:o.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-external",destination:""+h+n.query+n.hash})}let g=n.headers.get("x-nextjs-redirect");if(g){if(g.startsWith("/")){let r=(0,O.parsePath)(g),n=(0,D.formatNextPathnameInfo)({...(0,L.getNextPathnameInfo)(r.pathname,{nextConfig:l,parseData:!0}),defaultLocale:o.router.defaultLocale,buildId:""});return Promise.resolve({type:"redirect-internal",newAs:""+n+r.query+r.hash,newUrl:""+n+r.query+r.hash})}return Promise.resolve({type:"redirect-external",destination:g})}return Promise.resolve({type:"next"})}(n.dataHref,n.response,r);return{dataHref:n.dataHref,json:n.json,response:n.response,text:n.text,cacheKey:n.cacheKey,effect:o}}catch(r){return null}}let q=Symbol("SSG_DATA_NOT_FOUND");function tryToParseAsJSON(r){try{return JSON.parse(r)}catch(r){return null}}function fetchNextData(r){var n;let{dataHref:o,inflightCache:l,isPrefetch:u,hasMiddleware:s,isServerRender:f,parseJSON:h,persistCache:g,isBackground:_,unstable_skipClientCache:y}=r,{href:P}=new URL(o,window.location.href),getData=r=>(function fetchRetry(r,n,o){return fetch(r,{credentials:"same-origin",method:o.method||"GET",headers:Object.assign({},o.headers,{"x-nextjs-data":"1"})}).then(l=>!l.ok&&n>1&&l.status>=500?fetchRetry(r,n-1,o):l)})(o,f?3:1,{headers:Object.assign({},u?{purpose:"prefetch"}:{},u&&s?{"x-middleware-prefetch":"1"}:{}),method:null!=(n=null==r?void 0:r.method)?n:"GET"}).then(n=>n.ok&&(null==r?void 0:r.method)==="HEAD"?{dataHref:o,response:n,text:"",json:{},cacheKey:P}:n.text().then(r=>{if(!n.ok){if(s&&[301,302,307,308].includes(n.status))return{dataHref:o,response:n,text:r,json:{},cacheKey:P};if(404===n.status){var l;if(null==(l=tryToParseAsJSON(r))?void 0:l.notFound)return{dataHref:o,json:{notFound:q},response:n,text:r,cacheKey:P}}let u=Error("Failed to load static props");throw f||(0,d.markAssetError)(u),u}return{dataHref:o,json:h?tryToParseAsJSON(r):null,response:n,text:r,cacheKey:P}})).then(r=>(g&&"no-cache"!==r.response.headers.get("x-middleware-cache")||delete l[P],r)).catch(r=>{throw y||delete l[P],("Failed to fetch"===r.message||"NetworkError when attempting to fetch resource."===r.message||"Load failed"===r.message)&&(0,d.markAssetError)(r),r});return y&&g?getData({}).then(r=>(l[P]=Promise.resolve(r),r)):void 0!==l[P]?l[P]:l[P]=getData(_?{method:"HEAD"}:{})}function createKey(){return Math.random().toString(36).slice(2,10)}function handleHardNavigation(r){let{url:n,router:o}=r;if(n===(0,C.addBasePath)((0,j.addLocale)(o.asPath,o.locale)))throw Error("Invariant: attempted to hard navigate to the same URL "+n+" "+location.href);window.location.href=n}let getCancelledHandler=r=>{let{route:n,router:o}=r,l=!1,u=o.clc=()=>{l=!0};return()=>{if(l){let r=Error('Abort fetching component for route: "'+n+'"');throw r.cancelled=!0,r}u===o.clc&&(o.clc=null)}};let Router=class Router{reload(){window.location.reload()}back(){window.history.back()}forward(){window.history.forward()}push(r,n,o){return void 0===o&&(o={}),{url:r,as:n}=prepareUrlAs(this,r,n),this.change("pushState",r,n,o)}replace(r,n,o){return void 0===o&&(o={}),{url:r,as:n}=prepareUrlAs(this,r,n),this.change("replaceState",r,n,o)}async _bfl(r,n,o,l){{let h=!1,g=!1;for(let _ of[r,n])if(_){let n=(0,s.removeTrailingSlash)(new URL(_,"http://n").pathname),y=(0,C.addBasePath)((0,j.addLocale)(n,o||this.locale));if(n!==(0,s.removeTrailingSlash)(new URL(this.asPath,"http://n").pathname)){var u,d,f;for(let r of(h=h||!!(null==(u=this._bfl_s)?void 0:u.contains(n))||!!(null==(d=this._bfl_s)?void 0:d.contains(y)),[n,y])){let n=r.split("/");for(let r=0;!g&&r{})}}}}return!1}async change(r,n,o,l,u){var g,_,y,x,N,L,D,U,W;let z,G;if(!(0,F.isLocalURL)(n))return handleHardNavigation({url:n,router:this}),!1;let V=1===l._h;V||l.shallow||await this._bfl(o,void 0,l.locale);let X=V||l._shouldResolveHref||(0,O.parsePath)(n).pathname===(0,O.parsePath)(o).pathname,Y={...this.state},K=!0!==this.isReady;this.isReady=!0;let Q=this.isSsr;if(V||(this.isSsr=!1),V&&this.clc)return!1;let $=Y.locale;P.ST&&performance.mark("routeChange");let{shallow:J=!1,scroll:Z=!0}=l,ee={shallow:J};this._inFlightRoute&&this.clc&&(Q||Router.events.emit("routeChangeError",buildCancellationError(),this._inFlightRoute,ee),this.clc(),this.clc=null),o=(0,C.addBasePath)((0,j.addLocale)((0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,l.locale,this.defaultLocale));let et=(0,A.removeLocale)((0,I.hasBasePath)(o)?(0,M.removeBasePath)(o):o,Y.locale);this._inFlightRoute=o;let er=$!==Y.locale;if(!V&&this.onlyAHashChange(et)&&!er){Y.asPath=et,Router.events.emit("hashChangeStart",o,ee),this.changeState(r,n,o,{...l,scroll:!1}),Z&&this.scrollToHash(et);try{await this.set(Y,this.components[Y.route],null)}catch(r){throw(0,h.default)(r)&&r.cancelled&&Router.events.emit("routeChangeError",r,et,ee),r}return Router.events.emit("hashChangeComplete",o,ee),!0}let en=(0,E.parseRelativeUrl)(n),{pathname:ea,query:eo}=en;if(null==(g=this.components[ea])?void 0:g.__appRouter)return handleHardNavigation({url:o,router:this}),new Promise(()=>{});try{[z,{__rewrites:G}]=await Promise.all([this.pageLoader.getPageList(),(0,d.getClientBuildManifest)(),this.pageLoader.getMiddleware()])}catch(r){return handleHardNavigation({url:o,router:this}),!1}this.urlIsNew(et)||er||(r="replaceState");let ei=o;ea=ea?(0,s.removeTrailingSlash)((0,M.removeBasePath)(ea)):ea;let el=(0,s.removeTrailingSlash)(ea),eu=o.startsWith("/")&&(0,E.parseRelativeUrl)(o).pathname,es=!!(eu&&el!==eu&&(!(0,b.isDynamicRoute)(el)||!(0,S.getRouteMatcher)((0,R.getRouteRegex)(el))(eu))),ec=!l.shallow&&await matchesMiddleware({asPath:o,locale:Y.locale,router:this});if(V&&ec&&(X=!1),X&&"/_error"!==ea&&(l._shouldResolveHref=!0,en.pathname=resolveDynamicRoute(ea,z),en.pathname===ea||(ea=en.pathname,en.pathname=(0,C.addBasePath)(ea),ec||(n=(0,w.formatWithValidation)(en)))),!(0,F.isLocalURL)(o))return handleHardNavigation({url:o,router:this}),!1;ei=(0,A.removeLocale)((0,M.removeBasePath)(ei),Y.locale),el=(0,s.removeTrailingSlash)(ea);let ed=!1;if((0,b.isDynamicRoute)(el)){let r=(0,E.parseRelativeUrl)(ei),l=r.pathname,u=(0,R.getRouteRegex)(el);ed=(0,S.getRouteMatcher)(u)(l);let s=el===l,d=s?(0,B.interpolateAs)(el,l,eo):{};if(ed&&(!s||d.result))s?o=(0,w.formatWithValidation)(Object.assign({},r,{pathname:d.result,query:(0,H.omit)(eo,d.params)})):Object.assign(eo,ed);else{let r=Object.keys(u.groups).filter(r=>!eo[r]&&!u.groups[r].optional);if(r.length>0&&!ec)throw Error((s?"The provided `href` ("+n+") value is missing query values ("+r.join(", ")+") to be interpolated properly. ":"The provided `as` value ("+l+") is incompatible with the `href` value ("+el+"). ")+"Read more: https://nextjs.org/docs/messages/"+(s?"href-interpolation-failed":"incompatible-href-as"))}}V||Router.events.emit("routeChangeStart",o,ee);let ef="/404"===this.pathname||"/_error"===this.pathname;try{let s=await this.getRouteInfo({route:el,pathname:ea,query:eo,as:o,resolvedAs:ei,routeProps:ee,locale:Y.locale,isPreview:Y.isPreview,hasMiddleware:ec,unstable_skipClientCache:l.unstable_skipClientCache,isQueryUpdating:V&&!this.isFallback,isMiddlewareRewrite:es});if(V||l.shallow||await this._bfl(o,"resolvedAs"in s?s.resolvedAs:void 0,Y.locale),"route"in s&&ec){el=ea=s.route||el,ee.shallow||(eo=Object.assign({},s.query||{},eo));let r=(0,I.hasBasePath)(en.pathname)?(0,M.removeBasePath)(en.pathname):en.pathname;if(ed&&ea!==r&&Object.keys(ed).forEach(r=>{ed&&eo[r]===ed[r]&&delete eo[r]}),(0,b.isDynamicRoute)(ea)){let r=!ee.shallow&&s.resolvedAs?s.resolvedAs:(0,C.addBasePath)((0,j.addLocale)(new URL(o,location.href).pathname,Y.locale),!0),n=r;(0,I.hasBasePath)(n)&&(n=(0,M.removeBasePath)(n));let l=(0,R.getRouteRegex)(ea),u=(0,S.getRouteMatcher)(l)(new URL(n,location.href).pathname);u&&Object.assign(eo,u)}}if("type"in s){if("redirect-internal"===s.type)return this.change(r,s.newUrl,s.newAs,l);return handleHardNavigation({url:s.destination,router:this}),new Promise(()=>{})}let d=s.Component;if(d&&d.unstable_scriptLoader){let r=[].concat(d.unstable_scriptLoader());r.forEach(r=>{(0,f.handleClientScriptLoad)(r.props)})}if((s.__N_SSG||s.__N_SSP)&&s.props){if(s.props.pageProps&&s.props.pageProps.__N_REDIRECT){l.locale=!1;let n=s.props.pageProps.__N_REDIRECT;if(n.startsWith("/")&&!1!==s.props.pageProps.__N_REDIRECT_BASE_PATH){let o=(0,E.parseRelativeUrl)(n);o.pathname=resolveDynamicRoute(o.pathname,z);let{url:u,as:s}=prepareUrlAs(this,n,n);return this.change(r,u,s,l)}return handleHardNavigation({url:n,router:this}),new Promise(()=>{})}if(Y.isPreview=!!s.props.__N_PREVIEW,s.props.notFound===q){let r;try{await this.fetchComponent("/404"),r="/404"}catch(n){r="/_error"}if(s=await this.getRouteInfo({route:r,pathname:r,query:eo,as:o,resolvedAs:ei,routeProps:{shallow:!1},locale:Y.locale,isPreview:Y.isPreview,isNotFound:!0}),"type"in s)throw Error("Unexpected middleware effect on /404")}}V&&"/_error"===this.pathname&&(null==(y=self.__NEXT_DATA__.props)?void 0:null==(_=y.pageProps)?void 0:_.statusCode)===500&&(null==(x=s.props)?void 0:x.pageProps)&&(s.props.pageProps.statusCode=500);let g=l.shallow&&Y.route===(null!=(N=s.route)?N:el),P=null!=(L=l.scroll)?L:!V&&!g,w=null!=u?u:P?{x:0,y:0}:null,O={...Y,route:el,pathname:ea,query:eo,asPath:et,isFallback:!1};if(V&&ef){if(s=await this.getRouteInfo({route:this.pathname,pathname:this.pathname,query:eo,as:o,resolvedAs:ei,routeProps:{shallow:!1},locale:Y.locale,isPreview:Y.isPreview,isQueryUpdating:V&&!this.isFallback}),"type"in s)throw Error("Unexpected middleware effect on "+this.pathname);"/_error"===this.pathname&&(null==(U=self.__NEXT_DATA__.props)?void 0:null==(D=U.pageProps)?void 0:D.statusCode)===500&&(null==(W=s.props)?void 0:W.pageProps)&&(s.props.pageProps.statusCode=500);try{await this.set(O,s,w)}catch(r){throw(0,h.default)(r)&&r.cancelled&&Router.events.emit("routeChangeError",r,et,ee),r}return!0}Router.events.emit("beforeHistoryChange",o,ee),this.changeState(r,n,o,l);let A=V&&!w&&!K&&!er&&(0,k.compareRouterStates)(O,this.state);if(!A){try{await this.set(O,s,w)}catch(r){if(r.cancelled)s.error=s.error||r;else throw r}if(s.error)throw V||Router.events.emit("routeChangeError",s.error,et,ee),s.error;V||Router.events.emit("routeChangeComplete",o,ee),P&&/#.+$/.test(o)&&this.scrollToHash(o)}return!0}catch(r){if((0,h.default)(r)&&r.cancelled)return!1;throw r}}changeState(r,n,o,l){void 0===l&&(l={}),("pushState"!==r||(0,P.getURL)()!==o)&&(this._shallow=l.shallow,window.history[r]({url:n,as:o,options:l,__N:!0,key:this._key="pushState"!==r?this._key:createKey()},"",o))}async handleRouteInfoError(r,n,o,l,u,s){if(console.error(r),r.cancelled)throw r;if((0,d.isAssetError)(r)||s)throw Router.events.emit("routeChangeError",r,l,u),handleHardNavigation({url:l,router:this}),buildCancellationError();try{let l;let{page:u,styleSheets:s}=await this.fetchComponent("/_error"),d={props:l,Component:u,styleSheets:s,err:r,error:r};if(!d.props)try{d.props=await this.getInitialProps(u,{err:r,pathname:n,query:o})}catch(r){console.error("Error in error page `getInitialProps`: ",r),d.props={}}return d}catch(r){return this.handleRouteInfoError((0,h.default)(r)?r:Error(r+""),n,o,l,u,!0)}}async getRouteInfo(r){let{route:n,pathname:o,query:l,as:u,resolvedAs:d,routeProps:f,locale:g,hasMiddleware:y,isPreview:P,unstable_skipClientCache:b,isQueryUpdating:E,isMiddlewareRewrite:S,isNotFound:R}=r,O=n;try{var j,A,C,I;let r=getCancelledHandler({route:O,router:this}),n=this.components[O];if(f.shallow&&n&&this.route===O)return n;y&&(n=void 0);let h=!n||"initial"in n?void 0:n,x={dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:o,query:l}),skipInterpolation:!0,asPath:R?"/404":d,locale:g}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:E?this.sbc:this.sdc,persistCache:!P,isPrefetch:!1,unstable_skipClientCache:b,isBackground:E},L=E&&!S?null:await withMiddlewareEffects({fetchData:()=>fetchNextData(x),asPath:R?"/404":d,locale:g,router:this}).catch(r=>{if(E)return null;throw r});if(L&&("/_error"===o||"/404"===o)&&(L.effect=void 0),E&&(L?L.json=self.__NEXT_DATA__.props:L={json:self.__NEXT_DATA__.props}),r(),(null==L?void 0:null==(j=L.effect)?void 0:j.type)==="redirect-internal"||(null==L?void 0:null==(A=L.effect)?void 0:A.type)==="redirect-external")return L.effect;if((null==L?void 0:null==(C=L.effect)?void 0:C.type)==="rewrite"){let r=(0,s.removeTrailingSlash)(L.effect.resolvedHref),u=await this.pageLoader.getPageList();if((!E||u.includes(r))&&(O=r,o=L.effect.resolvedHref,l={...l,...L.effect.parsedAs.query},d=(0,M.removeBasePath)((0,_.normalizeLocalePath)(L.effect.parsedAs.pathname,this.locales).pathname),n=this.components[O],f.shallow&&n&&this.route===O&&!y))return{...n,route:O}}if((0,N.isAPIRoute)(O))return handleHardNavigation({url:u,router:this}),new Promise(()=>{});let D=h||await this.fetchComponent(O).then(r=>({Component:r.page,styleSheets:r.styleSheets,__N_SSG:r.mod.__N_SSG,__N_SSP:r.mod.__N_SSP})),k=null==L?void 0:null==(I=L.response)?void 0:I.headers.get("x-middleware-skip"),F=D.__N_SSG||D.__N_SSP;k&&(null==L?void 0:L.dataHref)&&delete this.sdc[L.dataHref];let{props:U,cacheKey:H}=await this._getData(async()=>{if(F){if((null==L?void 0:L.json)&&!k)return{cacheKey:L.cacheKey,props:L.json};let r=(null==L?void 0:L.dataHref)?L.dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:o,query:l}),asPath:d,locale:g}),n=await fetchNextData({dataHref:r,isServerRender:this.isSsr,parseJSON:!0,inflightCache:k?{}:this.sdc,persistCache:!P,isPrefetch:!1,unstable_skipClientCache:b});return{cacheKey:n.cacheKey,props:n.json||{}}}return{headers:{},props:await this.getInitialProps(D.Component,{pathname:o,query:l,asPath:u,locale:g,locales:this.locales,defaultLocale:this.defaultLocale})}});return D.__N_SSP&&x.dataHref&&H&&delete this.sdc[H],this.isPreview||!D.__N_SSG||E||fetchNextData(Object.assign({},x,{isBackground:!0,persistCache:!1,inflightCache:this.sbc})).catch(()=>{}),U.pageProps=Object.assign({},U.pageProps),D.props=U,D.route=O,D.query=l,D.resolvedAs=d,this.components[O]=D,D}catch(r){return this.handleRouteInfoError((0,h.getProperError)(r),o,l,u,f)}}set(r,n,o){return this.state=r,this.sub(n,this.components["/_app"].Component,o)}beforePopState(r){this._bps=r}onlyAHashChange(r){if(!this.asPath)return!1;let[n,o]=this.asPath.split("#"),[l,u]=r.split("#");return!!u&&n===l&&o===u||n===l&&o!==u}scrollToHash(r){let[,n=""]=r.split("#");(0,W.handleSmoothScroll)(()=>{if(""===n||"top"===n){window.scrollTo(0,0);return}let r=decodeURIComponent(n),o=document.getElementById(r);if(o){o.scrollIntoView();return}let l=document.getElementsByName(r)[0];l&&l.scrollIntoView()},{onlyHashChange:this.onlyAHashChange(r)})}urlIsNew(r){return this.asPath!==r}async prefetch(r,n,o){if(void 0===n&&(n=r),void 0===o&&(o={}),(0,U.isBot)(window.navigator.userAgent))return;let l=(0,E.parseRelativeUrl)(r),u=l.pathname,{pathname:d,query:f}=l,h=d,g=await this.pageLoader.getPageList(),_=n,y=void 0!==o.locale?o.locale||void 0:this.locale,P=await matchesMiddleware({asPath:n,locale:y,router:this});l.pathname=resolveDynamicRoute(l.pathname,g),(0,b.isDynamicRoute)(l.pathname)&&(d=l.pathname,l.pathname=d,Object.assign(f,(0,S.getRouteMatcher)((0,R.getRouteRegex)(l.pathname))((0,O.parsePath)(n).pathname)||{}),P||(r=(0,w.formatWithValidation)(l)));let j=await withMiddlewareEffects({fetchData:()=>fetchNextData({dataHref:this.pageLoader.getDataHref({href:(0,w.formatWithValidation)({pathname:h,query:f}),skipInterpolation:!0,asPath:_,locale:y}),hasMiddleware:!0,isServerRender:this.isSsr,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0}),asPath:n,locale:y,router:this});if((null==j?void 0:j.effect.type)==="rewrite"&&(l.pathname=j.effect.resolvedHref,d=j.effect.resolvedHref,f={...f,...j.effect.parsedAs.query},_=j.effect.parsedAs.pathname,r=(0,w.formatWithValidation)(l)),(null==j?void 0:j.effect.type)==="redirect-external")return;let A=(0,s.removeTrailingSlash)(d);await this._bfl(n,_,o.locale,!0)&&(this.components[u]={__appRouter:!0}),await Promise.all([this.pageLoader._isSsg(A).then(n=>!!n&&fetchNextData({dataHref:(null==j?void 0:j.json)?null==j?void 0:j.dataHref:this.pageLoader.getDataHref({href:r,asPath:_,locale:y}),isServerRender:!1,parseJSON:!0,inflightCache:this.sdc,persistCache:!this.isPreview,isPrefetch:!0,unstable_skipClientCache:o.unstable_skipClientCache||o.priority&&!0}).then(()=>!1).catch(()=>!1)),this.pageLoader[o.priority?"loadPage":"prefetch"](A)])}async fetchComponent(r){let n=getCancelledHandler({route:r,router:this});try{let o=await this.pageLoader.loadPage(r);return n(),o}catch(r){throw n(),r}}_getData(r){let n=!1,cancel=()=>{n=!0};return this.clc=cancel,r().then(r=>{if(cancel===this.clc&&(this.clc=null),n){let r=Error("Loading initial props cancelled");throw r.cancelled=!0,r}return r})}_getFlightData(r){return fetchNextData({dataHref:r,isServerRender:!0,parseJSON:!1,inflightCache:this.sdc,persistCache:!1,isPrefetch:!1}).then(r=>{let{text:n}=r;return{data:n}})}getInitialProps(r,n){let{Component:o}=this.components["/_app"],l=this._wrapApp(o);return n.AppTree=l,(0,P.loadGetInitialProps)(o,{AppTree:l,Component:r,router:this,ctx:n})}get route(){return this.state.route}get pathname(){return this.state.pathname}get query(){return this.state.query}get asPath(){return this.state.asPath}get locale(){return this.state.locale}get isFallback(){return this.state.isFallback}get isPreview(){return this.state.isPreview}constructor(r,n,l,{initialProps:u,pageLoader:d,App:f,wrapApp:h,Component:g,err:_,subscription:y,isFallback:S,locale:R,locales:O,defaultLocale:j,domainLocales:A,isPreview:M}){this.sdc={},this.sbc={},this.isFirstPopStateEvent=!0,this._key=createKey(),this.onPopState=r=>{let n;let{isFirstPopStateEvent:o}=this;this.isFirstPopStateEvent=!1;let l=r.state;if(!l){let{pathname:r,query:n}=this;this.changeState("replaceState",(0,w.formatWithValidation)({pathname:(0,C.addBasePath)(r),query:n}),(0,P.getURL)());return}if(l.__NA){window.location.reload();return}if(!l.__N||o&&this.locale===l.options.locale&&l.as===this.asPath)return;let{url:u,as:s,options:d,key:f}=l;this._key=f;let{pathname:h}=(0,E.parseRelativeUrl)(u);(!this.isSsr||s!==(0,C.addBasePath)(this.asPath)||h!==(0,C.addBasePath)(this.pathname))&&(!this._bps||this._bps(l))&&this.change("replaceState",u,s,Object.assign({},d,{shallow:d.shallow&&this._shallow,locale:d.locale||this.defaultLocale,_h:0}),n)};let I=(0,s.removeTrailingSlash)(r);this.components={},"/_error"!==r&&(this.components[I]={Component:g,initial:!0,props:u,err:_,__N_SSG:u&&u.__N_SSG,__N_SSP:u&&u.__N_SSP}),this.components["/_app"]={Component:f,styleSheets:[]};{let{BloomFilter:r}=o(1403),n={numItems:4,errorRate:.01,numBits:39,numHashes:7,bitArray:[0,0,1,0,0,1,1,0,0,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,0,1,1,0,0,1,1,1]},l={numItems:0,errorRate:.01,numBits:0,numHashes:null,bitArray:[]};(null==n?void 0:n.numHashes)&&(this._bfl_s=new r(n.numItems,n.errorRate),this._bfl_s.import(n)),(null==l?void 0:l.numHashes)&&(this._bfl_d=new r(l.numItems,l.errorRate),this._bfl_d.import(l))}this.events=Router.events,this.pageLoader=d;let x=(0,b.isDynamicRoute)(r)&&self.__NEXT_DATA__.autoExport;if(this.basePath="",this.sub=y,this.clc=null,this._wrapApp=h,this.isSsr=!0,this.isLocaleDomain=!1,this.isReady=!!(self.__NEXT_DATA__.gssp||self.__NEXT_DATA__.gip||self.__NEXT_DATA__.isExperimentalCompile||self.__NEXT_DATA__.appGip&&!self.__NEXT_DATA__.gsp||!x&&!self.location.search),this.state={route:I,pathname:r,query:n,asPath:x?r:l,isPreview:!!M,locale:void 0,isFallback:S},this._initialMatchesMiddlewarePromise=Promise.resolve(!1),!l.startsWith("//")){let o={locale:R},u=(0,P.getURL)();this._initialMatchesMiddlewarePromise=matchesMiddleware({router:this,locale:R,asPath:u}).then(s=>(o._shouldResolveHref=l!==r,this.changeState("replaceState",s?u:(0,w.formatWithValidation)({pathname:(0,C.addBasePath)(r),query:n}),u,o),s))}window.addEventListener("popstate",this.onPopState)}};Router.events=(0,y.default)()},142:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addLocale",{enumerable:!0,get:function(){return addLocale}});let l=o(3776),u=o(6315);function addLocale(r,n,o,s){if(!n||n===o)return r;let d=r.toLowerCase();return!s&&((0,u.pathHasPrefix)(d,"/api")||(0,u.pathHasPrefix)(d,"/"+n.toLowerCase()))?r:(0,l.addPathPrefix)(r,"/"+n)}},3776:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathPrefix",{enumerable:!0,get:function(){return addPathPrefix}});let l=o(891);function addPathPrefix(r,n){if(!r.startsWith("/")||!n)return r;let{pathname:o,query:u,hash:s}=(0,l.parsePath)(r);return""+n+o+u+s}},93:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"addPathSuffix",{enumerable:!0,get:function(){return addPathSuffix}});let l=o(891);function addPathSuffix(r,n){if(!r.startsWith("/")||!n)return r;let{pathname:o,query:u,hash:s}=(0,l.parsePath)(r);return""+o+n+u+s}},9537:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{normalizeAppPath:function(){return normalizeAppPath},normalizeRscPath:function(){return normalizeRscPath}});let l=o(3029),u=o(7494);function normalizeAppPath(r){return(0,l.ensureLeadingSlash)(r.split("/").reduce((r,n,o,l)=>!n||(0,u.isGroupSegment)(n)||"@"===n[0]||("page"===n||"route"===n)&&o===l.length-1?r:r+"/"+n,""))}function normalizeRscPath(r,n){return n?r.replace(/\.rsc($|\?)/,"$1"):r}},2391:function(r,n){"use strict";function asPathToSearchParams(r){return new URL(r,"http://n").searchParams}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"asPathToSearchParams",{enumerable:!0,get:function(){return asPathToSearchParams}})},1530:function(r,n){"use strict";function compareRouterStates(r,n){let o=Object.keys(r);if(o.length!==Object.keys(n).length)return!1;for(let l=o.length;l--;){let u=o[l];if("query"===u){let o=Object.keys(r.query);if(o.length!==Object.keys(n.query).length)return!1;for(let l=o.length;l--;){let u=o[l];if(!n.query.hasOwnProperty(u)||r.query[u]!==n.query[u])return!1}}else if(!n.hasOwnProperty(u)||r[u]!==n[u])return!1}return!0}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"compareRouterStates",{enumerable:!0,get:function(){return compareRouterStates}})},8979:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"formatNextPathnameInfo",{enumerable:!0,get:function(){return formatNextPathnameInfo}});let l=o(6082),u=o(3776),s=o(93),d=o(142);function formatNextPathnameInfo(r){let n=(0,d.addLocale)(r.pathname,r.locale,r.buildId?void 0:r.defaultLocale,r.ignorePrefix);return(r.buildId||!r.trailingSlash)&&(n=(0,l.removeTrailingSlash)(n)),r.buildId&&(n=(0,s.addPathSuffix)((0,u.addPathPrefix)(n,"/_next/data/"+r.buildId),"/"===r.pathname?"index.json":".json")),n=(0,u.addPathPrefix)(n,r.basePath),!r.buildId&&r.trailingSlash?n.endsWith("/")?n:(0,s.addPathSuffix)(n,"/"):(0,l.removeTrailingSlash)(n)}},3833:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{formatUrl:function(){return formatUrl},urlObjectKeys:function(){return d},formatWithValidation:function(){return formatWithValidation}});let l=o(1757),u=l._(o(4828)),s=/https?|ftp|gopher|file/;function formatUrl(r){let{auth:n,hostname:o}=r,l=r.protocol||"",d=r.pathname||"",f=r.hash||"",h=r.query||"",g=!1;n=n?encodeURIComponent(n).replace(/%3A/i,":")+"@":"",r.host?g=n+r.host:o&&(g=n+(~o.indexOf(":")?"["+o+"]":o),r.port&&(g+=":"+r.port)),h&&"object"==typeof h&&(h=String(u.urlQueryToSearchParams(h)));let _=r.search||h&&"?"+h||"";return l&&!l.endsWith(":")&&(l+=":"),r.slashes||(!l||s.test(l))&&!1!==g?(g="//"+(g||""),d&&"/"!==d[0]&&(d="/"+d)):g||(g=""),f&&"#"!==f[0]&&(f="#"+f),_&&"?"!==_[0]&&(_="?"+_),""+l+g+(d=d.replace(/[?#]/g,encodeURIComponent))+(_=_.replace("#","%23"))+f}let d=["auth","hash","host","hostname","href","path","pathname","port","protocol","query","search","slashes"];function formatWithValidation(r){return formatUrl(r)}},8052:function(r,n){"use strict";function getAssetPathFromRoute(r,n){void 0===n&&(n="");let o="/"===r?"/index":/^\/index(\/|$)/.test(r)?"/index"+r:""+r;return o+n}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return getAssetPathFromRoute}})},673:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getNextPathnameInfo",{enumerable:!0,get:function(){return getNextPathnameInfo}});let l=o(4656),u=o(4980),s=o(6315);function getNextPathnameInfo(r,n){var o,d;let{basePath:f,i18n:h,trailingSlash:g}=null!=(o=n.nextConfig)?o:{},_={pathname:r,trailingSlash:"/"!==r?r.endsWith("/"):g};f&&(0,s.pathHasPrefix)(_.pathname,f)&&(_.pathname=(0,u.removePathPrefix)(_.pathname,f),_.basePath=f);let y=_.pathname;if(_.pathname.startsWith("/_next/data/")&&_.pathname.endsWith(".json")){let r=_.pathname.replace(/^\/_next\/data\//,"").replace(/\.json$/,"").split("/"),o=r[0];_.buildId=o,y="index"!==r[1]?"/"+r.slice(1).join("/"):"/",!0===n.parseData&&(_.pathname=y)}if(h){let r=n.i18nProvider?n.i18nProvider.analyze(_.pathname):(0,l.normalizeLocalePath)(_.pathname,h.locales);_.locale=r.detectedLocale,_.pathname=null!=(d=r.pathname)?d:_.pathname,!r.detectedLocale&&_.buildId&&(r=n.i18nProvider?n.i18nProvider.analyze(y):(0,l.normalizeLocalePath)(y,h.locales)).detectedLocale&&(_.locale=r.detectedLocale)}return _}},9987:function(r,n){"use strict";function handleSmoothScroll(r,n){if(void 0===n&&(n={}),n.onlyHashChange){r();return}let o=document.documentElement,l=o.style.scrollBehavior;o.style.scrollBehavior="auto",n.dontForceLayout||o.getClientRects(),r(),o.style.scrollBehavior=l}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"handleSmoothScroll",{enumerable:!0,get:function(){return handleSmoothScroll}})},1232:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getSortedRoutes:function(){return l.getSortedRoutes},isDynamicRoute:function(){return u.isDynamicRoute}});let l=o(2839),u=o(8011)},9381:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"interpolateAs",{enumerable:!0,get:function(){return interpolateAs}});let l=o(9001),u=o(8300);function interpolateAs(r,n,o){let s="",d=(0,u.getRouteRegex)(r),f=d.groups,h=(n!==r?(0,l.getRouteMatcher)(d)(n):"")||o;s=r;let g=Object.keys(f);return g.every(r=>{let n=h[r]||"",{repeat:o,optional:l}=f[r],u="["+(o?"...":"")+r+"]";return l&&(u=(n?"":"/")+"["+u+"]"),o&&!Array.isArray(n)&&(n=[n]),(l||r in h)&&(s=s.replace(u,o?n.map(r=>encodeURIComponent(r)).join("/"):encodeURIComponent(n))||"/")})||(s=""),{params:g,result:s}}},6116:function(r,n){"use strict";function isBot(r){return/Googlebot|Mediapartners-Google|AdsBot-Google|googleweblight|Storebot-Google|Google-PageRenderer|Bingbot|BingPreview|Slurp|DuckDuckBot|baiduspider|yandex|sogou|LinkedInBot|bitlybot|tumblr|vkShare|quora link preview|facebookexternalhit|facebookcatalog|Twitterbot|applebot|redditbot|Slackbot|Discordbot|WhatsApp|SkypeUriPreview|ia_archiver/i.test(r)}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isBot",{enumerable:!0,get:function(){return isBot}})},8011:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isDynamicRoute",{enumerable:!0,get:function(){return isDynamicRoute}});let o=/\/\[[^/]+?\](?=\/|$)/;function isDynamicRoute(r){return o.test(r)}},4131:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isLocalURL",{enumerable:!0,get:function(){return isLocalURL}});let l=o(1306),u=o(5213);function isLocalURL(r){if(!(0,l.isAbsoluteUrl)(r))return!0;try{let n=(0,l.getLocationOrigin)(),o=new URL(r,n);return o.origin===n&&(0,u.hasBasePath)(o.pathname)}catch(r){return!1}}},9302:function(r,n){"use strict";function omit(r,n){let o={};return Object.keys(r).forEach(l=>{n.includes(l)||(o[l]=r[l])}),o}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"omit",{enumerable:!0,get:function(){return omit}})},891:function(r,n){"use strict";function parsePath(r){let n=r.indexOf("#"),o=r.indexOf("?"),l=o>-1&&(n<0||o-1?{pathname:r.substring(0,l?o:n),query:l?r.substring(o,n>-1?n:void 0):"",hash:n>-1?r.slice(n):""}:{pathname:r,query:"",hash:""}}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"parsePath",{enumerable:!0,get:function(){return parsePath}})},9823:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"parseRelativeUrl",{enumerable:!0,get:function(){return parseRelativeUrl}});let l=o(1306),u=o(4828);function parseRelativeUrl(r,n){let o=new URL((0,l.getLocationOrigin)()),s=n?new URL(n,o):r.startsWith(".")?new URL(window.location.href):o,{pathname:d,searchParams:f,search:h,hash:g,href:_,origin:y}=new URL(r,s);if(y!==o.origin)throw Error("invariant: invalid relative URL, router received "+r);return{pathname:d,query:(0,u.searchParamsToUrlQuery)(f),search:h,hash:g,href:_.slice(o.origin.length)}}},6315:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"pathHasPrefix",{enumerable:!0,get:function(){return pathHasPrefix}});let l=o(891);function pathHasPrefix(r,n){if("string"!=typeof r)return!1;let{pathname:o}=(0,l.parsePath)(r);return o===n||o.startsWith(n+"/")}},4828:function(r,n){"use strict";function searchParamsToUrlQuery(r){let n={};return r.forEach((r,o)=>{void 0===n[o]?n[o]=r:Array.isArray(n[o])?n[o].push(r):n[o]=[n[o],r]}),n}function stringifyUrlQueryParam(r){return"string"!=typeof r&&("number"!=typeof r||isNaN(r))&&"boolean"!=typeof r?"":String(r)}function urlQueryToSearchParams(r){let n=new URLSearchParams;return Object.entries(r).forEach(r=>{let[o,l]=r;Array.isArray(l)?l.forEach(r=>n.append(o,stringifyUrlQueryParam(r))):n.set(o,stringifyUrlQueryParam(l))}),n}function assign(r){for(var n=arguments.length,o=Array(n>1?n-1:0),l=1;l{Array.from(n.keys()).forEach(n=>r.delete(n)),n.forEach((n,o)=>r.append(o,n))}),r}Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{searchParamsToUrlQuery:function(){return searchParamsToUrlQuery},urlQueryToSearchParams:function(){return urlQueryToSearchParams},assign:function(){return assign}})},4980:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removePathPrefix",{enumerable:!0,get:function(){return removePathPrefix}});let l=o(6315);function removePathPrefix(r,n){if(!(0,l.pathHasPrefix)(r,n))return r;let o=r.slice(n.length);return o.startsWith("/")?o:"/"+o}},6082:function(r,n){"use strict";function removeTrailingSlash(r){return r.replace(/\/$/,"")||"/"}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"removeTrailingSlash",{enumerable:!0,get:function(){return removeTrailingSlash}})},9001:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getRouteMatcher",{enumerable:!0,get:function(){return getRouteMatcher}});let l=o(1306);function getRouteMatcher(r){let{re:n,groups:o}=r;return r=>{let u=n.exec(r);if(!u)return!1;let decode=r=>{try{return decodeURIComponent(r)}catch(r){throw new l.DecodeError("failed to decode param")}},s={};return Object.keys(o).forEach(r=>{let n=o[r],l=u[n.pos];void 0!==l&&(s[r]=~l.indexOf("/")?l.split("/").map(r=>decode(r)):n.repeat?[decode(l)]:decode(l))}),s}}},8300:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{getRouteRegex:function(){return getRouteRegex},getNamedRouteRegex:function(){return getNamedRouteRegex},getNamedMiddlewareRegex:function(){return getNamedMiddlewareRegex}});let l=o(2407),u=o(4125),s=o(6082);function parseParameter(r){let n=r.startsWith("[")&&r.endsWith("]");n&&(r=r.slice(1,-1));let o=r.startsWith("...");return o&&(r=r.slice(3)),{key:r,repeat:o,optional:n}}function getParametrizedRoute(r){let n=(0,s.removeTrailingSlash)(r).slice(1).split("/"),o={},d=1;return{parameterizedRoute:n.map(r=>{let n=l.INTERCEPTION_ROUTE_MARKERS.find(n=>r.startsWith(n)),s=r.match(/\[((?:\[.*\])|.+)\]/);if(n&&s){let{key:r,optional:l,repeat:f}=parseParameter(s[1]);return o[r]={pos:d++,repeat:f,optional:l},"/"+(0,u.escapeStringRegexp)(n)+"([^/]+?)"}if(!s)return"/"+(0,u.escapeStringRegexp)(r);{let{key:r,repeat:n,optional:l}=parseParameter(s[1]);return o[r]={pos:d++,repeat:n,optional:l},n?l?"(?:/(.+?))?":"/(.+?)":"/([^/]+?)"}}).join(""),groups:o}}function getRouteRegex(r){let{parameterizedRoute:n,groups:o}=getParametrizedRoute(r);return{re:RegExp("^"+n+"(?:/)?$"),groups:o}}function getSafeKeyFromSegment(r){let{getSafeRouteKey:n,segment:o,routeKeys:l,keyPrefix:u}=r,{key:s,optional:d,repeat:f}=parseParameter(o),h=s.replace(/\W/g,"");u&&(h=""+u+h);let g=!1;return(0===h.length||h.length>30)&&(g=!0),isNaN(parseInt(h.slice(0,1)))||(g=!0),g&&(h=n()),u?l[h]=""+u+s:l[h]=""+s,f?d?"(?:/(?<"+h+">.+?))?":"/(?<"+h+">.+?)":"/(?<"+h+">[^/]+?)"}function getNamedParametrizedRoute(r,n){let o;let d=(0,s.removeTrailingSlash)(r).slice(1).split("/"),f=(o=0,()=>{let r="",n=++o;for(;n>0;)r+=String.fromCharCode(97+(n-1)%26),n=Math.floor((n-1)/26);return r}),h={};return{namedParameterizedRoute:d.map(r=>{let o=l.INTERCEPTION_ROUTE_MARKERS.some(n=>r.startsWith(n)),s=r.match(/\[((?:\[.*\])|.+)\]/);return o&&s?getSafeKeyFromSegment({getSafeRouteKey:f,segment:s[1],routeKeys:h,keyPrefix:n?"nxtI":void 0}):s?getSafeKeyFromSegment({getSafeRouteKey:f,segment:s[1],routeKeys:h,keyPrefix:n?"nxtP":void 0}):"/"+(0,u.escapeStringRegexp)(r)}).join(""),routeKeys:h}}function getNamedRouteRegex(r,n){let o=getNamedParametrizedRoute(r,n);return{...getRouteRegex(r),namedRegex:"^"+o.namedParameterizedRoute+"(?:/)?$",routeKeys:o.routeKeys}}function getNamedMiddlewareRegex(r,n){let{parameterizedRoute:o}=getParametrizedRoute(r),{catchAll:l=!0}=n;if("/"===o)return{namedRegex:"^/"+(l?".*":"")+"$"};let{namedParameterizedRoute:u}=getNamedParametrizedRoute(r,!1);return{namedRegex:"^"+u+(l?"(?:(/.*)?)":"")+"$"}}},2839:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"getSortedRoutes",{enumerable:!0,get:function(){return getSortedRoutes}});let UrlNode=class UrlNode{insert(r){this._insert(r.split("/").filter(Boolean),[],!1)}smoosh(){return this._smoosh()}_smoosh(r){void 0===r&&(r="/");let n=[...this.children.keys()].sort();null!==this.slugName&&n.splice(n.indexOf("[]"),1),null!==this.restSlugName&&n.splice(n.indexOf("[...]"),1),null!==this.optionalRestSlugName&&n.splice(n.indexOf("[[...]]"),1);let o=n.map(n=>this.children.get(n)._smoosh(""+r+n+"/")).reduce((r,n)=>[...r,...n],[]);if(null!==this.slugName&&o.push(...this.children.get("[]")._smoosh(r+"["+this.slugName+"]/")),!this.placeholder){let n="/"===r?"/":r.slice(0,-1);if(null!=this.optionalRestSlugName)throw Error('You cannot define a route with the same specificity as a optional catch-all route ("'+n+'" and "'+n+"[[..."+this.optionalRestSlugName+']]").');o.unshift(n)}return null!==this.restSlugName&&o.push(...this.children.get("[...]")._smoosh(r+"[..."+this.restSlugName+"]/")),null!==this.optionalRestSlugName&&o.push(...this.children.get("[[...]]")._smoosh(r+"[[..."+this.optionalRestSlugName+"]]/")),o}_insert(r,n,o){if(0===r.length){this.placeholder=!1;return}if(o)throw Error("Catch-all must be the last part of the URL.");let l=r[0];if(l.startsWith("[")&&l.endsWith("]")){let u=l.slice(1,-1),s=!1;if(u.startsWith("[")&&u.endsWith("]")&&(u=u.slice(1,-1),s=!0),u.startsWith("...")&&(u=u.substring(3),o=!0),u.startsWith("[")||u.endsWith("]"))throw Error("Segment names may not start or end with extra brackets ('"+u+"').");if(u.startsWith("."))throw Error("Segment names may not start with erroneous periods ('"+u+"').");function handleSlug(r,o){if(null!==r&&r!==o)throw Error("You cannot use different slug names for the same dynamic path ('"+r+"' !== '"+o+"').");n.forEach(r=>{if(r===o)throw Error('You cannot have the same slug name "'+o+'" repeat within a single dynamic path');if(r.replace(/\W/g,"")===l.replace(/\W/g,""))throw Error('You cannot have the slug names "'+r+'" and "'+o+'" differ only by non-word symbols within a single dynamic path')}),n.push(o)}if(o){if(s){if(null!=this.restSlugName)throw Error('You cannot use both an required and optional catch-all route at the same level ("[...'+this.restSlugName+']" and "'+r[0]+'" ).');handleSlug(this.optionalRestSlugName,u),this.optionalRestSlugName=u,l="[[...]]"}else{if(null!=this.optionalRestSlugName)throw Error('You cannot use both an optional and required catch-all route at the same level ("[[...'+this.optionalRestSlugName+']]" and "'+r[0]+'").');handleSlug(this.restSlugName,u),this.restSlugName=u,l="[...]"}}else{if(s)throw Error('Optional route parameters are not yet supported ("'+r[0]+'").');handleSlug(this.slugName,u),this.slugName=u,l="[]"}}this.children.has(l)||this.children.set(l,new UrlNode),this.children.get(l)._insert(r.slice(1),n,o)}constructor(){this.placeholder=!0,this.children=new Map,this.slugName=null,this.restSlugName=null,this.optionalRestSlugName=null}};function getSortedRoutes(r){let n=new UrlNode;return r.forEach(r=>n.insert(r)),n.smoosh()}},510:function(r,n){"use strict";let o;Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return _default},setConfig:function(){return setConfig}});let _default=()=>o;function setConfig(r){o=r}},7494:function(r,n){"use strict";function isGroupSegment(r){return"("===r[0]&&r.endsWith(")")}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isGroupSegment",{enumerable:!0,get:function(){return isGroupSegment}})},3632:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"default",{enumerable:!0,get:function(){return SideEffect}});let l=o(7294),u=l.useLayoutEffect,s=l.useEffect;function SideEffect(r){let{headManager:n,reduceComponentsToState:o}=r;function emitChange(){if(n&&n.mountedInstances){let u=l.Children.toArray(Array.from(n.mountedInstances).filter(Boolean));n.updateHead(o(u,r))}}return u(()=>{var o;return null==n||null==(o=n.mountedInstances)||o.add(r.children),()=>{var o;null==n||null==(o=n.mountedInstances)||o.delete(r.children)}}),u(()=>(n&&(n._pendingUpdate=emitChange),()=>{n&&(n._pendingUpdate=emitChange)})),s(()=>(n&&n._pendingUpdate&&(n._pendingUpdate(),n._pendingUpdate=null),()=>{n&&n._pendingUpdate&&(n._pendingUpdate(),n._pendingUpdate=null)})),null}},1306:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{WEB_VITALS:function(){return o},execOnce:function(){return execOnce},isAbsoluteUrl:function(){return isAbsoluteUrl},getLocationOrigin:function(){return getLocationOrigin},getURL:function(){return getURL},getDisplayName:function(){return getDisplayName},isResSent:function(){return isResSent},normalizeRepeatedSlashes:function(){return normalizeRepeatedSlashes},loadGetInitialProps:function(){return loadGetInitialProps},SP:function(){return u},ST:function(){return s},DecodeError:function(){return DecodeError},NormalizeError:function(){return NormalizeError},PageNotFoundError:function(){return PageNotFoundError},MissingStaticPage:function(){return MissingStaticPage},MiddlewareNotFoundError:function(){return MiddlewareNotFoundError},stringifyError:function(){return stringifyError}});let o=["CLS","FCP","FID","INP","LCP","TTFB"];function execOnce(r){let n,o=!1;return function(){for(var l=arguments.length,u=Array(l),s=0;sl.test(r);function getLocationOrigin(){let{protocol:r,hostname:n,port:o}=window.location;return r+"//"+n+(o?":"+o:"")}function getURL(){let{href:r}=window.location,n=getLocationOrigin();return r.substring(n.length)}function getDisplayName(r){return"string"==typeof r?r:r.displayName||r.name||"Unknown"}function isResSent(r){return r.finished||r.headersSent}function normalizeRepeatedSlashes(r){let n=r.split("?"),o=n[0];return o.replace(/\\/g,"/").replace(/\/\/+/g,"/")+(n[1]?"?"+n.slice(1).join("?"):"")}async function loadGetInitialProps(r,n){let o=n.res||n.ctx&&n.ctx.res;if(!r.getInitialProps)return n.ctx&&n.Component?{pageProps:await loadGetInitialProps(n.Component,n.ctx)}:{};let l=await r.getInitialProps(n);if(o&&isResSent(o))return l;if(!l){let n='"'+getDisplayName(r)+'.getInitialProps()" should resolve to an object. But found "'+l+'" instead.';throw Error(n)}return l}let u="undefined"!=typeof performance,s=u&&["mark","measure","getEntriesByName"].every(r=>"function"==typeof performance[r]);let DecodeError=class DecodeError extends Error{};let NormalizeError=class NormalizeError extends Error{};let PageNotFoundError=class PageNotFoundError extends Error{constructor(r){super(),this.code="ENOENT",this.name="PageNotFoundError",this.message="Cannot find module for page: "+r}};let MissingStaticPage=class MissingStaticPage extends Error{constructor(r,n){super(),this.message="Failed to load static file for page: "+r+" "+n}};let MiddlewareNotFoundError=class MiddlewareNotFoundError extends Error{constructor(){super(),this.code="ENOENT",this.message="Cannot find the middleware module"}};function stringifyError(r){return JSON.stringify({message:r.message,stack:r.stack})}},9941:function(r,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"warnOnce",{enumerable:!0,get:function(){return warnOnce}});let warnOnce=r=>{}},8018:function(r){var n,o,l,u,s,d,f,h,g,_,y,P,b,E,S,R,w,O,j,A,M,C,I,x,N,L,D,k,F,U,H,B,W,q,z,G,V,X,Y,K,Q,$,J,Z,ee,et;(n={}).d=function(r,o){for(var l in o)n.o(o,l)&&!n.o(r,l)&&Object.defineProperty(r,l,{enumerable:!0,get:o[l]})},n.o=function(r,n){return Object.prototype.hasOwnProperty.call(r,n)},n.r=function(r){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(r,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(r,"__esModule",{value:!0})},void 0!==n&&(n.ab="//"),o={},n.r(o),n.d(o,{getCLS:function(){return I},getFCP:function(){return A},getFID:function(){return U},getINP:function(){return $},getLCP:function(){return Z},getTTFB:function(){return et},onCLS:function(){return I},onFCP:function(){return A},onFID:function(){return U},onINP:function(){return $},onLCP:function(){return Z},onTTFB:function(){return et}}),h=-1,g=function(r){addEventListener("pageshow",function(n){n.persisted&&(h=n.timeStamp,r(n))},!0)},_=function(){return window.performance&&performance.getEntriesByType&&performance.getEntriesByType("navigation")[0]},y=function(){var r=_();return r&&r.activationStart||0},P=function(r,n){var o=_(),l="navigate";return h>=0?l="back-forward-cache":o&&(l=document.prerendering||y()>0?"prerender":o.type.replace(/_/g,"-")),{name:r,value:void 0===n?-1:n,rating:"good",delta:0,entries:[],id:"v3-".concat(Date.now(),"-").concat(Math.floor(8999999999999*Math.random())+1e12),navigationType:l}},b=function(r,n,o){try{if(PerformanceObserver.supportedEntryTypes.includes(r)){var l=new PerformanceObserver(function(r){n(r.getEntries())});return l.observe(Object.assign({type:r,buffered:!0},o||{})),l}}catch(r){}},E=function(r,n){var T=function t(o){"pagehide"!==o.type&&"hidden"!==document.visibilityState||(r(o),n&&(removeEventListener("visibilitychange",t,!0),removeEventListener("pagehide",t,!0)))};addEventListener("visibilitychange",T,!0),addEventListener("pagehide",T,!0)},S=function(r,n,o,l){var u,s;return function(d){var f;n.value>=0&&(d||l)&&((s=n.value-(u||0))||void 0===u)&&(u=n.value,n.delta=s,n.rating=(f=n.value)>o[1]?"poor":f>o[0]?"needs-improvement":"good",r(n))}},R=-1,w=function(){return"hidden"!==document.visibilityState||document.prerendering?1/0:0},O=function(){E(function(r){R=r.timeStamp},!0)},j=function(){return R<0&&(R=w(),O(),g(function(){setTimeout(function(){R=w(),O()},0)})),{get firstHiddenTime(){return R}}},A=function(r,n){n=n||{};var o,l=[1800,3e3],u=j(),s=P("FCP"),c=function(r){r.forEach(function(r){"first-contentful-paint"===r.name&&(f&&f.disconnect(),r.startTime-1&&r(n)},u=P("CLS",0),s=0,d=[],p=function(r){r.forEach(function(r){if(!r.hadRecentInput){var n=d[0],o=d[d.length-1];s&&r.startTime-o.startTime<1e3&&r.startTime-n.startTime<5e3?(s+=r.value,d.push(r)):(s=r.value,d=[r]),s>u.value&&(u.value=s,u.entries=d,l())}})},f=b("layout-shift",p);f&&(l=S(i,u,o,n.reportAllChanges),E(function(){p(f.takeRecords()),l(!0)}),g(function(){s=0,C=-1,l=S(i,u=P("CLS",0),o,n.reportAllChanges)}))},x={passive:!0,capture:!0},N=new Date,L=function(r,n){l||(l=n,u=r,s=new Date,F(removeEventListener),D())},D=function(){if(u>=0&&u1e12?new Date:performance.now())-r.timeStamp;"pointerdown"==r.type?(n=function(){L(u,r),l()},o=function(){l()},l=function(){removeEventListener("pointerup",n,x),removeEventListener("pointercancel",o,x)},addEventListener("pointerup",n,x),addEventListener("pointercancel",o,x)):L(u,r)}},F=function(r){["mousedown","keydown","touchstart","pointerdown"].forEach(function(n){return r(n,k,x)})},U=function(r,n){n=n||{};var o,s=[100,300],f=j(),h=P("FID"),v=function(r){r.startTimen.latency){if(o)o.entries.push(r),o.latency=Math.max(o.latency,r.duration);else{var l={id:r.interactionId,latency:r.duration,entries:[r]};K[l.id]=l,Y.push(l)}Y.sort(function(r,n){return n.latency-r.latency}),Y.splice(10).forEach(function(r){delete K[r.id]})}},$=function(r,n){n=n||{};var o=[200,500];G();var l,u=P("INP"),a=function(r){r.forEach(function(r){r.interactionId&&Q(r),"first-input"!==r.entryType||Y.some(function(n){return n.entries.some(function(n){return r.duration===n.duration&&r.startTime===n.startTime})})||Q(r)});var n,o=(n=Math.min(Y.length-1,Math.floor(X()/50)),Y[n]);o&&o.latency!==u.value&&(u.value=o.latency,u.entries=o.entries,l())},s=b("event",a,{durationThreshold:n.durationThreshold||40});l=S(r,u,o,n.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),E(function(){a(s.takeRecords()),u.value<0&&X()>0&&(u.value=0,u.entries=[]),l(!0)}),g(function(){Y=[],V=z(),l=S(r,u=P("INP"),o,n.reportAllChanges)}))},J={},Z=function(r,n){n=n||{};var o,l=[2500,4e3],u=j(),s=P("LCP"),c=function(r){var n=r[r.length-1];if(n){var l=n.startTime-y();lperformance.now())return;l.entries=[s],u(!0),g(function(){(u=S(r,l=P("TTFB",0),o,n.reportAllChanges))(!0)})}})},r.exports=o},9423:function(r,n){"use strict";function isAPIRoute(r){return"/api"===r||!!(null==r?void 0:r.startsWith("/api/"))}Object.defineProperty(n,"__esModule",{value:!0}),Object.defineProperty(n,"isAPIRoute",{enumerable:!0,get:function(){return isAPIRoute}})},676:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{default:function(){return isError},getProperError:function(){return getProperError}});let l=o(9942);function isError(r){return"object"==typeof r&&null!==r&&"name"in r&&"message"in r}function getProperError(r){return isError(r)?r:Error((0,l.isPlainObject)(r)?JSON.stringify(r):r+"")}},2407:function(r,n,o){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),function(r,n){for(var o in n)Object.defineProperty(r,o,{enumerable:!0,get:n[o]})}(n,{INTERCEPTION_ROUTE_MARKERS:function(){return u},isInterceptionRouteAppPath:function(){return isInterceptionRouteAppPath},extractInterceptionRouteInformation:function(){return extractInterceptionRouteInformation}});let l=o(9537),u=["(..)(..)","(.)","(..)","(...)"];function isInterceptionRouteAppPath(r){return void 0!==r.split("/").find(r=>u.find(n=>r.startsWith(n)))}function extractInterceptionRouteInformation(r){let n,o,s;for(let l of r.split("/"))if(o=u.find(r=>l.startsWith(r))){[n,s]=r.split(o,2);break}if(!n||!o||!s)throw Error(`Invalid interception route: ${r}. Must be in the format //(..|...|..)(..)/`);switch(n=(0,l.normalizeAppPath)(n),o){case"(.)":s="/"===n?`/${s}`:n+"/"+s;break;case"(..)":if("/"===n)throw Error(`Invalid interception route: ${r}. Cannot use (..) marker at the root level, use (.) instead.`);s=n.split("/").slice(0,-1).concat(s).join("/");break;case"(...)":s="/"+s;break;case"(..)(..)":let d=n.split("/");if(d.length<=2)throw Error(`Invalid interception route: ${r}. Cannot use (..)(..) marker at the root level or one level up.`);s=d.slice(0,-2).concat(s).join("/");break;default:throw Error("Invariant: unexpected marker")}return{interceptingRoute:n,interceptedRoute:s}}},2431:function(){},8754:function(r,n,o){"use strict";function _interop_require_default(r){return r&&r.__esModule?r:{default:r}}o.r(n),o.d(n,{_:function(){return _interop_require_default},_interop_require_default:function(){return _interop_require_default}})},1757:function(r,n,o){"use strict";function _getRequireWildcardCache(r){if("function"!=typeof WeakMap)return null;var n=new WeakMap,o=new WeakMap;return(_getRequireWildcardCache=function(r){return r?o:n})(r)}function _interop_require_wildcard(r,n){if(!n&&r&&r.__esModule)return r;if(null===r||"object"!=typeof r&&"function"!=typeof r)return{default:r};var o=_getRequireWildcardCache(n);if(o&&o.has(r))return o.get(r);var l={},u=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var s in r)if("default"!==s&&Object.prototype.hasOwnProperty.call(r,s)){var d=u?Object.getOwnPropertyDescriptor(r,s):null;d&&(d.get||d.set)?Object.defineProperty(l,s,d):l[s]=r[s]}return l.default=r,o&&o.set(r,l),l}o.r(n),o.d(n,{_:function(){return _interop_require_wildcard},_interop_require_wildcard:function(){return _interop_require_wildcard}})}},function(r){r.O(0,[774],function(){return r(r.s=6653)}),_N_E=r.O()}]); \ No newline at end of file diff --git a/rln-js/_next/static/chunks/webpack-80a722d30811f29c.js b/rln-js/_next/static/chunks/webpack-cf40ceb85fc14a09.js similarity index 78% rename from rln-js/_next/static/chunks/webpack-80a722d30811f29c.js rename to rln-js/_next/static/chunks/webpack-cf40ceb85fc14a09.js index 8a9ffa6..8640f6a 100644 --- a/rln-js/_next/static/chunks/webpack-80a722d30811f29c.js +++ b/rln-js/_next/static/chunks/webpack-cf40ceb85fc14a09.js @@ -1 +1 @@ -!function(){"use strict";var e,r,_,t,n,i,u,o,c,a={},p={};function __webpack_require__(e){var r=p[e];if(void 0!==r)return r.exports;var _=p[e]={id:e,loaded:!1,exports:{}},t=!0;try{a[e].call(_.exports,_,_.exports,__webpack_require__),t=!1}finally{t&&delete p[e]}return _.loaded=!0,_.exports}__webpack_require__.m=a,__webpack_require__.amdO={},e=[],__webpack_require__.O=function(r,_,t,n){if(_){n=n||0;for(var i=e.length;i>0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[_,t,n];return}for(var u=1/0,i=0;i=n&&Object.keys(__webpack_require__.O).every(function(e){return __webpack_require__.O[e](_[c])})?_.splice(c--,1):(o=!1,n0&&e[i-1][2]>n;i--)e[i]=e[i-1];e[i]=[_,t,n];return}for(var u=1/0,i=0;i=n&&Object.keys(__webpack_require__.O).every(function(e){return __webpack_require__.O[e](_[c])})?_.splice(c--,1):(o=!1,nRLN Example

Waku RLN

Application status: none

Contract

Your address

Not loaded yet

Latest membership ID on contract

Not loaded yet

Keystore

Generate new credentials from wallet

Read from Keystore

Keystore hash

none

Membership ID

none

Secret Hash

none

Commitment

none

Nullifier

none

Trapdoor

none

Waku

(select credentials to initialize)

Waku status: none

Messages

    \ No newline at end of file +RLN Example

    Waku RLN

    Application status: none

    Contract

    Your address

    Not loaded yet

    Latest membership ID on contract

    Not loaded yet

    Keystore

    Generate new credentials from wallet

    Read from Keystore

    Keystore hash

    none

    Membership ID

    none

    Secret Hash

    none

    Commitment

    none

    Nullifier

    none

    Trapdoor

    none

    Waku

    (select credentials to initialize)

    Waku status: none

    Messages

      \ No newline at end of file diff --git a/rln-js/home.txt b/rln-js/home.txt index 8e9caae..a127189 100644 --- a/rln-js/home.txt +++ b/rln-js/home.txt @@ -1,10 +1,10 @@ -1:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -2:HL["/_next/static/css/2fdde7fba3cc2d8d.css","style",{"crossOrigin":""}] -0:["rjw8bcWMgChuVR1uWZlvT",[[["",{"children":["home",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fdde7fba3cc2d8d.css","precedence":"next","crossOrigin":""}]],"$L4"]]]] +1:HL["/rln-js/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +2:HL["/rln-js/_next/static/css/fbde540ba9fb24fc.css","style",{"crossOrigin":""}] +0:["M6oozOb_s2-llEXmo6VaL",[[["",{"children":["home",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/rln-js/_next/static/css/fbde540ba9fb24fc.css","precedence":"next","crossOrigin":""}]],"$L4"]]]] 5:I[6954,[],""] 6:I[7264,[],""] 8:I[8297,[],""] -9:I[3663,["866","static/chunks/e37a0b60-269ef973f827543e.js","822","static/chunks/822-38a22d62478b24fa.js","240","static/chunks/240-cd5c5e1cf9cc143f.js","951","static/chunks/app/home/page-82ca4f4399f6aaa4.js"],""] -3:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_e66fe9","children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","home","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L7",["$","$L8",null,{"propsForComponent":{"params":{}},"Component":"$9","isStaticGeneration":true}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"home"},"styles":[]}]}]}],null] -4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"RLN Example"}],["$","meta","2",{"name":"description","content":"Showcases RLN, Keystore and generation of proofs"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"32x32"}],["$","meta","5",{"name":"next-size-adjust"}]] +9:I[3663,["866","static/chunks/e37a0b60-269ef973f827543e.js","782","static/chunks/782-d7aa94b30b6e6632.js","240","static/chunks/240-09f36703b8ace873.js","951","static/chunks/app/home/page-46c41f335f6047ce.js"],""] +3:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_7632df","children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children","home","children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":"$undefined","notFoundStyles":"$undefined","childProp":{"current":["$L7",["$","$L8",null,{"propsForComponent":{"params":{}},"Component":"$9","isStaticGeneration":true}],null],"segment":"__PAGE__"},"styles":[]}],"segment":"home"},"styles":[]}]}]}],null] +4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"RLN Example"}],["$","meta","2",{"name":"description","content":"Showcases RLN, Keystore and generation of proofs"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","4",{"rel":"icon","href":"/rln-js/favicon.ico","type":"image/x-icon","sizes":"32x32"}],["$","meta","5",{"name":"next-size-adjust"}]] 7:null diff --git a/rln-js/index.html b/rln-js/index.html index bbf8b02..cb26355 100644 --- a/rln-js/index.html +++ b/rln-js/index.html @@ -1 +1 @@ -RLN Example

      Waku RLN

      Application status: none

      Contract

      Your address

      Not loaded yet

      Latest membership ID on contract

      Not loaded yet

      Keystore

      Generate new credentials from wallet

      Read from Keystore

      Keystore hash

      none

      Membership ID

      none

      Secret Hash

      none

      Commitment

      none

      Nullifier

      none

      Trapdoor

      none

      Waku

      (select credentials to initialize)

      Waku status: none

      Messages

        \ No newline at end of file +RLN Example

        Waku RLN

        Application status: none

        Contract

        Your address

        Not loaded yet

        Latest membership ID on contract

        Not loaded yet

        Keystore

        Generate new credentials from wallet

        Read from Keystore

        Keystore hash

        none

        Membership ID

        none

        Secret Hash

        none

        Commitment

        none

        Nullifier

        none

        Trapdoor

        none

        Waku

        (select credentials to initialize)

        Waku status: none

        Messages

          \ No newline at end of file diff --git a/rln-js/index.txt b/rln-js/index.txt index 3c1f0ca..8b0c279 100644 --- a/rln-js/index.txt +++ b/rln-js/index.txt @@ -1,9 +1,9 @@ -1:HL["/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -2:HL["/_next/static/css/2fdde7fba3cc2d8d.css","style",{"crossOrigin":""}] -0:["rjw8bcWMgChuVR1uWZlvT",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/_next/static/css/2fdde7fba3cc2d8d.css","precedence":"next","crossOrigin":""}]],"$L4"]]]] +1:HL["/rln-js/_next/static/media/c9a5bc6a7c948fb0-s.p.woff2","font",{"crossOrigin":"","type":"font/woff2"}] +2:HL["/rln-js/_next/static/css/fbde540ba9fb24fc.css","style",{"crossOrigin":""}] +0:["M6oozOb_s2-llEXmo6VaL",[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],"$L3",[[["$","link","0",{"rel":"stylesheet","href":"/rln-js/_next/static/css/fbde540ba9fb24fc.css","precedence":"next","crossOrigin":""}]],"$L4"]]]] 5:I[6954,[],""] 6:I[7264,[],""] -8:I[3663,["866","static/chunks/e37a0b60-269ef973f827543e.js","822","static/chunks/822-38a22d62478b24fa.js","240","static/chunks/240-cd5c5e1cf9cc143f.js","931","static/chunks/app/page-8d29b29e326404e2.js"],""] -3:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_e66fe9","children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$L7",["$","$L8",null,{"params":{},"searchParams":{}}],null],"segment":"__PAGE__"},"styles":[]}]}]}],null] -4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"RLN Example"}],["$","meta","2",{"name":"description","content":"Showcases RLN, Keystore and generation of proofs"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","4",{"rel":"icon","href":"/favicon.ico","type":"image/x-icon","sizes":"32x32"}],["$","meta","5",{"name":"next-size-adjust"}]] +8:I[3663,["866","static/chunks/e37a0b60-269ef973f827543e.js","782","static/chunks/782-d7aa94b30b6e6632.js","240","static/chunks/240-09f36703b8ace873.js","931","static/chunks/app/page-89096a90cb200ba2.js"],""] +3:[null,["$","html",null,{"lang":"en","children":["$","body",null,{"className":"__className_7632df","children":["$","$L5",null,{"parallelRouterKey":"children","segmentPath":["children"],"loading":"$undefined","loadingStyles":"$undefined","hasLoading":false,"error":"$undefined","errorStyles":"$undefined","template":["$","$L6",null,{}],"templateStyles":"$undefined","notFound":[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":"404"}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],"notFoundStyles":[],"childProp":{"current":["$L7",["$","$L8",null,{"params":{},"searchParams":{}}],null],"segment":"__PAGE__"},"styles":[]}]}]}],null] +4:[["$","meta","0",{"charSet":"utf-8"}],["$","title","1",{"children":"RLN Example"}],["$","meta","2",{"name":"description","content":"Showcases RLN, Keystore and generation of proofs"}],["$","meta","3",{"name":"viewport","content":"width=device-width, initial-scale=1"}],["$","link","4",{"rel":"icon","href":"/rln-js/favicon.ico","type":"image/x-icon","sizes":"32x32"}],["$","meta","5",{"name":"next-size-adjust"}]] 7:null